上海私立高中排名:flash5脚本在flash7不能运行,怎么办?

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/26 07:13:06
??以下代码在flash5,as1.0环境正常,在flash6以上不能运行。
以下代码加载于剪辑上:

onClipEvent (load) {
image_num = 21;
sumnail_size = 50;
x_revision = 2;
y_revision = 8;
main_x = 695;
main_y = 270;
ratio = 0.3;
friction = 0.6;
total_depth = 30;
now_clip = 0;
for (counter=1; counter<=image_num; counter++) {
this.attachMovie("imageClip", "imageClip"+counter, counter);
this["imageClip"+counter].attachMovie("image"+counter, "image", 1);
this["imageClip"+counter]._xscale = this["imageClip"+counter]._yscale=12;
this["imageClip"+counter].run = true;
this["imageClip"+counter].first = true;
}
counter = 1;
for (h_counter=1; h_counter<=Math.ceil(image_num/3); h_counter++) {
for (v_counter=1; v_counter<=3; v_counter++) {
this["imageClip"+counter]._x = this["imageClip"+counter].origin_x=(17.5*v_counter)+(sumnail_size*v_counter)-x_revision;
this["imageClip"+counter]._y = this["imageClip"+counter].origin_y=(2*h_counter)+(sumnail_size*h_counter)-y_revision;
counter++;
if (counter>image_num) {
break;
}
}
}
MovieClip.prototype.imageShow = function() {
if (run) {
if (first) {
this.swapDepths(++_parent.total_depth);
next_x = -(random(50)+50);
next_y = random(200)-100;
first = false;
gotoAndStop(2 }
next_x = ((_parent.main_x-_x)*_parent.ratio+next_x)*_parent.friction;
next_y = ((_parent.main_y-_y)*_parent.ratio+next_y)*_parent.friction;
_x += next_x;
_y += next_y;
if (Math.abs(_x-_parent.main_x)<0.2 && Math.abs(_y-_parent.main_y)<0.2) {
_x = main_x;
_y = main_y;
run = false;
}
} else {
next_scale = (100-_xscale)*_parent.ratio;
_xscale = _yscale += next_scale;
if (next_scale<0.01) {
_xscale = _yscale=100;
sys = false;
}
}
};
MovieClip.prototype.imageOff = function() {
if (_currentframe == 2) {
gotoAndStop(1);
counter = 1;
}
if (counter>30) {
next_x = (origin_x-_x)*_parent.ratio;
next_y = (origin_y-_y)*_parent.ratio;
_x += next_x;
_y += next_y;
next_scale = (12-_xscale)*_parent.ratio;
_xscale = _yscale += next_scale;
if (Math.abs(next_scale)<0.01) {
_xscale = _yscale=12;
}
if (Math.abs(next_x)<0.01 && Math.abs(next_y<0.01)) {
_x = origin_x;
_y = origin_y;
sys = false;
}
} else {
imageShow();
sys = true;
counter++;
}
};
}
onClipEvent (enterFrame) {
for (counter=1; counter<=image_num; counter++) {
if (this["imageClip"+counter].image_on) {
this["imageClip"+counter].imageShow();
} else {
this["imageClip"+counter].imageoff();
}
}
}

你在发布设置 上 重新设置一下,发布脚本选择1.0 等等 选择符合你脚本运行的环境.再说要是复制 粘贴上去 的脚本 有些是不行的.