Posted By

marc0047 on 07/08/06


Tagged

actionscript


Versions (?)

Last Edited at 07/08/06 11:38am

Viewed 1 times

Executing time without timelines


/ Published in: ActionScript


  1. function time(func, delay) {
  2. clearInterval(waiter);
  3. waiter = setInterval(func, delay);
  4. }
  5.  
  6. // Sequence usage:
  7. // start();
  8. //
  9. // function start() {
  10. // trace("This is start 1");
  11. // time(finish, 2000);
  12. // }
  13. //
  14. // function finish() {
  15. // time();
  16. // trace("This is the end. The setInterval is cleared.");
  17. // }
  18.  
  19. // Simple go to next frame after time duration:
  20. // time(goNextFrame, 1000);
  21. // function goNextFrame() {
  22. // time();
  23. // _root.nextFrame();
  24. // }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.