1 Reply Latest reply on Nov 19, 2006 9:22 AM by kglad

    Array problem

      I have made a homemade class called triangle wich exstends the MovieClip class. It makes special triangles. :)

      class Triangle extends MovieClip {

      Now I want to put 20 triangles in an array, but it does not work:

      for (i=0; i<20; i++) {
      triangelArray.push(new Triangle()); // I try to put 20 triangles in an array
      triangelArray .calculatePosition(); // I calculate the positons of the triangles. ( Based om random numbers.)

      Later when I want to use it I find that all the triangles in the array have the same possitions.

      I'm I doing something badly wrong?