I’ve been trying to figure out how to match a particular movie clip to a letter when some enter it?
So, they enter there name: M E G,
for the M (which is displayed) I also want to call or load a movie clip I have of someone signing (American Sign Language) the letter M. So, they enter there name, the timeline jumps to frame 10, where I have a button I want to press that would then search out the matches to the letters and return the appropriate movieclip.
I have tried some various ways, but I’m failing miserably at them it seems.
on (press) {
if (textbox.text.indexOf(“M”) != -1) {
_root.loadMovieNum(myMovie.swf, 10);
} else {
_root.gotoAndStop(“namemissing”);
}
I know I’m probably using all this incorrectly-- any ideas???
I’m not very advanced either but here goes for what might be wrong with your code…
if you use _root.loadMovie(“mymovie”, 10) then you are loading a movie named mymovie to level 10 of the main movie. If you want to go to frame 10 of the main movie I think you need something like _root.gotoAndStop(10);
I was trying to load the “handshape” movie on level10 so it was on top of the underlying movie which woud sit be showing the typed name in a dynamic textbox.
I can’t seem to “get” the letter typed or cause anything special to happen becaused they typed a M as opposed to typing an A.
…meaing if my varable for inputName = M , how do I use that “M” to match something or have it evaluated so then it could load a movie or whatever is needed to be triggered??? I think that’s my question…
*Originally posted by Mikol27 *
**I’ve been trying to figure out how to match a particular movie clip to a letter when some enter it?
So, they enter there name: M E G,
for the M (which is displayed) I also want to call or load a movie clip I have of someone signing (American Sign Language) the letter M. So, they enter there name, the timeline jumps to frame 10, where I have a button I want to press that would then search out the matches to the letters and return the appropriate movieclip.
I have tried some various ways, but I’m failing miserably at them it seems.
on (press) {
if (textbox.text.indexOf(“M”) != -1) {
_root.loadMovieNum(myMovie.swf, 10);
} else {
_root.gotoAndStop(“namemissing”);
}
I know I’m probably using all this incorrectly-- any ideas??? **
on(press){
if(textbox.text = m){
_root.loadMovieNum("myMovie.swf",1); //this confuses me 1 is the level not frame of movie
}
Yes, the … is where you would fill in the missing letters for the alphabet. I didn’t put a break between the lower and upper case letters so that you only need one set of code to load you letter movie regardless of whether they had the shift key down or not.
You could use it in your on(press) function that already exists.
I’m trying to enter this script…I was hoping to get it working for 1 letter before adding all the script to include the rest. I get the script into Flash MX without errors, but it doesn’t do anything. If you have a sec to proof read this…I appreciate it.
I had it…I really had it working, then I tried to make a change and it went Kaaapluweeee.
Do I need to create separate “textboxes” for each letter that will be entered? And add to the actionscript to include each of those textboxes with the same process? As you can see (fla attached) I was starting down that path, but I wasn’t sure I really needed to that. Where i have the Flash movie to now is that you type in your name “Mikol” - it displays it fine, but it is only loading the movie that correspondes with the last letter of the input string.
I know it’s close to working cause I had it at one point, but now I’m frustrated because I can’t get it back.
Would mind looking at it one more time for me? Thanks a million.
Thanks for the help. I tried to change the code to use the external .swf’s but so far I can’t get it to do anything. I’m fiddling with though to what I can shake lose.
I almost have Liz’s code with a few modification working, but inputing the name is kinda clumsy (the only way i could figure out to do mulitple letters) with each letter going into a separate textbox.
I’m cleaning it up a little then i’ll stick it out on my test site to demonstrate.