Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple Dynamictextbox question 1

Status
Not open for further replies.

MoleDirect

Technical User
Sep 4, 2007
45
US
I am making a chat-like program, and I am using a multi line text box that will hold the chat dialog. every time I type in the box and hit submit, it erases the last answer, and p[laces a new one.. I am also hoping to have it place my text there too... Is this hard to do?


ALSO... I want to use the indexOf() command to search for certain words in a text in an If Then statement so I can have it reply using certain words in the text... Here is the code so far for the submit button:

Code:
on (release, keyPress "<Enter>") {
    if ( _root.user.text="1") {
        _root.reply.htmltext = "<b>Bot:&nbsp;</b> I got your Test";
    }else{
        _root.reply.htmltext = "<b>Bot:&nbsp;</b> I do not understand.";
}
gotoAndPlay(2);
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top