display.newSprite("hideback.png"):addTo(self):center()
local render = cc.RenderTexture:create(display.width, display.height):center():addTo(self)
local sp = cc.Sprite:create("HelloWorld.png"):center()
render:begin()
sp:visit()
render:endToLua()
local circle = display.newSolidCircle(20,{color = cc.c4f(0.5, 0.5, 0.5, 0)})
circle:retain()
circle:setBlendFunc(cc.blendFunc(cc.backendBlendFactor.SRC_ALPHA, cc.backendBlendFactor.ZERO))
self:addNodeEventListener(cc.NODE_TOUCH_EVENT,function ( event )
if event.name == "began" then
return true
end
if event.name == "moved" then
circle:pos(event.x,event.y)
render:begin()
circle:visit()
render:endToLua()
end
end)
self:setTouchEnabled(true)