Flasher Archive

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


Subject: Re: FLASH: moving an mc gradually
From: Robert Bleeker
Date: Fri, 14 Apr 2000 02:05:48 +0100

Olga,

set-up 3 frames within each MC (I'm not sure how complex your MC's are) with
a script on the first frame:

set variable: "startLocX"= get property("",_x)
set variable: "startLocY"= get property("",_y)
comment: "not sure where you want to take the MC"
set variable: "endLocX"= someX
set variable: "endLocY"= someY
comment: "how many steps in between start and end location"
set variable: "steps"=10
set variable: "stepX"=(startLocX-endLocX)/steps
set variable: "stepY"=(startLocY-endLocY)/steps
play


script in frame 3 (must be a keyFrame):

if (steps>0)
set variable: "currentLocX"= get property("",_x)
set variable: "currentLocY"= get property("",_y)
set property("",_x)=currentLocX-stepX
set property("",_y)=currentLocY-stepY
set variable: "steps"=steps-1
end if
go to and play (2)


I am away from flash at the moment so hope it works.


Robert




on 14/4/00 9:58 AM, Olga at olgaattwitchy [dot] com wrote:

> Because I'm working with nearly a hundred mcs that are dynamically generated
> that I want to move relatively to eachother, but the script I currently have
> for movement doesn't seem to work in all cases-- so I was wondering what the
> easiest bit of code is to execute movement from a to b over time.. doing it
> with tweens would end up being a lot of work and not really feasible as far
> as making changes to the movie down the line.
>
>
> :)
> olga
>


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: moving an mc gradually, Olga

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