AS3 error 1037? nested package? help!

I keep getting the error 1037 that a package cannot be nested, I’m really unclear how my code is wrong, it is verbatim from the flash help at Adobe with the exception of my minor customizations. Any help is greatly appreciated just trying to make a simple contact form - AS3 to PHP:

package {

import flash.display.Sprite;
import flash.net.navigateToURL;
import flash.net.URLRequest;
import flash.net.URLVariables;
public class sendForm extends Sprite {


	public function sendForm(event:MouseEvent):void {
		var url:String="formSend.php";
		var request:URLRequest=new URLRequest(url);
		var variables:URLVariables = new URLVariables();
		variables.usrName=name_txt.text;
		variables.usrEmail=email_txt.text;
		variables.usrMsg=msg_txt.text;
		request.data=variables;
		navigateToURL(request);
		trace(usrName, usrEmail, usrMsg);

	}
}

}
submit_btn.addEventListener(MouseEvent.CLICK, sendForm);