Hi i am creating a portfolio website and i am loading various SWF files into a empty movieclip on the main stage called “holder”. one of the loaded movie clips is called “multmad.swf” and it has a button on it that i was to control from the main timeline. Once the button is clicked i want the “multmad.swf” to dissapear and have a new clip called “queenie.swf” to load in the “holder” movie clip on the main stage instead. I just dont know how to control the button in the multmad.swf from the mainstage to achieve this. Below i have the button event i want to add to control the button at the moment. I have placed this on the empty movie clip holders main timeline.
multmad.queenie.addEventListener(MouseEvent.ROLL_OVER, site1Over);
multmad.queenie.addEventListener(MouseEvent.ROLL_OUT, site1Out);
multmad.queenie.addEventListener(MouseEvent.CLICK, site1Click);
function site1Over(evt:Event):void{
multmad.queenie.gotoAndPlay(2);
}
function site1Out(evt:Event):void{
multmad.queenie.gotoAndStop(1);
}
function site1Click(evt:Event):void{
var pageLoader:Loader = new Loader();
var pageURLReq:URLRequest = new URLRequest ( "pages/queenie.swf");
pageLoader.load(pageURLReq);
pageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
function imageLoaded(evt:Event):void
{
root.holder.addChildAt(pageLoader.content, 1 );
root.holder.removeChildAt(2);
}
when i place the above code in i get this error:
ReferenceError: Error #1065: Variable multmad is not defined.
at portfolio5_fla::holder_2/frame1()
and the roll overs are not working either. i think its the fact that i dont know how to reference the correct location for the multmad.swf