ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
fl.video 

FLVPlaybackCaptioning  - AS3

Packagefl.video
Classpublic class FLVPlaybackCaptioning
InheritanceFLVPlaybackCaptioning Inheritance Sprite Inheritance DisplayObjectContainer Inheritance InteractiveObject Inheritance DisplayObject Inheritance EventDispatcher Inheritance Object

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

The FLVPlaybackCaptioning component enables captioning for the FLVPlayback component. NOTE: This documentation is intended for use with the FLVPlaybackCaptioning with Accessibility component.

It updates the ActionScript 3.0 Language and Components Reference for the FLVPlaybackCaptioning class to include the following properties and methods which were added to improve the component's accessibility.

Make sure you are including the " with Accessibility" version of the component in your project before attempting to access the new properties or methods.

The FLVPlaybackCaptioning component downloads a Timed Text (TT) XML file and applies those captions to an FLVPlayback component to which this component is partnered.

For more information on Timed Text format, see http://www.w3.org/AudioVideo/TT/. The FLVPlaybackCaptioning component supports a subset of the Timed Text 1.0 specification. For detailed information on the supported subset, see Timed Text Tags. The following is a brief example:

	 <?xml version="1.0" encoding="UTF-8"?>
	 <tt xml:lang="en" xmlns="http://www.w3.org/2006/04/ttaf1"  xmlns:tts="http://www.w3.org/2006/04/ttaf1#styling">
	     <head>
	         <styling>
	             <style id="1" tts:textAlign="right"/>
	             <style id="2" tts:color="transparent"/>
	             <style id="3" style="2" tts:backgroundColor="white"/>
	             <style id="4" style="2 3" tts:fontSize="20"/>
	         </styling>
	     </head>
	     <body>
	          <div xml:lang="en">
	             <p begin="00:00:00.50" dur="500ms">Four score and twenty years ago</p>
	             <p begin="00:00:02.50"><span tts:fontFamily="monospaceSansSerif,proportionalSerif,TheOther"tts:fontSize="+2">our forefathers</span> brought forth<br /> on this continent</p>
	             <p begin="00:00:04.40" dur="10s" style="1">a <span tts:fontSize="12 px">new</span> <span tts:fontSize="300%">nation</span></p>
	             <p begin="00:00:06.50" dur="3">conceived in <span tts:fontWeight="bold" tts:color="#ccc333">liberty</span> <span tts:color="#ccc333">and dedicated to</span> the proposition</p>
	             <p begin="00:00:11.50" tts:textAlign="right">that <span tts:fontStyle="italic">all</span> men are created equal.</p>
	 			<p begin="15s" style="4">The end.</p>
	         </div>    
	     </body>
	 </tt>
	 

View the examples



Public Properties
 PropertyDefined By
 InheritedaccessibilityImplementation : AccessibilityImplementation
The current accessibility implementation (AccessibilityImplementation) for this InteractiveObject instance.
InteractiveObject
 InheritedaccessibilityProperties : AccessibilityProperties
The current accessibility options for this display object.
DisplayObject
 Inheritedalpha : Number
Indicates the alpha transparency value of the object specified.
DisplayObject
  autoLayout : Boolean
Determines whether the FLVPlaybackCaptioning component automatically moves and resizes the TextField object for captioning.
FLVPlaybackCaptioning
 InheritedblendMode : String
A value from the BlendMode class that specifies which blend mode to use.
DisplayObject
 InheritedblendShader : Shader
[write-only] Sets a shader that is used for blending the foreground and background.
DisplayObject
 InheritedbuttonMode : Boolean
Specifies the button mode of this sprite.
Sprite
 InheritedcacheAsBitmap : Boolean
If set to true, Flash runtimes cache an internal bitmap representation of the display object.
DisplayObject
 Inherited    cacheAsBitmapMatrix : Matrix
If non-null, this Matrix object defines how a display object is rendered when cacheAsBitmap is set to true.
DisplayObject
  captionButton : Sprite
Defines the captionButton FLVPlayback custom UI component instance which provides toggle capabilities to turn captioning on and off.
FLVPlaybackCaptioning
  captionTarget : DisplayObject
Sets the DisplayObject instance in which to display captions.
FLVPlaybackCaptioning
  captionTargetName : String
The instance name of the TextField object or MovieClip enclosing a Textfield object that contains the captions.
FLVPlaybackCaptioning
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 InheritedcontextMenu : NativeMenu
Specifies the context menu associated with this object.
InteractiveObject
 InheriteddoubleClickEnabled : Boolean
Specifies whether the object receives doubleClick events.
InteractiveObject
 InheriteddropTarget : DisplayObject
[read-only] Specifies the display object over which the sprite is being dragged, or on which the sprite was dropped.
Sprite
 Inheritedfilters : Array
An indexed array that contains each filter object currently associated with the display object.
DisplayObject
  flvPlayback : FLVPlayback
Sets the FLVPlayback instance to caption.
FLVPlaybackCaptioning
  flvPlaybackName : String
Sets an FLVPlayback instance name for the FLVPlayback instance that you want to caption.
FLVPlaybackCaptioning
 InheritedfocusRect : Object
Specifies whether this object displays a focus rectangle.
InteractiveObject
 Inheritedgraphics : Graphics
[read-only] Specifies the Graphics object that belongs to this sprite where vector drawing commands can occur.
Sprite
 Inheritedheight : Number
Indicates the height of the display object, in pixels.
DisplayObject
 InheritedhitArea : Sprite
Designates another sprite to serve as the hit area for a sprite.
Sprite
 InheritedloaderInfo : LoaderInfo
[read-only] Returns a LoaderInfo object containing information about loading the file to which this display object belongs.
DisplayObject
 Inheritedmask : DisplayObject
The calling display object is masked by the specified mask object.
DisplayObject
 InheritedmetaData : Object
Obtains the meta data object of the DisplayObject instance if meta data was stored alongside the the instance of this DisplayObject in the SWF file through a PlaceObject4 tag.
DisplayObject
 InheritedmouseChildren : Boolean
Determines whether or not the children of the object are mouse, or user input device, enabled.
DisplayObjectContainer
 InheritedmouseEnabled : Boolean
Specifies whether this object receives mouse, or other user input, messages.
InteractiveObject
 InheritedmouseX : Number
[read-only] Indicates the x coordinate of the mouse or user input device position, in pixels.
DisplayObject
 InheritedmouseY : Number
[read-only] Indicates the y coordinate of the mouse or user input device position, in pixels.
DisplayObject
 Inheritedname : String
Indicates the instance name of the DisplayObject.
DisplayObject
 InheritedneedsSoftKeyboard : Boolean
Specifies whether a virtual keyboard (an on-screen, software keyboard) should display when this InteractiveObject instance receives focus.
InteractiveObject
 InheritednumChildren : int
[read-only] Returns the number of children of this object.
DisplayObjectContainer
 InheritedopaqueBackground : Object
Specifies whether the display object is opaque with a certain background color.
DisplayObject
 Inheritedparent : DisplayObjectContainer
[read-only] Indicates the DisplayObjectContainer object that contains this display object.
DisplayObject
 Inheritedroot : DisplayObject
[read-only] For a display object in a loaded SWF file, the root property is the top-most display object in the portion of the display list's tree structure represented by that SWF file.
DisplayObject
 Inheritedrotation : Number
Indicates the rotation of the DisplayObject instance, in degrees, from its original orientation.
DisplayObject
 InheritedrotationX : Number
Indicates the x-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container.
DisplayObject
 InheritedrotationY : Number
Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container.
DisplayObject
 InheritedrotationZ : Number
Indicates the z-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container.
DisplayObject
 Inheritedscale9Grid : Rectangle
The current scaling grid that is in effect.
DisplayObject
 InheritedscaleX : Number
Indicates the horizontal scale (percentage) of the object as applied from the registration point.
DisplayObject
 InheritedscaleY : Number
Indicates the vertical scale (percentage) of an object as applied from the registration point of the object.
DisplayObject
 InheritedscaleZ : Number
Indicates the depth scale (percentage) of an object as applied from the registration point of the object.
DisplayObject
 InheritedscrollRect : Rectangle
The scroll rectangle bounds of the display object.
DisplayObject
  showCaptions : Boolean
Used to display captions; true = display captions, false = do not display captions.
FLVPlaybackCaptioning
  simpleFormatting : Boolean
Limits formatting instructions from the Timed Text file when set to true.
FLVPlaybackCaptioning
 InheritedsoftKeyboardInputAreaOfInterest : Rectangle
Defines the area that should remain on-screen when a soft keyboard is displayed (not available on iOS).
InteractiveObject
 InheritedsoundTransform : flash.media:SoundTransform
Controls sound within this sprite.
Sprite
  source : String
URL of the Timed Text XML file that contains caption information (required property).
FLVPlaybackCaptioning
 Inheritedstage : Stage
[read-only] The Stage of the display object.
DisplayObject
 InheritedtabChildren : Boolean
Determines whether the children of the object are tab enabled.
DisplayObjectContainer
 InheritedtabEnabled : Boolean
Specifies whether this object is in the tab order.
InteractiveObject
 InheritedtabIndex : int
Specifies the tab ordering of objects in a SWF file.
InteractiveObject
 InheritedtextSnapshot : flash.text:TextSnapshot
[read-only] Returns a TextSnapshot object for this DisplayObjectContainer instance.
DisplayObjectContainer
  track : uint
Support for multiple language tracks.
FLVPlaybackCaptioning
 Inheritedtransform : flash.geom:Transform
An object with properties pertaining to a display object's matrix, color transform, and pixel bounds.
DisplayObject
 InheriteduseHandCursor : Boolean
A Boolean value that indicates whether the pointing hand (hand cursor) appears when the pointer rolls over a sprite in which the buttonMode property is set to true.
Sprite
  videoPlayerIndex : uint
Connects the captioning to a specific VideoPlayer in the FLVPlayback component.
FLVPlaybackCaptioning
 Inheritedvisible : Boolean
Whether or not the display object is visible.
DisplayObject
 Inheritedwidth : Number
Indicates the width of the display object, in pixels.
DisplayObject
 Inheritedx : Number
Indicates the x coordinate of the DisplayObject instance relative to the local coordinates of the parent DisplayObjectContainer.
DisplayObject
 Inheritedy : Number
Indicates the y coordinate of the DisplayObject instance relative to the local coordinates of the parent DisplayObjectContainer.
DisplayObject
 Inheritedz : Number
Indicates the z coordinate position along the z-axis of the DisplayObject instance relative to the 3D parent container.
DisplayObject
Public Methods
 MethodDefined By
  
Creates a new FLVPlaybackCaptioning instance.
FLVPlaybackCaptioning
 Inherited
Adds a child DisplayObject instance to this DisplayObjectContainer instance.
DisplayObjectContainer
 Inherited
Adds a child DisplayObject instance to this DisplayObjectContainer instance.
DisplayObjectContainer
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
EventDispatcher
 Inherited
Indicates whether the security restrictions would cause any display objects to be omitted from the list returned by calling the DisplayObjectContainer.getObjectsUnderPoint() method with the specified point point.
DisplayObjectContainer
 Inherited
Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.
DisplayObjectContainer
 Inherited
Dispatches an event into the event flow.
EventDispatcher
  
Returns an array of FLVPlayback component cuepoints whose caption text contains the search string.
FLVPlaybackCaptioning
 Inherited
getBounds(targetCoordinateSpace:DisplayObject):Rectangle
Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object.
DisplayObject
  
Returns an array of FLVPlayback component cuepoints that contain the captions.
FLVPlaybackCaptioning
  
getCaptionsAsTranscript(preserveFormatting:Boolean = false):String
Returns a string containing all captions as an HTML-formatted transcript.
FLVPlaybackCaptioning
 Inherited
Returns the child display object instance that exists at the specified index.
DisplayObjectContainer
 Inherited
Returns the child display object that exists with the specified name.
DisplayObjectContainer
 Inherited
Returns the index position of a child DisplayObject instance.
DisplayObjectContainer
 Inherited
Returns an array of objects that lie under the specified point and are children (or grandchildren, and so on) of this DisplayObjectContainer instance.
DisplayObjectContainer
 Inherited
getRect(targetCoordinateSpace:DisplayObject):Rectangle
Returns a rectangle that defines the boundary of the display object, based on the coordinate system defined by the targetCoordinateSpace parameter, excluding any strokes on shapes.
DisplayObject
 Inherited
Converts the point object from the Stage (global) coordinates to the display object's (local) coordinates.
DisplayObject
 Inherited
Converts a two-dimensional point from the Stage (global) coordinates to a three-dimensional display object's (local) coordinates.
DisplayObject
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Evaluates the bounding box of the display object to see if it overlaps or intersects with the bounding box of the obj display object.
DisplayObject
 Inherited
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
Evaluates the display object to see if it overlaps or intersects with the point specified by the x and y parameters.
DisplayObject
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Converts a three-dimensional point of the three-dimensional display object's (local) coordinates to a two-dimensional point in the Stage (global) coordinates.
DisplayObject
 Inherited
Converts the point object from the display object's (local) coordinates to the Stage (global) coordinates.
DisplayObject
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Removes the specified child DisplayObject instance from the child list of the DisplayObjectContainer instance.
DisplayObjectContainer
 Inherited
Removes a child DisplayObject from the specified index position in the child list of the DisplayObjectContainer.
DisplayObjectContainer
 Inherited
removeChildren(beginIndex:int = 0, endIndex:int = 0x7fffffff):void
Removes all child DisplayObject instances from the child list of the DisplayObjectContainer instance.
DisplayObjectContainer
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
 Inherited
Raises a virtual keyboard.
InteractiveObject
  
Returns a number of seconds as a timecode string.
FLVPlaybackCaptioning
 Inherited
Changes the position of an existing child in the display object container.
DisplayObjectContainer
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
startDrag(lockCenter:Boolean = false, bounds:Rectangle = null):void
Lets the user drag the specified sprite.
Sprite
 Inherited
startTouchDrag(touchPointID:int, lockCenter:Boolean = false, bounds:Rectangle = null):void
Lets the user drag the specified sprite on a touch-enabled device.
Sprite
 Inherited
Recursively stops the timeline execution of all MovieClips rooted at this object.
DisplayObjectContainer
 Inherited
Ends the startDrag() method.
Sprite
 Inherited
stopTouchDrag(touchPointID:int):void
Ends the startTouchDrag() method, for use with touch-enabled devices.
Sprite
 Inherited
Swaps the z-order (front-to-back order) of the two specified child objects.
DisplayObjectContainer
 Inherited
swapChildrenAt(index1:int, index2:int):void
Swaps the z-order (front-to-back order) of the child objects at the two specified index positions in the child list.
DisplayObjectContainer
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Events
 Event Summary Defined By
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active.EventDispatcher
 InheritedDispatched when a display object is added to the display list.DisplayObject
 InheritedDispatched when a display object is added to the on stage display list, either directly or through the addition of a sub tree in which the display object is contained.DisplayObject
  Dispatched when a caption is added or removed from the caption target text field.FLVPlaybackCaptioning
  Dispatched after the captionTarget property is created, but before any captions are added (the captionTarget property is empty).FLVPlaybackCaptioning
 InheritedDispatched when the user selects 'Clear' (or 'Delete') from the text context menu.InteractiveObject
 InheritedDispatched when a user presses and releases the main button of the user's pointing device over the same InteractiveObject.InteractiveObject
  Dispatched after all of the Timed Text XML data is loaded.FLVPlaybackCaptioning
 Inherited
    contextMenu
Dispatched when a user gesture triggers the context menu associated with this interactive object in an AIR application.InteractiveObject
 InheritedDispatched when the user activates the platform-specific accelerator key combination for a copy operation or selects 'Copy' from the text context menu.InteractiveObject
 InheritedDispatched when the user activates the platform-specific accelerator key combination for a cut operation or selects 'Cut' from the text context menu.InteractiveObject
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive.EventDispatcher
 InheritedDispatched when a user presses and releases the main button of a pointing device twice in rapid succession over the same InteractiveObject when that object's doubleClickEnabled flag is set to true.InteractiveObject
 Inherited[broadcast event] Dispatched when the playhead is entering a new frame.DisplayObject
 Inherited[broadcast event] Dispatched when the playhead is exiting the current frame.DisplayObject
 InheritedDispatched after a display object gains focus.InteractiveObject
 InheritedDispatched after a display object loses focus.InteractiveObject
 Inherited[broadcast event] Dispatched after the constructors of frame display objects have run but before frame scripts have run.DisplayObject
 InheritedDispatched when the user presses two points of contact over the same InteractiveObject instance on a touch-enabled device (such as presses and releases two fingers over a display object on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user moves a point of contact over the InteractiveObject instance on a touch-enabled device (such as moving a finger from left to right over a display object on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user performs a rotation gesture at a point of contact with an InteractiveObject instance (such as touching two fingers and rotating them over a display object on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user performs a swipe gesture at a point of contact with an InteractiveObject instance (such as touching three fingers to a screen and then moving them in parallel over a display object on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user creates a point of contact with an InteractiveObject instance, then taps on a touch-enabled device (such as placing several fingers over a display object to open a menu and then taps one finger to select a menu item on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user performs a zoom gesture at a point of contact with an InteractiveObject instance (such as touching two fingers to a screen and then quickly spreading the fingers apart over a display object on a mobile phone or tablet with a touch screen).InteractiveObject
  Dispatched if a call to the URLLoader.load() event attempts to access a Timed Text XML file over HTTP and the current Flash Player environment is able to detect and return the status code for the request.FLVPlaybackCaptioning
 InheritedThis event is dispatched to any client app that supports inline input with an IMEInteractiveObject
  Dispatched if a call to the URLLoader.load() event results in a fatal error that terminates the download of the Timed Text XML file.FLVPlaybackCaptioning
 InheritedDispatched when the user presses a key.InteractiveObject
 InheritedDispatched when the user attempts to change focus by using keyboard navigation.InteractiveObject
 InheritedDispatched when the user releases a key.InteractiveObject
 InheritedDispatched when a user presses and releases the middle button of the user's pointing device over the same InteractiveObject.InteractiveObject
 InheritedDispatched when a user presses the middle pointing device button over an InteractiveObject instance.InteractiveObject
 InheritedDispatched when a user releases the pointing device button over an InteractiveObject instance.InteractiveObject
 InheritedDispatched when a user presses the pointing device button over an InteractiveObject instance.InteractiveObject
 InheritedDispatched when the user attempts to change focus by using a pointer device.InteractiveObject
 InheritedDispatched when a user moves the pointing device while it is over an InteractiveObject.InteractiveObject
 InheritedDispatched when the user moves a pointing device away from an InteractiveObject instance.InteractiveObject
 InheritedDispatched when the user moves a pointing device over an InteractiveObject instance.InteractiveObject
 InheritedDispatched when a user releases the pointing device button over an InteractiveObject instance.InteractiveObject
 InheritedDispatched when a mouse wheel is spun over an InteractiveObject instance.InteractiveObject
 InheritedDispatched by the drag initiator InteractiveObject when the user releases the drag gesture.InteractiveObject
 InheritedDispatched by the target InteractiveObject when a dragged object is dropped on it and the drop has been accepted with a call to DragManager.acceptDragDrop().InteractiveObject
 InheritedDispatched by an InteractiveObject when a drag gesture enters its boundary.InteractiveObject
 InheritedDispatched by an InteractiveObject when a drag gesture leaves its boundary.InteractiveObject
 InheritedDispatched by an InteractiveObject continually while a drag gesture remains within its boundary.InteractiveObject
 InheritedDispatched at the beginning of a drag operation by the InteractiveObject that is specified as the drag initiator in the DragManager.doDrag() call.InteractiveObject
 InheritedDispatched during a drag operation by the InteractiveObject that is specified as the drag initiator in the DragManager.doDrag() call.InteractiveObject
  Dispatched when the download operation to load the Timed Text XML file begins, following a call to the URLLoader.load() method.FLVPlaybackCaptioning
 InheritedDispatched when the user activates the platform-specific accelerator key combination for a paste operation or selects 'Paste' from the text context menu.InteractiveObject
  Dispatched when data is received as the download of the Timed Text XML file progresses.FLVPlaybackCaptioning
 InheritedDispatched when the user lowers an active stylus past the proximity detection threshold of the screen.InteractiveObject
 Inherited
    proximityEnd
Dispatched when the user lifts an active stylus above the proximity detection threshold of the screen.InteractiveObject
 InheritedDispatched when the user moves an active stylus over the screen while remaining within the proximity detection threshold.InteractiveObject
 Inherited
    proximityOut
Dispatched when the user moves an active stylus away from this InteractiveObject while remaining within the proximity detection threshold of the screen.InteractiveObject
 InheritedDispatched when the user moves an active stylus directly above this InteractiveObject while remaining within the proximity detection threshold of the screen.InteractiveObject
 InheritedDispatched when the user moves an active stylus away from this InteractiveObject and any of its children while remaining within the proximity detection threshold of the screen.InteractiveObject
 InheritedDispatched when the user moves an active stylus over this InteractiveObject from outside the object's tree of descendents in the display list (while remaining within the proximity detection threshold of the screen).InteractiveObject
 InheritedDispatched when a user releases the button on the pointing device after the user first pressed the button over an InteractiveObject instance and then moved the pointing device off of the InteractiveObject instance.InteractiveObject
 InheritedDispatched when a display object is about to be removed from the display list.DisplayObject
 InheritedDispatched when a display object is about to be removed from the display list, either directly or through the removal of a sub tree in which the display object is contained.DisplayObject
 Inherited[broadcast event] Dispatched when the display list is about to be updated and rendered.DisplayObject
 InheritedDispatched when a user presses and releases the right button of the user's pointing device over the same InteractiveObject.InteractiveObject
 InheritedDispatched when a user presses the pointing device button over an InteractiveObject instance.InteractiveObject
 InheritedDispatched when a user releases the pointing device button over an InteractiveObject instance.InteractiveObject
 InheritedDispatched when the user moves a pointing device away from an InteractiveObject instance.InteractiveObject
 InheritedDispatched when the user moves a pointing device over an InteractiveObject instance.InteractiveObject
  Dispatched if a call to the URLLoader.load() event attempts to load a Timed Text XML file from a server outside the security sandbox.FLVPlaybackCaptioning
 InheritedDispatched when the user activates the platform-specific accelerator key combination for a select all operation or selects 'Select All' from the text context menu.InteractiveObject
 InheritedDispatched immediately after the soft keyboard is raised.InteractiveObject
 InheritedDispatched immediately before the soft keyboard is raised.InteractiveObject
 InheritedDispatched immediately after the soft keyboard is lowered.InteractiveObject
 InheritedDispatched when the value of the object's tabChildren flag changes.InteractiveObject
 InheritedDispatched when the object's tabEnabled flag changes.InteractiveObject
 InheritedDispatched when the value of the object's tabIndex property changes.InteractiveObject
 InheritedDispatched when a user enters one or more characters of text.InteractiveObject
 InheritedDispatched when the user first contacts a touch-enabled device (such as touches a finger to a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user removes contact with a touch-enabled device (such as lifts a finger off a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user touches the device, and is continuously dispatched until the point of contact is removed.InteractiveObject
 InheritedDispatched when the user moves the point of contact away from InteractiveObject instance on a touch-enabled device (such as drags a finger from one display object to another on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user moves the point of contact away from an InteractiveObject instance on a touch-enabled device (such as drags a finger from over a display object to a point outside the display object on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user lifts the point of contact over the same InteractiveObject instance on which the contact was initiated on a touch-enabled device (such as presses and releases a finger from a single point over a display object on a mobile phone or tablet with a touch screen).InteractiveObject
Public Constants
 ConstantDefined By
  SHORT_VERSION : String = "2.0"
[static] State variable indicating the short version number of the component.
FLVPlaybackCaptioning
  VERSION : String = "2.0.0.39"
[static] State variable indicating the long version number of the component.
FLVPlaybackCaptioning
Property Detail

autoLayout

property
autoLayout:Boolean

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Determines whether the FLVPlaybackCaptioning component automatically moves and resizes the TextField object for captioning.

If the autoLayout property is set to true, the DisplayObject instance or the TextField object containing the captions displays 10 pixels from the bottom of the FLVPlayback instance. The captioning area covers the width of the FLVPlayback instance, maintaining a margin of 10 pixels on each side.

When this property is set to true, the DisplayObject instance or TextField object displays directly over the FLVPlayback instance. If you are creating your own TextField object, you should set autoLayout to false. If wordWrap = false, the captioning area centers over the FLVPlayback instance, but it can be wider than the FLVPlayback instance.

To control layout, you need to listen for the captionChange event to determine when the TextField object instance is created.

The default value is true.



Implementation
    public function get autoLayout():Boolean
    public function set autoLayout(value:Boolean):void

Related API Elements

captionButton

property 
captionButton:Sprite

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Defines the captionButton FLVPlayback custom UI component instance which provides toggle capabilities to turn captioning on and off.

The captionButton property functions similarly to the FLVPlayback properties playButton, pauseButton, muteButton, and so on.



Implementation
    public function get captionButton():Sprite
    public function set captionButton(value:Sprite):void

Related API Elements

captionTarget

property 
captionTarget:DisplayObject

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Sets the DisplayObject instance in which to display captions.

If you set the instance as a TextField object, it is targeted directly. If you set the instance as a DisplayObjectContainer containing one or more TextField objects, the captions display in the TextField object with the lowest display index.

The DisplayObjectContainer method supports a movie-clip like object with a scale-9 background, which can be scaled when the TextField object size changes.

For more complex scaling and drawing, write code to have the DisplayObjectContainer method listen for a captionChange event.

Note If the captionTargetName or the captionTarget property is not set, the FLVPlaybackCaptioning instance creates a text field set by the captionTarget property with this formatting:

  • black background (background = true; backgroundColor = 0x000000;)
  • white text (textColor = 0xFFFFFF)
  • autoSize = TextFieldAutoSize.LEFT
  • multiLine = true
  • wordWrap = true
  • font = "_sans"
  • size = 12

To customize these values, listen for the captionTargetCreated event.



Implementation
    public function get captionTarget():DisplayObject
    public function set captionTarget(value:DisplayObject):void

Related API Elements

captionTargetName

property 
captionTargetName:String

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

The instance name of the TextField object or MovieClip enclosing a Textfield object that contains the captions.

To specify no target, set this property to an empty string (that is, no target specified) or auto. This property is primarily used in the Component inspector. If you are writing code, use the captionTarget property instead.

The default value is auto.



Implementation
    public function get captionTargetName():String
    public function set captionTargetName(value:String):void

Related API Elements

flvPlayback

property 
flvPlayback:FLVPlayback

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Sets the FLVPlayback instance to caption. The FLVPlayback instance must have the same parent as the FLVPlaybackCaptioning instance.

If the flvPlaybackName or flvPlayback property is not set, the FLVPlaybackCaptioning instance will look for a FLVPlayback instance with the same parent and caption the first one it finds.



Implementation
    public function get flvPlayback():FLVPlayback
    public function set flvPlayback(value:FLVPlayback):void

Related API Elements

flvPlaybackName

property 
flvPlaybackName:String

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Sets an FLVPlayback instance name for the FLVPlayback instance that you want to caption.

To specify no target, set this to an empty string or auto. The FLVPlayback instance must have the same parent as the FLVPlaybackCaptioning instance.

The FLVPlayback instance name is primarily used in the Component inspector. If you are writing code, use the flvPlayback property.

If the flvPlaybackName or the flvPlayback property is not set or set to auto, the FLVPlaybackCaptioning instance searches for a FLVPlayback instance with the same parent and captions the first one it finds.

The default value is auto.



Implementation
    public function get flvPlaybackName():String
    public function set flvPlaybackName(value:String):void

Related API Elements

showCaptions

property 
showCaptions:Boolean

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Used to display captions; true = display captions, false = do not display captions.

If you use the captionButton property to allow the user to turn captioning on and off, set the showCaptions property to false.

The default value is true.



Implementation
    public function get showCaptions():Boolean
    public function set showCaptions(value:Boolean):void

Related API Elements

simpleFormatting

property 
simpleFormatting:Boolean

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Limits formatting instructions from the Timed Text file when set to true.

The following styles are not supported if the simpleFormatting property is set to true:

  • tts:backgroundColor
  • tts:color
  • tts:fontSize
  • tts:fontFamily
  • tts:wrapOption

The following styles are supported if the simpleFormatting property is set to true:

  • tts:fontStyle
  • tts:fontWeight
  • tts:textAlign


Implementation
    public function get simpleFormatting():Boolean
    public function set simpleFormatting(value:Boolean):void

source

property 
source:String

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

URL of the Timed Text XML file that contains caption information (required property).



Implementation
    public function get source():String
    public function set source(value:String):void

track

property 
track:uint

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Support for multiple language tracks.

The best utilization of the track property is to support multiple language tracks with embedded cue points.

You must follow the supported formats for FLVPlaybackCaptioning cue points.

If the track property is set to something other than 0, the FLVPlaybackCaptioning component searches for a text<n> property on the cue point, where n is the track value.

For example, if track == 1, then the FLVPlayBackCaptioning component searches for the parameter text1 on the cue point. If no matching parameter is found, the text property in the cue point parameter is used.

The default value is 0.



Implementation
    public function get track():uint
    public function set track(value:uint):void

videoPlayerIndex

property 
videoPlayerIndex:uint

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Connects the captioning to a specific VideoPlayer in the FLVPlayback component.

If you want to use captioning in multiple video players (using the activeVideoPlayerIndex and visibleVideoPlayerIndex properties in the FLVPlayback component), you should create one instance of the FLVPlaybackCaptioning component for each VideoPlayer that you will be using and set this property to correspond to the index.

The VideoPlayer index defaults to 0 when only one video player is used.



Implementation
    public function get videoPlayerIndex():uint
    public function set videoPlayerIndex(value:uint):void

Related API Elements

Constructor Detail

FLVPlaybackCaptioning

()Constructor
public function FLVPlaybackCaptioning()

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Creates a new FLVPlaybackCaptioning instance.

Method Detail

findInCaptions

()method
public function findInCaptions(searchString:String):Array

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Returns an array of FLVPlayback component cuepoints whose caption text contains the search string.

Parameters

searchString:String — A string to search for in the captions text.

Returns
Array — Array An array of FLVPlayback component cuepoints

getCaptionsAsArray

()method 
public function getCaptionsAsArray():Array

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Returns an array of FLVPlayback component cuepoints that contain the captions.

Returns
Array — Array An array of FLVPlayback component cuepoints

getCaptionsAsTranscript

()method 
public function getCaptionsAsTranscript(preserveFormatting:Boolean = false):String

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Returns a string containing all captions as an HTML-formatted transcript.

Each caption is contained within a p tag with the class attribute "fl_video_caption," a unique id attribute starting with the string "fl_video_caption_2_0_," and a title attribute indicating the timecode at which the caption appears in the video.

Following is a brief example of the HTML returned:

		 <div id="fl_video_transcript" class="fl_video_transcript">
		 	<p class="fl_video_caption" id="fl_video_caption_2_0_1" title="0:00.50"><i>( speaking French ): </i><br/><b>George: </b> Bonjour, Marie.</p>
		 	<p class="fl_video_caption" id="fl_video_caption_2_0_2" title="0:01.75"><b>Marie: </b> Bonjour, George.</p>
		 	<p class="fl_video_caption" id="fl_video_caption_2_0_3" title="0:03.75">VoilÀ une sucette.</p>
		 	<p class="fl_video_caption" id="fl_video_caption_2_0_4" title="0:05.50"><b>George: </b> C'est pour moi?</p>
		 	<p class="fl_video_caption" id="fl_video_caption_2_0_5" title="0:06.50"><b>Marie: </b> Oui, c'est pour toi.</p>
		 	<p class="fl_video_caption" id="fl_video_caption_2_0_6" title="0:08.00"><b>George: </b> Merci, Marie!</p>
		 	<p class="fl_video_caption" id="fl_video_caption_2_0_7" title="0:09.50"><b>Marie: </b> De rien, George.</p>
		 </div>
		 

Parameters

preserveFormatting:Boolean (default = false) — Preserves the HTML tags used to format the caption text in Flash

Returns
String — String A string containing all captions as an HTML-formatted transcript

secondsToTime

()method 
public function secondsToTime(sec:Number):String

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Returns a number of seconds as a timecode string.

Parameters

sec:Number — A number of seconds.

Returns
String
Event Detail

captionChange

Event
Event Object Type: fl.video.CaptionChangeEvent
property CaptionChangeEvent.type = fl.video.CaptionChangeEvent.CAPTION_CHANGE

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Dispatched when a caption is added or removed from the caption target text field.

The event is also dispatched when the following conditions are true:

  • the captionTargetName property is not set
  • the captionTarget property is not set
  • the FLVPlaybackCaptioning instance creates a TextField object automatically for captioning.

The captionChange event has the constant CaptionChangeEvent.CAPTION_CHANGE.

Defines the value of the type property of a captionChange event object.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
addedA Boolean that indicates whether the caption was added or removed from the display.
captionCuePointObjectThe cue point object for this caption.

Related API Elements

captionTargetCreated

Event  
Event Object Type: fl.video.CaptionTargetEvent
property CaptionTargetEvent.type = fl.video.CaptionTargetEvent.CAPTION_TARGET_CREATED

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Dispatched after the captionTarget property is created, but before any captions are added (the captionTarget property is empty).

If the captionTarget property is set with a custom DisplayObject, or if the captionTargetName property is set, this event does not dispatch.

Listen for this event if you are customizing the properties of the TextField object, for example, the defaultTextFormat property.

The captionTargetCreated event has the constant CaptionTargetEvent.CAPTION_TARGET_CREATED.

The CaptionTargetEvent.CAPTION_TARGET_CREATED constant defines the value of the type property of a captionTargetCreated event object.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
captionTargetA display object that is from the captionTarget property of the FLVPlaybackCaptioning instance.

Related API Elements

complete

Event  
Event Object Type: flash.events.Event
property Event.type = flash.events.Event.COMPLETE

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Dispatched after all of the Timed Text XML data is loaded.

The Event.COMPLETE constant defines the value of the type property of a complete event object.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe network object that has completed loading.

Related API Elements

httpStatus

Event  
Event Object Type: flash.events.HTTPStatusEvent
property HTTPStatusEvent.type = flash.events.HTTPStatusEvent.HTTP_STATUS

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Dispatched if a call to the URLLoader.load() event attempts to access a Timed Text XML file over HTTP and the current Flash Player environment is able to detect and return the status code for the request.

The HTTPStatusEvent.HTTP_STATUS constant defines the value of the type property of a httpStatus event object.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
statusThe HTTP status code returned by the server.
targetThe network object receiving an HTTP status code.

Related API Elements

ioError

Event  
Event Object Type: flash.events.IOErrorEvent
property IOErrorEvent.type = flash.events.IOErrorEvent.IO_ERROR

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Dispatched if a call to the URLLoader.load() event results in a fatal error that terminates the download of the Timed Text XML file.

If this event is not handled, it will throw an error.

Defines the value of the type property of an ioError event object.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
errorIDA reference number associated with the specific error (AIR only).
targetThe network object experiencing the input/output error.
textText to be displayed as an error message.

Related API Elements

open

Event  
Event Object Type: flash.events.Event
property Event.type = flash.events.Event.OPEN

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Dispatched when the download operation to load the Timed Text XML file begins, following a call to the URLLoader.load() method.

The Event.OPEN constant defines the value of the type property of an open event object.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe network object that has opened a connection.

Related API Elements

progress

Event  
Event Object Type: flash.events.ProgressEvent
property ProgressEvent.type = flash.events.ProgressEvent.PROGRESS

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Dispatched when data is received as the download of the Timed Text XML file progresses.

Defines the value of the type property of a progress event object.

This event has the following properties:

PropertyValue
bubblesfalse
bytesLoadedThe number of items or bytes loaded at the time the listener processes the event.
bytesTotalThe total number of items or bytes that ultimately will be loaded if the loading process succeeds.
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe object reporting progress.

Related API Elements

securityError

Event  
Event Object Type: flash.events.SecurityErrorEvent
property SecurityErrorEvent.type = flash.events.SecurityErrorEvent.SECURITY_ERROR

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

Dispatched if a call to the URLLoader.load() event attempts to load a Timed Text XML file from a server outside the security sandbox.

If this event is not handled, it will throw an error.

The SecurityErrorEvent.SECURITY_ERROR constant defines the value of the type property of a securityError event object.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe network object reporting the security error.
textText to be displayed as an error message.

Related API Elements

Constant Detail

SHORT_VERSION

Constant
public static const SHORT_VERSION:String = "2.0"

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

State variable indicating the short version number of the component. The version number is useful when you have a FLA file and need to know the component version. To determine the component version, type the following trace into the FLA file:

trace (FLVPlaybackCaptioning.SHORT_VERSION);

The SHORT_VERSION variable includes only the major and minor version numbers, for example, 2.0. The version variable includes the major and minor version numbers as well as the revision and build numbers, for example, 2.0.0.xx.

Related API Elements

VERSION

Constant 
public static const VERSION:String = "2.0.0.39"

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Player 9.0.28.0

State variable indicating the long version number of the component. The version number is useful when you have a FLA file and need to know the component version. To determine the component version, type the following trace into the FLA file:

trace (FLVPlaybackCaptioning.VERSION);

The VERSION variable includes the major and minor version numbers as well as the revision and build numbers, for example, 2.0.0.xx. The SHORT_VERSION variable includes only the major and minor version numbers, for example, 2.0.

Related API Elements

FLVPlaybackCaptioningExample.as

This example demonstrates how to dynamically create an FLVPlayback instance with toggleable captioning.

To run the example, follow these steps:

  1. Open a new Flash File (ActionScript 3.0).
  2. Place the FLVPlayback component on the Stage at 0,0 and provide the instance name: player.
  3. Place the FLVPlaybackCaptioning component on the stage at 0,0 and provide the instance name: captioning.
  4. Place the CaptionButton component on the Stage.
  5. Save the FLA file and give it a name - e.g. captionEx.
  6. Open a new ActionScript file.
  7. Paste the following class example code into a new ActionScript file and save it as FLVPlaybackCaptioningExample.as in the same directory as your FLA file.
  8. In the FLA file (e.g. captionEx), in the Properties inspector set the Document class entry to FLVPlaybackCaptioningExample.
  9. Select Control > Test Movie.
package
{
    import fl.video.CaptionChangeEvent;
    import fl.video.FLVPlayback;
    import fl.video.FLVPlaybackCaptioning;
    import flash.display.Sprite;
    import flash.text.TextField;
    
    public class FLVPlaybackCaptioningExample extends Sprite {

        private var videoPath:String = "http://www.helpexamples.com/flash/video/caption_video.flv";
        private var captioningPath:String = "http://www.helpexamples.com/flash/video/caption_video.xml";
        
        public function FLVPlaybackCaptioningExample() {
            player.source = videoPath;
            player.skin = "SkinOverAllNoCaption.swf";
            player.skinBackgroundColor = 0x666666;
            player.skinBackgroundAlpha = 0.5;

            captioning.flvPlayback = player;
            captioning.source = captioningPath;
            captioning.autoLayout = false;            
            captioning.addEventListener(CaptionChangeEvent.CAPTION_CHANGE, onCaptionChange);
        }

        private function onCaptionChange(e:CaptionChangeEvent):void {
            var tf:* = e.target.captionTarget;
            var player:FLVPlayback = e.target.flvPlayback;

            // move the caption below the video
            tf.y = 210;            
        }
    }
}