Loading external data


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

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support