Using video templates (Flash Professional only)

This section covers creating Flash content using video and includes instructions on using the video templates.

Flash MX Professional 2004 provides new ways to creatively use and deploy video in your Flash projects. The ability to play back external Flash Video (.flv) files enables authors to use video in more projects that will be viewable by wider audiences. The video templates provided with Flash Professional 2004 can help you create video presentations and user interfaces for selecting from multiple bandwidth-tuned streams of video.

Using the Bandwidth Selection template (Flash Professional only)

The Bandwidth Selection template uses forms and components to present the selection interface. This interface allows end-users to control how much content they receive and lets authors tailor their applications to a variety of connection speeds. Once the user has made a speed selection, the media playback component is directed to play the chosen video.

The Select screen contains radio buttons that allow bandwidth selection. ActionScript to handle the selection of radio buttons is included within the Timeline of this screen.

To change the option labels or the number of options that users is presented, you can add, remove, or edit the components on the Select form.

Setting the URLs to the video content (Flash Professional only)

The media playback component progressively downloads Flash Video (.flv) files without requiring that they be embedded in the SWF file.

The data property of the radio buttons is set to a string that is appended to a base string to properly form the correct URL. For example, if the user selects High Bandwidth and the base string is cartoon, the file that is loaded is cartoon_hi.flv.

To change the base string, open the Actions panel and select Frame 1 of the Actions layer of the Select screen. Edit the following ActionScript according to the instructions within the comments:

// Replace  "test" with your own base string. Be sure
// to keep the quotes.
var video_base:String = "test"

When the user makes a selection, the code appends the base string you've set with the string stored in the data property of the radio button, and the media playback component loads the media.

Using the Video Presentation template (Flash Professional only)

The Video Presentation template uses slides, media components, and behaviors to create a self-running presentation that progresses according to cues from the video playback. Video presentations are great for self-running demos, kiosks, or presentations to audiences over the web. At the end of the presentation, viewers are given the option to play the presentation again from the beginning.

You can customize the presentation, add your own video and content, and customize the media playback component to broadcast events when you want.

Adding video (Flash Professional only)

The media display component on the Video slide handles the playback of the video in this presentation. To add your own video to the presentation, select the component on the Stage and replace the current value of the URL property with the URL of your media. Remember that once you publish, the SWF file always looks for the video at that location, so relative paths are recommended over hard-coded paths.

Setting cue points with the video templates (Flash Professional only)

Cue points are also set as properties of the media display component in the Parameters tab in the Component Inspector panel. You add new cue points to the list using the Add (+) button above the Cue Points list. Remove cue points with the Delete (-) button. Each cue point should be given a name and position.

If you give your cue point names and slides the same names, your presentation automatically navigates to the corresponding slide when a cue point is encountered.

Position is a point in time during the playback of the media file, starting from the beginning of the file, which is 0:0:0:0 (hours: minutes: seconds: frames/milliseconds). For example, to place a cue point 10 seconds into the file, enter 0:0:10:0.

Adding content to the video templates (Flash Professional only)

Adding content to the video templates is as easy as adding new slides to the presentation and creating graphics and text, importing media, and adding animation. There are a few slides with some content to help get you started, but you can replace the content on the slides. After you've added content, you can use the Behaviors panel to add transitions between slides for eye-catching animation.

For more information on adding slides and transitions, see the instructions in the section Using the screen presentation templates (Flash Professional only).