> Never mind, cheer up!
> 
> I just set up a stack consisting of one card and an image called "gl", and a
> field called "POZ".
> 
> I put this into the card script:
> 
> on mouseMove
>     if the mouseLoc is not within the rect of img "GL" then
>        put "outwith" into field "POZ"
>     else
>        put "inwith" into field "POZ"
>        end if
> end mouseMove
> 
> and this works REGARDLESS as to whether the mouse button is DOWN or UP .
> . .  :)

Yes, this is one of the idiosyncracies of LC, going way back to when it was
MetaCard... once you mouseDown on an object, the target remains the
originally clicked object even if you ask for things like mouseControl,
mouseChar, mouseChunk, etc. The only current way is through polling during
mouseMove, which, although ugly, is usually fast enough even if you have
hundreds of objects:


on mouseMove
    if the mouse is down then
        repeat with x = 1 to the number of controls
           if the mouseLoc is within the rect of control x then
               -- do what you want to do with it
           else
               -- take some other action
           end if
       end repeat
   end if
end mouseMove

Personally I'd like to kick that concept to the curb and have all mouseXXX
function relate to where the actual mouse *is*, regardless of whether it's
state is up or down...


Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Web Site: http://www.sonsothunder.com/



_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to