9 Replies Latest reply on Aug 17, 2006 9:35 PM by kglad

    access movieclips/path problem

    luciewong Level 1
      Hi,

      I like to access movieclips.
      The path to these mcs is for ex.:

      _root.myWindow.scrollPane.spContentHolder.myLoader.contentHolder.EBar;

      So if I want to change the y position of EBar I would write:

      setProperty(_root.myWindow.scrollPane.spContentHolder.myLoader.contentHolder.EBar, _y, myY);//<<working

      no Problem with this.
      But, I need to set Properties of about 50 mcs in the same root at the same time in one action.

      So, instead of repeating that long string now 50 times, is there a way I could write the path shorter, for ex. like:

      var myStr:String = "_root.myWindow.scrollPane.spContentHolder.myLoader.contentHolder";

      setProperty(myStr["EBar"], _y, myY; //<<this is not working

      I have tried many other ways, but I just can't make it working.
      How can I shorten this path:>_root.myWindow.scrollPane.spContentHolder.myLoader.contentHolder <
      so that it works?

      Can someone please help?

      best regards
      Luciewong