10 Replies Latest reply on Dec 6, 2011 11:33 AM by Flex harUI

    How to make a label refresh when used as a counter in a loop?

    Claude.Bissonnette Level 1


      I would like to have a label or any other controls refresh and display some kind of progress in a loop like this:


      for(var z:int=0; z<Something.length; z++) {
       // Do some processing ...
       // Display the progress ...
       lblProgress.text = "Progress: " + z.toString() + " / " + Something.length.toString();

      The problem I have is that the refresh happend once at the end of the processing loop.  How could I force the system to display every loop?