2 Replies Latest reply on May 31, 2008 5:00 AM by levancho

    Accessing object by dynamically creating it's id?

    smokinjoefission
      Hi All,

      hopefully this is a quick one, I just can't figure it out: I'd like to be able to access objects by their id, but I want to be able to do it dynamically.

      For example:

      I have two objects, already instantiated, object_01 and object_02 and would like to do something like:

      while (var i:uint = 1; i<=2, i++) {
      myMovieClip.addChild("object_0" + i.toString());
      }

      Can this be done and if so, how?

      Thanks!