in flash im calling an external swf file, and image gallery, im using a loader to do it, it works how it should except for one thing, it opens the swf on top of my main flash file, instead of a separate window. i also need to do a back button to take me back to my main flash page and I'm not too sure how to o this.
i need some help i am really struggling with this loader stuff. this is the code for the loader. like i said it works and when i click the button it take mes to the swf file.
var loadedSWF:Loader = null;
function loadSWF(file:String, container:MovieClip=null):void
{
if(container == null) container = MovieClip(root);
// removes the previously loaded SWF
if(loadedSWF != null)
{
if(loadedSWF.parent) loadedSWF.parent.removeChild(loadedSWF);
}
var req:URLRequest = new URLRequest("imagegallery.swf");
loadedSWF = new Loader();
loadedSWF.load(req);
addChild(loadedSWF);
}
imageGallery_btn.addEventListener(MouseEvent.CLICK, _click);
function _click(e:MouseEvent):void
{
loadSWF("myfile1.swf");
}
}