[squeakland] point towards the mouse?

Darius Clarke socinian at gmail.com
Wed Nov 11 02:02:26 EST 2009


For point 1 you can use the slope formula m = (y1-y2)/(x1-x2) and then
arcTan m to get degrees.

arcTan may have to come from Smalltalk mode.

Cheers,
Darius

On Tue, Nov 10, 2009 at 10:53 PM, Hilaire Fernandes <
hilaire.fernandes at edu.ge.ch> wrote:

> For point 2.,  you may have to write the script in Smalltalk mode then
> use the code
>
> ActiveHand x to get abscissa of the mouse pointer
>
> Hilaire
>
>
> 2009/11/11 Bill Kerr <billkerr at gmail.com>:
> > 1) Is it possible to get an arrow to point towards the mouse pointer in
> > etoys?
> > I can get it to point towards a box which is being moved with the mouse
> with
> > this script: arrow's heading <-- arrow's bearing to box
> > In the world menu in the playfield pane there are mouse x and mouse y
> > detectors but arrow's bearing will not accept those detectors as input to
> > replace just the box part
> > 2) I also wanted to detect a mouse click but can't see any way to do
> that.
> > The input pane in the world menu detects last keystroke but not a mouse
> > click.
> > _______________________________________________
> > squeakland mailing list
> > squeakland at squeakland.org
> > http://lists.squeakland.org/mailman/listinfo/squeakland
> >
> >
>
>
>
> --
> http://blog.ofset.org/hilaire
> _______________________________________________
> squeakland mailing list
> squeakland at squeakland.org
> http://lists.squeakland.org/mailman/listinfo/squeakland
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakland.org/pipermail/squeakland/attachments/20091110/5c364712/attachment-0001.html


More information about the squeakland mailing list