Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Feb 15th, 2012  |  syntax: None  |  size: 0.61 KB  |  hits: 37  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import flash.events.Event;
  2. import flash.net.URLLoader;
  3. import flash.net.URLRequest;
  4. import flash.net.URLVariables;
  5. import flash.net.URLRequestMethod;
  6.  
  7. var urlLoader:URLLoader = new URLLoader ();
  8. var urlRequest:URLRequest = new URLRequest ('whatever.php');
  9. var urlVars:URLVariables = new URLVariables ();
  10.  
  11. urlVars.folder = 'path/to/folder';
  12. urlRequest.data = urlVars;
  13. urlRequest.method = URLRequestMethod.POST;
  14.  
  15. urlLoader.addEventListener (Event.COMPLETE, onComplete);
  16. urlLoader.load (urlRequest);
  17.        
  18. function onComplete (evt:Event) : void {
  19.     var xml:XML = XML (urlLoader.data);
  20.     trace (xml);
  21. }