下面这段代码我是从网上下的,可是不知出了什么错,老是运行不了,这是个按钮动效!请楼主多费心拉...帮帮小弟.....

active = false;
var ypos = 100;
dist = new Array();
var totalobjects = 50;
function generateobjects() {
if (mystatus=true) {
startpos = 100;
for (i=0; i<50;i++)
object0.duplicateMovieClip("object"+i, i);
j = i;
k = k+1;
if (j%10 == 0) {
ypos = ypos+25;
startpos = 100;
k = 0;
}
this["object"+i]._x = ((20*k)+startpos);
this["object"+i]._y = ypos;
}
if(mystatus = false){
object._visible = 0;
}
generateobjects();
function attachline(number) {
totalcount = totalobjects;
for (l=0; l<50;l++)
xdist = follow._x-this["object"+l]._x;
ydist = follow._y-this["object"+l]._y;
dist[l] = Math.sqrt(xdist*xdist+ydist*ydist);
this["object"+l].values = Math.round(dist[l]);
this["object"+l].gotoAndStop(Math.round(dist[l]));
this["object"+l].swapDepths(Math.round(dist[l])*100);
}
_root.onEnterFrame = function(){
attachline(14);}
stop();