I'm converting my WAV audio file to SWF so as to embed it in a webpage and control the playback with _javascript_. I convert my WAV to SWF in the following way:
wav2swf foo.wav -v -s 44100 -S -b 128 -o
foo.swf
As you can see, I used -S to make sure that the sound doesn't play automatically when the page loads. However, I would like to use _javascript_ to control the playback. I have downloaded flashsound.js, and here's my HTML code to attempt this playback. For some reason, it's not working. I would appreciate any help you could provide:
<html> <head> <script src=""> <script> var foo = new FlashSound(); function playFoo() { document.foo.GotoFrame
(1); document.foo.Play(); } </script>
When the page loads, the SWF does not automatically play. However, clicking on this "Play" link doesn't start the playback. I would appreciate any help that you could provide.
Thanks,
Troy Henderson Assistant Professor Department of Mathematical Sciences 252 Thayer Hall United States Military Academy West Point, NY 10996 (845) 938-5649
http://www.tlhiv.com