Package | com.gestureworks.cml.elements |
Class | public class MP3 |
Inheritance | MP3 ![]() ![]() |
var mp3Element:MP3 = new MP3(); mp3Element.src = "RuthCalledShot_vbr.mp3"; mp3Element.display = "waveform"; mp3Element.backgroundAlpha = 0.5; mp3Element.backgroundColor = 0x333333; mp3Element.waveColor = 0x558855; mp3Element.volume = 1.0; mp3Element.pan = 0; mp3Element.loop = true; mp3Element.autoplay = true; addChild(mp3Element); mp3Element.init();
Property | Defined By | ||
---|---|---|---|
autoplay : Boolean
Indicates whether the mp3 file plays upon load
| MP3 | ||
![]() | autoShuffle : Boolean
autoshuffles
| TouchContainer | |
backgroundAlpha : Number
Sets the background alpha
| MP3 | ||
backgroundColor : uint
Sets the background color
| MP3 | ||
![]() | 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 | |
![]() | dimensionsTo : Object
Sets the dimensions of TouchContainer to given object
| TouchContainer | |
display : String
Visualization display type, can be set to "waveform", "none", or an image URL. | MP3 | ||
![]() | dropShadow : Boolean
Sets the drop shadow effect
| TouchContainer | |
![]() | 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 | |
id3 : ID3Info [read-only]
ID3 info object
| MP3 | ||
id3Album : String [read-only]
ID3 album
| MP3 | ||
id3Author : String [read-only]
ID3 author
| MP3 | ||
id3Comment : String [read-only]
ID3 Comment
| MP3 | ||
id3Copyright : String [read-only]
ID3 Copyright
| MP3 | ||
id3Title : String [read-only]
ID3 title
| MP3 | ||
id3Year : String [read-only]
ID3 Year
| MP3 | ||
isPlaying : Boolean [read-only] | MP3 | ||
![]() | layout : *
specifies the type of layout
| TouchContainer | |
![]() | layoutList : Dictionary | TouchContainer | |
loop : Boolean
Mp3 loop play
| MP3 | ||
![]() | mouseChildren : Boolean [override]
sets the mousechildren value to true or false. | TouchContainer | |
mp3 : MP3Factory [read-only]
Exposes read-only access for the mp3 factory element. | MP3 | ||
![]() | 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 pan
| MP3 | ||
![]() | position : *
Sets the position
| TouchContainer | |
![]() | 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 | |
![]() | sound : String | TouchContainer | |
src : String
Sets the source of the mp3. | MP3 | ||
![]() | state : Dictionary | TouchContainer | |
![]() | stateId : *
Returns the current state id. | TouchContainer | |
time : String [read-only] | MP3 | ||
TIME : String = Time [static] | MP3 | ||
timer : Timer | MP3 | ||
![]() | toBitmap : Boolean | TouchContainer | |
volume : Number
Sets the volume
| MP3 | ||
waveColor : uint
Sets the color of the waveform
| MP3 | ||
![]() | width : Number [override]
sets the width of the container
| TouchContainer | |
![]() | widthPercent : Number
sets the width of the container
| TouchContainer |
Method | Defined By | ||
---|---|---|---|
MP3()
Constructor
| MP3 | ||
![]() | 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 mp3
| MP3 | ||
dispose():void [override]
Destructor
| MP3 | ||
![]() | 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
| MP3 | ||
![]() | 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 = null):void
Closes mp3
| MP3 | ||
![]() | parseCML(cml:XMLList):XMLList
Parse cml for local layouts. | TouchContainer | |
pause():void
Pauses playback
| MP3 | ||
play():void
Plays from the beginning
| MP3 | ||
![]() | 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 | |
resume():void
Resumes playback from paused position
| MP3 | ||
![]() | 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 | MP3 | ||
![]() | setDimensionsToChild():void
method sets the dimensions of each child
| TouchContainer | |
stop():void
Pauses playback and returns to the beginning
| MP3 | ||
![]() | 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 |
Method | Defined By | ||
---|---|---|---|
load():void | MP3 |
autoplay | property |
autoplay:Boolean
Indicates whether the mp3 file plays upon load
public function get autoplay():Boolean
public function set autoplay(value:Boolean):void
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
display | property |
display:String
Visualization display type, can be set to "waveform", "none", or an image URL.
The default value is waveform
.
public function get display():String
public function set display(value:String):void
id3 | property |
id3:ID3Info
[read-only] ID3 info object
public function get id3():ID3Info
id3Album | property |
id3Album:String
[read-only] ID3 album
public function get id3Album():String
id3Author | property |
id3Author:String
[read-only] ID3 author
public function get id3Author():String
id3Comment | property |
id3Comment:String
[read-only] ID3 Comment
public function get id3Comment():String
id3Copyright | property |
id3Copyright:String
[read-only] ID3 Copyright
public function get id3Copyright():String
id3Title | property |
id3Title:String
[read-only] ID3 title
public function get id3Title():String
id3Year | property |
id3Year:String
[read-only] ID3 Year
public function get id3Year():String
isPlaying | property |
isPlaying:Boolean
[read-only] public function get isPlaying():Boolean
loop | property |
loop:Boolean
Mp3 loop play
public function get loop():Boolean
public function set loop(value:Boolean):void
mp3 | property |
mp3:MP3Factory
[read-only] Exposes read-only access for the mp3 factory element.
public function get mp3():MP3Factory
pan | property |
pan:Number
Sets the pan
public function get pan():Number
public function set pan(value:Number):void
src | property |
src:String
Sets the source of the mp3.
public function get src():String
public function set src(value:String):void
time | property |
time:String
[read-only] public function get time():String
TIME | property |
public static var TIME:String = Time
timer | property |
public var timer:Timer
volume | property |
volume:Number
Sets the volume
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
MP3 | () | Constructor |
public function MP3()
Constructor
close | () | method |
public function close():void
Closes mp3
dispose | () | method |
override public function dispose():void
Destructor
init | () | method |
override public function init():void
Initialisation method
load | () | method |
protected function load():void
open | () | method |
public function open(file:String = null):void
Closes mp3
Parameters
file:String (default = null )
|
pause | () | method |
public function pause():void
Pauses playback
play | () | method |
public function play():void
Plays from the beginning
resume | () | method |
public function resume():void
Resumes playback from paused position
seek | () | method |
public function seek(pos:Number):void
Parameters
pos:Number |
stop | () | method |
public function stop():void
Pauses playback and returns to the beginning