RE: [Flashcoders] quick array question

2006-02-02 Thread Corban Baxter
] quick array question Use Array.splice() to remove an element. randomPos = random(total); rfcClip = rfcsArray[randomPos]; imgID = imgArray[randomPos]; rfcsArray.splice(randomPos, 1); imgArray.splice(randomPos, 1); total--; Corban Baxter wrote: Ok one quick array question... randomPos

Re: [Flashcoders] quick array question

2006-02-01 Thread Grant Cox
Use Array.splice() to remove an element. randomPos = random(total); rfcClip = rfcsArray[randomPos]; imgID = imgArray[randomPos]; rfcsArray.splice(randomPos, 1); imgArray.splice(randomPos, 1); total--; Corban Baxter wrote: Ok one quick array question... randomPos = random(total); rfcClip

Re: [Flashcoders] quick array question

2006-02-01 Thread thotskee
try checking into the Array .splice method Method; adds and removes elements from an array. This method modifies the array without making a copy. var myPets_array:Array = new Array(cat, dog, bird, fish); trace( myPets_array.splice(1) ); // dog,bird,fish trace( myPets_array ); // cat -