AudioLoad
Kind of class: | public class |
---|---|
Package: | org.casalib.load |
Inherits from: | LoadItem < Process < RemovableEventDispatcher < EventDispatcher |
Version: | 09/06/09 |
Author: | Aaron Clinger |
Classpath: | org.casalib.load.AudioLoad |
File last modified: | Sunday, 06 September 2009, 09:27:04 |
Provides an easy and standardized way to load audio files.
Example:
-
package { import org.casalib.display.CasaMovieClip; import org.casalib.events.LoadEvent; import org.casalib.load.AudioLoad; public class MyExample extends CasaMovieClip { protected var _audioLoad:AudioLoad; public function MyExample() { super(); this._audioLoad = new AudioLoad("test.mp3"); this._audioLoad.addEventListener(LoadEvent.COMPLETE, this._onComplete); this._audioLoad.start(); } protected function _onComplete(e:LoadEvent):void { this._audioLoad.sound.play(); } } }
Events broadcasted to listeners:
- Event with type:
ID3
- Dispatched when ID3 data is available.
Summary
Constructor
- AudioLoad (request:*, context:SoundLoaderContext = null)
- Creates and defines an AudioLoad.
Class properties
Class properties inherited from Process
Instance properties
- sound : Sound
- The Sound object.
Instance properties inherited from LoadItem
Instance properties inherited from Process
Instance properties inherited from RemovableEventDispatcher
Instance methods
- destroy : void
Instance methods inherited from LoadItem
Instance methods inherited from RemovableEventDispatcher
Constructor
AudioLoad
public function AudioLoad (
request:*,
context:SoundLoaderContext = null)
Creates and defines an AudioLoad.
Parameters:
request:
A
String
or an URLRequest
reference to the file you wish to load.context:
An optional SoundLoaderContext object.
Instance properties
sound
public sound:Sound
(read)
The Sound object.