I’ve tried everything I put in the print statements but can’t get it to work and I’m all out of ideas
[lua]
local widget = require “widget”
local scroller
local object
local function scrollListener (event)
if event.phase == “moved” then
print (“moving”)
object.y = display.contentHeight
print (display.contentHeight) -------------> 1334
print (display.viewableContentHeight) -------------> 1334
print (display.pixelHeight) -------------> 1334
print (display.actualContentHeight) -------------> 1334
print (object.y) -------------> 1334
print (object.y + display.contentHeight) -------------> 2668
print (scroller.scrollHeight) -------------> nil
end
end
scroller = widget.newScrollView{
scrollWidth = display.contentWidth,
scrollHeight = display.contentHeight*2,
hideBackground = true,
listener = scrollListener
}
object = display.newImage (“image.png”)
object:setReferencePoint (display.TopLeftReferencePoint)
object.xScale = 1.7
object.yScale = 1.7
object.x = display.contentWidth/35
scroller:insert (object)
[/lua]