ZernanToledo
Programmer
Hi
I've developing a small visual piece for a band, in which I want the arrow keys to trigger different animations. Its quite simple, but I'm new to flash and aren't sure what I'm doing wrong.
The code I've written is...
------------------------
stop();
fscommand("fullscreen", "true");
if (Key.isDown(Key.RIGHT)) {
gotoAndPlay(1);
} else if (Key.isDown(Key.DOWN)) {
gotoAndPlay(10);
} else if (Key.isDown(Key.UP)) {
gotoAndPlay(20);
} else if (Key.isDown(Key.LEFT)) {
gotoAndPlay(30);
}
-----------------------------------
At the moment the error I'm getting is "access of undefined property Key". The script runs fine without the if loop, but the errors also cause the various stop() sections to break.
Thanks for the help
I've developing a small visual piece for a band, in which I want the arrow keys to trigger different animations. Its quite simple, but I'm new to flash and aren't sure what I'm doing wrong.
The code I've written is...
------------------------
stop();
fscommand("fullscreen", "true");
if (Key.isDown(Key.RIGHT)) {
gotoAndPlay(1);
} else if (Key.isDown(Key.DOWN)) {
gotoAndPlay(10);
} else if (Key.isDown(Key.UP)) {
gotoAndPlay(20);
} else if (Key.isDown(Key.LEFT)) {
gotoAndPlay(30);
}
-----------------------------------
At the moment the error I'm getting is "access of undefined property Key". The script runs fine without the if loop, but the errors also cause the various stop() sections to break.
Thanks for the help