Tuesday, July 6, 2010

URLVariables

In addition to loading XML or text files we can load URLVariables.

For loading URLVariables, we can set the property  of the URLLoader.dataFormat to "variable".

You can also use the URLVariables object to send data to a server with a URLRequest.
e.g.

var request:URLRequest=new URLRequest("http://script.php");
var urlVars:URLVariables=new URLVariables();
urlVars.name="josh";
urlVars.hometown="columbus";
request.data=urlVars;
var loader:URLLoader=new URLLoader(request);

No comments:

Post a Comment

Suggestions are heartily awaited.