【发布时间】:2011-05-23 05:46:25
【问题描述】:
我想将我的 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 脚本的新手,请指导我如何解决这些问题
【问题讨论】:
-
LoadVars 是一个 AS2 类 - 我将向您展示一个 AS3 示例。