Multipart form data in flash
Eugene has a handy MultipartURLLoader class to do the leg work of sending multipart form data from flash.
Note that because it uses:
urlRequest.requestHeaders.push( new URLRequestHeader( ‘Cache-Control’, ‘no-cache’ ) );
You may get SecurityError:
Error #2044: Unhandled securityError:. text=Error #2170: Security sandbox violation: http://domain1.com/your.swf cannot send HTTP headers to http://domain2.com/yourscript.php.
You may need to add a variation of <allow-http-request-headers-from domain=”*” headers=”*”/> to your crossdomain.xml file or comment out that line. I chose the latter as I don’t think its neccessary in a POST call.