Home » News » The Javascript Sound Kit API B ...

News by JavaScriptSearch


The Javascript Sound Kit API Brings the Music to Your Website

 

JavaScriptSearch
Monday, July 24, 2006; 08:11 AM

Gustavo Amigo has created a JavaScript-based API that simplifies the task of including sound into webpages.  This is not a looping MIDI kind of thing, though: the JSSoundKit wraps around the ActionScript Sound Object, in effect invoking a Macromedia Flash functionality (the ExternalInterface ActionScript class) that loads and plays an MP3 file.


A live demo is available on the project website.

With JSSoundKit it is possible to create music players on webpages, even without extensive knowledge of Flash and its associated scripting lingo ActionScript. The kit can be customized and extended: for example, the provided live demo uses JavaScript Object Notation (JSON) to dynamically load external MP3 files. Another benefit of JSSoundKit is the ease of use:

 

var mysound = new Sound();      
mysound.loadSound("http://www.archive.org/download/Behind/SyncFilmicoBehind.mp3", true);
mysound.setVolume(30);

The author has also set up an API test page, where you can select the necessary events, tweak a few parameters and have a functional JSSoundKit script ready.  Alternatively, you can download the whole package (code and examples) at http://jssoundkit.sourceforge.net/.

JSSoundKit requires a HTTP server and Flash 8 plug-in on the browser. It works on all modern browsers.

 

 

 

Advertisement

Partners

Related Resources

Other Resources

arrow