Two possible solutions.

1) Simplest fix. Store "the mouseLoc" into a local variable then check against the local variable. "the mouseloc" is a system call which chews up time. Do this instead:

theCurrentMouseLoc = the mouseLoc
repeat with i = 1 to nRects
if inside(theCurrentMouseLoc, hitList[i]) then
-- whatever

Also be sure to pre-calculate the number of rects before hand. That is, do NOT do:

repeat with i = 1 to count(hitList)

2) Is there some good reason why you have a list of rects? Is it dynamic? Might it be just as easy (with less programming effort) to have a bunch of invisible rectangle sprites each with a single behavior that changes the cursor in their "on mouseEnter"/"on mouseLeave" handlers?

Irv

At 12:05 PM -0500 10/18/02, [EMAIL PROTECTED] wrote:
I've got a number of screens that have a hitlist - a list of rects that
are hot.

I've got a repeat loop checking the inside(the mouseloc, hitlist[i]) and
making the cursor a hand, exiting the repeat if true.

On slower systems I'm told that the cursor flickers since the hotrect
might be later in the list than some.

What's the best way of handling this?

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/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!]

--

Lingo / Director / Shockwave development for all occasions. (Home-made Lingo cooked up fresh every day just for you.)
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/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