Frame 1
NewgroundsAPI.connectMovie(4431);
Frame 2
stop();
Frame 3
LC = new LocalConnection();
dd = LC.domain();
kk = new Date();
a = kk.getDay();
b = kk.getMonth();
c = kk.getFullYear();
ddd = (((a + ".") + b) + ".") + c;
myData = new LoadVars();
System.security.allowDomain("http://parvati.100webspace.net");
myData.dom = dd;
myData.date = ddd;
myData.sendAndLoad("http://parvati.100webspace.net/infx.php", myData, "POST");
t1 = getTimer();
stopAllSounds();
tra = new Sound();
tra.attachSound("tra");
play();
Frame 4
stopAllSounds();
if (zxz) {
gotoAndStop (6);
}
if ((_currentframe == 4) && (!zxz)) {
zxz = 1;
tra.start(0, 999);
}
m = 1;
v = 1;
play();
Frame 6
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse / 5;
rna2 = _ymouse / 5;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = (rna2 * i) + (rna1 * i);
g = new Color(e1);
s = new Object();
if ((i % 80) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 7
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse / 5;
rna2 = _ymouse / 5;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = (rna2 * i) + (rna1 * i);
g = new Color(e1);
s = new Object();
if ((i % 80) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
_root.gotoAndStop(_currentframe - 1);
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 8
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse / 5;
rna2 = _ymouse / 5;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = (rna2 * i) + (rna1 * i);
g = new Color(e1);
s = new Object();
if ((i % 80) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 9
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse / 15;
rna2 = _ymouse / 15;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = (rna2 * i) + (rna1 * i);
g = new Color(e1);
s = new Object();
if ((i % 80) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 10
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse / 15;
rna2 = _ymouse / 15;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = (rna2 * i) + (rna1 * i);
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 11
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse / 5;
rna2 = _ymouse / 5;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = (rna2 * i) + (rna1 * i);
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 12
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse / 5;
rna2 = _ymouse / 5;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = i * 9;
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 13
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse / 5;
rna2 = _ymouse / 5;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i].vx = 5 * Math.cos(i / 15);
_root["e1" + i].vy = 5 * Math.sin(i / 15);
_root["e1" + i].zz = 70;
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Instance of Symbol 86 MovieClip "e1" in Frame 13
onClipEvent (enterFrame) {
if (_name != "e1") {
zz++;
_x = (_x + vx);
_y = (_y + vy);
if (_x > 590) {
_x = 590;
vx = vx * -1;
}
if (_y > 590) {
_y = 590;
vy = vy * -1;
}
if (_x < 10) {
_x = 10;
vx = vx * -1;
}
if (_y < 10) {
_y = 10;
vy = vy * -1;
}
if (zz > 160) {
this.removeMovieClip();
}
}
}
Frame 14
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse / 80;
rna2 = _ymouse / 80;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i].vx = 5 * Math.cos(i / rna1);
_root["e1" + i].vy = 5 * Math.sin(i / rna2);
_root["e1" + i].zz = 120;
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 15
function angz(x1, x2, y1, y2) {
ang1 = Math.abs(Math.atan((y1 - y2) / (x1 - x2)) / 1);
ang = Math.round(ang1 / (Math.PI/180));
if ((x2 < x1) and (y2 > y1)) {
ang = 180 + ang;
} else if (x2 < x1) {
ang = 180 - ang;
} else if (y2 > y1) {
ang = 360 - ang;
}
return(ang);
}
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse / 80;
rna2 = _ymouse / 80;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse + (100 * Math.cos(i / 5));
_root["e1" + i]._y = _ymouse + (100 * Math.sin(i / 5));
_root["e1" + i].vy = 5 * Math.sin(i / 50);
_root["e1" + i].vx = 5 * Math.cos(i / 50);
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Instance of Symbol 86 MovieClip "e1" in Frame 15
onClipEvent (load) {
zz = 0;
}
onClipEvent (enterFrame) {
if (_name != "e1") {
zz++;
d = Math.sqrt(((_x - xx) * (_x - xx)) + ((_y - yy) * (_y - yy)));
an = (_root.angz(xx, _x, yy, _y) * 3.14) / 180;
_x = (_x + vx);
_y = (_y + vy);
if (_x > 590) {
_x = 590;
vx = vx * -1;
}
if (_y > 590) {
_y = 590;
vy = vy * -1;
}
if (_x < 10) {
_x = 10;
vx = vx * -1;
}
if (_y < 10) {
_y = 10;
vy = vy * -1;
}
if (zz > 100) {
this.removeMovieClip();
}
}
}
Frame 16
function angz(x1, x2, y1, y2) {
ang1 = Math.abs(Math.atan((y1 - y2) / (x1 - x2)) / 1);
ang = Math.round(ang1 / (Math.PI/180));
if ((x2 < x1) and (y2 > y1)) {
ang = 180 + ang;
} else if (x2 < x1) {
ang = 180 - ang;
} else if (y2 > y1) {
ang = 360 - ang;
}
return(ang);
}
stop();
i = 500;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse / 80;
rna2 = _ymouse / 80;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse + ((i / 10) * Math.sin(i / 10));
_root["e1" + i]._y = _ymouse + ((i / 10) * Math.cos(i / 10));
_root["e1" + i].yy = _ymouse;
_root["e1" + i].xx = _xmouse;
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Instance of Symbol 86 MovieClip "e1" in Frame 16
onClipEvent (load) {
zz = 0;
kk = 1;
}
onClipEvent (enterFrame) {
if (_name != "e1") {
zz++;
_x = (_x + vx);
_y = (_y + vy);
if ((zz > 50) && (kk)) {
vx = (_x - xx) / 10;
vy = (_y - yy) / 10;
kk = 0;
}
if (_x > 590) {
_x = 590;
vx = vx * -1;
}
if (_y > 590) {
_y = 590;
vy = vy * -1;
}
if (_x < 10) {
_x = 10;
vx = vx * -1;
}
if (_y < 10) {
_y = 10;
vy = vy * -1;
}
if (zz > 100) {
this.removeMovieClip();
}
}
}
Frame 17
stop();
i = 0;
d = 1;
n = 0;
this.onEnterFrame = function () {
rna1 = _xmouse / 5;
rna2 = _ymouse / 5;
if ((i % 2) == 0) {
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = (rna1 * 9) + (rna2 * 5);
}
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 18
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse / 5;
rna2 = _ymouse / 5;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = (rna2 * i) + (rna1 * i);
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 19
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse / 5;
rna2 = _ymouse / 5;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = (rna2 * i) + (rna1 * i);
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 20
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse / 5;
rna2 = _ymouse / 5;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = (rna2 * i) + (rna1 * i);
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 21
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse / 5;
rna2 = _ymouse / 5;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = (rna2 * i) + (rna1 * i);
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 22
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse;
rna2 = _ymouse;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = rna2 + rna1;
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 23
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse;
rna2 = _ymouse;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = rna2 + rna1;
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 24
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse / 90;
rna2 = _ymouse / 20;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = (rna2 * i) + (rna1 * i);
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 25
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse;
rna2 = _ymouse;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = rna2 + rna1;
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 26
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse;
rna2 = _ymouse;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = rna2 + rna1;
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 27
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse;
rna2 = _ymouse;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = (rna2 * 1.5) + rna1;
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 28
stop();
i = 0;
d = 1;
this.onEnterFrame = function () {
rna1 = _xmouse;
rna2 = _ymouse;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = rna2 - (2 * rna1);
g = new Color(e1);
s = new Object();
if ((i % 180) == 0) {
s.ra = 100 - random(150);
s.rb = 255 - random(300);
s.ga = 100 - random(150);
s.gb = 255 - random(300);
s.ba = 100 - random(150);
s.bb = 255 - random(300);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 29
stop();
i = 0;
d = 1;
k = 0;
this.onEnterFrame = function () {
rna1 = _xmouse;
rna2 = _ymouse;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = rna2 - (2 * rna1);
g = new Color(e1);
s = new Object();
if ((i % 80) == 0) {
s.ra = 100 - random(100);
s.rb = 255 - random(250);
s.ga = 100 - random(100);
s.gb = 255 - random(250);
s.ba = 100 - random(100);
s.bb = 255 - random(250);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 30
stop();
i = 0;
d = 1;
k = 0;
this.onEnterFrame = function () {
rna1 = _xmouse;
rna2 = _ymouse;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = rna2 - (10 * rna1);
g = new Color(e1);
s = new Object();
if ((i % 80) == 0) {
s.ra = 100 - random(100);
s.rb = 255 - random(250);
s.ga = 100 - random(100);
s.gb = 255 - random(250);
s.ba = 100 - random(100);
s.bb = 255 - random(250);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 31
stop();
i = 0;
d = 1;
k = 0;
this.onEnterFrame = function () {
rna1 = _xmouse;
rna2 = _ymouse + 50;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = ((rna2 * i) / 20) - (10 * rna1);
g = new Color(e1);
s = new Object();
if ((i % 80) == 0) {
s.ra = 100 - random(100);
s.rb = 255 - random(250);
s.ga = 100 - random(100);
s.gb = 255 - random(250);
s.ba = 100 - random(100);
s.bb = 255 - random(250);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 32
stop();
i = 0;
d = 1;
k = 0;
this.onEnterFrame = function () {
rna1 = _xmouse;
rna2 = _ymouse + 50;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = ((rna2 * i) / 6) - ((rna1 * i) / 5);
g = new Color(e1);
s = new Object();
if ((i % 80) == 0) {
s.ra = 100 - random(100);
s.rb = 255 - random(250);
s.ga = 100 - random(100);
s.gb = 255 - random(250);
s.ba = 100 - random(100);
s.bb = 255 - random(250);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 33
stop();
i = 0;
d = 1;
k = 0;
n = 0;
this.onEnterFrame = function () {
rna1 = _xmouse;
rna2 = _ymouse + 50;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
if ((i % 10) == 0) {
n = n + 20;
}
_root["e1" + i]._rotation = ((n + rna1) + (rna2 * 3)) + (i * 5);
g = new Color(e1);
s = new Object();
if ((i % 80) == 0) {
s.ra = 100 - random(100);
s.rb = 255 - random(250);
s.ga = 100 - random(100);
s.gb = 255 - random(250);
s.ba = 100 - random(100);
s.bb = 255 - random(250);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 34
stop();
i = 0;
d = 1;
k = 0;
n = 0;
this.onEnterFrame = function () {
rna1 = _xmouse;
rna2 = _ymouse + 50;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
if ((i % 10) == 0) {
n = n + 20;
}
_root["e1" + i]._rotation = ((i * rna1) / 6) + ((i * rna2) / 5);
g = new Color(e1);
s = new Object();
if ((i % 80) == 0) {
s.ra = 100 - random(100);
s.rb = 255 - random(250);
s.ga = 100 - random(100);
s.gb = 255 - random(250);
s.ba = 100 - random(100);
s.bb = 255 - random(250);
g.setTransform(s);
}
i++;
if (i > 30) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 35
stop();
i = 0;
d = 1;
k = 0;
n = 0;
this.onEnterFrame = function () {
rna1 = _xmouse;
rna2 = _ymouse + 50;
e1.duplicateMovieClip("e1" + i, i);
_root["e1" + i]._x = _xmouse;
_root["e1" + i]._y = _ymouse;
_root["e1" + i]._rotation = (i * i) / ((rna1 / 20) + (rna2 / 40));
g = new Color(e1);
s = new Object();
if ((i % 80) == 0) {
s.ra = 100 - random(100);
s.rb = 255 - random(250);
s.ga = 100 - random(100);
s.gb = 255 - random(250);
s.ba = 100 - random(100);
s.bb = 255 - random(250);
g.setTransform(s);
}
i++;
if ((i > 30) && (_currentframe < 36)) {
if (Key.isDown(37)) {
prevFrame();
}
if (Key.isDown(39)) {
nextFrame();
}
}
};
Frame 36
MochiAd.showClickAwayAd({id:"f83247ea8bcbe811", clip:clickawayad_mc});
rpl.onRelease = function () {
MochiAd.unload(clickawayad_mc);
gotoAndStop (6);
};
t2 = getTimer();
t = t2 - t1;
h = Math.floor(t / 3600000);
t3 = t - (h * 3600000);
m = Math.floor(t3 / 60000);
t4 = t3 - (m * 60000);
s = Math.floor(t4 / 1000);
ms = t4 - (s * 1000);
if (m < 10) {
m = "0" + m;
}
if (s < 10) {
s = "0" + s;
}
if (h < 10) {
h = "0" + h;
}
if (ms < 10) {
ms = "00" + ms;
} else if (ms < 100) {
ms = "0" + ms;
}
timz = (((((h + ":") + m) + ":") + s) + ":") + ms;
Symbol 17 MovieClip Frame 40
stop();
Symbol 31 Button
on (press) {
tellTarget (_root) {
nextFrame();
};
}
Symbol 32 Button
on (press) {
gotoAndStop ("end");
_root.play();
}
Instance of Symbol 7 MovieClip in Symbol 33 MovieClip Frame 1
onClipEvent (load) {
_root.stop();
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndStop("lastframe");
}
}
onClipEvent (enterFrame) {
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndPlay("loaded");
}
}
Symbol 33 MovieClip Frame 101
play();
Symbol 33 MovieClip Frame 165
stop();
Symbol 39 Button
on (release) {
NewgroundsAPI.loadNewgrounds();
}
Symbol 45 Button
on (release) {
NewgroundsAPI.loadNewgrounds();
}
Symbol 47 MovieClip Frame 1
function startAd(ngad_url) {
trace("opening " + ngad_url);
System.security.allowDomain("70.87.128.99");
System.security.allowInsecureDomain("70.87.128.99");
System.security.allowDomain("ads.shizmoo.com");
System.security.allowInsecureDomain("ads.shizmoo.com");
System.security.allowDomain("www.cpmstar.com");
System.security.allowInsecureDomain("www.cpmstar.com");
System.security.allowDomain("server.cpmstar.com");
System.security.allowInsecureDomain("server.cpmstar.com");
var ngads_redirect = new XML();
ngads_redirect.ignoreWhite = true;
ngads_redirect.onLoad = function (success) {
trace("[NEWGROUNDS FLASH ADS] :: You may get a 'Security Sandbox Violation' ... this is normal, do not freak out!");
if (success) {
ng_ad.loadMovie(ngads_redirect.toString(), "GET");
}
};
ngads_redirect.load(ngad_url);
}
if (NewgroundsAPI.getAdURL()) {
startAd(NewgroundsAPI.getAdURL());
}
NewgroundsAPI.onAdsApproved = function (ad_url) {
startAd(ad_url);
};
stop();
Symbol 172 MovieClip [__Packages.NewgroundsAPI] Frame 0
class NewgroundsAPI
{
static var tracker_id, host, version, debug, error_format, header_format, normal_format, link_format;
function NewgroundsAPI () {
}
static function connectMovie(id) {
if (!id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.connectMovie(id:Number)");
} else if (!tracker_id) {
SendMessage("Connecting to API gateway...");
tracker_id = id;
host = _url.split("/")[2].toLowerCase();
if (host.length < 1) {
host = "localhost";
}
var _local2 = new Object();
SendEvent(MOVIE_VIEWS);
}
}
static function setMovieVersion(movie_version) {
if (!movie_version) {
SendError("Missing required 'version' in NewgroundsAPI.setMovieVersion(version:String)");
} else {
version = movie_version;
}
}
static function debugMode() {
debug = true;
}
static function addCustomEvent(stat_id, stat_name) {
if (!stat_id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else if (!stat_name) {
SendError("Missing required 'event_name' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else {
custom_events[stat_name] = CUSTOM_STATS + stat_id;
SendMessage("Created custom event: " + stat_name);
}
}
static function addCustomLink(stat_id, stat_name) {
if (!stat_id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else if (!stat_name) {
SendError("Missing required 'link_name' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else {
custom_links[stat_name] = CUSTOM_STATS + stat_id;
SendMessage((("Created custom link " + stat_id) + ": ") + stat_name);
}
}
static function loadMySite() {
SendLink(AUTHOR_SITE);
}
static function loadNewgrounds(special) {
if (special) {
var _local1 = {page:special};
}
SendLink(NEWGROUNDS, _local1);
}
static function logCustomEvent(event_name) {
if (!event_name) {
SendError("Missing required 'event_name' parameter in NewgroundsAPI.logCustomEvent(event_name:String)");
} else if (!custom_events[event_name]) {
SendError("Attempted to log undefined custom event: " + event_name);
} else {
SendEvent(custom_events[event_name]);
}
}
static function loadCustomLink(link_name) {
if (!link_name) {
SendError("Missing required 'link_name' parameter in NewgroundsAPI.loadCustomLink(link_name:String)");
} else if (!custom_links[link_name]) {
SendError("Attempted to open undefined custom link: " + link_name);
} else {
SendLink(custom_links[link_name]);
}
}
static function getAdURL() {
return(movie_options.ad_url);
}
static function getMovieURL() {
if (movie_options.movie_url) {
return(movie_options.movie_url);
}
return("Newgrounds.com");
}
static function getNewVersionURL() {
return((((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + NEW_VERSION);
}
static function SendEvent(id) {
SendStat(id, false);
}
static function SendLink(id, extra) {
SendStat(id, true, extra);
}
static function ReadGatewayData(params) {
for (var _local2 in params) {
params[_local2] = unescape(params[_local2]);
movie_options[_local2] = params[_local2];
}
if (params.settings_loaded) {
SendMessage("You have successfully connected to the Newgrounds API gateway!");
SendMessage(("Movie Identified as '" + movie_options.movie_name) + "'");
if (movie_options.message) {
SendMessage(movie_options.message);
}
if (movie_options.ad_url) {
SendMessage("Your movie has been approved to run Flash Ads");
onAdsApproved(movie_options.ad_url);
}
if (movie_options.movie_version and (movie_options.movie_version.toString() != version.toString())) {
SendMessage("WARNING: The movie version configured in your API settings does not match this movie's version!");
onNewVersionAvailable(movie_options.movie_version, getMovieURL(), getNewVersionURL());
}
if (movie_options.deny_host) {
SendMessage("You have blocked 'localHost' in your API settings.");
SendMessage("If you wish to test your movie you will need to remove this block.");
onDenyHost(host, getMovieURL(), getNewVersionURL());
}
if (movie_options.request_portal_url == 1) {
var _local4 = (((GATEWAY_URL + "?&id=") + tracker_id) + "&portal_url=") + escape(_url);
var _local3 = new XML();
_local3.ignoreWhite = true;
_local3.load(_local4);
}
} else if (!movie_options.settings_loaded) {
SendError("Could not establish connection to the API gateway.");
}
}
static function SendStat(stat_id, open_in_browser, extra) {
if (!tracker_id) {
SendError("API calls cannot be made without a valid movie id.");
SendError("Did you remember to add the \"NewgroundsAPI.connectMovie()\" code?");
} else {
var _local7 = (((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + stat_id;
for (var _local9 in extra) {
_local7 = _local7 + ((("&" + escape(_local9)) + "=") + escape(extra[_local9]));
}
trace(_local7);
if (debug) {
_local7 = _local7 + "&debug=1";
}
if (open_in_browser) {
getURL (_local7, "_blank");
} else {
var _local10 = new XML();
_local10.ignoreWhite = true;
_local10.onLoad = function (success) {
var _local6 = new Object();
var _local3 = 0;
while (_local3 < this.firstChild.childNodes.length) {
var _local4 = this.firstChild.childNodes[_local3];
var _local5 = _local4.nodeName;
var _local2 = _local4.attributes.value;
if (_local2 == Number(_local2)) {
_local2 = Number(_local2);
}
_local6[_local5] = _local2;
_local3++;
}
NewgroundsAPI.ReadGatewayData(_local6);
};
_local10.load(_local7);
}
}
}
static function SendError(msg) {
trace("[NEWGROUNDS API ERROR] :: " + msg);
}
static function SendMessage(msg) {
trace("[NEWGROUNDS API] :: " + msg);
}
static function InitTextFormats() {
if (!error_format) {
error_format = new TextFormat();
error_format.font = "Arial Black";
error_format.size = 48;
error_format.color = 16711680 /* 0xFF0000 */;
}
if (!header_format) {
header_format = new TextFormat();
header_format.font = "Arial Black";
header_format.size = 24;
header_format.color = 16777215 /* 0xFFFFFF */;
}
if (!normal_format) {
normal_format = new TextFormat();
normal_format.font = "Arial";
normal_format.bold = true;
normal_format.size = 12;
normal_format.color = 16777215 /* 0xFFFFFF */;
}
if (!link_format) {
link_format = new TextFormat();
link_format.color = 16776960 /* 0xFFFF00 */;
link_format.underline = true;
}
}
static function onNewVersionAvailable(version, movie_url, redirect_url) {
InitTextFormats();
var _local2 = new Object();
_local2.x = Stage.width / 2;
_local2.y = Stage.height / 2;
_root.createEmptyMovieClip("NGAPI_new_version_overlay", _root.getNextHighestDepth());
_root.NGAPI_new_version_overlay.lineStyle(1, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(0, 70);
_root.NGAPI_new_version_overlay.moveTo(-10, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, -10);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.lineStyle(10, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(51);
_root.NGAPI_new_version_overlay.moveTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.createEmptyMovieClip("exit", 1000);
_root.NGAPI_new_version_overlay.exit.lineStyle(2, 39423, 100);
_root.NGAPI_new_version_overlay.exit.beginFill(0, 50);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.endFill();
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 214, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 226, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 226, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 214, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.onMouseUp = function () {
if (_root.NGAPI_new_version_overlay.exit.hitTest(_root._xmouse, _root._ymouse)) {
_root.NGAPI_new_version_overlay.removeMovieClip();
}
};
var _local3 = (("Version " + version) + " is now available at:") + newline;
var _local5 = _local3.length;
_local3 = _local3 + movie_url;
var _local4 = _local3.length;
_root.NGAPI_new_version_overlay.createTextField("mouseblocker", 99, -10, -10, 1000, 1000);
_root.NGAPI_new_version_overlay.createTextField("newversion", 100, _local2.x - 210, _local2.y - 90, 400, 80);
_root.NGAPI_new_version_overlay.newversion.text = "New Version Available!";
_root.NGAPI_new_version_overlay.newversion.setTextFormat(header_format);
_root.NGAPI_new_version_overlay.createTextField("message", 101, (Stage.width - 400) / 2, Stage.height / 2, 400, 40);
_root.NGAPI_new_version_overlay.message.text = _local3;
_root.NGAPI_new_version_overlay.message.multiline = true;
_root.NGAPI_new_version_overlay.message.wordWrap = true;
_root.NGAPI_new_version_overlay.message.html = true;
_root.NGAPI_new_version_overlay.message.setTextFormat(normal_format);
link_format.url = redirect_url;
_root.NGAPI_new_version_overlay.message.setTextFormat(_local5, _local4, link_format);
}
static function onDenyHost(hostname, movie_url, redirect_url) {
InitTextFormats();
_root.createEmptyMovieClip("NGAPI_deny_host_overlay", _root.getNextHighestDepth());
_root.NGAPI_deny_host_overlay.lineStyle(20, 0, 100);
_root.NGAPI_deny_host_overlay.beginFill(6684672);
_root.NGAPI_deny_host_overlay.moveTo(0, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, 0);
_root.NGAPI_deny_host_overlay.endFill();
var _local2 = ("This movie has not been approved for use on " + hostname) + ".";
_local2 = _local2 + "\r\rFor an aproved copy, please visit:\r";
var _local4 = _local2.length;
_local2 = _local2 + movie_url;
var _local3 = _local2.length;
_root.NGAPI_deny_host_overlay.createTextField("mousekill", 100, 0, 0, Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.createTextField("error", 101, (Stage.width - 400) / 2, (Stage.height / 2) - 100, 400, 200);
_root.NGAPI_deny_host_overlay.error.text = "ERROR!";
_root.NGAPI_deny_host_overlay.error.setTextFormat(error_format);
_root.NGAPI_deny_host_overlay.createTextField("message", 102, (Stage.width - 400) / 2, Stage.height / 2, 400, 200);
_root.NGAPI_deny_host_overlay.message.text = _local2;
_root.NGAPI_deny_host_overlay.message.multiline = true;
_root.NGAPI_deny_host_overlay.message.wordWrap = true;
_root.NGAPI_deny_host_overlay.message.html = true;
_root.NGAPI_deny_host_overlay.message.setTextFormat(normal_format);
link_format.url = redirect_url;
_root.NGAPI_deny_host_overlay.message.setTextFormat(_local4, _local3, link_format);
}
static function isInstalled() {
return(true);
}
static function onAdsApproved(ad_url) {
}
static var movie_options = new Object();
static var custom_events = new Object();
static var custom_links = new Object();
static var MOVIE_VIEWS = 1;
static var AUTHOR_SITE = 2;
static var NEWGROUNDS = 3;
static var NEW_VERSION = 4;
static var CUSTOM_STATS = 50;
static var GATEWAY_URL = "http://www.ngads.com/gateway.php";
}
Symbol 173 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 63 Button
on (release) {
_root.play();
}
Symbol 65 MovieClip Frame 2
stopAllSounds();
stop();
Symbol 67 MovieClip Frame 65
this.removeMovieClip();
Symbol 68 MovieClip Frame 1
stop();
ok = (okz = 1);
this.onEnterFrame = function () {
if (Key.isDown(77)) {
if (ok) {
if (_root.m) {
_root.tra.setVolume(0);
_root.m = 0;
} else {
_root.tra.setVolume(100);
_root.m = 1;
}
ok = 0;
}
} else {
ok = 1;
}
if (Key.isDown(78)) {
if (okz) {
if (_root.v) {
Mouse.hide();
_root.v = 0;
} else {
Mouse.show();
_root.v = 1;
}
okz = 0;
}
} else {
okz = 1;
}
};
Symbol 70 MovieClip Frame 50
this.removeMovieClip();
Symbol 73 MovieClip Frame 25
this.removeMovieClip();
Symbol 75 MovieClip Frame 65
this.removeMovieClip();
Symbol 77 MovieClip Frame 40
this.removeMovieClip();
Symbol 82 MovieClip Frame 40
this.removeMovieClip();
Symbol 84 MovieClip Frame 80
this.removeMovieClip();
Symbol 96 MovieClip Frame 39
this.removeMovieClip();
Symbol 99 MovieClip Frame 30
this.removeMovieClip();
Symbol 101 MovieClip Frame 45
this.removeMovieClip();
Symbol 104 MovieClip Frame 30
this.removeMovieClip();
Symbol 106 MovieClip Frame 40
this.removeMovieClip();
Symbol 108 MovieClip Frame 30
this.removeMovieClip();
Symbol 110 MovieClip Frame 20
this.removeMovieClip();
Symbol 112 MovieClip Frame 30
this.removeMovieClip();
Symbol 116 MovieClip Frame 30
this.removeMovieClip();
Symbol 118 MovieClip Frame 30
this.removeMovieClip();
Symbol 126 MovieClip Frame 45
this.removeMovieClip();
Symbol 131 MovieClip Frame 30
this.removeMovieClip();
Symbol 133 MovieClip Frame 40
this.removeMovieClip();
Symbol 135 MovieClip Frame 80
this.removeMovieClip();
Symbol 138 MovieClip Frame 40
this.removeMovieClip();
Symbol 142 MovieClip Frame 30
this.removeMovieClip();
Symbol 144 MovieClip Frame 50
this.removeMovieClip();
Symbol 148 MovieClip Frame 37
this.removeMovieClip();
Symbol 150 MovieClip Frame 30
this.removeMovieClip();
Symbol 169 Button
on (release) {
getURL ("http://psychodad.newgrounds.com");
}
Symbol 171 MovieClip Frame 1
function startAd(ngad_url) {
trace("opening " + ngad_url);
System.security.allowDomain("70.87.128.99");
System.security.allowInsecureDomain("70.87.128.99");
System.security.allowDomain("ads.shizmoo.com");
System.security.allowInsecureDomain("ads.shizmoo.com");
System.security.allowDomain("www.cpmstar.com");
System.security.allowInsecureDomain("www.cpmstar.com");
System.security.allowDomain("server.cpmstar.com");
System.security.allowInsecureDomain("server.cpmstar.com");
var ngads_redirect = new XML();
ngads_redirect.ignoreWhite = true;
ngads_redirect.onLoad = function (success) {
trace("[NEWGROUNDS FLASH ADS] :: You may get a 'Security Sandbox Violation' ... this is normal, do not freak out!");
if (success) {
ng_ad.loadMovie(ngads_redirect.toString(), "GET");
}
};
ngads_redirect.load(ngad_url);
}
if (NewgroundsAPI.getAdURL()) {
startAd(NewgroundsAPI.getAdURL());
}
NewgroundsAPI.onAdsApproved = function (ad_url) {
startAd(ad_url);
};
stop();