Skip to main content
November 2, 2009
Question

Flash Presentation Needs To Pause After Certain Movie Clips

  • November 2, 2009
  • 1 reply
  • 1104 views

Hi Adobe Peeps,

Im trying to create an interactive presentation in a similiar style to the one used in the url below...

http://www.messagelabs.co.uk/default.aspx

So far i have several movie clips that play in order on the timeline, and several buttons that when hovered over go to a specific label that will play each movie clip again and continue the presentation.

My action script is as follows,

one_btn.addEventListener(MouseEvent.ROLL_OVER,buttonClickedOne);

function buttonClickedOne(event:MouseEvent)
{
gotoAndPlay("label1");
}

two_btn.addEventListener(MouseEvent.ROLL_OVER,buttonClickedTwo);

function buttonClickedTwo(event:MouseEvent):void
{
gotoAndPlay("label2");

What I cannot figure out is how to make the button play a movie clip in the presentation and then pause until the user selects another button (similiar to how the animation works in the example url).

Any help achieving this functionality would be greatly appreciated!

This topic has been closed for replies.

1 reply

Inspiring
November 2, 2009

In the end of every animation set keyframe with stop() actionscript into it.

November 2, 2009

Hi Kalisto,

Thanks for your answer, however in the first instance I need all the movie clips to keep playing until the user hovers over a button as shown in the example url. Only once the user has selected a button do I want the animations to play and then stop.

I think the reason im having problems is that my button is designed to play a 'label' on the timeline, instead of an actual movie clip. Do you know how i could change my action script to play the movie instead of a label?

Thanks for your help with this,

Ned Murphy
Legend
November 2, 2009

Chances are that example you point to doesn't use the timeline to play things thru, though you can probably still realize what you want.

I am assuming your movieclips are spread along the main timeline.  If that's the case, that you could do is have a boolean variable that you use to control whether the timeline plays thru or not, say you call it stopPlay, initializing it with a value of false (var stopPlay:Boolean = false;).  At the end of each movieclip you have a conditional that checks the value  like so...

if(stopPlay){

     stop();

}

And in your rollover handlers you set the value of stopPlay to true (stopPlay = true;).