【发布时间】:2013-07-03 02:44:25
【问题描述】:
我想通过滚动视图中的滚动操作来移动我的“背景”图像,并且我希望背景的移动速度比滚动视图的内容慢,以给人以深度的印象。这是我正在使用的代码。它有效,但前提是屏幕正在接收触摸。我希望它继续随着滚动势头移动。我做错了什么?
local function scrollListener( event )
local phase = event.phase
local x, y = scrollView:getContentPosition()
if phase == "moved" then
if event.limitReached then
-- do nothing
else
bg.x = x /3
end
end
return true
end
【问题讨论】:
标签: lua scrollview coronasdk