I haven’t had a lot of luck with
this approach in the past. Even though you are telling it to update at
that moment, it doesn’t mean the flash player will redraw at exactly that
time. The player waits until it has enough resources to perform the
redraw action. If your process is hogging all of the cpu cycles, then it
is not going to redraw. I have successfully achieved this type of functionality
by changing how I processed my data. Instead of looping over a large
dataset, I used a timer to call a function every millisecond. In that
function, I perform whatever action is necessary on one item. Then
process the next data item in the next timer event. This gives the player
a “break” in between function calls, where it has the resources to
update the screen. The code is more complex and performs slightly slower
than just looping over the data, but it also prevents any errors where the
player times out the function b/c the function is taking too long to execute.
This *might*
help you, but I make no guarantees. It depends what your function does,
and how you are processing your data. This option may not even be
feasible for you. -Andy _____________________________________ Andrew Trice Cynergy Systems, Inc. Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Freiman There are two issues: On 10/16/06, Steve
Kellogg @ Project SOC <[EMAIL PROTECTED] Thanks for your reply. The value of the progress bar is BOUND to a var. I also
tried updating it directly. I've also tried replacing the progress bar
with a LABEL that just displays text explaining where we're at, but I get the
same result. Best regards, Steve From: [EMAIL PROTECTED] How does
the progress bar know how much progress has been made? Is it bound to
something, is it listening for an event, it is being updated directly, etc? On
10/15/06, Steve Kellogg @ Project SOC
<[EMAIL PROTECTED] Hello, I've
got a long CPU routine, and I'm using a progress bar to show the user that
we're making…. progress.. The
PROBLEM is that the progress bar doesn't seem to be updating until my long CPU
TASK is complete (presumably because I'm not relinquishing the CPU during the
routine). Is
there anyway to tell Flex/Flash to IMMEDIATELY redraw an element in the UI? Thanks
in advance for any advice. Steve Steve
Kellogg Peak8
Solutions 80302, Fax:
303.415.2597 E-Mail: [EMAIL PROTECTED]
-- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |
- Re: [flexcoders] Invalidating a control during a CPU intens... Daniel Freiman
- RE: [flexcoders] Invalidating a control during a CPU i... Andrew Trice