I need to understand something about Timer, help me!
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.
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.
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.