My buttons all work with left and right clicks.
I expected I could restrict the button script
to a left click with "on mouseDown 1" but
seems not. The docs mention theButton which
I expect is a variable holding the button number
but beyond that .....zero.
All suggestions considered.
Left button, right button...
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Left button, right button...
Life is just a bowl of cherries.
All this is in fact in the docs!
From the entry for "mouseup":
##############
Parameters:
The mouseButtonNumber specifies which mouse button was pressed:
* 1 is the mouse button on Mac OS systems and the left button on Windows and Unix systems.
* 2 is the middle button on Unix systems.
* 3 is the right button on Windows and Unix systems and Control-click on Mac OS systems.
###############
Here an example for your convenience:
Same applies for "mousedown" etc., of course.
Regards
Klaus
From the entry for "mouseup":
##############
Parameters:
The mouseButtonNumber specifies which mouse button was pressed:
* 1 is the mouse button on Mac OS systems and the left button on Windows and Unix systems.
* 2 is the middle button on Unix systems.
* 3 is the right button on Windows and Unix systems and Control-click on Mac OS systems.
###############
Here an example for your convenience:
Code: Select all
on mouseup num_o_button
switch num_o_button
case 1
## handle left (normal) mouse click
break
case 2
## handle middle mouse click
break
case 3
## handle right mouse click
break
end switch
end mouseup
Regards
Klaus
Left button, right button...
Klaus
Read all I could find in the docs but didn't
find an example and never would have
figured it out.
Seems that "on mouseUp 1" or
"on mouseUp(1) or "on mouseUp,1"
would be a logical system which would
obviate the need for "case" statements etc.
Anyway, thanks for the example.
Read all I could find in the docs but didn't
find an example and never would have
figured it out.
Seems that "on mouseUp 1" or
"on mouseUp(1) or "on mouseUp,1"
would be a logical system which would
obviate the need for "case" statements etc.
Anyway, thanks for the example.
Life is just a bowl of cherries.