请问flash中读入xml文件,文件的链接为什么总是最后一个?
时间:2010-10-08
来源:互联网
请问flash中读入xml文件,文件的链接为什么总是最后一个?
哪位有时间帮忙看一下错误在哪?
as代码如下:————————————————————————
function createNewsList(total, array)
{
var movieclip = newsList.news.newMc;
var i = 0;
while (i < total)
{
var depth = movieclip._parent.getNextHighestDepth();
movieclip.duplicateMovieClip("new" + i, depth);
var mc = eval("newsList.news.new" + i);
mc._x = -360;
mc.id = i;
var titleVar = array[0][i].title ;
mc.titleTxt.htmlText = titleVar;
mc.descTxt.htmlText = array[0][i].shortdesc;
var delay = 100 * i;
setTimeout(setClipPos, delay, i, mc);
if (array[0][i].link != undefined)
{
mc.link = array[0][i].link;
mc.bg.onPress = function ()
{
getURL(mc.link, "_blank");
};
mc.bg.onRollOver = function ()
{
this.up = true;
this.play();
};
mc.bg.onRollOut = mc.bg.onReleaseOutside = function ()
{
this.up = false;
this.play();
};
} // end if
++i;
} // end while
arrangeArticles(movieclip, total);
} // End of the function
xml文件代码:————————————————————————
<?xml version="1.0" encoding="utf-8" ?>
<dataroot>
<news>
<new>
<title>1税款综合申报</title>
<link>1.html</link>
</new>
<new>
<title>2社保基金申报</title>
<link>2.html</link>
</new>
<new>
<title>3基金综合申报</title>
<link>3.html</link>
</new>
</news></dataroot>
哪位有时间帮忙看一下错误在哪?
as代码如下:————————————————————————
function createNewsList(total, array)
{
var movieclip = newsList.news.newMc;
var i = 0;
while (i < total)
{
var depth = movieclip._parent.getNextHighestDepth();
movieclip.duplicateMovieClip("new" + i, depth);
var mc = eval("newsList.news.new" + i);
mc._x = -360;
mc.id = i;
var titleVar = array[0][i].title ;
mc.titleTxt.htmlText = titleVar;
mc.descTxt.htmlText = array[0][i].shortdesc;
var delay = 100 * i;
setTimeout(setClipPos, delay, i, mc);
if (array[0][i].link != undefined)
{
mc.link = array[0][i].link;
mc.bg.onPress = function ()
{
getURL(mc.link, "_blank");
};
mc.bg.onRollOver = function ()
{
this.up = true;
this.play();
};
mc.bg.onRollOut = mc.bg.onReleaseOutside = function ()
{
this.up = false;
this.play();
};
} // end if
++i;
} // end while
arrangeArticles(movieclip, total);
} // End of the function
xml文件代码:————————————————————————
<?xml version="1.0" encoding="utf-8" ?>
<dataroot>
<news>
<new>
<title>1税款综合申报</title>
<link>1.html</link>
</new>
<new>
<title>2社保基金申报</title>
<link>2.html</link>
</new>
<new>
<title>3基金综合申报</title>
<link>3.html</link>
</new>
</news></dataroot>
作者: yyysword 发布时间: 2010-10-08
为何以下三条标题连接的都是3.html ?
1税款综合申报
2社保基金申报
3基金综合申报
1税款综合申报
2社保基金申报
3基金综合申报
作者: yyysword 发布时间: 2010-10-08
按道理说破解的代码不会有问题
估计是哪个不懂AS的朋友修改过的
mc.bg.onPress = function ()
{
getURL(mc.link, "_blank");//这一行的mc改成this._parent
};
估计是哪个不懂AS的朋友修改过的
mc.bg.onPress = function ()
{
getURL(mc.link, "_blank");//这一行的mc改成this._parent
};
作者: flash023 发布时间: 2010-10-08
搞定了!谢谢!
作者: yyysword 发布时间: 2010-10-08
flash023 ,厉害!
一看就知道这个是破解的。一下子就能找出问题。
谢谢了!
一看就知道这个是破解的。一下子就能找出问题。
谢谢了!
作者: yyysword 发布时间: 2010-10-08
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28