How do I get the object under the mouse when mouseRelease?

Ken Ray kray at sonsothunder.com
Mon Apr 30 12:31:29 EDT 2007


On Mon, 30 Apr 2007 09:53:26 +0200, Tiemo Hollmann TB wrote:

> Hello again,
> 
> sorry, another newbee question
> 
> I want to realize my own drag and drop handlers with mouseDown,
> mouseRelease, etc. On mouseDown I get the underneath lying object with
> mousecontrol. How do I get the name of an object (image) under the mouse
> when releasing it, because mousecontrol is still the mouseDown object when
> releasing? I created a workaround with a repeat loop on mouseRelease to test
> for every image on my card, if the mouseloc is in the rectangle of image x.
> But I think there must be a more sophisticated and perfomant way in
> revolution?

Sorry, Tiemo... for right now that's the best we've got (AFAIK). I've 
lobbied for the mouseControl to not be tied to the original object on 
mouseDown, but sadly that hasn't happened yet...

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



More information about the use-livecode mailing list