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 Media Components with Flash Behaviors

Controlling Media Components with Flash Behaviors

Displaying video content is easier than ever before in Macromedia Flash MX Professional 2004 thanks to the new media components that display video saved in the FLV format.

The standard approach for applying settings to a component is to adjust its parameters in the Component Inspector panel while authoring in the FLA file. But what if you need dynamic control of the video display while the movie is running?

Conveniently enough, Flash components have functions and parameters you can manipulate through ActionScript. Even more helpful is the addition of behaviors in Flash MX 2004 that allow beginning and advanced users to add prebuilt ActionScript to buttons, screens, and other objects in a Flash movie.

This article provides six custom behaviors that I designed to access functional control over video files playing in a Media Playback component. These behaviors are simple and easy to use. With the included sample files you’ll be able to seek to a cue point or a time in the video; designate a video source for the component or choose a video source from a list of choices in a List component; and set up simple toggle behaviors to control play, pause, or autosize properties.


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

Macromedia Flash MX Professional 2004

Extension Manager 1.6

Video Update: Exporter and Updated Media Components (Updated 1/30/04)

This update resolves issues identified with the Flash Video Exporter and Media Components in Flash MX Professional 2004. All users creating video projects in Flash on any language should install this update.

Media Behaviors extension

Sample files

To use this tutorial, you should also be familiar with the basics of creating and running movies using Macromedia Flash MX 2004.

Other assumptions and requirements:

  • Although this tutorial works with the supplied files, the Media components are available only in the Components panel in Flash MX Professional 2004.
  • The Media components display FLV formatted video files. You can export them using the Flash Video Exporter plug-in in any supported video editing application or export them directly from Flash MX 2004. (See the FLV topic in the Help pages.)
  • You must install the supplied MXP file using Extension Manager 1.6 before you can use the custom behaviors.