Package | com.gestureworks.cml.elements |
Class | public class WAV |
Inheritance | WAV ![]() ![]() |
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 | ||
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 | ||
![]() | autoShuffle : Boolean
autoshuffles
| TouchContainer | |
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 | ||
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 | ||
![]() | childList : ChildList
Returns the object's childList. | TouchContainer | |
![]() | className : String
sets the class name of displayobject
| TouchContainer | |
![]() | cloneExclusions : Vector.<String> [read-only]
Returns a list of properties to exclude when cloning this object
| TouchContainer | |
![]() | cmlIndex : int
Returns the index created by the CML parser. | TouchContainer | |
comment : String [read-only] | WAV | ||
cueStart : Number
Cue start point in milliseconds
| WAV | ||
date : String [read-only] | WAV | ||
![]() | dimensionsTo : Object
Sets the dimensions of TouchContainer to given object
| TouchContainer | |
display : String
Visualization display type, choose waveform or none
| WAV | ||
![]() | dropShadow : Boolean
Sets the drop shadow effect
| TouchContainer | |
duration : Number [read-only]
Total duration
| WAV | ||
fileSize : uint [read-only] | WAV | ||
![]() | group : String | TouchContainer | |
![]() | height : Number [override]
sets the height of the container
| TouchContainer | |
![]() | heightPercent : Number
sets the height of the container
| TouchContainer | |
![]() | id : String
Returns the object's id. | TouchContainer | |
isPlaying : Boolean [read-only]
Sets video playing status
| WAV | ||
![]() | layout : *
specifies the type of layout
| TouchContainer | |
![]() | layoutList : Dictionary | TouchContainer | |
loop : Boolean
Specifies wether the wav file will to loop to the beginning and continue playing upon completion
| WAV | ||
![]() | mouseChildren : Boolean [override]
sets the mousechildren value to true or false. | TouchContainer | |
![]() | paddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area. | TouchContainer | |
![]() | paddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area. | TouchContainer | |
![]() | paddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area. | TouchContainer | |
![]() | paddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area. | TouchContainer | |
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 | ||
playhead : Number [read-only]
Playhead position in ms
| WAV | ||
![]() | position : *
Sets the position
| TouchContainer | |
preload : Boolean
Indicates whether the wav file is preloaded by the cml parser
| WAV | ||
printData : Boolean
print data
| WAV | ||
publisher : String [read-only] | WAV | ||
![]() | relativeX : Boolean
When set true this containers children's x position will be laid out relatively
to each other. | TouchContainer | |
![]() | relativeY : Boolean
When set true this containers children's y position will be laid out relatively
to each other. | TouchContainer | |
sampleRate : uint [read-only] | WAV | ||
![]() | sound : String | TouchContainer | |
src : String
Sets the wav file path
| WAV | ||
![]() | state : Dictionary | TouchContainer | |
![]() | stateId : *
Returns the current state id. | TouchContainer | |
TIME : String = Time [static] | WAV | ||
timer : Timer | WAV | ||
title : String [read-only] | WAV | ||
![]() | toBitmap : Boolean | TouchContainer | |
volume : Number
Sets the volume
| WAV | ||
waveColor : uint
Sets the color of the waveform
| WAV | ||
wavLength : uint [read-only]
length of wav file
| WAV | ||
![]() | width : Number [override]
sets the width of the container
| TouchContainer | |
![]() | widthPercent : Number
sets the width of the container
| TouchContainer | |
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 | ||
![]() | cmlGestureList : Object | TouchContainer | |
_msByteRate : uint = 0
Byte rate in milliseconds
default = 0
| WAV | ||
_stream : FileStream | WAV |
Method | Defined By | ||
---|---|---|---|
WAV()
Constructor
| WAV | ||
![]() | activateTouch():void | TouchContainer | |
![]() | addAllChildren():void
method searches the child and adds to the list
| TouchContainer | |
![]() | addChild(child:DisplayObject):DisplayObject [override]
Adds child to display list and, if not already added, the child list
| TouchContainer | |
![]() | addChildAt(child:DisplayObject, index:int):DisplayObject [override]
Adds child to display list and, if not already added, the child list
| TouchContainer | |
![]() | applyLayout(value:* = null):void
Apply the containers layout
| TouchContainer | |
![]() | childToList(id:String, child:*):void
child appended to the childlist
| TouchContainer | |
![]() | clone():*
Clone method
| TouchContainer | |
close():void
closes wav file
| WAV | ||
dispose():void [override]
Destructor
| WAV | ||
![]() | getElementById(id:String):*
Searches CML childList by id. | TouchContainer | |
![]() | getElementsByClassName(className:String):Array
Searches the CML childList by className. | TouchContainer | |
![]() | getElementsByTagName(tagName:Class):Array
Searches the CML childList by tagName as Class. | TouchContainer | |
init():void [override]
Initialisation method
| WAV | ||
![]() | loadState(sId:* = null, recursion:Boolean = false):void
Loads state by index number. | TouchContainer | |
![]() | makeGestureList(value:XMLList):Object
Creates gestureList object from XML
| TouchContainer | |
open(file:String):void
Sets the src property from the argument and loads the wav file
| WAV | ||
![]() | parseCML(cml:XMLList):XMLList
Parse cml for local layouts. | TouchContainer | |
pause():void
pauses the wav file
| WAV | ||
play():void
plays wav file
| WAV | ||
![]() | postparseCML(cml:XMLList):void
Abstract method allows the setting of a postparse CML routine. | TouchContainer | |
![]() | querySelector(selector:String):*
Searches the CML childList by selector. | TouchContainer | |
![]() | querySelectorAll(selector:*):Array
Search the CML childList by selector. | TouchContainer | |
![]() | removeChild(child:DisplayObject):DisplayObject [override]
Removes child from display list and, if not already removed, the child list
| TouchContainer | |
![]() | removeChildAt(index:int):DisplayObject [override]
Removes child from display list and, if not already removed, the child list
| TouchContainer | |
![]() | removeChildren(beginIndex:int = 0, endIndex:int = 2147483647):void [override]
Removes children from display list and, if not already removed, the child list
| TouchContainer | |
![]() | saveState(sId:* = null, recursion:Boolean = false):void
Save state by index number. | TouchContainer | |
![]() | searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists. | TouchContainer | |
seek(pos:Number):void
seek method
| WAV | ||
![]() | setDimensionsToChild():void
method sets the dimensions of each child
| TouchContainer | |
stop():void
stops wav file
| WAV | ||
![]() | tweenState(sId:* = null, tweenTime:Number = 1):void
Tween state by stateIndex from current to given state index. | TouchContainer | |
![]() | updatePadding():void
Updates child padding within this container
| TouchContainer | |
![]() | updatePercentDim():void
Updates child percent dimensions within this container
| TouchContainer | |
![]() | updateProperties(state:* = 0):void
Updates properties from state. | TouchContainer | |
![]() | updateRelativePos():void
Updates child relative positions within this container
| TouchContainer |
_audioStreamAvailable | property |
protected var _audioStreamAvailable:Number = 0
Number of audio data bytes available in file stream
The default value is 0
.
_audioStreamEnd | property |
protected var _audioStreamEnd:Number = 0
Byte position in file stream which indicates the beginning of audio data default = 0
_audioStreamPosition | property |
protected var _audioStreamPosition:Number = 0
Current audio data byte position in the file stream
The default value is 0
.
_audioStreamSize | property |
protected var _audioStreamSize:Number = 0
Total size in bytes of audio data in file stream default = 0
_audioStreamStart | property |
protected var _audioStreamStart:Number = 0
Byte position in file stream which indicates the beginning of audio data
The default value is 0
.
_msByteRate | property |
protected var _msByteRate:uint = 0
Byte 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:Boolean
Indicates whether the wav file is autoloaded
public function get autoLoad():Boolean
public function set autoLoad(value:Boolean):void
autoplay | property |
autoplay:Boolean
Indicates 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:Number
Sets the background alpha
The default value is 1.0
.
public function get backgroundAlpha():Number
public function set backgroundAlpha(value:Number):void
backgroundColor | property |
backgroundColor:uint
Sets 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:uint
Audio 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:Number
Cue 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:String
Visualization 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
loop | property |
loop:Boolean
Specifies 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:Number
Sets 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
playhead | property |
playhead:Number
[read-only] Playhead position in ms
The default value is 0
.
public function get playhead():Number
preload | property |
preload:Boolean
Indicates 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:Boolean
print 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:String
Sets 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:Number
Sets the volume
The default value is 1
.
public function get volume():Number
public function set volume(value:Number):void
waveColor | property |
waveColor:uint
Sets the color of the waveform
The default value is 0xFFFFFF
.
public function get waveColor():uint
public function set waveColor(value:uint):void
wavLength | property |
wavLength:uint
[read-only] length of wav file
public function get wavLength():uint
xmp | property |
xmp:XMPMeta
[read-only] public function get xmp():XMPMeta
WAV | () | Constructor |
public function WAV()
Constructor
close | () | method |
public function close():void
closes wav file
dispose | () | method |
override public function dispose():void
Destructor
init | () | method |
override public function init():void
Initialisation method
open | () | method |
public function open(file:String):void
Sets 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():void
pauses the wav file
play | () | method |
public function play():void
plays wav file
seek | () | method |
public function seek(pos:Number):void
seek method
Parameters
pos:Number |
stop | () | method |
public function stop():void
stops wav file