1 Reply Latest reply on Nov 17, 2006 3:16 PM by Newsgroup_User

    variable = name of instance i just clicked

    jabresner
      On main stage I have 4 buttons each with different instance name (but1, but2, but3, but4).

      On main timeline I want to create a variable whose value is equal to the instance name of the button I've just clicked. How do I do this?

      Thanks,
      Jamie
        • 1. Re: variable = name of instance i just clicked
          Level 7
          but1.onRelease = function () {
          _root.buttonClicked = this._name ;
          }

          or, depending where you put the on release:

          on (release) {
          _root.buttonClicked = this._name ;
          }


          "jabresner" <webforumsuser@macromedia.com> wrote in message
          news:ejlff7$co3$1@forums.macromedia.com...
          > On main stage I have 4 buttons each with different instance name (but1,
          > but2,
          > but3, but4).
          >
          > On main timeline I want to create a variable whose value is equal to the
          > instance name of the button I've just clicked. How do I do this?
          >
          > Thanks,
          > Jamie
          >