Looking for the perfect gift? Check Baloka.com
Powered by MaxBlogPress  
  • MyLineRider

  • Flex 3 Experiment: Drawing a path at run time with insert points

22nd July 2009

Flex 3 Experiment: Drawing a path at run time with insert points

Continuing from my previous post about how to draw a curve with editable points at run time, I decided to post a new one, on how to make draw a path (with straight lines) that include points to insert additional segments. Again, this is based on the book: “Foundation ActionScript 3.0 Image Effects” by Todd Yard.

By clicking a light red point between any two black points you can bisect the segment creating a new black point for manipulation, adding another light red point and repositioning the previous moved one and the new light red points to the center of their corresponding segments.  In addition, any black point can be clicked and dragged to change the location of that point. It easier to understand by drawing a path. to do that, click on the canvas below a couple of times. Then move the black points to modify the path or the light red circles to add new segments. This requires Flash Player 10. Grab the code here.

[Post to Twitter]   [Post to Plurk]   [Post to Digg]   [Post to ping.fm]

posted in Flex | 9 Comments

  • About Me

  • Hi, I'm Gilbert Mizrahi and I created this blog to comment about technology and internet marketing. Additionally, I will post Flash/Flex experiments and in most cases they will refer to baloka.com, my wife's site- hey I have to promote the brand:)

google

google

asus