
I want to play a sound when clicking on a button. I know how to do it. But do I have to put the script into every button I want to play that sound file or is there a way to make it easier and automatic apply a command to all buttons on the stack?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
on mouseUp
if word 1 of the name of the target is "button" then
-- make a jazz noise here
end if
end mouseUp
Code: Select all
on mouseUp
if word 1 of the name of the target is "button" and the name of the target contains "play" then
-- make a jazz noise here
end if
end mouseUp