Hi I am loading three swf's from a loader file. Each one is loaded on a different Scene. There's a switchboard Scene which moves user to the relevant scene where the file is loaded by AS3 Code below.
var swf3:MovieClip;
var Sim3:Loader = new Loader();
this.addChild(Sim3);
Sim3.load(new URLRequest("sim12.swf"))
// add that instance to the display list, adding it to the Stage at 0,0
Sim3.x = 0;// move the loaded SWF 0 pixels to the right (from the left edge)
Sim3.y = 0;
Each swf closes by calling a function in the loader file described distinctively for each scene;
removeChild(Sim3);
Sim3.unloadAndStop();
Sim3 = null;
swf3=null;
and then move to the next scene by the following statement
this.nextScene();
Now the problem is, that all files open correctly from the switchboard when user select first time, and the same happen the Second Time but the Third Time no matter whatever file user opt to open, it loads up the child swf file 1st page which moves to the 2nd by a click Button. But the click button doesn't work you keep clicking on it and it doesn't work.
Can somebody help???
Switchboard Code:
var ProgressGrid:DataGrid = new DataGrid;
ProgressGrid.move(55.25,306);
ProgressGrid.setRendererStyle("textFormat", tf1);
ProgressGrid.setRendererStyle("headerTextFormat", tf2);
ProgressGrid.width = 690.5;
ProgressGrid.height = 231;
ProgressGrid.rowHeight = 20;
ProgressGrid.headerHeight = 50;
ProgressGrid.allowMultipleSelection = false;
ProgressGrid.selectable = true;
ProgressGrid.columns = ["Serial","Simulation Title","IG Score","DM Score","Time Taken","Status"];
ProgressGrid.columns[0].width = 45;
ProgressGrid.columns[1].width = 250;
ProgressGrid.columns[2].width = 69;
ProgressGrid.columns[3].width = 69;
ProgressGrid.columns[4].width = 75;
ProgressGrid.columns[5].width = 69;
ProgressGrid.addItem({ "Serial":1 , "Simulation Title":"Title1" , "IG Score":IG1 , "DM Score":DM1 , "Time Taken":TS1 , "Status":LS1});
ProgressGrid.addItem({ "Serial":2 , "Simulation Title":"Title2" , "IG Score":IG2 , "DM Score":DM2 , "Time Taken":TS2 , "Status":LS2});
ProgressGrid.addItem({ "Serial":3 , "Simulation Title":"Title3" , "IG Score":IG3 , "DM Score":DM3 , "Time Taken":TS3 , "Status":LS3});
addChild(ProgressGrid);
stop();
ProgressGrid.addEventListener(Event.CHANGE,gridItemClick);
function gridItemClick(event:Event):void
{
sel = Number(event.target.selectedItem.Serial);
if (sel==1)
{
gotoAndPlay(1,"Scene 3");//will move to the scene where Sim10 will be loaded
}
else
if (sel==2)
{
gotoAndPlay(1,"Scene 4");//will move to the scene where Sim11 will be loaded
}
else
if (sel==3)
{
gotoAndPlay(1,"Scene 5");//will move to the scene where Sim12 will be loaded
}
}