Hi Folkz
My problem is:
just want to know what code I can use for the actionscript stop for time and then continue
Like this
Command command command;
wait some seconds;
Command command command;
is there a sintax to give this break???
tkxxx
[]s
Printable View
Hi Folkz
My problem is:
just want to know what code I can use for the actionscript stop for time and then continue
Like this
Command command command;
wait some seconds;
Command command command;
is there a sintax to give this break???
tkxxx
[]s
What you're looking for is setInterval and there is a nice sticky post about it at the top of this forum.
The method you're currently describing of waiting for a few seconds won't work, because actionscript scripts are supposed to execute very quickly between drawing frames.
So instead, the way it's done is you use setInterval, and you say "execute these lines of code XXX seconds in the future".
code:
myFutureFunction = function()
{
// setInterval will repeat every XX seconds if we don't clear it here...
clearInterval(handle);
// future lines of code go here...
}
// execute some code here...
// Then use setInterval to schedule myFutureFunction 4 seconds in the future
handle = setInterval(myFutureFunction, 4*1000);
err sry wrong file