我吓坏了。在网上搜索了一个小时,没有任何帮助。我试图将PHP数据加载到闪存中,但它不起作用。以下是as3代码:
var adressS:URLRequest = new URLRequest("adress/file.php");
var scriptLoader:URLLoader = new URLLoader();
adressS.method = URLRequestMethod.POST;
scriptLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
scriptLoader.load(adressS);
scriptLoader.addEventListener(Event.COMPLETE, handleLoadSuccessful);
scriptLoader.addEventListener(IOErrorEvent.IO_ERROR, handleLoadError);
function handleLoadSuccessful(e:Event):void {
if(scriptLoader.data.resulte == "wrong") {
error_mc.visible = true;
error_mc.gotoAndStop(1);
} else { ... }下面是PHP:
<?php
if(!isset($_SESSION['login'])) {
echo 'resulte='.'wrong';
}
?>我得到了
resulte=wrong
从php,所以我想这不是问题,但当我试图运行闪存文件时,我会得到输出错误:
错误:错误#2101:传递给URLVariables.decode()的字符串必须是包含名称/值对的URL编码查询字符串。在错误时$/throwError()在flash.net::URLLoader/flash.net:URLLoader::onComplete()的flash.net::URLVariables$iinit()::URLVariables/decode()
我不知道我做错了什么。
拜托救救我。
发布于 2012-12-28 13:13:37
scriptLoader.dataFormat = 'variables';//闪光灯,杀了我几个小时。
https://stackoverflow.com/questions/14010554
复制相似问题