Guest User

Untitled

a guest
Jan 20th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. function mSound() {
  2. /*SETUP SOUND MANAGER 2*/
  3. soundManager.setup({
  4. // where to find flash audio SWFs, as needed
  5. url: 'audio/',
  6. onready: function() {
  7. console.log('SM2 is ready to play audio!');
  8.  
  9. /*MY SOUND COLLECTIONS*/
  10. soundManager.createSound({
  11. id: 'myIntro',
  12. url: 'audio/Indonesia.mp3',
  13. autoPlay: false,
  14. volume: 15
  15. });
  16. soundManager.play('myIntro');
  17.  
  18. }
  19. });
  20. }
  21.  
  22. function mIntro() {
  23. soundManager.play('myIntro');
  24. }
  25.  
  26. function mSound(id,url,volume) {
  27. this.id = id;
  28. this.url = url;
  29. this.volume = volume;
  30.  
  31. /*SETUP SOUND MANAGER 2*/
  32. soundManager.setup({
  33. url: 'audio/',
  34. onready: function() {
  35. //console.log('SM2 is ready to play audio!');
  36. /*MY SOUND COLLECTIONS*/
  37. soundManager.createSound({
  38. id: id,
  39. url: 'audio/'+ url,
  40. volume: volume
  41. });
  42. soundManager.play(id);
  43. }
  44. });
  45. }
  46.  
  47. mSound('myIntro','Indonesia.mp3',5);
  48.  
  49. soundManager.togglePause('myIntro');
Add Comment
Please, Sign In to add comment