Posted By

kanirasta on 07/07/06


Tagged

actionscript flash pause


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

saveasraw


Pausa


 / Published in: ActionScript
 

Usar pauseFor(tiempoDeseado); para pausar.

  1. this.createEmptyMovieClip("timer",50);
  2. timer.onEnterFrame = function()
  3. {
  4. if (this.startTime>0)
  5. {
  6. var diff = getTimer()-this.startTime;
  7. if (diff>this.timerLength)
  8. {
  9. this.target.play();
  10. this.startTime = 0;
  11. }
  12. }
  13. };
  14. function pauseFor(theTime)
  15. {
  16. stop();
  17. timer.timerLength = (theTime*1000);
  18. timer.startTime = getTimer();
  19. timer.target = this;
  20. }

Report this snippet  

You need to login to post a comment.