Created
October 3, 2008 23:13
-
-
Save boucher/14681 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var setupSoundManager = function() | |
| { | |
| var script = document.createElement("script"); | |
| script.type = "text/javascript"; | |
| script.src = "Resources/soundmanager2.js"; | |
| script.addEventListener("load", function() | |
| { | |
| window.x = soundManager; | |
| soundManager.url = "Resources/"; // path to directory containing SoundManager2 .SWF file | |
| soundManager.onload = function() { | |
| soundManager.createSound("foo", "Resources/1hz-10khz-sweep.mp3");// etc. may now be called | |
| soundManager.play("foo"); | |
| }; | |
| soundManager.beginDelayedInit(); | |
| }, YES); | |
| document.getElementsByTagName("head")[0].appendChild(script); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment