PDA

View Full Version : How to slow down Flash?


hayored
12-08-2002, 06:51 PM
I have a loop, that moves an object. My code is:

n = 1
do {
object._x = n ;
n = n + 1 ;
} while (n < 600) ;

The problem is that the object moves very fast. Is there any command I can insert to waiting for 10 miliseconds and doing nothing?

Thanks,
YH

Ricod
12-08-2002, 07:36 PM
Yes. Using the getTimer() method you can sort of put a pause in it. There's this tutorial, handy if you don't have mx (http://www.actionscript.org/tutorials/intermediate/delaying_events/index.shtml)
But if you do, I believe you can use this one too. (http://www.actionscript.org/tutorials/intermediate/setInterval/index.shtml)
The last is about setInterval().