Drawing controlled lines in Flash

hurtlingturtle used Ask the Experts™
I am trying to draw a line between 2 points, this is made more complex as the line must be a curved line.  Also, the 2 points that it goes between can also change, depending on variables that are input into the movie.
Does anyone have any ideas about how this could be done?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Found it, but I donot know if this is helpfull!??


The above SWF (the zip contains a FLA as well) allows you to drag two points where in between a line is drawn.

In the downloadable this is a straight line, but you can make it curved as well. The downloadable contains also the explaination of how it is done.

Otherwise the following download:

This lets the user draw a square, line or circel by specifying the start and end point with the mouse.

Hope it helps!
have a play around with this..

     lineStyle(1, 0x333333,100);

1st line..creates a clip as a 'container'
2nd..targets the clip
3rd..1=line width, 0x333333=colour, 100=alpha
4th..0=x, 300=y
5th..200=controlX, 500=controlY,400=anchorX, 100=anchorY

use the variables to change the value of the control X and Y positions..to change the curve of the line.


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial