2017艺术品展览会:谁有FLASH程序,有请贡献下.

来源:百度文库 编辑:中科新闻网 时间:2024/04/28 05:26:38
加上比较详细的程序介绍.

flash中程序含量很少,有也要配合帧才好动作,给你一段显示下载百分比的代码的例子,你看看flash程序的意思吧

byteloaded = _root.getBytesLoaded();
bytetotal = _root.getBytesTotal();
loaded = int(byteloaded / bytetotal * 100);
t = getTimer();
percent = loaded + "% ( " + int(byteloaded / 1000) + " K / " + int(bytetotal / 1000) + " K )";
percent = percent + "\r下载速度:" + int(byteloaded / t * 100) / 100 + " K/s";
//load_bar.gotoAndStop(loaded);
timeloaded = int(t / 1000);
timeremain = int(timeloaded * (bytetotal - byteloaded) / byteloaded);
timeremain = int(timeremain / 60) + "\'" + int(timeremain % 60) + "\"";
timeloaded = int(timeloaded / 60) + "\'" + int(timeloaded % 60) + "\"";
downloadtime = "已用时间:" + timeloaded + "剩余时间:" + timeremain;