My movie was working perfectly on Ctrl+Enter. When I added a preloader to frame 1, and content to frame 2, things went haywire.
My movie consists of a number of images that are brought in via Loader and some external swfs are imported. I assume that these loaded images and external swfs are separate from the preloader on frame 1, and I need to figure out a way to preload these elements before anything starts.
This is the preload code on frame 1:
stop();
this.addEventListener(Event.ENTER_FRAME, loading);
function loading(evt:Event):void {
var total:Number = this.stage.loaderInfo.bytesTotal;
var loaded:Number = this.stage.loaderInfo.bytesLoaded;
pl.bar_mc.scaleX = loaded/total;
pl.loader_txt.text = Math.floor((loaded/total) * 100) + "%";
if (total == loaded) {
gotoAndStop(2);
this.removeEventListener(Event.ENTER_FRAME, loading);
}
}
Any help is very much appreciated.