local scrollView = ccui.ScrollView:create()
scrollView:setContentSize(cc.size(600, 400))
scrollView:addTo(self):center()
scrollView:setAnchorPoint(cc.p(0.5, 0.5))
scrollView:setBackGroundColorType(ccui.LayoutBackGroundColorType.solid)
scrollView:setBackGroundColor(cc.c3b(0, 128, 0))
scrollView:setDirection(ccui.ScrollViewDir.both)
local sp = display.newSprite("scrollimg.png"):addTo(scrollView)
sp:setAnchorPoint(cc.p(0, 0))
scrollView:setInnerContainerSize(sp:getContentSize())
scrollView:setBounceEnabled(true)
print( scrollView:isBounceEnabled())
scrollView:addEventListener(function(sender, eventType)
if eventType == ccui.ScrollviewEventType.scrolling then
print(sender:getInnerContainer():getPosition())
end
end)