I used to do the same thing before Flash Player 9. Back then the Flash Player was slow and if you had a loop that was > 500 iterations you would have to break out of the loop in order for the Flash Player to release memory. You could then continue your loop. Also - I know in some contexts the Flash Player is multi-threaded (the features list in this article mention it - http://www.kaourantin.net/2007/06/flash-player-update-3-beta-1.html).
Re: prevent stack overflow
I used to do the same thing before Flash Player 9. Back then the Flash Player was slow and if you had a loop that was > 500 iterations you would have to break out of the loop in order for the Flash Player to release memory. You could then continue your loop. Also - I know in some contexts the Flash Player is multi-threaded (the features list in this article mention it - http://www.kaourantin.net/2007/06/flash-player-update-3-beta-1.html).