[2.1.3] Problem with texture "displayObject.texture is undefined"

Recommended Posts



I recently updated my game to Phaser 2.1.3 from phaser 2.0.7

And I'm getting the following error in Chrome: 

Uncaught TypeError: Cannot read property 'crop' of undefined phaser.min.js:2085PIXI.Sprite._renderCanvas phaser.min.js:2085PIXI.DisplayObjectContainer._renderCanvas phaser.min.js:1761PIXI.DisplayObjectContainer._renderCanvas phaser.min.js:1761PIXI.CanvasRenderer.renderDisplayObject phaser.min.js:9178PIXI.CanvasRenderer.render phaser.min.js:9111Phaser.Game.update phaser.min.js:24547Phaser.RequestAnimationFrame.updateRAF

And the same error as it appears on Firefox

TypeError: this.texture is undefined

Does anyone else have this? Or is there some solution?


You can view the error and the source code here:  http://www.netgfx.com/trunk/games/Nightcast_213





Update: This somehow is related to "this.startButton = this.add.button((game.width/2) - 216, 300, 'menuPlay', this.startGame, this, 1, 0, 2);". The game adds images correctly but when it comes to buttons it throws the error.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.