ArrowKey Handler in LiveCode 8?

JOHN PATTEN johnpatten at me.com
Sat May 7 00:07:19 CEST 2016


Hi All,

I was going to use the arrow keys to move an object, something like what Devin wrote up a while ago:

on arrowKey pWhich
  # determine some way to designate which object is to be nudged
  put the long id of btn "test" into tSelObj # for example
  switch pWhich
    case "left"
      put -1 into tXamount
      put 0 into tYamount
      break
    case "up"
      put 0 into tXamount
      put -1 into tYamount
      break
    case "right"
      put 1 into tXamount
      put 0 into tYamount
      break
    case "down"
      put 0 into tXamount
      put 1 into tYamount
      break
  end switch
  move tSelObj relative tXamount,tYamount
end arrowKey
…and after a few tests in LiveCode 8, I can’t get anything to budge with the arrowkeys? I opened the same stack in LiveCode 7.06 and it works fine. Something change or is this a bug in 8?

Thank you!


More information about the use-livecode mailing list