I’m trying to experiment with timer and runtime to create a game. But I need some help.
Thanks to anyone who can help me with this.
I need to create an image, very small
local big = display.newImage("buttonSpanish.png") big.x = display.contentWidth / 2; big.y = 700 big:scale (.1, .1)
Then transition tthat image from point A to point B
transition.to(big, {time=1000, y=100})
At the end of point B the image must removeSelf or nil
if big == 100 then display.remove (big) end
but the function will create a another image very small and do the same thing all over again.
This is to create a famous “street” with trees coming at you.
or objects moving, to create an illusion of movement.
I hope I make my self clear of what I need, and I hope smeone will help me out.
Thank you in advance.
I’m trying to use runtime and timer, but I don’t really get it.
function tele () timer.performWithDelay( 1000, tele ) big = nil; local big = display.newImage("buttonSpanish.png") big.x = display.contentWidth / 2; big.y = 700 big:scale (.2, .2) transition.to(big, {time=1000, y=100}) if big == 100 then display.remove (big) end end Runtime:addEventListener("enterFrame", tele)
I need help