Frame 1
stop();
firsttime = true;
MochiAd.showPreGameAd({id:"a7f61c7a7d16df2b", res:"550x400"});
Mouse.hide();
_root.onEnterFrame = function () {
cursor._x = cursor._x - ((cursor._x - _xmouse) / 1.5);
cursor._y = cursor._y - ((cursor._y - _ymouse) / 1.5);
cursor._rotation = Math.atan2(_ymouse - cursor._y, _xmouse - cursor._x) / (Math.PI/180);
};
Frame 2
function particals(numy, numx) {
num = -10;
i = 0;
while (i < 20) {
sling = _root.attachMovie("sling", "sling", _root.getNextHighestDepth(), {_x:numx, _y:numy});
sling._rotation = sling._rotation + (Math.random() * 360);
sling._rotation = sling._rotation + (Math.random() * 360);
sling.onEnterFrame = function () {
this._alpha = this._alpha - 1.5;
this._xscale = (this._yscale = this._yscale - 2);
this._y = this._y + yspeedf1;
this._x = this._x + xspeedf1;
angf1 = this._rotation * (Math.PI/180);
yspeedf1 = speedf1 * Math.sin(angf1);
xspeedf1 = speedf1 * Math.cos(angf1);
speedf1 = 5;
if (this._alpha <= 20) {
this.removeMovieClip();
}
if (this._x < num) {
this.removeMovieClip();
}
if (this._x > 580) {
this.removeMovieClip();
}
if (this._y < num) {
this.removeMovieClip();
}
if (this._y > 410) {
this.removeMovieClip();
}
};
i++;
}
}
function pick() {
item = _root.attachMovie("item", "item", _root.getNextHighestDepth());
numm = Math.floor((Math.random() * 10) % 4);
item._x = (Math.random() * 1000) % 550;
item._y = 70 + ((Math.random() * 1000) % 280);
if (numm == 0) {
item.box = "L";
}
if (numm == 1) {
item.box = "+";
}
if (numm == 2) {
item.box = "-";
}
if (numm == 3) {
item.box = "F";
}
if (numm == 4) {
item.box = "S";
}
}
stop();
gtap = function () {
firsttime = false;
_root.gotoAndPlay(10);
};
ridea = function (boot) {
if (!ridr) {
ridr = true;
attachMovie("lr", "lr1", 999999);
tween = new mx.transitions.Tween(lr1, "_x", mx.transitions.easing.Strong.easeOut, -459 + (_root._x * -1), 0 + (_root._x * -1), 1, true);
attachMovie("rr", "rr2", 999998);
tween2 = new mx.transitions.Tween(rr2, "_x", mx.transitions.easing.Strong.easeOut, 930 + (_root._x * -1), 550 + (_root._x * -1), 1, true);
_root.lr1.thing = "Vs";
ppl = Math.floor(Math.random() * 5);
if ((((((Andrew == false) and (Owen == false)) and (Josh == false)) and (Ben == false)) and (Nick == false)) and (Lachlan == false)) {
Stephen = false;
rr2.person = "Stephen";
person2 = "Final Boss: Stephen";
colour7 = 6710988 /* 0x6666CC */;
}
if ((ppl == 0) and (Andrew == false)) {
_root.ppl++;
}
if ((ppl == 1) and (Josh == false)) {
_root.ppl++;
}
if ((ppl == 2) and (Ben == false)) {
_root.ppl++;
}
if ((ppl == 3) and (Lachlan == false)) {
_root.ppl++;
}
if ((ppl == 4) and (Nick == false)) {
_root.ppl++;
}
if ((ppl == 5) and (Owen == false)) {
_root.ppl = 0;
}
if ((ppl == 0) and (Andrew == true)) {
rr2.person = "Andrew";
Andrew = false;
person2 = "Andrew";
colour7 = 10027263 /* 0x9900FF */;
}
if ((ppl == 1) and (Josh == true)) {
rr2.person = "Josh";
Josh = false;
person2 = "Josh";
colour7 = 255;
}
if ((ppl == 2) and (Ben == true)) {
rr2.person = "Ben";
Ben = false;
person2 = "Ben";
colour7 = 16711680 /* 0xFF0000 */;
}
if ((ppl == 3) and (Lachlan == true)) {
rr2.person = "Lachlan";
Lachlan = false;
person2 = "Lachlan";
colour7 = 65280;
}
if ((ppl == 4) and (Nick == true)) {
rr2.person = "Nick";
person2 = "Nick";
Nick = false;
colour7 = 16777215 /* 0xFFFFFF */;
}
if ((ppl == 5) and (Owen == true)) {
rr2.person = "Owen";
Owen = false;
person2 = "Owen";
colour7 = 16763904 /* 0xFFCC00 */;
}
tween.onMotionFinished = function () {
_x = 0;
mctrl._x = 491;
tween1 = new mx.transitions.Tween(lr1, "_x", mx.transitions.easing.Strong.easeIn, 0 + (_root._x * -1), -459 + (_root._x * -1), 1, true);
tween3 = new mx.transitions.Tween(rr2, "_x", mx.transitions.easing.Strong.easeIn, 550 + (_root._x * -1), 930 + (_root._x * -1), 1, true);
tween3.onMotionFinished = function () {
gotoAndPlay(boot);
_x = 0;
ridr = false;
lr1.removeMovieClip(lr1);
rr2.removeMovieClip(rr2);
};
};
}
};
ridea1 = function (boot1) {
if (!ridr1) {
ridr1 = true;
attachMovie("lr", "lr1", 999999);
tween = new mx.transitions.Tween(lr1, "_x", mx.transitions.easing.Strong.easeOut, -459 + (_root._x * -1), 0 + (_root._x * -1), 1, true);
attachMovie("rr", "rr2", 999998);
tween2 = new mx.transitions.Tween(rr2, "_x", mx.transitions.easing.Strong.easeOut, 930 + (_root._x * -1), 550 + (_root._x * -1), 1, true);
lr1.thing = "Player" + boot1;
rr2.person = "wins!";
particals(Stage.height / 2, Stage.width / 2);
line.removeMovieClip();
ball.removeMovieClip();
sling1.removeMovieClip();
sling2.removeMovieClip();
line2.removeMovieClip();
line1.removeMovieClip();
sling3.removeMovieClip();
sling4.removeMovieClip();
tween.onMotionFinished = function () {
_x = 0;
mctrl._x = 491;
tween1 = new mx.transitions.Tween(lr1, "_x", mx.transitions.easing.Strong.easeIn, 0 + (_root._x * -1), -459 + (_root._x * -1), 2, true);
tween3 = new mx.transitions.Tween(rr2, "_x", mx.transitions.easing.Strong.easeIn, 550 + (_root._x * -1), 930 + (_root._x * -1), 2, true);
tween3.onMotionFinished = function () {
_root.gotoAndPlay(2);
_x = 0;
ridr1 = false;
lr1.removeMovieClip(lr1);
rr2.removeMovieClip(rr2);
};
};
}
};
ridea2 = function (go) {
if (!ridr2) {
ridr2 = true;
attachMovie("lr", "lr1", 999999);
tween = new mx.transitions.Tween(lr1, "_x", mx.transitions.easing.Strong.easeOut, -459 + (_root._x * -1), 0 + (_root._x * -1), 1, true);
attachMovie("rr", "rr2", 999998);
tween2 = new mx.transitions.Tween(rr2, "_x", mx.transitions.easing.Strong.easeOut, 930 + (_root._x * -1), 550 + (_root._x * -1), 1, true);
lr1.thing = "You";
rr2.person = "win!";
particals(Stage.height / 2, Stage.width / 2);
particals(Stage.height / 2, Stage.width / 2);
line.removeMovieClip();
ball.removeMovieClip();
sling1.removeMovieClip();
sling2.removeMovieClip();
line2.removeMovieClip();
line1.removeMovieClip();
sling3.removeMovieClip();
sling4.removeMovieClip();
tween.onMotionFinished = function () {
_x = 0;
mctrl._x = 491;
tween1 = new mx.transitions.Tween(lr1, "_x", mx.transitions.easing.Strong.easeIn, 0 + (_root._x * -1), -459 + (_root._x * -1), 2, true);
tween3 = new mx.transitions.Tween(rr2, "_x", mx.transitions.easing.Strong.easeIn, 550 + (_root._x * -1), 930 + (_root._x * -1), 2, true);
tween3.onMotionFinished = function () {
_root.gotoAndPlay(go);
_x = 0;
ridr2 = false;
lr1.removeMovieClip(lr1);
rr2.removeMovieClip(rr2);
};
};
}
};
playmore.onPress = function () {
getURL ("http://www.noox.in", "_blank");
};
mouse_over_single = false;
mouse_over_coop = false;
mouse_over_playmore = false;
mouse_over_story = false;
mouse_over_credits = false;
sound = 1;
pausedd.removeMovieClip();
item.removeMovieClip();
line.removeMovieClip();
ball.removeMovieClip();
sling1.removeMovieClip();
sling2.removeMovieClip();
line2.removeMovieClip();
line1.removeMovieClip();
sling3.removeMovieClip();
sling4.removeMovieClip();
single.onEnterFrame = function () {
if (mouse_over_single) {
_root.single.nextFrame();
_root.cont1._alpha = _root.cont1._alpha + 3;
} else {
_root.single.prevFrame();
_root.cont1._alpha = 0;
}
};
coop.onEnterFrame = function () {
if (mouse_over_coop) {
_root.coop.nextFrame();
_root.cont2._alpha = _root.cont2._alpha + 3;
} else {
_root.coop.prevFrame();
_root.cont2._alpha = 0;
}
};
playmore.onEnterFrame = function () {
if (mouse_over_playmore) {
_root.playmore.nextFrame();
} else {
_root.playmore.prevFrame();
}
};
story.onEnterFrame = function () {
if (mouse_over_story) {
_root.story.nextFrame();
_root.cont3._alpha = _root.cont3._alpha + 3;
} else {
_root.story.prevFrame();
_root.cont3._alpha = 0;
}
};
credits.onEnterFrame = function () {
if (mouse_over_credits) {
_root.credits.nextFrame();
_root.cr._alpha = _root.cr._alpha + 3;
} else {
_root.credits.prevFrame();
_root.cr._alpha = 0;
}
};
soundon.onEnterFrame = function () {
if (mouse_over_soundon) {
_root.soundon.nextFrame();
} else {
_root.soundon.prevFrame();
}
};
_root.onEnterFrame = function () {
if (firsttime == true) {
_root.firsttime = false;
_root.gtap();
}
item._visible = false;
cursor._x = cursor._x - ((cursor._x - _xmouse) / 1.5);
cursor._y = cursor._y - ((cursor._y - _ymouse) / 1.5);
cursor._rotation = Math.atan2(_ymouse - cursor._y, _xmouse - cursor._x) / (Math.PI/180);
soundon.onRelease = function () {
if (sound == 1) {
sound = 2;
snd1.stop();
soundon.om.gotoAndPlay(2);
} else if (sound == 2) {
sound = 1;
snd1.start();
soundon.om.gotoAndPlay(1);
}
};
};
Instance of Symbol 157 MovieClip "single" in Frame 2
on (rollOver) {
_root.mouse_over_single = true;
}
on (rollOut) {
_root.mouse_over_single = fstartlse;
}
on (release) {
_root.gotoAndPlay(3);
_root.cont1._alpha = _root.cont1._alpha + 2;
}
Instance of Symbol 148 MovieClip [level1] "coop" in Frame 2
on (rollOver) {
_root.mouse_over_coop = true;
}
on (rollOut) {
_root.mouse_over_coop = fstartlse;
}
on (release) {
_root.gotoAndPlay(5);
}
Instance of Symbol 132 MovieClip [level5] "story" in Frame 2
on (rollOver) {
_root.mouse_over_story = true;
}
on (rollOut) {
_root.mouse_over_story = fstartlse;
}
on (release) {
_root.gotoAndPlay(8);
}
Instance of Symbol 159 MovieClip "credits" in Frame 2
on (rollOver) {
_root.mouse_over_credits = true;
}
on (rollOut) {
_root.mouse_over_credits = fstartlse;
}
on (release) {
}
Instance of Symbol 123 MovieClip [soundon] "soundon" in Frame 2
on (rollOver) {
_root.mouse_over_soundon = true;
}
on (rollOut) {
_root.mouse_over_soundon = fstartlse;
}
Instance of Symbol 116 MovieClip [playmore] "playmore" in Frame 2
on (rollOver) {
_root.mouse_over_playmore = true;
}
on (rollOut) {
_root.mouse_over_playmore = fstartlse;
}
Frame 3
stop();
_root.createEmptyMovieClip("line", 1);
_root.createEmptyMovieClip("line1", 2);
_root.attachMovie("ball", "ball", 3, {_x:440, _y:200});
_root.attachMovie("sling", "sling1", 4, {_x:495, _y:270});
_root.attachMovie("sling", "sling2", 5, {_x:390, _y:270});
_root.attachMovie("sling", "sling3", 6, {_x:495, _y:110});
_root.attachMovie("sling", "sling4", 7, {_x:390, _y:110});
cursor.removeMovieClip();
yspeed = 6;
colour = 255;
radius = (ball._height / 2) - 3;
ball.onEnterFrame = function () {
cursor._x = cursor._x - ((cursor._x - _xmouse) / 1.5);
cursor._y = cursor._y - ((cursor._y - _ymouse) / 1.5);
cursor._rotation = Math.atan2(_ymouse - cursor._y, _xmouse - cursor._x) / (Math.PI/180);
myColour10 = colour;
newColour = new Color(cursor);
newColour.setRGB(myColour10);
this._y = this._y + yspeed;
if (this._y < 70) {
this._y = 70;
}
if (this._y > 310) {
this._y = 310;
}
tr = _root.attachMovie("ball", "ball", _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
tr.onEnterFrame = function () {
this._alpha = this._alpha - 5;
this._xscale = (this._yscale = this._yscale - 4);
if (this._alpha < 0) {
this.removeMovieClip();
}
};
};
line.onEnterFrame = function () {
line.clear();
line.lineStyle(3, colour);
line.moveTo(sling1._x, sling1._y);
if ((ball._y + radius) > sling1._y) {
yspeed = yspeed + -0.4;
line.curveTo(ball._x + radius, ball._y + radius, ball._x, (ball._y + radius) - 1);
line.moveTo(sling2._x, sling2._y);
line.curveTo(ball._x - radius, ball._y + radius, ball._x, (ball._y + radius) - 1);
} else {
line.lineTo(sling2._x, sling2._y);
}
};
line1.onEnterFrame = function () {
line1.clear();
line1.lineStyle(3, 16711680);
line1.moveTo(sling3._x, sling3._y);
if ((ball._y - radius) < sling3._y) {
yspeed = yspeed - -0.4;
line1.curveTo(ball._x + radius, ball._y - radius, ball._x, (ball._y - radius) + 1);
line1.moveTo(sling4._x, sling4._y);
line1.curveTo(ball._x - radius, ball._y - radius, ball._x, (ball._y - radius) + 1);
} else {
line1.lineTo(sling4._x, sling4._y);
}
};
mouse_over_red = false;
mouse_over_blue = false;
mouse_over_yellow = false;
mouse_over_white = false;
mouse_over_purple = false;
mouse_over_green = false;
mouse_over_black = false;
mouse_over_back = false;
mouse_over_playgame = false;
red.onEnterFrame = function () {
if (mouse_over_red) {
_root.red.nextFrame();
} else {
_root.red.prevFrame();
}
};
blue.onEnterFrame = function () {
if (mouse_over_blue) {
_root.blue.nextFrame();
} else {
_root.blue.prevFrame();
}
};
yellow.onEnterFrame = function () {
if (mouse_over_yellow) {
_root.yellow.nextFrame();
} else {
_root.yellow.prevFrame();
}
};
white.onEnterFrame = function () {
if (mouse_over_white) {
_root.white.nextFrame();
} else {
_root.white.prevFrame();
}
};
purple.onEnterFrame = function () {
if (mouse_over_purple) {
_root.purple.nextFrame();
} else {
_root.purple.prevFrame();
}
};
green.onEnterFrame = function () {
if (mouse_over_green) {
_root.green.nextFrame();
} else {
_root.green.prevFrame();
}
};
black.onEnterFrame = function () {
if (mouse_over_black) {
_root.black.nextFrame();
} else {
_root.black.prevFrame();
}
};
back.onEnterFrame = function () {
if (mouse_over_back) {
_root.back.nextFrame();
} else {
_root.back.prevFrame();
}
};
back.onEnterFrame = function () {
if (mouse_over_back) {
_root.back.nextFrame();
} else {
_root.back.prevFrame();
}
};
playgame.onEnterFrame = function () {
if (mouse_over_playgame) {
_root.playgame.nextFrame();
} else {
_root.playgame.prevFrame();
}
};
back.onEnterFrame = function () {
if (mouse_over_back) {
_root.back.nextFrame();
} else {
_root.back.prevFrame();
}
};
Instance of Symbol 111 MovieClip [level] "playgame" in Frame 3
on (rollOver) {
_root.mouse_over_playgame = true;
}
on (rollOut) {
_root.mouse_over_playgame = fstartlse;
}
on (release) {
_root.gotoAndPlay(4);
}
Instance of Symbol 165 MovieClip "white" in Frame 3
on (rollOver) {
_root.mouse_over_white = true;
}
on (rollOut) {
_root.mouse_over_white = fstartlse;
}
on (release) {
_root.colour = 16777215 /* 0xFFFFFF */;
}
Instance of Symbol 168 MovieClip "purple" in Frame 3
on (rollOver) {
_root.mouse_over_purple = true;
}
on (rollOut) {
_root.mouse_over_purple = fstartlse;
}
on (release) {
_root.colour = 10027263 /* 0x9900FF */;
}
Instance of Symbol 171 MovieClip "green" in Frame 3
on (rollOver) {
_root.mouse_over_green = true;
}
on (rollOut) {
_root.mouse_over_green = fstartlse;
}
on (release) {
_root.colour = 52224;
}
Instance of Symbol 174 MovieClip "blue" in Frame 3
on (rollOver) {
_root.mouse_over_blue = true;
}
on (rollOut) {
_root.mouse_over_blue = fstartlse;
}
on (release) {
_root.colour = 255;
}
Instance of Symbol 177 MovieClip "black" in Frame 3
on (rollOver) {
_root.mouse_over_black = true;
}
on (rollOut) {
_root.mouse_over_black = fstartlse;
}
on (release) {
_root.colour = 16750848 /* 0xFF9900 */;
}
Instance of Symbol 180 MovieClip "yellow" in Frame 3
on (rollOver) {
_root.mouse_over_yellow = true;
}
on (rollOut) {
_root.mouse_over_yellow = fstartlse;
}
on (release) {
_root.colour = 16763904 /* 0xFFCC00 */;
}
Instance of Symbol 107 MovieClip [back] "back" in Frame 3
on (rollOver) {
_root.mouse_over_back = true;
}
on (rollOut) {
_root.mouse_over_back = fstartlse;
}
on (release) {
_root.gotoAndPlay(2);
}
Instance of Symbol 184 MovieClip "red" in Frame 3
on (rollOver) {
_root.mouse_over_red = true;
}
on (rollOut) {
_root.mouse_over_red = fstartlse;
}
on (release) {
_root.colour = 16711680 /* 0xFF0000 */;
}
Frame 4
function constraint(particle1, particle2, distance) {
dist_x = particle1._x - particle2._x;
dist_y = particle1._y - particle2._y;
actual_distance = Math.sqrt((dist_x * dist_x) + (dist_y * dist_y));
newdist = actual_distance - distance;
particle1._x = particle1._x - (((newdist / 2) * dist_x) / actual_distance);
particle1._y = particle1._y - (((newdist / 2) * dist_y) / actual_distance);
particle2._x = particle2._x + (((newdist / 2) * dist_x) / actual_distance);
particle2._y = particle2._y + (((newdist / 2) * dist_y) / actual_distance);
}
function lightning(place1x, place1y, place2x, place2y, displace) {
if (displace < Detail) {
line1337.moveTo(place1x, place1y);
line1337.lineTo(place2x, place2y);
} else {
var _local3 = (place2x + place1x) / 2;
var _local2 = (place2y + place1y) / 2;
_local3 = _local3 + ((Math.random() - 0.5) * displace);
_local2 = _local2 + ((Math.random() - 0.5) * displace);
lightning(place1x, place1y, _local3, _local2, displace / 2);
lightning(place2x, place2y, _local3, _local2, displace / 2);
}
}
stop();
numz = 0;
time = 0;
numr = 0;
numre = 0;
numd = 0;
nume = 0.4;
numc = 1;
numc1 = 1;
numw = 0;
fast = false;
fast1 = false;
poind = false;
poind2 = false;
gpaused = false;
pausedd._visible = false;
z = 0;
c = 0;
person = "";
var blurX = 2;
var blurY = 2;
var quality = 1;
var blur_filter = (new flash.filters.BlurFilter(blurX, blurY, quality));
Andrew = true;
Josh = true;
Stephen = true;
Ben = true;
Nick = true;
Lachlan = true;
Owen = true;
_root.createEmptyMovieClip("line", 1);
_root.createEmptyMovieClip("line2", 2);
_root.attachMovie("sling", "sling1", 3, {_x:325, _y:340});
_root.attachMovie("sling", "sling2", 4, {_x:225, _y:340});
_root.attachMovie("sling", "sling3", 5, {_x:325, _y:60});
_root.attachMovie("sling", "sling4", 6, {_x:225, _y:60});
_root.attachMovie("ball", "ball", 7, {_x:Stage.width / 2, _y:Stage.height / 2});
_root.attachMovie("paused", "pausedd", 10, {_x:276.4, _y:180.4});
pausedd._visible = false;
_root.ridea();
score1 = 0;
score2 = 0;
power = 0.5;
minpower = 0.2;
xspeed = 0;
friction = 0.95;
xspeed1 = 0;
friction1 = 0.95;
xspeed2 = 0;
yspeed2 = 8;
yspeed3 = 1.2;
xspeed3 = 1.2;
radius = ball._height / 2;
elasticCoefficient = -0.002;
_root.onEnterFrame = function () {
if (gpaused == false) {
time++;
if (time == 1300) {
time = 0;
}
if ((time == 650) and (numz == 0)) {
_root.pick();
numz++;
}
if ((time == 1299) and (numz == 0)) {
_root.pick();
numz++;
}
}
if (Key.isDown(80) and (pausedd._visible == false)) {
pausedd._visible = true;
gpaused = true;
}
if (Key.isDown(17) and (pausedd._visible == true)) {
pausedd._visible = false;
gpaused = false;
}
if (_root.numr == 42) {
_root.ridea2(9);
_root.ball.removeMovieClip();
score1 = 0;
score2 = 0;
Andrew = true;
Josh = true;
Stephen = true;
Ben = true;
Nick = true;
Lachlan = true;
Owen = true;
numr = 0;
}
if (numr < 6) {
_root.minpower = 0.12;
}
if ((numr > 6) and (numr < 12)) {
_root.minpower = 0.1;
}
if ((numr > 12) and (numr < 18)) {
_root.minpower = 0.06;
}
if ((numr > 18) and (numr < 24)) {
_root.minpower = 0.02;
}
if ((numr > 24) and (numr < 30)) {
_root.minpower = -0.2;
}
if ((numr > 30) and (numr < 36)) {
_root.minpower = -0.5;
}
if ((numr > 36) and (numr < 42)) {
_root.minpower = -0.8;
}
if (item._alpha == 100) {
numd++;
}
if (numd == 220) {
item._alpha = item._alpha - 0.01;
numd = 220;
}
if (item._alpha < 20) {
item.removeMovieClip();
numz--;
numd = 0;
}
if (((((ball._y - radius) + 3) < sling3._y) and (ball._x < sling3._x)) and (ball._x > sling4._x)) {
posit2 = true;
}
if (ball._y > ((60 + radius) - 3)) {
posit2 = false;
}
if (((((ball._y + radius) - 3) > sling1._y) and (ball._x < (sling1._x + 10))) and (ball._x > (sling2._x - 10))) {
posit = true;
}
if (ball._y < ((340 - radius) + 3)) {
posit = false;
}
if (ball._x > (sling1._x + 40)) {
posit = false;
}
if (ball._x < (sling2._x - 40)) {
posit = false;
}
if (ball._x > (sling3._x + 40)) {
posit2 = false;
}
if (ball._x < (sling4._x - 40)) {
posit2 = false;
}
if ((posit == true) and (poind == false)) {
xspeed2 = xspeed2 + (xspeed / 35);
}
if ((posit2 == true) and (poind2 == false)) {
xspeed2 = xspeed2 + (xspeed1 / 35);
}
if (yspeed2 > 10.5) {
yspeed2 = yspeed2 - 0.6;
}
zxcv = -10.5;
if (yspeed2 < zxcv) {
yspeed2 = yspeed2 + 0.6;
}
if (fast1 == true) {
yspeed2 = -15;
myColour = 16711680 /* 0xFF0000 */;
newColour = new Color(ball);
newColour.setRGB(myColour);
numz--;
}
if (fast == true) {
yspeed2 = 15;
myColour = 16711680 /* 0xFF0000 */;
newColour = new Color(ball);
newColour.setRGB(myColour);
numz--;
}
if (gpaused == false) {
item._x = item._x + xspeed3;
item._y = item._y + yspeed3;
if (item._x > 550) {
xspeed3 = xspeed3 * -1;
}
if (item._x < 0) {
xspeed3 = xspeed3 * -1;
}
if (item._y > 400) {
yspeed3 = yspeed3 * -1;
}
if (item._y < 0) {
yspeed3 = yspeed3 * -1;
}
}
};
sling1.onEnterFrame = (sling2.onEnterFrame = function () {
if (gpaused == false) {
this._x = this._x + xspeed;
xspeed = xspeed * friction;
if (Key.isDown(39) or Key.isDown(68)) {
xspeed = xspeed + power;
}
if (Key.isDown(37) or Key.isDown(65)) {
xspeed = xspeed - power;
}
if (this._x < 0) {
xspeed = 0;
poind = true;
this._x = 0;
}
if (this._x > 550) {
poind = true;
xspeed = 0;
this._x = 550;
}
if ((this._x < 550) and (this._x > 0)) {
poind = false;
}
if (numc == 1) {
constraint(sling1, sling2, 100);
z = 0;
}
if (numc == 2) {
constraint(sling1, sling2, 170);
z++;
}
if (numc == 0) {
constraint(sling1, sling2, 50);
z++;
}
if (z == 700) {
numc = 1;
z = 0;
}
}
});
sling4.onEnterFrame = function () {
if (gpaused == false) {
this._x = this._x + xspeed1;
xspeed1 = xspeed1 * friction1;
if ((this._x + 30) < ball._x) {
xspeed1 = xspeed1 + (power - minpower);
}
if ((this._x + 30) > ball._x) {
xspeed1 = xspeed1 - (power - minpower);
}
if (((((ball._y < 75) and (ball._x < sling3._x)) and (ball._x > sling4._x)) and (time > 75)) and (sling4._x > 275)) {
xspeed1 = xspeed1 - power;
}
if ((((ball._y < 75) and (ball._x < sling3._x)) and (ball._x > sling4._x)) and (sling4._x < 274)) {
xspeed1 = xspeed1 + power;
}
if (this._x < 0) {
poind2 = true;
xspeed1 = 0;
this._x = 0;
}
if (sling3._x > 550) {
xspeed1 = 0;
poind2 = true;
sling3._x = 550;
}
if ((((this._x < 550) and (this._x > 0)) and (sling3._x < 550)) and (sling3._x > 0)) {
poind2 = false;
}
if (numc1 == 1) {
c = 0;
constraint(sling3, sling4, 100);
}
if (numc1 == 2) {
constraint(sling3, sling4, 170);
c++;
}
if (numc1 == 0) {
constraint(sling3, sling4, 50);
c++;
}
if (c == 700) {
numc1 = 1;
c = 0;
}
}
};
ball.onEnterFrame = function () {
if (gpaused == false) {
this._y = this._y + yspeed2;
this._x = this._x + xspeed2;
if (this._x > 550) {
xspeed2 = xspeed2 * -1;
}
if (this._x < 0) {
xspeed2 = xspeed2 * -1;
}
if (this._y < 0) {
_root.score1++;
_root.numr++;
_root.numre++;
_root.particals(2, ball._x);
sling3._x = 325;
sling4._x = 225;
xspeed2 = 0;
yspeed2 = -8;
this._y = 320;
this._x = Stage.width / 2;
myColour1 = 3289650 /* 0x323232 */;
newColour = new Color(this);
newColour.setRGB(myColour1);
numw = 0;
fast = false;
fast1 = false;
numc1 = 1;
}
if (_root.score1 == 6) {
_root.ridea();
score1 = 0;
score2 = 0;
}
if (_root.score2 == 6) {
gotoAndPlay (2);
score1 = 0;
score2 = 0;
Andrew = true;
Josh = true;
Stephen = true;
Ben = true;
Nick = true;
Lachlan = true;
Owen = true;
numr = 0;
}
if (this._y > 400) {
_root.particals(398, ball._x);
_root.numre++;
_root.score2++;
xspeed2 = 0;
yspeed2 = 8;
sling1._x = 325;
sling2._x = 225;
this._y = 80;
this._x = Stage.width / 2;
myColour1 = 3289650 /* 0x323232 */;
newColour = new Color(this);
newColour.setRGB(myColour1);
numw = 0;
fast = false;
fast1 = false;
numc = 1;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 0)) and (numw == 1)) {
item.removeMovieClip();
score2 = score2 - 1;
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 1)) and (numw == 1)) {
item.removeMovieClip();
numc = 2;
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 2)) and (numw == 1)) {
item.removeMovieClip();
numc1 = 0;
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 3)) and (numw == 1)) {
item.removeMovieClip();
fast1 = true;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 4)) and (numw == 1)) {
item.removeMovieClip();
yspeed2 = 12;
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 1)) and (numw == 1)) {
item.removeMovieClip();
score2 = score2 + 1;
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 0)) and (numw == 2)) {
item.removeMovieClip();
score1 = score1 - 1;
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 1)) and (numw == 2)) {
item.removeMovieClip();
numc1 = 2;
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 2)) and (numw == 2)) {
item.removeMovieClip();
numc = 0;
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 3)) and (numw == 2)) {
item.removeMovieClip();
fast = true;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 4)) and (numw == 2)) {
item.removeMovieClip();
yspeed2 = yspeed2 / 2.5;
numz--;
}
if ((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 2)) {
item.removeMovieClip();
score2 = score2 + 1;
numz--;
}
}
tr = _root.attachMovie("ball", "ball", _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
tr.onEnterFrame = function () {
this._alpha = this._alpha - 5;
this._xscale = (this._yscale = this._yscale - 4);
if (this._alpha < 0) {
this.removeMovieClip();
}
};
};
line.onEnterFrame = function () {
line.clear();
line.lineStyle(3, colour);
line.moveTo(sling1._x, sling1._y);
if (posit == true) {
numw = 1;
line.curveTo(ball._x + radius, ball._y + radius, ball._x, (ball._y + radius) - 1);
line.moveTo(sling2._x, sling2._y);
line.curveTo(ball._x - radius, ball._y + radius, ball._x, (ball._y + radius) - 1);
if ((posit == true) and (gpaused == false)) {
var _local5 = ball._x - sling1._x;
var _local3 = ball._y - sling1._y;
var _local4 = sling2._x - ball._x;
var _local2 = sling2._y - ball._y;
var _local6 = Math.sqrt((_local5 * _local5) + (_local3 * _local3));
var _local7 = Math.sqrt((_local4 * _local4) + (_local2 * _local2));
_root.angle1 = Math.atan2(_local3, _local5);
_root.angle2 = Math.atan2(_local2, _local4);
angle1 = angle1 + (Math.sin(radius / _local6) * 1);
angle2 = angle2 + (Math.sin(radius / _local7) * -1);
xspeed2 = xspeed2 + ((_local6 * Math.sin(angle2)) * elasticCoefficient);
yspeed2 = yspeed2 + ((((-_local6) * Math.cos(angle1)) * elasticCoefficient) - 1.1);
xspeed2 = xspeed2 + ((_local7 * Math.sin(angle1)) * elasticCoefficient);
yspeed2 = yspeed2 + (((-_local7) * Math.cos(angle2)) * elasticCoefficient);
}
} else {
line.lineTo(sling2._x, sling2._y);
}
};
line2.onEnterFrame = function () {
line2.clear();
line2.lineStyle(3, colour7);
line2.moveTo(sling3._x, sling3._y);
if (posit2 == true) {
numw = 2;
line2.curveTo(ball._x + radius, ball._y - radius, ball._x, (ball._y - radius) + 1);
line2.moveTo(sling4._x, sling4._y);
line2.curveTo(ball._x - radius, ball._y - radius, ball._x, (ball._y - radius) + 1);
if ((posit2 == true) and (gpaused == false)) {
var _local2 = ball._x - sling3._x;
var _local6 = ball._y - sling3._y;
var _local7 = sling4._x - ball._x;
var _local5 = sling4._y - ball._y;
var _local4 = Math.sqrt((_local2 * _local2) + (_local6 * _local6));
var _local3 = Math.sqrt((_local7 * _local7) + (_local5 * _local5));
_root.angle3 = Math.atan2(_local6, _local2);
_root.angle4 = Math.atan2(_local5, _local7);
angle3 = angle3 + (Math.sin(radius / _local4) * -2);
angle4 = angle4 + ((Math.sin(radius / _local3) * xspeed1) - xspeed1);
xspeed2 = xspeed2 + ((_local4 * Math.sin(angle4)) * elasticCoefficient);
yspeed2 = yspeed2 + ((((-_local4) * Math.cos(angle4)) * elasticCoefficient) + 1.3);
xspeed2 = xspeed2 + ((_local3 * Math.sin(angle3)) * elasticCoefficient);
yspeed2 = yspeed2 + (((-_local3) * Math.cos(angle4)) * elasticCoefficient);
}
} else {
line2.lineTo(sling4._x, sling4._y);
}
};
_root.createEmptyMovieClip("line1337", 356);
Bolts = 1;
Detail = 1;
Displace = 50;
line1337.onEnterFrame = function () {
this.clear();
this.lineStyle(1, 10083839);
if (gpaused == true) {
this.filters = new Array(blur_filter);
var _local2 = 0;
while (_local2 < Bolts) {
lightning(sling1._x, sling1._y, ball._x, ball._y, Displace);
lightning(sling2._x, sling2._y, ball._x, ball._y, Displace);
lightning(sling3._x, sling3._y, ball._x, ball._y, Displace);
lightning(sling4._x, sling4._y, ball._x, ball._y, Displace);
_local2++;
}
}
};
Frame 5
stop();
_root.createEmptyMovieClip("line", 1);
_root.createEmptyMovieClip("line1", 2);
_root.attachMovie("ball", "ball", 3, {_x:440, _y:200});
_root.attachMovie("sling", "sling1", 4, {_x:495, _y:270});
_root.attachMovie("sling", "sling2", 5, {_x:390, _y:270});
_root.attachMovie("sling", "sling3", 6, {_x:495, _y:110});
_root.attachMovie("sling", "sling4", 7, {_x:390, _y:110});
ch1 = "Type your name";
ch2 = "Type your name";
yspeed = 6;
colour1 = 255;
radius = (ball._height / 2) - 3;
ball.onEnterFrame = function () {
cursor._x = cursor._x - ((cursor._x - _xmouse) / 1.5);
cursor._y = cursor._y - ((cursor._y - _ymouse) / 1.5);
cursor._rotation = Math.atan2(_ymouse - cursor._y, _xmouse - cursor._x) / (Math.PI/180);
myColour11 = colour1;
newColour = new Color(cursor);
newColour.setRGB(myColour11);
this._y = this._y + yspeed;
if (this._y < 70) {
this._y = 70;
}
if (this._y > 310) {
this._y = 310;
}
tr = _root.attachMovie("ball", "ball", _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
tr.onEnterFrame = function () {
this._alpha = this._alpha - 5;
this._xscale = (this._yscale = this._yscale - 4);
if (this._alpha < 0) {
this.removeMovieClip();
}
};
};
line.onEnterFrame = function () {
line.clear();
line.lineStyle(3, colour1);
line.moveTo(sling1._x, sling1._y);
if ((ball._y + radius) > sling1._y) {
yspeed = yspeed + -0.4;
line.curveTo(ball._x + radius, ball._y + radius, ball._x, (ball._y + radius) - 1);
line.moveTo(sling2._x, sling2._y);
line.curveTo(ball._x - radius, ball._y + radius, ball._x, (ball._y + radius) - 1);
} else {
line.lineTo(sling2._x, sling2._y);
}
};
line1.onEnterFrame = function () {
line1.clear();
line1.lineStyle(3, 16711680);
line1.moveTo(sling3._x, sling3._y);
if ((ball._y - radius) < sling3._y) {
yspeed = yspeed - -0.4;
line1.curveTo(ball._x + radius, ball._y - radius, ball._x, (ball._y - radius) + 1);
line1.moveTo(sling4._x, sling4._y);
line1.curveTo(ball._x - radius, ball._y - radius, ball._x, (ball._y - radius) + 1);
} else {
line1.lineTo(sling4._x, sling4._y);
}
};
mouse_over_red = false;
mouse_over_blue = false;
mouse_over_yellow = false;
mouse_over_white = false;
mouse_over_purple = false;
mouse_over_green = false;
mouse_over_black = false;
mouse_over_back = false;
mouse_over_playgame = false;
red.onEnterFrame = function () {
if (mouse_over_red) {
_root.red.nextFrame();
} else {
_root.red.prevFrame();
}
};
blue.onEnterFrame = function () {
if (mouse_over_blue) {
_root.blue.nextFrame();
} else {
_root.blue.prevFrame();
}
};
yellow.onEnterFrame = function () {
if (mouse_over_yellow) {
_root.yellow.nextFrame();
} else {
_root.yellow.prevFrame();
}
};
white.onEnterFrame = function () {
if (mouse_over_white) {
_root.white.nextFrame();
} else {
_root.white.prevFrame();
}
};
purple.onEnterFrame = function () {
if (mouse_over_purple) {
_root.purple.nextFrame();
} else {
_root.purple.prevFrame();
}
};
green.onEnterFrame = function () {
if (mouse_over_green) {
_root.green.nextFrame();
} else {
_root.green.prevFrame();
}
};
black.onEnterFrame = function () {
if (mouse_over_black) {
_root.black.nextFrame();
} else {
_root.black.prevFrame();
}
};
back.onEnterFrame = function () {
if (mouse_over_back) {
_root.back.nextFrame();
} else {
_root.back.prevFrame();
}
};
back.onEnterFrame = function () {
if (mouse_over_back) {
_root.back.nextFrame();
} else {
_root.back.prevFrame();
}
};
playgame.onEnterFrame = function () {
if (mouse_over_playgame) {
_root.playgame.nextFrame();
} else {
_root.playgame.prevFrame();
}
};
back.onEnterFrame = function () {
if (mouse_over_back) {
_root.back.nextFrame();
} else {
_root.back.prevFrame();
}
};
Instance of Symbol 111 MovieClip [level] "playgame" in Frame 5
on (rollOver) {
_root.mouse_over_playgame = true;
}
on (rollOut) {
_root.mouse_over_playgame = fstartlse;
}
on (release) {
_root.gotoAndPlay(6);
}
Instance of Symbol 165 MovieClip "white" in Frame 5
on (rollOver) {
_root.mouse_over_white = true;
}
on (rollOut) {
_root.mouse_over_white = fstartlse;
}
on (release) {
_root.colour1 = 16777215 /* 0xFFFFFF */;
}
Instance of Symbol 168 MovieClip "purple" in Frame 5
on (rollOver) {
_root.mouse_over_purple = true;
}
on (rollOut) {
_root.mouse_over_purple = fstartlse;
}
on (release) {
_root.colour1 = 10027263 /* 0x9900FF */;
}
Instance of Symbol 171 MovieClip "green" in Frame 5
on (rollOver) {
_root.mouse_over_green = true;
}
on (rollOut) {
_root.mouse_over_green = fstartlse;
}
on (release) {
_root.colour1 = 52224;
}
Instance of Symbol 174 MovieClip "blue" in Frame 5
on (rollOver) {
_root.mouse_over_blue = true;
}
on (rollOut) {
_root.mouse_over_blue = fstartlse;
}
on (release) {
_root.colour1 = 255;
}
Instance of Symbol 177 MovieClip "black" in Frame 5
on (rollOver) {
_root.mouse_over_black = true;
}
on (rollOut) {
_root.mouse_over_black = fstartlse;
}
on (release) {
_root.colour1 = 16750848 /* 0xFF9900 */;
}
Instance of Symbol 180 MovieClip "yellow" in Frame 5
on (rollOver) {
_root.mouse_over_yellow = true;
}
on (rollOut) {
_root.mouse_over_yellow = fstartlse;
}
on (release) {
_root.colour1 = 16763904 /* 0xFFCC00 */;
}
Instance of Symbol 107 MovieClip [back] "back" in Frame 5
on (rollOver) {
_root.mouse_over_back = true;
}
on (rollOut) {
_root.mouse_over_back = fstartlse;
}
on (release) {
_root.gotoAndPlay(2);
}
Instance of Symbol 184 MovieClip "red" in Frame 5
on (rollOver) {
_root.mouse_over_red = true;
}
on (rollOut) {
_root.mouse_over_red = fstartlse;
}
on (release) {
_root.colour1 = 16711680 /* 0xFF0000 */;
}
Frame 6
stop();
_root.createEmptyMovieClip("line", 1);
_root.createEmptyMovieClip("line1", 2);
_root.attachMovie("ball", "ball", 3, {_x:440, _y:200});
_root.attachMovie("sling", "sling1", 4, {_x:495, _y:270});
_root.attachMovie("sling", "sling2", 5, {_x:390, _y:270});
_root.attachMovie("sling", "sling3", 6, {_x:495, _y:110});
_root.attachMovie("sling", "sling4", 7, {_x:390, _y:110});
yspeed = 6;
colour2 = 16711680 /* 0xFF0000 */;
radius = (ball._height / 2) - 3;
ball.onEnterFrame = function () {
cursor._x = cursor._x - ((cursor._x - _xmouse) / 1.5);
cursor._y = cursor._y - ((cursor._y - _ymouse) / 1.5);
cursor._rotation = Math.atan2(_ymouse - cursor._y, _xmouse - cursor._x) / (Math.PI/180);
myColour12 = colour2;
newColour = new Color(cursor);
newColour.setRGB(myColour12);
this._y = this._y + yspeed;
if (this._y < 70) {
this._y = 70;
}
if (this._y > 310) {
this._y = 310;
}
tr = _root.attachMovie("ball", "ball", _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
tr.onEnterFrame = function () {
this._alpha = this._alpha - 5;
this._xscale = (this._yscale = this._yscale - 4);
if (this._alpha < 0) {
this.removeMovieClip();
}
};
};
line.onEnterFrame = function () {
line.clear();
line.lineStyle(3, colour1);
line.moveTo(sling1._x, sling1._y);
if ((ball._y + radius) > sling1._y) {
yspeed = yspeed + -0.4;
line.curveTo(ball._x + radius, ball._y + radius, ball._x, (ball._y + radius) - 1);
line.moveTo(sling2._x, sling2._y);
line.curveTo(ball._x - radius, ball._y + radius, ball._x, (ball._y + radius) - 1);
} else {
line.lineTo(sling2._x, sling2._y);
}
};
line1.onEnterFrame = function () {
line1.clear();
line1.lineStyle(3, colour2);
line1.moveTo(sling3._x, sling3._y);
if ((ball._y - radius) < sling3._y) {
yspeed = yspeed - -0.4;
line1.curveTo(ball._x + radius, ball._y - radius, ball._x, (ball._y - radius) + 1);
line1.moveTo(sling4._x, sling4._y);
line1.curveTo(ball._x - radius, ball._y - radius, ball._x, (ball._y - radius) + 1);
} else {
line1.lineTo(sling4._x, sling4._y);
}
};
mouse_over_red = false;
mouse_over_blue = false;
mouse_over_yellow = false;
mouse_over_white = false;
mouse_over_purple = false;
mouse_over_green = false;
mouse_over_black = false;
mouse_over_back = false;
mouse_over_playgame = false;
red.onEnterFrame = function () {
if (mouse_over_red) {
_root.red.nextFrame();
} else {
_root.red.prevFrame();
}
};
blue.onEnterFrame = function () {
if (mouse_over_blue) {
_root.blue.nextFrame();
} else {
_root.blue.prevFrame();
}
};
yellow.onEnterFrame = function () {
if (mouse_over_yellow) {
_root.yellow.nextFrame();
} else {
_root.yellow.prevFrame();
}
};
white.onEnterFrame = function () {
if (mouse_over_white) {
_root.white.nextFrame();
} else {
_root.white.prevFrame();
}
};
purple.onEnterFrame = function () {
if (mouse_over_purple) {
_root.purple.nextFrame();
} else {
_root.purple.prevFrame();
}
};
green.onEnterFrame = function () {
if (mouse_over_green) {
_root.green.nextFrame();
} else {
_root.green.prevFrame();
}
};
black.onEnterFrame = function () {
if (mouse_over_black) {
_root.black.nextFrame();
} else {
_root.black.prevFrame();
}
};
back.onEnterFrame = function () {
if (mouse_over_back) {
_root.back.nextFrame();
} else {
_root.back.prevFrame();
}
};
back.onEnterFrame = function () {
if (mouse_over_back) {
_root.back.nextFrame();
} else {
_root.back.prevFrame();
}
};
playgame.onEnterFrame = function () {
if (mouse_over_playgame) {
_root.playgame.nextFrame();
} else {
_root.playgame.prevFrame();
}
};
back.onEnterFrame = function () {
if (mouse_over_back) {
_root.back.nextFrame();
} else {
_root.back.prevFrame();
}
};
Instance of Symbol 111 MovieClip [level] "playgame" in Frame 6
on (rollOver) {
_root.mouse_over_playgame = true;
}
on (rollOut) {
_root.mouse_over_playgame = fstartlse;
}
on (release) {
_root.gotoAndPlay(7);
}
Instance of Symbol 165 MovieClip "white" in Frame 6
on (rollOver) {
_root.mouse_over_white = true;
}
on (rollOut) {
_root.mouse_over_white = fstartlse;
}
on (release) {
_root.colour2 = 16777215 /* 0xFFFFFF */;
}
Instance of Symbol 168 MovieClip "purple" in Frame 6
on (rollOver) {
_root.mouse_over_purple = true;
}
on (rollOut) {
_root.mouse_over_purple = fstartlse;
}
on (release) {
_root.colour2 = 10027263 /* 0x9900FF */;
}
Instance of Symbol 171 MovieClip "green" in Frame 6
on (rollOver) {
_root.mouse_over_green = true;
}
on (rollOut) {
_root.mouse_over_green = fstartlse;
}
on (release) {
_root.colour2 = 52224;
}
Instance of Symbol 174 MovieClip "blue" in Frame 6
on (rollOver) {
_root.mouse_over_blue = true;
}
on (rollOut) {
_root.mouse_over_blue = fstartlse;
}
on (release) {
_root.colour2 = 255;
}
Instance of Symbol 177 MovieClip "black" in Frame 6
on (rollOver) {
_root.mouse_over_black = true;
}
on (rollOut) {
_root.mouse_over_black = fstartlse;
}
on (release) {
_root.colour2 = 16750848 /* 0xFF9900 */;
}
Instance of Symbol 180 MovieClip "yellow" in Frame 6
on (rollOver) {
_root.mouse_over_yellow = true;
}
on (rollOut) {
_root.mouse_over_yellow = fstartlse;
}
on (release) {
_root.colour2 = 16763904 /* 0xFFCC00 */;
}
Instance of Symbol 107 MovieClip [back] "back" in Frame 6
on (rollOver) {
_root.mouse_over_back = true;
}
on (rollOut) {
_root.mouse_over_back = fstartlse;
}
on (release) {
_root.gotoAndPlay(5);
}
Instance of Symbol 184 MovieClip "red" in Frame 6
on (rollOver) {
_root.mouse_over_red = true;
}
on (rollOut) {
_root.mouse_over_red = fstartlse;
}
on (release) {
_root.colour2 = 16711680 /* 0xFF0000 */;
}
Frame 7
function constraint(particle1, particle2, distance) {
dist_x = particle1._x - particle2._x;
dist_y = particle1._y - particle2._y;
actual_distance = Math.sqrt((dist_x * dist_x) + (dist_y * dist_y));
newdist = actual_distance - distance;
particle1._x = particle1._x - (((newdist / 2) * dist_x) / actual_distance);
particle1._y = particle1._y - (((newdist / 2) * dist_y) / actual_distance);
particle2._x = particle2._x + (((newdist / 2) * dist_x) / actual_distance);
particle2._y = particle2._y + (((newdist / 2) * dist_y) / actual_distance);
}
function lightning(place1x, place1y, place2x, place2y, displace) {
if (displace < Detail) {
line1337.moveTo(place1x, place1y);
line1337.lineTo(place2x, place2y);
} else {
var _local3 = (place2x + place1x) / 2;
var _local2 = (place2y + place1y) / 2;
_local3 = _local3 + ((Math.random() - 0.5) * displace);
_local2 = _local2 + ((Math.random() - 0.5) * displace);
lightning(place1x, place1y, _local3, _local2, displace / 2);
lightning(place2x, place2y, _local3, _local2, displace / 2);
}
}
stop();
numz = 0;
time = 0;
numr = 0;
numre = 0;
numd = 0;
nume = 0.4;
numc = 1;
numc1 = 1;
numw = 0;
poind = false;
poind2 = false;
gpaused = false;
pausedd._visible = false;
z = 0;
c = 0;
person1 = ch1;
person2 = ch2;
var blurX = 2;
var blurY = 2;
var quality = 1;
var blur_filter = (new flash.filters.BlurFilter(blurX, blurY, quality));
_root.createEmptyMovieClip("line", 1);
_root.createEmptyMovieClip("line2", 2);
_root.attachMovie("sling", "sling1", 3, {_x:325, _y:340});
_root.attachMovie("sling", "sling2", 4, {_x:225, _y:340});
_root.attachMovie("sling", "sling3", 5, {_x:325, _y:60});
_root.attachMovie("sling", "sling4", 6, {_x:225, _y:60});
_root.attachMovie("ball", "ball", 7, {_x:Stage.width / 2, _y:Stage.height / 2});
_root.attachMovie("paused", "pausedd", 10, {_x:276.4, _y:180.4});
pausedd._visible = false;
score1 = 0;
score2 = 0;
power = 0.5;
minpower = 0.2;
xspeed = 0;
friction = 0.95;
xspeed1 = 0;
friction1 = 0.95;
xspeed2 = 0;
yspeed2 = 8;
yspeed3 = 1.2;
xspeed3 = 1.2;
radius = ball._height / 2;
elasticCoefficient = -0.002;
_root.onEnterFrame = function () {
if (person1 == "Type your name") {
person1 = "Person1";
}
if (person2 == "Type your name") {
person2 = "Person2";
}
if (gpaused == false) {
time++;
if (time == 1300) {
time = 0;
}
if ((time == 650) and (numz == 0)) {
_root.pick();
numz++;
}
if ((time == 1299) and (numz == 0)) {
_root.pick();
numz++;
}
}
if (Key.isDown(80) and (pausedd._visible == false)) {
pausedd._visible = true;
gpaused = true;
}
if (Key.isDown(17) and (pausedd._visible == true)) {
pausedd._visible = false;
gpaused = false;
}
if (item._alpha == 100) {
numd++;
}
if (numd == 220) {
item._alpha = item._alpha - 0.01;
numd = 220;
}
if (item._alpha < 20) {
item.removeMovieClip();
numz--;
numd = 0;
}
if (((((ball._y - radius) + 3) < sling3._y) and (ball._x < sling3._x)) and (ball._x > sling4._x)) {
posit2 = true;
}
if (ball._y > ((60 + radius) - 3)) {
posit2 = false;
}
if (((((ball._y + radius) - 3) > sling1._y) and (ball._x < (sling1._x + 10))) and (ball._x > (sling2._x - 10))) {
posit = true;
}
if (ball._y < ((340 - radius) + 3)) {
posit = false;
}
if (ball._x > (sling1._x + 40)) {
posit = false;
}
if (ball._x < (sling2._x - 40)) {
posit = false;
}
if (ball._x > (sling3._x + 40)) {
posit2 = false;
}
if (ball._x < (sling4._x - 40)) {
posit2 = false;
}
if ((posit == true) and (poind == false)) {
xspeed2 = xspeed2 + (xspeed / 35);
}
if ((posit2 == true) and (poind2 == false)) {
xspeed2 = xspeed2 + (xspeed1 / 35);
}
if (yspeed2 > 10.5) {
yspeed2 = yspeed2 - 0.6;
}
vbnm = -10.5;
if (yspeed2 < vbnm) {
yspeed2 = yspeed2 + 0.6;
}
item._x = item._x + xspeed3;
item._y = item._y + yspeed3;
if (item._x > 550) {
xspeed3 = xspeed3 * -1;
}
if (item._x < 0) {
xspeed3 = xspeed3 * -1;
}
if (item._y > 400) {
yspeed3 = yspeed3 * -1;
}
if (item._y < 0) {
yspeed3 = yspeed3 * -1;
}
};
sling1.onEnterFrame = (sling2.onEnterFrame = function () {
if (gpaused == false) {
this._x = this._x + xspeed;
xspeed = xspeed * friction;
if (Key.isDown(39)) {
xspeed = xspeed + power;
}
if (Key.isDown(37)) {
xspeed = xspeed - power;
}
if (this._x < 0) {
xspeed = 0;
poind = true;
this._x = 0;
}
if (this._x > 550) {
xspeed = 0;
poind = true;
this._x = 550;
}
if ((this._x < 550) and (this._x > 0)) {
poind = false;
}
if (numc == 1) {
z = 0;
constraint(sling1, sling2, 100);
}
if (numc == 2) {
constraint(sling1, sling2, 170);
z++;
}
if (numc == 0) {
constraint(sling1, sling2, 50);
z++;
}
if (z == 700) {
numc = 1;
z = 0;
}
}
});
sling3.onEnterFrame = (sling4.onEnterFrame = function () {
if (gpaused == false) {
this._x = this._x + xspeed1;
xspeed1 = xspeed1 * friction1;
if (Key.isDown(68)) {
xspeed1 = xspeed1 + power;
}
if (Key.isDown(65)) {
xspeed1 = xspeed1 - power;
}
if (this._x < 0) {
xspeed1 = 0;
poind2 = true;
this._x = 0;
}
if (sling3._x > 550) {
xspeed1 = 0;
poind2 = true;
sling3._x = 550;
}
if ((((this._x < 550) and (this._x > 0)) and (sling3._x < 550)) and (sling3._x > 0)) {
poind2 = false;
}
if (numc1 == 1) {
c = 0;
constraint(sling3, sling4, 100);
}
if (numc1 == 2) {
constraint(sling3, sling4, 170);
c++;
}
if (numc1 == 0) {
constraint(sling3, sling4, 50);
c++;
}
if (c == 700) {
numc1 = 1;
c = 0;
}
}
});
ball.onEnterFrame = function () {
if (gpaused == false) {
this._y = this._y + yspeed2;
this._x = this._x + xspeed2;
if (this._x > 550) {
xspeed2 = xspeed2 * -1;
}
if (this._x < 0) {
xspeed2 = xspeed2 * -1;
}
if (this._y < 0) {
_root.score1++;
_root.numr++;
_root.numre++;
_root.particals(2, ball._x);
sling3._x = 325;
sling4._x = 225;
xspeed2 = 0;
yspeed2 = -7;
this._y = 320;
this._x = Stage.width / 2;
myColour1 = 3289650 /* 0x323232 */;
newColour = new Color(this);
newColour.setRGB(myColour1);
numc1 = 1;
numw = 0;
}
if (_root.score2 == 6) {
_root.ridea1(2);
score1 = 0;
score2 = 0;
}
if (_root.score1 == 6) {
_root.ridea1(1);
score1 = 0;
score2 = 0;
}
if (this._y > 400) {
_root.particals(398, ball._x);
_root.numre++;
_root.score2++;
xspeed2 = 0;
yspeed2 = 7;
sling1._x = 325;
sling2._x = 225;
this._y = 80;
this._x = Stage.width / 2;
myColour1 = 3289650 /* 0x323232 */;
newColour = new Color(this);
newColour.setRGB(myColour1);
numc = 1;
numw = 0;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 0)) and (numw == 1)) {
item.removeMovieClip();
score1 = score1 - 1;
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 1)) and (numw == 1)) {
item.removeMovieClip();
numc = 2;
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 2)) and (numw == 1)) {
item.removeMovieClip();
numc1 = 0;
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 3)) and (numw == 1)) {
item.removeMovieClip();
yspeed2 = 12;
myColour = 16711680 /* 0xFF0000 */;
newColour = new Color(this);
newColour.setRGB(myColour);
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 4)) and (numw == 1)) {
item.removeMovieClip();
yspeed2 = yspeed2 / 2.5;
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 1)) and (numw == 1)) {
item.removeMovieClip();
score2 = score2 + 1;
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 0)) and (numw == 2)) {
item.removeMovieClip();
score2 = score2 - 1;
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 1)) and (numw == 2)) {
item.removeMovieClip();
numc1 = 2;
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 2)) and (numw == 2)) {
item.removeMovieClip();
numc = 0;
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 3)) and (numw == 2)) {
item.removeMovieClip();
yspeed2 = yspeed2 * 1.5;
myColour = 16711680 /* 0xFF0000 */;
newColour = new Color(this);
newColour.setRGB(myColour);
numz--;
}
if (((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 4)) and (numw == 2)) {
item.removeMovieClip();
yspeed2 = yspeed2 / 2.5;
numz--;
}
if ((Math.sqrt(((item._x - this._x) * (item._x - this._x)) + ((item._y - this._y) * (item._y - this._y))) < 20) and (numm == 2)) {
item.removeMovieClip();
score2 = score2 + 1;
numz--;
}
}
tr = _root.attachMovie("ball", "ball", _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
tr.onEnterFrame = function () {
this._alpha = this._alpha - 5;
this._xscale = (this._yscale = this._yscale - 4);
if (this._alpha < 0) {
this.removeMovieClip();
}
};
};
line.onEnterFrame = function () {
line.clear();
line.lineStyle(3, colour1);
line.moveTo(sling1._x, sling1._y);
if (posit == true) {
numw = 1;
line.curveTo(ball._x + radius, ball._y + radius, ball._x, (ball._y + radius) - 1);
line.moveTo(sling2._x, sling2._y);
line.curveTo(ball._x - radius, ball._y + radius, ball._x, (ball._y + radius) - 1);
if ((posit == true) and (gpaused == false)) {
var _local5 = ball._x - sling1._x;
var _local3 = ball._y - sling1._y;
var _local4 = sling2._x - ball._x;
var _local2 = sling2._y - ball._y;
var _local6 = Math.sqrt((_local5 * _local5) + (_local3 * _local3));
var _local7 = Math.sqrt((_local4 * _local4) + (_local2 * _local2));
_root.angle1 = Math.atan2(_local3, _local5);
_root.angle2 = Math.atan2(_local2, _local4);
angle1 = angle1 + (Math.sin(radius / _local6) * 2);
angle2 = angle2 + (Math.sin(radius / _local7) * -1);
xspeed2 = xspeed2 + ((_local6 * Math.sin(angle2)) * elasticCoefficient);
yspeed2 = yspeed2 + ((((-_local6) * Math.cos(angle1)) * elasticCoefficient) - 1.1);
xspeed2 = xspeed2 + ((_local7 * Math.sin(angle1)) * elasticCoefficient);
yspeed2 = yspeed2 + (((-_local7) * Math.cos(angle2)) * elasticCoefficient);
}
} else {
line.lineTo(sling2._x, sling2._y);
}
};
line2.onEnterFrame = function () {
line2.clear();
line2.lineStyle(3, colour2);
line2.moveTo(sling3._x, sling3._y);
if (posit2 == true) {
numw = 2;
line2.curveTo(ball._x + radius, ball._y - radius, ball._x, (ball._y - radius) + 1);
line2.moveTo(sling4._x, sling4._y);
line2.curveTo(ball._x - radius, ball._y - radius, ball._x, (ball._y - radius) + 1);
if ((posit2 == true) and (gpaused == false)) {
var _local2 = ball._x - sling3._x;
var _local6 = ball._y - sling3._y;
var _local7 = sling4._x - ball._x;
var _local5 = sling4._y - ball._y;
var _local4 = Math.sqrt((_local2 * _local2) + (_local6 * _local6));
var _local3 = Math.sqrt((_local7 * _local7) + (_local5 * _local5));
_root.angle3 = Math.atan2(_local6, _local2);
_root.angle4 = Math.atan2(_local5, _local7);
angle3 = angle3 + (Math.sin(radius / _local4) * -2);
angle4 = angle4 + (Math.sin(radius / _local3) * 1);
xspeed2 = xspeed2 + ((_local4 * Math.sin(angle4)) * elasticCoefficient);
yspeed2 = yspeed2 + ((((-_local4) * Math.cos(angle4)) * elasticCoefficient) + 1.3);
xspeed2 = xspeed2 + ((_local3 * Math.sin(angle3)) * elasticCoefficient);
yspeed2 = yspeed2 + (((-_local3) * Math.cos(angle4)) * elasticCoefficient);
}
} else {
line2.lineTo(sling4._x, sling4._y);
}
};
_root.createEmptyMovieClip("line1337", 356);
Bolts = 1;
Detail = 1;
Displace = 90;
line1337.onEnterFrame = function () {
this.clear();
this.lineStyle(1, 10083839);
if (gpaused == true) {
this.filters = new Array(blur_filter);
var _local2 = 0;
while (_local2 < Bolts) {
lightning(sling1._x, sling1._y, ball._x, ball._y, Displace);
lightning(sling2._x, sling2._y, ball._x, ball._y, Displace);
lightning(sling3._x, sling3._y, ball._x, ball._y, Displace);
lightning(sling4._x, sling4._y, ball._x, ball._y, Displace);
_local2++;
}
}
};
Frame 8
stop();
_root.onEnterFrame = function () {
cursor._x = cursor._x - ((cursor._x - _xmouse) / 4.5);
cursor._y = cursor._y - ((cursor._y - _ymouse) / 4.5);
cursor._rotation = Math.atan2(_ymouse - cursor._y, _xmouse - cursor._x) / (Math.PI/180);
if (Key.isDown(38)) {
story._y = story._y + 3;
}
if (Key.isDown(40)) {
story._y = story._y - 3;
}
if (story._y < -150) {
story._y = -150;
}
if (story._y > 250) {
story._y = 250;
}
};
back.onEnterFrame = function () {
if (mouse_over_back) {
_root.back.nextFrame();
} else {
_root.back.prevFrame();
}
};
Instance of Symbol 107 MovieClip [back] "back" in Frame 8
on (rollOver) {
_root.mouse_over_back = true;
}
on (rollOut) {
_root.mouse_over_back = fstartlse;
}
on (release) {
_root.gotoAndPlay(2);
}
Frame 9
stop();
_root.onEnterFrame = function () {
world._alpha = world._alpha - 0.5;
world._rotation = world._rotation - 0.3;
if (world._alpha < 0) {
world._visible = false;
world._alpha = 0;
w1._alpha = w1._alpha + 2;
}
if (w1._alpha >= 100) {
w2._alpha = w2._alpha + 2;
}
if (w2._alpha >= 100) {
w1._alpha = w1._alpha - 8;
w3._alpha = w3._alpha + 2;
}
if (w3._alpha >= 100) {
w2._alpha = w2._alpha - 2;
}
if (w1._alpha < 0) {
w1._visible = false;
w1._alpha = -20;
}
if (w2._alpha < 0) {
w2._alpha = -20;
w2._visible = false;
w3._alpha = w3._alpha - 3;
}
if (w3._alpha < 0) {
w3._alpha = -20;
w3._visible = false;
}
if ((((w1._visible == false) and (w2._visible == false)) and (w3._visible == false)) and (world._visible == false)) {
_root.gotoAndPlay(2);
}
};
Frame 10
stop();
startup_20 = new Sound();
startup_20.attachSound("startup_20");
startup_20.setVolume(80);
startup_20.start(0, 0);
_root.firsttime = false;
Mouse.hide();
_root.onEnterFrame = function () {
_root.firsttime = false;
cursor._x = cursor._x - ((cursor._x - _xmouse) / 1.5);
cursor._y = cursor._y - ((cursor._y - _ymouse) / 1.5);
cursor._rotation = Math.atan2(_ymouse - cursor._y, _xmouse - cursor._x) / (Math.PI/180);
if (lay._currentframe == 199) {
snd1 = new Sound();
snd1.attachSound("menu");
snd1.setVolume(80);
snd1.start(15, 10);
_root.firsttime = false;
_root.gotoAndPlay(2);
}
};
Symbol 96 MovieClip [world] Frame 60
stop();
Symbol 122 MovieClip [ont] Frame 1
stop();
Symbol 122 MovieClip [ont] Frame 2
stop();
Symbol 206 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.7");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 207 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 208 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 209 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 210 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 205 MovieClip Frame 199
stop();
_root.firsttime = false;