fl.video

# VideoEvent - AS3 Flash

Package | fl.video
Class | public class VideoEvent
Inheritance | VideoEvent Event Object
Implements | IVPEvent

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Flash® Player dispatches a VideoEvent object when the user plays a video.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | bubbles : Boolean [read-only] Indicates whether an event is a bubbling event. | Event
|  | cancelable : Boolean [read-only] Indicates whether the behavior associated with the event can be prevented. | Event
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | currentTarget : Object [read-only] The object that is actively processing the Event object with an event listener. | Event
|  | eventPhase : uint [read-only] The current phase in the event flow. | Event
|  | playheadTime : Number A number that is the current playhead time or position, measured in seconds, which can be a fractional value. | VideoEvent
|  | state : String A string identifying the constant from the VideoState class that describes the playback state of the component. | VideoEvent
|  | target : Object [read-only] The event target. | Event
|  | type : String [read-only] The type of event. | Event
|  | vp : uint The index of the VideoPlayer object involved in this event. | VideoEvent

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | VideoEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, state:String = null, playheadTime:Number = NaN, vp:uint = 0) Creates an Event object that contains information about video events. | VideoEvent
|  | clone():Event Duplicates an instance of an Event subclass. | Event
|  | formatToString(className:String, ... arguments):String A utility function for implementing the toString() method in custom ActionScript 3.0 Event classes. | Event
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isDefaultPrevented():Boolean Checks whether the preventDefault() method has been called on the event. | Event
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | preventDefault():void Cancels an event's default behavior if that behavior can be canceled. | Event
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | stopImmediatePropagation():void Prevents processing of any event listeners in the current node and any subsequent nodes in the event flow. | Event
|  | stopPropagation():void Prevents processing of any event listeners in nodes subsequent to the current node in the event flow. | Event
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns a string containing all the properties of the Event object. | Event
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Public Constants
Hide Inherited Public Constants
Show Inherited Public Constants

| Constant | Defined By
--- | --- | ---
|  | AUTO_REWOUND : String = "autoRewound" [static] Defines the value of the type property of an autoRewound event object. | VideoEvent
|  | BUFFERING_STATE_ENTERED : String = "bufferingStateEntered" [static] Defines the value of the type property of a bufferingStateEntered event object. | VideoEvent
|  | CLOSE : String = "close" [static] Defines the value of the type property of a close event object. | VideoEvent
|  | COMPLETE : String = "complete" [static] Defines the value of the type property of a complete event object. | VideoEvent
|  | FAST_FORWARD : String = "fastForward" [static] Defines the value of the type property of a fastForward event object. | VideoEvent
|  | PAUSED_STATE_ENTERED : String = "pausedStateEntered" [static] Defines the value of the type property of a pausedStateEntered event object. | VideoEvent
|  | PLAYHEAD_UPDATE : String = "playheadUpdate" [static] Defines the value of the type property of a playheadUpdate event object. | VideoEvent
|  | PLAYING_STATE_ENTERED : String = "playingStateEntered" [static] Defines the value of the type property of a playingStateEntered event object. | VideoEvent
|  | READY : String = "ready" [static] Defines the value of the type property of a ready event object. | VideoEvent
|  | REWIND : String = "rewind" [static] Defines the value of the type property of a rewind event object. | VideoEvent
|  | SCRUB_FINISH : String = "scrubFinish" [static] Defines the value of the type property of a scrubFinish event object. | VideoEvent
|  | SCRUB_START : String = "scrubStart" [static] Defines the value of the type property of a scrubStart event object. | VideoEvent
|  | SEEKED : String = "seeked" [static] Defines the value of the type property of a seeked event object. | VideoEvent
|  | SKIN_LOADED : String = "skinLoaded" [static] Defines the value of the type property of a skinLoaded event object. | VideoEvent
|  | STATE_CHANGE : String = "stateChange" [static] Defines the value of the type property of a stateChange event object. | VideoEvent
|  | STOPPED_STATE_ENTERED : String = "stoppedStateEntered" [static] Defines the value of the type property of a stoppedStateEntered event object. | VideoEvent

Property Detail

### 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

FLVPlayback.playheadTime
FLVPlayback.seek()
VideoPlayer.playheadTime
VideoPlayer.seek()

### state

property

`state:String`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

A string identifying the constant from the VideoState class that describes the playback 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 properties of the FLVPlayback class to test for these states.

Implementation
`public function get state():String`
`public function set state(value:String):void`

Related API Elements

VideoState.DISCONNECTED
VideoState.STOPPED
VideoState.PLAYING
VideoState.PAUSED
VideoState.BUFFERING
VideoState.LOADING
VideoState.CONNECTION_ERROR
VideoState.REWINDING
VideoState.SEEKING

### vp

property

`vp:uint`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

The index of the VideoPlayer object involved in this event.

Implementation
`public function get vp():uint`
`public function set vp(value:uint):void`
Constructor Detail

### VideoEvent

()
Constructor

`public function VideoEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, state:String = null, playheadTime:Number = NaN, vp:uint = 0)`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Creates an Event object that contains information about video events. Event objects are passed as parameters to event listeners.

Parameters

| `type:String` — The type of the event. Event listeners can access this information through the inherited `type` property. Possible values are `VideoEvent.AUTO_REWOUND`, `VideoEvent.BUFFERING_STATE_ENTERED`, `VideoEvent.CLOSE`, `VideoEvent.COMPLETE`, `VideoEvent.FAST_FORWARD`, `VideoEvent.PAUSED_STATE_ENTERED`, `VideoEvent.PLAYHEAD_UPDATE`, `VideoEvent.PLAYING_STATE_ENTERED`, `VideoEvent.READY`, `VideoEvent.REWIND`, `VideoEvent.SCRUB_FINISH`, `VideoEvent.SCRUB_START`, `VideoEvent.SEEKED`, `VideoEvent.SKIN_LOADED`, `VideoEvent.STATE_CHANGE`, `VideoEvent.STOPPED_STATE_ENTERED`, and `VideoEvent.VOLUME_UPDATE`.
| `bubbles:Boolean` (default = `false`)`` — Determines whether the Event object participates in the bubbling stage of the event flow. Event listeners can access this information through the inherited `bubbles` property.
| `cancelable:Boolean` (default = `false`)`` — Determines whether the Event object can be canceled. Event listeners can access this information through the inherited `cancelable` property.
| `state:String` (default = `null`)`` — A string identifying the constant from the VideoState class that describes the playback state of the component.
| `playheadTime:Number` (default = `NaN`)`` — A number that is the current playhead time or position.
| `vp:uint` (default = `0`)`` — Determines the index of the VideoPlayer object.

Related API Elements

VideoState
Constant Detail

### AUTO_REWOUND

Constant

`public static const AUTO_REWOUND:String = "autoRewound"`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Defines the value of the `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

VideoState

### BUFFERING_STATE_ENTERED

Constant

`public static const BUFFERING_STATE_ENTERED:String = "bufferingStateEntered"`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Defines the value of the `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

VideoState

### CLOSE

Constant

`public static const CLOSE:String = "close"`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Defines the value of the `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

VideoState

### COMPLETE

Constant

`public static const COMPLETE:String = "complete"`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Defines the value of the `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

VideoState

### FAST_FORWARD

Constant

`public static const FAST_FORWARD:String = "fastForward"`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Defines the value of the `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

VideoState

### PAUSED_STATE_ENTERED

Constant

`public static const PAUSED_STATE_ENTERED:String = "pausedStateEntered"`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Defines the value of the `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

VideoState

### PLAYHEAD_UPDATE

Constant

`public static const PLAYHEAD_UPDATE:String = "playheadUpdate"`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Defines the value of the `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

VideoState

### PLAYING_STATE_ENTERED

Constant

`public static const PLAYING_STATE_ENTERED:String = "playingStateEntered"`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Defines the value of the `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

VideoState

### READY

Constant

`public static const READY:String = "ready"`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Defines the value of the `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

VideoState

### REWIND

Constant

`public static const REWIND:String = "rewind"`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Defines the value of the `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

VideoState

### SCRUB_FINISH

Constant

`public static const SCRUB_FINISH:String = "scrubFinish"`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Defines the value of the `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

VideoState

### SCRUB_START

Constant

`public static const SCRUB_START:String = "scrubStart"`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Defines the value of the `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

VideoState

### SEEKED

Constant

`public static const SEEKED:String = "seeked"`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Defines the value of the `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

VideoState

### SKIN_LOADED

Constant

`public static const SKIN_LOADED:String = "skinLoaded"`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Defines the value of the `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

VideoState

### STATE_CHANGE

Constant

`public static const STATE_CHANGE:String = "stateChange"`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Defines the value of the `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

VideoState

### STOPPED_STATE_ENTERED

Constant

`public static const STOPPED_STATE_ENTERED:String = "stoppedStateEntered"`

Language Version: | ActionScript 3.0

Product Version: | Flash CS3

Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0

Defines the value of the `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

VideoState

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00