Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在flash中,运行php文件以刷新xml文件,无需弹出窗口_Php_Actionscript 3 - Fatal编程技术网

在flash中,运行php文件以刷新xml文件,无需弹出窗口

在flash中,运行php文件以刷新xml文件,无需弹出窗口,php,actionscript-3,Php,Actionscript 3,在flash中,运行php文件以刷新xml文件,无需弹出窗口。没有任何数据从flash传递到php文件或返回到flash。只需运行编写xml文件的php即可 忘了加上这个 var phpPath:String; var sendHeader:URLRequestHeader; var sendReq:URLRequest; var sendLoader:URLLoader; 试过这个,似乎不起作用。也许我需要补充一下 mybuton.addEventListener(MouseEvent.CL

在flash中,运行php文件以刷新xml文件,无需弹出窗口。没有任何数据从flash传递到php文件或返回到flash。只需运行编写xml文件的php即可

忘了加上这个

var phpPath:String;
var sendHeader:URLRequestHeader;
var sendReq:URLRequest;
var sendLoader:URLLoader;
试过这个,似乎不起作用。也许我需要补充一下

mybuton.addEventListener(MouseEvent.CLICK, fl_EnterFrameHandler_4);

function fl_EnterFrameHandler_4(event:Event):void
{


phpPath = "http://www.mysite.com/my_xml_file.php";


sendHeader = new URLRequestHeader("Content-type","application/octet-stream");
sendReq = new URLRequest(phpPath);
sendReq.requestHeaders.push(sendHeader);
sendReq.method = URLRequestMethod.POST;

}

创建URL请求时,实际上从未发送该请求。要做到这一点,您需要使用:

var loader:URLLoader = new URLLoader();
loader.load(sendReq);

创建URL请求时,实际上从未发送该请求。要做到这一点,您需要使用:

var loader:URLLoader = new URLLoader();
loader.load(sendReq);

“sendReq.requestHeaders.push(sendHeader)”之后的反勾号是怎么做的?这只是一个错误。明白了谢谢“sendReq.requestHeaders.push(sendHeader)”后面的倒勾是怎么回事只是个错误。谢谢你,30秒前没有提交答案:)PS:前几天我想我注意到一个类,当你只想点击服务器(而不是等待响应…)时可以使用它,但我现在找不到。@SunilD。那将是:)该死,30秒前没有提交答案:)PS:前几天我想我注意到一个类,当你只想点击服务器(而不是等待响应…)时可以使用它,但我现在找不到。@SunilD。那就是:)