When the mouse is down, mouseEnter messages are not sent to underlying objects. In the Rev dictionary for “mouseEnter”:
“If the mouse button is down when the mouse pointer enters the control, no mouseEnter message is sent unless the mouse button is released while the pointer is still in the control.”
You can get your sound played with dragEnter instead:
Code: Select all
on dragEnter
play audioclip "Bird-chirp (Red Lories) animals120.wav"
-----
------- etc
end dragEnter
... in the script of your image. For the dragEnter message to be sent, a drag and drop must be first initiated by setting the dragData property. If the user selects text in an unlocked field, then click/drags it, the dragData is set to the selected text. For locked fields, or other controls e.g. buttons, set the dragData in the mouseDown of their scripts, e.g. if you put the following in the script of a button:
Code: Select all
on mouseDown
set the dragData["Text"] to "Hello"
end mouseDown
... click the button and drag the mouse into your image, it would receive a dragEnter message, and play the audioclip. The section “Initiating a Drag Drop” in the Rev User Guide is a useful discussion of the range of messages sent during drag drops. It’s not a feature I’ve used extensively myself, so I hope I’m being relevant to your question.
Regards,
Michael