sono due funzioni, entrambe nel codice postato
Codice PHP:
// creo una funzione che verifica che il campo richiamato sia stato riempito e non contenga spazi vuoti
var validate = function (mail_field:String):Boolean {
    var 
temp this[mail_field].text.split(" ").join("");
    var 
r:Boolean = (temp.length<=0) ? false true;
    return 
r;
};
// creo la funzione di verifica per il campo mail
var checkMail:Function = function (target:MovieClipnameField:String):Boolean {
    var 
temp:String target[nameField].text;
    
temp temp.split(" ").join("");
    if (
temp.length>0) {
        if (
temp.lastIndexOf("@")>-1) {
            var 
temp2 temp.split("@");
            if (
temp2[1].length>5) {
                var 
temp3 temp2[1].split(".");
                if (
temp3[0].length>&& temp3[1].length>1) {
                    return (
true);
                }
                return (
false);
            }
            return (
false);
        }
        return (
false);
    }
    return (
false);
}; 
la prima la usi sui campi normali e ti restituisce true/false a seconda che il campo sia riempito o meno

la seconda sul campo mail e verifica se il formato della mail è valido