jerrygarciuh
jerrygarciuh

Reputation: 22018

Submit Flash AS2 form via AJAX

I have a client who makes Flash AS2 based language learning software.

They wanted to add a bug report email to the apps.

It is dead simple if you don't mind the swf's post opening a new tab:

on (release, releaseOutside) {
  var my_Var:LoadVars = new LoadVars();
  my_Var.brsub = subject.text;
  my_Var.brmsg = message.text;
  my_Var.send("bug_report.php", "_blank", "POST");
}

I am looking for docs or an example in AS2 of making this post via AJAX and not opening the new tab.

Anyone know where I can read up on it. I know it must be out there but my Googling has come up empty.

Upvotes: 0

Views: 815

Answers (1)

ʞᴉɯ
ʞᴉɯ

Reputation: 5594

You don't need to make an AJAX Request in Flash to process that request: you can use the loadVariables method to send data via POST, without leaving your Flash movie:

Adobe Help Reference

Upvotes: 1

Related Questions