mouse is down on Android

Dan Friedman dan at clearvisiontech.com
Wed May 8 12:24:11 EDT 2013


Greetings!

I have noticed that "the mouse is down" always returns false on Android.  So, I am looking for a workaround.  Here's my scenario:

Lets say the user wins a 100 points.  As each point is given, a bell goes off and the win count is increased for the user to see.  On iOS, I simply check if "the mouse is down", and it if is, I exit the loop and award all the points.  This gives the user a way to jump to the end - like a slot machine.

I tried this:

on touchStart touchID
  global touchCount
  add 1 to touchCount
end touchStart

on doWinner winAmount
  global touchCount
  
  put 0 into touchCount
  
  repeat winAmount
    if touchCount > 0 then

      --do final totals stuff

      exit repeat
    end if
    
    addOneCredit
    wait 2 ticks 
  end repeat

end doWinner

But, touchCount never increases during the repeat.  As you can see, I even stuck in a wait command hoping it might help.  Nadda.  Any thoughts or ideas?

Thank you in advance!

-Dan



More information about the use-livecode mailing list