MouseMove message interrupted when I change cards

David Epstein dfepstein at
Wed Nov 11 16:32:32 EST 2015

Thanks to Scott Rossi, whose example is indeed what I am trying to do, and to Matt Maier, who warns me that there are aspects of mouseMove I don't quite understand.
In trying to see why Scott's example works and mine does not, I discovered that my "mouseleave" handler seemed to be the problem.  If I have "on mouseleave, go card 1, end mouse leave" in my script, then the mouseMove message stops firing after it triggers one change of card, perhaps because that change of card makes LC think I have "left" the control my mouse was moving in.  (But why does it not still detect a "mousemove" on that same control on the card I have moved to?  It seems like mouseMove doesn't start reporting unless there has been a "mouseEnter" event, and with my change of card my mouse did not enter the control because it was already in it).
Adding my mouseLeave handler to Scott's script won't show this unless I also change the points of his polygon so that it is a single rectangle rather than 3 non-adjacent rectangles.  With his polygon, the mouse really is "leaving" and then re-entering the polygon when it moves from one rectangle to the next; so that on each change of card there is a new mouseEnter event that restarts the mouseMove message stream.
I tried Matt’s idea of catching all mouseMoves, but still had problems.  So I have placed the entire “quick browse” diagram in a separate palette, where mouseMove is not bothered by card changes in the main stack.
David Epstein

More information about the use-livecode mailing list