Package | sekati.load |
Class | public class SoundLoader |
Inheritance | SoundLoader AbstractLoader flash.events.EventDispatcher |
Implements | ILoader |
Sound
media content.
var loader : SoundLoader = new SoundLoader( "http://localhost/path/to/my.mp3" ); loader.addEventListener( Event.INIT, playSound ); loader.load( ); private function playSound(e : Event) : void { loader.removeEventListener( Event.INIT, playSound ); loader.content.play(); trace( "ID3 info: " + loader.content.id3 ); }
Property | Defined by | ||
---|---|---|---|
bytesLoaded : uint
The loader bytes loaded.
| AbstractLoader | ||
bytesTotal : uint
The loader bytes total.
| AbstractLoader | ||
content : Sound [read-only]
The strictly-typed
Sound loader content. | SoundLoader | ||
context : LoaderContext
Returns
LoaderContext (for Loader types only). | AbstractLoader | ||
dataFormat : String
Returns
URLLoaderDataFormat (for URLLoader types only). | AbstractLoader | ||
loading : Boolean
The loading status of the loader; if
true the loader is loading, if false the loader has not started yet. | AbstractLoader | ||
percent : Number
The loader percentile.
| AbstractLoader | ||
rawContent : *
The loosely-typed
AbstractLoader content. | AbstractLoader | ||
ready : Boolean
The ready status of the loader content; if
true the content is loaded, if false the content is not loaded. | AbstractLoader | ||
request : URLRequest
The loader
URLRequest . | AbstractLoader | ||
soundContext : SoundLoaderContext
Returns
SoundLoaderContext (for Sound types only). | AbstractLoader | ||
url : String
The loader url.
| AbstractLoader |
Method | Defined by | ||
---|---|---|---|
SoundLoader(url:String, bufferTime:Number, loadPolicyFile:Boolean = false)
SoundLoader Constructor
| SoundLoader | ||
close():void
Stop the loading process.
| AbstractLoader | ||
destroy():void
Cleanup the
AbstractLoader . | AbstractLoader | ||
dispatchEvent(e:Event):Boolean
Optimized
dispatchEvent only dispatches when there are listeners. | AbstractLoader | ||
load():void
Start the loading process.
| AbstractLoader |
content | property |
content:Sound
[read-only]
The strictly-typed Sound
loader content.
public function get content():Sound
SoundLoader | () | constructor |
public function SoundLoader(url:String, bufferTime:Number, loadPolicyFile:Boolean = false)
SoundLoader Constructor
Parametersurl:String — of the audio file.
|
|
bufferTime:Number — to load before sound may be streamably played.
|
|
loadPolicyFile:Boolean (default = false ) — determines whether the crossdomain.xml will be loaded.
|