| Package | com.gestureworks.cml.element |
| Class | public class WAV |
| Inheritance | WAV ElementFactory flash.display.Sprite |
To use the WavElement, it absolutely MUST be compiled in an AIR project.
var wavElement:WavElement = new WavElement();
wavElement.open("FDR-Infamy.wav");
wavElement.autoplay = true;
wavElement.display = "waveform";
wavElement.volume = 0.5;
addChild(wavElement);
wavElement.init();
| Property | Defined By | ||
|---|---|---|---|
| album : String [read-only] | WAV | ||
![]() | alpha : Number [override] [write-only]
sets the alpha for display objects
| ElementFactory | |
| artist : String [read-only] | WAV | ||
| autoLoad : Boolean Deprecated: Please Use preload
Indicates whether the wav file is autoloaded
| WAV | ||
| autoplay : Boolean
Indicates whether the wav file plays upon load
| WAV | ||
| averageGain : Array [read-only] | WAV | ||
| backgroundAlpha : Number
Sets the background alpha
| WAV | ||
| backgroundColor : uint
Sets the background color
| WAV | ||
| bitDepth : uint [read-only]
depth of wav file
| WAV | ||
| blockAlign : uint [read-only] | WAV | ||
![]() | blur : Boolean
Sets the drop shadow effect
| ElementFactory | |
![]() | bottom : Number
sets the bottom value
| ElementFactory | |
| bufferSize : uint
Audio buffer size
| WAV | ||
| byteRate : uint [read-only]
Audio byte rate (bytes per second)
| WAV | ||
| channels : uint [read-only]
Number of audio channels
| WAV | ||
![]() | class_ : String
Object's css class;
| ElementFactory | |
![]() | className : String
sets the class name of displayobject
| ElementFactory | |
![]() | cmlIndex : int
sets the cml index
| ElementFactory | |
| comment : String [read-only] | WAV | ||
| cueStart : Number
Cue start point in milliseconds
| WAV | ||
| date : String [read-only] | WAV | ||
![]() | debugStyle : *
sets the debug style
| ElementFactory | |
| display : String
Visualization display type, choose waveform or none
| WAV | ||
![]() | displayEvents : String
Use for dispatch completes. | ElementFactory | |
![]() | dropShadow : Boolean
Sets the drop shadow effect
| ElementFactory | |
| duration : Number [read-only]
Total duration
| WAV | ||
| fileSize : uint [read-only] | WAV | ||
![]() | height : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | heightPercent : String
sets the height percent of display object
| ElementFactory | |
![]() | horizontalCenter : Number
sets the horizontal center of display object
| ElementFactory | |
![]() | id : String
sets the id of child
| ElementFactory | |
![]() | index : int
sets the index of display object
| ElementFactory | |
| isPlaying : Boolean [read-only]
Sets video playing status
| WAV | ||
![]() | left : Number
sets left value
| ElementFactory | |
| length : uint [read-only]
length of wav file
| WAV | ||
| loop : Boolean
Specifies wether the wav file will to loop to the beginning and continue playing upon completion
| WAV | ||
| pan : Number
Sets the audio pannning ( -1 = left, 0 = center, 1 = right )
| WAV | ||
| paused : Boolean [read-only]
specifies whether the wav file is paused or not
| WAV | ||
| percentLoaded : Number [read-only]
Percent of file loaded
| WAV | ||
| position : Number [read-only]
Playhead position in ms
| WAV | ||
| preload : Boolean
Indicates whether the wav file is preloaded by the cml parser
| WAV | ||
| printData : Boolean
print data
| WAV | ||
![]() | propertyStates : Array Deprecated: Please Use state | ElementFactory | |
| publisher : String [read-only] | WAV | ||
![]() | right : Number
sets the right value
| ElementFactory | |
| sampleRate : uint [read-only] | WAV | ||
![]() | scale : Number
Sets both the x and y scale values
| ElementFactory | |
![]() | scaleX : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | scaleY : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
| src : String
Sets the wav file path
| WAV | ||
![]() | state : Array
property states array
| ElementFactory | |
| TIME : String = Time [static] | WAV | ||
| timer : Timer | WAV | ||
| title : String [read-only] | WAV | ||
![]() | top : Number
sets top value
| ElementFactory | |
![]() | verticalCenter : Number
sets the vertical center of display object
| ElementFactory | |
| volume : Number
Sets the volume
| WAV | ||
| waveColor : uint
Sets the color of the waveform
| WAV | ||
![]() | width : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | widthPercent : String
sets the percent of width of display object
| ElementFactory | |
| xmp : XMPMeta [read-only] | WAV | ||
| Property | Defined By | ||
|---|---|---|---|
| _audioStreamAvailable : Number = 0
Number of audio data bytes available in file stream
| WAV | ||
| _audioStreamEnd : Number = 0
Byte position in file stream which indicates the beginning of audio data
default = 0
| WAV | ||
| _audioStreamPosition : Number = 0
Current audio data byte position in the file stream
| WAV | ||
| _audioStreamSize : Number = 0
Total size in bytes of audio data in file stream
default = 0
| WAV | ||
| _audioStreamStart : Number = 0
Byte position in file stream which indicates the beginning of audio data
| WAV | ||
| _msByteRate : uint = 0
Byte rate in milliseconds
default = 0
| WAV | ||
| _stream : FileStream | WAV | ||
| Method | Defined By | ||
|---|---|---|---|
WAV()
Constructor
| WAV | ||
![]() | clone():*
Returns clone of self
| ElementFactory | |
close():void
closes wav file
| WAV | ||
displayComplete():void [override]
CML callback Initialisation
| WAV | ||
dispose():void [override]
Dispose methods and nullify attributes
| WAV | ||
init():void [override]
Initialisation method
| WAV | ||
open(file:String):void
Sets the src property from the argument and loads the wav file
| WAV | ||
![]() | parseCML(cml:XMLList):XMLList
parses cml file
| ElementFactory | |
pause():void
pauses the wav file
| WAV | ||
play():void
plays wav file
| WAV | ||
![]() | postparseCML(cml:XMLList):void
post parses the cml file
| ElementFactory | |
seek(pos:Number):void
seek method
| WAV | ||
stop():void
stops wav file
| WAV | ||
![]() | updateProperties(state:Number = 0):void
this method updates the properties
| ElementFactory | |
| _audioStreamAvailable | property |
protected var _audioStreamAvailable:Number = 0Number of audio data bytes available in file stream
The default value is 0.
| _audioStreamEnd | property |
protected var _audioStreamEnd:Number = 0Byte position in file stream which indicates the beginning of audio data default = 0
| _audioStreamPosition | property |
protected var _audioStreamPosition:Number = 0Current audio data byte position in the file stream
The default value is 0.
| _audioStreamSize | property |
protected var _audioStreamSize:Number = 0Total size in bytes of audio data in file stream default = 0
| _audioStreamStart | property |
protected var _audioStreamStart:Number = 0Byte position in file stream which indicates the beginning of audio data
The default value is 0.
| _msByteRate | property |
protected var _msByteRate:uint = 0Byte rate in milliseconds default = 0
| _stream | property |
protected var _stream:FileStream| album | property |
album:String [read-only] public function get album():String| artist | property |
artist:String [read-only] public function get artist():String| autoLoad | property |
autoLoad:BooleanIndicates whether the wav file is autoloaded
public function get autoLoad():Boolean public function set autoLoad(value:Boolean):void| autoplay | property |
autoplay:BooleanIndicates whether the wav file plays upon load
The default value is true.
public function get autoplay():Boolean public function set autoplay(value:Boolean):void| averageGain | property |
averageGain:Array [read-only] public function get averageGain():Array| backgroundAlpha | property |
backgroundAlpha:NumberSets the background alpha
The default value is 1.0.
public function get backgroundAlpha():Number public function set backgroundAlpha(value:Number):void| backgroundColor | property |
backgroundColor:uintSets the background color
The default value is 0x333333.
public function get backgroundColor():uint public function set backgroundColor(value:uint):void| bitDepth | property |
bitDepth:uint [read-only] depth of wav file
public function get bitDepth():uint| blockAlign | property |
blockAlign:uint [read-only] public function get blockAlign():uint| bufferSize | property |
bufferSize:uintAudio buffer size
The default value is 2048.
public function get bufferSize():uint public function set bufferSize(value:uint):void| byteRate | property |
byteRate:uint [read-only] Audio byte rate (bytes per second)
The default value is 0.
public function get byteRate():uint| channels | property |
channels:uint [read-only] Number of audio channels
The default value is 0.
public function get channels():uint| comment | property |
comment:String [read-only] public function get comment():String| cueStart | property |
cueStart:NumberCue start point in milliseconds
The default value is 0.
public function get cueStart():Number public function set cueStart(value:Number):void| date | property |
date:String [read-only] public function get date():String| display | property |
display:StringVisualization display type, choose waveform or none
The default value is waveform.
public function get display():String public function set display(value:String):void| duration | property |
duration:Number [read-only] Total duration
The default value is 0.
public function get duration():Number| fileSize | property |
fileSize:uint [read-only] public function get fileSize():uint| isPlaying | property |
isPlaying:Boolean [read-only] Sets video playing status
The default value is false.
public function get isPlaying():Boolean| length | property |
length:uint [read-only] length of wav file
public function get length():uint| loop | property |
loop:BooleanSpecifies wether the wav file will to loop to the beginning and continue playing upon completion
The default value is false.
public function get loop():Boolean public function set loop(value:Boolean):void| pan | property |
pan:NumberSets the audio pannning ( -1 = left, 0 = center, 1 = right )
The default value is 0.
public function get pan():Number public function set pan(value:Number):void| paused | property |
paused:Boolean [read-only] specifies whether the wav file is paused or not
The default value is false.
public function get paused():Boolean| percentLoaded | property |
percentLoaded:Number [read-only] Percent of file loaded
The default value is 0.
public function get percentLoaded():Number| position | property |
position:Number [read-only] Playhead position in ms
The default value is 0.
public function get position():Number| preload | property |
preload:BooleanIndicates whether the wav file is preloaded by the cml parser
The default value is true.
public function get preload():Boolean public function set preload(value:Boolean):void| printData | property |
printData:Booleanprint data
public function get printData():Boolean public function set printData(value:Boolean):void| publisher | property |
publisher:String [read-only] public function get publisher():String| sampleRate | property |
sampleRate:uint [read-only] public function get sampleRate():uint| src | property |
src:StringSets the wav file path
The default value is .
public function get src():String public function set src(value:String):void| TIME | property |
public static var TIME:String = Time| timer | property |
public var timer:Timer| title | property |
title:String [read-only] public function get title():String| volume | property |
volume:NumberSets the volume
The default value is 1.
public function get volume():Number public function set volume(value:Number):void| waveColor | property |
waveColor:uintSets the color of the waveform
The default value is 0xFFFFFF.
public function get waveColor():uint public function set waveColor(value:uint):void| xmp | property |
xmp:XMPMeta [read-only] public function get xmp():XMPMeta| WAV | () | Constructor |
public function WAV()Constructor
| close | () | method |
public function close():voidcloses wav file
| displayComplete | () | method |
override public function displayComplete():voidCML callback Initialisation
| dispose | () | method |
override public function dispose():voidDispose methods and nullify attributes
| init | () | method |
override public function init():voidInitialisation method
| open | () | method |
public function open(file:String):voidSets the src property from the argument and loads the wav file
Parameters
file:String — Full path and file name of wav file
|
| pause | () | method |
public function pause():voidpauses the wav file
| play | () | method |
public function play():voidplays wav file
| seek | () | method |
public function seek(pos:Number):voidseek method
Parameters
pos:Number |
| stop | () | method |
public function stop():voidstops wav file