Pause / delay

what is the easiest way to delay or pause a movie for a few sec? anyone… thanks

onClipEvent(enterFrame) {
if(this._currentframe == “2”) {
stop();
}
else if (this._currentframe == “10”) {
play();
}

That is dirty code but you get the idea.

:bu: :bu: :bu: WELCOME TO KIRUPAFORUM.COM!!!:bu: :bu: :bu:

back to the topic:
um… know the basics already?

*Originally posted by DigitalPimp *
**onClipEvent(enterFrame) {
if(this._currentframe == “2”) {
stop();
}
else if (this._currentframe == “10”) {
play();
}

That is dirty code but you get the idea. **

this is dirty!

better use something like
offset = seconds to wait untill continue playing


stop();
offset = 2;
timerInt = getTimer();
initialTimer = timerInt+offset*1000;
onEnterFrame = function () {
	currentTimer = getTimer()-initialTimer;
	if (currentTimer>=timerInt) {
		play();
	}
};

//methods
MovieClip.prototype.pause = function(ms) {
	this.stop();
	this.$pauseid = setInterval(this, "unpause", ms);
};
MovieClip.prototype.unpause = function() {
	this.play();
	clearInterval(this.$pauseid);
	delete this.$pauseid;
};	
// usage
my_mc.pause(1000);

:wink:

:geek:

this is kax
kax is a maniac
kax - don’t scare people!

// god, he’s so good in AS!

I knew you guys would do crap with Interval and stuff but I said dirty… :p:

i have 1… a dirty 1 lol!
Steps:

  1. create an empty movieclip with 20 keyframes, name it (delay).
  2. in the first frame put
 stop(); 

in the 20th frame of the clip put

 stop();
_parent.play();
  1. in the first frame of the main timeline …
 stop();
delay.gotoAndPlay(2);

  1. That’s it…

DIRTY CHEERS! :thumb: :beam: