On 4/23/2016 1:00 PM, RM wrote:
(pseudocode)

on arrowKey ArKey
  if ArKey = "right" then
    move object in some way this line defines
    send signal to object to initiate animation script within object
  end if
end arrowKey

when I hit my right arrow key ONCE the object moves and then animates ONCE.

HOWEVER, if I keep my finger on the right arrow key the movement
repeats, but the multiple
instances of the "send signal to object" scriptLine get "saved up" and
fire at the point I take my finger
off the arrow key;

The signals are added to a queue but don't get a chance to fire, presumably because the arrowkey message is happening repeatedly. Queued messages need some idle time before they'll execute.

This might work better if you add "without waiting" to the move command, allowing the handler to continue immediately, and then call the animation handler directly without using "send".

How can I tell when an end-user ('punter') has stopped pressing an arrowKey?

Try rawKeyUp, but you may not need that if you change the move command.

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

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

Reply via email to