如何使用as3和flash教授cs6在twitpic上传图像 我尝试下面的代码,没有任何反应 提前谢谢
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');