Re: Flipping graphic with a Key WORKING

2010-10-14 Thread Michael Kristensen
Hi again Thanks for all replyes and thanks to all that suggested setting a flag This script by Malte is working: try setting a flag before doing the flipping: on keydown pkey if pkey = "f" then if not the hasFlipped of me then set the hasFlipped of me to true DoTheFli

Re: Flipping graphic with a Key

2010-10-14 Thread Malte Brill
Hi, try setting a flag before doing the flipping: on keydown pkey if pkey = "f" then if not the hasFlipped of me then set the hasFlipped of me to true DoTheFlipping end if end if pass keydown end keydown on keyUp pkey if pkey = "f" then

Re: Flipping graphic with a Key

2010-10-14 Thread Ben Rubinstein
On 14/10/2010 00:14, J. Landman Gay wrote: On 10/13/10 5:34 PM, Ben Rubinstein wrote: However, have you tried Jim Lambert's suggestion of using the keyUp event? AFAIK, LiveCode processes auto-repeating keys (at least on Mac) as repeated keyDown events; but it only sends a keyUp event when the k

Re: Flipping graphic with a Key

2010-10-13 Thread Michael Kristensen
Jim! . it didnt work. on keydown pkey if pkey = "f" then DoTheFlipping end if pass keydown end keydown on keyUp pkey if pkey = "f" then DoThe_UN_Flipping end if pass keyUp end keyUp Mic ___ use-revolution mailing

Re: Flipping graphic with a Key

2010-10-13 Thread James Hurley
Message: 29 Date: Wed, 13 Oct 2010 23:33:06 +0200 From: Michael Kristensen Subject: Re: Flipping graphic with a Key To: use-revolution@lists.runrev.com Message-ID: Content-Type: text/plain; charset=US-ASCII; format=flowed Hi Thanks for the reply's I m sorry to report that ne

Re: Flipping graphic with a Key

2010-10-13 Thread J. Landman Gay
On 10/13/10 5:34 PM, Ben Rubinstein wrote: However, have you tried Jim Lambert's suggestion of using the keyUp event? AFAIK, LiveCode processes auto-repeating keys (at least on Mac) as repeated keyDown events; but it only sends a keyUp event when the key is released. If you're right I'll be em

Re: Flipping graphic with a Key

2010-10-13 Thread J. Landman Gay
On 10/13/10 4:33 PM, Michael Kristensen wrote: Hi Thanks for the reply's I m sorry to report that neither flushEvents("autoKey") flushEvents("all") or Jacquelines script: on keydown pkey if pkey = "f" then doTheFlipping send "checkKey" to me in 0 else pass keydown end if end keydown comman

Re: Flipping graphic with a Key

2010-10-13 Thread Ben Rubinstein
On 13/10/2010 22:33, Michael Kristensen wrote: Thanks for the reply's I m sorry to report that neither .. or ... ...did have any effect on stopping the repeated keyDown. I don't think you can stop the repeated keyDown; the OS will keep sending the keyDown events, LiveCode will keep r

Re: Flipping graphic with a Key

2010-10-13 Thread Michael Kristensen
Hi Thanks for the reply's I m sorry to report that neither flushEvents("autoKey") flushEvents("all") or Jacquelines script: on keydown pkey if pkey = "f" then doTheFlipping send "checkKey" to me in 0 else pass keydown end if end keydown command checkKey if "102" is in

Re: Flipping graphic with a Key

2010-10-13 Thread Jim Lambert
Try this? on keydown pkey if pkey = "f" then DoTheFlipping end if pass keydown end keydown on keyUp pkey if pkey = "f" then DoThe_UN_Flipping end if pass keyUp end keyUp Jim Lambert ___ use-revolution mailing li

Re: Flipping graphic with a Key

2010-10-13 Thread J. Landman Gay
Michael Kristensen wrote: How do I avoid the repetition of the keyDown message? You'll need to set up a "send" structure that checks the keysdown(). Something like this: on keydown pkey if pkey = "f" then doTheFlipping send "checkKey" to me in 0 else pass keydown end if en

Re: Flipping graphic with a Key

2010-10-13 Thread William de Smet
Hi there, Maybe you van use 'flushEvents'? Check the dictionary for this. Greetings, William 2010/10/13 Richmond : >  On 10/13/2010 04:35 PM, Michael Kristensen wrote: >> >> Hi there >> >> I want to flip a graphic while key "F" is down and when it is released the >> graphic shall flip back ag

Re: Flipping graphic with a Key

2010-10-13 Thread Richmond
On 10/13/2010 04:35 PM, Michael Kristensen wrote: Hi there I want to flip a graphic while key "F" is down and when it is released the graphic shall flip back again. if it was a mouseDown handler it would go like this: on mouseDown put the points of graphic into oldPoints DoTheFlippi

Flipping graphic with a Key

2010-10-13 Thread Michael Kristensen
Hi there I want to flip a graphic while key "F" is down and when it is released the graphic shall flip back again. if it was a mouseDown handler it would go like this: on mouseDown put the points of graphic into oldPoints DoTheFlipping wait while the mouse is down