1
votes

I'm working in the Flash IDE with ActionScript 2, and need to check for a click event on a specific object(button) named "btn_play".

This is what I have so far:

btn_play.click = function()
{
    trace("Hi");
}

Thank you!

1
What exactly is your question, can you explain little more , please? - Ivan Chernykh
Basically I need a function that will be triggered when a specific button is pressed. - Tom

1 Answers

1
votes

If i understand you right , you need first to change your code like this:

btn_play.onRelease = function(){
   trace("btn_play has been clicked");
}

And in this way you can easily detect if the element has onRelease handler:

if(btn_play.onRelease){
   trace("btn_play has onRelease handler");
}