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

  • Flex 3 Experiment: Drawing curve with many editable points at run time

18th July 2009

Flex 3 Experiment: Drawing curve with many editable points at run time

It has been a while since my last post. I Have tons of experiments and ideas to post, but I guess I procrastinate too much.

Anyway, a couple days ago a got the book: “Foundation ActionScript 3.0 Image Effects” by Todd Yard and its great. I just finished Chapter 1, but I have so many ideas to play with that I guess it will take a while to finish the book (I sort of browsed the whole thing already though).

One of the descriptions in Chapter 1, which deals with AS3 Drawing API is about changing points in a path.You can see the example below. Click on the canvas (anywher), then click somewhere else, etc.  At any time  you can drag the points to edit the path.

Another example refers to drawing curves. In this case a curve is drawn of the stage, but the user can change the start and end point and the control point.  You can play with the curve below.

Then, I decided to make some changes and make something like the changing points in a path, but with the path made of curves. The result is shown below. Again, click on the stage a couple of times to draw some stuff. Now besides been able to move the points, you can move the control points (in light red).  The source code is available here

Enjoy.

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

posted in Flash, Flex, Rich interactive Applications | 8 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