flash cs6 AIR 3.8 app issues: cannot load child swfs
hello - have flash app ios loads external child swfs on button click; when use air 3.8 cannot them load. works fine on previewer when publish device, none of child swfs play; it's odd! please help... don't know why it's not working.
here code on main timeline load child swf:
//start button
start_button_tri_herrerasaurus.addeventlistener(mouseevent.click, fl_clicktoloadunloadswf_04_3,false,0,true);
import fl.display.proloader;
import flash.events.event;
var fl_proloader_04:proloader;
//this variable keeps track of whether want load or unload swf
var fl_toload_04:boolean = true;
function fl_clicktoloadunloadswf_04_3(event:mouseevent):void
{
if(fl_toload_04)
{
fl_proloader_04 = new proloader();
fl_proloader_04.load(new urlrequest("dinofilms/triassic_herrerasaurus.swf"));
fl_proloader_04.contentloaderinfo.addeventlistener(event.complete,oncomplete_04 )
addchild(fl_proloader_04);
fl_proloader_04.x = 0;
fl_proloader_04.y = 144;
}
else
{
if (fl_proloader_04!=null) {
removechild(fl_proloader_04);
fl_proloader_04.unloadandstop();
fl_proloader_04 = null;
}
}
fl_toload_04 = !fl_toload_04;
}
function oncomplete_04(e:event):void {
e.currenttarget.content.addeventlistener(event.enter_frame,oef_04);
}
function oef_04(e:event):void {
if (e.currenttarget.currentframe==e.currenttarget.totalframes) {
e.currenttarget.stop();
e.currenttarget.removeeventlistener(event.enter_frame,oef_04);
removechild(fl_proloader_04);
fl_proloader_04.unloadandstop();
fl_proloader_04 = null;
}
}
add loaded swfs included files in publish ios settings
More discussions in ActionScript 3
adobe
Comments
Post a Comment