button must be clicked twice why?
im working on a new project, and its finished - but there is one issue....
to travel to the next page, you must click the button 2 times ( even if the clicks are 30 seconds apart )....what would cause this?
the method we were asked to do was to base the page transition on the timeline rather than embeded in its own MC like previously.
that is easy, and here is my set up ( frame and actions 😞
Frame 124 // var page;
page = 1;
Frame 125 // stop();
there is an MC on this line called "engage", it plays through a little bit and then in the middle of its timeline it says MovieClip(root).gotoAndPlay("unload");
stop();
unload is the frame label on frame 126, and the code on frame 126 is ( recycled, but i was allowed to do this )
if(bgloader){
bgloader.unload();
}
on frame 131 there is this code:
var Xpos:Number=0;
var Ypos:Number=0;
var swf:MovieClip;
var bgloader:Loader = new Loader();
var bgURL
if(page==1){
bgURL=new URLRequest("pages/home.swf");
}
else if(page==2){
bgURL=new URLRequest("pages/about.swf");
}
else if(page==3){
bgURL=new URLRequest("pages/projects.swf");
}
else if(page==4){
bgURL=new URLRequest("pages/experimental.swf");
}
else if(page==5){
bgURL=new URLRequest("pages/contact.swf");
}
bgloader.load(bgURL);
bgloader.x=Xpos;
bgloader.y=Ypos;
bg.addChild(bgloader);
stop();
bgloader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderCompleteHandler);
function loaderCompleteHandler(event:Event) {
(event.currentTarget.content as MovieClip).addEventListener("eventTriggered", eventHandler);
}
function eventHandler(event:Event):void {
gotoAndPlay("start");
}