[Squeakland] please help - trouble with mouseDown, mouseUp, and looklike

Nicholas Bennett nicholasjbennett at hotmail.com
Tue Sep 2 17:05:36 PDT 2008


Scott,
 =

Thanks for the help, your suggestion works perfectly for me.
 =

regards,
Nicholas> CC: squeakland at squeakland.org> From: scott.wallace at squeakland.org=
> To: nicholasjbennett at hotmail.com> Subject: Re: [Squeakland] please help -=
 trouble with mouseDown, mouseUp, and looklike> Date: Mon, 1 Sep 2008 18:33=
:58 -0700> > On Sep 1, 2008, at 3:27 PM, Nicholas Bennett wrote:> > > I hav=
e some odd behavior. It seems like what I am doing is > > reasonable and th=
e kind of thing anyone might want to do, I am > > hoping someone can tell m=
e how I am misunderstanding.> >> > I want to get the effect of a sketch but=
ton via eToys scripting - to > > let the kids make an active and engaging b=
utton to fire a script. It > > should change it's image to a 'button down' =
version on mouseDown and > > restore it on mouseUp.> >> > I tried the follo=
wing:> > a - paint a sketch> > b - make a script, 'down', to 'sound croak',=
 set it to run on > > mouseDown> > c - make a script, 'up', to 'sound motor=
', set it to run on mouseUp> > That all works fine - you get the appropriat=
e sound on the up and > > down events.> >> > Now to extend it to make the b=
utton up/down appearance:> > 1 - prepare two sketches for up and down> > 2 =
- add 'sketch lookslike downSketch' to the 'down' script> > 3 - add 'sketch=
 lookslike upSketch' to the 'up' script> > Only the 'down' script now fires=
. If I turn the 'down' script to run > > normally then the 'up' script runs=
 on mouseUp.> >> > What am I doing wrong? How can I get the effect I am loo=
king for?> > > Hi Nicholas,> > To get this to work, don't use "look like", =
which changes the identity > of the morph that is fielding the mouse-down/m=
ouse-up sequence in mid- > stream.> > Instead, use assignment statements to=
 assign appropriate values to the > "graphic" slot of your button, using a =
script such as:> =

_________________________________________________________________
Get ideas on sharing photos from people like you.  Find new ways to share.
http://www.windowslive.com/explore/photogallery/posts?ocid=3DTXT_TAGLM_WL_P=
hoto_Gallery_082008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://squeakland.org/pipermail/squeakland/attachments/20080902/88f991=
b6/attachment.htm


More information about the Squeakland mailing list