4 Replies Latest reply on Sep 28, 2012 6:15 AM by kglad

    TextArea Entry (Button activate deactivate)

    graphias Level 1

      Code:

      this.tf1_txt.text = "";

      this.tf1_txt.onSetFocus = function() {

      tf1_txt.text=(tf1_txt.text == "")?  "" : tf1_txt.text ;

      }

       

       

      if(this.tf1_txt.text==""){

      this.submit_btn.enabled=false;

      }else {

                this.submit_btn.enabled=true;

      }

       

       

      this.submit_btn.onRelease = function  () {

      gotoAndStop("complete");

      }

       

       

      I have the above code in Frame 1 and onRelease of Submit Button the user will be taken to another frame labelled complete.

       

      Although, the submit button gets deactivated using If (condition) it doesn't enable with else when I enter any text in the field.

       

      The Submit Button should be activated when user enters some text.