Kill Messages

dunbarx at aol.com dunbarx at aol.com
Thu Apr 10 12:08:23 EDT 2014


A bit cavalier about doing this with rawKeyDown. It would be a little different, something like:



on rawkeydown var
   if  var= 65363 then
      set the loc of btn 1 to item 1 of the loc of img 1 + 1 & "," & item 2 of the loc of img 1
   end if
end rawkeydown


Craig





-----Original Message-----
From: dunbarx <dunbarx at aol.com>
To: use-livecode <use-livecode at lists.runrev.com>
Sent: Thu, Apr 10, 2014 12:02 pm
Subject: Re: Kill Messages


Most times these things can be solved by rethinking, And I say this having no 
idea what you were thinking. Try this in the card script:



on arrowKey var
   if  keysDown() = 65363 then
      set the loc of btn 1 to item 1 of the loc of img 1 + 1 & "," & item 2 of 
the loc of img 1
   end if
end arrowKey


Note this can be done with a rawKeyDown handler just as well.


Craig Newman


-----Original Message-----
From: Ray <ray at linkit.com>
To: use-livecode <use-livecode at lists.runrev.com>
Sent: Thu, Apr 10, 2014 11:41 am
Subject: Kill Messages


I've written a handler which nudges a selected image when an arrow key 
is pressed.  The problem is if the user holds the arrow key down for a 
few seconds the messages get backed up.  When the user finally lets the 
arrow key up the object keeps nudging across the screen.

I've tried to stop the nudging with the keysDown() function but not 
having any luck.  I need some way to detect there are no keys down and 
kill any messages which have been backed up.

Ray Horsley
LinkIt! Software

_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 



More information about the Use-livecode mailing list