Problem with Arrow keys
Problem with Arrow keys
- Subject: Problem with Arrow keys
- From: Walt Sterdan <email@hidden>
- Date: Wed, 6 Apr 2005 08:55:18 -0500
I'm getting an odd result when using the Up- and Down-Arrow keys as keyboard equivalents for buttons.
While testing a short walkthrough for a 3D maze, I have two buttons, "Forward" and "Reverse"; pressing the buttons "walks" the user through a 5-step maze. Pressing the buttons works 100%, and the program cycles through the five frames.
I added the arrow keys ("Up-Arrow" for forward, "Down-Arrow" for reverse) and the program steps through the first four frames, then jumps back to the second frame, then walks through again to the correct finish. This happens with either button.
I then changed the keyboard equivalents to "8" and "2" and the cycles perform correctly. It's only when the arrow keys are used that strange things happen.
Here's a fragment of the code used:
on clicked theObject
if the name of theObject is "Forward" then
set image of image view "MazeView" of window "main" to load image "003"
delay 1
set image of image view "MazeView" of window "main" to load image "004"
delay 1
set image of image view "MazeView" of window "main" to load image "005"
delay 1
set image of image view "MazeView" of window "main" to load image "006"
delay 1
set image of image view "MazeView" of window "main" to load image "007"
else if the name of theObject is "Reverse" then...
Any thoughts?
-- Walt Sterdan, Freelance
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden