Actionscript 需要代码使动画停止
正在尝试在as2的第109帧上停止此动画。任何我需要的帮助来阻止这一切。这是一部五彩纸屑动画Actionscript 需要代码使动画停止,actionscript,Actionscript,正在尝试在as2的第109帧上停止此动画。任何我需要的帮助来阻止这一切。这是一部五彩纸屑动画 cnfNumber = 85; var cnfs:Array = new Array("cnf", "cnf2", "cnf3","cnf4","cnf5") for (i=0; i<cnfNumber; i++) { newCnf = _root[cnfs[random(cnfs.length)]].duplicateMovieClip("snow"+i, i); newCnf
cnfNumber = 85;
var cnfs:Array = new Array("cnf", "cnf2", "cnf3","cnf4","cnf5")
for (i=0; i<cnfNumber; i++) {
newCnf = _root[cnfs[random(cnfs.length)]].duplicateMovieClip("snow"+i, i);
newCnf._x = Math.random()*Stage.width;
newCnf._y = -Math.random()*300;
newCnf.maxCnfSpeed = Math.random()*4;
newCnf.wind = Math.random()*6;
newCnf._xscale = newCnf._yscale = newCnf.alpha = Math.random()*65+35
newCnf.onEnterFrame = function() {
this._rotation -= this.maxCnfSpeed+1;
if(this._y>Stage.height || this._x>Stage.width || this._x<0){
this._y = -Math.random()*300;
this._x = Math.random()*Stage.width;
} else {
this._y += this.maxCnfSpeed+2;
this._x += this.wind-4;
}
this._alpha = this.alpha;
};
}
cnfNumber=85;
变量cnfs:数组=新数组(“cnf”、“cnf2”、“cnf3”、“cnf4”、“cnf5”)
对于(i=0;iStage.height | this.x>Stage.width | this.x为什么不这样做:
newCnf._xscale = newCnf._yscale = newCnf.alpha = Math.random()*65+35
newCnf.frameCount = 0;
newCnf.onEnterFrame = function() {
if(this.frameCount<109) {
this._rotation -= this.maxCnfSpeed+1;
if(this._y>Stage.height || this._x>Stage.width || this._x<0){
this._y = -Math.random()*300;
this._x = Math.random()*Stage.width;
} else {
this._y += this.maxCnfSpeed+2;
this._x += this.wind-4;
}
this._alpha = this.alpha;
this.frameCount++;
} else {
this.onEnterFrame = null;
}
};
newCnf.\u xscale=newCnf.\u yscale=newCnf.alpha=Math.random()*65+35
newCnf.frameCount=0;
newCnf.onEnterFrame=函数(){
如果(this.frameCountStage.height | | this.x>Stage.width | | this.x这是actionscript而不是javascript,对吗?是的,cnfs:Array是有效的actionscript。