Hi,
I'm prety handy with AS2 but AS3 has come and pulled the carpet from under my feet. I need to know how to do the following. In AS2 you would set this script on the button:
I've pretty much got the gotoAndStop part right in AS3 with functions but do I need to make a new function everytime I want to change the variable. i.e.
I'm looking for something like:
Reality is built on a foundation of dreams.
I'm prety handy with AS2 but AS3 has come and pulled the carpet from under my feet. I need to know how to do the following. In AS2 you would set this script on the button:
Code:
on (release){
variable = "variable amount";
gotoAndStop("labeled frame");
}
Code:
ins_btn1.addEventListener(MouseEvent.CLICK, land_on_frame);
function land_on_frame(event:MouseEvent):void
{
gotoAndStop("labeled frame");
variable = "variable amount set in function";
}
Code:
ins_btn1.addEventListener(MouseEvent.CLICK, land_on_frame);
ins_btn2.addEventListener(MouseEvent.CLICK, land_on_frame);
function land_on_frame(event:MouseEvent):void
{
gotoAndStop("labeled frame");
variable = "variable amount set by button";
}
Reality is built on a foundation of dreams.