1
Код:
var i = 0; onEnterFrame = function () { i ++; if (i == 100) { fadeout (); } }
2
Код:
you can use setInterval to control how long you would like the movie to stay at the current frame and tell it to play again at a specific count. var counter = 0; function callback(arg) { counter++ if(counter == 20){ play(); counter = 0; clearInterval(this); }else{ stop() } } setInterval( callback, 1000 ); If you use the onEnterframe function discussed in the previous post be sure to use delete onEnterframe once your condition has been met.
3
Код:
// Stop the movie stop(); // How many seconds until we continue? var nSeconds:Number = 5; // Function which resumes playback function continueMovie():Void{ play(); } // Set the interval var iNum:Number = setInterval(continueMovie, nSeconds*1000);