1 Reply Latest reply on Oct 20, 2010 5:31 AM by aditi_bk

    Pause movie after loading, then play after playing another clip

    aditi_bk

      Hi,

       

      This is the set up so far. Loader1, is playing till home.swf is loaded. I am using the loadClip function for it. onLoadProgress plays the first bit of Loader1.

       

      What I want to do is within onLoadInit() = function(_mc:MovieClip) {

       

       

      _root.ldr1.addEventListener("played", function() {_mc.gotoAndPlay(1);});            // add listener to Loader 1

      _mc.stop();                                                               

      _mc._alpha = 0;

      _root.ldr1.gotoAndPlay("strt");                                        //plays second bit of loader

       

       

      In the last frame within ldr1, I am dispatching the "played" event.

       

      this.dispatchEvent({type:"played", target: this});

       

      The problem is that it is not playing the function. Also _mc.stop(); is not stopping the loaded file. It keeps playing, though _mc._alpha is working fine.

       

      What am I doing wrong?? How can I make sure the event is being dispatched?? Home.swf ( the _mc being loaded), is within a separate movieclip, over the loader.

       

      Is it possible to do this?? Any help will be greatly appreciated.

       

      Thanks

        • 1. Re: Pause movie after loading, then play after playing another clip
          aditi_bk Level 1

          Ok I figured out what I was doing wrong. All the code was perfectly fine, except the event name within dispatchEvent should be in ' ' instead of " "...same for addEventListener.

           

          The main problem was that I had placed EventDispatcher.initialize(this); in the wrong frame. It has to be in the first frame of the clip apparently. That fixed it. Let me know if there are any queries...though I believe this is simple enough..now..:)