Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can more than one button have the same name?

Status
Not open for further replies.

ColdFusionKing

Programmer
Joined
Dec 5, 2002
Messages
145
Location
GB
Hi All,

I'm new to Flash and need your help. I have four buttons in my panel.

Can I give more than one button with the same name but different label? If the answer is yes, I want to invoke a handler when the button(s) is clicked and depending on the label I want to display a message. Can you show me how to do this?

Thanks
Allan
 
I have four buttons, all with different names and different labels, but calling the same click handler. Here is my code it does not work.

Click Handler : clickMe()

function clickMe() {
trace(this.getLabel());
}

trace returns "undefined"

Can you please show me how to get the label for a button when it is clicked?
 
function clickme(button){
trace(button.getLabel())
}

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top