Groups | Blog | Home
all groups > flash actionscript > august 2007 >

flash actionscript : Force movie to loop while dense code executes


adam NO[at]SPAM blueapplestudio
8/23/2007 9:16:24 PM
Below is a simplified version of my problem.

Imagine a span of 42 frame. On frame 1, I have a button that plays the
timeline and a stop command. If the user clicks Play, the timeline advances.
On frame 2 there is an embedded Quicktime movie that spans 40 frames, and some
code that does some calculations. On frame 42, there is a stop command.

When I initially built this, the code that executed on frame 2 was pretty lean
and the play-head rolled through frames 2-42 without pause. However, the code
on frame 2 has since been bulked up, and now causes the play-head to hang for
about 9 seconds before playing through the timeline.

The code is obviously eating up system resources, but is there any way to
let/force the embedded movie to play while the calculations are taking place?
I am ok with the total duration being 9 seconds, but I?d like the Quicktime to
continue playing while the evaluations occur.

Thanks for any help

kglad
8/23/2007 9:35:38 PM
your code will execute from beginning to end before anything is updated
on-stage. your only option is to accept the current situation or to break your
code into blocks of code that execute sequentially allowing the stage to update
between code blocks.
adam NO[at]SPAM blueapplestudio
8/23/2007 9:41:44 PM
kglad
8/23/2007 9:46:24 PM
AddThis Social Bookmark Button