[quoted text, click to view] q5k wrote:
> I am drawing a blank as how to approach this, so bear with me?..
>
> I am trying to create a movie where when you type, the letter appears in the
> flash movie. The hard part is that I want a movie (which is associated with the
> letter you typed) to appear along with the typed letter.
>
> Does this make sense?
>
> It would look like this?..
>
> I type ?h? on the keyboard and this appears? H [H?s associated movie]
It cold be done with Key.getAscii(); or Key.getCode(); which return key value.
You could hard code each key to a movie but that is time consuming .
I show you very easy way with minimum of code.
Open the help - using flash , click search and key in the search :
"Letters A to Z and standard numbers 0 to 9"
This will give you the list of corresponding ASCII key code values that are used to identify
the keys in ActionScript.
Example, A is 65 , B is 66 , G is 71 and so on...
Now you want to load movie on key press A . Name the movie "movie_65.swf" .
Name them all is similar way , accordingly to key you press value.
Now all you need in flash is :
myListener = new Object();
myListener.onKeyDown = function() {
loadMovieNum("movie_"+Key.getCode()+".swf", 1);
};
Key.addListener(myListener);
the path is dynamic, the number get insert within the movie_ and .swf .
If you wanted to go to frame than :
gotoAndStop(Key.getCode());
if you wanted to jump to label
gotoAndStop("label_"+Key.getCode());
and so on ......
--
Regards
urami_*
<no>
http://flashfugitive.com/ </no>