3 Replies Latest reply on Apr 24, 2006 11:42 AM by .:}x-=V!P=-x{:.

    Required Fields

    majonsey
      I am trying to have certain text fields be required to be filled in by the user, and if they do fill them in, then they should be taken to 'question1' frame. If they do not fill in all the fields, they should be taken to 'redirect frame.' This is my code:

      on (release) {
      if (_root._required1 != null) {
      this.gotoAndStop("question1");
      }
      else {
      this.gotoAndStop("redirect");
      }
      }

      The problem with this is that no matter if the 'required' field is empty or not, it takes the user to the 'redirect' frame. "required1" is the instance name of the input text field, and this code is placed on a button. I'm wondering if there's a problem that Flash is not reading in the input text (then, how could I do that?) or if there is just a problem with _root._required1.

      I've already tried switching the statements around like this:
      on (release) {
      if (_root._required1 == null) {
      this.gotoAndStop("redirect");
      }
      else {
      this.gotoAndStop("question1");
      }
      }
      And still it keeps taking you to the redirect page when the button is pressed. Any suggestions?


      I'm also having another problem. I would like to have the current date that the flash page is accessed, so is there a certain command that retrieves the current date? I've tried getDate and nothing happened.