7 Replies Latest reply on Jun 23, 2006 5:13 PM by guowy

    Progress bar with a for loop

    guowy
      Hi,

      I've got a for loop that goes through every single character in a string and modifying these characters. The problem I'm having is I want to try and display a progress bar that gets updated after every character (or a few characters). However to my understanding a for loop has to be completed before the stage gets updated, therefore theoretically all you should see on the bar is no progress and all of sudden full progress.

      I imagine onEnterFrame will allow me to produce the same result as a for loop WITH the progress bar being updated however it works by framerate therefore the time it takes will depend on fps.

      I was wondering whether anyone knows of a way to:
      1. Pause a for loop to update the bar and return to the loop after updating
      2. or have the bar updated while the for loop is running.

      Any help would be appreciated!

      Thanks,
      Andy