enterFrame and transition.to()

\_W = display.contentWidth \_H = display.contentHeight local player = display.newRect(0,100,50,50) transition.to(player,{time = 8000,x = \_W+40, y=player.y + 400}) local function move() player.y = player.y - 3 end local function onTouch(e) if e.phase == "began" then Runtime:addEventListener("enterFrame",move) elseif e.phase == "ended" then Runtime:removeEventListener("enterFrame",move) end end Runtime:addEventListener("touch",onTouch)

How to make the object move up when I touch the screen ? Can I use the enterFrame and transition.to() together ?

They should be able to work together, but you may not get the effect that you want.  Both the transition and the enterframe will be changing the value of y.

Rob

They should be able to work together, but you may not get the effect that you want.  Both the transition and the enterframe will be changing the value of y.

Rob