View Full Version : Preloaders and FLV

01-03-2006, 12:06 AM
I've been working on a preloader for a swf containing a flv and so far I've had no luck.

I know the preloaders work, I've tried several from this forum and they work fine with jpegs or other stuff but I think the problem is that the swf loads extremely quickly with the FLV being external and theirfore it doesn't show up for me at run time.

I'm very new to flash and I've been trying to learn as much as possible on my own but this has me a little stumped. Does anyone have a link to a tutorial or any tips on preloading an external flv?

Billy T
01-03-2006, 04:25 AM
how are you playing the flv? Through the Netstream object or using a component?

01-03-2006, 07:19 PM
Hi Billy,

Actually I just figured it out.

I'm importing the FLV into my movie and the wizard that comes up sets up a componant to load and play the video.

Here is what I had to do. First, because the FLV is separate from the .swf, I was not able to use the typical preload method of comparing total file size to the amount downloaded. Instead I created a preload animation that is 100 frames long.

Then I imported my movie from frame 1 and changed the autoPlay parameter for the movie to false.

On frame 101 I have my only bit of actionscript:


where the Instance Name of my FLV is introMovie.

So on frame 1 my movie begins to load and doesn't play until frame 101, so depending on my setting for frames per second I can vary the time that I give my FLV to download before playing.

Note that this will allow you to increase the bufferTime parameter for your FLV while still showing your visitor something animated.

Also, because I have a large FLV file I am not actually loading the entire thing, but just giving myself a large enough buffer so that the video can run smoothly from start to finish.