Tutorials
sonify.org > tutorials > flash audio > flashsound api > flashsound api
Beatnik

Flash Audio
Overview
Coding Tutorials
Beginner
Advanced
.FLA files
Books

Media Player
QuickTime
Java
Other
Audio Basics


FlashSound Javascript API Documentation - Introduction
by Hayden Porter

Note: This page is Flash sonified for Windows IE and Windows and Mac Netscape. You will need the Flash Player to hear it  

In our first Flash Audio Javascript tutorial we introduced the basic Javascripts necessary to use Flash Audio in a standard HTML page without requiring Flash graphics. Our second tutorial introduced error checking and robustness. This third article presents the full FlashSound Javascript API and documentation.

   Introduction         Static Methods        Instance Methods       Instance Properties       Tutorial   

What is the FlashSound Javascript API?
A custom Javascript class for streamlining issues related to using Javascript to control "sound only" swf loaded in an embeded Flash player. This Javascript api enables a web developer to focus on creating content rather than dealing with browser/player compatibility issues and the idiosyncrasies of using Javascript to control plug-ins for Netscape and ActiveX controls for Windows Internet Explorer.

Why should I use the FlashSound API?
The purpose of the FlashSound API is to enable sonification of conventional web pages using the Flash player without relying on the proprietary graphic presentation of Flash. There are several advantages to using the Flash player in this way.

1)     adding sound to conventional web sites without relying upon a proprietary graphic presentation.
2)   the Flash player is almost ubiquitous in adoption so a vast majority of users will experience interactive sound in a conventional web page with downloading the Flash player.
3)   no need to create a separate Flash version of a website to take advantage of Flash streaming and interactive sound.

What Browsers/Players are compatible with the FlashSound Javascript API ?
The FlashSound API is compatible with Flash player 4+ and Netscape 4+ for windows and mac or Internet Explorer 4+ for windows.

How does the FlashSound API streamline the use of Javascript with the Flash player?
First, it checks for browser/player compatibility, if the user's configuration passes these tests then it uses Javascript to write out the appropriate object/embed html tags to embed a hidden "sound only" swf This minimizes hassles for users whose browser configuration is not compatible with your swf content.

Each FlashSound instance inherits its Javascript api by having an associated Flash player and swf. Further more, it checks for player readiness before making direct calls to the Flash Javascript api to prevent errors in case the player is not yet ready for script control. Finally, it includes several custom api methods and properties beyond the original Flash Javascript API to simplify Javascript development.

How does the FlashSound API compare to the original Flash Javascript API?
The FlashSound API makes use of the Flash Javascript API for playback. However the FlashSound API adds additional features to the original API so that coding is simplified, minimizes error messages and is more like working within the Flash authoring environment. The FlashSound API has additional custom methods and properties for using Javascript to embed the Flash player, and controlling browser/player compatibility issues.

Where is the original Flash Javascript API?
Read Scripting with Flash at the Macromedia website.

Where do I get the FlashSound API?
Download the FlashSound API Documentation and flashsound.js script. (windows users right click, mac users click and hold on the link and choose save from the menu.)

How do I use the FlashSound API in a web page?
Read the FlashSound API tutorial.

What is the current version of flashsound.js?
v 1.0.4 last update 1/15/01. Version and last update are included in the comments at the top of the flashsound.js file. Revist www.sonify.org to make sure you are always using the most current version. Read the FlashSound Javascript API version history.

What are the features and capabilities of the FlashSound API?
The FlashSound API includes several custom API methods as well as modified versions of the original Flash Javascript api. The FlashSound API has three sections.

1)     Static Methods
These methods are independent of specific FlashSound instances and are used for controlling browser/player compatibility issues.
2)   Instance Methods
These methods embed, play, load and determine playstate of the embeded swf and player associated with a given instance.
3)   Instance Properties
These properties allow the developer to read and write values for embed attributes.



   Introduction         Static Methods        Instance Methods       Instance Properties       Tutorial   


Discuss this tutorial/demo in the Flash Sonification Discussion forum.



FlashSound Documentation and flashsound.js copyright © 2001 Hayden Porter
Theme music and sound copyright © 2001 Hayden Porter