3 Replies Latest reply on Apr 22, 2009 12:13 AM by kglad

    I need to pause a SWF within a timeline

      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

        • 1. Re: I need to pause a SWF within a timeline
          kglad Adobe Community Professional & MVP

          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?

          • 2. Re: I need to pause a SWF within a timeline
            Level 1

            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

            • 3. Re: I need to pause a SWF within a timeline
              kglad Adobe Community Professional & MVP

              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[f]();

              for(o in mc){

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

              playAllF(mc[o],bool);

              }

              }