[Squeakland] newbie(ish) question (buttons)

Darius Clarke socinian at gmail.com
Fri Feb 24 09:44:58 PST 2006


You can also toggle the button's color or text on click and then have the
sketch's motion script test the button's color or text.

Cheers,
Darius

On 2/24/06, Darius Clarke <socinian at gmail.com> wrote:
>
> 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/0a177d46/attachment.htm


More information about the Squeakland mailing list