FORUMS: list search recent posts

FLV's and buffering

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
FLV's and buffering
on Feb 22, 2007 at 8:42:28 pm

I am in need of a way to run a preloader animation while a FLV file buffers (which could be up to 30 minutes in length, so having something happening, like a preloader animation, while the video buffers is key). But everytime I post or search, people respond by telling me how to preload the contents of the SWF file, not how to run the preloader animation while the FLV file itself buffers. Heres what Id like to accomplish:

I would like the SWF file to begin playing, and show a preloader animation. During this time, the contents of the SWF file are preloaded, and the FLV file itself begins to buffer. When both are ready (preloader is done preloading, and video is done buffering, at least initially) the video will begin to play.

It sounds simple but for one reason or another the solution to this evades me everytime I attempt a new method of accomplishing this. Here's what I currently have: (instance of FLVPlayback component that contains my video is "intro", instance of preloader animation is "preloader_intro")

Code on Frame 1:

//preload code
this.onEnterFrame = function() {
var amount = Math.round(this.getBytesLoaded()/this.getBytesTotal() * 100);
preloader_intro.loadText.text = amount + "%";
if (amount == 100) {
delete this.onEnterFrame;

This works great for preloading the SWF and all the contained elements, components, code, etc. Except when it's done, it jumps to frame 3 where my video resides and THEN BEGINS BUFFERING THE VIDEO. So there is a gap of time while the video buffers before it plays. This is the gap I am attempting to eliminate.

Ive tried lots of other methods and chunks of code, nothing seems to work flawlessly. Some work in the preview but when placed on a web server (and yes, my video is in the correct place along with the swf). I have a feeling the solution tot his is out there and probably somewhat simple, but I do not know enough about using the FLVPlayback component with code, or about the netconnection methods and how to use them with my video and such to correctly implement this.

Thanks so much in advance for any and all help!!

Return to posts index

Re: FLV's and buffering
on Mar 16, 2007 at 4:33:07 am

hey, just a quick thought, have you checked out ? Last time I was there he had a tutorial on flash video that showed how to have a buffer image come up. Wouldn't be to hard to make that a movieclip with an animation

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved