I have a main fla in which i load an external swf locally. First time when I load the swf it works fine.
On clicking the home button (on external swf) I have removed the movieclip containing the external swf.
On loading the external swf again from main screen it gives me a blank screen on iOS device. How can I reload my swf?
This is working fine for Android Devices. I am getting this problem only in iOS devices.
var home:homebtn=new homebtn();
var swfLoader:Loader = new Loader();
var _lcd:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
var swfFile:URLRequest = new URLRequest("external.swf");
var container:MovieClip= new MovieClip();
swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoadedHandler);
function swfLoadedHandler(e:Event):void {
addChild(home);
home.x=_width/2;
home.y=20;
home.addEventListener(MouseEvent.CLICK,gotohome);
}
swfLoader.load(swfFile,_lcd);
container.addChild(swfLoader);
addChild(container);
function gotohome(evt:MouseEvent):void
{
SoundMixer.stopAll();
removeChild(container);
removeChild(home);
home=null;
gotoAndStop(1,"Homescreen");
}