/ Published in: ActionScript

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function time(func, delay) { clearInterval(waiter); waiter = setInterval(func, delay); } // Sequence usage: // start(); // // function start() { // trace("This is start 1"); // time(finish, 2000); // } // // function finish() { // time(); // trace("This is the end. The setInterval is cleared."); // } // Simple go to next frame after time duration: // time(goNextFrame, 1000); // function goNextFrame() { // time(); // _root.nextFrame(); // }
Comments
