Accessibility

Flash Article

 

Creating a Dynamic Playlist for Streaming Flash Video


Lisa Larson

Lisa Larson-Kelley

FlashConnections

Table of Contents

Comments
Created:
17 January 2005
Modified:
27 March 2006
User Level:
Intermediate, Advanced

Note: This tutorial was written when Flash first featured a video workflow in Flash MX Professional 2004. To take advantage of feedback that readers have sent me over the years about developing playlists, answers to many common questions, and the latest features in Flash CS3 Professional and Flash Player 9, please read the thoroughly revised version of this article.

As developers, we are often bogged down with mundane tasks such as site maintenance and updates. If we want to pass these tasks on to clients or colleagues who are not tech-savvy, we have to develop sophisticated interfaces to simplify the process for them and to give them easy access to the data. XML gives the power to control content back to the client, freeing us developers to do what we do best.

High-profile sites, most notably Google Video and Amazon.com, are taking advantage of the integration of Flash video with XML. By editing one flat file, you too can update your video content dynamically.

At a MAX conference, Chris Hock and Srinivas Manapragada from Macromedia (now Adobe) presented an XML-based solution for creating content-driven media players called VideoSource. Using their code as a foundation, you will develop your own dynamic video playlist in this article. This XML-based approach is perfect if you ever need to display multiple video clips but you don't want to edit your Flash source code every time you add new video content. As an extra bonus, the application actually generates thumbnail previews on the fly.

Note: This tutorial shows you how to create a dynamic playlist for streaming Flash video. To find out how to build a similar playlist using progressive download Flash video, see my article, Creating a Dynamic Playlist for Progressive Flash Video.

The basic framework of the VideoSource application consists of the following (see Figure 1):

  • Flash Media Server (FMS) to stream video
  • XML file as the data source (playlist-demo-1.xml)
  • Custom-made player for playback (VideoSource2.swf)
  • External ActionScript files (VideoSource.as, VideoThumb1.as)
Server/file diagram of the VideoSource application

Figure 1. Server/file diagram of the VideoSource application

You can download all source files for this project.

Requirements

To complete this tutorial you will need to install the following software and files:

Flash Professional 8

Flash Media Server 2

Sample files:

Prerequisite Knowledge

You should be familiar with Flash Professional 8 and understand the basics of delivering video through Flash and Flash Media Server (FMS). You should also have a basic understanding of XML.

About the author

Lisa Larson-Kelley began her career in print design, but was soon lured to digital media by a little application called Flash 4. In addition to hands-on development projects, she enjoys writing and teaching, with a knack for breaking down complex concepts and making them accessible. She has authored technical articles for the Adobe Developer Connection, and editorials and features for StreamingMedia.com; and coauthored the book, Flash Video for Professionals (Wiley, 2007). Lisa has also presented at numerous industry conferences around the world and is an active member of the FlashCodersNY user group. A graduate of Wayne State University in Michigan with a BFA in Graphic Design, Lisa received a New Media Certification from the Rhode Island School of Design/Fraunhofer CRCG in 2003. After spending two years as a freelance designer/developer, she went on to become the technical director and cofounder of go:toGroup, a new-media firm based in New York City specializing in Flash video applications. She now consults, teaches, and develops iFoxCam, a consumer video surveillance product using Flash Media Server. While with go:toGroup, Lisa worked with many video-centric startups as well as companies such as Adobe, Microsoft, and L'Oréal. She shares news and musings about Flash video, web development and life in the big city on her blog, flashconnections.com.