这段代码是什么意思?能具体翻译一下吗 80
Stage.scaleMode="noScale";this.createEmptyMovieClip("mc",this.getNextHighestDepth());...
Stage.scaleMode = "noScale";
this.createEmptyMovieClip("mc", this.getNextHighestDepth());
import flash.external.*;
ExternalInterface.addCallback("setNum", null, setNum);
ExternalInterface.addCallback("end", null, end);
function setNum(num) {
speed = num;
startFun();
changeNum(num);
}
function changeNum(num) {
if (tm_mc._currentframe<2) {
tm_mc.gotoAndPlay(2);
}
ro = jiao(num);
myTween = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.None.easeNone, mc._x, num, 20);
myTween.onMotionChanged = function() {
step1.num.text = Math.round(this.position);
};
new mx.transitions.Tween(circleBg, "_rotation", mx.transitions.easing.None.easeNone, circleBg._rotation, ro, 20);
}
circleBg._rotation = -90;
setNum(0);
function jiao(i) {
if (i<0) {
i = 0;
}
if (i>1024*10) {
num = 45+45/(1024*20)*i;
} else if (i>1024) {
num = 45/(1024*10)*i;
} else {
num = -90+90/1024*i;
}
return (num);
}
function startFun() {
step1.num.text = 0;
step1._visible = true;
step2._visible = false;
}
startFun();
function end() {
changeNum(speed*10);
step1._visible = false;
step2._visible = true;
step2.num.htmlText = "下载速度:<font size='14' color='#58a6dd'>"+speed+"</font>KB/s 相当于:"+"<font size='14' color='#58a6dd'>"+zhuanhuan(speed)+"</font>";
}
function zhuanhuan(num) {
if (num<100) {
return (num*10+"KB");
} else {
return (Math.round(num/10)/10+"M");
}
} 展开
this.createEmptyMovieClip("mc", this.getNextHighestDepth());
import flash.external.*;
ExternalInterface.addCallback("setNum", null, setNum);
ExternalInterface.addCallback("end", null, end);
function setNum(num) {
speed = num;
startFun();
changeNum(num);
}
function changeNum(num) {
if (tm_mc._currentframe<2) {
tm_mc.gotoAndPlay(2);
}
ro = jiao(num);
myTween = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.None.easeNone, mc._x, num, 20);
myTween.onMotionChanged = function() {
step1.num.text = Math.round(this.position);
};
new mx.transitions.Tween(circleBg, "_rotation", mx.transitions.easing.None.easeNone, circleBg._rotation, ro, 20);
}
circleBg._rotation = -90;
setNum(0);
function jiao(i) {
if (i<0) {
i = 0;
}
if (i>1024*10) {
num = 45+45/(1024*20)*i;
} else if (i>1024) {
num = 45/(1024*10)*i;
} else {
num = -90+90/1024*i;
}
return (num);
}
function startFun() {
step1.num.text = 0;
step1._visible = true;
step2._visible = false;
}
startFun();
function end() {
changeNum(speed*10);
step1._visible = false;
step2._visible = true;
step2.num.htmlText = "下载速度:<font size='14' color='#58a6dd'>"+speed+"</font>KB/s 相当于:"+"<font size='14' color='#58a6dd'>"+zhuanhuan(speed)+"</font>";
}
function zhuanhuan(num) {
if (num<100) {
return (num*10+"KB");
} else {
return (Math.round(num/10)/10+"M");
}
} 展开
展开全部
在Stage.scaleMode=“noScale”的情况;
this.createEmptyMovieClip(“MC”,this.getNextHighestDepth());
进口flash.external*。
ExternalInterface.addCallback(“setNum”,空,setNum);
ExternalInterface.addCallback(“结束”,空,结束);
功能setNum(NUM){
速度= NUM;
startFun();
changeNum(NUM);
}
功能changeNum(NUM){
如果(tm_mc._currentframe<2){
tm_mc.gotoAndPlay(2);
}
RO=娇(NUM);
myTween=新mx.transitions.Tween(MC,“_x”,mx.transitions.easing.None.easeNone,mc._x,NUM,20);
myTween.onMotionChanged=功能(){
step1.num.text= Math.round(this.position);
};
新mx.transitions.Tween(circleBg,“_rotation”,mx.transitions.easing.None.easeNone,circleBg._rotation,RO,20);
}
circleBg._rotation=-90;
setNum(0);
功能娇(我){
如果(I <0){
I =0;
}
如果(I>1024*10){
NUM=45+45/(1024*20)*我;
}否则,如果(我>1024){
NUM=45/(1024*10)*我;
}其他{
NUM=-90+一千〇二十四分之九十○*我;
}
返回(NUM);
}
功能startFun(){
step1.num.text= 0;
step1._visible= TRUE;
step2._visible= FALSE;
}
startFun();
函数结束(){
changeNum(速度*10);
step1._visible= FALSE;
step2._visible= TRUE;
step2.num.htmlText=“下载速度:<字体大小='14'颜色='#58a6dd'>”+速度+“</ FONT> KB/秒相当于:”+“<字体大小='14'颜色= “#58a6dd'>”+ zhuanhuan(速度)+“</ FONT>”;
}
功能zhuanhuan(NUM){
如果(NUM<100){
回报(NUM*10+“KB”);
}其他{
回报(Math.round(NUM/10)/10+“M”);
}
this.createEmptyMovieClip(“MC”,this.getNextHighestDepth());
进口flash.external*。
ExternalInterface.addCallback(“setNum”,空,setNum);
ExternalInterface.addCallback(“结束”,空,结束);
功能setNum(NUM){
速度= NUM;
startFun();
changeNum(NUM);
}
功能changeNum(NUM){
如果(tm_mc._currentframe<2){
tm_mc.gotoAndPlay(2);
}
RO=娇(NUM);
myTween=新mx.transitions.Tween(MC,“_x”,mx.transitions.easing.None.easeNone,mc._x,NUM,20);
myTween.onMotionChanged=功能(){
step1.num.text= Math.round(this.position);
};
新mx.transitions.Tween(circleBg,“_rotation”,mx.transitions.easing.None.easeNone,circleBg._rotation,RO,20);
}
circleBg._rotation=-90;
setNum(0);
功能娇(我){
如果(I <0){
I =0;
}
如果(I>1024*10){
NUM=45+45/(1024*20)*我;
}否则,如果(我>1024){
NUM=45/(1024*10)*我;
}其他{
NUM=-90+一千〇二十四分之九十○*我;
}
返回(NUM);
}
功能startFun(){
step1.num.text= 0;
step1._visible= TRUE;
step2._visible= FALSE;
}
startFun();
函数结束(){
changeNum(速度*10);
step1._visible= FALSE;
step2._visible= TRUE;
step2.num.htmlText=“下载速度:<字体大小='14'颜色='#58a6dd'>”+速度+“</ FONT> KB/秒相当于:”+“<字体大小='14'颜色= “#58a6dd'>”+ zhuanhuan(速度)+“</ FONT>”;
}
功能zhuanhuan(NUM){
如果(NUM<100){
回报(NUM*10+“KB”);
}其他{
回报(Math.round(NUM/10)/10+“M”);
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询