Question
Long loops
Hi, I'm trying to export a MC to JPG format using PHP. The
procedure calls for a nested loop which reads each pixel and
catenates its color value in an array in order to be sent to PHP.
After the loop runs for a few seconds, I get the "Flash running slow" message .How can I avoid this and make sure Flash doesn't think I've entered a neverending loop?
Furthermore, I have a ProgressBar component which measures the amount of data analyzed. Unfortunately, the ProgressBar doesn't appear until AFTER the loop has finished running.
I'm used to programming in VB6 where a functions called DoEvents placed inside a loop allows the language engine to execute all background procedures and not think I've entered an endless loop. This also allows for screen and progress refreshes. Is there something similar in Flash?
Here is my code:
After the loop runs for a few seconds, I get the "Flash running slow" message .How can I avoid this and make sure Flash doesn't think I've entered a neverending loop?
Furthermore, I have a ProgressBar component which measures the amount of data analyzed. Unfortunately, the ProgressBar doesn't appear until AFTER the loop has finished running.
I'm used to programming in VB6 where a functions called DoEvents placed inside a loop allows the language engine to execute all background procedures and not think I've entered an endless loop. This also allows for screen and progress refreshes. Is there something similar in Flash?
Here is my code: