Check if button was clicked


hello!

 

i have short question ask. there way of testing if button clicked using as3?

 

i have 3 different buttons , want test if right button clicked, user see message "correct". otherwise, if of other 2 buttons clicked, message "incorrect".

 

thank help!

assign event listener mouseevent.click button.  have event handler function listener deal message processing

 

btn.addeventlistener(mouseevent.click, showcorrect);

 

function showcorrect(evt:mouseevent):void {

   // display correct message

}

 

 

do other buttons



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

Embed interactive SWF in PDF - losing interactivity

Falang and too many redirects - Joomla! Forum - community, help and support

Putting a Flash inside a Flash?