How do I load an external swf at a frame after ClickToGoToAndStopAtFrame?
Hi, I'm quite new in working with AS3.
I am designing a site with a menupage with buttons.
Some of these buttons are linked to a frame that contains an external swf, which is a portfolio.
By pressing the buttons 'AQUAREL" and "OLIEVERF" you will go to another frame and the swf-portfolio shows up.
Now the problem is: sometimes it seems to work, sometimes it doesn't.
You can check out yourself at www.erwinvanzijl.nl
Is there a better whay of programming these functions?
Am I doing something wrong or is there a better way to do it?
This is the actionscript that I put on the second frame where the swf is to show up:
stop();
var Xpos_2:Number = 52;
var Ypos_2:Number = 59;
var swf_2:MovieClip;
var loader_2:Loader = new Loader();
var SWF_2:URLRequest = new URLRequest("aquaportfolio.swf");
loader.load(SWF_2);
loader.x = Xpos;
loader.y = Ypos;
addChild(loader);
btn_menu.addEventListener(MouseEvent.CLICK, unloadcontent_2);
function unloadcontent_2(event:MouseEvent):void {
removeChild(loader);
gotoAndStop("menu");
}