messages to buttons when the mouse is already down

Philip Usher usher at iqcisp.com
Mon Jan 21 19:43:01 EST 2002


on 1/21/02 5:34 PM, "Michael J. Lew" <michaell at unimelb.edu.au> wrote:

> How can I get the other buttons to hilight without requiring the user
> to click each individually?

Michael, try this in the card script

on mouseDown
  repeat while the mouse is down
    get the mouseLoc
    repeat with n = 1 to the number of btns
      if it is within the rect of btn n then
        set the hilite of btn n to true
      else
        set the hilite of btn n to false
      end if
    end repeat
  end repeat
end mouseDown

Cheers,  Philip






More information about the use-livecode mailing list