Hi Kelly,
A simple way to do this is using two buttons one for run and one for stop.
In the script for run you hide the button for run and show the button for stop In the script for stop ou hide the button for stopand show the button for run
Then put the buttons at the same place.
From the menu of a script editor, you can get a button for running the script.
The commands hide and show are in the miscelanous category see attached project
________________________________
De: squeakland-bounces@squeakland.org de la part de Kelly Date: ven. 24.02.2006 13:05 À: squeakland@squeakland.org Objet : [Squeakland] newbie(ish) question (buttons)
Hey guys,
Need a little help. I am trying to figure out how to use or (re-use buttons). I have a button to fire a script. eg I have a sketch and when you press the button it runs around the playfield.
I want to be able to click the button a second time to stop the script.
I have tried many things but just cannot quite get there. Any suggestions?? Thanks
Regards
Kelly
squeakland@lists.squeakfoundation.org