Can someone please set me straight on dynamic textbox?
Hi,
Sorry this is so long!
I tutor in english/maths and use specialized software (written in DOS) which won't work in Vista. I want to see if KM/Flash can be used to replicate the work. Trouble is I don't know actionscript! I hope someone can give me pointers a bit at a time. Problem: I want to use a textbox to go to a frame when the correct word is entered and the "enter" key is pushed. I made a textbox labelled "answer" in frame 4.
var a is there to show the correct score on frame 5, frame 6 is if incorrect and goes back to frame1
var a = 0;
var txt1 = "";
on (release, keyPress "enter"){if (txt1.txt = "cat"){
gotoAndStop (5); } else {
gotoAndStop (6); }
}
When I play "in browser" it doesn't go to frame5 or 6 after I enter cat and hit the enter key.
If anyone can help that would be greatly appreciated.
ja
Basically I have two dynamic text box in single frame and I want to force user to type in 1st text box, if not warn/alert them in 2nd text box. if the correct text "ghol" typed go and next frame, else alert them with some new message in the 2nd text box again.
important note: be sure all your keyframes have NO tweens!
Thank you for replying. I tried adding the code but when I type in the word cat nothing happens when I hit the enter key. I can put it in a directory if you would like to see what I'm doing wrong. ghol has kindly provided a solution but I don't want a button - the enter key will be used all the time.
thanks for your time
ja
I have made one try it out, I am new to KoolMoves as well but not flash.
Thanks for your effort, ghol. I need the enter key as the way to send to the next frame. This is going to be repeated often so clicking on a button will become boring for the kids to do.
Thanks
ja
Thanks necromanthus for the file. I had each frame lasting .5 secs to hear the sound of the word before typing it in. Will have to repeat the frame instead.
ja
Hi, "a little more coding" sounds like a lot for me I would like to learn how to do it. The preference is to have the sound played automatically and then have the rest follow. Is there a tutorial I can follow?
thanks,
ja
Thanks necromanthus for the file. I had each frame lasting .5 secs to hear the sound of the word before typing it in. Will have to repeat the frame instead.
You don't need 0.5 seconds per frame to hear a sound.
You can achieve that using a little piece of script.
Anyway, for beginners (if they use tweens) I highly recommend "frame labels".
Something like:
Can't spell what hope have I got of typing in the right code!!! Thanks again guys. I have used a button for the sound but will still need tweens to see the word before the textbox to enter that word.
ja
Hope I can try your patience a little more! I've made a small swf file for the "cat" sound, made a menu and a button to call the movie ( is it a movieclip (MC2) when embedded?) and it runs - can only make it then disappear and go back to the menu with a button. Tried loadMovie(MC2,1) playMovie(MC2,1) unloadMovie(MC2,1)
nextFrame() in the same frame as MC2 but it skips movie.
Any help appreciated
ja
Thank you for the help so far. Why does this code only work with no tweens? Can you also show me where I'm going wrong with this, please.
If student is wrong - var bad_word = "moo" I then have a textbox endtestvar and use
Hi can you please look at this and let me know why this doesn't work. Should the code for the new array be in the text box actionscript or in the "correct" page and "wrong" page actionscript?
thanks,
ja