Looking for the perfect fashion jewelry piece? Check Baloka.com By Maria Mizrahi
Powered by MaxBlogPress  
  • MyLineRider

  • Flex 3 Example: Drawing a path at run time with adding and deleting points capabilities

24th July 2009

Flex 3 Example: Drawing a path at run time with adding and deleting points capabilities

Expanding on my last example, Flex 3 Experiment: Drawing a path at run time with insert points, here is the same example, but in this version it is possible to delete anchor points by clicking on a black point and then hitiing the DELETE key.

Although in this example and in the previous two, the title suggests is a Flex example, all the path functionality is in a AS file, so it can be run as an Actionscript project as well. It requires Flex 3.2+, Flash CS4 or other IDE that can compile for Flash Player 10.

In this case I called this a Flex example and not an experiment, because these are not really experiments ( i am not trying to do anything new really – at least not yet).

The code is available here.

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

posted in Flash, Flex, Uncategorized | 5 Comments

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

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