How to make an object move when I swipe my finger up?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ahmedinvent24BUSGdU9
Posts: 43
Joined: Mon Oct 15, 2012 6:44 pm

How to make an object move when I swipe my finger up?

Post by ahmedinvent24BUSGdU9 » Fri Mar 22, 2013 4:40 pm

Hello :)
I have now an object and a line to move the object on, and I added a button when I click on it the object move on the line,,I want to remove the button and use swiping, when i swipe up the object move on line1 , when I swipe down the object move on line2, when I swipe left the object move on line3, when I swipe right the object move on line4, how to make this?

Please help :)

Note: This for mobile devices. (Android)

Thanks
Last edited by ahmedinvent24BUSGdU9 on Fri Apr 12, 2013 12:43 pm, edited 1 time in total.

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: How to make an object move when I swipe my finger up?

Post by Dixie » Fri Mar 22, 2013 7:19 pm

hi ahmedinvent24BUSGdU9

whew.. what a long name !... I don't have the time to adjust the scripts, but if you substitute going from card to card in the stack that is attached with code to move a graphic, it will do what you wish... this stack allows you to swipe to the left or right or up or down...

be well

Dixie
Attachments
swipes.livecode.zip
(2.13 KiB) Downloaded 324 times

ahmedinvent24BUSGdU9
Posts: 43
Joined: Mon Oct 15, 2012 6:44 pm

Re: How to make an object move when I swipe my finger up?

Post by ahmedinvent24BUSGdU9 » Thu Apr 11, 2013 8:36 pm

Hi, Dixie

This is not working!
:(

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: How to make an object move when I swipe my finger up?

Post by Dixie » Thu Apr 11, 2013 8:43 pm

Can't help you... it works here both in the simulator and on an iphone.

Dixie

ahmedinvent24BUSGdU9
Posts: 43
Joined: Mon Oct 15, 2012 6:44 pm

Re: How to make an object move when I swipe my finger up?

Post by ahmedinvent24BUSGdU9 » Thu Apr 11, 2013 8:56 pm

Oops!
I'm Using Android!
Sorry!
How to make it working on Android?

:D

Ahmed F.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: How to make an object move when I swipe my finger up?

Post by Simon » Thu Apr 11, 2013 11:06 pm

Here is the lesson:
http://lessons.runrev.com/s/lessons/m/4 ... ll-a-field
It uses text but you can use a graphic instead.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

ahmedinvent24BUSGdU9
Posts: 43
Joined: Mon Oct 15, 2012 6:44 pm

Re: How to make an object move when I swipe my finger up?

Post by ahmedinvent24BUSGdU9 » Fri Apr 12, 2013 12:41 pm

Hi Simon
So how can I use graphic instead the field?

Thanks
:)

KennyR
Posts: 256
Joined: Thu Jan 19, 2012 4:25 am

Re: How to make an object move when I swipe my finger up?

Post by KennyR » Fri Apr 12, 2013 2:20 pm


Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: How to make an object move when I swipe my finger up?

Post by Dixie » Fri Apr 12, 2013 4:30 pm

ahmedInvent.....

Stack with a graphic on a card... swipe up to move it 'up, swipe 'down' to move it down..

Dixie
Attachments
swipeObject.livecode.zip
(2.09 KiB) Downloaded 307 times

ahmedinvent24BUSGdU9
Posts: 43
Joined: Mon Oct 15, 2012 6:44 pm

Re: How to make an object move when I swipe my finger up?

Post by ahmedinvent24BUSGdU9 » Fri Apr 12, 2013 6:53 pm

Woow!
Thank you Dixie!
But still have a question :D
How to make the swipe left and right?

Best Regards

Ahmed F.

:D :D

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”