Blank text input validation

Hi,

I created on stage 4 text-input fields and a “next” button.
I have to check that all 4 text-fields are not empty so the user wouldn’t be
able to click on the “next” button if one of this fields is blank.

here’s the code i’ve tried without success, the program got stacked in a loop:


eDetails_btn.onRelease = function() {
        var i:Number = -1;
        
        do {
            if (i <= numOfEmployees) {
                i++
            }else {
                i = 0;
            }// end if
        } while (eNum_txt.text != employees* || eNum_txt.text == null || eName_txt.text == null ||
                    eLastName_txt.text == null || eWeight_txt.text == null)
                
        gotoAndStop(3);
    }// end onRelease event

I’ve managed already to check if a user typed a correct answer but
how to create a situation of which the user wouldn’t be able to click on the
“next” button till all the fields a filled is beyond my grasp…

Thanks in advance for any help.