var LoadingLayer = cc.LayerColor.extend({
_ev: null,
_sp: null,
ctor: function(){
this._super(cc.color(0,0,0,100),GAME_WIDTH, GAME_HEIGHT);
var ev = cc.EventListenerTocherOnByOne.create();
ev.setSwallowTouches(true);
ev.onTouchBegan = function() {
return true;
};
cc.eventManger.addListener(ev, -9999);
this._ev = ev;
ev.setEnabled(false);
var sp = new cc.Sprite(res.other_loading_png);
sp.x = GaME_WITH/2;
sp.y =
this.addChild(sp);
this._sp = sp ;
},
onEnter: function(){
this._super();
this._ev.setEnabled(true);
this._sp.runAction(cc.repeatForver(cc.rotateBy(1, 360)));
},
onExit: function(){
this._super();
this._ev.setEnabled(false);
}
});