MoMoMajor Posted September 16, 2009 Share Posted September 16, 2009 Ok this code is motly javascript but I think I am missing something in php also. So basically it is a mousover script that plays music when i mouse over a link and I had it working perfectly on my local setup but It doesn't work online. <span><a onmouseover="playfx('sound/<?php echo $_GET['category']; ?>.mp3')" id='fxsound' onmouseout="playfx('')"></a></span> thats the code in the html and this is the javascript function playfx(sound) { var loop = true; surl = '<embed src="'+sound+'" loop="'+loop+'" hidden="false" autostart="true" height="0" width="0" type="audio/mpeg">'; document.getElementById("fxsound").innerHTML = surl; } Quote Link to comment Share on other sites More sharing options...
gevans Posted September 16, 2009 Share Posted September 16, 2009 I have a feeling that this will not be a progressive download. So on your live server it's trying to download the whole song before it plays it. To test for this get a tiny sound clip that you know would download in a few seconds and try it. Quote Link to comment Share on other sites More sharing options...
MadTechie Posted September 16, 2009 Share Posted September 16, 2009 Moved: to JavaScript Help Sorry but <?php echo $_GET['category']; ?> doesn't make it a PHP issue, Quote Link to comment Share on other sites More sharing options...
emehrkay Posted September 18, 2009 Share Posted September 18, 2009 Dude, think about this for a second. Every mouseover and leave, you are injecting code to start steaming a flash file. For this to work at all, you will need to leave your mouse over the element for awhile, long enough for the file to download 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.