I have a "typewriter" app that stamps letters on the background when you click on the corresponding "keys". The background script specifies that when the y-position is less than a certain value (means you've run out of vertical space), Stop All. (It also specifies that if the x-value gets larger than a certain value, to reset the x-value and decrease the y-value to go to the next line). But after stepping through the Stop All, the typewriter key sprites continue to stamp if you click them, all that happens is that the background script is inoperative. What's happening?
Thanks.
Offline
The thing is:
Stop All really does work... it stops all scripts that are currently running.
HOWEVER,
If you click a key then you start a NEW script running.
Now, to get around this, your keys must check to see if it is OK to allow the key to be pressed, and if it is not ok, just ignore the fact that a key was pressed.
Offline
What I do is this:[blocks]
<when green flag clicked>
<forever>
< if << <mouse down?> <and><touching[ mouse-pointer ] >>>
<stamp>
<end>
<end>
Last edited by scratchisthebest (2009-04-17 13:27:05)





Offline
<when[ X ]key pressed><when[ X Sprite ]clicked>
^^ those blocks will work at anytime, they will start a new script and will work after u hav 'stopped all'
Offline