Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | RE: [flasher] RE: Connecting lines in Flash |
| From: | AndyA |
| Date: | Wed, 07 Mar 2001 11:23:13 -0000 |
Hey Carl,
I never used Flash4 so, I'm not exactly sure what you're referring to.
Nevertheless, I have been working on something as a self-tutorial that
requires the resizing of lines. I use a lineMC as you mention and then
simply apply the required scaling using:
lineMC._width
lineMC._height
lineMC._xscale
lineMC._yscale
Using these, you simply take the coordinates of the two points you want and
set the width appropriately.
lineMC._width = thisX - goalX
etc.
If you wanted to join points at an angle, then you can rotate the MC using a
little pythagoras which (if memory serves me right would be something like:
angle = Math.atan ((thisY - goalY)/(thisX - goalX))
lineMC._rotation = angle
given that tan(angle) = opposite over adjacent (???)
Hope to have helped.
Andy
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

