Skip to main content
This topic has been closed for replies.

3 replies

Participant
August 29, 2012

Last example is 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 to load URL");

}

function completeHandler(event)

{

air.trace(event.target.data.welcomeMessage);

Participating Frequently
August 31, 2012

Thanks for letting us know. We'll update the example to fix the problems.

Paul

Adobe Developer Relations/Documentation

Participant
August 31, 2012

Hi Paul,

Issue was that air object not called for example:

URLLoaderDataFormat.VARIABLES;

should be:

air.URLLoaderDataFormat.VARIABLES;