Hello to everyone on the board!
First of all, I’ve been using Kirupa for a while to learn and re-learn the basics of Flash again, and I just want to say thanks for everything!
Onto the questions I have. I’m positive some of these are going to be incredibly basic, but these few questions will just point me in the right direction so I can finish up a interactive animation I’m working on.
And, I know that AS2 is completely out of date, but I’m fairly comfortable with it and just want to relearn some basics.
First:
For the Flash, I want to make it so that when you type a certain phrase into the DynamicText/InputText box, it will show a different phrase in that same box.
Example: If I type in “Hello” and press Enter, I want that same box to erase the text there and instead display something like “How are you?”
It seems simple, but I’ve been poking around for an exact script and I can’t find one anywhere.
Second:
This box at the moment has a Submit button underneath that when you press it, it detects what you’ve typed in and takes you to an appropriate frame in the animation if what you typed matches what is in the Text Box. However, I realized that just using this:
if (password_txt.text == “help”) {
gotoAndStop(999);}
makes it so that it goes to the proper frame, but it has to match the lower cased letters as well. Is there a method I can use where it detects both Upper and Lower cased letters for the input?
Third, and last question:
I know there’s a way around this with AS3, but I also need to freshen up on Listeners as well, so I figured I could best ask this here too.
With that same “Submit” button I have made above, it has an instance name of “submit_btn”. I also set it so that it’s:
on (release, keyPress “”) {
Of course, pushing enter does nothing, as I know that the actual frame needs a listener set to it as well to acknowledge the key being pressed.
Essentially, I just want some help with making it so that either pressing the “Submit” button or hitting your “Enter” key does the same thing, and what to use to make it acknowledge the Enter key being released (KeyUp).
And those are my questions! Again, they come off as very basic, but it’s been years since I’ve properly used Flash and just want a refresher on these specific actions.
Thanks as always for your guy’s help!