If ... statement doesn't execute e-mail validation

Hi everybogy!
I have some code for validating e-mail data before it is send. I have including code from Bassem Bouguerra www.sub-science.com which uses the *WebServiceConnector *and deals with imaginary user’s emails. The code validates my 3 fields correctly. The problem is that the last if …statement doesn’t execute despite that the data is correct and my ok and **result **variables are true. It is driving my mental. Any clues from anybody? Thanks.

stop();
import mx.services.*;
_lv = new LoadVars();
_lv.onLoad = function() {
if (!this.faultCode) {
gotoAndPlay(“success”);

} else {
gotoAndPlay(“failed”);
};
};
send.onPress = function() {
response.text = ‘’;
var ok = true;
var test:Number = 0;

var checkEmailService = new mx.services.WebService(“http://www.webservicex.net/ValidateEmail.asmx?WSDL”);

if (message.text == ‘’) {
response.text = “Por favor, introduce un mensaje.”;
ok = false;
} else _lv.message = message.text;

if (email.text == ‘’ || email.text.indexOf(’@’) == -1) {
response.text = “Por favor, introduce tu e-mail.”;
ok = false;
}
else {
do {

checkEmailResultOb = checkEmailService.IsValidEmail(email.text);
checkEmailService.onLoad = trace(“loading”);

checkEmailResultOb.onResult = function(result) {
trace("the email is " +result);

if (result) {
_lv.email = email.text;
test++;
ok = true;
trace(ok);
trace(result);

}
else {
response.text = “Por favor, introduce un e-mail VALIDO.”;
email.text = ‘’;
ok = false;
test = 0;
trace(result);
};

};

} while (test = 0);
};

checkEmailResultOb.onFault = function(fault) {
trace(fault.faultCode+"," +fault.faultstring);
if (fault) gotoAndPlay(“failed”);
};

if (fname.text == ‘’) {
response.text = “Por favor, introduce tu nombre.”;
ok = false;
} else _lv.fname = fname.text;

if (ok) {
if (result) {
response.text = “Enviando e-mail…”;
_lv.sendAndLoad(“contactmail.asp”, _lv, “POST”);
};
};

};