Form Validation

Hi guys, I’ve a problem, I’ve a form in flash, built with Input Text Fields, my Variables are:

Nombres
Apellidos
Empresa
Telefono
Email
Ciudad
Comentarios

and I want to validate all the fields before somebody submits the button, how I can do this?

thanks!

maybe you can check the input in the button like:

somebutton_bnt.onRelease = function(){
if(Nombres == “”){
trace(“please give your name”);
}elseif(Apellidos == “”){
trace(“please give your ??? last name?”);
//repeat the elseif for every field
} else {
trace(“the form was OK, submit”);
}
}

thanks a lot, based in your example, I’m doing this:

envio_btn.onRelease = function() {
if(Nombres == “”){
alert_txt=“please give your name”;
} else {
gotoAndPlay(“accion”);
}
}
but in the Output panel I’m with this message:

Error Scene=main, layer=Layer 1, frame=1:Line 5: Statement must appear within on handler
envio_btn.onRelease = function() {
Total ActionScript Errors: 1 Reported Errors: 1

why is this happening?

Thanks dude

ummm…ur code is working fine for me. Are u sure u are placing ur code in the timeline??, and not in the object?