cc.Class({ extends: cc.Component, properties: {}, start: function () {}, onShowImg_bendi: function (e) { this.node.getComponent(cc.Sprite).spriteFrame = null; cc.loader.loadRes(e, function (e, o) { e || (this.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(o)); }.bind(this)); }, onShowImg_server: function (e) { this.node.getComponent(cc.Sprite).spriteFrame = null; cc.loader.load(e, function (e, o) { e || (this.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(o)); }.bind(this)); } });