views:

12

answers:

1

Quoted from this page:

send(url: String, target: String, [method: String])

Sends the variables in the my_lv object to the specified URL.

sendAndLoad(url: String, target: Object, [method: String])

Posts variables in the my_lv object to the specified URL.

I don't see any difference there...

A: 

sendAndLoad will put received variables (if output from server is like "&a=3&b=9") to object specified as second argument. AFAIK specified object should be type of LoadVars().

For example:

var result_lv:LoadVars = new LoadVars();
var send_lv:LoadVars = new LoadVars();

send_lv.sendAndLoad(  ...url... , result_lv , "POST");


result_lv.onLoad = function(success:Boolean) 
{
if (success) 
{
... retreive received variables here from result_lv

I don't know why i can't put comments. It's asynchronous, onLoad function will just be called after response from server

...url... it's just url like "http://mydomain.com/myfile.php"

killer_PL