Instance of Symbol 26 MovieClip in Frame 1
onClipEvent (load) {
_x = (Stage.width / 2);
_y = (Stage.height / 2);
_xscale = 3200;
_yscale = 3200;
}
onClipEvent (enterFrame) {
_rotation = (_rotation + 10);
}
Instance of Symbol 28 MovieClip in Frame 1
onClipEvent (load) {
function lengthdir_x(l, d) {
return(Math.cos((d / 180) * Math.PI) * l);
}
function lengthdir_y(l, d) {
return((-Math.sin((d / 180) * Math.PI)) * l);
}
function point_distance(x1, y1, x2, y2) {
return(Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))));
}
function point_direction(x1, y1, x2, y2) {
return((Math.atan2(y2 - y1, x2 - x1) / Math.PI) * 180);
}
_x = ((Stage.width / 2) + 128);
_y = (Stage.height + 64);
_xstart = _x;
_ystart = _y;
_visible = false;
sequence_initiated = false;
Scale = 2;
Body = new Array();
Body_Attribute1 = new Array();
Body_Attribute2 = new Array();
BODY = 0;
HEAD = 1;
ARML1 = 2;
ARML2 = 3;
ARMR1 = 4;
ARMR2 = 5;
ARM2L1 = 6;
ARM2L2 = 7;
ARM2R1 = 8;
ARM2R2 = 9;
var i = 0;
while (i < 10) {
Body[i] = new Array();
i++;
}
Flex_Step = 0;
Flex_Wait = 10;
Flex_Add = 1;
Flex_Mode = -1;
Head_Rotation = 0;
ArmR2_rotate = 0;
ArmR1_rotate = 0;
Arm2R2_rotate = 50;
Arm2R1_rotate = 0;
ArmL2_rotate = 0;
ArmL1_rotate = 0;
Arm2L2_rotate = -65;
Arm2L1_rotate = -30;
var str = "b";
i = 1;
while (i >= 0) {
_root.attachMovie("Troll_ArmL2" + str, "Troll_Arm2L2" + str, _root.getNextHighestDepth());
Body[ARM2L2][i] = _root["Troll_Arm2L2" + str];
Body_Attribute1[ARM2L2] = -4;
Body_Attribute2[ARM2L2] = -130;
Body[ARM2L2][i]._x = _x + (Body_Attribute1[ARM2L2] * Scale);
Body[ARM2L2][i]._y = _y + (Body_Attribute2[ARM2L2] * Scale);
Body[ARM2L2][i]._xscale = Scale * 100;
Body[ARM2L2][i]._yscale = Scale * 100;
Body[ARM2L2][i]._rotation = Arm2L2_rotate;
_root.attachMovie("Troll_ArmL1" + str, "Troll_Arm2L1" + str, _root.getNextHighestDepth());
Body[ARM2L1][i] = _root["Troll_Arm2L1" + str];
Body_Attribute1[ARM2L1] = 84;
Body_Attribute2[ARM2L1] = -34;
Body[ARM2L1][i]._x = Body[ARM2L2][i]._x + (lengthdir_x(Body_Attribute1[ARM2L1], Body_Attribute2[ARM2L1] - Arm2L2_rotate) * Scale);
Body[ARM2L1][i]._y = Body[ARM2L2][i]._y + (lengthdir_y(Body_Attribute1[ARM2L1], Body_Attribute2[ARM2L1] - Arm2L2_rotate) * Scale);
Body[ARM2L1][i]._xscale = Scale * 100;
Body[ARM2L1][i]._yscale = Scale * 100;
Body[ARM2L1][i]._rotation = Arm2L1_rotate;
_root.attachMovie("Troll_ArmL2" + str, "Troll_ArmL2" + str, _root.getNextHighestDepth());
Body[ARML2][i] = _root["Troll_ArmL2" + str];
Body_Attribute1[ARML2] = -4;
Body_Attribute2[ARML2] = -130;
Body[ARML2][i]._x = _x + (Body_Attribute1[ARML2] * Scale);
Body[ARML2][i]._y = _y + (Body_Attribute2[ARML2] * Scale);
Body[ARML2][i]._xscale = Scale * 100;
Body[ARML2][i]._yscale = Scale * 100;
Body[ARML2][i]._rotation = ArmL2_rotate;
_root.attachMovie("Troll_ArmL1" + str, "Troll_ArmL1" + str, _root.getNextHighestDepth());
Body[ARML1][i] = _root["Troll_ArmL1" + str];
Body_Attribute1[ARML1] = 84;
Body_Attribute2[ARML1] = -34;
Body[ARML1][i]._x = Body[ARML2][i]._x + (lengthdir_x(Body_Attribute1[ARML1], Body_Attribute2[ARML1] - ArmL2_rotate) * Scale);
Body[ARML1][i]._y = Body[ARML2][i]._y + (lengthdir_y(Body_Attribute1[ARML1], Body_Attribute2[ARML1] - ArmL2_rotate) * Scale);
Body[ARML1][i]._xscale = Scale * 100;
Body[ARML1][i]._yscale = Scale * 100;
Body[ARML1][i]._rotation = ArmL1_rotate;
_root.attachMovie("Troll_Body" + str, "Troll_Body" + str, _root.getNextHighestDepth());
Body[BODY][i] = _root["Troll_Body" + str];
Body_Attribute1[BODY] = 0;
Body_Attribute2[BODY] = 0;
Body[BODY][i]._x = _x;
Body[BODY][i]._y = _y;
Body[BODY][i]._xscale = Scale * 100;
Body[BODY][i]._yscale = Scale * 100;
_root.attachMovie("Troll_ArmR2" + str, "Troll_Arm2R2" + str, _root.getNextHighestDepth());
Body[ARM2R2][i] = _root["Troll_Arm2R2" + str];
Body_Attribute1[ARM2R2] = -136;
Body_Attribute2[ARM2R2] = -146;
Body[ARM2R2][i]._x = _x + (Body_Attribute1[ARM2R2] * Scale);
Body[ARM2R2][i]._y = _y + (Body_Attribute2[ARM2R2] * Scale);
Body[ARM2R2][i]._xscale = Scale * 100;
Body[ARM2R2][i]._yscale = Scale * 100;
Body[ARM2R2][i]._rotation = Arm2R2_rotate;
_root.attachMovie("Troll_ArmR1" + str, "Troll_Arm2R1" + str, _root.getNextHighestDepth());
Body[ARM2R1][i] = _root["Troll_Arm2R1" + str];
Body_Attribute1[ARM2R1] = 130;
Body_Attribute2[ARM2R1] = 239;
Body[ARM2R1][i]._x = Body[ARM2R2][i]._x + (lengthdir_x(Body_Attribute1[ARM2R1], Body_Attribute2[ARM2R1] - Arm2R2_rotate) * Scale);
Body[ARM2R1][i]._y = Body[ARM2R2][i]._y + (lengthdir_y(Body_Attribute1[ARM2R1], Body_Attribute2[ARM2R1] - Arm2R2_rotate) * Scale);
Body[ARM2R1][i]._xscale = Scale * 100;
Body[ARM2R1][i]._yscale = Scale * 100;
Body[ARM2R1][i]._rotation = Arm2R1_rotate;
_root.attachMovie("Troll_ArmR2" + str, "Troll_ArmR2" + str, _root.getNextHighestDepth());
Body[ARMR2][i] = _root["Troll_ArmR2" + str];
Body_Attribute1[ARMR2] = -136;
Body_Attribute2[ARMR2] = -146;
Body[ARMR2][i]._x = _x + (Body_Attribute1[ARMR2] * Scale);
Body[ARMR2][i]._y = _y + (Body_Attribute2[ARMR2] * Scale);
Body[ARMR2][i]._xscale = Scale * 100;
Body[ARMR2][i]._yscale = Scale * 100;
Body[ARMR2][i]._rotation = ArmR2_rotate;
_root.attachMovie("Troll_ArmR1" + str, "Troll_ArmR1" + str, _root.getNextHighestDepth());
Body[ARMR1][i] = _root["Troll_ArmR1" + str];
Body_Attribute1[ARMR1] = 130;
Body_Attribute2[ARMR1] = 239;
Body[ARMR1][i]._x = Body[ARMR2][i]._x + (lengthdir_x(Body_Attribute1[ARMR1], Body_Attribute2[ARMR1] - ArmR2_rotate) * Scale);
Body[ARMR1][i]._y = Body[ARMR2][i]._y + (lengthdir_y(Body_Attribute1[ARMR1], Body_Attribute2[ARMR1] - ArmR2_rotate) * Scale);
Body[ARMR1][i]._xscale = Scale * 100;
Body[ARMR1][i]._yscale = Scale * 100;
Body[ARMR1][i]._rotation = ArmR1_rotate;
_root.attachMovie("Troll_Head" + str, "Troll_Head" + str, _root.getNextHighestDepth());
Body[HEAD][i] = _root["Troll_Head" + str];
Body_Attribute1[HEAD] = -90;
Body_Attribute2[HEAD] = -174;
Body[HEAD][i]._x = _x + (Body_Attribute1[HEAD] * Scale);
Body[HEAD][i]._y = _y + (Body_Attribute2[HEAD] * Scale);
Body[HEAD][i]._xscale = Scale * 100;
Body[HEAD][i]._yscale = Scale * 100;
str = "";
i--;
}
}
onClipEvent (enterFrame) {
if (!sequence_initiated) {
sequence_initiated = true;
} else {
Flex_Wait--;
if (Flex_Wait <= 0) {
if (Flex_Mode < 0) {
Flex_Mode = 0;
Flex_Step = 0;
Flex_Add = 6;
}
Flex_Step = Flex_Step + Flex_Add;
switch (Flex_Mode) {
case 0 :
if (Flex_Step >= 100) {
Flex_Mode = 1;
Flex_Add = Flex_Add * -1;
Flex_Wait = 2;
Flex_Step = Flex_Step + 1;
} else if (Flex_Step < 75) {
_x = (_x + (((Flex_Step / 75) * Math.abs(0.375 * Flex_Add)) * Scale));
_y = (_y + (((Flex_Step / 75) * Math.abs(0.75 * Flex_Add)) * Scale));
Head_Rotation = Head_Rotation + ((Flex_Step / 75) * Math.abs(0.25 * Flex_Add));
ArmR2_rotate = ArmR2_rotate - ((Flex_Step / 75) * Math.abs(0.2 * Flex_Add));
ArmR1_rotate = ArmR1_rotate + ((Flex_Step / 75) * Math.abs(0.01 * Flex_Add));
ArmL2_rotate = ArmL2_rotate - ((Flex_Step / 75) * Math.abs(0.3 * Flex_Add));
ArmL1_rotate = ArmL1_rotate - ((Flex_Step / 75) * Math.abs(0.5 * Flex_Add));
Arm2R2_rotate = Arm2R2_rotate - ((Flex_Step / 75) * Math.abs(0.2 * Flex_Add));
Arm2R1_rotate = Arm2R1_rotate + ((Flex_Step / 75) * Math.abs(0.01 * Flex_Add));
Arm2L2_rotate = Arm2L2_rotate - ((Flex_Step / 75) * Math.abs(0.3 * Flex_Add));
Arm2L1_rotate = Arm2L1_rotate - ((Flex_Step / 75) * Math.abs(0.5 * Flex_Add));
} else {
_x = (_x + ((((25 - (Flex_Step - 75)) / 25) * Math.abs(0.375 * Flex_Add)) * Scale));
_y = (_y + ((((25 - (Flex_Step - 75)) / 25) * Math.abs(0.75 * Flex_Add)) * Scale));
Head_Rotation = Head_Rotation + (((25 - (Flex_Step - 75)) / 25) * Math.abs(0.25 * Flex_Add));
ArmR2_rotate = ArmR2_rotate - (((25 - (Flex_Step - 75)) / 25) * Math.abs(0.2 * Flex_Add));
ArmR1_rotate = ArmR1_rotate + (((25 - (Flex_Step - 75)) / 25) * Math.abs(0.01 * Flex_Add));
ArmL2_rotate = ArmL2_rotate - (((25 - (Flex_Step - 75)) / 25) * Math.abs(0.3 * Flex_Add));
ArmL1_rotate = ArmL1_rotate - (((25 - (Flex_Step - 75)) / 25) * Math.abs(0.5 * Flex_Add));
Arm2R2_rotate = Arm2R2_rotate - (((25 - (Flex_Step - 75)) / 25) * Math.abs(0.2 * Flex_Add));
Arm2R1_rotate = Arm2R1_rotate + (((25 - (Flex_Step - 75)) / 25) * Math.abs(0.01 * Flex_Add));
Arm2L2_rotate = Arm2L2_rotate - (((25 - (Flex_Step - 75)) / 25) * Math.abs(0.3 * Flex_Add));
Arm2L1_rotate = Arm2L1_rotate - (((25 - (Flex_Step - 75)) / 25) * Math.abs(0.5 * Flex_Add));
}
break;
case 1 :
if (Flex_Step <= 0) {
Flex_Mode = 0;
Flex_Add = Flex_Add * -1;
Flex_Wait = 2;
} else if (Flex_Step > 25) {
_x = (_x - ((((100 - Flex_Step) / 75) * Math.abs(0.375 * Flex_Add)) * Scale));
_y = (_y - ((((100 - Flex_Step) / 75) * Math.abs(0.75 * Flex_Add)) * Scale));
Head_Rotation = Head_Rotation - (((100 - Flex_Step) / 75) * Math.abs(0.25 * Flex_Add));
ArmR2_rotate = ArmR2_rotate + (((100 - Flex_Step) / 75) * Math.abs(0.2 * Flex_Add));
ArmR1_rotate = ArmR1_rotate - (((100 - Flex_Step) / 75) * Math.abs(0.01 * Flex_Add));
ArmL2_rotate = ArmL2_rotate + (((100 - Flex_Step) / 75) * Math.abs(0.3 * Flex_Add));
ArmL1_rotate = ArmL1_rotate + (((100 - Flex_Step) / 75) * Math.abs(0.5 * Flex_Add));
Arm2R2_rotate = Arm2R2_rotate + (((100 - Flex_Step) / 75) * Math.abs(0.2 * Flex_Add));
Arm2R1_rotate = Arm2R1_rotate - (((100 - Flex_Step) / 75) * Math.abs(0.01 * Flex_Add));
Arm2L2_rotate = Arm2L2_rotate + (((100 - Flex_Step) / 75) * Math.abs(0.3 * Flex_Add));
Arm2L1_rotate = Arm2L1_rotate + (((100 - Flex_Step) / 75) * Math.abs(0.5 * Flex_Add));
} else {
_x = (_x - (((Flex_Step / 25) * Math.abs(0.375 * Flex_Add)) * Scale));
_y = (_y - (((Flex_Step / 25) * Math.abs(0.75 * Flex_Add)) * Scale));
Head_Rotation = Head_Rotation - ((Flex_Step / 25) * Math.abs(0.25 * Flex_Add));
ArmR2_rotate = ArmR2_rotate + ((Flex_Step / 25) * Math.abs(0.2 * Flex_Add));
ArmR1_rotate = ArmR1_rotate - ((Flex_Step / 25) * Math.abs(0.01 * Flex_Add));
ArmL2_rotate = ArmL2_rotate + ((Flex_Step / 25) * Math.abs(0.3 * Flex_Add));
ArmL1_rotate = ArmL1_rotate + ((Flex_Step / 25) * Math.abs(0.5 * Flex_Add));
Arm2R2_rotate = Arm2R2_rotate + ((Flex_Step / 25) * Math.abs(0.2 * Flex_Add));
Arm2R1_rotate = Arm2R1_rotate - ((Flex_Step / 25) * Math.abs(0.01 * Flex_Add));
Arm2L2_rotate = Arm2L2_rotate + ((Flex_Step / 25) * Math.abs(0.3 * Flex_Add));
Arm2L1_rotate = Arm2L1_rotate + ((Flex_Step / 25) * Math.abs(0.5 * Flex_Add));
}
}
}
var i = 1;
while (i >= 0) {
Body[ARM2L2][i]._x = _x + (Body_Attribute1[ARM2L2] * Scale);
Body[ARM2L2][i]._y = _y + (Body_Attribute2[ARM2L2] * Scale);
Body[ARM2L2][i]._xscale = Scale * 100;
Body[ARM2L2][i]._yscale = Scale * 100;
Body[ARM2L2][i]._rotation = Arm2L2_rotate;
Body[ARM2L1][i]._x = Body[ARM2L2][i]._x + (lengthdir_x(Body_Attribute1[ARM2L1], Body_Attribute2[ARM2L1] - Arm2L2_rotate) * Scale);
Body[ARM2L1][i]._y = Body[ARM2L2][i]._y + (lengthdir_y(Body_Attribute1[ARM2L1], Body_Attribute2[ARM2L1] - Arm2L2_rotate) * Scale);
Body[ARM2L1][i]._xscale = Scale * 100;
Body[ARM2L1][i]._yscale = Scale * 100;
Body[ARM2L1][i]._rotation = Arm2L1_rotate;
Body[ARML2][i]._x = _x + (Body_Attribute1[ARML2] * Scale);
Body[ARML2][i]._y = _y + (Body_Attribute2[ARML2] * Scale);
Body[ARML2][i]._xscale = Scale * 100;
Body[ARML2][i]._yscale = Scale * 100;
Body[ARML2][i]._rotation = ArmL2_rotate;
Body[ARML1][i]._x = Body[ARML2][i]._x + (lengthdir_x(Body_Attribute1[ARML1], Body_Attribute2[ARML1] - ArmL2_rotate) * Scale);
Body[ARML1][i]._y = Body[ARML2][i]._y + (lengthdir_y(Body_Attribute1[ARML1], Body_Attribute2[ARML1] - ArmL2_rotate) * Scale);
Body[ARML1][i]._xscale = Scale * 100;
Body[ARML1][i]._yscale = Scale * 100;
Body[ARML1][i]._rotation = ArmL1_rotate;
Body[BODY][i]._x = _x;
Body[BODY][i]._y = _y;
Body[BODY][i]._xscale = Scale * 100;
Body[BODY][i]._yscale = Scale * 100;
Body[ARM2R2][i]._x = _x + (Body_Attribute1[ARM2R2] * Scale);
Body[ARM2R2][i]._y = _y + (Body_Attribute2[ARM2R2] * Scale);
Body[ARM2R2][i]._xscale = Scale * 100;
Body[ARM2R2][i]._yscale = Scale * 100;
Body[ARM2R2][i]._rotation = Arm2R2_rotate;
Body[ARM2R1][i]._x = Body[ARM2R2][i]._x + (lengthdir_x(Body_Attribute1[ARM2R1], Body_Attribute2[ARM2R1] - Arm2R2_rotate) * Scale);
Body[ARM2R1][i]._y = Body[ARM2R2][i]._y + (lengthdir_y(Body_Attribute1[ARM2R1], Body_Attribute2[ARM2R1] - Arm2R2_rotate) * Scale);
Body[ARM2R1][i]._xscale = Scale * 100;
Body[ARM2R1][i]._yscale = Scale * 100;
Body[ARM2R1][i]._rotation = Arm2R1_rotate;
Body[ARMR2][i]._x = _x + (Body_Attribute1[ARMR2] * Scale);
Body[ARMR2][i]._y = _y + (Body_Attribute2[ARMR2] * Scale);
Body[ARMR2][i]._xscale = Scale * 100;
Body[ARMR2][i]._yscale = Scale * 100;
Body[ARMR2][i]._rotation = ArmR2_rotate;
Body[ARMR1][i]._x = Body[ARMR2][i]._x + (lengthdir_x(Body_Attribute1[ARMR1], Body_Attribute2[ARMR1] - ArmR2_rotate) * Scale);
Body[ARMR1][i]._y = Body[ARMR2][i]._y + (lengthdir_y(Body_Attribute1[ARMR1], Body_Attribute2[ARMR1] - ArmR2_rotate) * Scale);
Body[ARMR1][i]._xscale = Scale * 100;
Body[ARMR1][i]._yscale = Scale * 100;
Body[ARMR1][i]._rotation = ArmR1_rotate;
Body[HEAD][i]._x = _x + (Body_Attribute1[HEAD] * Scale);
Body[HEAD][i]._y = _y + (Body_Attribute2[HEAD] * Scale);
Body[HEAD][i]._xscale = Scale * 100;
Body[HEAD][i]._yscale = Scale * 100;
Body[HEAD][i]._rotation = Head_Rotation;
i--;
}
}
}