# Flash Game - turning button selection into conditionals

**URL:** <https://forum.kirupa.com/t/flash-game-turning-button-selection-into-conditionals/330328>\
**Category:** flash\
**Created:** [January 3, 2013, 3:20am UTC](https://forum.kirupa.com/t/flash-game-turning-button-selection-into-conditionals/330328 "2013-01-03T03:20:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fwof1976](https://avatars.discourse-cdn.com/v4/letter/f/e8c25b/32.png) [@fwof1976](https://forum.kirupa.com/u/fwof1976)\
**Post date:** [January 3, 2013, 3:20am UTC](https://forum.kirupa.com/t/flash-game-turning-button-selection-into-conditionals/330328/1 "2013-01-03T03:20:27Z")

</div>

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();  
}
