套件 | org.osmf.traits |
類別 | public class SeekTrait |
繼承 | SeekTrait MediaTraitBase EventDispatcher Object |
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Use the MediaElement.hasTrait(MediaTraitType.SEEK)
method to query
whether a media element has a trait of this type.
If hasTrait(MediaTraitType.SEEK)
returns true
,
use the MediaElement.getTrait(MediaTraitType.SEEK)
method
to get an object that is guaranteed to be of this type.
相關 API 元素
屬性 | 定義自 | ||
---|---|---|---|
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
seeking : Boolean [唯讀]
Indicates whether the media is currently seeking. | SeekTrait | ||
traitType : String [唯讀]
The MediaTraitType for this trait. | MediaTraitBase |
屬性 | 定義自 | ||
---|---|---|---|
timeTrait : org.osmf.traits:TimeTrait
The TimeTrait used by this SeekTrait. | SeekTrait |
方法 | 定義自 | ||
---|---|---|---|
SeekTrait(timeTrait:org.osmf.traits:TimeTrait)
Constructor. | SeekTrait | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。 | EventDispatcher | ||
Indicates whether the media is capable of seeking to the
specified time. | SeekTrait | ||
會將事件傳送到事件流程。 | EventDispatcher | ||
Disposes of any resources used by this trait. | MediaTraitBase | ||
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。 | EventDispatcher | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
會從 EventDispatcher 物件移除偵聽程式。 | EventDispatcher | ||
Instructs the media to jump to the specified time. | SeekTrait | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object | ||
檢查此 EventDispatcher 物件是否已註冊事件偵聽程式,或者此物件的任何祖系已為特定事件類型註冊事件偵聽程式。 | EventDispatcher |
方法 | 定義自 | ||
---|---|---|---|
Called just after the seeking property has changed. | SeekTrait | ||
Called immediately before the seeking property is changed. | SeekTrait | ||
Must be called by the implementing media on completing a seek. | SeekTrait |
事件 | 摘要 | 定義自 | ||
---|---|---|---|---|
[廣播事件] 當 Flash Player 或 AIR 應用程式取得作業系統焦點並成為作用中時傳送。 | EventDispatcher | |||
[廣播事件] 當 Flash Player 或 AIR 應用程式失去作業系統焦點並成為非作用中時傳送。 | EventDispatcher | |||
Dispatched when this trait begins or ends a seek operation. | SeekTrait |
seeking | 屬性 |
timeTrait | 屬性 |
timeTrait:org.osmf.traits:TimeTrait
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
The TimeTrait used by this SeekTrait.
實作
protected function get timeTrait():org.osmf.traits:TimeTrait
protected function set timeTrait(value:org.osmf.traits:TimeTrait):void
SeekTrait | () | 建構函式 |
public function SeekTrait(timeTrait:org.osmf.traits:TimeTrait)
Constructor.
參數timeTrait:org.osmf.traits:TimeTrait |
canSeekTo | () | 方法 |
public function canSeekTo(time:Number):Boolean
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Indicates whether the media is capable of seeking to the specified time.
參數
time:Number — Time to seek to in seconds.
|
Boolean — Returns true if the media can seek to the specified time.
|
seek | () | 方法 |
public final function seek(time:Number):void
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Instructs the media to jump to the specified time
.
If a seek is attempted, dispatches a seekingChange event.
If time
is non numerical or negative, does not attempt to seek.
參數
time:Number — Time to seek to in seconds.
|
seekingChangeEnd | () | 方法 |
protected function seekingChangeEnd(time:Number):void
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Called just after the seeking
property has changed.
Dispatches the change event.
Subclasses that override should call this method to dispatch the change event.
參數
time:Number — New time value representing the time that the playhead seeked to.
|
seekingChangeStart | () | 方法 |
protected function seekingChangeStart(newSeeking:Boolean, time:Number):void
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Called immediately before the seeking
property is changed.
Subclasses can override this method to communicate the change to the media.
參數
newSeeking:Boolean — New time value representing the time that the playhead seeks to.
| |
time:Number |
setSeeking | () | 方法 |
protected final function setSeeking(value:Boolean, time:Number):void
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Must be called by the implementing media on completing a seek.
Calls the seekingChangeStart()
and seekingChangeEnd()
methods.
參數
value:Boolean — New seeking value.
| |
time:Number — Position in seconds that the playhead was ultimately
moved to.
|
seekingChange | 事件 |
org.osmf.events.SeekEvent
屬性 SeekEvent.type =
org.osmf.events.SeekEvent.SEEKING_CHANGE
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Dispatched when this trait begins or ends a seek operation.
The SeekEvent.SEEKING_CHANGE constant defines the value of the type property of the event object for a seekingChange event.Tue Jun 12 2018, 03:47 PM Z