You need an Xtra if you want to make the actual cursor behave in this way.
BUT you can try another path instead, which doesn�t include Xtras and thus
might be preferrable:

1.Place a sprite on stage. Then make this sprite follow the cursor position
with Lingo. Something like this in the spritescript, to start with:

property spritenum

on exitFrame me
--make the sprite that this behavior belongs to follow the cursor
 sprite(spritenum).loc=the mouseLoc
end

2. Then for the nice trick: make the actual cursor invisible. Now the sprite
can become your new cursor. Of course it is nice if the sprite looks like a
cursor... You can add this handler in the same script to make the cursor
invisible (works only inside the stage area but I consider that a good
thing):

on beginSprite me
--make the cursor invisible
  cursor 200
end

3. You could then draw a shape on stage, say in channel 1. If the sprite
that follows the (now invisible) cursor is in channel 2 you could then add
this to for example the spritescript of the shape:

on beginSprite me 
set the constraint of sprite 2 to 1
end

This will constrain the movements of the cursor-following sprite to your
shape. You should change the cursor back to normal with a

cursor -1

command somewhere else, if you don�t want to use the sprite through your
whole movie.

The cursor-following sprite "lags" a bit. I think this is OK as long as you
don�t actually see the real cursor, but you might think otherwise depending
on the situation. 
You might make the cursor-following sprite perform better with a higher
frame rate, by using the actorList to move things around instead of
exitFrame, by using repeat loops (not good in other aspects though) and
perhaps many other things. This works though, and it doesn�t need an Xtra,
but of course you might need the Xtra solution for other practical reasons
that I don�t know of... Good luck, anyway!
/MoL

Den 01-10-23 19.29, skrev "Thomas" <[EMAIL PROTECTED]>:

> Hi people, how do I do to lock the mouse inside a box in lingo?
> 
> Thanks,
> Thomas - [EMAIL PROTECTED]
> ICQ: 48187775
> 
> 
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
> email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
> Lingo-L is for learning and helping with programming Lingo.  Thanks!]
> 


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to