ozdrgnaDiies
ozdrgnaDiies

Reputation: 1929

JavaScript / SoundManager2 - Not Playing Anything

I've been trying for the past few hours to get SoundManager to work so I can seemlessly play audio loops on my website. So far however, I haven't even been able to get the audio to play at all. It puzzles me since my code seems to be like most of the examples I've seen. I completely pass the troubleshooting test as well. I've also checked multiple times that the files are in the correct directory and named right as well.

Also I might note that I've also tried the example posted in this thread:

Javascript SoundManager2 Problems

Even when copying it exactly and changing the directories and mp3 file I got no sound at all. I am fairly certain that it's not my security settings either since I have macromedia set to always allow and nyan.cat, which uses soundmanager, works perfectly.

My code so far is this:

<html>
<head>
<script type="text/javascript" src="/script/soundmanager2-nodebug-jsmin.js"></script>
<script type='text/javascript'>
    soundManager.url = '/swf/soundmanager2.swf';
    soundManager.flashVersion = 9;
    soundManager.useFlashBlock = false;
    soundManager.onready(function() {
    var looper = soundManager.createSound({
       id: 'loop',
       url: 'looplong.mp3',
       autoLoad: true,
       autoPlay: true,
       loops: 9999999,
       onload: function() {
        this.play();
       },
       onfinish: function() {
       },
       volume: 50
   });
</script>
</head>
<body>
<script type='text/javascript'>
    document.bgColor='black';
    looper.play({volume:50});
</script>
</body>
</html>

Upvotes: 1

Views: 501

Answers (1)

barro32
barro32

Reputation: 2708

I think soundManager.url should just point to the directory that the .swf is in.
Try:

soundManager.url = 'swf';

Upvotes: 2

Related Questions