Loading external data
this question posted in response following article: http://help.adobe.com/en_us/air/html/dev/ws5b3ccc516d4fbf351e63e3d118a9b90204-7cfd.html
last example full of mistakes, corrected version below:
var variables = new air.urlvariables("name=franklin");
var request = new air.urlrequest();
request.url = "http://www.[yourdomain].com/greeting.cfm";
request.method = air.urlrequestmethod.post;
request.data = variables;
var loader = new air.urlloader();
loader.dataformat = air.urlloaderdataformat.variables;
loader.addeventlistener(air.event.complete, completehandler);
try
{
loader.load(request);
}
catch (error)
{
air.trace("unable load url");
}
function completehandler(event)
{
air.trace(event.target.data.welcomemessage);
More discussions in AIR Bugs and Performance Issues
adobe
Comments
Post a Comment