4 Replies Latest reply on Feb 24, 2008 8:20 PM by rlc5611

    Making an objects array...

    Ghost Of Death
      Hi, first of all sorry i'm asking many questions, I want to make an objects array. I made somthing like this:

      ---------------------------------------
      var all:Array = new Array()
      var xx:Object = new Object()

      xx.age = 5

      all.push(xx)

      xx.age = 6

      all.push(xx)

      trace(all[0].age)
      trace(all[1].age)
      ---------------------------------------

      but the output was 6 & 6 so the first value also changed :\ ,, is there another way to do this using the same idea ?? i need this because i need to change the propertise of an object and push it into the array,, and then change the propertise of the same object and push it again,,, plzzzzzz i need this,, how to do it ???? thaaaanx