AlienInvaders
AlienInvaders copied to clipboard
Black Screen in IE 9
The callback to initialize is never called in IE. Just end up with the big black box. By the way, very cool. Very distracting. I've been avoiding my job shooting aliens!
Here is a quick workaround in level.js:
$(function() {
var callback = function() {
Game.initialize("#gameboard", levelData, spriteData, {
"start" : startGame,
"die" : endGame,
"win" : winGame
});
};
GameAudio.load({
'fire' : 'media/laser.ogg',
'die' : 'media/explosion.ogg'
}, callback);
if ($.browser.msie) {
// ie doesn't ever make the callback?
setTimeout(callback, 500);
}
});
This is b/c IE9 doesn't play OGG - you can switch the files to .WAV as well.