Jump to content

[SOLVED] Sound breaks things in certain browsers.


Michdd

Recommended Posts

Or possibly a more universal way to play sound. Currently the way that I'm doing which is causing problems in certain browsers (especially Opera) is:

 

<embed src="recv_4.wav" autostart=false width=0 height=0 id="sound1"
enablejavascript="true">

function EvalSound(soundobj) 
{
     var thissound=document.getElementById(soundobj);
     thissound.Play();
}

 

Then a call like EvalSound('sound1');

Well get creative, make it autoplay, add it to the document when ajax does whatever you have it doing, then remove it x seconds later when it's done.

 

Or do it the proper way and do some reading up as javascript can interact with flash

look into the built in ExternalInterface in AS3....

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html

 

this allows javascript to call a function/method inside your Flash Movie......

 

I would suggest flash is the best way to go for sound also....

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.