var p = Math.PI*2;
var a = [0, p / 4, 0, p / 4, 0, p / 4, 0, p / 4, p / 8];//人各个部位的弧度
var b = [400, 400, 450, 450, 450, 450, 300, 200, 175];
var c = [20, 20, 20, 20, 40, 40, 60, 80, 20];//人各个部位的y坐标和截距
var num = 9;//部位的数目,如要更多,自己添加
var i = 0;
while (i < num) {
ball.duplicateMovieClip("ball" + i, i);
this["ball" + i].i = i;
i++;
}
ball8._xscale = (ball8._yscale = 200);//头部放大
//下面为连线,组成一个人
onEnterFrame = function () {
createEmptyMovieClip("line", 2000);
with (line) {
lineStyle(8, 0, 100);
var i = 0;
while (i <= 1) {
moveTo(ball._x, ball._y);
lineTo(this["ball" + i]._x, this["ball" + i]._y);
i++;
}
var i = 0;
while (i <= 3) {
moveTo(this["ball" + i]._x, this["ball" + i]._y);
lineTo(this["ball" + (i + 2)]._x, this["ball" + (i + 2)]._y);
i++;
}
var i = 6;
while (i <= 7) {
moveTo(body._x, body._y);
lineTo(this["ball" + i]._x, this["ball" + i]._y);
i++;
}
}
};
|