Loop not completing
I have a simple Loop in a function, that I'm using to remove all elements of the array:
for(var i:int = 0; i < tempArray.length; i++)
{
tempArray.pop();
trace("popping: " + tempArray.length);
}
The probelem i'm having is that the loop does not complete. It seems to only remove one element, somtimes it will remove two. Could an event that is triggered in a separate function occur that prevents this from executing to completion?
is there another method i could use to remove all the elements?