Flasher Archive

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


Subject: FLASH: assigning starting and end points of a line
From: Matt Perkins
Date: Fri, 28 Apr 2000 05:41:57 +0100

would be nice if flash would let you specify the x2,y2 (end) points of a
line like you can with x1,y1 (start) points wouldn't it?
i figured out a basic way, but i'm having problems when i set new x1,y1
points.
i've got a 45 degree line movie clip that is 25pixels high and wide. i know
that you have to adjust the scaling based on percentages to set new x2,y2
points.
but i'm having problems as i said before.

here is what i have now. click the mouse to set a new starting x,y points
(x1,y1) you'll see why it's messing up.
http://hfaze.ice.org/lab/line.swf

here is the code for the scaling: it's in a movie clip and it adjusts the
line mc with the instance name "line1" (i want to have a few of these on the
stage at a time, that's what i'm using an index variable).

Set Variable: "index" = 1
Set Variable: "xstart" = /:x1
Set Variable: "ystart" = /:y1
Set Variable: "xend" = /:x2
Set Variable: "yend" = /:y2
Set Variable: "xdif" = xend - xstart
Set Variable: "ydif" = yend - ystart
Set Variable: "xscale" = ( xdif / 25) * 100
Set Variable: "yscale" = ( ydif / 25) * 100
Set Property ("/line" & index, X Position) = xstart
Set Property ("/line" & index, Y Position) = xstart
Set Property ("/line" & index, X Scale) = xscale
Set Property ("/line" & index, Y Scale) = yscale

i was wondering if anyone had a method or a code snip handy for this.

> ::: Matt Perkins
> sol_6 ::: http://hfaze.ice.org
hfazeatvnet [dot] net
icq: 2690753


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the last 100 messages from the flasher list NOW
http://www.chinwag.com/flasher/last100.shtml

Flash books http://www.chinwag.com/flasher/books.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  RE: FLASH: OT:Web page in Outlook, ant

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