我有一个 Flash 电影,我需要从 PHP 脚本中读取一个值以设置它从哪个帧开始,我使用以下代码:
if (loaded == total) {
var lvContent = new LoadVars();
lvContent.load("http://MY URL/Includes/getID.php");
trace("Who: " + lvContent.pageID);
lvContent.onLoad = function() {
if (lvContent.pageID != "29") { //If it's the home page then play the full animation. If not .. don't.
_root.gotoAndPlay(2);
}else{
_root.gotoAndPlay(90);
}
}
}
问题是这不起作用 - 它不会进入加载事件。如果我手动运行 PHP,我会得到“&pageID=29”。如果我在本地调试它,我会在跟踪输出窗口中得到“谁:未定义”。从我读过的所有示例中,我似乎正确地做到了这一点,但它似乎并没有奏效。
Flash:使用 Actionscript 2.0 的 CS5
有人可以看看,让我知道我哪里出错了吗?
提前致谢。