Skip to main content
Participating Frequently
August 3, 2008
Question

Loading FLVPlayback with still image

  • August 3, 2008
  • 2 replies
  • 1218 views
A problem I am having is that with multiple .swfs embedded on a webpage that all play a video, it seems to me that with progressive download the videos start to automatically download even though the players are on pause after a call to...

theVideo.source = tileList.selectedItem.data;
theVideo.pause();

where the name of the video is loaded from an .xml file.

Ideally, what I'd like to do is to have the FLVPlayback component load with a small image, e.g....

theVideo.source = "coape_logo_circle_06.jpg";

...and then load the real flv on the click of a button.

It seems that the theVideo.source has to be fired up in order to display the video player on the screen.

Is there a way to 'preload' the FLVPlayback thing in this kind of way?

Many thanks

ROBERT

This topic has been closed for replies.

2 replies

Inspiring
August 3, 2008
Using the BitMap Class you can dynamically generate a preview of the video. A commenly used workaround to stop the file from downloading (after you have created the preview) is calling a non-existent FLV.

ns.onStatus = function(info) {
if(info.code == "NetStream.Buffer.Full") {
myVideo.attachVideo(null);
ns.pause();
ns.play("non-existent.flv");
}
};
RobertFTAuthor
Participating Frequently
August 3, 2008
Does this apply to progressive d/l as well? or does flash see these as one and the same.

I'm new to this stuff, sorry for being ignorant! I'm assuming that I could take any appropriately sized bitmap (doesn't have to be a snapshot from the preview thing) and load that in some way? I see the preview window says you can snapshot a frame and later load with code, but I'm damned if I can find code anywhere in the documentation!
Inspiring
August 3, 2008
That only applies to progressive download :-) FMS is a different story all together.

Well, sure you can use any image for a preview. Basically, you can wrap the FLVPlayback in a movieclip, add a Loader for the image and using the events from the Netstream or even from the FLVPlayback, hide/show the preview image.
kglad
Community Expert
Community Expert
August 3, 2008
don't assign the source property unless you want the flv to load.