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.
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:
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.