1 Reply Latest reply on Apr 28, 2007 6:09 PM by sly one

    Using Variable Targets

    nek22
      1. On the stange I have a movie clip called mc1.
      2. Inside mc1, is another movie clip names mc2.
      3. I want to use a variable to target mc2.

      To test things, I made these 2 variables:
      var vpath = "mc1";
      var vpath2 = "mc1.mc2";

      This works fine without using variables:
      this.mc1.mc2._visible = false;

      This works fine.. but isn't the movie clip I want to target:
      this[vpath]._visible = false;

      This does not work! Why????
      this[vpath2]._visible = false;

      How can I target mc2 using a variable?