/ Published in: ActionScript
use it at any place in you movieclip to pause it for a number of frames:
this.delay(10);
Expand |
Embed | Plain Text
MovieClip.prototype.delay=function(f) { if(_root.delayCounter==undefined) { _root.delayCounter=0; } else { _root.delayCounter++; } this.createEmptyMovieClip("delayTimer"+delayCounter,this.getNextHighestDepth()); c=this["delayTimer"+delayCounter]; c.mc=this; c.f=f; c._cnt=0; c.onEnterFrame=function() { if(this._cnt==this.f) { this.mc.play(); removeMovieClip(this); } this._cnt++; } this.stop(); }
You need to login to post a comment.
