import flash.events.MouseEvent; import flash.net.URLRequest; import flash.net.URLRequestMethod; import flash.net.URLVariables; import flash.net.navigateToURL; // Add an eventlistener that will respond when the user clicks the send button send_mc.addEventListener(MouseEvent.CLICK, mouseClickHandler); // This function is called when the user clicks the send button function mouseClickHandler(evt:MouseEvent):void { // Retrieve the values from the textfields and checkbox var name:String = name_txt.text; var message:String = msg_txt.text; var check:string = getCheckBox(); // Create a URLVariables object and store the variables to be sent to your PHP script var vars:URLVariables = new URLVariables(); vars.name = name; vars.message = message; vars.check = check; var request:URLRequest = new URLRequest(); request.data = vars; request.method = URLRequestMethod.POST; request.url = "myUrl.php" // ENTER YOUR WEBSITE HERE navigateToURL(request); } // Checks if your checkbox is checked and returns a string // When checked, "Selected" is returned else "Not selected" is returned function getCheckBox():String { if(checkBox.selected == true){ return "selected"; }else{ return "not selected"; } }