MS-DOS-ish effect

How would one go about making an effect like MS-DOS where either the user types in something after the C:> thing, and it does something when they press enter or it automatically types something there? And when they have typed something it checks for what it is, puts a response there depending on what they typed, and then moves on to a new C:> thing where they can type something else. (Or, depending on the response, gotoAndPlay() to another frame). The little blinking " _ " thing after the last thing there would be nice too, but I am completely stumped on how to go about that. (not that that’s all that unusual for me (-: ). Many thanks to any who can help.

prompt $p$g…

ah…the good old days of DOS. what you could do is have a dynamic text instance inside a movieclip, then change it with every keystroke the MC detects. if it detects the Enter key (which flash can do), execute the command. you can do this by a simple if statement inside a function that has all the valid commands. as for the blinking “_”, you can just increment its position with every keystroke.

Hmm… Interesting idea. Thanks. The only part I don’t understand is the blinking _. Would that be a movieclip inside the movieclip with the dynamic text box, and just increase the X property with every keystroke? And for changing the text, would I just use a lot of onKeyPress things, one for each key?

oh keep it simple, make the blinking cursor…a blinking cursor. just make a movieclip with the cursor on and off at your desired interval. and yes, use the onKeyPress thing for each letter, best way i can think of.