Is this an event?
Ken Ray
kray at sonsothunder.com
Wed Dec 25 19:21:01 EST 2002
Barry, if you're trying to do a drag and drop, you can use the within()
function, passing the loc of "alpha", along with object to check. Something
like:
repeat with x = 1 to 30
if within(button ("beta" & x),(the loc of btn "alpha")) then
-- do your stuff
end if
end repeat
Hope this helps,
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
----- Original Message -----
From: "Barry Levine" <themacguy at macosx.com>
To: <use-revolution at lists.runrev.com>
Sent: Wednesday, December 25, 2002 4:21 PM
Subject: Is this an event?
> I have an object I'm moving with the mouse by setting a custom
> property. Using a script in that object, I can track whether the "loc"
> of the object (let's call it "alpha") is "within the rect" of another
> object (let's call that object "beta"). However, if I have thirty
> "beta" objects, it seems that I need to account for each unique object
> within alpha's handler. This doesn't seem like the right way to handle
> this. Is there a way to know when alpha's loc is within the rect of any
> other object of a specific type?...and then know which specific object?
>
> If this were a mouseUp event, I know I can simply keep track of the
> target (as explained in the "Track which button a user clicks" thread).
> My guess is that this is somewhat backwards from that as there is no
> Rev event (that I can find) that occurs in "beta" when the loc of
> "alpha" is within the rect of "beta".
>
> As always, any suggestions are greatly appreciated.
>
> Merry Xmas from West of the Pecos!
>
> Barry
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list