ReadMore and download fla:http://imjohnny.cn/
Stage.scaleMode = noScale;
var mytxtarray:Array = new Array(”AS1.0″, “AS2.0″, “AS3.0″, “AIR”,
“LITE”, “FLEX”, “RIA”, “ASK”, “FORUM”, “SOURCE”);
//Copy 10 to MC on the scene and given its parameters
for (var i:Number = 0; i<10; i++) {
_root.attachMovie(”mc”,”mc”+i,i+1);
_root["mc"+i]._x = 30+40*i;
_root["mc"+i]._y = 100+30*Math.random(10)*i;
_root["mc"+i].mytxt.text = mytxtarray[i];
_root["mc"+i].onPress = function() {
m = false;
startDrag(this);
getmc_x = this._x;
getmc_y = this._y;
};
_root["mc"+i].onRelease = function() {
m = true;
stopDrag();
this.onEnterFrame = function() {
if (m == true) {
this._x += ((getmc_x-this._x)*0.6)/0.35;
this._y += ((getmc_y-this._y)*0.6)/0.35;//2 ease moving
} else {
delete this.onEnterFrame;
}
};
};
}
//Drawing a line connecting all MC
_root.createEmptyMovieClip(”line”,0);
_root.line.onEnterFrame = function() {
this.clear();
this.lineStyle(1,0×000000,100);
this.moveTo(mc0._x,mc0._y);
for (var j:Number = 1; j<10; j++) {
this.lineTo(_root["mc"+j]._x,_root["mc"+j]._y);
}
};