1 Reply Latest reply on Jan 26, 2008 2:53 PM by niki tsanov

    reading properties

    phil1943 Level 1
      I have an array holding string values which represent movieclip objects.
      How do I access the _x and _ y properties of those objects via the array representations of them ?
      I want to be able to do this:


      so I tried this, however it does not work. Any tips ?

      myArray = ["mineA", "mineB", "mineC"];
      trace("_level0." + myArray[0]._x)

      Thank you kindly for any help.

        • 1. reading properties
          niki tsanov Level 1
          So the better solution is when you put your movieclip into array to do that without "".
          var myArray:Array=new Array(Movie1,Movie2,Movie3);
          because when is inserted into the array , array get the full path name to the MovieClip for example if your Movie1 is into _level0 the result of myArray[0]._x = _level0.Movie1._x
          The other way is
          var myArray:Array=new Array(Movie1._name,Movie2._name);
          this get only the name of the movieclip. and you can access with _level0[myArray[0]] but the upper way is better because you dont need to put this _level0 everytime and you can confuse the path to your movieclip.
          I just take my self to explain and i forgot to add the ._x to example :)