I have a movie clip on my main stage. There are 2 buttons. I need the 2 buttons to load an external swf, place it on the main stage and have it centered there.
I can get the script to load them in the current movie clip but I need them to be placed on the main stage.
var loader_mc:Loader = new Loader();
addChild(loader_mc);
buttoninsidemc1.addEventListener(MouseEvent.CLICK, buttonClick)
function buttonClick(e:MouseEvent):void
{
try {
loader_mc.unloadAndStop();
} catch(e:Error) {
}
var urlRequest : URLRequest = new URLRequest("externalswf1.swf");
loader_mc.load(urlRequest);
}
buttoninsidemc2.addEventListener(MouseEvent.CLICK, buttonClick2)
function buttonClick2(e:MouseEvent):void
{
try {
loader_mc.unloadAndStop();
} catch(e:Error) {
}
var urlRequest : URLRequest = new URLRequest("externalswf2.swf");
loader_mc.load(urlRequest);
}