之后我让我的AS3向我的PHP发送变量我收到以下错误:
Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
at Error$/throwError()
at flash.net::URLVariables/decode()
at flash.net::URLVariables()
at flash.net::URLLoader/onComplete()
Cannot display source code at this location.
有什么想法对付这个吗? 只有直接从flash文件运行它才会发生这种情况?
这是因为我在我的机器上使用localhost来执行此操作吗?
答案 0 :(得分:0)
这通常意味着从PHP传递回你的onComplete处理函数的信息没有按名称/值对格式化。
e.g。名称=标记
如果您打算返回PHP传递名称/值对,则应将URLLoader设置为:
yourLoaderName.dataFormat = URLLoaderDataFormat.VARIABLES;
或者如果响应不是名称/值对:
yourLoaderName.dataFormat = URLLoaderDataFormat.TEXT;