The previous example, “Using the URLVariables and FileReference classes to pass data from Flex to a server-side script”, showed how you could use the
upload() method in the FileReference class along with the URLRequest and URLVariables classes to send data from your Flex application to a server-side script. Well, what happens if you want to send data from your server-side script back to your Flex application? Say hello to the
uploadCompleteData event! This event gets dispatched after data is received from the server after a successful upload.
uploadCompleteData event is not dispatched if data is not returned from the server.
The following example shows how you can set up an event listener for the
uploadCompleteData event to display information about the file upload.
Full code after the jump.