plicatibu Posted February 27, 2014 Share Posted February 27, 2014 I'm migrating a game I made with Phaser 1.1.3 to 2.0 and I'm having some issues. On Chrome (33.0.1750.117 m):Uncaught TypeError: Object [object Object] has no method 'preUpdate'On Firefox (27.0.1):TypeError: this.children[i].preUpdate is not a functionThe offending line is the number 24,669 in Phaser.js (updated today): while (i--) { this.children[i].preUpdate(); }I performed a grep in all available examples looking for a hint about what I was missing but I had no success. Any clue? Thank you. Link to comment Share on other sites More sharing options...
XekeDeath Posted February 27, 2014 Share Posted February 27, 2014 There is a group somewhere that has a child that does not have a preUpdate function.I ran into the same problem with Graphics objects when I first converted.I'd recommend putting a conditional breakpoint on that line, breaking if the child has no preUpdate function, and finding out what particular object is causing the problem. Link to comment Share on other sites More sharing options...
rich Posted February 27, 2014 Share Posted February 27, 2014 Just checking - but are you building it fresh (via grunt) after you pulled, or just using the version in the build folder? If so that's a few days out of date now and a lot has been fixed since. Link to comment Share on other sites More sharing options...
plicatibu Posted February 27, 2014 Author Share Posted February 27, 2014 @XekeDeath I'm not using groups. @Rich I made a git pull and grabbed the Phase.js from build folder. I didn't build my own Phaser.js Thank you all. Link to comment Share on other sites More sharing options...
rich Posted February 28, 2014 Share Posted February 28, 2014 Yeah that'd probably be why then (please please always build from grunt when pulling from 1.2, I only update the build files every few days at best). Link to comment Share on other sites More sharing options...
plicatibu Posted February 28, 2014 Author Share Posted February 28, 2014 Rich, right now I updated Phaser and built a brand new Phaser.js. The problem with theUncaught TypeError: Object [object Object] has no method 'preUpdate'no longer exist. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts