Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by fugufish

initially I used the standard


 // in init():function{} of the game
 ig.music.add('media/music/music.*');
 ig.music.loop;
 ig.music.volume=0.1
 ig.music.play();


this works well for Chrome 10+11,Safari 5,FF4, Opera, EXCEPT for IE9 :(

i looked into sound.js, appears that there's a comment left by dom at line 60. Says that IE9 has problems loading.

everything else works fine - all other sound fx load and play perfect.

if I load the music as a sound fx, it works awesome in IE9. (for a temporary fix, how do I loop the sound fx? Any tips?)

1 decade ago by dominic

Internally ig.music uses instances of ig.Sound for the tracks. You can even pass an instance of ig.Sound to ig.music.add(), as noted in the documentation.

I suspect the reason you see this error, is because Impact tries to set the .currentTime on the audio element before it is loaded?! So make sure the music is properly loaded by the pre-loader before the game starts. Have a look at very last example in the Working with Assets article.
Page 1 of 1
« first « previous next › last »