Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: RE: [flasher] RE: Connecting lines in Flash
From: Paul Willoughby
Date: Wed, 07 Mar 2001 11:53:45 -0000

If you're working from the Praystation method (www.praystation.com may 25th
2000) the original F4 code was something like this in a 2 frame loop:

Duplicate Movie Clip ("/line", "newLine1", 1)
Set Property ("/newLine1", X Position) = /v1:_x
Set Property ("/newLine1", Y Position) = /v1:_y
Set Property ("/newLine1", X Scale) = /v2:_x - /v1:_x
Set Property ("/newLine1", Y Scale) = /v2:_y - /v1:_y

/line is a movieclip of a hairline at a 45 degree angle down and right from
the registration point with a width and height of 100. v1 and v2 are the 2
vector points you want to connect. For testing I make draggable movie clips
called v1 and v2.

For some reason in F4, you had to duplicate the line movieclip every frame
or it wouldn't redraw correctly. I've found in F5 that you don't need the
duplication, you can just transform the same clip every frame. So in F5
actionscript (assuming you have clips called line, v1 and v2 on the main
stage and this code is on the line MC):

onClipEvent(enterFrame){
this._x = v1._x;
this._y = v1._y;
this._xscale = v2._x - v1._x;
this._yscale = v2._y - v1._y;
}

hth

paul

> -----Original Message-----
> From: Captieux Carl [carl [dot] captieuxatmetriuseurope [dot] com (mailto:carl [dot] captieuxatmetriuseurope [dot] com)]
> Sent: 07 March 2001 09:55
> To: flasher from chinwag
> Subject: [flasher] RE: Connecting lines in Flash
>
>
> Hi all,
>
> In Flash 4 you had to continually duplicate a line mc to
> position it between
> points.
>
> Is this still the case in Flash 5 or there a better (simple)way of
> connecting lines between points in Flash 5?
>
> Any examples or tutorials would be great.
>
> Thanks.
>
> Carl

>



[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]