如何将Flash与Php集成
|
我想将我的Flash文件与php代码集成在一起。我从下面的代码
http://www.kirupa.com/developer/actionscript/flashphpxml_integration2.htm
function lv(l, n, t, e, f) {
if (l == undefined) {
l = new LoadVars();
l.onLoad = function () {
var i;
n.htmlText = \"\";
if (t == undefined) {
n.htmlText += \"<b>\" + this[\"title\" + e] + \"</b><br>\";
} else {
for (i = 0; i < this.n; i++) {
n.htmlText += \"<a href=\'\" + this[\"link\" + i] + \"\'>\" + this[\"title\" + i] + \"</a><br>\";
}
}
};
}
l.load(f);
}
lv(sites_txt, \"cycle\", null, \"sites.php\");
我执行了该论坛中给出的所有步骤,但是在运行该代码时出现错误,例如
1180: Call to a possibly undefined method LoadVars.
Warning: 1060: Migration issue: The method LoadVars is no longer supported. For more information, see the URLVariables class, the URLRequest.urlVariables and URLRequest.postData properties, and the URLLoader.dataFormat property..
1136: Incorrect number of arguments. Expected 5.
我是Flash脚本的新手,请指导我如何解决这些问题
没有找到相关结果
已邀请:
1 个回复
好按紊叉
这样,您可以将数据以
的格式发送到给定的PHP脚本。
很容易准备,像这样:
这是我为您模拟的一个简单示例,该示例将字符串发送给PHP,然后PHP发送回散列为MD5的字符串,并且还附加了一个时间戳作为辅助值。
您的输出将类似于以下内容:
只需更改
类中的
方法即可根据需要处理您的响应数据:) 我将其放入,因为您的问题带有mysql标签。 您所需要做的就是在PHP脚本中进行标准的INSERT和SELECT查询,并将结果编码为以下格式:
所以你可以有..