AudioLoad
Kind of class: | public class |
---|---|
Package: | org.casalib.load |
Inherits from: | LoadItem < BaseLoadItem < Process < RemovableEventDispatcher < EventDispatcher |
Version: | 10/26/08 |
Author: | Aaron Clinger |
Classpath: | org.casalib.load.AudioLoad |
File last modified: | Wednesday, 31 December 2008, 20:18:28 |
Provides an easy and standardized way to load audio files.
Example:
-
package { import flash.display.MovieClip; import org.casalib.load.AudioLoad; import org.casalib.events.LoadEvent; public class MyExample extends MovieClip { 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. - Event with type:
OPEN
- Dispatched when a load operation starts.
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 BaseLoadItem
Instance properties inherited from Process
Instance properties inherited from RemovableEventDispatcher
Instance methods
- destroy : void
Instance methods inherited from LoadItem
Instance methods inherited from BaseLoadItem
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.