var EHDI = EHDI || Object.create(null); EHDI.components = EHDI.components || Object.create(null); EHDI.components.Glow = function(myTexture) { EHDI.aka.Sprite.call(this, myTexture); this.anchor.set(0.5, 0.5); this.explode(); } EHDI.components.Glow.prototype = Object.create(EHDI.aka.Sprite.prototype); EHDI.components.Glow.prototype.explode = function() { this.explodeTimeline = new TimelineMax(); this.explodeTimeline.from(this.scale, 0.15, {x : 0, y : 0}); this.explodeTimeline.to(this, 0.2, {alpha : 0}, 0.1); this.explodeTimeline.add(this.disposeMe.bind(this)); }; EHDI.components.Glow.prototype.disposeMe = function() { this.explodeTimeline.kill(); this.destroy(); };