Combined Code
movieClip 2 controller {
}
frame 1 {
Stage.scaleMode = 'noscale';
gotoAndPlay(10);
}
frame 10 {
stop();
}
movieClip 4 {
}
movieClip 9 {
}
movieClip 12 {
}
movieClip 15 {
}
movieClip 18 {
}
movieClip 19 {
}
movieClip 22 {
}
instance controller of movieClip 2 controller {
onClipEvent (load) {
speed = 5;
movespeed = 2;
xspeed = 0;
yspeed = 0;
circledirection = 0;
firstrun = true;
_parent.photo1.crotch._visible = false;
_parent.photo1.boob1._visible = false;
_parent.photo1.boob2._visible = false;
_parent.photo1.full._visible = false;
_parent.fulltarget._visible = false;
_parent.wintext._visible = false;
}
onClipEvent (enterFrame) {
function setDirectionSpeed(setdirection) {
if (setdirection < 0 || setdirection > 180) {
xnegative = true;
} else {
if (setdirection > 0 && setdirection < 180) {
xnegative = false;
} else {
xzero = true;
}
}
if (setdirection < 90 || setdirection > 270) {
ynegative = true;
} else {
if (setdirection > 90 && setdirection < 270) {
ynegative = false;
} else {
yzero = true;
}
}
if (xnegative && ynegative) {
setdirectionpart = setdirection - 270;
yspeed = (speed / 90) * setdirectionpart * -1;
xspeed = (speed + yspeed) * -1;
}
if (xnegative == false && ynegative) {
setdirectionpart = setdirection;
xspeed = (speed / 90) * setdirectionpart;
yspeed = (speed - xspeed) * -1;
}
if (xnegative == false && ynegative == false) {
setdirectionpart = setdirection - 90;
yspeed = (speed / 90) * setdirectionpart;
xspeed = speed - yspeed;
}
if (xnegative && ynegative == false) {
setdirectionpart = setdirection - 180;
xspeed = (speed / 90) * setdirectionpart * -1;
yspeed = speed + xspeed;
}
if (yzero == true) {
xspeed = speed;
yspeed = 0;
}
if (xzero == true) {
xspeed = 0;
yspeed = speed;
}
}
function checkEdges() {
if (_parent.circle._x > Stage.width - _parent.circle._width) {
_parent.circle._x = Stage.width - _parent.circle._width;
return true;
} else {
if (_parent.circle._x < 0) {
_parent.circle._x = 0;
return true;
} else {
if (_parent.circle._y > Stage.height - _parent.circle._height) {
_parent.circle._y = Stage.height - _parent.circle._height;
return true;
} else {
if (_parent.circle._y < 0) {
_parent.circle._y = 0;
return true;
} else {
return false;
}
}
}
}
}
function setNewDir() {
if (_parent.circle._x == Stage.width - _parent.circle._width) {
trace('width');
randomdir = Math.floor(random(130)) + 205;
setDirectionSpeed(randomdir);
} else {
if (_parent.circle._x == 0) {
trace('xzero');
randomdir = Math.floor(random(130)) + 25;
setDirectionSpeed(randomdir);
} else {
if (_parent.circle._y == Stage.height - _parent.circle._height) {
trace('Heigth');
randomdir = Math.floor(random(130));
if (randomdir < 65) {
randomdir += 295;
} else {
randomdir -= 65;
}
setDirectionSpeed(randomdir);
} else {
if (_parent.circle._y == 0) {
trace('yzero');
randomdir = Math.floor(random(130)) + 115;
setDirectionSpeed(randomdir);
}
}
}
}
trace(randomdir);
}
function getDistance(pObj1, pObj2) {
var v2 = pObj1._x - pObj2._x;
var v1 = pObj1._y - pObj2._y;
return Math.sqrt(v2 * v2 + v1 * v1);
}
function getHit(pObj1) {
var v3 = _parent.circle._x + _parent.circle._width / 2 - pObj1._x;
var v2 = _parent.circle._y + _parent.circle._height / 2 - pObj1._y;
return Math.sqrt(v3 * v3 + v2 * v2);
}
function actiontime() {
if (getHit(_parent.boobtarget1) < 27) {
trace('hitboob1');
_parent.boobtarget1._visible = false;
_parent.photo1.boob1._visible = true;
}
if (getHit(_parent.boobtarget2) < 27) {
trace('hitboob2');
_parent.boobtarget2._visible = false;
_parent.photo1.boob2._visible = true;
}
if (getHit(_parent.crotchtarget) < 34) {
trace('hitcrotch');
_parent.crotchtarget._visible = false;
_parent.photo1.crotch._visible = true;
}
if (_parent.photo1.crotch._visible == true && _parent.photo1.boob2._visible == true && _parent.photo1.boob1._visible == true && _parent.photo1.full._visible == false) {
_parent.fulltarget._visible = true;
if (getHit(_parent.fulltarget) < 11) {
trace('hitfull');
_parent.fulltarget._visible = false;
_parent.photo1.full._visible = true;
_parent.circle._visible = false;
_parent.wintext._visible = true;
}
}
trace('click');
trace(getHit(_parent.crotchtarget));
trace(getHit(_parent.boobtarget2));
trace(getHit(_parent.boobtarget1));
_parent.flasher.gotoAndPlay(2);
}
_parent.circle._y += yspeed;
_parent.circle._x += xspeed;
--randomtime;
if (firstrun == true) {
randomdir = Math.floor(random(360));
setDirectionSpeed(randomdir);
firstrun = false;
randomtime = Math.floor(random(100)) + 10;
}
if (checkEdges()) {
setNewDir();
randomtime = Math.floor(random(100)) + 10;
_parent.circle._y += yspeed;
_parent.circle._x += xspeed;
trace(yspeed);
trace(xspeed);
}
if (randomtime == 0) {
randomdir = Math.floor(random(360));
setDirectionSpeed(randomdir);
randomtime = Math.floor(random(100)) + 10;
}
if (Key.isDown(39)) {
_parent.circle._x += movespeed;
} else {
if (Key.isDown(37)) {
_parent.circle._x -= movespeed;
}
}
if (Key.isDown(38)) {
_parent.circle._y -= movespeed;
} else {
if (Key.isDown(40)) {
_parent.circle._y += movespeed;
}
}
_parent.clickbox.onRelease = function () {
actiontime();
};
if (Key.isDown(32)) {
actiontime();
}
}
}
// unknown tag 88 length 71
movieClip 26 {
}
movieClip 31 {
}
movieClip 33 {
frame 1 {
stop();
}
frame 10 {
gotoAndStop(1);
}
}