Warning: Declaration of new_page_menu::start_lvl($output, $depth) should be compatible with Walker::start_lvl(&$output, $depth = 0, $args = Array) in /homepages/28/d93876747/htdocs/MyLineRider/wp-content/themes/redux/functions/theme-functions.php on line 370

Warning: Declaration of new_page_menu::end_lvl($output, $depth) should be compatible with Walker::end_lvl(&$output, $depth = 0, $args = Array) in /homepages/28/d93876747/htdocs/MyLineRider/wp-content/themes/redux/functions/theme-functions.php on line 370

Warning: Declaration of new_page_menu::start_el($output, $page, $depth, $current_page, $args) should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0) in /homepages/28/d93876747/htdocs/MyLineRider/wp-content/themes/redux/functions/theme-functions.php on line 370

Warning: Declaration of new_page_menu::end_el($output, $page, $depth) should be compatible with Walker::end_el(&$output, $object, $depth = 0, $args = Array) in /homepages/28/d93876747/htdocs/MyLineRider/wp-content/themes/redux/functions/theme-functions.php on line 370

Warning: Declaration of menu_walker::start_el(&$output, $item, $depth, $args) should be compatible with Walker_Nav_Menu::start_el(&$output, $item, $depth = 0, $args = Array, $id = 0) in /homepages/28/d93876747/htdocs/MyLineRider/wp-content/themes/redux/functions/theme-functions.php on line 414

Warning: Declaration of Walker_Category_Filter::start_el(&$output, $category, $depth, $args) should be compatible with Walker_Category::start_el(&$output, $category, $depth = 0, $args = Array, $id = 0) in /homepages/28/d93876747/htdocs/MyLineRider/wp-content/themes/redux/functions/theme-functions.php on line 479
arrows | MyLinerider

Drawing Arrows in Actionscript 3 (Flex 4) Using Simple Trigonometry


Continuing the work on the last post – Drawing Stars and Bursts in Actionscript 3 (Flex 4) Using Simple Trigonometry, today I am showing how that little application can be extended to draw arrows of different types, such as the ones on the image below.

In order to create the arrows, we can take the half right side of a burst with 4 sides and render the arrow head with it. That means drawing a quadratic Bezier curve from Po to P1 and another from P1 to P2, using the controls points according to the inner circle (as described on the previous article). See figure above. The rest of the arrow is created by drawing lines from P2 to P3, P3 to P4, P4 to P5, P5 to P6 and then closing the shape with a line from P6 to P0.

Points P3, P4, P5, and P6 can be defined setting the parameters for “Arrow Length”, “Shaft Base Offset”, and Arrow Shaft Thickness”.

Changing the inner radius affect how the head of the arrow will be rendered. Experiment with the tool to produce concave, convex or straight shaped heads.

As usual, below is the application, in case you would like to try it out. Open it in a new tab by clicking HERE.

Get Adobe Flash player


Play around and let me know what do you think. Also, please give me any suggestions you may have to improve it or to extend it.

I have some ideas of where I would like to take it next, but getting yours would be great too.