Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
Richard Atkins #1
Converting a string to a movie command
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]
Richard Atkins Guest
-
Converting an element of a recordset into a commaseperated string
Hi again (feel like I'm coming here a lot at the mo :) ) The title says what I'm trying to do... but I'm just getting <,><,><,> I've dumped the... -
Converting a String to number
I'm trying to concatinate a varible to make it dynamic. I'm calling a processing page and from a page where they are entering numbers into a text... -
Failure converting doc/ps to pdf - offending command: setcmykoverprint
Any ideas on this one? For some doc files, PDFMaker hangs up during "printing" when converting doc to pdf. For ps (prn) files from these doc... -
Converting Shockwave 3D to AVI or other movie format..
I have been asked to create a 3D animation that can be imported into a powerpoint slide. Since I am using director already, I would like to take a... -
converting a director movie to SWF
Hello! Is there any way of converting(exporting) my project to .swf format. How can I do that? thanx!



Reply With Quote

