Saturday, July 16, 2011

AS3 Code: While Loop

//a "while loop" repeats while the statement is true
//here is a simple example of using a while loop to empty an array

while(myArray.length > 0) {           
   myArray.pop(); //remove the last item in array
}





0 comments:

Post a Comment