I am using as3. My sprites are not working correctly on hittestpoint in a while loop. I think this is because it is going too fast before it can update the display. So I would like to add a delay to the while loop. What is the easiest way to do this?
Like:
while (condition){
MAIN CODE HERE
CODE FOR DELAY OF 20ms
}
How can I do a delay in as3?
You could use a Timer instead of the loop.