Hi i am a beginner with actionscript and i have a problem with my external MC is suddenly trying to load into another swf when its not supposed to in the middle of another swf playing. i suspect it have something to do with the loader i am using, but i dont know.
I have 3 swf’s linking to each other (main.swf , aircombat1.swf and Myholidays.swf) through a loader. Can anybody tell me how to fix this problem ?
if you go from main to the movie Myholidays, then you will see the problem in the middle of the Myholidays movie.
you can see the movie on this url : http://www.myholidays.dk/flash/finalproject/main.html
my fla code is below here :
placed in frame 1 in the Myholidays movie :
close_btn.addEventListener(MouseEvent.MOUSE_DOWN, gotoMenu);
function gotoMenu(event):void {
var rootObject:Object = this.parent.parent as Object;
rootObject.returnToMain();
}
placed in the Myholidays.swf :
stop();
import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;
import flash.events.ProgressEvent;
function startMyholiday()
{
var mRequest:URLRequest=new URLRequest("Myholidays.swf");
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
mLoader.load(mRequest);
}
function whenCompleteHandler(loadEvent:Event) {
//addChild(loadEvent.currentTarget.content);
}
function ProgressHandler(mProgress:ProgressEvent) {
var percent:Number=mProgress.bytesLoaded/mProgress.bytesTotal;
trace(percent);
}
startMyholiday();