On 18 Jan 2004, at 17:06, [EMAIL PROTECTED] wrote:


Message: 4
Date: Sun, 18 Jan 2004 02:07:45 EST
From: [EMAIL PROTECTED]
Subject: Re: Restricting graphics to a field?
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="US-ASCII"

 on checktool
   if the tool <> "browse"
   then choose browse tool
   send "checktool" to me in 10 milliseconds
 end checktool

this looks suspiciously like...
on idle!

Yes, it is the cpu-friendly way to do idle.

It will also prevent you selecting any other tool. A back-door trap may be
useful such as 'if the shiftkey is down and the tool <>"browse tool" then...'


/H

As the mousemove handler is not suspended in Revolution when choosing a graphic, paint or pointer tool, there is still another way to do this. In this example the canvas is outside of the field. Set the script of the card to:

on mousemove
if the mouseloc is within the rect of fld "border" then set the cantmodify of this stack to true
else set the cantmodify of this stack to false
end mousemove


### if the mouse leaves the card and/or if the "border" field is flush with or passing the sides of the card
on mouseleave
if the short name of the target is in "card id < id of your card >,border" then set the cantmodify of this stack to false
end mouseleave


Greetings,
WA

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to