| 套件 | org.osmf.traits |
| 類別 | public class AudioTrait |
| 繼承 | AudioTrait MediaTraitBase EventDispatcher Object |
| 語言版本: | ActionScript 3.0 |
| 產品版本: | OSMF 1.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
Use the MediaElement.hasTrait(MediaTraitType.AUDIO_TRAIT) method to query
whether a media element has this trait.
If hasTrait(MediaTraitType.AUDIO_TRAIT) returns true,
use the MediaElement.getTrait(MediaTraitType.AUDIO_TRAIT) method
to get an object of this type.
相關 API 元素
| 屬性 | 定義自 | ||
|---|---|---|---|
![]() | constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | |
| muted : Boolean
Indicates whether the AudioTrait is muted or sounding. | AudioTrait | ||
| pan : Number
The left-to-right panning of the sound. | AudioTrait | ||
![]() | traitType : String [唯讀]
The MediaTraitType for this trait. | MediaTraitBase | |
| volume : Number
The volume, ranging from 0 (silent) to 1 (full volume). | AudioTrait | ||
| 方法 | 定義自 | ||
|---|---|---|---|
Constructor. | AudioTrait | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。 | EventDispatcher | |
![]() |
會將事件傳送到事件流程。 | EventDispatcher | |
![]() |
Disposes of any resources used by this trait. | MediaTraitBase | |
![]() |
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。 | EventDispatcher | |
![]() |
指出物件是否有已定義的指定屬性。 | Object | |
![]() |
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | |
![]() |
指出指定的屬性是否存在,以及是否可列舉。 | Object | |
![]() |
會從 EventDispatcher 物件移除偵聽程式。 | EventDispatcher | |
![]() |
為迴圈作業設定動態屬性的可用性。 | Object | |
![]() |
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | |
![]() |
會傳回指定之物件的字串形式。 | Object | |
![]() |
會傳回指定之物件的基本值。 | Object | |
![]() |
檢查此 EventDispatcher 物件是否已註冊事件偵聽程式,或者此物件的任何祖系已為特定事件類型註冊事件偵聽程式。 | EventDispatcher | |
| 方法 | 定義自 | ||
|---|---|---|---|
Called just after the muted property has been toggled. | AudioTrait | ||
Called immediately before the muted value is toggled. | AudioTrait | ||
Called just after the pan value has changed. | AudioTrait | ||
Called immediately before the pan value is changed. | AudioTrait | ||
Called just after the volume value has changed. | AudioTrait | ||
Called immediately before the volume value is changed. | AudioTrait | ||
| 事件 | 摘要 | 定義自 | ||
|---|---|---|---|---|
![]() | [廣播事件] 當 Flash Player 或 AIR 應用程式取得作業系統焦點並成為作用中時傳送。 | EventDispatcher | ||
![]() | [廣播事件] 當 Flash Player 或 AIR 應用程式失去作業系統焦點並成為非作用中時傳送。 | EventDispatcher | ||
| Dispatched when the trait's muted property has changed. | AudioTrait | |||
| Dispatched when the trait's pan property has changed. | AudioTrait | |||
| Dispatched when the trait's volume property has changed. | AudioTrait | |||
muted | 屬性 |
muted:Boolean| 語言版本: | ActionScript 3.0 |
| 產品版本: | OSMF 1.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
Indicates whether the AudioTrait is muted or sounding.
Changing the value of the muted property does not affect the
value of the volume property.
The default value is false.
實作
public function get muted():Boolean public function set muted(value:Boolean):void相關 API 元素
pan | 屬性 |
pan:Number| 語言版本: | ActionScript 3.0 |
| 產品版本: | OSMF 1.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
The left-to-right panning of the sound. Ranges from -1 (full pan left) to 1 (full pan right).
Passing a value greater than 1 sets the value to 1. Passing a value less than -1 sets the value to -1.
The default is zero.
實作
public function get pan():Number public function set pan(value:Number):voidvolume | 屬性 |
volume:Number| 語言版本: | ActionScript 3.0 |
| 產品版本: | OSMF 1.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
The volume, ranging from 0 (silent) to 1 (full volume).
Passing a value greater than 1 sets the value to 1. Passing a value less than zero sets the value to zero.
Changing the value of the volume property does not affect the value of the
muted property.
The default is 1.
實作
public function get volume():Number public function set volume(value:Number):void相關 API 元素
AudioTrait | () | 建構函式 |
public function AudioTrait()| 語言版本: | ActionScript 3.0 |
| 產品版本: | OSMF 1.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
Constructor.
mutedChangeEnd | () | 方法 |
protected function mutedChangeEnd():void| 語言版本: | ActionScript 3.0 |
| 產品版本: | OSMF 1.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
Called just after the muted property has been toggled.
Dispatches the change event.
Subclasses that override should call this method to dispatch the mutedChange event.
mutedChangeStart | () | 方法 |
panChangeEnd | () | 方法 |
protected function panChangeEnd():void| 語言版本: | ActionScript 3.0 |
| 產品版本: | OSMF 1.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
Called just after the pan value has changed.
Dispatches the change event.
Subclasses that override should call this method to dispatch the panChange event.
panChangeStart | () | 方法 |
volumeChangeEnd | () | 方法 |
protected function volumeChangeEnd():void| 語言版本: | ActionScript 3.0 |
| 產品版本: | OSMF 1.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
Called just after the volume value has changed.
Dispatches the change event.
Subclasses that override should call this method to dispatch the volumeChange event.
volumeChangeStart | () | 方法 |
mutedChange | 事件 |
org.osmf.events.AudioEvent屬性 AudioEvent.type =
org.osmf.events.AudioEvent.MUTED_CHANGE| 語言版本: | ActionScript 3.0 |
| 產品版本: | OSMF 1.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
Dispatched when the trait's muted property has changed.
panChange | 事件 |
org.osmf.events.AudioEvent屬性 AudioEvent.type =
org.osmf.events.AudioEvent.PAN_CHANGE| 語言版本: | ActionScript 3.0 |
| 產品版本: | OSMF 1.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
Dispatched when the trait's pan property has changed.
volumeChange | 事件 |
org.osmf.events.AudioEvent屬性 AudioEvent.type =
org.osmf.events.AudioEvent.VOLUME_CHANGE| 語言版本: | ActionScript 3.0 |
| 產品版本: | OSMF 1.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
Dispatched when the trait's volume property has changed.
Tue Jun 12 2018, 03:47 PM Z
隱藏繼承公用屬性
顯示繼承公用屬性