Showcase and discover digital art at yex

Follow Design Stacks

Subscribe to our free newsletter to get all our latest tutorials and articles delivered directly to your inbox!

Controlling Flash Video with the FLVPlayback Behaviors

Controlling Flash Video with the FLVPlayback Behaviors

The FLVPlayback behaviors are the next generation of media behaviors for use with Flash Video. They are designed to give you easy-to-use controls for the new FLVPlayback component, which is included in Flash Professional 8. You can use these behaviors to add a range of functionality to your video projects by adding prebuilt code snippets to buttons, screens, and other objects in your movie.

This article provides nine custom behaviors that I built to trigger the component’s basic functions through ActionScript. By using them you will be able to load multiple videos into a single FLVPlayback component, change which video is currently displaying, start and stop the currently playing video, and seek to cue points and times within the currently playing video. I’ve also included quick-start instructions for their use.

Note: If you are still using Flash MX Professional 2004 and not Flash Professional 8, please see the previous version of this article, Controlling Media Components with Flash Behaviors.

Requirements

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

Macromedia Flash Professional 8

Macromedia Extension Manager

Tutorials and sample files:

Prerequisite Knowledge

You will need to know the ins and outs of encoding Flash Video and using the FLVPlayback component before the behaviors will be useful. Please refer to the following Getting Started section for more resources.

This section provides a quick overview of what you need to know to get started. If you have already installed the behaviors and know the gist of what to do, then you can go the following pages for more details. Otherwise, you should know the following details in order to use the FLVPlayback behaviors successfully.

Before You Start

Behaviors are prebuilt ActionScript code snippets that you can apply to objects in Flash using the Behaviors panel. In this case the behaviors are designed to control an FLVPlayback component in your Flash file.

You will need to have an FLVPlayback component displaying a video before these behaviors will be useful.

Understanding the Supplied File

The article includes an MXP installer for the FLVPlayback behaviors. Download this file from the sample file link on the first page, unpack it, and double-click it to run the installer in the Extension Manager. After you install the behaviors, they will be available in Flash.

After the Behaviors Are Installed

After you have run the MXP installer, you can open Flash and find the behaviors in the FLVPlayback Control category of the Behaviors panel (see Figure 1).

Seven FLVPlayback behaviors in the Behaviors panel

Figure 1. Seven FLVPlayback behaviors in the Behaviors panel

The general process from here on out will be to select the object to which you want to attach the behavior (usually a button) and choose a behavior from the Behaviors panel.

Comments