Sending and processing data

You must typically process information before you send it to the server, so it’s formatted in a way that the server understands. When the server receives the data, it can be manipulated in any number of ways and sent back to the SWF file in a format that it can accept, which can range from name-value pairs to complex objects.

Note: Your application server must have the MIME type of its output set to application/x-www-urlform-encoded. If that MIME type is missing, the result is usually unusable when it reaches Flash.

The following table shows you several options for sending data to a server and receiving data using Flash:

Send data

Description

LoadVars.send and LoadVars.sendAndLoad

Sends name-value pairs to a server-side script for processing. LoadVars.send sends variables to a remote script and ignores any response. LoadVar.sendAndLoad sends name-value pairs to a server and loads or parses the response into a target LoadVars object.

XML.send and XML.sendAndLoad

Similar to LoadVars, but XML.send and XML.sendAndLoad send XML packets instead of name-value pairs.

getURL

Using the getURL() function or MovieClip.getURL method, you can send variables from Flash to a frame or pop‑up window.

Flash Remoting

Lets you easily exchange complex information between Flash and ColdFusion, ASP.NET, Java, and more. You can also use Flash Remoting to consume web services.

Web services

Adobe® Flash® CS3 Professional includes the WebServiceConnector component that lets you connect to remote web services, send and receive data, and bind results to components. This lets Flash developers quickly create Rich Internet Applications without having to write a single line of ActionScript.

You can consume remote web services by using WebServiceClasses, which can require writing complex ActionScript.

  This page on the Web