On 7/15/04 6:14 PM, Howard Bornstein wrote:
Since I'm creating and destroying a variety of groups randomly, I need to know which group the mouse is over via some kind of test (the very thing I'm stumped on). Unfortunately, I can't seem to find a way to do this if the mouse is simply within the group rect but not over an object. There are some fairly extreme approaches to solving this problem, but I'm hoping for a simple solution.
I think you'll have to scan the groups on mousemove. Something like:
on mouseMove x,y
repeat with n = 1 to the number of grps
if x,y is within the rect of grp n then
get n
exit repeat
end if
-- now "it" contains the group number
end mouseMoveI had to do something similar in my Klondike game and I was afraid it wouldn't be fast enough, but there was no noticeable lag. I suppose it depends on how many groups you have but it is worth a try.
-- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
