Web form report: I want to create a continuous press butt...

19 views
Skip to first unread message

mitappinv...@appinventor.mit.edu

unread,
Mar 4, 2014, 5:03:15 PM3/4/14
to mitappinv...@googlegroups.com
Date Submitted: Tue Mar 04 2014 16:45:07 GMT-0500 (EST)
Email: francis...@gmail.com

Service: MIT App Inventor (App Inventor 2)

Operating System: Windows 8

Browser: chrome

Device: htc one x

Connection: WiFi (Companion)

Issue:
I want to create a continuous press button - so that an event continues to
happen as long as the button is pressed. I can't see how this can be done
in AI2

Comments:


Enis

unread,
Mar 4, 2014, 5:09:19 PM3/4/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu
You can use the button.LongClick block, but it doesn't trigger until you let go.

I believe you can also use a canvas and a timer...  In the canvas, you would have to have an image of your button.  In the timer fired event, you'd have to check the touch properties of the canvas.  That's just a guess though... I've never tried it.  You'll have to experiment a bit.

Taifun

unread,
Mar 4, 2014, 6:54:11 PM3/4/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu
I want to create a continuous press button - so that an event continues to  
happen as long as the button is pressed.
you could use Canvas.TouchDown for starting your event and the Canvas.TouchUp for stopping your event
Taifun
 

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by Taifun.         

Enis

unread,
Mar 4, 2014, 7:28:24 PM3/4/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu
Taifun's right... and during that time, enable a timer and do all of your stuff there, until the finger is lifted and you disable the timer.
Reply all
Reply to author
Forward
0 new messages