
If you've published video on the web yourself, without the help of a portal like YouTube, you know how easy it is to import video into Adobe Flash and publish a SWF file that contains the video component and plays your movie file. (If you don't, the Flash Video Learning Guide has a whole section on adding Flash video to your website.) More often than not, however, you want to publish multiple videos on the same web page—without authoring a new SWF for each one. What you want is a player that's flexible and shows any number of videos you point it to.
This article explains how to do just that. It provides a template with instructions for both streaming and progressive delivery of your video to a customizable player. The sample project you create includes a dynamic playlist using XML and Flash CS3 components that you can customize and extend.
If this video template looks familiar, it's because I wrote a tutorial about it back when Flash first featured a video workflow (Flash MX Professional 2004). In this thoroughly revised article, I've incorporated some of the feedback that readers have sent me over the years about developing playlists, answered many common questions, and demonstrated some of the most requested features.
Note: This tutorial describes how to create a dynamic playlist for both progressive and streaming delivery of video to Adobe Flash Player 9. To find out how to build a similar playlist targeting older versions of Flash Player, see my past articles, Creating a dynamic playlist for progressive Flash video and Creating a dynamic playlist for streaming Flash video.
The code in this article should be clear enough to follow, even if you're just getting started with ActionScript 3.0—so don't be intimidated! Sample code is provided, along with some sample videos (vintage cartoons courtesy of the Prelinger Archives), so you can test your application right away.
The basic framework of the playlist application consists of the following (see Figure 1):

Figure 1. Elements of the video playlist application
To complete this tutorial, you'll need to install the following software and files:
This article assumes that you are familiar with Flash Professional CS3 and have a basic understanding of delivering video through the Flash authoring tool and Flash Media Server. You should also have a basic understanding of XML and ActionScript 3.0.
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 k nack 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.