1 decade ago by JackImpact
Hi All,
Anyone has tried to put different music for different levels? I have tried without success following the documentation. My code is as below
My game throwed an error as below
INVALID_STATE_ERR: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable.
anyone knows how to play the named track in specific level? The documentation didn't provide working examples.
Thanks for your help in advance!
Jack
Anyone has tried to put different music for different levels? I have tried without success following the documentation. My code is as below
ig.musicBgs=new ig.Music(); ig.musicBgs.add('media/sounds/PARK_LEVEL_BACKGROUND.*','a'); ig.musicBgs.add('media/sounds/BEACH_LEVEL_LOOP.*','b'); ig.musicBgs.add('media/sounds/UNDERWATER_BACKGROUND.*','c' ); ig.musicBgs.add('media/sounds/SPACE_LEVEL_BACKGROUND.*','d'); ig.musicBgs.volume=0.7; ig.musicBgs.play('b');
My game throwed an error as below
INVALID_STATE_ERR: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable.
anyone knows how to play the named track in specific level? The documentation didn't provide working examples.
Thanks for your help in advance!
Jack