I'm developing a children's program. Small children tend to repeatedly tap a button/field. This unfortunately triggers multiple events and so the program does not stop at the appropriate time. The following code works for windows operating systems. But flushevents does not work for android applications. Disable does not work either. Events are still stored. Any ideas would be appreciated.
lock screen
wait 5 seconds
get flushevents ("all") -- <------------
unlock screen
Lock screen and disable user input
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Lock screen and disable user input
Hi Joe,
in situatuons like these I usually show a filled(!) graphic on top of the card
with its INK set to "noop" and give it a dummy script:
That will "catch" all TAPping and can be hidden again when TAPping is allowed again.
You get the picture.
Best
Klaus
in situatuons like these I usually show a filled(!) graphic on top of the card
with its INK set to "noop" and give it a dummy script:
Code: Select all
on mouseup
## nada :-)
en mouseup
Code: Select all
...
show grc "eventcatcher"
lock screen
wait 5 seconds
hide grc "eventcatcher"
unlock screen
...
Best
Klaus
Re: Lock screen and disable user input
have a look at 'mobileClearTouches' in the dictionary...
Re: Lock screen and disable user input
Ah, "mobileClearTouches", cool, thanks for the hint 

Re: Lock screen and disable user input
Added the following to my program and its works great. I will also try the filled(!) graphic on top of the card approach.
Thank you both for the help. - Joe
if the environment is "mobile" then mobileClearTouches
else
get flushevents ("all") -- <------------
end if
Thank you both for the help. - Joe
if the environment is "mobile" then mobileClearTouches
else
get flushevents ("all") -- <------------
end if