Flash Guru: How to Delay Loading a Flash Video Washington DC

In this installment of our monthly series, we again turn to our favorite Flash guru, Stefan Richter, to answer a question from our forum. This time: How to delay loading a video, in order to save bandwidth and create a better user experience.

Local Companies

AT&T Inc.
(202) 638-7876
785 7th St., NW
Washington, DC
Comcast
(202) 832-2001
900 Michigan Ave., NE
Washington, DC
ACT 1
703-418-0011
200 12th St S
Arlington, VA
Esp Group LLC
703-418-6311
1225 Jefferson Davis Hwy
Arlington, VA
American Broadband Productions
(202) 331-5556
1667 K St Nw Ste 400
Washington, DC
Verizon Washington, DC
(202) 392-3700
2055 L St., NW
Washington, DC
Cyveillance Inc
703-351-9766
1555 Wilson Blvd
Arlington, VA
Localnet Corp
703-528-1824
1700 N Moore St
Arlington, VA
Hard Corps Inc
703-521-5000
2120 Washington Blvd
Arlington, VA
Magnet Interactive Communications
(202) 625-1111
3225 Grace St NW
Washington, DC

provided by: 
Originally published at Internet.com


In this installment of our monthly series, we again turn to our favorite Flash guru, Stefan Richter, to answer a question from our forum. This time: How to delay loading a video, in order to save bandwidth and create a better user experience.

Stefan Richter

If you're not familiar with him, Stefan Richter is a certified Flash developer and he's been involved with Flash since it first began. Regular readers to this site will recognize the excerpt "Everything You Don't Know About Flash" from his book Hands-On Guide to Flash Video, (co-written with Jan Ozer).

Reader "fzr600man" asked: Is there any way to slow down the load rate of videos? When my page first loads up, it buffers all Flash videos that are on this page. Each video is about 10 Megs. So for 3 videos when a person calls up this page it will buffer all the videos, even if they don't watch them. I see this as a huge waste of bandwidth. Is there any way to just get the first few seconds of the video for the thumbnail preview, and then only load the rest if they click on the play button? I am using the video components that come with Flash Professional CS3.

Stefan's Reply:
This is a pretty common question and there are a few ways to go about it. The easiest way-although the most labor-intensive-is to put the FLVPlayback Component on frame 2 and put a stop action on frame 1. Put a playback on frame 1, as well. Then, the first frame of the video will load and stop. Only when the viewer clicks to play the rest will the remainder of the video load.

Since the first frame of your work probably won't be the most enticing image, create a screen capture from elsewhere in the video and make that your opening frame. If you have a lot of videos, this could get time-consuming, but it's a simple way to solve the problem.

If you're not using the FLVPlayback Component and if you know ActionScript, there's another way to solve the problem. This method involves getting the video to start playing, then have it attempt to load a second video-one that doesn't exist. When it can't find the second video, it will freeze on the current video, effectively showing a preview. The viewer can then click to have the current video continue. Stefan has created a tutorial on how to achieve this on his site (click here for tutorial).

This second method might seem harder, but it has the advantage of not needing a screen grab. Plus, once you have the script you can simply re-use it.

Other Flash Guru articles: * Advice from the Flash Guru * The Flash Guru Answers Your Questions * Solving Browser Incompatibility * Converting Video to FLV * Serving FLV Files Over Slow Connections

Author: Troy Dreier

Read article at Internet.com site

Featured Local Company

AT&T Inc.

2026387876
785 7th St., NW
Washington, DC

Related Local Events
ESRI International User Conference
Dates: 7/13/2009 - 7/17/2009
Location: Washington Convention Center
Washington, DC
View Details

Annual Technology for Government Reception
Dates: 6/10/2009 - 6/10/2009
Location: Renaissance Mayflower Hotel
Washington, DC
View Details

Real Secrets to Drive Website Traffic With SEO and Online News Releases
Dates: 6/3/2009 - 6/3/2009
Location: Mandarin Oriental, Washington, D.C
Washington, DC
View Details