/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var url:String = _baseURL + "/utils.php"; var headers:Array = [ new URLRequestHeader("_sessionKey", _sessionKey), new URLRequestHeader("_userId", _sessionUserId) ]; var request:URLRequest = new URLRequest(); request.requestHeaders = headers; request.method = URLRequestMethod.POST; request.url = url; /////////////////// var loader:URLLoader = new URLLoader(); loader.dataFormat = URLLoaderDataFormat.TEXT; //don't know if this is really needed loader.addEventListener(Event.COMPLETE, handleSuccess); loader.addEventListener(IOErrorEvent.IO_ERROR, handleError); loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, handleError); loader.load(request);