昨日の続き(tamaの助言)
public function RequestMethod(sMethod:String, val:Object):void { var variables:URLVariables = new URLVariables(); for (var property:String in val) { variables.decode(property + "=" + val[property]); } request.data = variables; request.method = sMethod; try { loader.load(request); } catch (error:Error) { // } }
こんな感じか.
var val:Object = { name:"hogeo", id:"hogehoge"}; request.RequestMethod(URLRequestMethod.POST,val);