I’m trying to set up a loop that will check an array, use the contents of that part of the array and then delete it.
In other words:
var deleteArray:Array = Array(5);
I want to be able to add a deleted item (the instance of the item) to this array… there’s a possibility of having a total of 5 deleted items in the array (Array(5)).
Now, I need to check the array for any deleted items and use those (the instance name in the deleteArray) before I generate a new one.
How would I loop through the array, check and pull from the array and then delete the one I pulled to update the array?
Basically, the loop need to check each position in the array, and if it’s “undefined” it moves to the next place in the arrray until it finds something and does the pull… else, if there’s nothing in the array we move on to something else.
Thank you very much!