[Resolved] Self moving object/body in corona

Hi,

I am making a game in Corona SDK. This game is some sort of Snow Bros in which there are tiles.

I want to have an ability to make one tile self moving mean that one tile should be moving up and down indefinitely as long as the game is running.

I have searched on Google and Corona forum but got nothing.

Can anyone help me resolving this issue ?

any help would be appreciated!

Thanks and regards,

Faisal [import]uid: 176766 topic_id: 31266 reply_id: 331266[/import]

use transition.to() and transition.from() functions…
http://developer.coronalabs.com/reference/index/transitionto

–Pratik Dhake [import]uid: 148046 topic_id: 31266 reply_id: 125041[/import]

function move2()
tween = transition.to(paddle, {time = 7000, x = 70, y = Y+110, delay = 100,transition = easing.linear, onComplete = move})
end

function move()
tween2 = transition.to(paddle, {time = 7000, x = 440, y = Y+110, delay = 100,transition = easing.linear,onComplete = move2})
end

move()

where paddle will be your object for displaying tile and then change x and y co ordinate in the above code according to your use…!!
The above code will move the paddle from left to right…!!

–Pratik Dhake [import]uid: 148046 topic_id: 31266 reply_id: 125042[/import]

Thanks for your answers.

My problem is solved now!

Thanks and regards,

Faisal [import]uid: 176766 topic_id: 31266 reply_id: 125107[/import]

use transition.to() and transition.from() functions…
http://developer.coronalabs.com/reference/index/transitionto

–Pratik Dhake [import]uid: 148046 topic_id: 31266 reply_id: 125041[/import]

function move2()
tween = transition.to(paddle, {time = 7000, x = 70, y = Y+110, delay = 100,transition = easing.linear, onComplete = move})
end

function move()
tween2 = transition.to(paddle, {time = 7000, x = 440, y = Y+110, delay = 100,transition = easing.linear,onComplete = move2})
end

move()

where paddle will be your object for displaying tile and then change x and y co ordinate in the above code according to your use…!!
The above code will move the paddle from left to right…!!

–Pratik Dhake [import]uid: 148046 topic_id: 31266 reply_id: 125042[/import]

Thanks for your answers.

My problem is solved now!

Thanks and regards,

Faisal [import]uid: 176766 topic_id: 31266 reply_id: 125107[/import]