竹节草的药用价值:请教以下action script这段代码的注释

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/09 20:01:14
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].system=false;
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;
system= 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;
system=false;
}
}
else
{
imageShow();
system=true;
counter++;
}
}
}
onClipEvent(enterFrame)
{
for(counter=1;counter<=image_num;counter++)
{
if(this["imageClip"+counter].system)
{
if(this["imageClip"+counter].image_on)
{
this["imageClip"+counter].imageShow();
}
else
{
this["imageClip"+counter].imageoff();
}
}
}
}

太长,你说你哪里不明白好了