AlienInvaders icon indicating copy to clipboard operation
AlienInvaders copied to clipboard

Black Screen in IE 9

Open jkyoutsey opened this issue 12 years ago • 2 comments

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!

jkyoutsey avatar Mar 12 '13 19:03 jkyoutsey

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);
      }
   });

jkyoutsey avatar Mar 12 '13 20:03 jkyoutsey

This is b/c IE9 doesn't play OGG - you can switch the files to .WAV as well.

cykod avatar Mar 14 '13 14:03 cykod