Thanks for that, I edited the code badly.. I didn't realise why the javascript needed that div.. anyway. Surely that will just load the mp3... not play it?
Edit:
Right, here is my DIV:
The player works fine (I have it in a visible div at the moment for testing and when I get it working I'll put it invisible). However, click that image isn't playing the mp3. Any ideas?Code:<div class="style1" id="enter" onclick="setTimeout('redirectUser()', 12000)"><a href="#" onclick"loadFile('jstest',{file:'enter.mp3'});"><img src="enter.png" alt="Click here to enter!" width="224" height="125" border="0" /></a></div>
And the code for the player:
Code:<div id="container" style="visibility:visible">This text will be replaced</div> <script type="text/javascript"> var so = new SWFObject('http://www.jeroenwijering.com/embed/mediaplayer.swf','jstest','400','220','8'); so.addParam('allowscriptaccess','always'); so.addParam('allowfullscreen','true'); so.addVariable('width','400'); so.addVariable('height','220'); so.addVariable('file','enter.mp3'); so.addVariable('javascriptid','jstest'); so.addVariable('enablejs','true'); so.write('container'); </script>







