Checking flash form

Hi,

I got a flash form and a php-script which sends an e-mail.

On my send button in flash I have the following code:

 
on (release) {
if (name eq "" or email eq "" or comment eq "") {
gotoAndStop(3);
} else {
loadVariablesNum("form.php", 0, "POST");
gotoAndStop(2);
}
}
 

The first bit check that no fields are empty, and if so goes to frame 3 with an error message. If all fields are filled it sends the variables to the php-script.

This works fine for Flash Player 6 but I have some other functionality in my movie which requires FP7 and when exporting for 7 I get errors on the code above.
Any tips on how to re-write it would be appreciated:)