[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swftools-common] WAV2SWF Help
From: |
Chris Flowers |
Subject: |
Re: [Swftools-common] WAV2SWF Help |
Date: |
Wed, 14 Sep 2005 07:42:58 -0400 |
----- Original Message -----
From: "Henderson, T DR. MATH" <address@hidden>
To: <address@hidden>
Sent: Tuesday, September 13, 2005 6:29 AM
Subject: [Swftools-common] WAV2SWF Help
> 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="flashsound.js"></script>
> <script>
> var foo = new FlashSound();
> function playFoo() {
> document.foo.GotoFrame(1);
> document.foo.Play();
> }
> </script>
>
> </head>
> <body>
> <script foo.embedSWF="foo.swf"></script>
> <a href="javascript:playFoo()">Play</a>
> </body>
> </html>
>
> 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
>
>
>
>
> _______________________________________________
> Swftools-common mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/swftools-common
What happens if you tell it to go to frame 2 and play instead of frame 1.
You mentioned using the -S flag when making the swf to stop the sound.
It could be that stop command is getting in the way of your Play() call.
Chris