Grab Commands

benjamin pastrana pastranadigital at gmail.com
Fri Feb 24 18:28:38 EST 2006


I have the following script in an "barrel" picture: I want to simulate a
barrel making noise
while it's beign moved.

on mousedown
  grab me
   play audioclip "noise.wav"
end mousedown

on MouseUp
stop playing audioclip "noise.wav"
end MouseUp

on mouseEnter
  set the lockCursor to true
  set the cursor to hand
end mouseEnter

on mouseLeave
  set the lockCursor to false
  set the cursor to arrow
end mouseLeave

The thing is that I want only to play the sound
IF the picture is beign dragged.

Right now it plays because it's under the mouseDown...

what is the command that detects the drag action and when its not beign
dragged?

thanks!

Ben



More information about the use-livecode mailing list