Flash 菜鸟问:**错误** 场景=场景 1, 图层=雪花层, 帧=1:第 21 行: 遇到意外的 '}' } 5
onClipEvent(load){this._visible=false;v0=2;scale0=15;num=150;vardir=newArray();varv=n...
onClipEvent(load){
this._visible=false;
v0=2;
scale0=15;
num=150;
var dir=new Array();
var v=new Array();
for(i=1;i<=num;i++){
_root.attachMovie("snowing","snowing"+i,i);
scale=random(2.5*scale0)+scale0;
with(_root["snowing"+i]){
_xscale = (scale*100);
_yscale = scale*100;
_x=random(500);
_y=random(400);
_rotation=random(360);
dir[i]=-(random(180));
v[i]=random(v0)+v0;
}
}
}
onClipEvent(enterFrame){
for(i=1;i<=num;i++){
with(_root["snowing"+i]){
_x+=math.cos(dir[i]);
_y+=v[i];
if(_x<0){
_x=500;
}
if(_x>500){
_x=0;
}
if(_y>400){
_y=0;
}
}
}
} 展开
this._visible=false;
v0=2;
scale0=15;
num=150;
var dir=new Array();
var v=new Array();
for(i=1;i<=num;i++){
_root.attachMovie("snowing","snowing"+i,i);
scale=random(2.5*scale0)+scale0;
with(_root["snowing"+i]){
_xscale = (scale*100);
_yscale = scale*100;
_x=random(500);
_y=random(400);
_rotation=random(360);
dir[i]=-(random(180));
v[i]=random(v0)+v0;
}
}
}
onClipEvent(enterFrame){
for(i=1;i<=num;i++){
with(_root["snowing"+i]){
_x+=math.cos(dir[i]);
_y+=v[i];
if(_x<0){
_x=500;
}
if(_x>500){
_x=0;
}
if(_y>400){
_y=0;
}
}
}
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询