] 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
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
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
-
3 matches
Mail list logo