Trap/script for arrow keys?
Sarah
sarahr at genesearch.com.au
Thu Mar 6 18:47:00 EST 2003
Judy,
I can't see where you set theXcoord and theYCoord initially. Try
inserting these lines before the "switch" statement:
put item 1 of the loc of btn "Fish" into theXCoord
put item 2 of the loc of btn "Fish" into theYCoord
It seems a bit illogical that you are using left & right arrows to move
up & down and vice versa :-) I think you need to change it so that left
& right change theXCoord and up/down change theYCoord.
Cheers,
Sarah
On Friday, March 7, 2003, at 09:31 am, Judy Perry wrote:
> Still doesn't work:
>
> on arrowKey tKey
> switch tKey
> case "left"
> subtract "10" from theYcoord
> set the loc of btn "Fish" to theXcoord,theYcoord
> break
> case "right"
> add 10 to theYcoord
> set the loc of btn "Fish" to theXcoord,theYcoord
>
> break
> case "up"
> subtract 10 from theXcoord
> set the loc of btn "Fish" to theXcoord,theYcoord
> break
> case "down"
> add 10 to theXcoord
> set the loc of btn "Fish" to theXcoord,theYcoord
> break
> end switch
> end arrowKey
>
>
> ???
>
> Judy
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list