Monday, October 13, 2008

JavaScript sound player

It's very easy to connect Adobe FLEX to JavaScript.

We'll create a simple sound player that exposes two functions: play and stop. It'll also call the JavaScript function on_play_complete when the current sound has finished playing.

soundplayer.mxml


Compile with mxmlc soundplayer.mxml



soundplayer.html