AS2 Preview works, exported swf does not?!

If it is relevant, I am using Flash CS3 Professional.

I have been beating my head against the wall with this… basically, what happened is I developed an swf player that creates a playlist from a loaded XML file, loads the associated .swf files from a directory, and provides controls for play, pause, stop, next, previous, mute, etc.

The entire thing works beautifully within the preview function (ctrl+enter), but does NOT work beautifully when the exported .swf file is opened from the file system…

The main problem here appears to be that the play, pause, and stop buttons use container.play(), container.stop(), and container.gotoAndStop(“1”) respectively (where “container” is the instance that the .swf files are loaded into), however, although the proper functions are called and executed (I can tell because other code within those functions DOES indeed work), it seems that the play(), stop(), and gotoAndStop() commands are not working… I’m guessing that they just aren’t referencing the “container” properly… ???

So in this stripped-down example of the problem, I’ve got two movie clips on the stage with instances of “playB” and “pauseB”, and then the code generates an emptyMovieClip with an instance of “container”, loads an .swf into it, and then the play/pause buttons should control it.

I hope this makes sense to someone out there that can help me. Again, like I said, this works fine using the preview… Here’s the stripped-down code:


var empty = this.createEmptyMovieClip("container", "100");
empty._x = 1;
empty._y = 1;

my_mc = new MovieClipLoader();

my_mc.loadClip("whatever.swf", "container");

pauseB.onPress = function() {
	container.stop();
}

playB.onPress = function() {
	container.play();
};