-Rutger-
%Europe/Berlin %718 %2007, 17:14
Ik heb een MC genaamd click sounds, in een frame niks met stop(); erop en het tweede een sound, op de mc staat deze code:
onClipEvent (enterFrame) {
if (Key.isDown(Key.UP)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.DOWN)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.LEFT)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.RIGHT)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.BACKSPACE)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.CAPSLOCK)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.CONTROL)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.DELETEKEY)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.ENTER)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.PGDN)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.PGUP)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.SHIFT)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.SPACE)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.TAB)) {
this.gotoAndPlay(2);
}
}
maar als je iets ingedrukt houdt, blijft de sound achterelkaar gaan, hoe kan ik ervoor zorgen dat je als je hem ingedrukt houd, ook maar 1 keer hoort?
onClipEvent (enterFrame) {
if (Key.isDown(Key.UP)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.DOWN)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.LEFT)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.RIGHT)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.BACKSPACE)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.CAPSLOCK)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.CONTROL)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.DELETEKEY)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.ENTER)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.PGDN)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.PGUP)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.SHIFT)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.SPACE)) {
this.gotoAndPlay(2);
}
if (Key.isDown(Key.TAB)) {
this.gotoAndPlay(2);
}
}
maar als je iets ingedrukt houdt, blijft de sound achterelkaar gaan, hoe kan ik ervoor zorgen dat je als je hem ingedrukt houd, ook maar 1 keer hoort?