SoundJS

SoundJS  0.3.0

SoundJS > SoundJS > FlashPlugin
Search:
 
Filters

Class FlashPlugin

Play sounds using a Flash instance. This plugin requires swfObject.as as well as the FlashAudioPlugin.swf. Ensure that FlashPlugin.BASE_PATH is set when using this plugin, so that the script can find the swf.

Constructor

FlashPlugin ( )

Properties

BASE_PATH - static String

The path relative to the HTML page that the FlashAudioPlugin.swf resides. If this is not correct, this plugin will not work.
Default Value: src/soundjs

capabilities - static Object

The capabilities of the plugin.
Default Value: null

showOutput - Boolean

A developer flag to output all flash events to the console.
Default Value: false

Methods

create

SoundInstance create ( src )
Create a sound instance.
Parameters:
src <String> The source to use.
Returns: SoundInstance
A sound instance for playback and control.

generateCapabiities

static void generateCapabiities ( )
Determine the capabilities of the plugin.
Returns: void

isSupported

static Boolean isSupported ( )
Determine if the plugin can be used.
Returns: Boolean
If the plugin can be initialized.

register

Object register ( src , instances )
Pre-register a sound instance when preloading/setup. Note that the FlashPlugin will return a SoundLoader instance for preloading since Flash can not access the browser cache consistently.
Parameters:
src <String> The source of the audio
instances <Number> The number of concurrently playing instances to allow for the channel at any time.
Returns: Object
A result object, containing a tag for preloading purposes.