;

PDA

Click to See Complete Forum and Search --> : Typing text recognition


ConnELITE
08-04-2005, 10:09 PM
I want to make a text box that if you type something in it and click a button something will happen. how can I do that? I know the code should be in the button and look something like this (if (editbox=hidemonkey{ monkey.hide()}).
please help.

kusco
08-05-2005, 11:34 AM
Hello ConnELITE,

In the Edit Box element properties you will see a spot for 'variable'. In here put the name of a variable. eg. userInput. A variable is used to contain information and allows that information to be retreived and processed at a later time.

Ok, now when someone clicks on the button you can use something like this...
if(userInput=="hidemonkey")
element("monkey").hide();

You need to use '==' when making a comparison otherwise a single '=' will assign "hidemokey" to the variable userInput and the result of which will be 'True' so the monkey element will always be hidden.

Hope this helps.

ConnELITE
08-05-2005, 12:54 PM
oh i see, thank you very much