I am struggling to convert the following code to conditional if/else. I am doing a game where if the person selects one “button”, they get a BOO and the game does nothing. But if they select the correct button they get a “YA HOO!” and the game moves onto the next scene with the same buttons, but a new button is the option. Any help would be awesome!
import flash.events.MouseEvent;
stop();
//////Button1//////
circle_btn.addEventListener(MouseEvent.CLICK, WooHoo);
function WooHoo(evt:MouseEvent)
{
gotoAndStop(“happy”);
}
//////Button2//////
octagon_btn.addEventListener(MouseEvent.CLICK, PleaseTryAgain);
function PleaseTryAgain(evt:MouseEvent)
{
Object(this).no_mc.play();
}
//////Button3//////;
triangle_btn.addEventListener(MouseEvent.CLICK, PleaseTryAgain2);
function PleaseTryAgain2(evt:MouseEvent)
{
Object(this).no_mc.play();
}
//////Button4//////;
square_btn.addEventListener(MouseEvent.CLICK, PleaseTryAgain3);
function PleaseTryAgain3(evt:MouseEvent)
{
Object(this).no_mc.play();
}