Attaching sound when enemy dies?

Hi guys.
I’ve been making this pretty cool game and I’ve got all coding right and all but what I want to do is when the enemy dies (when hittest with char) I want it to play the sound “ding”. I’ve tried so many things such as attachAudio attachSound etc…
Could someone please tell me exactly what I need to type. The audio name in the library is: ding.

Please reply a.s.a.p!

is this in as2 or as3?

Assuming it’s as3 at the start of the flash do:

var soundURL:URLRequest = new URLRequest(“string to the sound filename”);
var deathSound:Sound = new Sound();

and then in the death function do:

deathSound.play();