Home > 雑記 > ActionScript3.0からサーバと変数をやりとりする

ActionScript3.0からサーバと変数をやりとりする

ActionScript3.0からサーバと変数をやりとりするときのメモ。

var variables:URLVariables = new URLVariables();
variables.val1 = "hoge";
variables.val2 = "foo";

var request:URLRequest = new URLRequest(postUrl);
request.data = variables;
request.method = URLRequestMethod.POST;

var loader:URLLoader = new URLLoader();
loader.load(request);

URLVariablesのオブジェクトを作成してそこにどんどん変数とその値を追加していく感じ。
あとは普通にURLRequest.dataに格納したあと、URLLoader.load()に渡してあげればいい。

関連する投稿

Comments:0

Comment Form
Remember personal info

Trackbacks:0

Trackback URL for this entry
http://www.ez0.net/2008/06/actionscript3/trackback/
Listed below are links to weblogs that reference
ActionScript3.0からサーバと変数をやりとりする from Second Wave

Home > 雑記 > ActionScript3.0からサーバと変数をやりとりする

Search
Feeds
Meta

Return to page top