actionscript 3 - AS3 - Flash CS6 - Loading three Interactive swf files from a single swf one by one. third one loads but doesn't play -


hi loading 3 swf's loader file. each 1 loaded on different scene. there's switchboard scene moves user relevant scene file loaded as3 code below.

var swf3:movieclip;  var sim3:loader = new loader(); this.addchild(sim3); sim3.load(new urlrequest("sim12.swf")) // add instance display list, adding stage @ 0,0 sim3.x = 0;// move loaded swf 0 pixels right (from left  edge)    sim3.y = 0; 

each swf closes calling function in loader file described distinctively each scene;

removechild(sim3); sim3.unloadandstop(); sim3 = null; swf3=null; 

and move next scene following statement

this.nextscene(); 

now problem is, files open correctly switchboard when user select first time, , same happen second time third time no matter whatever file user opt open, loads child swf file 1st page moves 2nd click button. click button doesn't work keep clicking on , doesn't work.

can 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 scene sim10 loaded } else  if (sel==2) {     gotoandplay(1,"scene 4");//will move scene sim11 loaded } else  if (sel==3) { gotoandplay(1,"scene 5");//will move scene sim12 loaded } } 


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -