22 February 2011
You should have a basic knowledge of the Flash Professional user interface and a basic knowledge of working with FLA files. Certain features, such as H.264 codec support, are available only in Flash Player 9.0.115 and later.
Other sections of the Video Learning Guide for Flash have explained how to produce video and display it in your web page. The next logical next step is to synchronize the video with content and caption displays in your movie. Flash Professional CS5 offers you a range of features that allow you to synchronize text, animations, graphics, and captions with points of time in the video.
This section provides an overview of the key concepts involved in content synchronization and captioning, including the basics of working with video cue points and the new ActionScript 3 component features for video captioning.
Cue points are markers that you place in the FLV file to specify the times at which you will synchronize content or activity. Understanding the basics of cue points will allow you to start coordinating endless possibilities for combining video with other types of content in Flash Professional.
There are three types of cue points:
Note: Using navigation cue points embedded directly into the video is the only way to create accurate seeking to a time in a progressive video. When creating interfaces where buttons allow the viewer to jump to specific times in the video, it is recommended that you embed the cue points directly in the video at the time of encoding or use the Flash Media Server for streaming video.
Navigation and event cue points can be added to FLV files using the Video Import wizard or Adobe Media Encoder at the time of encoding. ActionScript cue points can be added using the FLVPlayback component's cuePoints parameter in the Properties panel while authoring the movie or by using ActionScript at runtime. Flash Professional CS5 includes an improved workflow for working with ActionScript cue points at authortime. The Cue Points area in the Properties panel allows you to easily add an edit cue point while viewing the live preview of the FLVPlayback component on the Stage. The result is a far easier process for adding ActionScript cue points to video content.
Tip: Cue points can be exported to an XML file during encoding using the Video Import wizard or the Adobe Media Encoder. The saved XML file can then be imported while working on other videos to create consistency and save time during production.
Tip: Cue points can also be embedded in an FLV or F4V during encoding in Adobe Premiere Pro or Adobe After Effects.
Once you have created your cue points, you have to respond to them using a bit of ActionScript code. Cue points are made available to the Flash movie in the form of ActionScript events. Events in ActionScript are timing hooks that allow you to respond to something (an event) when it occurs. To respond to a cuePoint event, the standard component event listening code pattern must be applied. Note that this process is slightly different depending on whether you're using the ActionScript 2 version of the FLVPlayback component or the ActionScript 3 version of the component.
For documentation on handling ActionScript 2 video events and cue point parameters, see the Listening for cuePoint events section of the ActionScript 2 Components Language Reference.
For documentation on handling ActionScript 3 video events and cue point parameters, see the Use cue points section of Using ActionScript 3 Components.
When you catch a cue point event in ActionScript, the event handler function is passed an event object that contains information about the cue point. This is significant as you use this information to decide what to do in response to the event.
The following properties are contained in a cue point event object's
Once you have written the code that responds to the cue point event notifications and have access to the cue point parameters, you are authoring in the correct timing and need to do something. The two most common ways to synchronize to content are to navigate to frames containing frame labels that match the name of the cue point (in an ActionScript 2 or ActionScript 3 timeline-based file) or to navigate to slides named the same as the cue point names (in an ActionScript 2 screens-based file). The key is to use the cue point name as a way to navigate to a location in the FLA file that contains the content that should appear with the corresponding time in the video.
Another alternative to using the Timeline or screens would be to handle the loading of the content dynamically using ActionScript. In this case, the content would most likely be added to the document library of the FLA file or made immediately available through some other means like a preloaded asset SWF.
The following list describes common steps involved in creating a file containing video synchronized to text or graphics along the Timeline.
The ActionScript 3 version of the FLVPlayback components includes the new FLVPlaybackCaptioning component. The FLVPlaybackCaptioning component provides an easy way to include captioning content for accessibility or standard text captioning uses.
The ActionScript 3 component provides two ways to include captioning text:
Both options listed above coordinate the caption with specific points in the video's timing during playback. In this case, the synchronization work is done for you as the FLVPlaybackCaptioning component automatically listens for the cue point events and time when placed on the same Timeline as an FLVPlayback component. For creating captioning, there is no need to write ActionScript code—the component does the work for you.
The FLVPlaybackCaptioning component contains the following features:
For documentation on working ActionScript 3 FLVPlayback captioning, see the Using the FLVPlaybackCaptioning Component section of Using ActionScript 3.0 Components.