I'm trying to load a swf in another using AIR3.6. I duplicated the code I found here http://blogs.adobe.com/airodynamics/2012/11/09/packaging-and-loading-multiple-swfs-in-air-apps-on-ios/ but in vain. It does'nt work. So I think I didn't understand part of the procedure.
That what I have done :
• I have a first fla I can correctly publish for iOS.
• In this fla I have this code :
var mLoader:Loader = new Loader();
var mRequest:URLRequest = new URLRequest("test.swf");
var _lc:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
mLoader.load(mRequest);
function onCompleteHandler(loadEvent:Event)
{
addChild(loadEvent.currentTarget.content);
}
• In the publish settings I went to the General tab and I included my second swf : test.swf
• The second swf (test.swf). I published it with AIR 3.6 for iOS. It has no actionscript at all. There is only a green shape in it.
• When I test my first fla, the second one is correctly loaded.
• When I publish it in my iPad, the second swf is NOT loaded.
Can someone tells me where I was wrong ?
Thanks.