dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Typing text recognition

  1. #1
    Game Master ConnELITE's Avatar
    Join Date
    Apr 2005
    Location
    United States, DC
    Posts
    473

    Typing text recognition

    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.
    BC

  2. #2
    Senior Member kusco's Avatar
    Join Date
    Nov 2001
    Posts
    681
    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.
    Cheers,
    kusco
    (3DFA Support Team)

  3. #3
    Game Master ConnELITE's Avatar
    Join Date
    Apr 2005
    Location
    United States, DC
    Posts
    473
    oh i see, thank you very much
    BC

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center