somethingkindawierd
11-16-2005, 07:52 PM
Hello,
My question is this: How do I show the progress of a really long for(i=0; i<variable; i++) loop by animating a progress bar component or some custom MovieClip? I do not need detailed progress, just motion to show that the browser has not locked up. I am using Flash MX 2004, the movie published with ActionScript 2.0 and Flash 7 compatibility.
Details of my project and why I have not yet succeeded: I have a flash movie that performs some drawing functions using lineTo() - I have a loop that reads in the values from an XML file, loops through them and draws - sometimes this can take a long time so I would like a progress bar to animate while it happens. My problem is that when I enter this loop no other animations are performed until it is done...I tried forcing a progress bar component to update using invalidate() and redraw(), I tried my own animated tween, I even tried an animated gif as a layer on top of the Flash movie in my browser - all of the animations stop when the "for" loop is entered, and start back up when it completes. I also noticed that the "onEnterFrame" function is not called while the loop is working. So, I think I am missunderstanding something about Flash - how is a loop watched for feedback? Or, how can I reprogram work like this so that I can watch it, because I need the feedback.
Thanks in advance!
jON bEEBE
BIG Images
My question is this: How do I show the progress of a really long for(i=0; i<variable; i++) loop by animating a progress bar component or some custom MovieClip? I do not need detailed progress, just motion to show that the browser has not locked up. I am using Flash MX 2004, the movie published with ActionScript 2.0 and Flash 7 compatibility.
Details of my project and why I have not yet succeeded: I have a flash movie that performs some drawing functions using lineTo() - I have a loop that reads in the values from an XML file, loops through them and draws - sometimes this can take a long time so I would like a progress bar to animate while it happens. My problem is that when I enter this loop no other animations are performed until it is done...I tried forcing a progress bar component to update using invalidate() and redraw(), I tried my own animated tween, I even tried an animated gif as a layer on top of the Flash movie in my browser - all of the animations stop when the "for" loop is entered, and start back up when it completes. I also noticed that the "onEnterFrame" function is not called while the loop is working. So, I think I am missunderstanding something about Flash - how is a loop watched for feedback? Or, how can I reprogram work like this so that I can watch it, because I need the feedback.
Thanks in advance!
jON bEEBE
BIG Images