武汉到广州动车票价:请求flash高手帮忙!

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/04 18:38:49
本人正在学flash,遇到个棘手的问题想请教大家,就是loading进度条怎么实现阿,做出来后怎么测试呢,在本地的话肯定看不出下载效果的阿!请各位高手帮帮忙啦!谢谢!
按照大家的方法loading做好了,怎么和后面的动画连接不起来呢?我的loading动作为
this.onLoad=function(){
myBytesTotal=_root.getBytesTotal();
}
this.onLoad();

this.onEnterFrame=function(){
myBytesLoaded=_root.getBytesLoaded();
bar_xscale=myBytesLoaded/myBytesTotal*100;

t=getTimer();
rate= "下载速度:" + Math.round(myBytesLoaded/t * 100)/100 + " K/s";

timeLoaded=Math.round(t/1000);
timeRemain=Math.round(timeLoaded*(myBytesTotal-myBytesLoaded)/myBytesLoaded);
timeRemain=Math.round(timeRemain/60)+":"+Math.round(timeRemain%60);
timeLoaded=Math.round(timeLoaded/60)+":"+Math.round(timeLoaded%60);
mytimes="已用时间"+timeLoaded+" "+"剩余时间"+timeRemain;

percent=Math.round(bar_xscale);
this.bar._xscale=bar_xscale;
this.bar_per=percent+"%";
if(myBytesLoaded==myBytesTotal){
delete this.onEnterFrame;
_root.nextFrame();
}else{
this.stop();
}
}

有很多种做法看你喜欢什么了!下面是讲解
http://www.yaohua.org/person/chenxm/hjrj/cfkj/flashjx/31.htm
http://www.xwbline.com/xwblinebbs/dispbbs.asp?boardid=7&id=9
http://it.yninfo.com/pubnews/doc/read/8742421943220786549/5.oldsystem21.774/
测试可以在本机上看到,选项里面有个改模拟网宽的,你调个速度低的就可以看见了。
方法:
按CTRL+ENTER就可以看作的效果,这时候看视图里面有个下载设置,调个慢的就可以看见了!

本人也在研究这个问题
朋友,如果您知道了,别忘了告诉我一声!谢谢!