I have an error when add button to container:
game.HUD.RevivalContainer = me.Container.extend({init: function() {// call the constructorthis._super(me.Container, 'init');// make sure our object is always draw firstthis.z = Infinity;this.addChild(new me.ColorLayer("revival_background", new me.Color(0,0,0,0.6), 0));this.addChild(new game.HUD.RevivalBtnControl(10, 10));}});game.HUD.RevivalBtnControl = me.GUI_Object.extend({/*** constructor*/init: function(x, y) {this._super(me.GUI_Object, "init", [ x, y, {image: game.texture,region : "revival_btn.png" // ON by default} ]);this.anchorPoint.set(0, 0);this.setOpacity(0.8);console.log("init revival btn.");},/*** function called when the pointer is over the object*/onOver : function (/* event */) {this.setOpacity(1.0);},/*** function called when the pointer is leaving the object area*/onOut : function (/* event */) {this.setOpacity(0.8);},/*** function called when the object is clicked on*/onClick : function (/* event */) {console.log("click");return false;}});
error:Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(HTMLImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap)'me.CanvasRenderer.me.Renderer.extend.drawImage @ melonJS-2.1.3.js:13422me.Sprite.me.Renderable.extend.draw @ melonJS-2.1.3.js:7595me.Container.me.Renderable.extend.draw @ melonJS-2.1.3.js:9438me.Container.me.Renderable.extend.draw @ melonJS-2.1.3.js:9438me.game.api.draw @ melonJS-2.1.3.js:1871_renderFrame @ melonJS-2.1.3.js:10132