Building a Video Presentation with Macromedia Flash MX Professional 2004 Media Components
Andrew Guldman
Fluid
Table of Contents
Note: This article describes legacy techniques in Flash video. To learn about the latest best practices for working with video in newer versions in Flash, please read the Flash Video Learning Guide and the most recent articles posted in the Flash Video Developer Center.
Imagine creating web applications that synchronize video with animation, text, and graphics—in minutes, without programming. Macromedia Flash MX 2004 Professional provides a suite of new streaming media tools that makes this possible. This article showcases these tools as you learn how to build an interactive video presentation.
These streaming media tools feature three new components: Media Display, Media Controller, and Media Playback. In addition to these components, Macromedia Flash MX 2004 includes several behaviors that help connect media components to each other and to the rest of your application. (For those of you who are new to Macromedia Flash MX 2004, behaviors are a new construct that automatically attach predetermined code to a movie clip or component instance.)
Here’s a short description of each of the three media components.
Media Display Component
To view this movie, you need the latest version of the Macromedia Flash Player.
Download the free Macromedia Flash Player now.
The Media Display component plays MP3 or FLV streaming media at runtime. Component properties and a runtime API let you specify the URL of the media, stop and start playback, and much more. This component has no visual representation other than the media itself. Although I use FLV video content in this article, you could work equally well with MP3 audio content.
Media Controller Component
The Media Controller component provides user interface controls for the streaming media. The controller features play and pause buttons, volume controls, and the like, which allow users to interact with the media being played. It also includes bars that show what percentage of the media has loaded and how much has already played.
Media Playback Component
The Media Playback component combines Media Display and Media Controller component instances into a single, integrated component. The Display and Controller component instances automatically react to each other. Normal usage of the Media Playback component is refreshingly straightforward: Simply drag it onto the Stage and configure it using the Component Inspector panel.
In this article I focus on the Media Display and Media Controller components. Once you learn how to use those them, using the Media Playback component is easy. The concepts and API are similar and the integration is even easier.
Requirements
To complete this tutorial, you need to install the following software and files:
Macromedia Flash MX Professional 2004
Download the sample darwin.fla file:
I refer to the sample Flash source code file in this tutorial. Place it in your working directory.
For faster, repeated access during development, you may choose to download the sample darwin.flv video file (58.6 MB FLV) to the working directory on your hard drive. Alternatively, these media components can stream the sample video directly from the source while you are developing. By default, the sample darwin.fla does just that.