I have a button with the following script below. On using the mouseDown for this 
button, the user can drag this button and its associated buttons and field anywhere on 
the screen. Is there a better way to do it?
How can all this be changed to a palette?
mike
[EMAIL PROTECTED]

on mouseDown
  toComputer
  global dx, dy
--  lock screen
  set lockmessages to true
  put mouseLoc() into mousePos
  put the loc of me into buttonPos
  put item 1 of buttonPos - item 1 of mousePos into dx
  put item 2 of buttonPos - item 2 of mousePos into dy
end mouseDown

on mouseStillDown
  toComputer
  global dx, dy
  set lockmessages to true
  get mouseLoc()
  add dx to item 1 of it
  add dy to item 2 of it
  lock screen
  set the location of me to it
  set the topLeft of field "answer" to the left of me, the bottom of me-1
  set the topLeft of bg btn  "close" to the left of me+2, the bottom of me-17
  set the topLeft of bg btn  "SELECT" to the left of me+20, the bottom of me-19
  set the topLeft of bg btn  "export" to the left of me+120, the bottom of me-19
  set the topLeft of bg btn  "compute" to the left of me+190, the bottom of me-19
end mouseStillDown
on toComputer
  
  lock recent
  lock messages
  lock screen
end toComputer


Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to