问题
how I can upload image on twitpic using as3 and flash professorial cs6 and i try the code below and nothing happened Thank's in advance
import flash.net.FileReference;
import flash.filesystem.File;
import flash.filesystem.FileMode;
import flash.filesystem.FileStream;
import flash.utils.ByteArray;
var urlVars:URLVariables = new URLVariables();
urlVars.username = "xxxx";
urlVars.password = "xxxxx";
var urlRequest:URLRequest = new URLRequest("http://twitpic.com/api/upload");
urlRequest.method = URLRequestMethod.POST;
urlRequest.data = urlVars;
var file:File = File.desktopDirectory.resolvePath("test.png");
file.upload(urlRequest, 'media');
来源:https://stackoverflow.com/questions/16645955/upload-image-on-twitpic-using-as3