Jump to content

Problem with bitmapFont and IE11


SteveB
 Share

Recommended Posts

I've got a problem with bitmap fonts in IE11. The game I've put together works fine in Chrome, Firefox, Opera, and Safari but falls over in IE11. Any ideas? Using Phaser 2.0.1

 

 

SCRIPT5009: 'Float32Array' is undefined

File: phaser.js, Line: 57295, Column: 5

vec2.forEach = (function() {    var vec = new Float32Array(2);

SCRIPT5007: Unable to get property 'responseText' of undefined or null reference

File: phaser.js, Line: 41759, Column: 17

bitmapFont: function (game, xml, cacheKey, xSpacing, ySpacing) {        if (!xml || /MSIE 9/i.test(navigator.userAgent))        {            if (typeof(window.DOMParser) === 'function')            {                var domparser = new DOMParser();                xml = domparser.parseFromString(this.ajaxRequest.responseText, 'text/xml');            }

I've extracted the key parts of the code into a test shell as shown here. 

<html><head>	<title>Runes</title>	<meta charset="utf-8">	<meta http-equiv="X-UA-Compatible" content="chrome=1, IE=9">	<meta name="format-detection" content="telephone=no">	<meta name="HandheldFriendly" content="true" />	<meta name="apple-mobile-web-app-capable" content="yes">	<meta name="apple-mobile-web-app-status-bar-style" content="black">	<meta name="format-detection" content="telephone=no">	<meta name="HandheldFriendly" content="true" />	<meta name="robots" content="noindex,nofollow" />	<meta name="apple-mobile-web-app-capable" content="yes" />	<meta name="apple-mobile-web-app-status-bar-style" content="black" />	<meta name="apple-mobile-web-app-title" content="Phaser App">	<meta name="viewport" content="initial-scale=1 maximum-scale=1 user-scalable=0 minimal-ui" />	<link rel="apple-touch-icon" href="/apple-touch-icon.png">	<link rel="stylesheet" href="css/stylesheet.css" type="text/css" charset="utf-8" />	<script src="phaser.js"></script></head><body>    <script type="text/javascript">        var console=console || {"log": function(){}};        var game;        var State = function (game) {            this.ready = false;        };        State.prototype = {            preload: function() {                this.load.bitmapFont('mainFont', 'architects_daughter.png', 'architects_daughter.xml');            },            create: function() {                bmpText = game.add.bitmapText(200, 100, 'mainFont','Test', 32);            }        };        window.onload = function() {            game = new Phaser.Game(600, 480, Phaser.AUTO, 'game');            game.state.add('Boot', State);            game.state.start('Boot');        };    </script></body></html>

The files are hosted here: http://henspace.com/games/_debug/index.html

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...