Search code examples
htmlactionscript-3flashswfobject

Why sound not play?


Good day.

Code:

<object width="500" height="500" id="ItemEditAnimationObject" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
        <param value="./Flash/1380312474.swf" name="movie">
        <param value="" name="wmode">
        <param value="false" name="loop">
        <param value="true" name="play"> 
        <param value="high" name="quality">
        <param value="#F0F8FF" name="bgcolor">
        <param value="./Sound/1380312474.wav" name="movie">

        <!--[if !IE]>-->
        <object width="500" height="500" id="ItemEditAnimationObject" data="./Flash/1380312474.swf" type="application/x-shockwave-flash">
        <param value="" name="wmode">
        <param value="false" name="loop">
        <param value="true" name="play"> 
        <param value="high" name="quality">
        <param value="#F0F8FF" name="bgcolor">
        <param value="./Sound/1380312474.wav" name="movie">

        </object>
        <!--<![endif]-->

      </object>

When start animation sound should play too but it not work...

Why sound not play ?


Solution

  • Including a reference to a wav file as a parameter in the object embed tags is not enough to play it back in the browser. I suggest you do one of two things:

    1. Embed the sound file within the Flash animation and let Flash play it back. Note that you'll need to convert it to mp3 as Flash doesn't support wav (see documentation).
    2. Use the HTML5 audio tag. Note that not all browsers support the wav format, so you may want to consider converting it (see documentation)