class name extends eui.ItemRenderer { private bitmap: egret.Bitmap; private oldData; public constructor() { super(); this.skinName = "resource/scene/name.exml"; } protected dataChanged(): void { //console.log("this.data:" + this.data); if (this.oldData == this.data) { return; } this.oldData = this.data; this.bitmap = GameUtil.createBitmapByName(this.data); this.bitmap.name = this.data; this.addChild(this.bitmap); this.bitmap.touchEnabled = true; // this.bitmap.addEventListener(egret.TouchEvent.TOUCH_TAP, this.touchListener, this); } }