Tuesday, October 19, 2010

Pause timeline or set Interval code for ActionScript 2 or 3

pause timeline using actionscript 2.0

stop();
setTimeout (
function()
{
play();
}, 1000);
 
 
 
and AS3 code below:
 
stop();
    var nInterval = setInterval(Play, 3000);
    function Play() {
    clearInterval(nInterval);
    gotoAndPlay(_currentframe+1);
    }

No comments:

Post a Comment