actionscript - Post from Flash to PHP in Facebook app
Get the solution ↓↓↓Solution:
To send data back to your server, you can write:
var sender = new LoadVars();
sender.x = "xxx";
sender.y = "yyy";
sender.z = "zzz";
sender.send("http://www.yourdomain.com/yourscript.php", "", "post")
To sendAndLoad
In case you want to get back data at the same time you send your data back to the server, you can use the sendAndLoad api:
var loader = new LoadVars();
loader.onLoad = function(success) {
if(success) {
// read your data here, e.g.
trace(this.x); // suppose the server send back a variable x
trace(this.y); // and a variable y
}
}
var sender = new LoadVars();
sender.x = "xxx";
sender.sendAndLoad("http://www.yourdomain.com/yourscript.php", loader, "post");
Answer
Solution:
This is quite simple. Some example code here: http://codesnippets.joyent.com/posts/show/566
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: cannot set properties of undefined (setting '_dt_cellindex')
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.