Posted By

tayles on 05/30/07


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


LoadVars.sendAndLoad w/ XML response

 / Published in: ActionScript

Concerning: LoadVars.sendAndLoad

You can send variable/value post information and receive xml information by using code like below.

It's a great way to work with web services and avoid using the modem-unfriendly web service connector component. can adobe confirm that this method of sending with loadVars and receiving xml will be supported in the future?

  1. var replyXML = new XML();
  2. replyXML.onLoad = myOnLoad;
  3. function myOnLoad(success)
  4. {
  5. if (success) {
  6. trace(replyXML);
  7. } else {
  8. trace('fail');
  9. }
  10. }
  12. var send_lv = new LoadVars();
  13. send_lv.postVar = "foo";
  14. send_lv.sendAndLoad("addressOfMyWebServiceOrOtherProgram", replyXML, "POST");

Report this snippet  

You need to login to post a comment.