FLVPlayback Event 汇总

土人老周 分类, 2 个评论 ,阅读数: 3

为了方便对flv视频播放的监听,将所有的flv的监听事件列了出来。其实在帮助中有,只是还没习惯帮助中的查找方式。

帮助中的位置是: ActionScript 3.0 / ActionScript 3.0 Language and Components Reference / All Classes / FLVPlayback class / Events

请注意后面的 Defined By 类型,有分别针对播放控制、视觉效果、事件触发等。

举例:
下面的代码检测myvideo的flv实例是否播放完,如果完成则输出“media is Finished”,通常我们只需要修改触发事件complete和flv实例名称即可。

//ActionScript 2.0 代码如下:
var myListener = new Object();
myListener.complete = function(eventObject) {
	trace("media is Finished");
};
myvideo.addEventListener("complete",myListener);

//ActionScript 3.0 代码如下:
function myListener(event:complete):void {
	trace("media is Finished");
}
myvideo.addEventListener("complete",myListener);
Event Summary Defined By
Dispatched when Flash Player 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 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 cue point is reached. FLVPlayback
Dispatched when Flash Player loses operating 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
Dispatched when the playhead is entering a new 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
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 the pointing device button over an InteractiveObject instance in the Flash Player window. 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 in the Flash Player window. InteractiveObject
Dispatched when a user releases the pointing device button over an InteractiveObject instance in the Flash Player window. InteractiveObject
Dispatched when a mouse wheel is spun over an InteractiveObject instance in the Flash Player window. 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 an FLV file is loaded and ready to display. FLVPlayback
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
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 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 an error occurs loading a skin SWF file. FLVPlayback
Dispatched when a skin SWF file is loaded. FLVPlayback
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
留言互动
  1. 梦开始不甜

    var videoListener = new Object();
    videoListener.scrubFinish = function(eventObject) {

    play_btn._y = 155;

    };
    Player.addEventListener("scrubFinish",videoListener);

    这样写为什么停止的时候没反应呢?

  2. @梦开始不甜

    被监听的对象是否已正确命名呢? 还有Player是否是保留关键字?