Mr. Fixit
21.03.2007, 01:07
почему lines_mc начинается с нуля..:boredom:
_root.createEmptyMovieClip ('lines_mc', 0);
lines_mc.lineStyle (1);
onEnterFrame = function () {
//lines_mc.clear ();
lines_mc.moveTo (100, 100);
lines_mc.lineTo (x1, y1);
lines_mc.lineTo (x2, y2);
lines_mc.lineTo (x3, y3);
lines_mc.lineTo (x4, y4);
if (x1 != 200 && !firstStep) {
x1 == undefined ? x1=100 : x1 += 5;
y1 = 100;
}
if (x1 == 200 && !secondStep) {
firstStep = true;
x2 = x1;
y2 == undefined ? y2=100 : y2 += 5;
}
if (y2 == 200 && !thirdStep) {
secondStep = true;
x3 == undefined ? x3=y2 : x3 -= 5;
y3 = y2;
}
if (x3 == 100) {
thirdStep = true;
x4 = x3;
y4 == undefined ? y4=y2 : y4 -= 5;
}
};
_root.createEmptyMovieClip ('lines_mc', 0);
lines_mc.lineStyle (1);
onEnterFrame = function () {
//lines_mc.clear ();
lines_mc.moveTo (100, 100);
lines_mc.lineTo (x1, y1);
lines_mc.lineTo (x2, y2);
lines_mc.lineTo (x3, y3);
lines_mc.lineTo (x4, y4);
if (x1 != 200 && !firstStep) {
x1 == undefined ? x1=100 : x1 += 5;
y1 = 100;
}
if (x1 == 200 && !secondStep) {
firstStep = true;
x2 = x1;
y2 == undefined ? y2=100 : y2 += 5;
}
if (y2 == 200 && !thirdStep) {
secondStep = true;
x3 == undefined ? x3=y2 : x3 -= 5;
y3 = y2;
}
if (x3 == 100) {
thirdStep = true;
x4 = x3;
y4 == undefined ? y4=y2 : y4 -= 5;
}
};