Page 1 of 1

Home and Away

Posted: Fri Jul 05, 2024 12:24 pm
by richmond62
Checking if the location of an object is the same as the loc of another object:
-
Screenshot 2024-07-05 at 15.22.16.png
Screenshot 2024-07-05 at 15.22.16.png (67.24 KiB) Viewed 538 times
-

Code: Select all

on mouseUp
   if the loc of img "frog" is the loc of grc "rr" then
      put "Home" into fld "ff"
   else 
     put "Away" into fld "ff"
   end if
end mouseUp

Re: Home and Away

Posted: Fri Jul 05, 2024 1:30 pm
by micmac
Hi Richmond

Would it not be better to use "within" since there is only one point where the loc is the same?

Mic

Re: Home and Away

Posted: Fri Jul 05, 2024 1:31 pm
by richmond62
Would it not be better to use "within" since there is only one point where the loc is the same?
Checking if the location of an object is the same as the loc of another object.

I use this code to check if the 2 locations coincide, and NOT if an image is inwith the boundaries of another object: that is something else. 8-)