
02.12.2002, 12:38
|
|
Регистрация: Mar 2002
Сообщений: 840
|
In your main "action" timeline, frame 1 put the following code:
////////////////// Pause Function /////////////////////
this.createEmptyMovieClip("timer",50);
timer.onEnterFrame = function()
{
if (this.startTime>0)
{
var diff = getTimer()-this.startTime;
if (diff>this.timerLength)
{
this.target.play();
this.startTime = 0;
}
}
};
function pauseFor(theTime)
{
stop();
timer.timerLength = theTime;
timer.startTime = getTimer();
timer.target = this;
}
///////////////////////////////////////////////////
Then on the frame you want to pause, add: pauseFor(3000) //this would pause for 3 seconds.
|