plugwatson
03-28-2003, 07:44 PM
Hello, this is some simple sound code but it doesn't work. I have a sound called "KEY" in my library. I get a positive trace for the keyDown event at the right time, also my sound plays when I put into the timeline. Can anyone predict why this would happen/not happen?
onClipEvent (keyDown) {
this.KEYsound.stop();
this.KEYsound.start(0, 1);
}
onClipEvent (load) {
this.KEYsound = new Sound();
this.KEYsound.attachSound("KEY");
this.KEYsound.setVolume(100);
}
onClipEvent (keyUp) {
this.KEYsound.stop();
}
onClipEvent (keyDown) {
this.KEYsound.stop();
this.KEYsound.start(0, 1);
}
onClipEvent (load) {
this.KEYsound = new Sound();
this.KEYsound.attachSound("KEY");
this.KEYsound.setVolume(100);
}
onClipEvent (keyUp) {
this.KEYsound.stop();
}