views:

441

answers:

1

I'm new to flash and action script 2, and I am trying to load an external movie and have it start at frame 3. It's the start at frame 3 that I'm having trouble with.

The following code does not work:

on release {
  loadMovie ("myMovie.swf",this);
  gotoAndStop (3);
}

or:

on release {
  loadMovie ("myMovie.swf",this);
  gotoAndPlay ("3");
}

any help would be appreciated.

thanks

A: 

try

var mycLoader:MovieClipLoader = new MovieClipLoader();

myLoader.addListener(this);
myLoader.loadClip("myExternalMovie.swf", myContainer);
function onLoadInit(mc:MovieClip) { 
     mc.gotoAndPlay(3); 
}

this.gotoAndPlay(3);

Where myContainer is an empty movie clip that you want to swf to load into.

mc6688
thanks, but neither method works. The movie starts at the first frame.
sdfor
Edited my answer... try that and let me know how that works. I think that it was probably going to the first frame because the gotoAndPlay() method was being executed before the movie was loaded.This executes it once it is finally loaded.
mc6688
thanks again, but it still doesn't work. The problem, at least in the first method, is that loading the movie starts it right away from frame 1.The second method doesn't load the movie at all.
sdfor
did you create an empty movie clip for it to load into?then set the instance name to myContainer?
mc6688