On 4/30/07 11:30 AM, "J. Landman Gay" <[EMAIL PROTECTED]> wrote:
> If you do have to use your own handlers, then you could scan all the > objects when the mouse goes up: > > on mouseUp > put the mouseloc into tXY > repeat with x = 1 to the number of controls > if tXY is within the rect of control x then > -- do what you need > exit repeat > end if > end repeat > end mouseUp > > But this way can be time-consuming if you have many controls. The > built-in commands and functions are much better. There's another way that's fast even for many controls. Here's a description posted last month: On 3/19/07 3:38 AM, "Dick Kriesel" <[EMAIL PROTECTED]> wrote: > Here's another technique for identifying the object at the mouseLoc. This > technique is different because it works with no repeat loop, no checking the > visible or the rect of any object, no formulas based on the mouseLoc, and no > reference to the mouseControl. > > Create a button named "mouseObject" with the following script: > > -- <script> > local sMouseObject > > on mouseObject > if line 1 of the frontscripts is not long id of me then > insert script of me into front > lock screen > click at the mouseloc > unlock screen > remove script of me from front > return sMouseObject > end if > end mouseObject > > on mousedown > end mousedown > > on mouseUp > put long id of the target into sMouseObject > end mouseUp > -- <script/> > > Then to test it, put the following handler into the stack script: > > -- <script> > on mouseMove > call "mouseObject" of button "mouseObject" of me > put the result > end mouseMove > -- <script/> > > The technique passed my tests. Does it work for you? > > -- Dick _______________________________________________ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution