使用Flash发布
我一直在尝试让以下代码正常工作:使用Flash发布,flash,post,Flash,Post,我一直在尝试让以下代码正常工作: var scriptRequest:URLRequest = new URLRequest("http://mywebsite.com/script.php"); var scriptLoader:URLLoader = new URLLoader(); var scriptVars:URLVariables = new URLVariables(); scriptLoader.addEventListener(Event.COMPLETE,handleLo
var scriptRequest:URLRequest = new URLRequest("http://mywebsite.com/script.php");
var scriptLoader:URLLoader = new URLLoader();
var scriptVars:URLVariables = new URLVariables();
scriptLoader.addEventListener(Event.COMPLETE,handleLoadSuccessful);
scriptLoader.addEventListener(IOErrorEvent.IO_ERROR,handleLoadError);
scriptLoader.load(scriptRequest);
}
跟踪(“已发送消息”)
函数handleLoadError($evt:IOErrorEvent):void
{
跟踪(“消息失败”);
}
奇怪的是,它从Flash中正确发布。。但当我上传到我的网络服务器时,它不会。。。有什么想法吗 谢谢 亚历克斯
function write(write_to_file) {
scriptVars.req = "testing testing testing";
scriptRequest.method = URLRequestMethod.POST;
scriptRequest.data = scriptVars;
function handleLoadSuccessful($evt:Event):void
{
}