Frame 1
function setArmsMove(newmove) {
armsTime = getTimer();
oldArmsMove = armsMove;
armsMove = newmove;
i = 0;
while (i < 8) {
tObj = eval ("i_panel.i_btn_a" + i);
if ((i == newmove) || ((i == 7) && (newmove == 8))) {
tObj._alpha = 100;
} else {
tObj._alpha = 50;
}
i++;
}
if (armsMove == 5) {
setBodyMove(0);
}
if (armsMove == 7) {
setBodyMove(1);
}
}
function setBodyMove(newmove) {
bodyTime = getTimer();
oldBodyMove = bodyMove;
bodyMove = newmove;
i = 0;
while (i < 7) {
tObj = eval ("i_panel.i_btn_b" + i);
if (i == newmove) {
tObj._alpha = 100;
} else {
tObj._alpha = 50;
}
i++;
}
}
function setFeetMove(newmove) {
feetTime = getTimer();
oldFeetMove = feetMove;
feetMove = newmove;
i = 0;
while (i < 8) {
tObj = eval ("i_panel.i_btn_f" + i);
if (i == newmove) {
tObj._alpha = 100;
} else {
tObj._alpha = 50;
}
i++;
}
if (feetMove == 7) {
setBodyMove(4);
} else if (bodyMove == 4) {
setBodyMove(1);
}
}
function setBodies(body) {
setBody(i_dansman, body);
setBody(i_dansman1, body);
setBody(i_dansman2, body);
setBody(i_dansman3, body);
setBody(i_dansman4, body);
}
function setBody(obj, body) {
obj.overkropp.gotoAndStop(body);
obj.overkropp.arm_v.gotoAndStop(body);
obj.overkropp.arm_h.gotoAndStop(body);
obj.overkropp.arm_v.underarm.gotoAndStop(body);
obj.overkropp.arm_h.underarm.gotoAndStop(body);
obj.ben_v.ben_hu.gotoAndStop(body);
obj.ben_h.ben_hu.gotoAndStop(body);
obj.ben_v.ben_ho._visible = false;
obj.ben_v.ben_ho._rotation = 0;
obj.ben_v.ben_ho.gotoAndStop(body);
obj.ben_h.ben_ho._visible = false;
obj.ben_h.ben_ho._rotation = 0;
obj.ben_h.ben_ho.gotoAndStop(body);
obj.fot_v.gotoAndStop(body);
obj.fot_h.gotoAndStop(body);
}
if (_root._url.substr(0, 4) == "file") {
baseURL = "http://fuldans.se/db/";
siteURL = "http://fuldans.se";
avatarid = "ueqzzgnaoi";
avatarimg = "/avatars/o/oadibqhczc.jpg";
body = 7;
hx = -50;
hy = 5;
hs = 137;
hr = -284;
} else {
baseURL = "db/";
siteURL = "";
}
if (language == "en") {
if (server == "2") {
shareURL = "http://www2.theuglydance.com";
} else if (server == "3") {
shareURL = "http://www3.theuglydance.com";
} else if (server == "0") {
shareURL = "http://vip.theuglydance.com";
} else {
shareURL = "http://theuglydance.com";
}
} else {
shareURL = "http://fuldans.se";
}
headX = hx;
headY = hy;
headScale = hs;
headRotation = hr / 10;
i_dansman._visible = false;
animate = true;
var fulmusik = new Sound();
interacted = false;
setBodies(body);
i_panel.i_btn_create._visible = false;
Frame 2
i_dansman.overkropp.huvud.i_headholder.loadImage(_root.siteURL + avatarimg, false);
i_dansman1.overkropp.huvud.i_headholder.loadImage(_root.siteURL + avatarimg, false);
i_dansman2.overkropp.huvud.i_headholder.loadImage(_root.siteURL + avatarimg, false);
i_dansman3.overkropp.huvud.i_headholder.loadImage(_root.siteURL + avatarimg, false);
i_dansman4.overkropp.huvud.i_headholder.loadImage(_root.siteURL + avatarimg, false);
i_dansman5.overkropp.huvud.i_headholder.loadImage(_root.siteURL + avatarimg, false);
if (showupload == "true") {
i_dialog.gotoAndPlay("start");
i_panel.i_btn_create.disable_panel = true;
interacted = true;
}
if (((please == "true") && (vip != "true")) && (showupload != "true")) {
i_dialog.gotoAndPlay("please");
stop();
}
Frame 4
if (i_dansman.overkropp.huvud.i_headholder.i_imgholder._width < 10) {
gotoAndPlay(_currentframe - 1);
} else {
if (language == "en") {
fulmusik.loadSound("theuglydance-low.mp3", true);
} else {
fulmusik.loadSound("fuldans-low.mp3", true);
}
i_dansman.active = true;
setArmsMove(0);
setBodyMove(0);
setFeetMove(0);
i_panel.i_btn_create._visible = true;
}
Frame 6
if ((Math.random() < 0.2) && (animate)) {
if ((i_bg._currentframe > 1) || (Math.random() < 0.1)) {
i_bg.gotoAndStop(Math.ceil(Math.random() * 4));
}
}
if (fulmusik.position > 65000) {
i = 1;
while (i <= 4) {
tObj = eval ("i_dansman" + i);
if ((tObj._x < 900) || (!_root.i_panel.i_btn_create.disable_panel)) {
tObj.active = true;
tObj.offset = i * 10;
tObj._x = tObj._x - 1;
if (tObj._x < 0) {
tObj._alpha = 100 + tObj._x;
}
if ((tObj._x < -100) && (!_root.i_panel.i_btn_create.disable_panel)) {
tObj._x = tObj._x + 1000;
}
if (tObj._x > 800) {
tObj._alpha = 100 - (tObj._x - 800);
}
if (tObj._alpha > 90) {
tObj._alpha = 90;
}
}
i++;
}
}
gotoAndPlay(_currentframe - 1);
Symbol 8 MovieClip Frame 1
stop();
Symbol 24 MovieClip Frame 6
stop();
Symbol 43 MovieClip Frame 1
_parent.ben_ho._width = 52;
_parent.ben_hu._xscale = 120;
Symbol 43 MovieClip Frame 2
_parent.ben_ho._width = 55;
_parent.ben_hu._xscale = 120;
Symbol 43 MovieClip Frame 3
_parent.ben_ho._width = 55;
_parent.ben_hu._xscale = 120;
Symbol 43 MovieClip Frame 4
_parent.ben_ho._width = 75;
_parent.ben_hu._xscale = 120;
if (_parent._name == "ben_h") {
_parent.ben_ho._xscale = -160;
_parent.ben_hu._xscale = -120;
}
Symbol 43 MovieClip Frame 5
_parent.ben_ho._width = 65;
_parent.ben_hu._xscale = 120;
stop();
Symbol 43 MovieClip Frame 6
_parent.ben_ho._width = 62;
_parent.ben_hu._xscale = 120;
Symbol 43 MovieClip Frame 7
if (this._name == "ben_hu") {
bengoldo._visible = false;
bengoldu._visible = true;
} else {
bengoldu._visible = false;
bengoldo._visible = true;
}
_parent.ben_ho._width = 102;
_parent.ben_hu._xscale = 120;
Symbol 49 Button
on (press) {
_parent.startMove();
}
on (release) {
_parent.endMove();
}
on (rollOver) {
_parent.startMoveCursor();
}
on (rollOut) {
_parent.endMoveCursor();
}
Symbol 50 MovieClip Frame 1
function loadImage(imagename, edit) {
i_imgholder.loadMovie(imagename);
if (edit) {
i_btn.enabled = true;
}
play();
}
i_btn.enabled = false;
Symbol 50 MovieClip Frame 2
stop();
Symbol 50 MovieClip Frame 4
if (i_imgholder._width > 0) {
i_imgholder._x = (-i_imgholder._width) / 2;
i_imgholder._y = (-i_imgholder._height) / 2;
i_btn._x = i_imgholder._x;
i_btn._y = i_imgholder._y;
i_btn._width = i_imgholder._width;
i_btn._height = i_imgholder._height;
gotoAndStop (2);
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 58 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 5
stop();
Symbol 85 MovieClip Frame 5
stop();
Symbol 98 MovieClip Frame 1
huvud._y = -110;
Symbol 98 MovieClip Frame 2
huvud._y = -117;
Symbol 98 MovieClip Frame 3
huvud._y = -110;
Symbol 98 MovieClip Frame 4
huvud._y = -117;
Symbol 98 MovieClip Frame 5
huvud._y = -110;
stop();
Symbol 98 MovieClip Frame 6
huvud._y = -112;
Symbol 98 MovieClip Frame 7
huvud._y = -114;
Symbol 99 MovieClip Frame 1
function getArmsVars(movement) {
if (movement == 0) {
return(Array(10 + (3 * Math.sin(tTime)), 240 + (3 * Math.sin(tTime)), 30, 30));
}
if (movement == 1) {
return(Array((20 * Math.sin(tTime)) - 40, (180 + (20 * Math.sin(tTime))) + 40, (20 * Math.cos(tTime)) - 40, (-20 * Math.cos(tTime)) - 40));
}
if (movement == 2) {
return(Array((120 * Math.sin(tTime - 0.4)) - 60, (180 + (120 * Math.sin(tTime - 0.3))) + 60, (30 * Math.sin(tTime)) - 40, (-30 * Math.sin(tTime)) - 40));
}
if (movement == 3) {
return(Array((90 + (30 * Math.sin(tTime))) - 40, (80 + (30 * Math.sin(tTime))) + 40, (40 * Math.cos(tTime)) + 40, (-40 * Math.cos(tTime)) + 40));
}
if (movement == 4) {
return(Array(-80 + (10 * Math.sin(tTime)), 250 + (10 * Math.sin(tTime)), (30 * Math.sin(tTime * 3)) - 90, (-30 * Math.sin(tTime * 3)) - 90));
}
if (movement == 5) {
vPos = Math.round(((tTime - 1.571296) + 0.3) / 6.283185) % 6;
if (vPos > 3) {
vPos = 6 - vPos;
}
hPos = Math.round(((tTime + 1.571296) + 0.3) / 6.283185) % 6;
if (hPos > 3) {
hPos = 6 - hPos;
}
return(Array(-80 + (5 * Math.sin(tTime)), 250 + (5 * Math.sin(tTime)), ((3 * overkropp.arm_v.underarm._rotation) + ((vPos * 75) - 90)) / 4, ((3 * overkropp.arm_h.underarm._rotation) + (120 - (hPos * 75))) / 4));
}
if (movement == 6) {
return(Array((90 - (60 * Math.sin(tTime))) - 40, (80 - (60 * Math.sin(tTime))) + 40, (40 * Math.cos(tTime)) + 40, (-40 * Math.cos(tTime)) + 40));
}
if (movement == 7) {
return(Array((30 - (overkropp._rotation * 1.2)) - (20 * Math.sin((tTime * 2) - 2)), (230 - (overkropp._rotation / 3)) + (3 * Math.sin((tTime * 2) - 2)), 120 + (30 * Math.sin((tTime * 2) - 1.7)), -20 + (8 * Math.sin((tTime * 2) - 1))));
}
if (movement == 8) {
return(Array((30 - (overkropp._rotation * 1.2)) - (20 * Math.sin((tTime * 2) - 2)), (150 - (overkropp._rotation * 1.2)) + (20 * Math.sin((tTime * 2) - 2)), 120 + (30 * Math.sin((tTime * 2) - 1.7)), 120 + (25 * Math.sin((tTime * 2) - 1.3))));
}
}
function getBodyVars(movement) {
if (movement == 0) {
return(Array(0, -20 - (10 * Math.sin((tTime * 2) + 0.7)), 10 + (50 * Math.cos(tTime / 20)), -10 - (40 * Math.cos(tTime / 20))));
}
if (movement == 1) {
return(Array(0, -25 * Math.sin((tTime * 2) + 0.7), 20 * Math.cos(tTime + 1.7), -20 * Math.cos(tTime + 1.7)));
}
if ((movement == 2) || ((offset > 0) && (movement == 3))) {
return(Array(0, -35 * Math.sin((tTime * 2) + 0.7), 50 * Math.cos(tTime + 1.7), -40 * Math.cos(tTime + 1.7)));
}
if (movement == 3) {
return(Array(0, -35 * Math.sin((tTime * 2) + 0.7), 70 * Math.cos(tTime + 1.7), -40 * Math.cos(tTime + 1.7)));
}
if (movement == 4) {
return(Array(80 * Math.sin(tTime), -10 * Math.sin((tTime * 2) + 0.7), 20 * Math.cos(tTime + 1.7), -20 * Math.cos(tTime + 1.7)));
}
}
function getFeetVars(movement) {
if (movement == 0) {
return(Array(-30, 30, 120, 120, -180, 0));
}
if ((movement == 1) || (movement == 7)) {
rot = -175 - (20 * Math.sin((tTime * 2) + 5));
if (rot < -180) {
rot = -180;
}
y = 100 + (40 * Math.sin((tTime * 2) + 5));
if (y > 120) {
y = 120;
}
return(Array(-80, 30, y, 120, rot, 0));
}
if (movement == 2) {
v_y = 60 * Math.sin(tTime - 1.3);
if (v_y > 0) {
v_y = 0;
}
h_y = -60 * Math.sin(tTime - 1.3);
if (h_y > 0) {
h_y = 0;
}
return(Array(-30, 30, 120 + v_y, 120 + h_y, -180 + (v_y / 1.5), (-h_y) / 1.5));
}
if (movement == 3) {
discoTime = (tTime + 1.5) % 12.566371;
if (discoTime > 6.283185) {
discoTime = 12.283185 - discoTime;
}
discoTime = (discoTime * 0.95) + 0.3;
v_x = Math.cos(discoTime);
v_y = Math.sin(discoTime);
if (v_y < 0) {
v_x = -1;
v_y = 0;
}
h_x = Math.cos(discoTime);
h_y = -Math.sin(discoTime);
if (h_y < 0) {
h_x = -1;
h_y = 0;
}
return(Array(-20 + (40 * v_x), 20 - (40 * h_x), 140 - (50 * v_y), 140 - (50 * h_y), -200 - (20 * v_x), 20 + (20 * h_x)));
}
if (movement == 4) {
v_y = 30 * Math.sin((tTime * 2) - 1.2);
if (v_y > 0) {
v_y = 0;
}
h_y = -30 * Math.sin((tTime * 2) - 1.2);
if (h_y > 0) {
h_y = 0;
}
h_x = Math.sin(tTime - 1.2);
if (h_x > 0.6) {
h_x = 0.6;
}
if (h_x < -0.6) {
h_x = -0.6;
}
return(Array(-50, 30 + (50 * h_x), 125 + v_y, 125 + h_y, -180 + (v_y / 1.5), (-h_y) / 1.5));
}
if (movement == 5) {
vtwist = 40 * Math.sin(tTime);
if (vtwist < 0) {
vtwist = 0;
}
htwist = 40 * Math.sin(tTime);
if (htwist > 0) {
htwist = 0;
}
return(Array(-30 - (vtwist / 2), 30 - (htwist / 2), 120, 120, -180 + vtwist, htwist));
}
if (movement == 6) {
v_y = 80 * Math.sin(tTime - 1.2);
if (v_y > 0) {
v_y = 0;
}
h_y = -80 * Math.sin(tTime - 1.2);
if (h_y > 0) {
h_y = 0;
}
return(Array(-30 + (2 * v_y), 30 - (2 * h_y), 120 + v_y, 120 + h_y, -180 - v_y, h_y));
}
}
function tween(arr1, arr2, twTime) {
twTime = (getTimer() - twTime) / 100;
if (twTime > 3.14) {
return(arr1);
}
twPos = 1 - ((Math.cos(twTime) / 2) + 0.5);
outArr = new Array();
i = 0;
while (i < arr1.length) {
outArr.push((arr1[i] * twPos) + (arr2[i] * (1 - twPos)));
i++;
}
return(outArr);
}
bTime = 0;
oldbTime = 0;
iTime = getTimer();
bar = 0;
offset = 0;
if (_root.body != 6) {
mantel._visible = false;
}
Symbol 99 MovieClip Frame 3
if (active != true) {
gotoAndPlay(_currentframe - 1);
}
Symbol 99 MovieClip Frame 5
if (_parent.fulmusik.position != oldbTime) {
if ((bTime < 2000) || ((getTimer() - iTime) > 5000)) {
bTime = _parent.fulmusik.position;
iTime = getTimer();
if ((bTime > 45000) && (!_root.interacted)) {
_root.i_styr.play();
}
}
if (this._name == "i_dansman") {
if (!_parent.i_panel.i_btn_facebook._visible) {
_parent.i_panel.i_btn_create._xscale = 100 + (sTime / 2500);
_parent.i_panel.i_btn_create._yscale = _parent.i_panel.i_btn_create._xscale;
if (sTime > 100000) {
_parent.i_panel.i_btn_create._alpha = 70 + (Math.random() * 30);
} else {
_parent.i_panel.i_btn_create._alpha = 40 + (sTime / 1500);
}
} else {
_parent.i_panel.i_btn_facebook._alpha = 70 + (Math.random() * 30);
}
}
oldbTime = _parent.fulmusik.position;
}
sTime = ((bTime + getTimer()) - iTime) - offset;
tTime = sTime / 159.155;
tBar = Math.floor((sTime + 300) / 4000) + 1;
if (tBar != bar) {
bar = tBar;
if ((((getTimer() - _parent.armsTime) > 500) && ((getTimer() - _parent.bodyTime) > 500)) && ((getTimer() - _parent.feetTime) > 500)) {
if ((bar == 15) && (_parent.armsMove == 2)) {
setArmsMove(4);
}
if ((bar == 11) && (_parent.armsMove == 4)) {
_parent.setArmsMove(2);
}
if (_root.i_panel.i_btn_create.disable_panel) {
_parent.setBodyMove(1);
} else {
if ((bar >= 24) && (_parent.bodyMove == 2)) {
_parent.setBodyMove(3);
}
if (((bar >= 11) && (_parent.bodyMove == 1)) && (_parent.armsMove < 7)) {
_parent.setBodyMove(2);
}
}
if ((bar >= 11) && (_parent.armsMove == 7)) {
_parent.setArmsMove(8);
}
if ((bar == 7) && (_parent.armsMove == 3)) {
_parent.setArmsMove(4);
}
if ((bar == 5) && (_parent.armsMove == 1)) {
_parent.setArmsMove(3);
}
if ((bar == 3) && (_parent.armsMove == 0)) {
_parent.setArmsMove(1);
}
if (((bar % 3) == 0) && (_parent.bodyMove == 0)) {
_parent.setBodyMove(1);
}
if ((bar == 2) && (_parent.feetMove == 0)) {
_parent.setFeetMove(1);
}
}
}
if (_root.animate) {
armsVars = tween(getArmsVars(_parent.armsMove), getArmsVars(_parent.oldArmsMove), _parent.armsTime);
overkropp.arm_v._rotation = armsVars[0];
overkropp.arm_h._rotation = armsVars[1];
overkropp.arm_v.underarm._rotation = armsVars[2];
overkropp.arm_h.underarm._rotation = armsVars[3];
if ((armsVars[0] + armsVars[2]) < -30) {
overkropp.arm_v.underarm.hand.gotoAndStop(1);
} else {
overkropp.arm_v.underarm.hand.gotoAndStop(2);
}
if ((armsVars[1] - armsVars[3]) > 215) {
overkropp.arm_h.underarm.hand.gotoAndStop(1);
} else {
overkropp.arm_h.underarm.hand.gotoAndStop(2);
}
bodyVars = tween(getBodyVars(_parent.bodyMove), getBodyVars(_parent.oldBodyMove), _parent.bodyTime);
overkropp._x = bodyVars[0];
overkropp._y = bodyVars[1];
overkropp._rotation = bodyVars[2];
overkropp.huvud._rotation = bodyVars[3];
overkropp.huvud.i_headholder._x = _root.headX;
overkropp.huvud.i_headholder._y = _root.headY;
overkropp.huvud.i_headholder._xscale = _root.headScale;
overkropp.huvud.i_headholder._yscale = _root.headScale;
overkropp.huvud.i_headholder._rotation = _root.headRotation;
if (_root.body == 6) {
targX = overkropp._x + (90 * Math.sin(overkropp._rotation / 57.29));
if (targX < (mantel._x - 1)) {
mantel._rotation = mantel._rotation + 1;
} else if (targX > (mantel._x + 1)) {
mantel._rotation = mantel._rotation - 1;
} else {
mantel._rotation = mantel._rotation * 0.95;
}
mantel._x = targX;
mantel._y = overkropp._y - (90 * Math.cos(overkropp._rotation / 57.29));
}
feetVars = tween(getFeetVars(_parent.feetMove), getFeetVars(_parent.oldFeetMove), _parent.feetTime);
fot_v._x = feetVars[0];
fot_h._x = feetVars[1];
fot_v._y = feetVars[2];
fot_h._y = feetVars[3];
fot_v._rotation = feetVars[4];
fot_h._rotation = feetVars[5];
if (_parent.feetMove == 5) {
twist = 0.5 - (Math.sin(tTime) / 2);
} else {
twist = 0;
}
xA = fot_h._x;
yA = fot_h._y;
xB = overkropp._x + 30;
yB = overkropp._y;
bLength = 78;
xDiff = xA - xB;
yDiff = yA - yB;
tRotation = (57.29 * Math.atan2(yDiff, xDiff)) - 90;
tDist = Math.sqrt((xDiff * xDiff) + (yDiff * yDiff)) / bLength;
if (tDist > 2) {
tDist = 2;
}
ben_h._x = fot_h._x;
ben_h._y = fot_h._y;
if (twist != 0) {
ben_h._rotation = (tRotation + (57.29 * Math.acos(tDist / 2))) - ((twist * 114.58) * Math.acos(tDist / 2));
ben_h.ben_ho._rotation = (-114.58 * Math.acos(tDist / 2)) + (((twist * 4) * 57.29) * Math.acos(tDist / 2));
} else {
ben_h._rotation = tRotation + (57.29 * Math.acos(tDist / 2));
ben_h.ben_ho._rotation = -114.58 * Math.acos(tDist / 2);
}
ben_h.ben_ho._visible = true;
xA = fot_v._x;
yA = fot_v._y;
xB = overkropp._x - 20;
yB = overkropp._y;
bLength = 78;
xDiff = xA - xB;
yDiff = yA - yB;
tRotation = (57.29 * Math.atan2(yDiff, xDiff)) - 90;
tDist = Math.sqrt((xDiff * xDiff) + (yDiff * yDiff)) / bLength;
if (tDist > 2) {
tDist = 2;
}
ben_v._x = fot_v._x - 4;
ben_v._y = fot_v._y;
if (twist != 0) {
ben_v._rotation = (tRotation + (57.29 * Math.acos(tDist / 2))) - (((twist * 2) * 57.29) * Math.acos(tDist / 2));
ben_v.ben_ho._rotation = (-114.58 * Math.acos(tDist / 2)) + (((twist * 4) * 57.29) * Math.acos(tDist / 2));
} else {
ben_v._rotation = tRotation - (57.29 * Math.acos(tDist / 2));
ben_v.ben_ho._rotation = 114.58 * Math.acos(tDist / 2);
}
ben_v.ben_ho._visible = true;
if ((_parent.fulmusik.position > 450) && (!this._visible)) {
this._visible = true;
}
}
gotoAndPlay(_currentframe - 1);
Symbol 103 Button
on (press) {
if (movetype == "arms") {
_root.interacted = true;
_parent._parent.setArmsMove(movement);
} else if (movetype == "body") {
_root.interacted = true;
_parent._parent.setBodyMove(movement);
} else if (movetype == "feet") {
_root.interacted = true;
_parent._parent.setFeetMove(movement);
} else if (movetype == "bodytype") {
_parent.setBodyType(movement);
} else if (movetype == "go_next") {
_parent.goNext = true;
_parent.play();
} else if (movetype == "go_next_in_loop") {
_parent.goNext = true;
_parent.gotoAndPlay(_parent._currentframe + 2);
} else if (movetype == "go_back_in_loop") {
_parent.goNext = false;
_parent.gotoAndPlay(_parent._currentframe + 2);
} else if (movetype == "file_browse") {
_parent.fileBrowse();
} else if (movetype == "link") {
_root.fulmusik.stop();
getURL (movement, "_blank");
}
mo_state = false;
}
on (rollOver) {
baseX = i_text._x;
baseY = i_text._y;
mo_state = true;
}
on (rollOut) {
mo_state = false;
}
Symbol 104 MovieClip Frame 1
mo_state = false;
Symbol 104 MovieClip Frame 3
if (mo_state) {
i_text._xscale = 110;
i_text._yscale = i_text._xscale;
i_text._alpha = 20 + (100 * Math.random());
i_text._x = (baseX + (2 * Math.random())) - 1;
i_text._y = (baseY + (6 * Math.random())) - 3;
} else {
i_text._xscale = 100;
i_text._yscale = i_text._xscale;
i_text._alpha = 100;
i_text._x = baseX;
i_text._y = baseY;
}
gotoAndPlay(_currentframe - 1);
Symbol 108 MovieClip Frame 1
if (_root.language == "en") {
btn_text = "> CREATE YOUR OWN UGLY DANCER";
} else if (_root.body == 6) {
btn_text = "> G\u00D6R DIG SJ\u00C4LV SOM LEGION\u00C4R";
}
Symbol 109 Button
on (press) {
if (((_root.vip != "true") && (Math.random() <= 0.5)) && (_root.server == "0")) {
getURL ("http://www2.theuglydance.com/?v=upload");
} else if ((_root.vip != "true") && (_root.server == "0")) {
getURL ("http://www3.theuglydance.com/?v=upload");
} else if ((_root.vip == "true") && (_root.server != "0")) {
getURL ("http://vip.theuglydance.com/?v=upload");
} else {
_parent._parent.i_dialog.gotoAndPlay("start");
mo_state = false;
disable_panel = true;
_root.interacted = true;
}
}
on (rollOver) {
baseX = i_text._x;
baseY = i_text._y;
mo_state = true;
}
on (rollOut) {
mo_state = false;
}
Symbol 110 MovieClip Frame 1
i_text._alpha = 50;
mo_state = false;
disable_panel = false;
Symbol 110 MovieClip Frame 3
if (mo_state) {
i_text._xscale = i_text._xscale + ((150 - i_text._xscale) / 3);
i_text._yscale = i_text._xscale;
i_text._alpha = 65 + (100 * Math.random());
i_text._x = (baseX + (4 * Math.random())) - 2;
i_text._y = (baseY + (6 * Math.random())) - 3;
} else if (i_text._xscale > 101) {
i_text._xscale = i_text._xscale + ((100 - i_text._xscale) / 2);
i_text._yscale = i_text._xscale;
i_text._alpha = i_text._xscale - 50;
i_text._x = baseX;
i_text._y = baseY;
}
if (disable_panel) {
_parent._alpha = _parent._alpha + ((-_parent._alpha) / 10);
if (_parent._alpha < 1) {
_parent._visible = false;
}
} else if (_parent._alpha < 100) {
_parent._alpha = _parent._alpha + ((100 - _parent._alpha) / 10);
_parent._visible = true;
}
gotoAndPlay(_currentframe - 1);
Symbol 112 MovieClip Frame 1
if (_root.language == "en") {
btn_text = "> SHARE ON FACEBOOK";
}
Symbol 113 Button
on (press) {
mo_state = false;
_root.animate = false;
if (_root.avatarid != "") {
avatarURL = (_root.shareURL + "/?v=") + _root.avatarid;
} else {
avatarURL = _root.shareURL + "/";
}
getURL ("http://www.facebook.com/sharer.php?u=" + escape(avatarURL));
}
on (rollOver) {
baseX = i_text._x;
baseY = i_text._y;
mo_state = true;
}
on (rollOut) {
mo_state = false;
}
Symbol 114 MovieClip Frame 1
i_text._alpha = 50;
mo_state = false;
Symbol 114 MovieClip Frame 3
if (mo_state) {
i_text._xscale = i_text._xscale + ((140 - i_text._xscale) / 3);
i_text._yscale = i_text._xscale;
i_text._alpha = 50 + (100 * Math.random());
i_text._x = (baseX + (4 * Math.random())) - 2;
i_text._y = (baseY + (6 * Math.random())) - 3;
} else if (i_text._xscale > 101) {
i_text._xscale = i_text._xscale + ((100 - i_text._xscale) / 2);
i_text._yscale = i_text._xscale;
i_text._alpha = i_text._xscale - 50;
i_text._x = baseX;
i_text._y = baseY;
}
gotoAndPlay(_currentframe - 1);
Symbol 117 Button
on (press) {
mo_state = false;
getURL ("http://www.myspace.com/fulkultur");
}
on (rollOver) {
baseX = i_text._x;
baseY = i_text._y;
mo_state = true;
}
on (rollOut) {
mo_state = false;
}
Symbol 118 MovieClip Frame 1
i_text._alpha = 50;
mo_state = false;
Symbol 118 MovieClip Frame 3
if (mo_state) {
i_text._xscale = i_text._xscale + ((150 - i_text._xscale) / 3);
i_text._yscale = i_text._xscale;
i_text._alpha = 65 + (100 * Math.random());
i_text._x = (baseX + (4 * Math.random())) - 2;
i_text._y = (baseY + (6 * Math.random())) - 3;
} else if (i_text._xscale > 101) {
i_text._xscale = i_text._xscale + ((100 - i_text._xscale) / 2);
i_text._yscale = i_text._xscale;
i_text._alpha = i_text._xscale - 50;
i_text._x = baseX;
i_text._y = baseY;
}
gotoAndPlay(_currentframe - 1);
Symbol 122 Button
on (press) {
getURL ("http://www.myspace.com/fulkultur");
}
Symbol 125 Button
on (press) {
getURL ("http://www.oderland.se/");
}
Symbol 129 MovieClip Frame 1
if (_root.vip != "true") {
stop();
}
Symbol 129 MovieClip Frame 2
stop();
Symbol 130 Button
on (press) {
mo_state = false;
if (_root.vip == "true") {
_root.i_dialog.gotoAndPlay("pleasebtn");
} else {
_root.i_dialog.gotoAndPlay("please");
}
}
on (rollOver) {
baseX = i_text._x;
baseY = i_text._y;
mo_state = true;
}
on (rollOut) {
mo_state = false;
}
Symbol 131 MovieClip Frame 1
mo_state = false;
Symbol 131 MovieClip Frame 3
if (mo_state) {
i_text._xscale = i_text._xscale + ((120 - i_text._xscale) / 3);
i_text._yscale = i_text._xscale;
i_text._x = (baseX + (2 * Math.random())) - 1;
i_text._y = (baseY + (2 * Math.random())) - 1;
if (i_text._alpha < 100) {
i_text._alpha = i_text._alpha + 5;
}
} else if (i_text._xscale > 101) {
i_text._xscale = i_text._xscale + ((100 - i_text._xscale) / 2);
i_text._yscale = i_text._xscale;
i_text._x = baseX;
i_text._y = baseY;
} else if (i_text._alpha > 60) {
i_text._alpha = i_text._alpha - 1;
}
gotoAndPlay(_currentframe - 1);
Symbol 132 MovieClip Frame 1
if (_root.language == "en") {
i_oderland._visible = false;
}
if (_root.share == "off") {
i_btn_facebook._visible = false;
}
i_btn_create._alpha = 40;
i_btn_email._visible = false;
i_btn_myspace._visible = false;
if (_root.language == "en") {
hdr_hindlegs = "HiND LeGS";
hdr_frontlegs = "FRoNT lEgs";
armsMoves = Array("still", "limp", "sway", "hippie", "grease", "robot", "windmill", "go go go!");
feetMoves = Array("still", "stomp", "tramp", "disco", "step", "twist", "kick", "aerobic");
} else {
armsMoves = Array("stilla", "lufsa", "gunga", "blomma", "rulla", "robot", "v\u00E4derkvarn", "stek");
feetMoves = Array("stilla", "stampa", "trampa", "disco", "stepp", "twist", "spark", "balansera");
}
i = 0;
while (i < 8) {
tObj = eval ("i_btn_a" + i);
tObj.movetype = "arms";
tObj.movement = i;
tObj.i_text.i_text.text = armsMoves[i];
i++;
}
i = 0;
while (i < 8) {
tObj = eval ("i_btn_f" + i);
tObj.movetype = "feet";
tObj.movement = i;
tObj.i_text.i_text.text = feetMoves[i];
i++;
}
if (_root.behaviour != "en") {
stop();
}
Symbol 132 MovieClip Frame 2
stop();
Symbol 135 MovieClip Frame 1
if (_root.language != "en") {
stop();
}
Symbol 135 MovieClip Frame 2
stop();
Symbol 136 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 41
gotoAndStop (1);
Symbol 147 MovieClip Frame 1
if (_root.language == "en") {
gotoAndStop (2);
} else {
stop();
}
Symbol 150 MovieClip Frame 1
stop();
Symbol 150 MovieClip Frame 41
gotoAndStop (1);
Symbol 162 Button
on (press) {
_parent.startScale();
}
on (release) {
_parent.endScale();
}
on (rollOver) {
this._alpha = 100;
}
on (rollOut) {
this._alpha = 50;
}
Symbol 163 MovieClip Frame 1
if (_root.language == "en") {
btn_text = "PULL THIS TO\nSCALE AND ROTATE";
}
Symbol 167 MovieClip Frame 1
if (_root.language == "en") {
btn_text = "MOVE";
}
Symbol 176 MovieClip Frame 1
if (_root.language == "en") {
hdr_done = "DONE!";
}
Symbol 177 MovieClip Frame 51
stop();
Symbol 184 Button
on (press) {
if (movetype == "go_next") {
_parent.goNext = true;
_parent.play();
} else {
_root.animate = false;
if (movetype == "donate1") {
amount = "1.00";
} else {
amount = "5.00";
}
cmd = "_donations";
business = "theuglydance@gmail.com";
item_number = _root.remote;
item_name = "TheUglyDance.com: Donation for Fulkultur and high quality music download";
no_shipping = "1";
no_note = "1";
currency_code = "USD";
bn = "PP-DonationsBF";
lc = "US";
getURL ("https://www.paypal.com/cgi-bin/webscr", "", "POST");
}
mo_state = false;
}
on (rollOver) {
baseX = i_text._x;
baseY = i_text._y;
mo_state = true;
}
on (rollOut) {
mo_state = false;
}
Symbol 185 MovieClip Frame 1
mo_state = false;
Symbol 185 MovieClip Frame 3
if (mo_state) {
i_text._xscale = 110;
i_text._yscale = i_text._xscale;
i_text._alpha = 20 + (100 * Math.random());
i_text._x = (baseX + (2 * Math.random())) - 1;
i_text._y = (baseY + (6 * Math.random())) - 3;
} else {
i_text._xscale = 100;
i_text._yscale = i_text._xscale;
i_text._alpha = 100;
i_text._x = baseX;
i_text._y = baseY;
}
gotoAndPlay(_currentframe - 1);
Symbol 193 MovieClip Frame 1
stop();
Symbol 193 MovieClip Frame 2
_root.firstName = "";
_root.email = "";
tBodyType = _root.body;
Symbol 193 MovieClip Frame 10
function fileBrowse() {
_root.animate = false;
if (_root.language == "en") {
fileToUpload.browse([{description:"Images (*.jpg,*.jpeg,*.gif,*.giff)", extension:"*.jpg;*.jpeg;*.gif;*.giff"}]);
} else {
fileToUpload.browse([{description:"Bilder (*.jpg,*.jpeg,*.gif,*.giff)", extension:"*.jpg;*.jpeg;*.gif;*.giff"}]);
}
}
if (_root.language == "en") {
hdr_create = "TURN YOURSELF INTO AN UGLY DANCER";
hdr_step1 = "step 1 of 4";
} else if (_root.body == 6) {
hdr_create = "G\u00D6R DIG SJ\u00C4LV SOM LEGION\u00C4R";
hdr_step1 = "steg 1 av 3";
}
if (_root.vip != "true") {
i_vip._visible = false;
}
var fileToUpload = (new flash.net.FileReference());
var fileListener = new Object();
fileListener.onSelect = function (selectedFile) {
i_input.text = fileToUpload.name;
_root.animate = true;
i_btn_upload._visible = true;
};
fileListener.onProgress = function (file, bytesLoaded, bytesTotal) {
if (Math.random() < 0.2) {
progressMsg = progressMsg + ".";
}
};
fileListener.onHTTPError = function (file, httpError) {
progressMsg = (("HTTP-fel nummer: " + httpError) + " Fil: ") + file.name;
};
fileListener.onIOError = function (file) {
progressMsg = ("IO-Fel: " + fileToUpload.name) + " Detta beror troligtivs p\u00E5 att en brandv\u00E4gg blockerar trafiken.";
_root.i_panel.i_btn_create.disable_panel = false;
};
fileListener.onSecurityError = function (file, errorString) {
progressMsg = (("S\u00E4kerhetsfel: " + errorString) + " Fil: ") + fileToUpload.name;
_root.i_panel.i_btn_create.disable_panel = false;
};
fileListener.onComplete = function (selectedFile) {
if (_root.language == "en") {
progressMsg = "The image has been uploaded.";
} else {
progressMsg = "Bilden har laddats upp.";
}
play();
};
fileToUpload.addListener(fileListener);
if (_root.language == "en") {
i_btn_browse.i_text.i_text.text = "BROWSE";
} else {
i_btn_browse.i_text.i_text.text = "V\u00C4LJ FIL";
}
i_btn_browse.movetype = "file_browse";
if (_root.language == "en") {
i_btn_upload.i_text.i_text.text = "UPLOAD >";
} else {
i_btn_upload.i_text.i_text.text = "LADDA UPP >";
}
i_btn_upload.movetype = "go_next";
i_btn_upload._visible = false;
stop();
Symbol 193 MovieClip Frame 11
fuldanscom = false;
tempimg = "";
filename = fileToUpload.name.toLowerCase();
if (_root.server == "2") {
c = 1;
while (c <= 9) {
tempimg = tempimg + chr(97 + Math.floor(26 * Math.random()));
c++;
}
tempimg = tempimg + "5";
} else if (_root.server == "3") {
c = 1;
while (c <= 9) {
tempimg = tempimg + chr(97 + Math.floor(26 * Math.random()));
c++;
}
tempimg = tempimg + "6";
} else {
c = 1;
while (c <= 10) {
tempimg = tempimg + chr(97 + Math.floor(26 * Math.random()));
c++;
}
}
if (filename.substr(-1, 1) == "f") {
tempimg = tempimg + "f";
tempimgfile = tempimg + ".gif";
} else {
tempimgfile = tempimg + ".jpg";
}
if (_root.language == "en") {
progressMsg = ("Uploading the picture " + fileToUpload.name) + ".";
} else {
progressMsg = ("Laddar upp bilden " + fileToUpload.name) + ".";
}
if (fuldanscom) {
fileToUpload.upload("http://fuldans.com/db/upload-image.php?id=" + tempimg);
} else {
fileToUpload.upload((_root.baseURL + "upload-image.php?id=") + tempimg);
}
Symbol 193 MovieClip Frame 12
if (_root.language == "en") {
hdr_upload = "This could take some time depending on your Internet connection and the size of the picture.";
}
stop();
Symbol 193 MovieClip Frame 20
_root.headX = 0;
_root.headY = -39;
_root.headScale = 50;
_root.headRotation = 0;
tempurl = _root.baseURL;
if (fuldanscom) {
tempurl = "http://fuldans.com/db/";
}
_parent.i_dansman.overkropp.huvud.i_headholder.loadImage((tempurl + "temp/") + tempimgfile, false);
Symbol 193 MovieClip Frame 22
function startMoveCursor() {
Mouse.hide();
moveCursor = true;
}
function endMoveCursor() {
Mouse.show();
moveCursor = false;
}
function startMove() {
moveActive = true;
moveMouseBaseX = this._xmouse;
moveMouseBaseY = this._ymouse;
moveImageBaseX = i_headholder._x;
moveImageBaseY = i_headholder._y;
}
function endMove() {
moveActive = false;
}
function startScale() {
Mouse.hide();
scaleActive = true;
moveMouseBaseX = this._xmouse;
moveMouseBaseY = this._ymouse;
moveImageBaseX = i_btn_scale._x;
moveImageBaseY = i_btn_scale._y;
}
function endScale() {
Mouse.show();
scaleActive = false;
}
i_headholder.loadImage((tempurl + "temp/") + tempimgfile, true);
i_headholder._x = (_root.headX * 2) + 340;
i_headholder._y = ((_root.headY + 39) * 2) - 10;
i_headholder._xscale = _root.headScale * 2;
i_headholder._yscale = _root.headScale * 2;
i_headholder._rotation = _root.headRotation;
Symbol 193 MovieClip Frame 27
if (_root.language == "en") {
hdr_step2 = "step 2 of 4";
dsc_step2 = "Line up your face with the hole. You don't have to be toooo precise. You're gonna be ugly anyway. Click on Okay when it is.";
i_btn_next.i_text.i_text.text = "OKAY >";
i_btn_back.i_text.i_text.text = "new image";
} else {
if (_root.body == 6) {
hdr_step2 = "steg 2 av 3";
}
i_btn_next.i_text.i_text.text = "N\u00D6JD >";
i_btn_back.i_text.i_text.text = "byt bild";
}
i_btn_next.movetype = "go_next_in_loop";
i_btn_back.movetype = "go_back_in_loop";
i_crs_move._visible = false;
i_btn_scale._visible = false;
i_btn_rotate._visible = false;
Symbol 193 MovieClip Frame 29
if (moveActive) {
i_headholder._x = moveImageBaseX + (this._xmouse - moveMouseBaseX);
i_headholder._y = moveImageBaseY + (this._ymouse - moveMouseBaseY);
}
if (moveCursor) {
i_crs_move._visible = true;
i_crs_move._x = this._xmouse;
i_crs_move._y = this._ymouse;
} else {
i_crs_move._visible = false;
}
i_btn_scale._visible = true;
organgle = Math.atan(i_headholder.i_imgholder._width / i_headholder.i_imgholder._height);
orgdist = Math.sqrt((i_headholder.i_imgholder._width * i_headholder.i_imgholder._width) + (i_headholder.i_imgholder._height * i_headholder.i_imgholder._height)) / 2;
if (scaleActive) {
i_btn_scale._x = moveImageBaseX + (this._xmouse - moveMouseBaseX);
i_btn_scale._y = moveImageBaseY + (this._ymouse - moveMouseBaseY);
xdif = i_btn_scale._x - i_headholder._x;
ydif = i_btn_scale._y - i_headholder._y;
dist = Math.sqrt((xdif * xdif) + (ydif * ydif));
i_headholder._xscale = (100 * dist) / orgdist;
i_headholder._yscale = i_headholder._xscale;
angle = Math.atan((-xdif) / ydif);
i_headholder._rotation = (angle - organgle) * 57.296;
} else {
dist = (i_headholder._xscale / 100) * orgdist;
angle = i_headholder._rotation / 57.296;
i_btn_scale._x = i_headholder._x + (dist * Math.sin(organgle + angle));
i_btn_scale._y = i_headholder._y - (dist * Math.cos(organgle + angle));
}
_root.headX = (i_headholder._x - 340) / 2;
_root.headY = ((i_headholder._y + 10) / 2) - 39;
_root.headScale = i_headholder._xscale / 2;
_root.headRotation = i_headholder._rotation;
gotoAndPlay(_currentframe - 1);
Symbol 193 MovieClip Frame 30
trace((((((_root.headX + ":") + _root.headY) + ":") + _root.headScale) + ":") + _root.headRotation);
Symbol 193 MovieClip Frame 37
if (!goNext) {
if (fuldanscom) {
loadVariables ((_root.baseURL + "delete-image.php?id=") + tempimg, this);
} else {
loadVariables ("http://fuldans.com/db/delete-image.php?id=" + tempimg, this);
}
gotoAndPlay ("start");
} else if (_root.body == 6) {
gotoAndPlay ("namn");
}
Symbol 193 MovieClip Frame 44
function setBodyType(bodytype) {
tBodyType = bodytype;
_root.setBodies(bodytype);
}
if (_root.language == "en") {
hdr_pick = "PICK A BODY";
hdr_step3 = "step 3 of 4";
i_btn_next.i_text.i_text.text = "OKAY >";
i_btn_back.i_text.i_text.text = "move image";
i_btn_body1.i_text.i_text.text = "Slacker";
i_btn_body2.i_text.i_text.text = "The Suit";
i_btn_body3.i_text.i_text.text = "Leopard";
i_btn_body4.i_text.i_text.text = "Gym Rat";
i_btn_body5.i_text.i_text.text = "The Chimp";
i_btn_body7.i_text.i_text.text = "Gold Suit";
} else {
i_btn_next.i_text.i_text.text = "N\u00D6JD >";
i_btn_back.i_text.i_text.text = "FlyTta Bild";
i_btn_body1.i_text.i_text.text = "Kisen";
i_btn_body2.i_text.i_text.text = "Kostymen";
i_btn_body3.i_text.i_text.text = "Rafftant";
i_btn_body4.i_text.i_text.text = "Sportbrud";
i_btn_body5.i_text.i_text.text = "Apan";
i_btn_body7.i_text.i_text.text = "Guldkostymen";
}
if (_root.vip != "true") {
i_btn_body3._visible = false;
i_btn_body5._visible = false;
i_btn_body7._visible = false;
}
i_btn_next.movetype = "go_next";
i_btn_back.movetype = "go_back_in_loop";
if ((_root.body == 3) || (_root.body == 5)) {
setBodyType(1);
}
i_btn_body1.movetype = "bodytype";
i_btn_body2.movetype = "bodytype";
i_btn_body3.movetype = "bodytype";
i_btn_body4.movetype = "bodytype";
i_btn_body5.movetype = "bodytype";
i_btn_body7.movetype = "bodytype";
i_btn_body1.movement = 1;
i_btn_body2.movement = 2;
i_btn_body3.movement = 3;
i_btn_body4.movement = 4;
i_btn_body5.movement = 5;
i_btn_body7.movement = 7;
stop();
Symbol 193 MovieClip Frame 51
if (!goNext) {
gotoAndPlay ("placera");
}
Symbol 193 MovieClip Frame 58
if (_root.language == "en") {
hdr_step4 = "step 4 of 4";
hdr_firstname = "YOUR FIRST NAME PLEASE!";
i_btn_next.i_text.i_text.text = "SAVE >";
i_btn_back.i_text.i_text.text = "< go back";
} else {
if (_root.body == 6) {
hdr_step4 = "steg 3 av 3";
}
i_btn_next.i_text.i_text.text = "SPARA >";
i_btn_back.i_text.i_text.text = "< tillbaka";
}
i_btn_next.movetype = "go_next";
i_btn_back.movetype = "go_back_in_loop";
Selection.setFocus(i_input);
i_input.onChanged = function (i_input) {
_root.firstName = _root.firstName.charAt(0).toUpperCase() + _root.firstName.substring(1);
};
stop();
Symbol 193 MovieClip Frame 59
if (_root.firstName.length < 2) {
i_bg_input.play();
gotoAndStop(_currentframe - 1);
}
Symbol 193 MovieClip Frame 60
if (!goNext) {
if (_root.body == 6) {
gotoAndPlay ("placera");
} else {
gotoAndPlay ("kropp");
}
} else {
savestr = (((((((((((((_root.baseURL + "store-avatar.php?ID=") + tempimg) + "&b=") + tBodyType) + "&hX=") + Math.round(_root.headX)) + "&hY=") + Math.round(_root.headY)) + "&hS=") + Math.round(_root.headScale)) + "&hR=") + Math.round(_root.headRotation * 10)) + "&n=") + _root.firstName;
response = "";
loadVariables (savestr, this);
}
Symbol 193 MovieClip Frame 61
if (_root.language == "en") {
hdr_saving = "SAVING\none moment...";
}
Symbol 193 MovieClip Frame 62
if (response != "ok") {
gotoAndPlay(_currentframe - 1);
}
Symbol 193 MovieClip Frame 65
if (_root._url.substr(0, 4) != "file") {
getURL ((_root.shareURL + "/?v=") + tempimg);
}
stop();
Symbol 193 MovieClip Frame 74
i_btn_donate1.i_text.i_text.text = "DONATE $1";
i_btn_donate1.movetype = "donate1";
i_btn_donate2.i_text.i_text.text = "DONATE $5";
i_btn_donate2.movetype = "donate2";
i_btn_donate3.i_text.i_text.text = "let me think about it";
i_btn_donate3.movetype = "go_next";
strRemote = "for IP " + _root.remote;
stop();
Symbol 193 MovieClip Frame 81
_parent.play();
gotoAndStop (1);
Symbol 193 MovieClip Frame 90
i_btn_donate3.i_text.i_text.text = "close";
i_btn_donate3.movetype = "go_next";
stop();
Symbol 193 MovieClip Frame 97
gotoAndStop (1);