上传图片+变量 原来可以这样做(AS3)

      Flash习作 2009-4-27 17:40
//上传图片+变量
private function uploadFile(url : String) : void {
 var ext:String="jpg";
 var request : URLRequest = new URLRequest(url+"?ext="+ext);
 request.contentType = "application/octet-stream";
 request.method = URLRequestMethod.POST;
 request.data = jpgStream;
 
 uploader.dataFormat = URLLoaderDataFormat.BINARY;
 uploader.addEventListener(Event.COMPLETE, upload_complete);
 try {
  uploader.load(request);
 } catch (error : ArgumentError) {
  trace("An ArgumentError has occurred.");
 } catch (error : SecurityError) {
  trace("A SecurityError has occurred.");
 }
}
标签集:TAGS:AS3 flash
回复Comments() 点击Count()

回复Comments

{commentauthor}
{commentauthor}
{commenttime}
{commentnum}
{commentcontent}
作者:
{commentrecontent}