BenjaminWong
asked on
How to use button to load another swf file
Hi Expert, I am new to CS4 but I am learning. I have created a simple button with intention to use it to load another swf file. I have used the following AS3 scrips but it did not work. Plase help:
function setupEvents() {
//associate events with event handlers
myButton.addEventListener( MouseEvent .CLICK,cli ckButtonHa ndler);
myButton.addEventListener( MouseEvent .CLICK,rel ease);
}
setupEvents();
function clickButtonHandler(e:Mouse Event) {
trace("Clicked Button");
}
function release(e:MouseEvent):void {
trace("I am here");
var loader.load=new loader();
addChild(loader);
load("Question1exp.swf",1) ;
}
function setupEvents() {
//associate events with event handlers
myButton.addEventListener(
myButton.addEventListener(
}
setupEvents();
function clickButtonHandler(e:Mouse
trace("Clicked Button");
}
function release(e:MouseEvent):void
trace("I am here");
var loader.load=new loader();
addChild(loader);
load("Question1exp.swf",1)
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.