E-toys questions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

E-toys questions

Blake-5
I got nothing over at the Squeakland mailing list, so I thought I'd try  
these questions here:

1. Can I find out when and where a user clicks in a world, and distinguish  
between right and left clicks?

2. Why is it if I have a script that adjusts an object's position to  
follow the mouse (by changing its X and/or Y by one to move it closer to  
the current mouse position), I get a bobble (i.e., the graphic moves on,  
then off, the mouse cursor repeatedly) if I set the script to fire an odd  
number of times but not if I set it to even?

Thanks!


Reply | Threaded
Open this post in threaded view
|

Re: E-toys questions

Blake-5
On Sun, 19 Mar 2006 13:37:26 -0800, Blake <[hidden email]> wrote:

> I got nothing over at the Squeakland mailing list, so I thought I'd try  
> these questions here:
>
> 1. Can I find out when and where a user clicks in a world, and  
> distinguish between right and left clicks?
>
> 2. Why is it if I have a script that adjusts an object's position to  
> follow the mouse (by changing its X and/or Y by one to move it closer to  
> the current mouse position), I get a bobble (i.e., the graphic moves on,  
> then off, the mouse cursor repeatedly) if I set the script to fire an  
> odd number of times but not if I set it to even?

Jerome Peace answered this one: Apparently an object's X and Y aren't  
necessarily integers.


Reply | Threaded
Open this post in threaded view
|

Re: E-toys questions

karl-8
In reply to this post by Blake-5
Blake skrev:
> I got nothing over at the Squeakland mailing list, so I thought I'd
> try these questions here:
>
> 1. Can I find out when and where a user clicks in a world, and
> distinguish between right and left clicks?
Set the script to fire on mouseUp and set the players position to mouse
x and y.
There is no hooks for right click in e-toys I think.
Karl

>
> 2. Why is it if I have a script that adjusts an object's position to
> follow the mouse (by changing its X and/or Y by one to move it closer
> to the current mouse position), I get a bobble (i.e., the graphic
> moves on, then off, the mouse cursor repeatedly) if I set the script
> to fire an odd number of times but not if I set it to even?
>
> Thanks!
>
>
>
>
> --No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.385 / Virus Database: 268.2.5/284 - Release Date: 2006-03-17
>
>


Reply | Threaded
Open this post in threaded view
|

Re: E-toys questions

Blake-5
On Sun, 19 Mar 2006 21:46:03 -0800, karl <[hidden email]> wrote:

> Blake skrev:
>> I got nothing over at the Squeakland mailing list, so I thought I'd try  
>> these questions here:
>>
>> 1. Can I find out when and where a user clicks in a world, and  
>> distinguish between right and left clicks?
> Set the script to fire on mouseUp and set the players position to mouse  
> x and y.

Thanks!

> There is no hooks for right click in e-toys I think.
> Karl

Ah... OK. I guess we can use modalities to get around it.

        ===Blake===

Reply | Threaded
Open this post in threaded view
|

Re: E-toys questions

karl-8
In reply to this post by karl-8
karl skrev:
> Blake skrev:
>> I got nothing over at the Squeakland mailing list, so I thought I'd
>> try these questions here:
>>
>> 1. Can I find out when and where a user clicks in a world, and
>> distinguish between right and left clicks?
> Set the script to fire on mouseUp and set the players position to
> mouse x and y.
> There is no hooks for right click in e-toys I think.
And the script should be defined for the world player, because it's the
world that receive  the mouseUp.
Karl