send variables to page without opening it.


/ Published in: ActionScript 3
Save to your folder(s)

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.


Copy this code and paste it in your HTML
  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. }

URL: www.markaltman.ca

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.