PDA

View Full Version : sound KeyDown


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();
}

plugwatson
03-28-2003, 10:29 PM
Apologies but I have moved this question to a thread with the same name but in the forum 'actionscripting'. Sorry to all forum purists. I shouldn't be calling myself a newbie and neither should DaMacMan or whatever! XML?! I haven't even got HTML!