Maintaining touch/tap event problem

Hello everyone. I am new in corona SDK. Trying to made a game for my 4th semester project. I wanted to make a game where if i touch the screen the object will go up until i remove my hand from screen. How can i handle that? I tried to use a runtime event touch and tap both but can’t handle. Touch events have three phase and it will pass event signal when one of them occur. If i touch screen, “began” started but no event occur until i move my finger. How can i solve this problem?

Hi sulaiman.sust,

Welcome to Corona!

Here is a tutorial that might help you. http://thatssopanda.com/corona-sdk-tutorials/moving-a-character-left-and-right-with-corona-sdk/

While it does vary a bit from what you are looking to do, the concepts are the same.

Hope this helps!

Eric

Thanks for your reply. Looking at your sample

there is nothing what i wanted. I wanted to know if i touch on screen, “began” phase start, if i don’t move my finger from there no event occur. In my game’s at that time game character should go up. How can i handle this without having any event detecting? can anyone help please

Here is our Tutorial on the subject;

http://coronalabs.com/blog/2014/02/04/tutorial-continuous-actions-in-corona/

Hi sulaiman.sust,

Welcome to Corona!

Here is a tutorial that might help you. http://thatssopanda.com/corona-sdk-tutorials/moving-a-character-left-and-right-with-corona-sdk/

While it does vary a bit from what you are looking to do, the concepts are the same.

Hope this helps!

Eric

Thanks for your reply. Looking at your sample

there is nothing what i wanted. I wanted to know if i touch on screen, “began” phase start, if i don’t move my finger from there no event occur. In my game’s at that time game character should go up. How can i handle this without having any event detecting? can anyone help please

Here is our Tutorial on the subject;

http://coronalabs.com/blog/2014/02/04/tutorial-continuous-actions-in-corona/