3 Replies Latest reply on Jul 26, 2006 9:07 AM by Newsgroup_User

    Array of Instances

    Robotacid
      I want to batch create a number of AS2.0 instances of a class. I can do this in any other language by just creating an array or list and populating it with instances of that object.

      But it seems I can't do this in Flash. And the only way people ever refer to dealing with a number of instances is movieclips and buttons which seem to have a different instancing behaviour than classes.

      Let's say I want to create 100 myClasses and reference them. How do I do this? I can't

      var ["name" + number]:myClass = new myClass;

      or

      var name[number]:myClass = new myClass();

      or even

      var name + String(i):myClass = new myClass();

      Given the class below, how do I do it?