_quality = "low";
//
layerObj = this.createEmptyMovieClip("layer0", 0);
layerObj._x = 400;
layerObj._y = 300;
total = 50;
for (i=0; i
obj = layerObj.attachMovie("unit", "mc"+i, i);
obj._xscale = obj._yscale=100+i*10;
}
//
layerObj.onEnterFrame = function() {
for (i=0; i
obj = layerObj["mc"+i];
if (i == 49) {
obj._x += (this._xmouse-obj._x)/2;
obj._y += (this._ymouse-obj._y)/2;
} else {
beforeObj = layerObj["mc"+(i+1)];
obj._x += (beforeObj._x-obj._x)/2;
obj._y += (beforeObj._y-obj._y)/2;
}
}
};
AS3
this.quality = "low";
//
var canitaner:Sprite = new Sprite();
this.addChild(canitaner);
//
var total:int=15;
for (var i:int = 0; i
this["unit"+i] = new clip_mc();
var obj:MovieClip=this["unit"+i];
obj.scaleX=obj.scaleY=i*.2;
//
canitaner.addChild(this["unit"+i]);
}
function onEnterEventFrame(e:Event) {
for (var i:int = 0; i
var obj:MovieClip=this["unit"+i];
if (i==total-1) {
obj.x+=(this.mouseX-obj.x)/2;
obj.y+=(this.mouseY-obj.y)/2;
} else {
var beforeObj:MovieClip=this["unit"+(i+1)];
obj.x+=(beforeObj.x-obj.x)/2;
obj.y+=(beforeObj.y-obj.y)/2
;
}
}
}
this.addEventListener(Event.ENTER_FRAME,onEnterEventFrame);