;

PDA

Click to See Complete Forum and Search --> : I need to understand something about Timer, help me!


SirN
04-19-2003, 12:21 AM
I need to use a timer , I think. The script I have done looks like this:

function pause (i)
{
// here I need to say pause (i) seconds
// and I think I use timer but I draw a
// blank when I try to figure how.

// anyway, the thing after is simple

play();
}

I am looking at web places for the answer and it might take me some time to reach insight that way, soo I thought it was allright to try here for an answer ... I look at java.sun.com but I have no good place to find explinations to timer stuff and if you have a link I would be happy, also.

blanius
04-19-2003, 12:38 AM
java.sun.com won't be of much use!

Anyway

It's best not to pause within the script, I've found that doesn't work so well

are you sure you can't just use the delay action?

SirN
04-19-2003, 02:12 AM
I need to have a delay-time or duration-time that comes loaded as a variable, the delay-seconds and duration-seconds must be numbers/cannot be variables, to my knowledge.

:(

ForumNewbie
04-19-2003, 07:40 AM
Hi,

Not sure if this is the most elegant solution, or the most well coded, but I use the getTimer() function when I need to do this kind of thing. It's hard to explain how, so I've attached an example in v4 beta 3.

This example waits 2 seconds, then shows an element.
(I know there are better ways of doing this, but it shows how the pause works)

I use getTimer() along with a 'status' field that I use throughout the movie to track the movie's progress. I find this really handy for debugging.

If you need any more explanation of the example, drop me a message.

Hope this helps,

Morgan.

SirN
04-19-2003, 08:13 AM
Thanks, this forum is really something to award because of the people here! :smoov: