Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Creative tools for business
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Flash Developer Center / Video Learning Guide for Flash /

Video Learning Guide for Flash: Synchronization and captions

by Adobe

Adobe Flash Professional

Content

  • About video cue points
  • Synchronizing FLV video to content in Flash Professional
  • Checklist for creating video synchronized to SWF content
  • Using the ActionScript 3 video captioning features
  • Where to go from here

Modified

22 February 2011

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
ActionScript best practice Flash Professional video

Requirements

Prerequisite knowledge

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.

User level

Beginning

Required products

  • Flash Player
  • Flash Professional (Download trial)

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.

About video cue points

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:

  • Navigation and event cue points are embedded directly into the FLV file during encoding. Navigation cue points are ideal for user interfaces where navigation to exact locations in the video is necessary. The encoder forces a whole keyframe in the location where the cue point is added allowing for accurate navigation to that point.
  • Event cue points are also embedded during encoding and can be used to synchronize times in the video to timed text caption files and other events.
  • ActionScript cue points are not embedded in FLV file—they are added at runtime via ActionScript or at authortime using the improved workflow for 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.

Creating cue points

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.

Responding to cue points

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.

Cue point parameters

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 info property:

  • name: Name of the cue point
  • time: Time associated with the cue point
  • type: Type of cue point (navigation, event, or ActionScript)
  • parameters: Object containing variables associated with the cue point

Synchronizing FLV video to content in Flash Professional

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.

Checklist for creating video synchronized to SWF content

The following list describes common steps involved in creating a file containing video synchronized to text or graphics along the Timeline.

To create a synchronized video presentation:

  1. Acquire a source video and determine the points at which you want to synchronize content.
  2. Encode the video to FLV format and embed the navigation cue points at the desired locations. (For MPEG-4 video files, add them using ActionScript.)
  3. Create a FLA file and add keyframes at any interval along the main Timeline. Add a keyframe for each cue point in the video and add a frame label to each keyframe that corresponds to the name of the related cue point.
  4. Place content on the keyframes where the content corresponds to the correct cue point name (frame label).
  5. Import the video file using the Video Import Wizard or the FLVPlayback component parameters.
  6. Add a cuePoint event listener to the FLVPlayback component and add the event listener code pattern to frame 1 of the main Timeline.
  7. In the event handler code, add a gotoAndStop action that targets a frame label of the same name as the cue point parameter name.

Using the ActionScript 3 video captioning features

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:

  1. Using a W3C standard caption XML file, called a Timed Text file.
  2. Using an XML file containing event cue points with captions associated with the parameters field of the cue point.

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:

  • Captioning timing can be specified (also duration if a Timed Text file is used)
  • Captioning text can be formatted via the XML file definition
  • Captioning can be toggled on and off using the Captioning button
  • Captioning supports multiple language tracks
  • Captioning can be assigned to multiple FLVPlayback instances

For documentation on working ActionScript 3 FLVPlayback captioning, see the Using the FLVPlaybackCaptioning Component section of Using ActionScript 3.0 Components.

Where to go from here

For detailed articles and example files on video synchronization, visit the Flash video templates page. Also be sure to check out other sections in the Video Learning Guide for Flash.

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

More Like This

  • Video Learning Guide for Flash: Adding video to a web page
  • Video Learning Guide for Flash: NTSC and PAL video standards
  • Video Learning Guide for Flash: Overview
  • Video Learning Guide for Flash: Progressive and streaming video
  • Video Learning Guide for Flash: Capturing and encoding

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement