Helo all and thank you very much for your attention ,realy I tried to use two external text file (bill.txt and les.txt) .when I click on bill button ,the flash file load bill.txt and when I click on les button the flash file load les.txt .for this case I use two sepaate action script for each of the buttons:
action script for bill button:
on (release) {
willieLoad = new LoadVars();
willieLoad.onLoad = function() {
_root.twoNuts.text = this.bill;
};
willieLoad.load(“bill.txt”);
}
action script for les button:
on (release) {
leslieLoad = new LoadVars();
leslieLoad.onLoad = function() {
_root.twoNuts.text = this.les;
};
leslieLoad.load(“les.txt”);
}
It worked but as you see it’s kind of duplication of code .I decide to catch the instance name of the button name in a global varibale ,then I load the text file according to the name of the global varaible ,Now please tell me how can I get the name of the instance of the button when I click on it and please guide me in th is way.
sincerely yours Mohsena