PDA

View Full Version : dynamic lines?


philspeakman
03-04-2002, 04:53 PM
i've seen it in nocontrol.com, site i found in you links type page, what i want to do is basically have a line that will have its ends under the middle of a dragable movie and the ends to follow the movie where it goes, but both ends can move independantly of each other, it's obviously setting x and y positions of some description but obviously more complicated. Thx in advance.
Phil

Billy T
03-05-2002, 09:19 AM
got a link?

sfa
03-05-2002, 10:03 AM
basically what you have to do is set the x and y of the line to one movie and scale the line to the other one. So basicallycreat a movie cip with a line starting from the centre of the movie nd going diagonally down and right. The line must be 100 x 100.In a control movie clip set the _x and _y property of the line movie to the MC1 _x and _y constantly(or on mouse move). Now basically set the _xsclale and _yscale of the line mC to the difference between the _x and _y of the two MCs(MC2-MC1).

Hope you understood.

SFA

sfa
03-05-2002, 10:18 AM
I put an example together quickly. There is code on each item, you can obviously arrange it on one.

After all i am not quite sure if this is what you wanted. Is it?

SFA

philspeakman
03-06-2002, 03:50 PM
Cheers mate - exactly what i wanted.
Phil