FlashSound API sonify sites with Flash
News           Documentation           Tutorials           Extensions           Download           Forum           Contact

• Overview
• New in this Version

API Index
• Static Methods
• Static Properties
• Instance Methods
» Instance Properties

• Tutorials
• Compatibility
• Version History
• License
• Logic Flow chart

DocumentationInstance Properties

Instance properties can only be set after creating an instance of the FlashSound( ) constructor function.

engageInteraction
Values true | false (defaults to true)
Boolean type.
Description

The engageInteraction property turns on or off certain methods of the instance. It does not control embedding or player detection methods. If the engageInteraction property is false, then the affected methods will not execute.

Example

<script src="flashsound.js"></script>
<script>
mysound = new FlashSound();
mysound.engageInteraction = false; // disable playback
</script>

Notes

This property only affects instance methods that use the isPlayerReady( ) method. isPlayerReady( ) returns false when engageInteraction = false. It has no relevance to native Flash JavaScript methods. One use for the engageInteraction property is to deactivate the methods that control interactive sound for a given instance by setting this property to false. Below is a list of affected instance methods. Note that methods of extensions may also be affected by the engageInteraction property.

IsPlaying( ), LoadMovie( ), LoadMovieNum( ),
TGotoAndPlay( ), TGotoAndStop( ), TPlay( ), TStopPlay( )


playerID
Value n/a
Returns Returns the name/id attribute for the player associated with the instance.
String type.
Description

The playerID is in the form of "FlashSound_swf" plus an index starting at 0. For example, the first player embedded on the page with embedSWF( ) has playerID "FlashSound_swf0", the second would be "FlashSound_swf1" and so on. Use the playerID property to access native flash JavaScript api methods not currently part of FlashSound API.

playerID is read only. Setting a value for playerID will cause javascript errors.

Example

Example of using playerID to access a native flash JavaScript method not supported within the core FlashSound API.

if(mysound.isPlayerReady( )){
  movie = window.document[mysound.playerID];
  movie.GetVariable(varName);
}

Notes

Access native flash JavaScript api methods by calling instance.playerID as property within the document object array rather than the embeds[] array. Using the embeds[] array will cause errors in Internet Explorer. To prevent JavaScript errors, always check that instance.isPlayerReady( ) is true before calling any native flash JavaScript API method or property not supported by the FlashSound API.

Use window.document[mysound.playerID] rather than window.document.embeds[mysound.playerID]


playersIndex
Value n/a
Returns Returns the corresponding index from the players[] array for this instance.
Integer type.
Description

playerIndex is read only. Setting a value for playerIndex will cause javascript errors.

Use playerIndex for situations where you need to programmatically execute an instance but cannot use the instance name. For example if you are executing FlashSound API methods as a string in setInterval,setTimeOut or eval.

Copyright © 2003 Hayden Porter, All rights reserved.