Skip to main content
Participant
April 21, 2009
Answered

Pausing scenes

  • April 21, 2009
  • 1 reply
  • 527 views

Hello,

I am new to Flash and went through a tutorial which showed how to put an image on the stage, create a tween, and then stop the scene with the Stop(); command in the action window.  Would I would like to do it pause scenes.  So in scene1 I would add an image, enlarge it using a motion tween and keping the object in place, then create additional scenes in the same manner, allowing the movie to loop continually.  How can place a pause between  scenes?

Thank you for your help and God Bless,

Mark A. Sam

This topic has been closed for replies.
Correct answer kglad

to pause on the current frame for ms milliseconds:

stop();

var t:Timer=new Timer(ms,1);

t.addEventListener(TimerEvent.TIMER,f);

t.start();

function f(e:Event){

play();

}

1 reply

kglad
Community Expert
Community Expert
April 21, 2009

you can use the setTimeout() function or the timer class to create a pause.

MarkASamAuthor
Participant
April 21, 2009

Thank you.  Can you give me instruction on how to do that or point to a reference for me?  I'm really new to this.

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
April 21, 2009

to pause on the current frame for ms milliseconds:

stop();

var t:Timer=new Timer(ms,1);

t.addEventListener(TimerEvent.TIMER,f);

t.start();

function f(e:Event){

play();

}