I'm just fooling around making an inventory system and I was wondering if there is a way to work out the next available index in an array without pushing the item into the array.
So for instance
var array:Array = new Array();
array[0] = new Object();
array[1] = new Object();
array[3] = new Object();
Nothing is set in array index 2 so that is the id I want to get or if all indexes are filled eg
array[0] = new Object();
array[1] = new Object();
array[2] = new Object();
I will get array index 3?
Is this possible?