Jumping Jack Flash
richmondmathewson at gmail.com
Sat Jul 4 11:11:54 EDT 2015
On 04/07/15 15:10, Paul Dupuis wrote:
> On 7/4/2015 4:47 AM, Richmond wrote:
>> One of the children on my Summer course was having 'problems' with
>> animating a 'person'
>> to jump [ think "Super Mario"].
>> Well, I don't know what he is doing this weekend, but it took me all
>> of 15 minutes to knock together a basic walker-cum-jumper:
>> File: Walker.zip
>> HOWEVER, there is a slight snag insofar as that having been bashing
>> the left arrowKey, when I bash the up arrowKey (to generate a jump),
>> the character jumps, but then continues to execute the code stored
>> from my pressing the left or right key for far too long than is
>> The same thing happens if I press the left key repeatedly, then the
>> right key once.
>> SO, what I need is some sort of INTERRUPT code so that when I press a
>> new arrowKey all previous information fed by my key bashing gets lost.
> flush the pendingMessages of the queued arrowKey messages you no longer
> want (see 'the pendingMessages' and 'cancel' entries in the dictionary)
Well, I tried flushEvents("all"), flushEvents("keyDown"),
to no effect . . .
Mind you, I am not sure if I can understand what the dictionary says
or maybe the fact is that the entry really isn't comprehensive.
More information about the Use-livecode