ulfben icon

HGO: basic server communication

ulfben | PRO | 03/11/12 05:29:37 PM UTC | 0 ⭐ | 10883 👁️ | Never ⏰ | []
ActionScript 3 |

0 B

|

None

|

0 👍

/

0 👎

import flash.net.URLRequest;
import flash.net.URLVariables;
import flash.net.URLLoader;
import flash.net.URLRequestMethod;
 
var request:URLRequest = new URLRequest("http://www.ulfben.com/toupper.php"); //a friendly server-side script
var variables:URLVariables = new URLVariables(); 
variables["test"] = "test test";
request.data = variables; //add the data to our containers
request.method = URLRequestMethod.GET;
 
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onComplete);
loader.load(request);
 
function onComplete(event:Event)
{
    var loader:URLLoader = URLLoader(event.target);
    var vars:URLVariables = new URLVariables(loader.data);
    for (var parameter:String in vars) { //iterate through whatever the server passed back.
        trace(parameter + " = " + vars[parameter]);
    }
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  • Rteuixl icon
    04/02/26 04:28:48 PM UTC
    text |

    0 B

    |

    0 👍

    /

    0 👎

    Best t33n active cpx link daily updates!
     Copy and paste the link in a new browser tab and then hit enter!
     https://crazyporn.@xxx/members/157354/?asgtbndr=1&play=true&spon=adworld&zone=400
     Remove the @ 
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎