I have a keypress that i want to perform 2 actions at same time (or as near as dammit)
I can only get 1 to work.
I have this:
KeyListener = new Object();
KeyListener.onKeyDown = function() {
if (Key.getAscii() == 101) { // Code for e key
mask.play();
} else if (Key.getAscii() == 114) { // Code for r key
mask.stop();}
else if (Key.getAscii() == 116) { // Code for t key
mask.gotoAndStop(825);
}
else if (Key.getAscii() == 117) { // Code for u key
buzzer.gotoAndPlay(65);
}else if (Key.getAscii() == 121) { // Code for y key
buzzer.gotoAndPlay(2);
}}
Key.addListener(KeyListener);
I want the part in Blue to couple together with the green and red sections dependent on keypress. So for example if the "y" key is pressed i want it to perform the green section and the blue section at the same time.
similarly i want the "u" key to perform the red section and the blue section at the same time
Hope this makes sense!