Escape audio in flash mx movie

hello, I now doing a application which i need to press the escpe key to skip the audio that playing in the movie. In this application, i have an interface for it which contains some buttons like previous and next buttons, and exit button. So, what should i do to make this happen?? Is it i sholud use onClipEvent (enterFrame) and key.ESCAPE for this?? And, where should i place in this action script as it is use globally. Hope someone can help me out!!! Thanks.

p/s:In this application, i have more than one flash movie.

[AS]var myObject = new Object();
myObject.onKeyDown = function() {
if (Key.isDown(27)) {
// your actions here
}
};
Key.addListener(myObject);[/AS]

Please do NOT crosspost. :-\

If that’s not what you wanted, you can simply tell me here. You don’t need to start a new thread.

Thank you. =)

Hi kax, is me again. Since you not replying the message i sent you, i hope you can read my reply here. I have tried to use the code that you suggested and i put in the interface of my application.
The code is as below:

onClipEvent (enterFrame) {
myObject = new Object();
myObject.onKeyDown = function() {
if (Key.isDown(27)) {
stopAllSounds();
}
};
Key.addListener(myObject);
}

But, is not working. So, i used this code:

onClipEvent (enterFrame) {
if (Key.isDown(27)) {
stopAllSounds();
}
}

And, is worked. So, i wondering what wrong in the first code that you suggested. Is it i used it wrongly??

Beside that, in one of the file that i used for testing, i used the code as below:

mysound = new Sound(this);
mysound.attachSound(“Dialog1”);
mysound.start();
mysound.onSoundComplete = function() {
mysound.stop();
delete mysound;
};

as result, when i press the escape key, the audio will be skipped. But, it will wait for a while to continue the rest of it. It doesn’t straight away go to the next animation in the file. So, what should i do?? Hope you can help me out.