关于flash XML加载图片,怎么样可以在图片上加超链接 80

flashas源码如下stop();varcurPage_num:Number=0;varsizPage_num:Number=16;varpai_num:Number=... flash as源码如下
stop();var curPage_num:Number = 0;
var sizPage_num:Number = 16;
var pai_num:Number = 4;
var width_num:Number =130;
var height_num:Number = 110;
var jia_num:Number = 15;
var url_array:Array = new Array();
this.pagedown_btn._visible = false;
this.pageup_btn._visible = false;
function alpha_func(_mc:MovieClip) {
_mc._alpha = 5;
_mc.onEnterFrame = function() {
this._alpha += 5;
this._alpha>=95 ? delete this.onEnterFrame : };}
var _mcl:MovieClipLoader = new MovieClipLoader();
this.onLoadInit = function(_mc:MovieClip) {
_mc._txt.removeTextField();
_mc._width = 130;
_mc._height = 110;
alpha_func(_mc);
};
this.onLoadProgress = function(_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
_mc.createTextField("_txt", 200, 20, 10, 60, 30);
_mc._txt.textColor = 0xff0000;
_mc._txt.text = Math.floor((bytesLoaded/bytesTotal*10000)/100)+"%";
};
this.onLoadError = function(_mc:MovieClip) {
_mc.createTextField("_txt", 200, 20, 10, 60, 30);
_mc._txt.textColor = 0xff0000;
_mc._txt.text = "加载失败!";
};
_mcl.addListener(this);
var url_xml:XML = new XML();
url_xml.ignoreWhite = true;
url_xml.onLoad = function(success) {
if (success) {
for (var d:Number = 0; d<this.firstChild.childNodes.length; d++) {
url_array.push(this.firstChild.childNodes[d].attributes.name);
}
enabled_func();
} else {
trace("xml文档加载失败!");
}
};
url_xml.load("../new_txt/img.xml");
var show_func:Function = function (_page:Number) {
if (_page<1 && _page>=Math.ceil((url_array.length-1)/sizPage_num)-1) {
this.pageup_btn.enabled = false;
this.pagedown_btn.enabled = false;
} else if (_page<1) {
this.pageup_btn.enabled = false;
this.pagedown_btn.enabled = true;
} else if (_page>=Math.ceil((url_array.length-1)/sizPage_num)-1) {
this.pagedown_btn.enabled = false;
this.pageup_btn.enabled = true;
} else {
this.pageup_btn.enabled = true;
this.pagedown_btn.enabled = true;
}
for (var d:Number = 0; d<sizPage_num; d++) {
//attachMovie("pic_mc", "pic_mc"+d, d+1000, {_x:20+Math.floor(d/Math.floor(Math.sqrt(sizPage_num)))*100, _y:20+d%Math.floor(Math.sqrt(sizPage_num))*100});
attachMovie("pic_mc", "pic_mc"+d, d+1000, {_x:300+d%pai_num*(width_num+jia_num), _y:43+Math.floor(d/pai_num)*(height_num+jia_num)});
}
for (var d:Number = 0; d<sizPage_num; d++) {
if (_page*sizPage_num+d>=url_array.length) {
break;
}
_mcl.loadClip(url_array[_page*sizPage_num+d], this["pic_mc"+d]); }};

}
function enabled_func() {
this.pagedown_btn._visible = true;
this.pageup_btn._visible = true;
show_func(curPage_num);
this.pagedown_btn.onRelease = function() {
if (curPage_num<Math.floor(url_array.length/sizPage_num)) {
curPage_num++;
show_func(curPage_num);
}
};
this.pageup_btn.onRelease = function() {
if (curPage_num>0) {
curPage_num--;
show_func(curPage_num);
}
};
}

高手帮帮忙,不胜感谢!
展开
 我来答
1226175038
2011-12-07
知道答主
回答量:13
采纳率:0%
帮助的人:4.6万
展开全部
<?xml version="1.0" encoding="UTF-8" ?>
<imgs>
<pic name="images/01.jpg" url="www.baidu.com" />
<pic name="images/02.jpg" url="www.qq.com"/>
<pic name="images/03.jpg" url="www.163.com" />
<pic name="images/04.jpg" url="www.hao123.com" />
</imgs>
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
帐号已注销
2011-11-25 · TA获得超过516个赞
知道大有可为答主
回答量:1788
采纳率:86%
帮助的人:954万
展开全部
每张图片都单独加还是?
追问


XML外部加 每张图片都不一样的连接
追答
代码不完整吧,到hi上聊
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式