1 Reply Latest reply on Jul 12, 2007 6:50 AM by kglad

    this small bit of code creates 100% CPU  use

    aaronslavin
      hi, and thanks in advance for any help available. the usual caveats apply: new to actionscript coding, just figuring it out by brute force. etc.

      my application is a fairly simple and straightforward graphics reel demo -- the SWF has three frames, a few text buttons, two linked FLV videos, one short audio loop.

      now i've added a small bit of code -- to use a video loop on frame 1 loader page instead of a still image -- and this reliably sends CPU use to 100% (tested on several browsers, several machines, locally and online). this effectively breaks the playback of the progressive downloading FLVs. even though download stays ahead of playback, the video stutters and jumps (i presume because of high CPU use).

      CPU load for the EXACT same SWF, without the looping video code, is between 35 - 40%.

      my two FLVs are fairly large and heavy (512 x 340, 15fps, 700kbps, 15 - 25MB), but they play beautifully without this code. the video loop i've added is only 5 seconds, so it can't be the overhead of this particular piece.

      i have a few other questions, but i'd like to cross this hurdle first. even though i'm new to FLASH, i can't believe that adding a simple bit of code to add and remove a video loop can scotch the whole deal. maybe i'm just doing it improperly? i'm using "removeChild" to get the video loop off the stage before navigating to other frames/FLVs.

      i'd be very grateful for any advice out there on this problem.

      frame 1 code below. looping video code that kills playback is commented out. all other code still in play.

      thanks again in advance.