pinkpanther Posted July 14, 2014 Share Posted July 14, 2014 Hi, this is the code: Score = game.Class.extend({ init : function() { this.container = new game.Container(); this.container.position.x = 0; this.container.position.y = 4 * game.system.height / 5; this.img = new game.Sprite('hit', 0, 0, { anchor : { x : 0.5, y : 0.5, } }); this.img.position.x = game.system.width / 2 - this.img.width / 2; this.img.position.y = 140; this.textBox = new ScoreText('0', 0, 0, 1); this.container.addChild(this.textBox); this.container.addChild(this.img); game.scene.stage.addChild(this.container); }, }); This gives me following errors: TypeError: child.setStageReference is not a function child.setStageReference(stage); TypeError: this.children.updateTransform is not a function this.children.updateTransform(); (repeatedly) What have I done wrong? Regards! Quote Link to comment Share on other sites More sharing options...
enpu Posted July 14, 2014 Share Posted July 14, 2014 Can't see anything wrong with that code. Can i see more? ScoreText class? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.