This content has been marked as final. Show 5 replies
"pmartinetti" <email@example.com> wrote in message
> My function contains a for (i=total;i--;i>0) loop that processes about
> times. I am able to trace i, but it will not update in the display. I've
> Label, TextArea..binding, custom event. Always works in trace, never
> display element. How do I get Flex to display a rapidly updated value?
This code shows using a timer to achieve what you want. You can play around with the commented lines to see that at least with this methodology, there are limits on how fast it will process.
Thanks for your responses. I rewrote the for-loop in the timer-loop format, having the view call the timer. The timer-loop returned the % complete, and it wasn't much slower than the for-loop.
I believe using callLater() will be faster than using timer, because it always waits only a single frame, which is all that is required to update the UI. timer might wait longer
How would you re-write that with a "callLater() " ??
I have never used callLater() but rather use onFrame event as a loop.