dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Input Text Question

  1. #1
    Senior Member frostbite's Avatar
    Join Date
    Aug 2003
    Location
    Colorado
    Posts
    666

    Input Text Question

    How do you code it so that when a certain word (lets say flash) is entered into an input text field with a character limit of 5, it triggers an event to play elsewhere

    So basically, when the input text field "answer" is equal to "flash" it will _root.mcEvent.gotoAndPlay(2);

    You can see any example of what im talking about at http://www.johnnyhollow.com with the riddles
    Yarrg Matey!

  2. #2
    FK Slacker
    Join Date
    Jun 2000
    Location
    vancouver
    Posts
    3,208
    Use the TextField.onChanged event:
    code:

    myInputText.onChanged=function(){
    if(myInputText.text=="flash"){
    _root.mcEvent.gotoAndPlay(2);
    }
    }



    K.

  3. #3
    Senior Member frostbite's Avatar
    Join Date
    Aug 2003
    Location
    Colorado
    Posts
    666
    sweet I have one more quick question ill force in here

    if you have already played a frame, the script I use to skip forward to another frame is

    Code:
    if (_global.hasPlayed){
            gotoAndPlay(11);
    } else {
            _global.hasPlayed = true;
            stop();
    }
    How can I modify this so you can say if a certain frame, not necessarily the frame you are on right now, has been played, do the following.
    Yarrg Matey!

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