Button Instance problem

Hi, everyone. I’m a new member, so yay to me! :love: Of course, I have a problem…

I want the following to happen: when I press my button, it should get the instance name of the button. I have the following code:

within the instance/flash actions window
on(release) {
PressButton();
}

within an external .as file
function PressButton() {
trace(NamesButton._name); /I want to get the instance name of NamesButton./
}


I keep getting “undefined” as my answer. Furthermore, if I put trace(this._name) I get nothing (as in I get black on the output window). However, if I put in a string within the trace (such as ‘Hello’), it works. So, assume everything works but the whole NamesButton._names part. :upset: Please help! What am I doing wrong?

Thank you guys soooo much.