1 Reply Latest reply on Mar 9, 2007 7:51 AM by kglad

    using external files in flash

    mohsena Level 1
      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;
      action script for les button:
      on (release) {
      leslieLoad = new LoadVars();
      leslieLoad.onLoad = function() {
      _root.twoNuts.text = this.les;

      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