PDA

View Full Version : Flash playing sounds, despite stopping movie


peter5
11-17-2006, 10:13 PM
Hi,

I have been teaching students basic flash, and then displaying there work on a school-based website.

http://harristoshs.eq.edu.au/plexus/Subjects/INP052/pages/examples1a.html

The idea is to display the swf file as a static 'picture' with a link that opens in a new window and plays the file. This makes for a visually pleasing page, with the option to view the swf.

However when you load the page you will notice it emits some sound (on this page just from one swf I imagine. Other pages emit entire ranges of sound.

I have been through the code (created using Dreamweaver), however cannot figure out what is creating the sound.

Any suggestions appreciated.

Billy T
11-18-2006, 04:13 AM
seems like there is a sound placed on frame 1 of Bri's swf

peter5
11-18-2006, 05:36 AM
Hi.

I must be blind. It is good to know someone has seen an error, because my staring at code has not shown up any to my eyes.

Could you point out how you have isolated the sound as coming from 'Bri'. I look at the code for 'bri' and for another student, and they both look the same.

I have set 'loop' and 'play' to false. What else could cause the sound?

'bri'
<td class="style1">
<p align="center" class="style18">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="142" height="100">
<param name="movie" value="../files/student/task1/Task1_Bri.swf">
<param name="quality" value="high"><param name="LOOP" value="false"><param name="PLAY" value="false">
<embed src="../files/student/task1/Task1_Bri.swf" width="142" height="100" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" play="false"></embed>
</object>
<p align="center" class="style18"><a href="../files/student/task1/Task1_Bri.swf" target="_blank">Bri</a> </p></td>
<td class="style1">

'other student'
<td class="style1">
<p align="center" class="style18">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="142" height="100">
<param name="movie" value="../files/student/task1/Task1_Ben.swf">
<param name="quality" value="high"><param name="LOOP" value="false"><param name="PLAY" value="false">
<embed src="../files/student/task1/Task1_Ben.swf" width="142" height="100" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" play="false"></embed>
</object>
</p>
<p align="center" class="style18"><a href="../files/student/task1/Task1_Ben.swf" target="_blank">Ben</a> </p></td>

Billy T
11-18-2006, 08:07 AM
it has nothing to do with the embed code

I loaded the page and heard the sound. I clicked on Bri's piece and heard the same sound and concluded that there must be a sound on frame 1. This is causing it to play the sound when the swf is loaded into the first page. Even though you have autoplay set to false it still shows the first frame and plays any sounds on there

cheers

peter5
11-18-2006, 01:24 PM
it has nothing to do with the embed code

I loaded the page and heard the sound. I clicked on Bri's piece and heard the same sound and concluded that there must be a sound on frame 1.
This much I already knew.


This is causing it to play the sound when the swf is loaded into the first page. Even though you have autoplay set to false it still shows the first frame and plays any sounds on there
cheers

And this is the answer I was after, thanks.

So now, is there any way to prevent this?:confused: :confused:

Billy T
11-18-2006, 01:33 PM
not that I can think of off the top of my head. If you could somehow create a sound object as the swf loads then you could set the volume of that to zero and do it so it controls all sounds in the movie (ie don't provide a target when you create it

mySound=new Sound();


)


I'm not sure how you would do that without the source though...

peter5
11-19-2006, 12:22 AM
Thanks. If I was creating the swf files myself then I could do many things within the fla to prevent the sound (now that I know why it is occuring). However these files are being created by students (12/13yo) who are experiencing flash for the first time. Keyframes are a bizarre concept at first, not to mention actionscript!

I guess we will just have to put up with a very loud page on load (the page I showed was the least noisy!)