2 Replies Latest reply on Mar 9, 2007 8:54 AM by Newsgroup_User

    referring to instance names with variables

    Level 7
      I have the following problem. I have two movie clips with the instance
      names inst01 and inst02.

      I have the code :
      _root.inst01._alpha += 10;

      Now sometimes I would like it to be for "inst01" and others "inst02".

      Is there a way that I can just say set a variable like :

      currentinst = "inst01"
      or
      currentinst = "inst02"

      And then write the code as:
      _root.currentinst._alpha += 10;


      Would this work, how would Flash know whether "currentinst" was an
      instance name or a variable name?

      THANK!
      Tim