flash AIR app cannot load child swfs on publish to device
I have been struggling with this problem for WEEKS now and can't solve it. I have an flash AIR app (creative cloud, AIR 3.8) which is very simple: all it does is load external SWF movies on the click of a start button. It works FINE in test/PC but when I publish to device, the external swfs do not load.
Here is the code on the main timeline that calls the external swfs:
//start button
start_button_TRI_desmatosuchus.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_02_3,false,0,true);
import fl.display.ProLoader;
import flash.events.Event;
var fl_ProLoader_02:ProLoader;
var fl_ToLoad_02:Boolean = true;
function fl_ClickToLoadUnloadSWF_02_3(event:MouseEvent):void
{
if(fl_ToLoad_02)
{
fl_ProLoader_02 = new ProLoader();
fl_ProLoader_02.load(new URLRequest("dinofilms/triassic_desmatosuchus.swf"));
fl_ProLoader_02.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete_02)
addChild(fl_ProLoader_02);
fl_ProLoader_02.x = 0;
fl_ProLoader_02.y = 144;
}
else
{
if (fl_ProLoader_02!=null) {
removeChild(fl_ProLoader_02);
fl_ProLoader_02.unloadAndStop();
fl_ProLoader_02 = null;
}
}
fl_ToLoad_02 = !fl_ToLoad_02;
}
function onComplete_02(e:Event):void {
e.currentTarget.content.addEventListener(Event.ENTER_FRAME,OEF_02);
}
function OEF_02(e:Event):void {
if (e.currentTarget.currentFrame==e.currentTarget.totalFrames) {
e.currentTarget.stop();
e.currentTarget.removeEventListener(Event.ENTER_FRAME,OEF_02);
removeChild(fl_ProLoader_02);
fl_ProLoader_02.unloadAndStop();
fl_ProLoader_02 = null;
}
}
I am calling about 30 different movies on 30 different frames, so that's why I am using tags like "proLoader_01" so I don't duplicate them. All the external swfs are of course listed in the included files too.
I would really appreciate the assistance, I am a reluctant coder!
Message was edited by: Fiona Passantino
