getting the instance name of a symbol dynamically
hi,
maybe i'm having a brain fart. but is there a way to get the instance name of a symbol w/ a/s?
the scenario: i have a button symbol named "button." i want to have several instances of this button on my stage. each button will have different dynamic text over it. these texts will have instance names "button1Text" "button2Text" etc and the button instances will be named "button1" "button2" etc, respectively. i will have a script on the button that looks something like this:
pseudocode:
Code:
on(rollOver){
bttnInstanceName = this._______;
myText = bttnInstanceName + "Text";
myText.text = rollOverText;
//obviously there is a problem here since myText is a string and
//I'm trying to target a text instance name and set it to a
//predetermined variable "rolloverText"
}
any tips? advice? other approaches that may accomplish the same thing? basically i am trying to make a master button that doesn't have to be altered to be used all over the place. thanks.