Posted By

markaltman on 08/21/09


Tagged

variables send


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

muoto
forze


send variables to page without opening it.


 / Published in: ActionScript 3
 

URL: www.markaltman.ca

This will send variables to a page for processing. Sends as Get variables, the receiving page won't open. This method doesn't return a response, use URLLoader.load() if you need a response.

  1. var url:String = "flash/store_results2.php";
  2. var request:URLRequest = new URLRequest(url);
  3. var variables:URLVariables = new URLVariables();
  4. variables.var1 = flashVar1;
  5. variables.var2 = flashVar2;
  6. request.data = variables;
  7. try
  8. {
  9. sendToURL(request);
  10. }
  11. catch (e:Error)
  12. {
  13. // error handling
  14. }

Report this snippet  

You need to login to post a comment.