Instance of Symbol 22 MovieClip in Frame 1
onClipEvent (enterFrame) {
if ((_root._framesloaded == _root._totalframes) && (_root:flash_ok)) {
_root.prepare._visible = false;
_root.click._visible = true;
go = true;
}
}
onClipEvent (mouseUp) {
if (go) {
_root.play();
}
}
Frame 1
click._visible = false;
flash_ok = true;
stop();
Frame 2
gameover = true;
play();
Instance of Symbol 47 MovieClip "pad_src" in Frame 2
onClipEvent (enterFrame) {
if (_x > (400 - (_width / 2))) {
_x = (400 - (_width / 2));
}
if (_x < (_width / 2)) {
_x = (_width / 2);
}
if (_y > (400 - (_height / 2))) {
_y = (400 - (_height / 2));
}
if (_y < (_height / 2)) {
_y = (_height / 2);
}
xco = Math.ceil(_x - 200);
yco = Math.ceil(_y - 200);
}
Instance of Symbol 22 MovieClip "control" in Frame 2
onClipEvent (load) {
function add_level() {
duplicateMovieClip ("_root.targets", "trg" add _root:trgmc, _root:depth);
_root:depth--;
newcolor = new Color(eval ("_root.trg" add _root:trgmc));
newcolor.setTransform(eval ("_root:mctrans" add _root.trgmc));
_root:trgmc++;
if (_root:trgmc > _root:maxtrg) {
Set("_root:trgmc", 1);
}
}
diam = _root.ball._height / 2;
xpos = 0;
ypos = 0;
zpos = 0;
xmin = -200;
ymin = -200;
xmax = 200;
ymax = 200;
zmax = 390;
t = _root:zbetr / (_root:zbetr - zpos);
_root.ball._x = (_root:xbetr + ((_root:xbetr - xpos) * t)) + _root:mid;
_root.ball._y = (_root:ybetr + ((_root:ybetr - ypos) * t)) + _root:mid;
_root.ball._xscale = (_root.ball._yscale = (_root:fov / (_root:fov + zpos)) * 100);
_root.shadl._x = (_root:xbetr + ((_root:xbetr - xmin) * t)) + _root:mid;
_root.shadl._y = (_root:ybetr + ((_root:ybetr - ypos) * t)) + _root:mid;
_root.shadr._x = (_root:xbetr + ((_root:xbetr - xmax) * t)) + _root:mid;
_root.shadr._y = (_root:ybetr + ((_root:ybetr - ypos) * t)) + _root:mid;
_root.shadt._x = (_root:xbetr + ((_root:xbetr - xpos) * t)) + _root:mid;
_root.shadt._y = (_root:ybetr + ((_root:ybetr - ymax) * t)) + _root:mid;
_root.shadb._x = (_root:xbetr + ((_root:xbetr - xpos) * t)) + _root:mid;
_root.shadb._y = (_root:ybetr + ((_root:ybetr - ymin) * t)) + _root:mid;
_root.pshadt._y = 1;
_root.pshadb._y = 399;
_root.pshadl._x = 1;
_root.pshadr._x = 399;
fly = false;
dir = 1;
remove_level = false;
chsec = 20000;
speed = 15;
sndTrans = new Object();
sndTrans.lr = 0;
sndTrans.rl = 0;
}
onClipEvent (mouseUp) {
if (!fly) {
fly = true;
if (_root.pause) {
removeMovieClip(_root.pause);
removeMovieClip(_root.cred);
_root.ball._visible = true;
mydate = new Date();
mytime = mydate.getTime() - difftime;
} else {
xspeed = (random(50) - 25) / 3;
yspeed = (random(50) - 25) / 3;
zspeed = speed;
mydate = new Date();
mytime = mydate.getTime();
}
}
}
onClipEvent (keyDown) {
if (Key.isDown(32) && (fly)) {
fly = false;
duplicateMovieClip ("_root.pausesrc", "pause", 1000003);
_root.ball._visible = false;
duplicateMovieClip ("_root.credits", "cred", 1000004);
mydate = new Date();
difftime = mydate.getTime() - mytime;
}
}
onClipEvent (enterFrame) {
if (fly) {
mydate = new Date();
if (speed < 40) {
speed = speed + 0.0005;
}
if ((zpos + diam) > zmax) {
sndTrans.ll = ((xpos > 0) ? 100 : (100 + (xpos / 2)));
sndTrans.rr = ((xpos < 0) ? 100 : (100 - (xpos / 2)));
_root.sndback.setTransform(sndTrans);
_root.sndback.start();
dir = -1;
t = _root:zbetr / (_root:zbetr - zpos);
_root.hb._x = (_root:xbetr + ((_root:ybetr - xpos) * t)) + _root:mid;
_root.hb._y = (_root:ybetr + ((_root:ybetr - ypos) * t)) + _root:mid;
_root.hb.play();
} else if ((zpos < 15) && (zpos > -15)) {
if (_root.pad.hitTest(_root.ball)) {
sndTrans.ll = ((xpos > 0) ? 100 : (100 + (xpos / 2)));
sndTrans.rr = ((xpos < 0) ? 100 : (100 - (xpos / 2)));
_root.sndpad.setTransform(sndTrans);
_root.sndpad.start();
dir = 1;
_root.pad.play();
xspeed = (_root.pad._x - _root.ball._x) / 4;
yspeed = (_root.pad._y - _root.ball._y) / 4;
zspeed = Math.sqrt((Math.pow(speed, 2) - Math.pow(xspeed, 2)) - Math.pow(yspeed, 2));
if ((mydate.getTime() - mytime) > chsec) {
if (chsec > 7000) {
chsec = chsec - 1000;
}
mytime = mydate.getTime();
i = 1;
while (i <= _root:maxtrg) {
if (eval ("_root.trg" add i) && (i != _root:trgmc)) {
Set(("_root.trg" add i) add ":upd", true);
}
i++;
}
if (eval ("_root.trg" add _root:trgmc)) {
fly = false;
_root.gotoAndStop("lost");
remove_level = true;
} else {
add_level();
}
}
}
} else if ((zpos - diam) < _root:zbetr) {
_root.gotoAndPlay("lost");
} else if ((zpos - diam) < -15) {
_root.ball.swapDepths(_root.pad);
} else if ((xpos - diam) < xmin) {
vol = 100 - (zpos / 7);
sndTrans.ll = vol / 2;
sndTrans.rr = vol;
_root.sndborder.setTransform(sndTrans);
_root.sndborder.start();
xspeed = xspeed * -1;
xpos = xmin + diam;
t = _root:zbetr / (_root:zbetr - zpos);
_root.hwlr._x = (_root:xbetr + ((_root:xbetr - xmin) * t)) + _root:mid;
_root.hwlr._y = (_root:ybetr + ((_root:ybetr - ypos) * t)) + _root:mid;
_root.hwlr.play();
} else if ((xpos + diam) > xmax) {
vol = 100 - (zpos / 7);
sndTrans.ll = vol;
sndTrans.rr = vol / 2;
_root.sndborder.setTransform(sndTrans);
_root.sndborder.start();
xspeed = xspeed * -1;
xpos = xmax - diam;
t = _root:zbetr / (_root:zbetr - zpos);
_root.hwlr._x = (_root:xbetr + ((_root:xbetr - ymax) * t)) + _root:mid;
_root.hwlr._y = (_root:ybetr + ((_root:ybetr - ypos) * t)) + _root:mid;
_root.hwlr.play();
} else if ((ypos - diam) < ymin) {
vol = 100 - (zpos / 7);
sndTrans.ll = ((xpos >= 0) ? (vol) : (vol + ((vol * xpos) / 400)));
sndTrans.rr = ((xpos <= 0) ? (vol) : (vol - ((vol * xpos) / 400)));
_root.sndborder.setTransform(sndTrans);
_root.sndborder.start();
yspeed = yspeed * -1;
ypos = ymin + diam;
t = _root:zbetr / (_root:zbetr - zpos);
_root.hwtb._x = (_root:xbetr + ((_root:xbetr - xpos) * t)) + _root:mid;
_root.hwtb._y = (_root:ybetr + ((_root:ybetr - xmin) * t)) + _root:mid;
_root.hwtb.play();
} else if ((ypos + diam) > ymax) {
vol = 100 - (zpos / 7);
sndTrans.ll = ((xpos >= 0) ? vol : (vol + ((vol * xpos) / 400)));
sndTrans.rr = ((xpos <= 0) ? vol : (vol - ((vol * xpos) / 400)));
_root.sndborder.setTransform(sndTrans);
_root.sndborder.start();
yspeed = yspeed * -1;
ypos = ymax - diam;
t = _root:zbetr / (_root:zbetr - zpos);
_root.hwtb._x = (_root:xbetr + ((_root:xbetr - xpos) * t)) + _root:mid;
_root.hwtb._y = (_root:ybetr + ((_root:ybetr - ymax) * t)) + _root:mid;
_root.hwtb.play();
}
xpos = xpos + xspeed;
ypos = ypos + yspeed;
zpos = zpos + (zspeed * dir);
exist = false;
i = 1;
while (i <= _root:maxtrg) {
if (eval ("_root.trg" add i)) {
exist = true;
}
i++;
}
if (!exist) {
Set("_root:depth", 1000000) /* 0x0F4240 */;
Set("_root:trgmc", 1);
removeMovieClip(_root.ball);
duplicateMovieClip ("_root.ball_src", "ball", 1000001);
duplicateMovieClip ("_root.targets", "trg" add _root:trgmc, _root:depth);
newcolor = new Color(eval ("_root.trg" add _root:trgmc));
newcolor.setTransform(eval ("_root:mctrans" add _root.trgmc));
_root:depth--;
_root.trgmc++;
mydate = new Date();
mytime = mydate.getTime();
}
t = _root:zbetr / (_root:zbetr - zpos);
_root.ball._x = (_root:xbetr + ((_root:xbetr - xpos) * t)) + _root:mid;
_root.ball._y = (_root:ybetr + ((_root:ybetr - ypos) * t)) + _root:mid;
_root.ball._xscale = (_root.ball._yscale = (_root:fov / (_root:fov + zpos)) * 100);
_root.shadl._x = (_root:xbetr + ((_root:xbetr - xmin) * t)) + _root:mid;
_root.shadl._y = (_root:ybetr + ((_root:ybetr - ypos) * t)) + _root:mid;
_root.shadr._x = (_root:xbetr + ((_root:xbetr - xmax) * t)) + _root:mid;
_root.shadr._y = (_root:ybetr + ((_root:ybetr - ypos) * t)) + _root:mid;
_root.shadt._x = (_root:xbetr + ((_root:xbetr - xpos) * t)) + _root:mid;
_root.shadt._y = (_root:ybetr + ((_root:ybetr - ymax) * t)) + _root:mid;
_root.shadb._x = (_root:xbetr + ((_root:xbetr - xpos) * t)) + _root:mid;
_root.shadb._y = (_root:ybetr + ((_root:ybetr - ymin) * t)) + _root:mid;
if (_root:point >= _root:ptslive) {
_root.lives++;
Set("_root:ptslive", _root:ptslive + (_root:ptslive * 1.5));
}
_root.levelbar._xscale = 100 - (((mydate.getTime() - mytime) * 100) / chsec);
}
_root.pshadt._x = (_root.pshadb._x = _root.pad._x);
_root.pshadl._y = (_root.pshadr._y = _root.pad._y);
}
Frame 3
function rem(amc) {
removeMovieClip(amc);
}
fscommand ("fullscreen", "false");
fscommand ("allowscale", "false");
if (gameover) {
lives = 3;
point = 0;
gameover = false;
}
fov = 200;
maxtrg = 5;
make_visible = false;
i = 1;
while (i <= maxtrg) {
if (eval ("_root.trg" add i)) {
setProperty("_root.trg" add i, _visible , true);
if (!make_visible) {
make_visible = true;
}
}
i++;
}
if (!make_visible) {
depth = 1000000 /* 0x0F4240 */;
trgmc = 1;
duplicateMovieClip ("targets", "trg" add trgmc, depth);
depth--;
mccolor1 = new Color(eval ("trg" add trgmc));
trgmc++;
}
ball_src._visible = false;
pad_src._visible = false;
duplicateMovieClip ("ball_src", "ball", 1000001);
duplicateMovieClip ("pad_src", "pad", 1000002);
Mouse.hide();
pad.startDrag(true);
pausesrc._visible = false;
credits._visible = false;
targets._visible = false;
startlevel = 320;
mid = 200;
xbetr = 0;
ybetr = 0;
zbetr = -200;
mctrans1 = new Object();
mctrans1.rb = 255;
mctrans1.gb = 102;
mctrans1.bb = 0;
mctrans1.aa = 100;
mccolor1.setTransform(mctrans1);
mctrans2 = new Object();
mctrans2.rb = 28;
mctrans2.gb = 150;
mctrans2.bb = 125;
mctrans2.aa = 100;
mctrans3 = new Object();
mctrans3.rb = 18;
mctrans3.gb = 12;
mctrans3.bb = 77;
mctrans3.aa = 100;
mctrans4 = new Object();
mctrans4.rb = 0;
mctrans4.gb = 5;
mctrans4.bb = 240;
mctrans4.aa = 100;
mctrans5 = new Object();
mctrans5.rb = 15;
mctrans5.gb = 102;
mctrans5.bb = 202;
mctrans5.aa = 100;
removeMovieClip("targets");
if (point == 0) {
ptslive = 10;
}
levelbar._xscale = 100;
sndback = new Sound();
sndback.attachSound("sndback_src");
sndborder = new Sound();
sndborder.attachSound("sndborder_src");
sndlost = new Sound();
sndlost.attachSound("sndlost_src");
sndpad = new Sound();
sndpad.attachSound("sndpad_src");
sndtarget = new Sound();
sndtarget.attachSound("sndtarget_src");
stop();
Instance of Symbol 66 MovieClip "targets" in Frame 3
onClipEvent (load) {
if (_visible) {
target._visible = false;
max = 4;
space = 16;
size = target._width + space;
ballfront = true;
level = _root:startlevel;
dp = 1;
i = 0;
while (i < max) {
j = 0;
while (j < max) {
duplicateMovieClip ("target", (j add "trg") add i, dp);
setProperty((j add "trg") add i, _x , (_root.control:xmin + space) + (i * size));
setProperty((j add "trg") add i, _y , (_root.control:ymin + space) + (j * size));
Set((j add "ztrg") add i, level);
dp++;
j++;
}
i++;
}
_yscale = ((_root:fov / (_root:fov + level)) * 100);
_xscale = ((_root:fov / (_root:fov + level)) * 100);
hit = 0;
first = true;
upd = false;
trgspace = 60;
hitted = false;
}
}
onClipEvent (enterFrame) {
if (_visible) {
if (((_root.control:zpos + 10) > level) && ((_root.control:zpos - 10) < level)) {
i = 0;
while (i < max) {
j = 0;
while (j < max) {
if (_root.ball.hitTest(eval ((j add "trg") add i)) && (getProperty((j add "trg") add i, _currentframe) == 1)) {
vol = 100 - (_root.control:zpos / 7);
_root.control.sndTrans.ll = ((_root.control:xpos > 0) ? (vol) : (vol + ((vol * _root.control:xpos) / 400)));
_root.control.sndTrans.rr = ((_root.control:xpos < 0) ? (vol) : (vol - ((vol * _root.control:xpos) / 400)));
_root.sndtarget.setTransform(_root.control.sndTrans);
_root.sndtarget.start();
if (first) {
first = false;
Set("_root.control:dir", _root.control:dir * -1);
hitted = true;
}
with (eval ((j add "trg") add i)) {
play();
}
_root:point++;
hit++;
}
j++;
}
i++;
}
}
if (((!hitted) && (first)) && ((((_root.control:zpos + 10) > level) && (ballfront)) || (((_root.control:zpos - 10) < level) && (!ballfront)))) {
_root.ball.swapDepths(this);
ballfront = !ballfront;
}
hitted = false;
first = true;
if (hit == (max * max)) {
Set("_root:point", _root:point + 10);
_root.rem(_name);
}
if (upd) {
upd = false;
level = level - trgspace;
_yscale = ((_root:fov / (_root:fov + level)) * 100);
_xscale = ((_root:fov / (_root:fov + level)) * 100);
}
}
}
Frame 4
Mouse.show();
pad.stopDrag();
removeMovieClip(pad);
removeMovieClip(ball);
sndlost.start();
i = 1;
while (i <= _root:maxtrg) {
if (eval ("_root.trg" add i)) {
if (_root.control:remove_level) {
removeMovieClip("_root.trg" add i);
} else {
setProperty("_root.trg" add i, _visible , false);
}
}
i++;
}
lives--;
if (lives <= 0) {
gotoAndStop (6);
} else {
gotoAndStop (5);
}
Frame 5
stop();
Instance of Symbol 22 MovieClip in Frame 5
onClipEvent (mouseUp) {
_root.gotoAndPlay("start");
}
Frame 6
i = 1;
while (i <= _root:maxtrg) {
if (eval ("_root.trg" add i)) {
removeMovieClip("_root.trg" add i);
}
i++;
}
gameover = true;
stop();
Frame 7
stop();
Instance of Symbol 22 MovieClip "control" in Frame 7
onClipEvent (load) {
Name = _root:name;
Score = _root:point;
Mail = _root:mail;
if (_root:update) {
ListAll = false;
} else {
ListAll = true;
}
_root.createTextField("txt", 1, 50, 60, 300, 320);
_root.txt.embedFonts = true;
_root.txt.selectable = false;
_root.txt.text = "Loading...";
txtFormat = new TextFormat();
txtFormat.color = 16777215 /* 0xFFFFFF */;
txtFormat.italic = true;
txtFormat.bold = true;
txtFormat.font = "Arial";
txtFormat.tabStops = [40, 200];
txtFormat.size = 18;
_root.txt.setTextFormat(txtFormat);
this.loadVariables("http://subwave.net/cgi-bin/highscore.pl", "post");
}
onClipEvent (data) {
_root.txt.text = result;
_root.txt.embedFonts = true;
_root.txt.setTextFormat(txtFormat);
}
Frame 8
stop();
Instance of Symbol 22 MovieClip "control" in Frame 8
onClipEvent (load) {
function update_scroll() {
_root.scrollmov.scrollbar._y = ((_root.txt.scroll * (300 - _root.scrollmov.scrollbar._height)) / _root.txt.maxscroll) - 150;
}
_root.scrollmov._visible = false;
Name = _root:name;
Score = _root:point;
ListAll = true;
_root.createTextField("txt", 1, 50, 60, 300, 320);
_root.txt.embedFonts = true;
_root.txt.selectable = false;
_root.txt.text = "Loading...";
txtFormat = new TextFormat();
txtFormat.color = 16777215 /* 0xFFFFFF */;
txtFormat.italic = true;
txtFormat.bold = true;
txtFormat.font = "Arial";
txtFormat.tabStops = [40, 200];
txtFormat.size = 18;
_root.txt.setTextFormat(txtFormat);
this.loadVariables("http://subwave.net/cgi-bin/highscore.pl", "post");
}
onClipEvent (data) {
_root.txt.text = result;
_root.txt.embedFonts = true;
_root.txt.setTextFormat(txtFormat);
if (_root.txt.maxscroll > 1) {
_root.scrollmov._visible = true;
_root.scrollmov.scrollbar._yscale = (((100 - (_root.txt.maxscroll / 10)) > 10) ? (100 - (_root.txt.maxscroll / 10)) : 10);
}
}
onClipEvent (enterFrame) {
if (_root:up) {
_root.txt.scroll = _root.txt.scroll - 1;
update_scroll();
} else if (_root:down) {
_root.txt.scroll = _root.txt.scroll + 1;
update_scroll();
}
}
Symbol 21 MovieClip Frame 40
stop();
Symbol 24 MovieClip Frame 1
myURL = "kuclan.org";
if (_root._url.indexOf(myURL) != -1) {
_root.gotoAndStop(1);
}
Symbol 36 MovieClip Frame 1
stop();
Symbol 39 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 1
stop();
Symbol 65 MovieClip Frame 1
stop();
Symbol 65 MovieClip Frame 5
stop();
Symbol 87 Button
on (release) {
gotoAndPlay (3);
}
Symbol 82 Button
on (press) {
if (_level0.point != 0) {
changes = new LoadVars();
changes.score = _level0.point;
changes.game_name = "smashback";
changes.onLoad = function (success) {
if (success) {
this.detail.text = "Worked";
trace("Worked");
trace(unescape(this));
} else {
_parent.detail.text = "Problems";
trace("Problems");
}
};
changes.send("newscore.php", "_self", "POST");
}
}
Symbol 98 Button
on (release) {
highscore = "Loading...";
gotoAndPlay (3);
_root.txt.removeTextField();
}
Symbol 102 Button
on (release) {
_root.txt.removeTextField();
gotoAndPlay (8);
}
Symbol 107 Button
on (press) {
Set("_root:down", true);
}
on (release, releaseOutside) {
Set("_root:down", false);
}
Symbol 108 Button
on (press) {
Set("_root:up", true);
}
on (release, releaseOutside) {
Set("_root:up", false);
}
Symbol 112 Button
on (press) {
this.startDrag();
}
on (release, releaseOutside) {
this.stopDrag();
}
Instance of Symbol 113 MovieClip "scrollbar" in Symbol 114 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = 0;
if (_y < -150) {
_y = -150;
} else if ((_y + _height) > 150) {
_y = (150 - _height);
}
if ((!_root:up) && (!_root:down)) {
_root.txt.scroll = ((_y + 150) * _root.txt.maxscroll) / (300 - _height);
}
}