Hi all,
I’m brand new to Corona… just started digging in to it today.
I’m playing around with some stuff and just wanted to see if I could get some simple Hello World text to rotate endlessly.
I’ve sort of gotten it to work with the code below, I say sort of as it does keep rotating, but there’s a very short pause at the start of each cycle.
I’m sure there’s a better way to do this, so if you have any tips that’d be great.
Thanks.
Here’s the code I’m using:
[code]
local rotate
local trans
local rotvalue = 0
local textObject = display.newText( “Hello World!”, 50, 50, nil, 24 )
textObject:setTextColor( 255,255,255 )
function rotate(e)
rotvalue = rotvalue -360
trans = transition.to(textObject,{rotation = rotvalue, time=1000, onComplete=rotate})
end
rotate()
[/code] [import]uid: 209495 topic_id: 34571 reply_id: 334571[/import]