Package | org.osmf.traits |
Class | public class AudioTrait |
Inheritance | AudioTrait MediaTraitBase EventDispatcher Object |
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | 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.
Related API Elements
Property | Defined By | ||
---|---|---|---|
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
muted : Boolean
Indicates whether the AudioTrait is muted or sounding. | AudioTrait | ||
pan : Number
The left-to-right panning of the sound. | AudioTrait | ||
prototype : Object [static]
A reference to the prototype object of a class or function object. | Object | ||
traitType : String [read-only]
The MediaTraitType for this trait. | MediaTraitBase | ||
volume : Number
The volume, ranging from 0 (silent) to 1 (full volume). | AudioTrait |
Method | Defined By | ||
---|---|---|---|
Constructor. | AudioTrait | ||
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 | ||
Dispatches an event into the event flow. | EventDispatcher | ||
Disposes of any resources used by this trait. | MediaTraitBase | ||
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 | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Removes a listener from the EventDispatcher object. | EventDispatcher | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
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 |
Method | Defined By | ||
---|---|---|---|
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 |
Event | Summary | Defined By | ||
---|---|---|---|---|
[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher | |||
[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | 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 | property |
muted:Boolean
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | 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
.
Implementation
public function get muted():Boolean
public function set muted(value:Boolean):void
Related API Elements
pan | property |
pan:Number
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | 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.
Implementation
public function get pan():Number
public function set pan(value:Number):void
volume | property |
volume:Number
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | 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.
Implementation
public function get volume():Number
public function set volume(value:Number):void
Related API Elements
AudioTrait | () | Constructor |
public function AudioTrait()
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Constructor.
mutedChangeEnd | () | method |
protected function mutedChangeEnd():void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | 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 | () | method |
protected function mutedChangeStart(newMuted:Boolean):void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Called immediately before the muted
value is toggled.
Subclasses can override this method to communicate the change to the media.
Parameters
newMuted:Boolean — New muted value.
|
panChangeEnd | () | method |
protected function panChangeEnd():void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | 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 | () | method |
protected function panChangeStart(newPan:Number):void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Called immediately before the pan
value is changed.
Subclasses can override this method to communicate the change to the media.
Parameters
newPan:Number — New pan value.
|
volumeChangeEnd | () | method |
protected function volumeChangeEnd():void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | 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 | () | method |
protected function volumeChangeStart(newVolume:Number):void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Called immediately before the volume
value is changed.
Subclasses can override this method to communicate the change to the media.
Parameters
newVolume:Number — New volume value.
|
mutedChange | Event |
org.osmf.events.AudioEvent
property AudioEvent.type =
org.osmf.events.AudioEvent.MUTED_CHANGE
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Dispatched when the trait's muted
property has changed.
panChange | Event |
org.osmf.events.AudioEvent
property AudioEvent.type =
org.osmf.events.AudioEvent.PAN_CHANGE
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Dispatched when the trait's pan
property has changed.
volumeChange | Event |
org.osmf.events.AudioEvent
property AudioEvent.type =
org.osmf.events.AudioEvent.VOLUME_CHANGE
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Dispatched when the trait's volume
property has changed.
Mon Nov 28 2011, 06:48 AM -08:00