[Squeakland] newbie(ish) question (buttons)
Darius Clarke
socinian at gmail.com
Fri Feb 24 09:39:17 PST 2006
Hi Kelly,
This works for me.
Make a new variable by clicking the sketch's (v) button (right next to its
name in the Viewer flap for the the sketch).
Give the field a name, like motionToggle.
Now make a script with a test. For the "test" part of the test structure,
drag the new variable out of the flap and into the "test". Change the
condition to "= true". Put your sketch motion in the "Yes" part of the test.
Check that the motionToggle variabe works controling the motion by toggling
it from true to false in the flap.
Now on you button click script add another test.
If motionToggle is "true" assign it "false".
If motionToggle is "fales" assign it "true".
The attached gifs are similar to what you need, but not exactly .
Let us know if you need more help.
Cheers,
Darius
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://squeakland.org/pipermail/squeakland/attachments/20060224/796340e7/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VariableButton.gif
Type: image/gif
Size: 1626 bytes
Desc: not available
Url : http://squeakland.org/pipermail/squeakland/attachments/20060224/796340e7/VariableButton.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VariableAssignment.gif
Type: image/gif
Size: 2675 bytes
Desc: not available
Url : http://squeakland.org/pipermail/squeakland/attachments/20060224/796340e7/VariableAssignment.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SketchTest.gif
Type: image/gif
Size: 4614 bytes
Desc: not available
Url : http://squeakland.org/pipermail/squeakland/attachments/20060224/796340e7/SketchTest.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ButtonTest.gif
Type: image/gif
Size: 5401 bytes
Desc: not available
Url : http://squeakland.org/pipermail/squeakland/attachments/20060224/796340e7/ButtonTest.gif
More information about the Squeakland
mailing list