This content has been marked as final. Show 3 replies
A number of problems with this.
First, myText.variable is of type string, not Number. This could be easily solved. However,
Second, your loop is constantly processing, so Flash has no time to update the screen. Need to use updateAfterEvent(). This however only works in certain settings, and not in a fast loop, so you need to allow for some time in between.
If you want to have a count-up, use something like the attached code.
Thanks. Your code worked fine with my application. Correct me if I'm wrong, this is a thread, right? How could I refresh the display along with the main thread?
That depends on your definition of thread. Macromedia doesn't call it that way, and I guess it's not for purists, who see threads as something having a separate memory space, environment etc.
As for refreshing the display in the "main thread", you're in very thin air there. Read the description of updateAfterEvent in the help file and you'll see that Macromedia was very selective with its use. I guess the reason is that keeping the normal frame refresh working regularly was more important for an animation-based software than a sophisticated event machinery.