Top
Home

Flash Form Variables

Paste this in actions to send variables to php page



NAMEOFBUTTON.addEventListener(MouseEvent.CLICK, sendMessage);
function sendMessage(e:MouseEvent):void{
var my_vars:URLVariables = new URLVariables();

my_vars.NAMEOFFIELD = NAMEOFINPUT.text;
my_vars.NAMEOFFIELD = NAMEOFINPUT.text;
my_vars.NAMEOFFIELD = NAMEOFINPUT.text;

var my_url:URLRequest = new URLRequest("process.php");
my_url.method = URLRequestMethod.POST;
my_url.data = my_vars;

var my_loader:URLLoader = new URLLoader();
my_loader.dataFormat = URLLoaderDataFormat.VARIABLES;
my_loader.load(my_url);

NAMEOFINPUT.text = "";
NAMEOFINPUT.text = "";
NAMEOFINPUT.text = "Message Sent";
}