Skip to main content
Known Participant
August 22, 2007
Question

Update movieclip whilst in a loop

  • August 22, 2007
  • 1 reply
  • 247 views
Hi guys.. consider you are processing an image. (JPEG encodeing for example)
Is there any way to update somehting on stage whilst in the middle of such a process. Take teh following example. While processing an image I want to have a process loader visually telling the user how much time is left.

I know you could use a timer and breakthe process up into segments.. but this would be much more difficult. I thought there may be a way to easily do such a thing...

for (var ypos:int=0; ypos<image.height; ypos+=8) {
for (var xpos:int=0; xpos<image.width; xpos+=8) {
//Do processing

}
//update load bar with percentage of process completed
}

any ideas?
This topic has been closed for replies.

1 reply

Known Participant
September 4, 2007
No way to do this?
kglad
Community Expert
Community Expert
September 4, 2007
correct, that can't be done: you can't interrupt a for-loop/while-loop to update anything on-stage.