local bmp = Bitmap.new(Texture.new("ball.png", true)) bmp:setAnchorPoint(0.5, 0.5) bmp:setPosition(100, 100) stage:addChild(bmp) function bmp:onClick(e) if self:hitTestPoint(e.x, e.y) then self:setScale(1.5) end end function bmp:onRelease(e) if self:hitTestPoint(e.x, e.y) then self:setScale(1) end end bmp:addEventListener(Event.MOUSE_DOWN, bmp.onClick, bmp) bmp:addEventListener(Event.MOUSE_UP, bmp.onRelease, bmp)