Navigation via a textfield

Hi folks,
Im trying to setup an Artificial intellegence sorta thing in Flash and I want to know if it possible to navigate by way of what is typed in a text input field. I tried something like this:

if (textinput==“hi”){
gotoAndStop(25);
}

I tried putting an else after it but it acted as if the first condition isnt met. I need to be able to do this based on key strokes. The user can’t click click a button or anything.

Any ideas anyone?

Thanks,
Michael

Howdy…

Use onChanged handler to check if the text field’s data has been changed… That should do the work… :slight_smile:

I looked that up in the Actionscript Reference and didnt see anything for it.

Could you possibly give me a quick sample or point me to reference for this.

Thanks,
Michael

works for me, but instead of an else, I put a frame after it that said “gotoandplay(1)” so that once the condition was met, I said goto 3 instead of 25.

hope this helps…-RH

I looked that up in the Actionscript Reference and didnt see anything for it.

Could you possibly give me a quick sample or point me to reference for this.

Thanks,
Michael

RH,
Can you post the fla please or the AS that you used? I can not get this to work. This is driving me insane…this should any easy one…sigh.

Thanks,
Michael