7 Replies Latest reply on Mar 16, 2007 3:20 PM by SymTsb

    Playback

    ritjunior
      How can I achieve fast, smooth playback on all browsers? My site consists of approx. 20-25 .SWF's linked to an INDEX.HTML. The .fla's are 24fps, 799x472 with no .swf exceeding 280KB in size. I'd like to save the HTML at high quality if possiblel. The site was authored in FlashMX v.6.
        • 1. Re: Playback
          SymTsb Level 2
          all embedded into the same index.html or a single swf embedded into index.html loading the others as needed?
          • 2. Re: Playback
            SM6601 Level 1
            Yes, can anyone answer why/how to compensate for browsers slowing the playback of Flash movies? Can you assume it's going to slow down a 30 fps movie at a certain rate then compensate in your development?
            • 3. Re: Playback
              SymTsb Level 2
              Not really no. It's usually our responsibilities as the developers to deal with this during testing. The browsers themselves aren't actually slowing down your movies in most cases. It's actually an issue of RAM. Playback from the local system is usually considerably faster for this reason. The flash player doesn't have the extra crap to deal with from the html etc.

              Flash also can't do much for you in terms of the hardware/connection either. This all plays into it.

              My suggestion is to play back your videos on multiple computers and multiple connections. During testing, I have 4-5 different setups I test on just inside the building... But I also have a tendency to test on different family and friends computers as well to make sure that I'm getting as big of a result pool as possible. Slow playback almost always turns out to be an issue of too much drawing/animation/symbols on a computer with less than desirable hardware.
              • 4. Re: Playback
                SM6601 Level 1
                But is there a way to preload a segment of the movie into Ram before playback, like a number/series of frames and all of the content on those frames? I use to working in Macromedia Director and you could preload like 1 to frame 300 before the movie starts playing. That is how you resolved the plack issues.
                • 5. Re: Playback
                  liquidleaf
                  yes, the same way that preloaders work, you use _framesloaded and _totalframes in a movieclip. That way, you can wait until an entire section, or movieclip, or external SWF loaded into a movieclip, has loaded entirely before beginning playback. There are tons of examples of preloaders, take a look and try one out.

                  However, the processor speed of the end user's computer will affect playback speed. If the FPS is too high, and there is too much motion going on or too many tweens happening at the same time (ESPECIALLY color/transparency tweens), the computer WILL slow down playback of the movie, even if it is all loaded (via _framesloaded and _totalframes). The computer still has to process all of those changes that are happening, it's not like a video where all the frames are flattened into individual images.

                  What you need to do is find the lowest common denominator for your project - the slowest, oldest computer that your client will accept as needing to have the project run smoothly on, and optimize around that. This may mean that you can't go far above 12fps in some cases. It just all depends on HOW OLD/SLOW you need to get your project working on.
                  • 6. Re: Playback
                    SM6601 Level 1
                    Thanks, helps much!
                    • 7. Re: Playback
                      SymTsb Level 2
                      Yeah. The important thing to remember is that everything in Flash is vector based math. This means that every time a line, shape, image, whatever is moved, calculations need to be made by the Flash Player and those calculations require the processor.

                      Lets say it takes 10k of memory to move and fade out a 10px x 10px box from one side of the stage to the other. Now lets say you duplicate it 100 times and repeat that animation but rather than do them one at a time, you're doing that all at once or with a few milliseconds of offset. That's 1M of ram. Theoretical of course since it would actually take a lot more than that...

                      Now add menus, text with effects (so each letter is broken apart into a shape)... The amount of RAM required gets to be ridiculously large quite quickly. During testing, use the bandwidth profiler as well as a swf size report to see where your movie has the most stuff going on. The report can give you a byte-for-byte report of every frame of the movie. Use this to get suggestions on where you can simplify your animations. Any spikes in the byte report are trouble spots since they are the most likely to bog down the user's processor.