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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Instance (Button) name

Status
Not open for further replies.

ToshTrent

Technical User
Jul 27, 2003
209
Hi,

I've been trying to get the instance name of the button the user clicks on to help make my code easier to manage etc, how do i get the name of the button they have just clicked on?

I found this code in the flash help, but I can't seem to make it work for a single button, the code here gets the name of every button on the time line.

on (release){
for (i in this) {
if (this instanceof Button) {
trace(this._name);}
}
}

Your help would be much appriciated!



[red]
Thankyou[/red]
Matt
 
Legend! Your a Total Legend!

Thanks for your help mate!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top