Hello,
I want a circle to move from the left to the right of the screen I tried to modify the “Oscillating objects” code but failed! Can maybe someone help me out with this issue?
2
3
4
5
6
7
8
9
10
11
local needle = display.newRect( 100, 100, 10, 150 )
needle.anchorY = 0
needle.rotation = 50
local function moveNeedle()
transition.to( needle, { tag=“moveNeedle”, time=1000, rotation=-50, transition=easing.inOutCubic } )
transition.to( needle, { tag=“moveNeedle”, delay=1000, time=1000, rotation=50, transition = easing.inOutCubic } )
end
timer.performWithDelay( 2000, moveNeedle, 0 )
moveNeedle()
Thanks
Ari