5 Replies Latest reply on Jul 30, 2010 2:14 AM by aditi_bk

    Clip jumping back to main timeline even after loadClip()

    aditi_bk

      Hi,

       

      On the last frame of my swf, I placed a loadClip("filename.swf", fileholder); using a MovieClipLoader object. Now it is successfully loading the external swf, I can see it, but it immediately jumps back to the first frame of the parent swf. Why is this happening?

       

      I have placed the fileholder movieclip in the same frame. Also, the moviecliploader code is not inside any container, it is just placed into the actions section as is, starting with moviecliploader declaration.

       

      Could something be wrong there???

       

      Any help will be appreciated.

        • 1. Re: Clip jumping back to main timeline even after loadClip()
          Ned Murphy Adobe Community Professional & MVP

          What do you have in place to keep the main timeline from moving from the last frame?

          • 2. Re: Clip jumping back to main timeline even after loadClip()
            aditi_bk Level 1

            Hi,

             

            I have placed a stop() before calling the movieclip loader code. I am pasting the code below.

             

            stop();
            var ldr:MovieClipLoader = new MovieClipLoader();

             

            var ldrlisten = new Object();

             

                ldr.addListener(ldrlisten);

             

                ldrlisten.onLoadInit = function(_mc:MovieClip) {
                    trace("loading complete");
                    gotoAndStop(85);           // 85 is the frame that this code is in
                };

             


                ldrlisten.onLoadProgress = function(_mc:MovieClip, loaded:Number, total:Number) {
                  
                };

             

                ldr.loadClip("home.swf", _root.homeholder);          //also tried with just homeholder

            All this is in the last frame, but its still jumps back to the first frame of the parent movie.

            • 3. Re: Clip jumping back to main timeline even after loadClip()
              aditi_bk Level 1

              I have placed 8 intervals in the timeline in total. Th code format is as shown below:

               

              stop();
              var intrvl8 = setInterval(clrintrvl8, 1500);

               

              function clrintrvl8(){
                  clearInterval(intrvl8);
                  trace("intvl8 called");
                  play();
              }

               

              Each has a trace confirming the call. but the output I recieved is this:

               

              intvl1 called
              intvl2 called
              intvl3 called
              Event dispatching: back          //where the back button is pressed to return to the main timeline
              intvl5 called
              intvl6 called
              intvl7 called
              loading complete           //this is within the moviecliploader onLoadInit, which is on the last frame
              intvl8 called                    //this should have come before the loading statement

               

              How is the last intvl8 being called after the last frame?? Does the timeline not stop when a setInterval is placed???? Am i missing something???

              • 4. Re: Clip jumping back to main timeline even after loadClip()
                Ned Murphy Adobe Community Professional & MVP

                If you are already in frame 85, do not use the line gotoAndStop(85);

                 

                I cannot follow the rest of whatever you're describing.

                • 5. Re: Clip jumping back to main timeline even after loadClip()
                  aditi_bk Level 1

                  In my file, I have place a drop down folio holder. It drops down and then there is a stop(), which hold the timeline till a "back" event is dispatched. Now everything goes smoothly after the back event is dispatched, the timeline jumps to the required frame, carries on, and even loads the next movie. But despite loading the next movie, it jumps back to the first frame of the parent movie. I have placed a stop at the end as well, but it returns to the parent movie after loading the next movie.

                   

                  I am using a movieclip loader to load the next swf.

                   

                  parent.swf ---loads--> landing.swf  // it loads this, coz I can see a brief glimpse of landing.swf but right after that it jumps back to the first frame of parent.swf.

                   

                  Why is this happening???

                   

                  stop();
                  var ldr:MovieClipLoader = new MovieClipLoader();

                   

                  var ldrlisten = new Object();

                   

                      ldr.addListener(ldrlisten);

                   

                      ldrlisten.onLoadInit = function(_mc:MovieClip) {
                          trace("loading complete");
                      };

                   


                      ldrlisten.onLoadProgress = function(_mc:MovieClip, loaded:Number, total:Number) {
                          // code here
                      };

                   

                      ldr.loadClip("landing.swf", _root.homehold);
                      trace("loading called");
                      this.unloadMovie();

                   

                  It is also successfully unloading the parent moveclip, after I added the last line. But it does not load the next movie now.