Jump to content

Sprite sheet woes


Recommended Posts

I've a local webserver running and have successfully executed hello World :)


I've tried using the SpriteSet example code like so:

<!doctype html><html>    <head>        <meta charset="UTF-8" />        <title>hello xxxx!</title>        <script src="phaser.min.js"></script>    </head>        <body>        <script type="text/javascript">            var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create });            function preload() {                game.load.spritesheet('mummy', 'ko2keeper.png', 64, 64, 18);            }            function create() {                var mummy = game.add.sprite(300, 200, 'mummy');                mummy.animations.add('walk');                mummy.animations.play('walk', 20, true);            }        </script>    </body></html>

and Chrome complains


phaser.min.js:7 Uncaught TypeError: Cannot read property 'style' of null


The phaser lib loads fine. Any idea what is happening here ?

Thanks in advance.






Link to comment
Share on other sites


  • Recently Browsing   0 members

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