Michdd Posted May 25, 2009 Share Posted May 25, 2009 I have a simple thing that plays a sound during certain times. However in browsers (or with users..) that don't have quicktime installed it seems to just break the javascript function completely. Is there a way to check if a user has quicktime installed? Quote Link to comment Share on other sites More sharing options...
Michdd Posted May 25, 2009 Author Share Posted May 25, 2009 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'); Quote Link to comment Share on other sites More sharing options...
Axeia Posted May 25, 2009 Share Posted May 25, 2009 Think your best bet would be using flash Quote Link to comment Share on other sites More sharing options...
Michdd Posted May 25, 2009 Author Share Posted May 25, 2009 Think your best bet would be using flash I don't think that would work good because I'm playing this whenever I get a certain result from ajax. Quote Link to comment Share on other sites More sharing options...
Axeia Posted May 25, 2009 Share Posted May 25, 2009 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 Quote Link to comment Share on other sites More sharing options...
Michdd Posted May 25, 2009 Author Share Posted May 25, 2009 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. How does that help me in making it work in other browsers? Quote Link to comment Share on other sites More sharing options...
Axeia Posted May 25, 2009 Share Posted May 25, 2009 By the number of people with flash installed being far greater than that of those with quicktime installed? And flash is available crossbrowser and crossplatform. Quote Link to comment Share on other sites More sharing options...
DarkSuperHero Posted May 25, 2009 Share Posted May 25, 2009 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.... Quote Link to comment Share on other sites More sharing options...
Michdd Posted May 25, 2009 Author Share Posted May 25, 2009 Thanks, this is solved. I used Flash with javascript. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.