Hey Nathan, run this;
[lua]local circle = display.newCircle( 50, 50, 20 )
local moveLeft
local function moveRight()
transition.to(circle, {x = 270, onComplete = moveLeft})
end
moveLeft = function()
transition.to(circle, {x=50, onComplete = moveRight})
end
moveRight()[/lua]
It’s just a simple demo showing a circle moving back and forth left and right, there’s no cancel function when you’re done with it and I haven’t specified the time parameter but I think it should give you a good base to go on.
Let me know if you have any questions!
Peach
[import]uid: 52491 topic_id: 26324 reply_id: 106706[/import]