Packagecom.pcthomatos.ultraloader.types
Classpublic class ULSound

The ULSound class is the type class for all sounds loaded in with UltraLoader.

Each sound loaded in with ultraloader has the below properties and methods.


Example
And example of a ULSound Object with use of some of it's properties.
        ...
        import com.pcthomatos.ultraloader.UltraLoader;
        import com.pcthomatos.ultraloader.types.
        
        var testSound:ULSound;        
        var ul:Object = {init:true};
        var ultraLoader:UltraLoader = new UltraLoader(ul);
        
        ultraLoader.addEventListener(UltraLoader.LOAD_REQUEST_COMPLETE, render_Listener);
        
        function render_Listener(e:Event):void{
            ultraLoader.removeEventListener(UltraLoader.LOAD_REQUEST_COMPLETE, render_Listener);
            testSound = ul.$sound.ding;
            
            testSound.play();
            trace(testSound.playing);
            
            testSound.stop();
            trace(testSound.playing);            
            ...

See also

com.pcthomatos.ultraloader.UltraLoader


Public Properties
 PropertyDefined by
  playing : Boolean = false
Contains a boolean flag to determine if your UltraLoader sound file is currently playing.
ULSound
  sound : Sound
Contains the Sound Object of your UltraLoader sound file.
ULSound
  soundChannel : SoundChannel
Contains the SoundChannel of your UltraLoader sound file.
ULSound
  soundLoaderContext : SoundLoaderContext
Contains the SoundLoaderContext of your UltraLoader sound file.
ULSound
  src : String
Contains the source path of your UltraLoader sound file.
ULSound
Public Methods
 MethodDefined by
  
Contructor used by UltraLoader.
ULSound
  
load(urlRequest:URLRequest):void
Primarily used by UltraLoader.

However, if you wanted to replace the sound file in your ULSound Object, you could using this method.
ULSound
  
play():void
Plays the ULSound.
ULSound
  
stop():void
Stops the playing of the ULSound.
ULSound
Property detail
playingproperty
public var playing:Boolean = false

Contains a boolean flag to determine if your UltraLoader sound file is currently playing.

See also

soundproperty 
public var sound:Sound

Contains the Sound Object of your UltraLoader sound file.

See also

soundChannelproperty 
public var soundChannel:SoundChannel

Contains the SoundChannel of your UltraLoader sound file.

See also

soundLoaderContextproperty 
public var soundLoaderContext:SoundLoaderContext

Contains the SoundLoaderContext of your UltraLoader sound file.

See also

srcproperty 
public var src:String

Contains the source path of your UltraLoader sound file.

Constructor detail
ULSound()constructor
public function ULSound()

Contructor used by UltraLoader.

See also

Method detail
load()method
public function load(urlRequest:URLRequest):void

Primarily used by UltraLoader.

However, if you wanted to replace the sound file in your ULSound Object, you could using this method.

Parameters
urlRequest:URLRequest

See also

play()method 
public function play():void

Plays the ULSound.

See also

stop()method 
public function stop():void

Stops the playing of the ULSound.

See also