Jump to content

Problem with bitmapFont and IE11


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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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