Accessibility

Flash Article

 

Controlling Flash video with FLVPlayback programming


Dan Carr

Dan Carr

Dan Carr Design

Table of Contents

Created:
16 April 2007
User Level:
Intermediate
Products:
Flash

Flash CS3 includes a new set of ActionScript 3.0 FLVPlayback user interface components. The ActionScript 3.0 components offer a standardized coding approach and increased performance capabilities using the new ActionScript Virtual Machine (AVM2). Using the ActionScript 3.0 component requires making some small changes to the way we've been using components and events, but the benefits include consistency among video and user interface components, easier skinning and customization, and a greater range of controls and error handling.

This article provides an overview to the basic coding necessary for custom manipulation of the ActionScript 3.0 FLVPlayback component. As automated code placement is not available through behaviors in ActionScript 3.0 files, you'll focus on making simple adjustments to hand placed code in this version of the article. By using the code samples and simple instructions for customization, you'll be able to create your own controls that allow you to load, start, seek, and stop one or more videos.

Note: The ActionScript 3.0 version of the FLVPlayback component is available in the Components panel only when an ActionScript 3.0 file is active in Flash. If you open an existing ActionScript 2.0 or lower file in Flash CS3, the ActionScript 2.0 FLVPlayback component is displayed in the Components panel along with the Flash MX 2004 Media components. You cannot run ActionScript 3.0 components in an ActionScript 2.0 file and vice versa. Make sure you are working with the intended component in the intended file version.

If you're using an ActionScript 3.0 file in Flash CS3 Professional, then continue reading this article for more details on working with the newest video component technology.

If you're using Flash Professional 8 or are working with an ActionScript 2.0 file in Flash CS3 Professional, see the previous version of this article, Controlling Flash Video with the FLVPlayback Behaviors. If you're using Flash MX Professional 2004, please see the previous version of this article, Controlling Media Components with Flash Behaviors.

Requirements

To make the most of this tutorial, you'll need the following software and files:

Flash CS3 Professional

Sample files:

Prerequisite knowledge

This article assumes you have previous experience encoding Flash Video and understand the basics of using the FLVPlayback component. If you need additional information, please refer to the resources provided in the following section, Getting started.

About the author

Dan Carr is owner, lead developer, and trainer for Dan Carr Design in San Francisco. With years of history developing for Macromedia and Adobe, Dan has created a range of features available in Flash, including e-learning templates, UI components, and Developer Resource Kit extensions. Dan teaches Flash design and ActionScript classes in San Francisco and develops e-learning and web applications for the public, as well as for Adobe product teams.