Skip to main content
Known Participant
July 26, 2010
Question

Clip jumping back to main timeline even after loadClip()

  • July 26, 2010
  • 1 reply
  • 568 views

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.

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
July 26, 2010

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

aditi_bkAuthor
Known Participant
July 26, 2010

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.

aditi_bkAuthor
Known Participant
July 26, 2010

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???