Skip navigation
ArtNeedsHelp
Currently Being Moderated

How to have a button only accept if text is entered in a text box.

Aug 17, 2012 4:47 PM

Tags: #text #is #"help" #"as3" #"login" #"make #sure #entered" #"expert #needed"

Ok so I have a game called "DCGame"  and I need help with the guest login. Like when people type a nickname for the login. I would it not to accept no text entered. Could you help me?

 
Replies
  • Currently Being Moderated
    Aug 17, 2012 5:04 PM   in reply to ArtNeedsHelp

    Assign the textfield an instance name and use a condtional to test if the length property of the textfield is not zero.

     

      if(yourTextFieldName.length > 0){

            //  do whatever

      }

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 17, 2012 6:26 PM   in reply to ArtNeedsHelp

    Only you can answer that.  Put it wherever you need to check the textfield.  Ideally, if you are coding in the timeline, all code should be in the main timeline.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points