[Thread Prev] [Thread Next]
On 17 Aug 2007 at 17:23, askanexpert@xxxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:
> from: <Luvin.Shoppin@xxxxxxxxx>
> date: Fri Aug 17 17:23:54 2007
> platform: PC
> version: MicroWorlds Ex
> How can I stop my turtle using the space bar, and get it to start
> moving again when I push the space bar once more?
You could use something like the switch implemented in this
mw ex project attached.
The slider serves as the switch when the user clicks on the
spacebar and the slider is on 0, then the turtle is activated
and the slider is switched to 1.
Then when slider is in 1, the turtle is deactivated and the
slider is switched to 0 again.
The code in that project is:
if 32 = ascii readchar [
ifelse 0 = on-off
seton-off 1 - on-off
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.
---- File information -----------
Date: 21 Aug 2007, 17:16
Size: 2733 bytes.
Description: Binary data
Previous by thread:
MIA, Ask an Expert: action with keys
Next by thread:
MIA, Ask an Expert: chase with keys
To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.