Tutorial by Examples

The URLRequest and URLLoader classes work together to make requests from Flash to external resources. The URLRequest defines information about the request e.g. the request body and the request method type, and the URLLoader references this to perform the actual request and provide a means of being n...
The URLVariables class allows you to define data to be sent along with a URLRequest. Example: var variables:URLVariables = new URLVariables(); variables.prop = "hello"; variables.anotherProp = 10; var request:URLRequest = new URLRequest('http://someservice.com'); request.data = v...
The URLRequestMethod class contains constants for the various request types you can make. These constants are to be allocated to URLRequest's method property: var request:URLRequest = new URLRequest('http://someservice.com'); request.method = URLRequestMethod.POST; Note that only GET and POST...
When Flash makes a request for data from an external source, that operation is asynchronous. The most basic explanation of what this means is that the data loads "in the background" and triggers the event handler you allocate to Event.COMPLETE when it is received. This can happen at any po...
Flash will not load data from a domain other than the one your application is running on unless that domain has an XML crossdomain policy either in the root of the domain (e.g. http://somedomain.com/crossdomain.xml) or somewhere that you can target with Security.loadPolicyFile(). The crossdomain.xml...

Page 1 of 1