Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- so, first we move the code that adds the music
- //
- var wheelMusic = new Audio('sound.mp3');
- //
- to the variables -> http://puu.sh/jRL64/d992ecb2ad.png
- then we move the code that starts and loops the music
- //
- wheelMusic.loop = true;
- wheelMusic.play();
- //
- into the startSpin function -> http://puu.sh/jRLdo/7e55fe67e2.png
- then we move the code that ends it
- //
- wheelMusic.currentTime = 0;
- wheelMusic.pause();
- //
- into the doSpin function -> http://puu.sh/jRLo8/51956f6901.png
- note that sound.mp3 needs to be named to your sound file (or you name the sound file sound.mp3, whatever works best)
Advertisement
Add Comment
Please, Sign In to add comment