Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

I need to pause a SWF within a timeline

New Here ,
Apr 21, 2009 Apr 21, 2009

OK I have a SWF in a timeline that i want to pause for an amount of time.

I can pause the timeline, but the SWF starts on loading.

this is what i want

1. Timeline and SWF pause (ie 2 sec delay)

2. Timeline plays out, (SWF loops within timeline)

3. Timeline loops to start again with pause and SWF pause.( ie step 1)

I currently have the timeline pausing using this, which works great.

stop();

var interval = setInterval(function ():Void { play();clearInterval(interval);

}, 2000);

;

Thanks

TOPICS
ActionScript
824
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 21, 2009 Apr 21, 2009

your swf is the collection of all objects in your published file.  that includes all timelines and every other non-movieclip object.

so, if you mean what you say, eg you want the swf to pause, then it makes no sense to talk about a timeline pausing:  if you want the swf to pause, you must mean you want all timelines in the swf to pause (and possibly you want to pause sounds, videos and any number of loops and possibly other things).

but i doubt you really mean you want the swf to pause.  so, just what do you mean by saying you want the swf to pause?

or what do you mean by the swf?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 21, 2009 Apr 21, 2009

Sorry I am probably not explaining it very well.

OK I have created a small SWF file with a looping animation. It is called "Tag"

I have also created a larger Flash file (the timeline I am referring to) lets call it."Master"

I have placed the SWF file "Tag" into the timeline of " Master"

I want the first frame of "Master" to pause for a few seconds which I can achieve already.


My problem is that even though "Master" is paused, "tag" continues to play.

I want a pause on the first frame of the timeline of "Master" and within that "Tag" to pause

Does that make any sense???

Thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 22, 2009 Apr 22, 2009
LATEST

yes, that makes sense and maybe you do want to pause all timelines in your swf.

you can stop and play all timelines (that exist when playAllF() is called) in your swf, calling playAllF() and passing the main timeline:

playAllF(_level0,true);  // play all

//playAllF(_level0,false);  // stop all

so to pause all for 2 seconds:

playAllF(_level0,false);  // stops all

setTimeout(playAllF,2000,true);

// don't change anything in the code below

function playAllF(mc:MovieClip,bool){

if(bool){

f="play";

} else {

f="stop";

}

mc();

for(o in mc){

if(typeof(mc)=="movieclip"&&mc._parent==mc){

playAllF(mc,bool);

}

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines