Package | fl.video |
Class | public class FLVPlayback |
Inheritance | FLVPlayback Sprite DisplayObjectContainer InteractiveObject DisplayObject EventDispatcher Object |
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
It updates the ActionScript 3.0 Language and Components Reference for the FLVPlayback class to include the following properties and methods which were added to improve the component's keyboard and screenreader 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 FLVPlayback class allows you to include a video player in your application to play progressively downloaded video (FLV) files over HTTP, or play streaming FLV files from Flash Media Server (FMS) or other Flash Video Streaming Service (FVSS).
For Flash Player Update 3 (version 9.0.115.0) and later, the FLVPlayback component was updated to support high-definition MPEG-4 video formats that utilize industry standard H.264 encoding. For more information on the video formats supported by the FLVPlayback component, see Controlling web video with ActionScript 3 FLVPlayback programming.
Unlike other ActionScript 3.0 components, the FLVPlayback component does not extend UIComponent; therefore, it does not support the methods and properties of that class.
To access the properties, methods, and events of the FLVPlayback class, you must import the
class to your application either by dragging the FLVPlayback component to the Stage in your Flash
application, or by explicitly importing it in ActionScript using the import
statement.
The following statement imports the FLVPlayback class:
import fl.video.FLVPlayback;
The FLVPlayback class has a VERSION
constant, which is a class property. Class properties are
available only on the class itself. The VERSION
constant returns a string that indicates the
version of the component. The following code shows the version in the Output panel:
import fl.video.FLVPlayback; trace(FLVPlayback.VERSION);
Related API Elements
FLVPlaybackCaptioning
MetadataEvent
NCManager
LayoutEvent
SoundEvent
VideoPlayer
VideoError
VideoEvent
VideoProgressEvent
Property | Defined By | ||
---|---|---|---|
accessibilityImplementation : AccessibilityImplementation
The current accessibility implementation (AccessibilityImplementation)
for this InteractiveObject instance. | InteractiveObject | ||
accessibilityProperties : AccessibilityProperties
The current accessibility options for this display object. | DisplayObject | ||
activeVideoPlayerIndex : uint
A number that specifies which video player instance is affected by other application
programming interfaces (APIs). | FLVPlayback | ||
align : String
Specifies the video layout when the scaleMode property is set to
VideoScaleMode.MAINTAIN_ASPECT_RATIO or VideoScaleMode.NO_SCALE. | FLVPlayback | ||
alpha : Number
Indicates the alpha transparency value of the object specified. | DisplayObject | ||
autoPlay : Boolean
A Boolean value that, if set to true, causes the FLV file to start
playing automatically after the source property is set. | FLVPlayback | ||
autoRewind : Boolean
A Boolean value that, if true, causes the FLV file to rewind to Frame 1 when
play stops, either because the player reached the end of the stream or the
stop() method was called. | FLVPlayback | ||
backButton : Sprite
BackButton playback control. | FLVPlayback | ||
bitrate : Number
A number that specifies the bits per second at which to transfer the FLV file. | FLVPlayback | ||
blendMode : String
A value from the BlendMode class that specifies which blend mode to use. | DisplayObject | ||
blendShader : Shader [write-only]
Sets a shader that is used for blending the foreground and background. | DisplayObject | ||
buffering : Boolean [read-only]
A Boolean value that is true if the video is in a buffering state. | FLVPlayback | ||
bufferingBar : Sprite
Buffering bar control. | FLVPlayback | ||
bufferingBarHidesAndDisablesOthers : Boolean
If set to true, hides the SeekBar control and disables the
Play, Pause, PlayPause, BackButton and ForwardButton controls while the
FLV file is in the buffering state. | FLVPlayback | ||
bufferTime : Number
A number that specifies the number of seconds to buffer in memory before
beginning to play a video stream. | FLVPlayback | ||
buttonMode : Boolean
Specifies the button mode of this sprite. | Sprite | ||
bytesLoaded : uint [read-only]
A number that indicates the extent of downloading, in number of bytes, for an
HTTP download. | FLVPlayback | ||
bytesTotal : uint [read-only]
A number that specifies the total number of bytes downloaded for an HTTP download. | FLVPlayback | ||
cacheAsBitmap : Boolean
If set to true, Flash runtimes cache an internal bitmap representation of the
display object. | DisplayObject | ||
cacheAsBitmapMatrix : Matrix
If non-null, this Matrix object defines how a display object is rendered when
cacheAsBitmap is set to true. | DisplayObject | ||
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
contextMenu : NativeMenu
Specifies the context menu associated with this object. | InteractiveObject | ||
cuePoints : Array [write-only]
An array that describes ActionScript cue points and disabled embedded
FLV file cue points. | FLVPlayback | ||
doubleClickEnabled : Boolean
Specifies whether the object receives doubleClick events. | InteractiveObject | ||
dropTarget : DisplayObject [read-only]
Specifies the display object over which the sprite is being dragged, or on
which the sprite was dropped. | Sprite | ||
endTabIndex : int [read-only]
Returns the next available tabIndex value after the FLVPlayback controls. | FLVPlayback | ||
filters : Array
An indexed array that contains each filter object currently associated with the display object. | DisplayObject | ||
focusRect : Object
Specifies whether this object displays a focus rectangle. | InteractiveObject | ||
forwardButton : Sprite
Forward button control. | FLVPlayback | ||
fullScreenBackgroundColor : uint
Background color used when in full-screen takeover
mode. | FLVPlayback | ||
fullScreenButton : Sprite
FullScreen button control. | FLVPlayback | ||
fullScreenSkinDelay : int
Specifies the delay time in milliseconds to hide the skin. | FLVPlayback | ||
fullScreenTakeOver : Boolean
When the stage enters full-screen mode, the
FLVPlayback component is on top of all
content and takes over the entire screen. | FLVPlayback | ||
graphics : Graphics [read-only]
Specifies the Graphics object that belongs to this sprite where vector
drawing commands can occur. | Sprite | ||
height : Number [override]
A number that specifies the height of the FLVPlayback instance. | FLVPlayback | ||
hitArea : Sprite
Designates another sprite to serve as the hit area for a sprite. | Sprite | ||
idleTimeout : Number
The amount of time, in milliseconds, before Flash terminates an idle connection
to Flash Media Server (FMS) because playing paused or stopped. | FLVPlayback | ||
isLive : Boolean
A Boolean value that is true if the video stream is live. | FLVPlayback | ||
isRTMP : Boolean [read-only]
A Boolean value that is true if the FLV file is streaming from
Flash Media Server (FMS) using RTMP. | FLVPlayback | ||
loaderInfo : LoaderInfo [read-only]
Returns a LoaderInfo object containing information about loading the file
to which this display object belongs. | DisplayObject | ||
mask : DisplayObject
The calling display object is masked by the specified mask object. | DisplayObject | ||
metadata : Object [read-only]
An object that is a metadata information packet that is received from a call to
the NetSteam.onMetaData() callback method, if available. | FLVPlayback | ||
metaData : 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 | ||
metadataLoaded : Boolean [read-only]
A Boolean value that is true if a metadata packet has been
encountered and processed or if the FLV file was encoded without the
metadata packet. | FLVPlayback | ||
mouseChildren : Boolean
Determines whether or not the children of the object are mouse, or user input device, enabled. | DisplayObjectContainer | ||
mouseEnabled : Boolean
Specifies whether this object receives mouse, or other user input, messages. | InteractiveObject | ||
mouseX : Number [read-only]
Indicates the x coordinate of the mouse or user input device position, in pixels. | DisplayObject | ||
mouseY : Number [read-only]
Indicates the y coordinate of the mouse or user input device position, in pixels. | DisplayObject | ||
muteButton : Sprite
Mute button control. | FLVPlayback | ||
name : String
Indicates the instance name of the DisplayObject. | DisplayObject | ||
ncMgr : INCManager [read-only]
An INCManager object that provides access to an instance of the class implementing
INCManager, which is an interface to the NCManager class. | FLVPlayback | ||
needsSoftKeyboard : Boolean
Specifies whether a virtual keyboard (an on-screen, software keyboard) should display
when this InteractiveObject instance receives focus. | InteractiveObject | ||
numChildren : int [read-only]
Returns the number of children of this object. | DisplayObjectContainer | ||
opaqueBackground : Object
Specifies whether the display object is opaque with a certain background color. | DisplayObject | ||
parent : DisplayObjectContainer [read-only]
Indicates the DisplayObjectContainer object that contains this display object. | DisplayObject | ||
pauseButton : Sprite
Pause button control. | FLVPlayback | ||
paused : Boolean [read-only]
A Boolean value that is true if the FLV file is in a paused state. | FLVPlayback | ||
playButton : Sprite
Play button control. | FLVPlayback | ||
playheadPercentage : Number
A number that specifies the current playheadTime as a percentage of the
totalTime property. | FLVPlayback | ||
playheadTime : Number
A number that is the current playhead time or position, measured in seconds,
which can be a fractional value. | FLVPlayback | ||
playheadUpdateInterval : Number
A number that is the amount of time, in milliseconds, between each
playheadUpdate event. | FLVPlayback | ||
playing : Boolean [read-only]
A Boolean value that is true if the FLV file is in the playing state. | FLVPlayback | ||
playPauseButton : Sprite
Play/pause button control. | FLVPlayback | ||
preferredHeight : int [read-only]
A number that specifies the height of the source FLV file. | FLVPlayback | ||
preferredWidth : int [read-only]
Gives the width of the source FLV file. | FLVPlayback | ||
preview : String [write-only]
Only for live preview. | FLVPlayback | ||
progressInterval : Number
A number that is the amount of time, in milliseconds, between each progress
event. | FLVPlayback | ||
registrationHeight : Number
The height used to align the video content when autoresizing. | FLVPlayback | ||
registrationWidth : Number
The width used to align the video content when autoresizing. | FLVPlayback | ||
registrationX : Number
The x coordinate used to align the video content when
autoresizing. | FLVPlayback | ||
registrationY : Number
The y coordinate used to align the video content when
autoresizing. | FLVPlayback | ||
root : 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 | ||
rotation : Number
Indicates the rotation of the DisplayObject instance, in degrees, from its original orientation. | DisplayObject | ||
rotationX : Number
Indicates the x-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. | DisplayObject | ||
rotationY : Number
Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. | DisplayObject | ||
rotationZ : Number
Indicates the z-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. | DisplayObject | ||
scale9Grid : Rectangle
The current scaling grid that is in effect. | DisplayObject | ||
scaleMode : String
Specifies how the video will resize after loading. | FLVPlayback | ||
scaleX : Number [override]
A number that is the horizontal scale. | FLVPlayback | ||
scaleY : Number [override]
A number that is the vertical scale. | FLVPlayback | ||
scaleZ : Number
Indicates the depth scale (percentage) of an object as applied from the registration point of the object. | DisplayObject | ||
scrollRect : Rectangle
The scroll rectangle bounds of the display object. | DisplayObject | ||
scrubbing : Boolean [read-only]
A Boolean value that is true if the user is scrubbing with the SeekBar
and false otherwise. | FLVPlayback | ||
seekBar : Sprite
The SeekBar control. | FLVPlayback | ||
seekBarInterval : Number
A number that specifies, in milliseconds, how often to check the SeekBar handle
when scrubbing. | FLVPlayback | ||
seekBarScrubTolerance : Number
A number that specifies how far a user can move the SeekBar handle before an
update occurs. | FLVPlayback | ||
seekToPrevOffset : Number
The number of seconds that the seekToPrevNavCuePoint() method uses
when it compares its time against the previous cue point. | FLVPlayback | ||
skin : String
A string that specifies the URL to a skin SWF file. | FLVPlayback | ||
skinAutoHide : Boolean
A Boolean value that, if true, hides the component skin when the mouse
is not over the video. | FLVPlayback | ||
skinBackgroundAlpha : Number
The alpha for the background of the skin. | FLVPlayback | ||
skinBackgroundColor : uint
The color for the background of the skin (0xRRGGBB). | FLVPlayback | ||
skinFadeTime : int
The amount of time in milliseconds that it takes for the skin to fade in or fade out when
hiding or showing. | FLVPlayback | ||
skinScaleMaximum : Number
This property specifies the largest multiple that FLVPlayback will use to scale up
its skin when it enters full screen mode with a Flash Player that supports
hardware acceleration. | FLVPlayback | ||
softKeyboard : String
Controls the appearance of the soft keyboard. | InteractiveObject | ||
softKeyboardInputAreaOfInterest : Rectangle
Defines the area that should remain on-screen when a soft keyboard is displayed (not available on iOS). | InteractiveObject | ||
soundTransform : flash.media:SoundTransform [override]
Provides direct access to the
VideoPlayer.soundTransform property to expose
more sound control. | FLVPlayback | ||
source : String
A string that specifies the URL of the FLV file to stream and how to stream it. | FLVPlayback | ||
stage : Stage [read-only]
The Stage of the display object. | DisplayObject | ||
startTabIndex : int [read-only]
Returns the first tabIndex value for the FLVPlayback controls. | FLVPlayback | ||
state : String [read-only]
A string that specifies the state of the component. | FLVPlayback | ||
stateResponsive : Boolean [read-only]
A Boolean value that is true if the state is responsive. | FLVPlayback | ||
stopButton : Sprite
The Stop button control. | FLVPlayback | ||
stopped : Boolean [read-only]
A Boolean value that is true if the state of the FLVPlayback instance is stopped. | FLVPlayback | ||
tabChildren : Boolean
Determines whether the children of the object are tab enabled. | DisplayObjectContainer | ||
tabEnabled : Boolean
Specifies whether this object is in the tab order. | InteractiveObject | ||
tabIndex : int
Specifies the tab ordering of objects in a SWF file. | InteractiveObject | ||
textSnapshot : flash.text:TextSnapshot [read-only]
Returns a TextSnapshot object for this DisplayObjectContainer instance. | DisplayObjectContainer | ||
totalTime : Number
A number that is the total playing time for the video in seconds. | FLVPlayback | ||
transform : flash.geom:Transform
An object with properties pertaining to a display object's matrix, color transform, and pixel bounds. | DisplayObject | ||
useHandCursor : 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 | ||
visible : Boolean
Whether or not the display object is visible. | DisplayObject | ||
visibleVideoPlayerIndex : uint
A number that you can use to manage multiple FLV file streams. | FLVPlayback | ||
volume : Number
A number in the range of 0 to 1 that indicates the volume control setting. | FLVPlayback | ||
volumeBar : Sprite
The volume bar control. | FLVPlayback | ||
volumeBarInterval : Number
A number that specifies, in milliseconds, how often
to check the volume bar handle location when scrubbing. | FLVPlayback | ||
volumeBarScrubTolerance : Number
A number that specifies how far a user can move the volume bar handle before
an update occurs. | FLVPlayback | ||
width : Number [override]
A number that specifies the width of the FLVPlayback instance on the Stage. | FLVPlayback | ||
x : Number [override]
A number that specifies the horizontal position (in pixels) of the video player. | FLVPlayback | ||
y : Number [override]
A number that specifies the vertical position (in pixels) of the video player. | FLVPlayback | ||
z : Number
Indicates the z coordinate position along the z-axis of the DisplayObject
instance relative to the 3D parent container. | DisplayObject |
Method | Defined By | ||
---|---|---|---|
Creates a new FLVPlayback instance. | FLVPlayback | ||
Adds an ActionScript cue point and has the same effect as adding an ActionScript
cue point using the Cue Points dialog box, except that it occurs when an application
executes rather than during application development. | FLVPlayback | ||
Adds a child DisplayObject instance to this DisplayObjectContainer instance. | DisplayObjectContainer | ||
Adds a child DisplayObject instance to this DisplayObjectContainer
instance. | DisplayObjectContainer | ||
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 | ||
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 | ||
Assigns a tabIndex value to each of the FLVPlayback controls by sorting
them by position horizontally left to right. | FLVPlayback | ||
Brings a video player to the front of the stack of video players. | FLVPlayback | ||
Closes NetStream and deletes the video player specified by the index
parameter. | FLVPlayback | ||
Determines whether the specified display object is a child of the DisplayObjectContainer instance or
the instance itself. | DisplayObjectContainer | ||
Dispatches an event into the event flow. | EventDispatcher | ||
Sets the FLVPlayback video player to full screen. | FLVPlayback | ||
Finds the cue point of the type specified by the type parameter and
having the time, name, or combination of time and name that you specify
through the parameters. | FLVPlayback | ||
Finds a cue point of the specified type that matches or is
earlier than the time that you specify. | FLVPlayback | ||
Finds the next cue point in my_cuePoint.array that has the same name as
my_cuePoint.name. | FLVPlayback | ||
Returns a rectangle that defines the area of the display object relative to the coordinate system
of the targetCoordinateSpace object. | DisplayObject | ||
Returns the child display object instance that exists at the specified index. | DisplayObjectContainer | ||
Returns the child display object that exists with the specified name. | DisplayObjectContainer | ||
Returns the index position of a child DisplayObject instance. | DisplayObjectContainer | ||
Returns an array of objects that lie under the specified point and are children
(or grandchildren, and so on) of this DisplayObjectContainer instance. | DisplayObjectContainer | ||
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 | ||
Gets the video player specified by the index parameter. | FLVPlayback | ||
Converts the point object from the Stage (global) coordinates
to the display object's (local) coordinates. | DisplayObject | ||
Converts a two-dimensional point from the Stage (global) coordinates to a
three-dimensional display object's (local) coordinates. | DisplayObject | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | ||
Indicates whether an object has a specified property defined. | Object | ||
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 | ||
Evaluates the display object to see if it overlaps or intersects with the
point specified by the x and y parameters. | DisplayObject | ||
Returns false if the FLV file embedded cue point is disabled. | FLVPlayback | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Begins loading the FLV file and provides a shortcut for setting the
autoPlay property to false and setting the
source, totalTime, and isLive
properties, if given. | FLVPlayback | ||
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 | ||
Converts the point object from the display object's (local) coordinates to the
Stage (global) coordinates. | DisplayObject | ||
Pauses playing the video stream. | FLVPlayback | ||
Plays the video stream. | FLVPlayback | ||
Plays the FLV file when enough of it has downloaded. | FLVPlayback | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Removes an ActionScript cue point from the currently loaded FLV file. | FLVPlayback | ||
Removes the specified child DisplayObject instance from the child list of the DisplayObjectContainer instance. | DisplayObjectContainer | ||
Removes a child DisplayObject from the specified index position in the child list of
the DisplayObjectContainer. | DisplayObjectContainer | ||
Removes all child DisplayObject instances from the child list of the DisplayObjectContainer instance. | DisplayObjectContainer | ||
Removes a listener from the EventDispatcher object. | EventDispatcher | ||
Raises a virtual keyboard. | InteractiveObject | ||
Seeks to a given time in the file, specified in seconds,
with a precision of three decimal places (milliseconds). | FLVPlayback | ||
Seeks to a percentage of the file and places the playhead there. | FLVPlayback | ||
Seeks to a given time in the file, specified in seconds, with a precision up to
three decimal places (milliseconds). | FLVPlayback | ||
Seeks to a navigation cue point that matches the specified time, name, or
time and name. | FLVPlayback | ||
Seeks to the next navigation cue point, based on the current value of the
playheadTime property. | FLVPlayback | ||
Seeks to the previous navigation cue point, based on the current
value of the playheadTime property. | FLVPlayback | ||
Changes the position of an existing child in the display object container. | DisplayObjectContainer | ||
Enables or disables one or more FLV file cue points. | FLVPlayback | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Sets the scaleX and scaleY properties simultaneously. | FLVPlayback | ||
Sets width and height simultaneously. | FLVPlayback | ||
Lets the user drag the specified sprite. | Sprite | ||
Lets the user drag the specified sprite on a touch-enabled device. | Sprite | ||
Stops the video from playing. | FLVPlayback | ||
Recursively stops the timeline execution of all MovieClips rooted at this object. | DisplayObjectContainer | ||
Ends the startDrag() method. | Sprite | ||
Ends the startTouchDrag() method, for use with touch-enabled devices. | Sprite | ||
Swaps the z-order (front-to-back order) of the two specified child objects. | DisplayObjectContainer | ||
Swaps the z-order (front-to-back order) of the child objects at the two specified index positions in the
child list. | DisplayObjectContainer | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
Event | Summary | Defined By | ||
---|---|---|---|---|
[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher | |||
Dispatched when a display object is added to the display list. | DisplayObject | |||
Dispatched 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 the video player is resized or laid out automatically. | FLVPlayback | |||
Dispatched when the playhead is moved to the start of the video player because the autoRewind property is set to true. | FLVPlayback | |||
Dispatched when the FLVPlayback instance enters the buffering state. | FLVPlayback | |||
Dispatched when the user selects 'Clear' (or 'Delete') from the text context menu. | InteractiveObject | |||
Dispatched when a user presses and releases the main button of the user's pointing device over the same InteractiveObject. | InteractiveObject | |||
Dispatched when the event object closes the NetConnection, by timing out or through a call to the closeVideoPlayer() method or when you call the load() or play() methods or set the source property and cause the RTMP connection to close as a result. | FLVPlayback | |||
Dispatched when playing completes because the player reached the end of the FLV file. | FLVPlayback | |||
Dispatched when a user gesture triggers the context menu associated with this interactive object in an AIR application. | InteractiveObject | |||
Dispatched when the user activates the platform-specific accelerator key combination for a copy operation or selects 'Copy' from the text context menu. | InteractiveObject | |||
Dispatched when a cue point is reached. | FLVPlayback | |||
Dispatched when the user activates the platform-specific accelerator key combination for a cut operation or selects 'Cut' from the text context menu. | InteractiveObject | |||
[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher | |||
Dispatched 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 | |||
[broadcast event] Dispatched when the playhead is entering a new frame. | DisplayObject | |||
[broadcast event] Dispatched when the playhead is exiting the current frame. | DisplayObject | |||
Dispatched when the location of the playhead moves forward by a call to the seek() method or by clicking the ForwardButton control. | FLVPlayback | |||
Dispatched after a display object gains focus. | InteractiveObject | |||
Dispatched after a display object loses focus. | InteractiveObject | |||
[broadcast event] Dispatched after the constructors of frame display objects have run but before frame scripts have run. | DisplayObject | |||
Dispatched when the user creates a point of contact along the edge of the touch surface with an InteractiveObject instance, (such as tapping along the edge of the touch surface on Siri Remote for Apple TV) Some devices might also interpret this contact as a combination of several touch events, as well. | InteractiveObject | |||
Dispatched 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 | |||
Dispatched 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 | |||
Dispatched 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 | |||
Dispatched 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 | |||
Dispatched 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 | |||
Dispatched 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 | |||
This event is dispatched to any client app that supports inline input with an IME | InteractiveObject | |||
Dispatched when the user presses a key. | InteractiveObject | |||
Dispatched when the user attempts to change focus by using keyboard navigation. | InteractiveObject | |||
Dispatched when the user releases a key. | InteractiveObject | |||
Dispatched when the video player is resized or laid out. | FLVPlayback | |||
Dispatched the first time the FLV file's metadata is reached. | FLVPlayback | |||
Dispatched when a user presses and releases the middle button of the user's pointing device over the same InteractiveObject. | InteractiveObject | |||
Dispatched when a user presses the middle pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when a user releases the pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when a user presses the pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when the user attempts to change focus by using a pointer device. | InteractiveObject | |||
Dispatched when a user moves the pointing device while it is over an InteractiveObject. | InteractiveObject | |||
Dispatched when the user moves a pointing device away from an InteractiveObject instance. | InteractiveObject | |||
Dispatched when the user moves a pointing device over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when a user releases the pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when a mouse wheel is spun over an InteractiveObject instance. | InteractiveObject | |||
Dispatched by the drag initiator InteractiveObject when the user releases the drag gesture. | InteractiveObject | |||
Dispatched 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 | |||
Dispatched by an InteractiveObject when a drag gesture enters its boundary. | InteractiveObject | |||
Dispatched by an InteractiveObject when a drag gesture leaves its boundary. | InteractiveObject | |||
Dispatched by an InteractiveObject continually while a drag gesture remains within its boundary. | InteractiveObject | |||
Dispatched at the beginning of a drag operation by the InteractiveObject that is specified as the drag initiator in the DragManager.doDrag() call. | InteractiveObject | |||
Dispatched during a drag operation by the InteractiveObject that is specified as the drag initiator in the DragManager.doDrag() call. | InteractiveObject | |||
Dispatched 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 the player enters the paused state. | FLVPlayback | |||
Dispatched while the FLV file is playing at the frequency specified by the playheadUpdateInterval property or when rewinding starts. | FLVPlayback | |||
Dispatched when the playing state is entered. | FLVPlayback | |||
Indicates progress made in number of bytes downloaded. | FLVPlayback | |||
Dispatched when the user lowers an active stylus past the proximity detection threshold of the screen. | InteractiveObject | |||
Dispatched when the user lifts an active stylus above the proximity detection threshold of the screen. | InteractiveObject | |||
Dispatched when the user moves an active stylus over the screen while remaining within the proximity detection threshold. | InteractiveObject | |||
Dispatched when the user moves an active stylus away from this InteractiveObject while remaining within the proximity detection threshold of the screen. | InteractiveObject | |||
Dispatched when the user moves an active stylus directly above this InteractiveObject while remaining within the proximity detection threshold of the screen. | InteractiveObject | |||
Dispatched 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 | |||
Dispatched 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 | |||
Dispatched when an FLV file is loaded and ready to display. | FLVPlayback | |||
Dispatched 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 | |||
Dispatched when a display object is about to be removed from the display list. | DisplayObject | |||
Dispatched 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 | |||
[broadcast event] Dispatched when the display list is about to be updated and rendered. | DisplayObject | |||
Dispatched when the location of the playhead moves backward by a call to seek() or when an autoRewind call is completed. | FLVPlayback | |||
Dispatched when a user presses and releases the right button of the user's pointing device over the same InteractiveObject. | InteractiveObject | |||
Dispatched when a user presses the pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when a user releases the pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when the user moves a pointing device away from an InteractiveObject instance. | InteractiveObject | |||
Dispatched when the user moves a pointing device over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when the user stops scrubbing the FLV file with the seek bar. | FLVPlayback | |||
Dispatched when the user begins scrubbing the FLV file with the seek bar. | FLVPlayback | |||
Dispatched when the location of the playhead is changed by a call to seek() or by setting the playheadTime property or by using the SeekBar control. | FLVPlayback | |||
Dispatched 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 | |||
Dispatched when an error occurs loading a skin SWF file. | FLVPlayback | |||
Dispatched when a skin SWF file is loaded. | FLVPlayback | |||
Dispatched immediately after the soft keyboard is raised. | InteractiveObject | |||
Dispatched immediately before the soft keyboard is raised. | InteractiveObject | |||
Dispatched immediately after the soft keyboard is lowered. | InteractiveObject | |||
Dispatched when sound changes by the user either moving the handle of the volumeBar control or setting the volume or soundTransform property. | FLVPlayback | |||
Dispatched when the playback state changes. | FLVPlayback | |||
Dispatched when entering the stopped state. | FLVPlayback | |||
Dispatched when the value of the object's tabChildren flag changes. | InteractiveObject | |||
Dispatched when the object's tabEnabled flag changes. | InteractiveObject | |||
Dispatched when the value of the object's tabIndex property changes. | InteractiveObject | |||
Dispatched when a user enters one or more characters of text. | InteractiveObject | |||
Dispatched 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 | |||
Dispatched 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 | |||
Dispatched when the user touches the device, and is continuously dispatched until the point of contact is removed. | InteractiveObject | |||
Dispatched 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 | |||
Dispatched 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 | |||
Dispatched 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 | |||
Dispatched 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 | |||
Dispatched 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 |
Constant | Defined By | ||
---|---|---|---|
SHORT_VERSION : String = "2.1" [static]
State variable indicating the short version number of the component. | FLVPlayback | ||
VERSION : String = "2.1.0.23" [static]
State variable indicating the long version number of the component. | FLVPlayback |
activeVideoPlayerIndex | property |
activeVideoPlayerIndex:uint
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that specifies which video player instance is affected by other application programming interfaces (APIs). Use this property to manage multiple FLV file streams.
This property does not make the video player visible;
use the visibleVideoPlayerIndex
property to do that.
A new video player is created the first time activeVideoPlayerIndex
is set to a number. When the new video player is created,
its properties are set to the value of the default video player
(activeVideoPlayerIndex == 0
) except for source
,
totalTime
, and isLive
, which are always set to the
default values (empty string, NaN, and false
, respectively),
and autoPlay
, which is always false
(the default is true
only for the default video player, 0). The cuePoints
property has no effect, as it would have no effect
on a subsequent load into the default video player.
APIs that control volume, positioning, dimensions, visibility,
and UI controls are always global, and their behavior is not
affected by setting activeVideoPlayerIndex
. Specifically, setting
the activeVideoPlayerIndex
property does not affect the following
properties and methods:
activeVideoPlayerIndex
backButton | playPauseButton | skin | width |
bufferingBar | scaleX | stopButton | x |
bufferingBarHidesAndDisablesOthers | transform | y | setSize() |
forwardButton | scaleY | visible | setScale() |
height | seekBar | volume | fullScreenBackgroundColor |
muteButton | seekBarInterval | volumeBar | fullScreenButton |
pauseButton | seekBarScrubTolerance | volumeBarInterval | fullScreenSkinDelay |
playButton | seekToPrevOffset | volumeBarScrubTolerance | fullScreenTakeOver |
registrationX | registrationY | registrationWidth | registrationHeight |
skinBackgroundAlpha | skinBackgroundColor | skinFadeTime |   |
Note: The visibleVideoPlayerIndex
property, not the
activeVideoPlayerIndex
property, determines which
video player the skin controls. Additionaly, APIs that control dimensions
do interact with the visibleVideoPlayerIndex
property.
The remaining APIs target a specific video player based on the
setting of activeVideoPlayerIndex
.
To load a second FLV file in the background, set activeVideoPlayerIndex
to 1 and call the load()
method. When you are
ready to show this FLV file and hide the first one,
set visibleVideoPlayerIndex
to 1.
The default value is 0.
Implementation
public function get activeVideoPlayerIndex():uint
public function set activeVideoPlayerIndex(value:uint):void
Related API Elements
align | property |
align:String
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Specifies the video layout when the scaleMode
property is set to
VideoScaleMode.MAINTAIN_ASPECT_RATIO
or VideoScaleMode.NO_SCALE
.
The video dimensions are based on the
registrationX
, registrationY
,
registrationWidth
, and
registrationHeight
properties. When you set the align
property,
values come from the VideoAlign class. The default is VideoAlign.CENTER
.
Implementation
public function get align():String
public function set align(value:String):void
Related API Elements
autoPlay | property |
autoPlay:Boolean
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A Boolean value that, if set to true
, causes the FLV file to start
playing automatically after the source
property is set. If it is set to false
,
the FLV file loads but does not start playing until the play()
or playWhenEnoughDownloaded()
method is called.
Playback starts immediately when you are streaming an FLV file from Flash Media Server (FMS) and the
autoPlay
property is set to true
. However,
when loading an FLV file by progressive download, playback starts only
when enough of the FLV file has download so that the FLV file can play from start
to finish.
To force playback before enough of the FLV file has downloaded,
call the play()
method with no parameters. If playback
has begun and you want to return to the state of waiting
for enough to download and then automatically begin playback,
call the pause()
method, and then the
playWhenEnoughDownloaded()
method.
If you set the property to true
between the loading of new FLV files,
it has no effect until the source
property is set.
Setting the autoPlay
property to true
and
then setting the source
property to a URL has the same
effect as calling the play()
method with that URL.
Calling the load()
method with a URL has the same effect
as setting the source
property to that URL with the
autoPlay
property set to false
.
The default value is true.
Implementation
public function get autoPlay():Boolean
public function set autoPlay(value:Boolean):void
Related API Elements
autoRewind | property |
autoRewind:Boolean
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A Boolean value that, if true
, causes the FLV file to rewind to Frame 1 when
play stops, either because the player reached the end of the stream or the
stop()
method was called. This property is meaningless for live streams.
The default value is false.
Implementation
public function get autoRewind():Boolean
public function set autoRewind(value:Boolean):void
backButton | property |
backButton:Sprite
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
BackButton playback control. Clicking calls the
seekToPrevNavCuePoint()
method.
Implementation
public function get backButton():Sprite
public function set backButton(value:Sprite):void
Related API Elements
bitrate | property |
bitrate:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that specifies the bits per second at which to transfer the FLV file.
When streaming from a Flash Video Streaming service that supports native bandwidth detection, you can provide a SMIL file that describes how to switch between multiple streams based on the bandwidth. Depending on your FVSS, bandwidth may automatically be detected, and if this value is set, it is ignored.
When doing HTTP progressive download, you can use the same SMIL format, but you must set the bitrate as there is no automatic detection.
Implementation
public function get bitrate():Number
public function set bitrate(value:Number):void
buffering | property |
bufferingBar | property |
bufferingBar:Sprite
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Buffering bar control. This control is displayed when the FLV file is in a loading or buffering state.
Implementation
public function get bufferingBar():Sprite
public function set bufferingBar(value:Sprite):void
bufferingBarHidesAndDisablesOthers | property |
bufferingBarHidesAndDisablesOthers:Boolean
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
If set to true
, hides the SeekBar control and disables the
Play, Pause, PlayPause, BackButton and ForwardButton controls while the
FLV file is in the buffering state. This can be useful to prevent a
user from using these controls to try to speed up playing the FLV file
when it is downloading or streaming over a slow connection.
Implementation
public function get bufferingBarHidesAndDisablesOthers():Boolean
public function set bufferingBarHidesAndDisablesOthers(value:Boolean):void
bufferTime | property |
bufferTime:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that specifies the number of seconds to buffer in memory before beginning to play a video stream. For FLV files streaming over RTMP, which are not downloaded and buffer only in memory, it can be important to increase this setting from the default value of 0.1. For a progressively downloaded FLV file over HTTP, there is little benefit to increasing this value although it could improve viewing a high-quality video on an older, slower computer.
For prerecorded (not live) video, do not set the bufferTime
property to 0
:
use the default buffer time or increase the buffer time.
This property does not specify the amount of the FLV file to download before starting playback.
The default value is 0.1.
Implementation
public function get bufferTime():Number
public function set bufferTime(value:Number):void
Related API Elements
bytesLoaded | property |
bytesLoaded:uint
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that indicates the extent of downloading, in number of bytes, for an HTTP download. Returns 0 when there is no stream, when the stream is from Flash Media Server (FMS), or if the information is not yet available. The returned value is useful only for an HTTP download.
Implementation
public function get bytesLoaded():uint
bytesTotal | property |
bytesTotal:uint
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that specifies the total number of bytes downloaded for an HTTP download. Returns 0 when there is no stream, when the stream is from Flash Media Server (FMS), or if the information is not yet available. The returned value is useful only for an HTTP download.
Implementation
public function get bytesTotal():uint
cuePoints | property |
cuePoints:Array
[write-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
An array that describes ActionScript cue points and disabled embedded
FLV file cue points. This property is created specifically for use by
the Component inspector and Property inspector. It does not work if it is
set any other way. Its value has an effect only on the first FLV file
loaded and only if it is loaded by setting the source
property in the Component inspector or the Property inspector.
Note: This property is not accessible in ActionScript. To
access cue point information in ActionScript, use the metadata
property.
To add, remove, enable or disable cue points with ActionScript,
use the addASCuePoint()
, removeASCuePoint()
, or
setFLVCuePointEnabled()
methods.
Implementation
public function set cuePoints(value:Array):void
Related API Elements
endTabIndex | property |
endTabIndex:int
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Returns the next available tabIndex value after the FLVPlayback controls. The value is set after the assignTabIndexes
method is called.
Implementation
public function get endTabIndex():int
Related API Elements
forwardButton | property |
forwardButton:Sprite
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Forward button control. Clicking calls the
seekToNextNavCuePoint()
method.
Implementation
public function get forwardButton():Sprite
public function set forwardButton(value:Sprite):void
Related API Elements
fullScreenBackgroundColor | property |
fullScreenBackgroundColor:uint
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Background color used when in full-screen takeover
mode. This color is visible if the video does
not cover the entire screen based on the scaleMode
property value.
The default value is 0x000000.
Implementation
public function get fullScreenBackgroundColor():uint
public function set fullScreenBackgroundColor(value:uint):void
fullScreenButton | property |
fullScreenSkinDelay | property |
fullScreenSkinDelay:int
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Specifies the delay time in milliseconds to hide the skin.
When in full-screen takeover mode, if the skinAutoHide
property
is true
, autohiding is triggered when the user doesn't move the
mouse for more than the seconds indicated by the fullScreenSkinDelay
property. If the mouse is over the skin itself, autohiding is not triggered.
The default value is 3000 milliseconds (3 seconds).
Implementation
public function get fullScreenSkinDelay():int
public function set fullScreenSkinDelay(value:int):void
fullScreenTakeOver | property |
fullScreenTakeOver:Boolean
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
When the stage enters full-screen mode, the FLVPlayback component is on top of all content and takes over the entire screen. When the stage exits full-screen mode, the screen returns to how it was before.
The recommended settings for full-screen
takeover mode are scaleMode = VideoScaleMode.MAINTAIN_ASPECT_RATIO
and align = VideoAlign.CENTER
.
If the SWF file with the FLVPlayback component is loaded and does not have access to the stage because of security restrictions, full-screen takeover mode does not function. No errors are thrown.
The default value is true.
Implementation
public function get fullScreenTakeOver():Boolean
public function set fullScreenTakeOver(value:Boolean):void
height | property |
height:Number
[override] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that specifies the height of the FLVPlayback instance.
This property affects only the height of the FLVPlayback instance
and does not include the height of a skin SWF file that might be loaded.
Setting the height property also sets the registrationHeight
property
to the same value.
Implementation
override public function get height():Number
override public function set height(value:Number):void
Related API Elements
idleTimeout | property |
idleTimeout:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
The amount of time, in milliseconds, before Flash terminates an idle connection to Flash Media Server (FMS) because playing paused or stopped. This property has no effect on an FLV file downloading over HTTP.
If this property is set when a video stream is already idle, it restarts the timeout period with the new value.
The default value is 300,000 milliseconds (5 minutes).
Implementation
public function get idleTimeout():Number
public function set idleTimeout(value:Number):void
Related API Elements
isLive | property |
isLive:Boolean
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A Boolean value that is true
if the video stream is live. This property
is effective only when streaming from Flash Media Server (FMS) or other Flash Video Streaming Service (FVSS). The value of this
property is ignored for an HTTP download.
If you set this property between loading new FLV files, it has no
effect until the source
property is set for the new FLV file.
Set the isLive
property to false
when sending a prerecorded video
stream to the video player and to true
when sending real-time data
such as a live broadcast. For better performance when you set
the isLive
property to false
, do not set the
bufferTime
property to 0
.
Implementation
public function get isLive():Boolean
public function set isLive(value:Boolean):void
Related API Elements
isRTMP | property |
isRTMP:Boolean
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A Boolean value that is true
if the FLV file is streaming from
Flash Media Server (FMS) using RTMP. Its value is false
for any other FLV file source.
Implementation
public function get isRTMP():Boolean
Related API Elements
metadata | property |
metadata:Object
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
An object that is a metadata information packet that is received from a call to
the NetSteam.onMetaData()
callback method, if available.
Ready when the metadataReceived
event is dispatched.
If the FLV file is encoded with the Flash 8 encoder, the metadata
property contains the following information. Older FLV files contain
only the height
, width
, and duration
values.
Parameter | Description |
---|---|
canSeekToEnd | A Boolean value that is true if the FLV file is encoded with a keyframe on the last frame that allows seeking to the end of a progressive download movie clip. It is false if the FLV file is not encoded with a keyframe on the last frame. |
cuePoints | An array of objects, one for each cue point embedded in the FLV file. Value is undefined if the FLV file does not contain any cue points. Each object has the following properties:
|
audiocodecid | A number that indicates the audio codec (code/decode technique) that was used. |
audiodelay | A number that represents time 0 in the source file from which the FLV file was encoded.
Video content is delayed for the short period of time that is required to synchronize the audio. For example, if the Note that the FLVPlayback and VideoPlayer classes compensate for this delay in their time settings. This means that you can continue to use the time settings that you used in your the source file. |
audiodatarate | A number that is the kilobytes per second of audio. |
videocodecid | A number that is the codec version that was used to encode the video. |
framerate | A number that is the frame rate of the FLV file. |
videodatarate | A number that is the video data rate of the FLV file. |
height | A number that is the height of the FLV file. |
width | A number that is the width of the FLV file. |
duration | A number that specifies the duration of the FLV file in seconds. |
Implementation
public function get metadata():Object
Learn more
Related API Elements
metadataLoaded | property |
metadataLoaded:Boolean
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A Boolean value that is true
if a metadata packet has been
encountered and processed or if the FLV file was encoded without the
metadata packet. In other words, the value is true
if the metadata is
received, or if you are never going to get any metadata. So, you
know whether you have the metadata; and if you don't have the metadata,
you know not to wait around for it. If you just want to know whether
or not you have metadata, you can check the value with:
FLVPlayback.metadata != null
Use this property to check whether you can retrieve useful
information with the methods for finding and enabling or
disabling cue points (findCuePoint
, findNearestCuePoint
,
findNextCuePointWithName
, isFLVCuePointEnabled
).
Implementation
public function get metadataLoaded():Boolean
Related API Elements
muteButton | property |
ncMgr | property |
ncMgr:INCManager
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
An INCManager object that provides access to an instance of the class implementing
INCManager
, which is an interface to the NCManager class.
You can use this property to implement a custom INCManager that requires custom initialization.
Implementation
public function get ncMgr():INCManager
Related API Elements
pauseButton | property |
paused | property |
playButton | property |
playheadPercentage | property |
playheadPercentage:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that specifies the current playheadTime
as a percentage of the
totalTime
property. If you access this property, it contains the percentage
of playing time that has elapsed. If you set this property, it causes a seek
operation to the point representing that percentage of the FLV file's playing time.
The value of this property is relative to the value of the totalTime
property.
Implementation
public function get playheadPercentage():Number
public function set playheadPercentage(value:Number):void
Throws
VideoError — If you specify a percentage that is invalid or if the
totalTime property is
undefined, null , or less than or equal to zero.
|
playheadTime | property |
playheadTime:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that is the current playhead time or position, measured in seconds, which can be a fractional value. Setting this property triggers a seek and has all the restrictions of a seek.
When the playhead time changes, which occurs once every .25 seconds
while the FLV file plays, the component dispatches the playheadUpdate
event.
For several reasons, the playheadTime
property might not have the expected
value immediately after you call one of the seek methods or set playheadTime
to cause seeking. First, for a progressive download, you can seek only to a
keyframe, so a seek takes you to the time of the first keyframe after the
specified time. (When streaming, a seek always goes to the precise specified
time even if the source FLV file doesn't have a keyframe there.) Second,
seeking is asynchronous, so if you call a seek method or set the
playheadTime
property, playheadTime
does not update immediately.
To obtain the time after the seek is complete, listen for the seek
event,
which does not fire until the playheadTime
property has updated.
Implementation
public function get playheadTime():Number
public function set playheadTime(value:Number):void
Related API Elements
playheadUpdateInterval | property |
playheadUpdateInterval:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that is the amount of time, in milliseconds, between each
playheadUpdate
event. Setting this property while the FLV file is
playing restarts the timer.
Because ActionScript cue points start on playhead updates, lowering
the value of the playheadUpdateInterval
property can increase the accuracy
of ActionScript cue points.
Because the playhead update interval is set by a call to the global
setInterval()
method, the update cannot fire more frequently than the
SWF file frame rate, as with any interval that is set this way.
So, as an example, for the default frame rate of 12 frames per second,
the lowest effective interval that you can create is approximately
83 milliseconds, or one second (1000 milliseconds) divided by 12.
The default value is 250.
Implementation
public function get playheadUpdateInterval():Number
public function set playheadUpdateInterval(value:Number):void
Related API Elements
playing | property |
playPauseButton | property |
preferredHeight | property |
preferredHeight:int
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that specifies the height of the source FLV file. This information
is not valid immediately upon calling the play()
or load()
methods. It is valid when the ready
event starts. If the value of the
scaleMode
property is VideoScaleMode.MAINTAIN_ASPECT_RATIO
or VideoScaleMode.NO_SCALE
, it is best to read
the value after the layout
event is dispatched. This property returns
-1 if no information is available yet.
Implementation
public function get preferredHeight():int
Related API Elements
preferredWidth | property |
preferredWidth:int
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Gives the width of the source FLV file. This information is not valid immediately
when the play()
or load()
methods are called; it is valid
after the ready
event is dispatched. If the value of the
scaleMode
property is VideoScaleMode.MAINTAIN_ASPECT_RATIO
or VideoScaleMode.NO_SCALE
, it is best to read
the value after the layout
event is dispatched. This property returns
-1 if no information is available yet.
Implementation
public function get preferredWidth():int
Related API Elements
preview | property |
progressInterval | property |
progressInterval:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that is the amount of time, in milliseconds, between each progress
event. If you set this property while the video stream is playing, the timer restarts.
The default value is 250.
Implementation
public function get progressInterval():Number
public function set progressInterval(value:Number):void
Related API Elements
registrationHeight | property |
registrationHeight:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
The height used to align the video content when autoresizing.
Do not confuse the registrationHeight
property
with the height
property. The height
property reflects the actual height of the video content.
Example 1, load an 80x80 FLV file with the following settings:
registrationX
= 100registrationY
= 100registrationWidth
= 60registrationHeight
= 40align
=VideoAlign.CENTER
scaleMode
=VideoScaleMode.NO_SCALE
x
= 90y
= 80width
= 80height
= 80
Example 2, load the same scenario as example 1 but with the following settings:
scaleMode
=VideoScaleMode.MAINTAIN_ASPECT_RATIO
x
= 110y
= 100width
= 40height
= 80
Example 3, load the same scenario as example 2 but with the following settings:
scaleMode
=VideoScaleMode.EXACT_FIT
x
= 100y
= 100width
= 60height
= 40
Setting the registrationHeight
property is
equivalent to setting the height
property and vice
versa. Setting any other property or calling any method that
alters the height, such as scaleX
,
setSize
, and setScale
, setting keeps
height
and registrationHeight
in sync.
Implementation
public function get registrationHeight():Number
public function set registrationHeight(value:Number):void
registrationWidth | property |
registrationWidth:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
The width used to align the video content when autoresizing.
Do not confuse the registrationWidth
property
with the width
property. The width
property reflects the actual width of the video content.
Example 1, load an 80x80 FLV file with the following settings:
registrationX
= 100registrationY
= 100registrationWidth
= 60registrationHeight
= 40align
=VideoAlign.CENTER
scaleMode
=VideoScaleMode.NO_SCALE
x
= 90y
= 80width
= 80height
= 80
Example 2, load the same scenario as example 1 but with the following settings:
scaleMode
=VideoScaleMode.MAINTAIN_ASPECT_RATIO
x
= 110y
= 100width
= 40height
= 80
Example 3, load the same scenario as example 2 but with the following settings:
scaleMode
=VideoScaleMode.EXACT_FIT
x
= 100y
= 100width
= 60height
= 40
Setting the registrationWidth
property is
equivalent to setting the width
property and vice
versa. Setting any other property or calling any method that
alters the width, such as scaleX
,
setSize
, and setScale
, also keeps
width
and registrationWidth
in sync.
Implementation
public function get registrationWidth():Number
public function set registrationWidth(value:Number):void
registrationX | property |
registrationX:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
The x coordinate used to align the video content when
autoresizing. Do not confuse with the x
property,
which reflects the actual location of the video content.
Example 1, load an 80x80 FLV file with the following settings:
registrationX
= 100registrationY
= 100registrationWidth
= 60registrationHeight
= 40align
=VideoAlign.CENTER
scaleMode
=VideoScaleMode.NO_SCALE
x
= 90y
= 80width
= 80height
= 80
Example 2, load the same scenario as example 1 but with the following settings:
scaleMode
=VideoScaleMode.MAINTAIN_ASPECT_RATIO
x
= 110y
= 100width
= 40height
= 80
Example 3, load the same scenario as example 2 but with the following settings:
scaleMode
=VideoScaleMode.EXACT_FIT
x
= 100y
= 100width
= 60height
= 40
When either the x
or registrationX
property is set, the second property is changed to maintain its
offset from the first. For example, if x
= 10 and
registrationX
= 20, setting x
= 110 also
sets registrationX
= 120.
Implementation
public function get registrationX():Number
public function set registrationX(value:Number):void
registrationY | property |
registrationY:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
The y coordinate used to align the video content when
autoresizing. Do not confuse with the y
property,
which reflects the actual location of the video content.
Example 1, load an 80x80 FLV file with the following settings:
registrationX
= 100registrationY
= 100registrationWidth
= 60registrationHeight
= 40align
=VideoAlign.CENTER
scaleMode
=VideoScaleMode.NO_SCALE
x
= 90y
= 80width
= 80height
= 80
Example 2, load the same scenario as example 1 but with the following settings:
scaleMode
=VideoScaleMode.MAINTAIN_ASPECT_RATIO
x
= 110y
= 100width
= 40height
= 80
Example 3, load the same scenario as example 2 but with the following settings:
scaleMode
=VideoScaleMode.EXACT_FIT
x
= 100y
= 100width
= 60height
= 40
When either the y
or registrationY
property is set, the second property is changed to maintain its
offset from the first. For example, if y
= 10 and
registrationY
= 20, setting y
= 110 also
sets registrationY
= 120.
Implementation
public function get registrationY():Number
public function set registrationY(value:Number):void
scaleMode | property |
scaleMode:String
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Specifies how the video will resize after loading. If set to
VideoScaleMode.MAINTAIN_ASPECT_RATIO
, maintains the
video aspect ratio within the rectangle defined by
registrationX
, registrationY
,
registrationWidth
and
registrationHeight
. If set to
VideoScaleMode.NO_SCALE
, causes the video to size automatically
to the dimensions of the source FLV file. If set to
VideoScaleMode.EXACT_FIT
, causes the dimensions of
the source FLV file to be ignored and the video is stretched to
fit the rectangle defined by
registrationX
, registrationY
,
registrationWidth
and
registrationHeight
. If this is set
after an FLV file has been loaded an automatic layout will start
immediately. Values come from
VideoScaleMode
.
The default value is VideoScaleMode.MAINTAIN_ASPECT_RATIO.
Implementation
public function get scaleMode():String
public function set scaleMode(value:String):void
Related API Elements
scaleX | property |
scaleX:Number
[override] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that is the horizontal scale. The standard scale is 1.
Implementation
override public function get scaleX():Number
override public function set scaleX(value:Number):void
Related API Elements
scaleY | property |
scaleY:Number
[override] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that is the vertical scale. The standard scale is 1.
Implementation
override public function get scaleY():Number
override public function set scaleY(value:Number):void
Related API Elements
scrubbing | property |
scrubbing:Boolean
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A Boolean value that is true
if the user is scrubbing with the SeekBar
and false
otherwise.
Scrubbing refers to grabbing the handle of the SeekBar and dragging it in either direction to locate a particular scene in the FLV file.
Implementation
public function get scrubbing():Boolean
seekBar | property |
seekBarInterval | property |
seekBarInterval:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that specifies, in milliseconds, how often to check the SeekBar handle when scrubbing.
Because this interval is set by a call to the global setInterval()
method,
the update cannot start more frequently than the SWF file frame rate. So, for
the default frame rate of 12 frames per second, for example, the lowest
effective interval that you can create is approximately 83 milliseconds,
or 1 second (1000 milliseconds) divided by 12.
The default value is 250.
Implementation
public function get seekBarInterval():Number
public function set seekBarInterval(value:Number):void
seekBarScrubTolerance | property |
seekBarScrubTolerance:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that specifies how far a user can move the SeekBar handle before an update occurs. The value is specified as a percentage, ranging from 1 to 100.
The default value is 5.
Implementation
public function get seekBarScrubTolerance():Number
public function set seekBarScrubTolerance(value:Number):void
seekToPrevOffset | property |
seekToPrevOffset:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
The number of seconds that the seekToPrevNavCuePoint()
method uses
when it compares its time against the previous cue point. The method uses this
value to ensure that, if you are just ahead of a cue point, you can hop
over it to the previous one and avoid going to the same cue point that
just occurred.
The default value is 1.
Implementation
public function get seekToPrevOffset():Number
public function set seekToPrevOffset(value:Number):void
skin | property |
skin:String
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A string that specifies the URL to a skin SWF file. This string could contain a file name, a relative path such as Skins/MySkin.swf, or an absolute URL such as http://www.%somedomain%.com/MySkin.swf.
Implementation
public function get skin():String
public function set skin(value:String):void
skinAutoHide | property |
skinAutoHide:Boolean
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A Boolean value that, if true
, hides the component skin when the mouse
is not over the video. This property affects only skins that are loaded by setting
the skin
property and not a skin that you create from the FLVPlayback
Custom UI components.
When the component is in full-screen takeover mode and the skin is one that does not lay over
the video, then skinAutoHide
mode is turned on automatically. Setting skinAutoHide = false
after you enter full-screen mode overrides this behavior. Also when the component is
in full-screen takeover mode, autohiding is triggered if the user doesn't move the
mouse for more than fullScreenSkinDelay
seconds, unless the mouse is over the skin itself.
The default value is false.
Implementation
public function get skinAutoHide():Boolean
public function set skinAutoHide(value:Boolean):void
skinBackgroundAlpha | property |
skinBackgroundAlpha:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
The alpha for the background of the skin. The skinBackgroundAlpha
property works only with SWF files that have skins loaded by using the
skin
property and with skins that support setting the color
and alpha. You can set the skinBackgroundAlpha
property
to a number between 0.0 and 1.0. The default is the last value chosen by the
user as the default.
To get the skin colors that come with the ActionScript 2.0 FLVPlayback component,
use the following values for the
skinBackgroundAlpha
and skinBackgroundColor
properties:
Arctic - 0.85, 0x47ABCB;
Clear - 0.20, 0xFFFFFF; Mojave - 0.85, 0xBFBD9F; Steel - 0.85, 0x666666.
The default is .85.
Implementation
public function get skinBackgroundAlpha():Number
public function set skinBackgroundAlpha(value:Number):void
Related API Elements
skinBackgroundColor | property |
skinBackgroundColor:uint
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
The color for the background of the skin (0xRRGGBB). The skinBackgroundColor
property works only with SWF files that have skins loaded by using the
skin
property and with skins that support setting the color
and alpha. The default is the last value chosen by the
user as the default.
To get the skin colors that come with the ActionScript 2.0 FLVPlayback component,
use the following values for the
skinBackgroundAlpha
and skinBackgroundColor
properties:
Arctic - 0.85, 0x47ABCB;
Clear - 0.20, 0xFFFFFF; Mojave - 0.85, 0xBFBD9F; Steel - 0.85, 0x666666.
The default is 0x47ABCB.
Implementation
public function get skinBackgroundColor():uint
public function set skinBackgroundColor(value:uint):void
Related API Elements
skinFadeTime | property |
skinFadeTime:int
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
The amount of time in milliseconds that it takes for the skin to fade in or fade out when
hiding or showing. Hiding and showing occurs because the skinAutoHide
property is set to true
. Set the skinFadeTime
property to
0 to eliminate the fade effect.
The default value is 500 milliseconds (.5 seconds).
Implementation
public function get skinFadeTime():int
public function set skinFadeTime(value:int):void
skinScaleMaximum | property |
skinScaleMaximum:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.115.0, AIR 1.0 |
This property specifies the largest multiple that FLVPlayback will use to scale up its skin when it enters full screen mode with a Flash Player that supports hardware acceleration. With hardware acceleration, the video and the skin are scaled by the same factor. By default, FLVPlayback renders the video at its native dimensions and allows hardware acceleration to do the rest of the scaling. If, for example, your video has dimensions of 640 x 512 and it goes to full screen size on a monitor with a resolution of 1280 x 1024, the video and the skin will be scaled up to twice their size.
This property enables you to restrict scaling of the skin when hardware acceleration is used, based on the specific content that is being scaled and your aesthetic tastes regarding the appearance of large skins. To limit scaling of the skin to the specified multiplier, FLVPlayback uses a mix of software and hardware scaling for the skin, which can have a negative impact on the performance of video playback and the appearance of the FLV.
For example, if this property was set to 5.0 or greater, going to full screen on a monitor that has a resolution of 1600 x 1200 with a video that has dimensions of 320 x 240 would scale the skin five times. If this property was set to 2.5, the player would render the video (but not the skin) at 640 x 480, twice it's original size, and hardware acceleration would do the remainder of the scaling (640 x 2.5 = 1600 and 480 x 2.5 = 1200).
Setting this property after full screen mode has already been entered has no effect until the next time FLVPlayback enters full screen mode.
If the FLV is large (for example, 640 pixels wide or more, 480 pixels tall or more) you should not set this property to a small value because it could cause noticeable performance problems on large monitors.
The default value is 4.0.
Implementation
public function get skinScaleMaximum():Number
public function set skinScaleMaximum(value:Number):void
Related API Elements
Example ( How to use this example )
skinScaleMaximum
property, click the full screen button on the FLVPlayback skin
while the FLV is playing in the browser.
Note: Test this example in the browser. In the Flash Publish Settings dialog, on the HTML tab, select the template Flash Only - Allow Full Screen. Specify a Flash Player 9.0.115.0 and make sure the Flash and HTML formats are selected on the Formats tab. Then publish and open the resulting HTML file in the browser.
// Requires FLVPlayback component in library // Requires SkinOverPlayFullscreen.swf to be in the same folder as the .fla file. import fl.video.FLVPlayback; var myFLVPlybk:FLVPlayback = new FLVPlayback(); addChild(myFLVPlybk); myFLVPlybk.skin = "SkinOverPlayFullscreen.swf"; myFLVPlybk.skinScaleMaximum = 2.5; myFLVPlybk.source = "http://helpexamples.com/flash/video/water.flv";
soundTransform | property |
soundTransform:flash.media:SoundTransform
[override] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Provides direct access to the
VideoPlayer.soundTransform
property to expose
more sound control. You need to set this property for changes to take effect,
or you can get the value of this property to get a copy of the current settings.
Implementation
override public function get soundTransform():flash.media:SoundTransform
override public function set soundTransform(value:flash.media:SoundTransform):void
Related API Elements
source | property |
source:String
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A string that specifies the URL of the FLV file to stream and how to stream it. The URL can be an HTTP URL to an FLV file, an RTMP URL to a stream, or an HTTP URL to an XML file.
If you set this property through the Component inspector or the Property inspector, the
FLV file begins loading and playing at the next "enterFrame
" event.
The delay provides time to set the isLive
, autoPlay
,
and cuePoints
properties,
among others, which affect loading. It also allows ActionScript that is placed
on the first frame to affect the FLVPlayback component before it starts playing.
If you set this property through ActionScript, it immediately calls the
VideoPlayer.load()
method when the autoPlay
property is
set to false
or it calls the VideoPlayer.play()
method when
the autoPlay
property is set to true
. The autoPlay
,
totalTime
, and isLive
properties affect how the new FLV file is
loaded, so if you set these properties, you must set them before setting the
source
property.
Set the autoPlay
property to false
to prevent the new
FLV file from playing automatically.
Implementation
public function get source():String
public function set source(value:String):void
Related API Elements
startTabIndex | property |
startTabIndex:int
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Returns the first tabIndex value for the FLVPlayback controls. The value is set after the assignTabIndexes
method is called.
Implementation
public function get startTabIndex():int
Related API Elements
state | property |
state:String
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A string that specifies the state of the component. This property is set by the
load()
, play()
, stop()
, pause()
,
and seek()
methods.
The possible values for the state property are: "buffering"
, "connectionError"
,
"disconnected"
, "loading"
, "paused"
, "playing"
, "rewinding"
, "seeking"
, and
"stopped"
. You can use the FLVPlayback class properties to test for
these states.
Implementation
public function get state():String
Related API Elements
stateResponsive | property |
stateResponsive:Boolean
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A Boolean value that is true
if the state is responsive. If the state is
unresponsive, calls to the play()
, load()
, stop()
, pause()
and seek()
methods are queued and executed later, when the state changes to a
responsive one. Because these calls are queued and executed later,
it is usually not necessary to track the value of the stateResponsive
property. The responsive states are:
stopped
, playing
, paused
, and buffering
.
Implementation
public function get stateResponsive():Boolean
Related API Elements
stopButton | property |
stopped | property |
totalTime | property |
totalTime:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that is the total playing time for the video in seconds.
When streaming from Flash Media Server (FMS) and using the default
NCManager
, this value is determined
automatically by server-side APIs, and that value
overrides anything set through this property or gathered
from metadata. The property is ready for reading when the
stopped
or playing
state is reached after setting the
source
property. This property is meaningless for live streams
from a FMS.
With an HTTP download, the value is determined automatically if the FLV file has metadata embedded; otherwise, set it explicitly or it will be NaN. If you set it explicitly, the metadata value in the stream is ignored.
When you set this property, the value takes effect for the next
FLV file that is loaded by setting the source
property. It has no effect
on an FLV file that has already loaded. Also, this property does not return
the new value passed in until an FLV file is loaded.
Playback still works if this property is never set (either explicitly or automatically), but it can cause problems with seek controls.
Unless set explicitly, the value will be NaN until it is set to a valid value from metadata.
Implementation
public function get totalTime():Number
public function set totalTime(value:Number):void
Related API Elements
visibleVideoPlayerIndex | property |
visibleVideoPlayerIndex:uint
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that you can use to manage multiple FLV file streams.
Sets which video player instance is visible, audible, and
controlled by the skin or playback controls, while the rest
of the video players are hidden and muted. It does
not make the video player the
target for most APIs; use the activeVideoPlayerIndex
property to do that.
Methods and properties that control dimensions interact with this property.
The methods and properties that set the dimensions of the video player
(setScale()
, setSize()
, width
, height
, scaleX
, scaleY
) can be used
for all video players. However, depending on the value of the
scaleMode
property
on those video players, they might have different dimensions. Reading
the dimensions using the width
, height
, scaleX,
and scaleY
properties gives you
the dimensions only of the visible video player. Other video players might have
the same dimensions or might not.
To get the dimensions of various video players when they are
not visible, listen for the layout
event, and store the size
value.
This property does not have any implications for visibility of the
component as a whole, only which video player is visible when the component is visible.
To set visibility for the entire component, use the visible
property.
The default value is 0.
Implementation
public function get visibleVideoPlayerIndex():uint
public function set visibleVideoPlayerIndex(value:uint):void
Related API Elements
volume | property |
volume:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number in the range of 0 to 1 that indicates the volume control setting.
The default value is 1.
Implementation
public function get volume():Number
public function set volume(value:Number):void
Related API Elements
volumeBar | property |
volumeBarInterval | property |
volumeBarInterval:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that specifies, in milliseconds, how often to check the volume bar handle location when scrubbing.
The default value is 250.
Implementation
public function get volumeBarInterval():Number
public function set volumeBarInterval(value:Number):void
volumeBarScrubTolerance | property |
volumeBarScrubTolerance:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that specifies how far a user can move the volume bar handle before
an update occurs. The value is expressed as a percentage from 1 to 100. Set to 0
to indicate no scrub tolerance. Always update the volume on the
volumeBarInterval
property regardless of how far the user moved the handle.
The default value is 0.
Implementation
public function get volumeBarScrubTolerance():Number
public function set volumeBarScrubTolerance(value:Number):void
width | property |
width:Number
[override] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that specifies the width of the FLVPlayback instance on the Stage.
This property affects only the width of the FLVPlayback instance and does
not include the width of a skin SWF file that might be loaded. Use the
FLVPlayback width
property and not the DisplayObject.width
property because
the width
property might give a different value if a skin SWF file is loaded.
Setting the width property also sets the registrationWidth
property
to the same value.
Implementation
override public function get width():Number
override public function set width(value:Number):void
Related API Elements
x | property |
x:Number
[override] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that specifies the horizontal position (in pixels) of the video player.
Setting the x
property also affects the registrationX
property.
When either the x
or registrationX
property is set,
the second property is changed to maintain its offset from the
first. For example, if x
= 10 and registrationX
= 20, setting
x
= 110 also sets registrationX
= 120.
Implementation
override public function get x():Number
override public function set x(value:Number):void
y | property |
y:Number
[override] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A number that specifies the vertical position (in pixels) of the video player.
Setting the y
property also affects the registrationY
property.
When either the y
or registrationY
property is set,
the second property is changed to maintain its offset from the
first. For example, if y
= 10 and registrationY
= 20, setting
y
= 110 also sets registrationY
= 120.
Implementation
override public function get y():Number
override public function set y(value:Number):void
FLVPlayback | () | Constructor |
public function FLVPlayback()
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Creates a new FLVPlayback instance. After creating the FLVPlayback
instance, call the addChild()
or addChildAt()
method to place the instance on the Stage or another display object container.
Related API Elements
addASCuePoint | () | method |
public function addASCuePoint(timeOrCuePoint:*, name:String = null, parameters:Object = null):Object
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Adds an ActionScript cue point and has the same effect as adding an ActionScript cue point using the Cue Points dialog box, except that it occurs when an application executes rather than during application development.
Cue point information is wiped out when the source
property is
set. To set cue point information for the next FLV file to be loaded,
set the source
property first.
It is valid to add multiple ActionScript cue points with the same name and time.
When you remove ActionScript cue points with the removeASCuePoint()
method, all cue points with the same name and time are removed.
Parameters
timeOrCuePoint:* — An object having name and
time properties, which describe the cue point. It also might have a
parameters property that holds name/value pairs. It may have the
type property set
to "actionscript ". If the type is missing or set to something else, it is set
automatically. If the object does not conform to these conventions, the
method throws a VideoError error.
The | |
name:String (default = null ) — A string that specifies the name of the cue point if you submit
a time parameter instead of the cue point.
| |
parameters:Object (default = null ) — Optional parameters for the cue point if the
timeOrCuePoint parameter is a number.
|
Object — The cue point object that was added. Edits to this
object affect the cuePoint event dispatch.
|
Throws
VideoError — Parameters are invalid.
|
Related API Elements
assignTabIndexes | () | method |
public function assignTabIndexes(startTabIndex:int):int
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Assigns a tabIndex value to each of the FLVPlayback controls by sorting them by position horizontally left to right. This method returns the next available tabIndex value.
If you call assignTabIndexes
with NaN
as the startTabbing
parameter and the FLVPlayback component instance has a tabIndex
value assigned to it,
the method will use the FLVPlayback component instance's assigned tabIndex
as the startTabIndex
.
When an FLVPlayback skin is specified, you should wait a frame after the FLVPlayback.SKIN_LOADED
event
to allow the skin controls to initialize before calling this method.
When using custom controls, wait a frame after the FLVPlayback.READY
event to allow
the custom controls to initialize befor calling this method.
Parameters
startTabIndex:int — The starting tabIndex for FLVPlayback controls.
|
int — The next available tabIndex after the FLVPlayback controls.
|
Related API Elements
bringVideoPlayerToFront | () | method |
public function bringVideoPlayerToFront(index:uint):void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Brings a video player to the front of the stack of video players.
Useful for custom transitions between video players. The default stack
order is the same as it is for the activeVideoPlayerIndex
property:
0 is on the bottom, 1 is above it, 2 is above 1, and so on. However, when you
call the bringVideoPlayerToFront()
method this order may change. For
example, 2 may be the bottom.
Parameters
index:uint — A number that is the index of the video player to move to the front.
|
Related API Elements
closeVideoPlayer | () | method |
public function closeVideoPlayer(index:uint):void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Closes NetStream and deletes the video player specified by the index
parameter. If the closed video player is the active or visible video player,
the FLVPlayback instance sets the active and or visible video player to the
default player (with index 0). You cannot close the default player, and
trying to do so causes the component to throw an error.
Parameters
index:uint — A number that is the index of the video player to close.
|
Related API Elements
enterFullScreenDisplayState | () | method |
public function enterFullScreenDisplayState():void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | AIR 1.0, Flash Player 9.0.115.0 |
Sets the FLVPlayback video player to full screen. Calling this method has the same effect as clicking the full screen toggle button that's built into some FLVPlayback skins and is also available as the FullScreenButton in the Video section of the Components panel.
This method supports hardware acceleration in Flash Player for full screen video. If the user's version of Flash Player does not support hardware acceleration, this method still works and full screen video will work the same as it does without hardware acceleration support.
Because a call to this method sets the displayState
property of the
Stage class to StageDisplayState.FULL_SCREEN
, it has
the same restrictions as the displayState
property.
If, instead of calling this method, you implement full screen mode by directly setting the
stage.displayState
property to StageDisplayState.FULL_SCREEN
,
hardware acceleration is not used.
Full screen support occurs only if the fullScreenTakeOver
property is set to true, which it is by default.
Related API Elements
Example ( How to use this example )
enterFullScreenDisplayState()
method from an event handler that is triggered by the user clicking a standard Flash
button (myButton
).
Note: Test this example in the browser. In the Flash Publish Settings dialog, on the HTML tab, select the template Flash Only - Allow Full Screen. Specify a Flash Player 9.0.115.0 and make sure the Flash and HTML formats are selected on the Formats tab. Then publish and open the resulting HTML file in the browser.
// Requires Button and FLVPlayback components in library. import fl.video.FLVPlayback; import fl.controls.Button; var myButton:Button = new Button(); var myFLVPlybk:FLVPlayback = new FLVPlayback(); myButton.move(100, 240); myButton.label = "Full Screen"; addChild(myButton); addChild(myFLVPlybk); myFLVPlybk.source = "http://helpexamples.com/flash/video/water.flv"; myButton.addEventListener(MouseEvent.CLICK, handleClick); function handleClick(e:MouseEvent):void { myFLVPlybk.enterFullScreenDisplayState(); }
findCuePoint | () | method |
public function findCuePoint(timeNameOrCuePoint:*, type:String):Object
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Finds the cue point of the type specified by the type
parameter and
having the time, name, or combination of time and name that you specify
through the parameters.
If you do not provide a value for either the time or name of the
cue point, or if the time is null
, undefined, or less than zero
and the name is null
or undefined,
the method throws VideoError error 1002.
The method includes disabled cue points in the search.
Use the isFLVCuePointEnabled()
method to determine
whether a cue point is disabled.
Parameters
timeNameOrCuePoint:* — This can be a number specifying a time, a string
specifying a name, or an object with time and/or name properties.
If this parameter is a string, the method searches for the
first cue point with this name and returns If this parameter is a number, the method searches for and returns the first
cue point with this time. If there are multiple cue points with the same time,
which is possible only with ActionScript cue points, the cue point with the
first name alphabetically is returned. Returns If this parameter is an object, the method searches for the cue point object
that contains the specified If time is | |
type:String (default = NaN ) — A string that specifies the type of cue point for which to
search. The possible values for this parameter are "actionscript" , "all" , "event" ,
"flv" , or "navigation" . You can specify these values using the following class
properties: CuePointType.ACTIONSCRIPT , CuePointType.ALL , CuePointType.EVENT ,
CuePointType.FLV , and CuePointType.NAVIGATION . If this parameter
is not specified, the default is "all" , which means the method
searches all cue point types. Optional.
|
Object — An object that is a copy of the found cue point object
with the following additional properties:
Returns |
Throws
VideoError — If the time property is null ,
undefined or less than 0 and the name property is null
or undefined.
|
Related API Elements
findNearestCuePoint | () | method |
public function findNearestCuePoint(timeNameOrCuePoint:*, type:String):Object
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Finds a cue point of the specified type that matches or is
earlier than the time that you specify. If you specify both
a time and a name and no earlier cue point matches that name,
it finds a cue point that matches the name that you specify.
Otherwise, it returns null
.
Default is to search all cue points.
The method includes disabled cue points in the search. Use
the isFLVCuePointEnabled()
method to determine whether
a cue point is disabled.
Parameters
timeNameOrCuePoint:* — This can be a number specifying a time, a string
specifying a name, or an object with time and/or name properties.
If this parameter is a string, the method searches for the
first cue point with this name and returns If this parameter is a number then the closest cue point to this time that is
an exact match or earlier will be returned. If there is no cue point at or earlier
than that time, then the first cue point is returned.
If there are multiple cue points with the same time,
which is possible only with ActionScript cue points, the cue point with the
first name alphabetically is returned. Returns If this parameter is an object, the method searches for the cue point object
that contains the specified If time is | |
type:String (default = NaN ) — A string that specifies the type of cue point for which to
search. The possible values for this parameter are "actionscript" , "all" , "event" ,
"flv" , or "navigation" . You can specify these values using the following class
properties: CuePointType.ACTIONSCRIPT , CuePointType.ALL , CuePointType.EVENT ,
CuePointType.FLV , and CuePointType.NAVIGATION . If this parameter
is not specified, the default is "all" , which means the method
searches all cue point types. Optional.
|
Object — An object that is a copy of the found cue point
object with the following additional properties:
Returns |
Throws
VideoError — If the time is null , undefined, or less
than 0 and the name is null or undefined.
|
Related API Elements
findNextCuePointWithName | () | method |
public function findNextCuePointWithName(cuePoint:Object):Object
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Finds the next cue point in my_cuePoint.array
that has the same name as
my_cuePoint.name
. The my_cuePoint
object must be a
cue point object that has been returned by the findCuePoint()
method, the
findNearestCuePoint()
method, or a previous call to this method.
This method uses the array
parameter that these methods add to the
CuePoint object.
The method includes disabled cue points in the search. Use the
isFLVCuePointEnabled()
method to determine whether a cue point is disabled.
Parameters
cuePoint:Object — A cue point object that has been returned by either the
findCuePoint() method,
the findNearestCuePoint() method, or a previous call to this method.
|
Object — If there are no more cue points in the array with a matching
name, then null ; otherwise, returns a
copy of the cue point object with additional properties:
|
Throws
VideoError — When argument is invalid.
|
getVideoPlayer | () | method |
public function getVideoPlayer(index:Number):VideoPlayer
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Gets the video player specified by the index
parameter.
When possible, it is best to access the VideoPlayer methods and properties
using FLVPlayback methods and properties. Each DisplayObject.name
property
is its index converted to a string.
Parameters
index:Number — A number that is the index of the video player to get.
|
VideoPlayer — A VideoPlayer object.
|
isFLVCuePointEnabled | () | method |
public function isFLVCuePointEnabled(timeNameOrCuePoint:*):Boolean
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Returns false
if the FLV file embedded cue point is disabled.
You can disable cue points either by setting the cuePoints
property through
the Flash Video Cue Points dialog box or by calling the
setFLVCuePointEnabled()
method.
The return value from this function is meaningful only when the
metadataLoaded
property is true
, the
metadata
property is not null
, or after a
metadataReceived
event. When metadataLoaded
is
false
, this function always returns true
.
Parameters
timeNameOrCuePoint:* — If this parameter is a string, returns the name of
the cue point to check; returns false only if all cue points with
this name are disabled.
If this parameter is a number, it is the time of the cue point to check. If this parameter is an object, returns the object with the matching
|
Boolean — Returns false if the FLV file embedded cue point is disabled.
You can disable cue points either by setting the cuePoints property through the
Flash Video Cue Points dialog box or by calling the setFLVCuePointEnabled() method.
The return value from this function is meaningful only when the
|
Related API Elements
load | () | method |
public function load(source:String, totalTime:Number = NaN, isLive:Boolean = false):void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Begins loading the FLV file and provides a shortcut for setting the
autoPlay
property to false
and setting the
source
, totalTime
, and isLive
properties, if given. If the totalTime
and isLive
properties are undefined, they are not set. If the source
property is undefined, null
, or an empty string, this method
does nothing.
Parameters
source:String — A string that specifies the URL of the FLV file to stream
and how to stream it. The URL can be a local path, an HTTP URL to an FLV file,
an RTMP URL to an FLV file stream, or an HTTP URL to an XML file.
| |
totalTime:Number (default = NaN ) — A number that is the total playing time for the video. Optional.
| |
isLive:Boolean (default = false ) — A Boolean value that is true if the video stream is live.
This value is effective only when streaming from Flash Media Server (FMS) or other Flash
Video Streaming Service (FVSS). The value of
this property is ignored for an HTTP download. Optional.
|
Related API Elements
pause | () | method |
public function pause():void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Pauses playing the video stream.
If playback has begun and you want to
return to the state of waiting for enough to download and then automatically
begin playback, call the pause()
method, and then the
playWhenEnoughDownloaded()
method.
play | () | method |
public function play(source:String = null, totalTime:Number = NaN, isLive:Boolean = false):void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Plays the video stream. With no parameters, the method simply takes the FLV file from a paused or stopped state to the playing state.
If parameters are used, the method acts as a shortcut for setting the
autoPlay
property to true
and setting the isLive
,
totalTime
and, source
properties. If the totalTime
and isLive
properties are undefined,
they are not set.
When waiting for enough of a progressive download FLV to load before playing
starts automatically, call the play()
method with no parameters
to force playback to start immediately.
Parameters
source:String (default = null ) — A string that specifies the URL of the FLV file to stream
and how to stream it. The URL can be a local path, an HTTP URL to an FLV file,
an RTMP URL to an FLV file stream, or an HTTP URL to an XML file. It is optional,
but the source property must be set either through the
Component inspector or through ActionScript or this method has no effect.
| |
totalTime:Number (default = NaN ) — A number that is the total playing time for the video. Optional.
| |
isLive:Boolean (default = false ) — A Boolean value that is true if the video stream is live.
This value is effective only when streaming from Flash Media Server (FMS) or other Flash Video Streaming Service (FVSS).
The value of this property is ignored for an HTTP download. Optional.
|
Related API Elements
playWhenEnoughDownloaded | () | method |
public function playWhenEnoughDownloaded():void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Plays the FLV file when enough of it has downloaded. If the FLV file has
downloaded or you are streaming from Flash Media Server (FMS), then calling the
playWhenEnoughDownloaded()
method
is identical to the play()
method with no parameters. Calling this
method does not pause playback, so in many cases, you may want to call the pause()
method
before you call this method.
removeASCuePoint | () | method |
public function removeASCuePoint(timeNameOrCuePoint:*):Object
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Removes an ActionScript cue point from the currently loaded FLV file.
Only the name
and time
properties are used from the
timeNameOrCuePoint
parameter to find the cue point to remove.
If multiple ActionScript cue points match the search criteria, only one is removed.
To remove all, call this function repeatedly in a loop with the same parameters
until it returns null
.
Cue point information is wiped out when the source
property is
set, so to set cue point information for the next FLV file to be loaded, set the
source
property first.
Parameters
timeNameOrCuePoint:* — A cue point string that contains the time and
name properties for the cue point to remove. The method removes the
first cue point with this name.
Or, if this parameter is a number, the method removes the
first cue point with this time.
If this parameter is an object, the method removes the cue point with both the
time and name properties.
|
Object — The cue point object that was removed. If there is no
matching cue point, the method returns null .
|
Related API Elements
seek | () | method |
public function seek(time:Number):void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Seeks to a given time in the file, specified in seconds, with a precision of three decimal places (milliseconds).
For several reasons, the playheadTime
property might not
have the expected value immediately after you call one of
the seek methods or set playheadTime
to cause seeking.
First, for a progressive download, you can seek only to a
keyframe, so a seek takes you to the time of the first
keyframe after the specified time. (When streaming, a seek
always goes to the precise specified time even if the source
FLV file doesn't have a keyframe there.) Second, seeking
is asynchronous, so if you call a seek method or set the
playheadTime
property, playheadTime
does not update immediately.
To obtain the time after the seek is complete, listen for the
seek event, which does not start until the playheadTime
property
has updated.
Parameters
time:Number — A number that specifies the time, in seconds, at which to
place the playhead.
|
Throws
VideoError — If time is < 0.
|
Related API Elements
seekPercent | () | method |
public function seekPercent(percent:Number):void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Seeks to a percentage of the file and places the playhead there. The percentage is a number between 0 and 100.
For several reasons, the playheadTime
property might not have
the expected value immediately after you call one of the seek
methods or set playheadTime
to cause seeking. First, for
a progressive download, you can seek only to a keyframe,
so a seek takes you to the time of the first keyframe after
the specified time. (When streaming, a seek always goes
to the precise specified time even if the source FLV file
doesn't have a keyframe there.) Second, seeking is asynchronous,
so if you call a seek method or set the playheadTime
property,
playheadTime
does not update immediately. To obtain the time
after the seek is complete, listen for the seek event, which
does not start until the playheadTime
property has updated.
Parameters
percent:Number — number that specifies a percentage of the length of the FLV file
at which to place the playhead.
|
Throws
VideoError — If percent is invalid or if totalTime is
undefined, null or <= 0.
|
Related API Elements
seekSeconds | () | method |
public function seekSeconds(time:Number):void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Seeks to a given time in the file, specified in seconds, with a precision up to
three decimal places (milliseconds). This method performs the same operation as the
seek()
method; it is provided for symmetry with the seekPercent()
method.
For several reasons, the playheadTime
property might not have the expected
value immediately after you call one of the seek methods or set playheadTime
to cause seeking. First, for a progressive download, you can seek only to a
keyframe, so a seek takes you to the time of the first keyframe after the
specified time. (When streaming, a seek always goes to the precise specified
time even if the source FLV file doesn't have a keyframe there.) Second,
seeking is asynchronous, so if you call a seek method or set the playheadTime
property, playheadTime
does not update immediately. To obtain the time after
the seek is complete, listen for the seek event, which does not start until
the playheadTime
property has updated.
Parameters
time:Number — A number that specifies the time, in seconds,
of the total play time at which to place the playhead.
|
Related API Elements
seekToNavCuePoint | () | method |
public function seekToNavCuePoint(timeNameOrCuePoint:*):void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Seeks to a navigation cue point that matches the specified time, name, or time and name.
The time is the starting time, in seconds,
from which to look for the next navigation cue point. The default is the
current playheadTime
property. If you specify a time, the method seeks
to a cue point that matches that time or is later. If time is undefined,
null
, or less than 0, the method starts its
search at time 0.
The name is the cue point to seek. The method seeks to the first enabled navigation cue point with this name.
The time and name together are a navigation cue point with the specified name at or after the specified time.
For several reasons, the playheadTime
property might not have the
expected value immediately after you call one of the seek methods or
set playheadTime
to cause seeking. First, for a progressive
download, you can seek only to a keyframe, so a seek takes you
to the time of the first keyframe after the specified time.
(When streaming, a seek always goes to the precise specified
time even if the source FLV file doesn't have a keyframe there.)
Second, seeking is asynchronous, so if you call a seek method or
set the playheadTime
property, playheadTime
does not
update immediately. To obtain the time after the seek is complete,
listen for the seek
event,
which does not start until the playheadTime
property has updated.
Parameters
timeNameOrCuePoint:* — A number that is the time, a string that is the name, or
both a number and string that are the specified name and time.
|
Throws
VideoError — No cue point matching the criteria is found.
|
Related API Elements
seekToNextNavCuePoint | () | method |
public function seekToNextNavCuePoint(time:Number = NaN):void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Seeks to the next navigation cue point, based on the current value of the
playheadTime
property. The method skips navigation cue points that have
been disabled and goes to the end of the FLV file if there is no other cue point.
For several reasons, the playheadTime
property might not have the
expected value immediately after you call one of the seek methods or
set playheadTime
to cause seeking. First, for a progressive
download, you can seek only to a keyframe, so a seek takes you
to the time of the first keyframe after the specified time.
(When streaming, a seek always goes to the precise specified
time even if the source FLV file doesn't have a keyframe there.)
Second, seeking is asynchronous, so if you call a seek method or
set the playheadTime
property, playheadTime
does not
update immediately. To obtain the time after the seek is complete,
listen for the seek
event,
which does not start until the playheadTime
property has updated.
Parameters
time:Number (default = NaN ) — A number that is the starting time, in seconds, from which to look for
the next navigation cue point. The default is the current playheadTime
property. Optional.
|
Related API Elements
seekToPrevNavCuePoint | () | method |
public function seekToPrevNavCuePoint(time:Number = NaN):void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Seeks to the previous navigation cue point, based on the current
value of the playheadTime
property. It goes to the beginning if
there is no previous cue point. The method skips navigation cue
points that have been disabled.
For several reasons, the playheadTime
property might not have the
expected value immediately after you call one of the seek methods or
set playheadTime
to cause seeking. First, for a progressive
download, you can seek only to a keyframe, so a seek takes you
to the time of the first keyframe after the specified time.
(When streaming, a seek always goes to the precise specified
time even if the source FLV file doesn't have a keyframe there.)
Second, seeking is asynchronous, so if you call a seek method or
set the playheadTime
property, playheadTime
does not
update immediately. To obtain the time after the seek is complete,
listen for the seek
event,
which does not start until the playheadTime
property has updated.
Parameters
time:Number (default = NaN ) — A number that is the starting time in seconds from which to
look for the previous navigation cue point. The default is the current
value of the playheadTime property. Optional.
|
Related API Elements
setFLVCuePointEnabled | () | method |
public function setFLVCuePointEnabled(enabled:Boolean, timeNameOrCuePoint:*):Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Enables or disables one or more FLV file cue points. Disabled cue points
are disabled for purposes of being dispatched as events and for navigating
to them with the seekToPrevNavCuePoint()
,
seekToNextNavCuePoint()
, and seekToNavCuePoint()
methods.
Cue point information is deleted when you set the source
property to a different FLV file, so set the source
property before
setting cue point information for the next FLV file to be loaded.
Changes caused by this method are not reflected by calls to the
isFLVCuePointEnabled()
method until metadata is loaded.
Parameters
enabled:Boolean — A Boolean value that specifies whether to enable (true )
or disable (false ) an FLV file cue point.
| |
timeNameOrCuePoint:* — If this parameter is a string, the method enables or disables
the cue point with this name. If this parameter is a number, the method enables or
disables the cue point with this time. If this parameter is an object, the method
enables or disables the cue point with both the name and time
properties.
|
Number — If metadataLoaded is true , the method returns the
number of cue points whose enabled state was changed. If
metadataLoaded is false , the method returns -1 because the
component cannot yet determine which, if any, cue points to set.
When the metadata arrives, however, the component sets the specified cue points appropriately.
|
Related API Elements
setScale | () | method |
public function setScale(scaleX:Number, scaleY:Number):void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Sets the scaleX
and scaleY
properties simultaneously.
Because setting either one, individually, can cause automatic
resizing, setting them simultaneously can be more efficient
than setting the scaleX
and scaleY
properties individually.
If scaleMode
property is set to
VideoScaleMode.MAINTAIN_ASPECT_RATIO
or VideoScaleMode.NO_SCALE
, then
calling this causes an immediate autolayout
event.
Parameters
scaleX:Number — A number representing the horizontal scale.
| |
scaleY:Number — A number representing the vertical scale.
|
Related API Elements
setSize | () | method |
public function setSize(width:Number, height:Number):void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Sets width and height simultaneously. Because setting either one,
individually, can cause automatic resizing, setting them simultaneously
is more efficient than setting the width
and height
properties individually.
If scaleMode
property is set to
VideoScaleMode.MAINTAIN_ASPECT_RATIO
or VideoScaleMode.NO_SCALE
, then
calling this causes an immediate autolayout
event.
Parameters
width:Number — A number that specifies the width of the video player.
| |
height:Number — A number that specifies the height of the video player.
|
Related API Elements
stop | () | method |
public function stop():void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Stops the video from playing.
If the autoRewind
property is true
,
the FLV file rewinds to the beginning.
autoLayout | Event |
fl.video.AutoLayoutEvent
property AutoLayoutEvent.type =
fl.video.AutoLayoutEvent.AUTO_LAYOUT
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when the video player is resized or laid out automatically. A video player is
laid out automatically based on the values of the align
and scaleMode
properties
when a new FLV file is loaded or when one of those two properties is changed.
The autoLayout
event is of type AutoLayoutEvent and has the constant
AutoLayoutEvent.AUTO_LAYOUT
.
After an attempt to automatically lay out a video player, the event object is dispatched even if the dimensions were not changed.
A LayoutEvent
is also dispatched in these three scenarios:
- If the video player that laid itself out is visible.
- If there are two video players of different sizes or positions and the
visibleVideoPlayerIndex
property is switched from one video player to another. - If methods or properties that change the size of the video player such
as
setSize()
,setScale()
,width
,height
,scaleX
,scaleY
,registrationWidth
andregistrationHeight
, are called.
If multiple video player instances are in use, this event may not apply to the visible video player.
Defines the value of thetype
property of an
autoLayout
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
oldBounds | The values of the x , y ,
width , and height properties of the target before the autoLayout event occurs. |
oldRegistrationBounds | The values of the registrationX ,
registrationY , registrationWidth , and
registrationHeight properties of the target before the autoLayout event occurs. |
vp | The index of the VideoPlayer object. |
Related API Elements
autoRewound | Event |
fl.video.VideoEvent
property VideoEvent.type =
fl.video.VideoEvent.AUTO_REWOUND
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when the playhead is moved to the start of the video player because the
autoRewind
property is set to true
. When the
autoRewound
event is dispatched, the rewind
event is also
dispatched.
The autoRewound
event is of type VideoEvent and has the constant
VideoEvent.AUTO_REWOUND
.
type
property of an autoRewound
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
state | A string identifying the constant from the VideoState class that describes the playback state of the component. |
playheadTime | A number that is the current playhead time or position. |
vp | The index of the VideoPlayer object. |
Related API Elements
bufferingStateEntered | Event |
fl.video.VideoEvent
property VideoEvent.type =
fl.video.VideoEvent.BUFFERING_STATE_ENTERED
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when the FLVPlayback instance enters the buffering state.
The FLVPlayback instance typically enters this state immediately after a call to the
play()
method or when the Play
control is clicked,
before entering the playing state.
The stateChange
event is also dispatched.
The bufferingStateEntered
event is of type VideoEvent and has the constant
VideoEvent.BUFFERING_STATE_ENTERED
.
type
property of a bufferingStateEntered
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
state | A string identifying the constant from the VideoState class that describes the playback state of the component. |
playheadTime | A number that is the current playhead time or position. |
vp | The index of the VideoPlayer object. |
Related API Elements
close | Event |
fl.video.VideoEvent
property VideoEvent.type =
fl.video.VideoEvent.CLOSE
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when the event object closes the NetConnection,
by timing out or through a call to the closeVideoPlayer()
method or when
you call the load()
or play()
methods or set the
source
property and cause the RTMP connection
to close as a result. The FLVPlayback instance dispatches this event only when
streaming from Flash Media Server (FMS) or other Flash Video Streaming Service (FVSS).
The close
event is of type VideoEvent and has the constant
VideoEvent.CLOSE
.
type
property of a close
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
state | A string identifying the constant from the VideoState class that describes the playback state of the component. |
playheadTime | A number that is the current playhead time or position. |
vp | The index of the VideoPlayer object. |
Related API Elements
complete | Event |
fl.video.VideoEvent
property VideoEvent.type =
fl.video.VideoEvent.COMPLETE
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when playing completes because the player reached the end of the FLV file.
The component does not dispatch the event if you call the stop()
or
pause()
methods
or click the corresponding controls.
When the application uses progressive download, it does not set the
totalTime
property explicitly, and it downloads an FLV file that does not specify the duration
in the metadata. The video player sets the totalTime
property to an approximate
total value before it dispatches this event.
The video player also dispatches the stateChange
and stoppedStateEntered
events.
The complete
event is of type VideoEvent and has the constant
VideoEvent.COMPLETE
.
type
property of a complete
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
state | A string identifying the constant from the VideoState class that describes the playback state of the component. |
playheadTime | A number that is the current playhead time or position. |
vp | The index of the VideoPlayer object. |
Related API Elements
cuePoint | Event |
fl.video.MetadataEvent
property MetadataEvent.type =
fl.video.MetadataEvent.CUE_POINT
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when a cue point is reached. The event object has an
info
property that contains the info object received by the
NetStream.onCuePoint
event callback for FLV file cue points.
For ActionScript cue points, it contains the object that was passed
into the ActionScript cue point methods or properties.
The cuePoint
event is of type MetadataEvent and has the constant
MetadataEvent.CUE_POINT
.
type
property of a cuePoint
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
info | The object with properties describing the cue point. |
vp | The index of the VideoPlayer object. |
Related API Elements
fastForward | Event |
fl.video.VideoEvent
property VideoEvent.type =
fl.video.VideoEvent.FAST_FORWARD
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when the location of the playhead moves forward by a call to
the seek()
method or by clicking the ForwardButton control.
The FLVPlayback instance also dispatches playheadUpdate
event.
The fastForward
event is of type VideoEvent and has the constant
VideoEvent.FAST_FORWARD
.
type
property of a fastForward
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
state | A string identifying the constant from the VideoState class that describes the playback state of the component. |
playheadTime | A number that is the current playhead time or position. |
vp | The index of the VideoPlayer object. |
Related API Elements
layout | Event |
fl.video.LayoutEvent
property LayoutEvent.type =
fl.video.LayoutEvent.LAYOUT
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when the video player is resized or laid out. Here are two layout scenarios:
- If the video player is laid out by either using the
autoLayout
event or calling thesetScale()
orsetSize()
methods or changing thewidth
,height
,scaleX
, andscaleY
properties. - If there are two video players of different sizes and the
visibleVideoPlayerIndex
property is switched from one video player to another.
The layout
event is of type LayoutEvent and has the constant
LayoutEvent.LAYOUT
.
type
property of a layout
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
oldBounds | The values of the x , y ,
width , and height properties of the target before the layout event occurs. |
oldRegistrationBounds | The values of the registrationX ,
registrationY , registrationWidth , and
registrationHeight properties of the target before the layout event occurs. |
Related API Elements
metadataReceived | Event |
fl.video.MetadataEvent
property MetadataEvent.type =
fl.video.MetadataEvent.METADATA_RECEIVED
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched the first time the FLV file's metadata is reached.
The event object has an info
property that contains the
info object received by the NetStream.onMetaData
event callback.
The metadataReceived
event is of type MetadataEvent and has the constant
MetadataEvent.METADATA_RECEIVED
.
type
property of a metadataReceived
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
info | The object with properties describing the FLV file. |
vp | The index of the VideoPlayer object. |
Related API Elements
pausedStateEntered | Event |
fl.video.VideoEvent
property VideoEvent.type =
fl.video.VideoEvent.PAUSED_STATE_ENTERED
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when the player enters the paused state. This happens when you call
the pause()
method or click the corresponding control and it also happens
in some cases when the FLV file is loaded and the autoPlay
property
is false
(the state may be stopped instead).
The stateChange
event is also dispatched.
The pausedStateEntered
event is of type VideoEvent and has the constant
VideoEvent.PAUSED_STATE_ENTERED
.
type
property of a pausedStateEntered
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
state | A string identifying the constant from the VideoState class that describes the playback state of the component. |
playheadTime | A number that is the current playhead time or position. |
vp | The index of the VideoPlayer object. |
Related API Elements
playheadUpdate | Event |
fl.video.VideoEvent
property VideoEvent.type =
fl.video.VideoEvent.PLAYHEAD_UPDATE
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched while the FLV file is playing at the frequency specified by the
playheadUpdateInterval
property or when rewinding starts.
The component does not dispatch this event when the video player is paused or stopped
unless a seek occurs.
The playheadUpdate
event is of type VideoEvent and has the constant
VideoEvent.PLAYHEAD_UPDATE
.
type
property of a playheadUpdate
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
state | A string identifying the constant from the VideoState class that describes the playback state of the component. |
playheadTime | A number that is the current playhead time or position. |
vp | The index of the VideoPlayer object. |
Related API Elements
playingStateEntered | Event |
fl.video.VideoEvent
property VideoEvent.type =
fl.video.VideoEvent.PLAYING_STATE_ENTERED
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when the playing state is entered. This may not occur immediately
after the play()
method is called or the corresponding control is clicked;
often the buffering state is entered first, and then the playing state.
The FLVPlayback instance also dispatches the stateChange
event.
The playingStateEntered
event is of type VideoEvent and has the constant
VideoEvent.PLAYING_STATE_ENTERED
.
type
property of a playingStateEntered
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
state | A string identifying the constant from the VideoState class that describes the playback state of the component. |
playheadTime | A number that is the current playhead time or position. |
vp | The index of the VideoPlayer object. |
Related API Elements
progress | Event |
fl.video.VideoProgressEvent
property VideoProgressEvent.type =
fl.video.VideoProgressEvent.PROGRESS
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Indicates progress made in number of bytes downloaded. Dispatched at the frequency
specified by the progressInterval
property, starting
when the load begins and ending when all bytes are loaded or there is a network error.
The default is every .25 seconds starting when load is called and ending
when all bytes are loaded or if there is a network error. Use this event to check
bytes loaded or number of bytes in the buffer.
Dispatched only for a progressive HTTP download. Indicates progress in number of
downloaded bytes. The event object has the bytesLoaded
and bytesTotal
properties, which are the same as the FLVPlayback properties of the same names.
The progress
event is of type VideoProgressEvent and has the constant
VideoProgressEvent.PROGRESS
.
type
property of a progress
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
bytesLoaded | The number of items or bytes loaded at the time the listener processes the event. |
bytesTotal | The total number of items or bytes that will be loaded if the loading process succeeds. |
vp | The index of the VideoPlayer object. |
Related API Elements
ready | Event |
fl.video.VideoEvent
property VideoEvent.type =
fl.video.VideoEvent.READY
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when an FLV file is loaded and ready to display. It starts the first
time you enter a responsive state after you load a new FLV file with the play()
or load()
method. It starts only once for each FLV file that is loaded.
The ready
event is of type VideoEvent and has the constant
VideoEvent.READY
.
type
property of a ready
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
state | A string identifying the constant from the VideoState class that describes the playback state of the component. |
playheadTime | A number that is the current playhead time or position. |
vp | The index of the VideoPlayer object. |
Related API Elements
rewind | Event |
fl.video.VideoEvent
property VideoEvent.type =
fl.video.VideoEvent.REWIND
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when the location of the playhead moves backward by
a call to seek()
or when an autoRewind
call is
completed. When an autoRewind
call is completed, an autoRewound
event is triggered first.
The rewind
event is of type VideoEvent and has the constant
VideoEvent.REWIND
.
type
property of a rewind
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
state | A string identifying the constant from the VideoState class that describes the playback state of the component. |
playheadTime | A number that is the current playhead time or position. |
vp | The index of the VideoPlayer object. |
Related API Elements
scrubFinish | Event |
fl.video.VideoEvent
property VideoEvent.type =
fl.video.VideoEvent.SCRUB_FINISH
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when the user stops scrubbing the FLV file with the seek bar. Scrubbing refers to grabbing the handle of the SeekBar and dragging it in either direction to locate a particular scene in the FLV file. Scrubbing stops when the user releases the handle of the seek bar.
The component also dispatches the stateChange
event with
the state
property, which is either playing, paused,
stopped, or buffering. The state
property is
seeking until the user finishes scrubbing.
The scrubFinish
event is of type VideoEvent and has the constant
VideoEvent.SCRUB_FINISH
.
type
property of a scrubFinish
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
state | A string identifying the constant from the VideoState class that describes the playback state of the component. |
playheadTime | A number that is the current playhead time or position. |
vp | The index of the VideoPlayer object. |
Related API Elements
scrubStart | Event |
fl.video.VideoEvent
property VideoEvent.type =
fl.video.VideoEvent.SCRUB_START
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when the user begins scrubbing the FLV file with the seek bar. Scrubbing refers to grabbing the handle of the SeekBar and dragging it in either direction to locate a particular scene in the FLV file. Scrubbing begins when the user clicks the SeekBar handle and ends when the user releases it.
The component also dispatches the stateChange
event with the
state
property equal to seeking. The state remains seeking until the user
stops scrubbing.
The scrubStart
event is of type VideoEvent and has the constant
VideoEvent.SCRUB_START
.
type
property of a scrubStart
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
state | A string identifying the constant from the VideoState class that describes the playback state of the component. |
playheadTime | A number that is the current playhead time or position. |
vp | The index of the VideoPlayer object. |
Related API Elements
seeked | Event |
fl.video.VideoEvent
property VideoEvent.type =
fl.video.VideoEvent.SEEKED
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when the location of the playhead is changed by a call to
seek()
or by setting the playheadTime
property or
by using the SeekBar control. The
playheadTime
property is the destination time.
The seeked
event is of type VideoEvent and has the constant
VideoEvent.SEEKED
.
The FLVPlayback instance dispatches the rewind
event when the seek
is backward and the fastForward
event when the seek is forward. It also
dispatches the playheadUpdate
event.
For several reasons, the playheadTime
property might not have the
expected value immediately after you call one of the seek methods or set
playheadTime
to cause seeking. First, for a progressive download,
you can seek only to a keyframe, so a seek takes you to the time of the first
keyframe after the specified time. (When streaming, a seek always goes to the precise
specified time even if the source FLV file doesn't have a keyframe there.) Second,
seeking is asynchronous, so if you call a seek method or set the playheadTime
property, playheadTime
does not update immediately. To obtain the time after the
seek is complete, listen for the seek
event, which does not start until the
playheadTime
property has updated.
type
property of a seeked
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
state | A string identifying the constant from the VideoState class that describes the playback state of the component. |
playheadTime | A number that is the current playhead time or position. |
vp | The index of the VideoPlayer object. |
Related API Elements
skinError | Event |
fl.video.SkinErrorEvent
property SkinErrorEvent.type =
fl.video.SkinErrorEvent.SKIN_ERROR
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when an error occurs loading a skin SWF file.
The event has a message property that contains the error message.
If a skin SWF file is set, playback begins when the ready
event
and skinLoaded
(or skinError
) events have both started.
The skinError
event is of type SkinErrorEvent and has the constant
SkinErrorEvent.SKIN_ERROR
.
type
property of a skinError
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
text | The error message. |
Related API Elements
skinLoaded | Event |
fl.video.VideoEvent
property VideoEvent.type =
fl.video.VideoEvent.SKIN_LOADED
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when a skin SWF file is loaded. The component
does not begin playing an FLV file until the ready
event
and skinLoaded
(or skinError
) events have both started.
The skinLoaded
event is of type VideoEvent and has the constant
VideoEvent.SKIN_LOADED
.
type
property of a skinLoaded
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
state | A string identifying the constant from the VideoState class that describes the playback state of the component. |
playheadTime | A number that is the current playhead time or position. |
vp | The index of the VideoPlayer object. |
Related API Elements
soundUpdate | Event |
fl.video.SoundEvent
property SoundEvent.type =
fl.video.SoundEvent.SOUND_UPDATE
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when sound changes by the user either moving the handle of the
volumeBar control or setting the volume
or soundTransform
property.
The soundUpdate
event is of type SoundEvent and has the constant
SoundEvent.SOUND_UPDATE
.
type
property of a soundUpdate event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
soundTransform | Indicates new values for volume and panning. |
Related API Elements
stateChange | Event |
fl.video.VideoEvent
property VideoEvent.type =
fl.video.VideoEvent.STATE_CHANGE
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when the playback state changes. When an autoRewind
call is
completed the stateChange
event is dispatched with the rewinding
state. The stateChange
event does not
start until rewinding has completed.
This event can be used to track when playback enters or leaves unresponsive
states such as in the middle of connecting, resizing, or rewinding. The
play()
, pause()
, stop()
and seek()
methods queue the requests to be executed when the player enters
a responsive state.
The stateChange
event is of type VideoEvent and has the constant
VideoEvent.STATE_CHANGE
.
type
property of a stateChange
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
state | A string identifying the constant from the VideoState class that describes the playback state of the component. |
playheadTime | A number that is the current playhead time or position. |
vp | The index of the VideoPlayer object. |
Related API Elements
stoppedStateEntered | Event |
fl.video.VideoEvent
property VideoEvent.type =
fl.video.VideoEvent.STOPPED_STATE_ENTERED
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Dispatched when entering the stopped state.
This happens when you call the stop()
method or click the
stopButton
control. It also happens, in some cases, if the
autoPlay
property is
false
(the state might become paused
instead) when the FLV file is loaded. The FLVPlayback instance also dispatches this
event when the playhead stops at the end of the FLV file
because it has reached the end of the timeline.
The FLVPlayback instance also dispatches the stateChange
event.
The stoppedStateEntered
event is of type VideoEvent and has the constant
VideoEvent.STOPPED_STATE_ENTERED
.
type
property of a stoppedStateEntered
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
state | A string identifying the constant from the VideoState class that describes the playback state of the component. |
playheadTime | A number that is the current playhead time or position. |
vp | The index of the VideoPlayer object. |
Related API Elements
SHORT_VERSION | Constant |
public static const SHORT_VERSION:String = "2.1"
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.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 code trace into the FLA file:
FLVPlayback.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.11.
Related API Elements
VERSION | Constant |
public static const VERSION:String = "2.1.0.23"
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.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 code trace into the FLA file:
FLVPlayback.VERSION
The VERSION
variable includes
the major and minor version numbers as well as the revision and build numbers,
for example, 2.0.0.11. The SHORT_VERSION
variable includes only the major
and minor version numbers, for example, 2.0.
Related API Elements
To run the example, follow these steps:
- Place the FLVPlayback component on the Stage at 0,0 and provide the instance name
player
. - Replace
videoPath
with an absolute or relative path to an FLV file. - Save this code as FLVPlaybackExample.as in the same directory as your FLA file.
- Set the Document class in the FLA file to FLVPlaybackExample.
package { import fl.video.FLVPlayback; import flash.display.Sprite; public class FLVPlaybackExample extends Sprite { private var videoPath:String = "http://www.helpexamples.com/flash/video/caption_video.flv"; public function FLVPlaybackExample() { player.source = videoPath; player.skinBackgroundColor = 0x666666; player.skinBackgroundAlpha = 0.5; } } }
Thu Dec 6 2018, 01:12 PM -08:00