最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
flash图片切换
时间:2022-07-02 17:05:28 编辑:袖梨 来源:一聚教程网
flash图片切换,这里他有三action我分别列出来,还有一个aa.xml我们要用as分析xml文档把图片给flash 进行处理.先看flash三个动作的代码.
1
Stage.scaleMode = "noScale";
//Stage.align = "TL";
fscommand("showmenu", false);
System.useCodepage=true;
// Create a new XML object.
var xmlObj:XML = new XML();
// Set the ignoreWhite property to true (default value is false).
xmlObj.ignoreWhite = true;
// After loading is complete, trace the XML object.
xmlObj.onLoad = function(success) {
gotoAndPlay(3);
};
// Load the XML into the xmlObj object.
//xmlObj.load(picurl);
xmlObj.load("pic_list.xml");
stop();
_quality="best";
2
pic_show1._visible=true;
now=1;
function lik_see() {
var lik0=new Array();
for (i=1;i
}
lik0.sortOn("depth",16)
for (i=0;i
}
lik0[n-2].lik._visible=true;
lik0[n-3].lik._visible=true;
lik0[n-4].lik._visible=true;
lik0[n-5].lik._visible=true;
lik0[n-6].lik._visible=true;
jishi.gotoAndPlay(1);
}
caidan.caidan.left0.onRelease = function () {
now--;
if (now<1) now=n-1;
lik=_root["pic_show"+now]
lik._visible=true;
lik.swapDepths(m);
lik.gotoAndPlay(1);
caidan.caidan.caidantiao.back0._x=(now-1)*50
m++;
lik_see();
trace (now)
trace (lik)
trace (m)
}
caidan.caidan.right0.onRelease = function () {
now++;
if (now==n) now=1;
lik=_root["pic_show"+now]
lik._visible=true;
lik.swapDepths(m);
lik.gotoAndPlay(1);
caidan.caidan.caidantiao.back0._x=(now-1)*50
m++;
lik_see();
trace (now)
trace (lik)
trace (m)
}
stop();
好了,flash 的as我己全部贴出来了,现在我们来看xml 的格式吧.
好了就完了,我们只要图片路径对了就OK了,
相关文章
- 王者荣耀侦探能力大测试攻略 王者荣耀侦探能力大测试怎么过 11-22
- 无期迷途主线前瞻兑换码是什么 11-22
- 原神欧洛伦怎么培养 11-22
- 炉石传说网易云音乐联动怎么玩 11-22
- 永劫无间手游确幸转盘怎么样 11-22
- 无期迷途主线前瞻兑换码是什么 无期迷途主线前瞻直播兑换码介绍 11-22