Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mSound() {
- /*SETUP SOUND MANAGER 2*/
- soundManager.setup({
- // where to find flash audio SWFs, as needed
- url: 'audio/',
- onready: function() {
- console.log('SM2 is ready to play audio!');
- /*MY SOUND COLLECTIONS*/
- soundManager.createSound({
- id: 'myIntro',
- url: 'audio/Indonesia.mp3',
- autoPlay: false,
- volume: 15
- });
- soundManager.play('myIntro');
- }
- });
- }
- function mIntro() {
- soundManager.play('myIntro');
- }
- function mSound(id,url,volume) {
- this.id = id;
- this.url = url;
- this.volume = volume;
- /*SETUP SOUND MANAGER 2*/
- soundManager.setup({
- url: 'audio/',
- onready: function() {
- //console.log('SM2 is ready to play audio!');
- /*MY SOUND COLLECTIONS*/
- soundManager.createSound({
- id: id,
- url: 'audio/'+ url,
- volume: volume
- });
- soundManager.play(id);
- }
- });
- }
- mSound('myIntro','Indonesia.mp3',5);
- soundManager.togglePause('myIntro');
Add Comment
Please, Sign In to add comment