self.rootnode = cc.Layer:create()
self.rootnode:setTouchEnabled(true);
local listener = cc.EventListenerTouchAllAtOnce:create();
local moved = function(touch,event)
local target = event:getCurrentTarget()
local location = target:convertToNodeSpace(touch[1]:getLocation())
if cc.rectContainsPoint(hezhanRect, location) then
print("cc.rectContainsPoint")
end
end
listener:registerScriptHandler(moved,cc.Handler.EVENT_TOUCHES_MOVED);
self.rootnode:getEventDispatcher():addEventListenerWithSceneGraphPriority(listener,self.rootnode);