Click and hold play... release stop!

Hi.

I am doing a task in AS3. I’m working on one site for morse codes.

My question is: is it possible to create a button that when you press it and hold it, it will play a sound, and when you release it then stops the sound?

thanks!