I have three movies "a" , "b" and "c"

I have a piece of code that checks for when a keyboard key is pressed

I can find what key the user has pressed, and I want a movie that
corresponds with that key to play.

e.g. if the key pressed = "a"

then I want to run a command on the movie "a"

I have tried a number of methods but can't seem to get any of them to work.


if the key pressed is "a" I can create a string saying "a.gotoAndPlay(5);"

but how do I action that string?

if I use the eval command it doesn't seem to work either.

the code I have tried:

onClipEvent(keyDown) {
myKey = chr(Key.GetAscii());
trace("myKey = " add myKey);
eval((myKey) add ".reduce()");
}

or if I use:

onClipEvent(keyDown) {
myKey = chr(Key.GetAscii())
myKey.reduce();
}

or finally:

onClipEvent(keyDown) {
myKey = chr(Key.GetAscii())
eval(myKey).reduce();
}

or:

onClipEvent(keyDown) {
myKey = chr(Key.GetAscii())
myAction = myKey add ".reduce();";
eval(myAction);
}

Many thanks,

----------------------------------------------

[url]www.crazyrichie.net[/url]