motion - Macromedia Director Lingo

hi. I have a problem about motion demand on time. I want to move a matter as functions of time. for istance a matter has motion according to x=5t2( square of time) which code I should use. is there a time variable in lingo. theres a variable such as"systemseconds" in authorware. thanks your suggestions...

1. motion

hi. I have a problem about motion demand on time. I want to move a matter as functions of time. for istance a matter has motion according to x=5t2( square of time) which code I should use. is there a time variable in lingo. theres a variable such as"systemseconds" in authorware. thanks your suggestions

mrzsbsky webforumsuser@macromedia.com Guest

2. Re: motion

On 6/8/03 2:53 AM, in article bgondh\$kfa\$1forums.macromedia.com, "mrzsbsky"
<webforumsusermacromedia.com> wrote:
> hi. I have a problem about motion demand on time. I want to move a matter as
> functions of time. for istance a matter has motion according to x=5t2( square
> of time) which code I should use. is there a time variable in lingo. theres a
> variable such as"systemseconds" in authorware. thanks your suggestions

Assuming you want to calculate the time between each 'step', then you could
do something like this:

Property myLastStep

On beginSprite (me)
MyLastStep = the milliseconds
end

On exitframe (me)
t = the milliseconds - MyLastStep
X = 5 * power(t, 2)
end

> But I'm not sure if squaring the milliseconds will give you an overflow.
> Another math wiz will have to answer that one.
Because of the potential for overflow, Director seems to convert integers to
a floats before doing the calculation (ie power always returns a float).
Same as exp(), log() etc

Luke

--------------------------------
| [url]www.meccamedialight.com.au[/url] |
| [url]www.lingoworkshop.com[/url] |
--------------------------------

LukeWig Guest

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•