It is currently Fri Mar 24, 2017 3:03 am



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Simple swipe
Unread postPosted: Fri May 20, 2016 2:16 am 
Offline
User avatar

Joined: Tue Nov 04, 2014 7:12 am
Posts: 121
Hello!

Simple code for swipe.
"pause 40" value should experiment with
Maybe there is a better value.

Code:
rem swipe test
gr.open 255,0,0,0,0
gr.color 255,200,0,0
label1:
do
gr.touch touched,x1,y1
pause40
until touched
do
gr.touch touched,x2,y2
pause40
until touched
x3=x2-x1
y3=y2-y1
if x3>0 & abs(x3)>abs(y3) then
popup"to right"
elseif x3<0 & abs(x3)>abs(y3)then
popup"to left"
elseif y3>0 & abs(x3)<abs(y3) then
popup"to down"
elseif y3<0 & abs(x3)<abs(y3)then
popup"to up"
endif
pause2000
goto label1

_________________
"Unfortunately I only BASIC to understand. Everything else I need strong help..." :P


Top
 Profile  
 
 Post subject: Re: Simple swipe
Unread postPosted: Tue Oct 18, 2016 6:03 am 
Offline

Joined: Mon Dec 15, 2014 3:57 pm
Posts: 25
Thanks, I was just thinking I wish I had a handy swipe method.


Top
 Profile  
 
 Post subject: Re: Simple swipe
Unread postPosted: Fri Oct 21, 2016 1:22 am 
Offline
User avatar

Joined: Tue Nov 04, 2014 7:12 am
Posts: 121
Thank you!

_________________
"Unfortunately I only BASIC to understand. Everything else I need strong help..." :P


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred