Frame 1
_quality = "BEST";
myColor = new Color(this);
myTransform = new Object();
clearAllIntervals = function () {
i = 0;
while (i < 1000) {
clearInterval(i);
i++;
}
};
fade = function (destination) {
clearAllIntervals();
locked = true;
fader.destination = destination;
fader.gotoAndPlay(2);
};
gameID = 126;
play();
Frame 2
ifFrameLoaded (40) {
gotoAndStop ("title");
}
Frame 3
gotoAndPlay (2);
Frame 8
scores._visible = false;
doneLoading = function () {
doneLoading = undefined;
fade("title");
};
Frame 16
scores._visible = false;
fromTitle = true;
best = 0;
Frame 25
scores._visible = false;
fromTitle = true;
Frame 33
sounds.water.enter();
scores._visible = false;
fromTitle = false;
Frame 40
scores._visible = true;
endClip.gotoAndStop(2);
if (!fromTitle) {
endClip.gotoAndStop(1);
scores.scripting.test(time);
}
sounds.water.exit();
Symbol 259 MovieClip Frame 1
function onAdFinished() {
if (_this.FWAd_AS2_onClickStartBtn) {
_this.FWAd_AS2_onClickStartBtn();
}
_this.removeMovieClip();
_this._visible = false;
}
var Version:String = "20111122\n[Fri Sep 6 15:47:22 GMT+0800 2013]\n";
if (_root.FWAd_AS1) {
return(undefined);
}
_root.FWAd_AS1 = {};
_root.FWAd_AS1.swfDomain = "flashcfg.youyouwin.com";
_root.FWAd_AS1.swfFolder = ("http://" + _root.FWAd_AS1.swfDomain) + "/";
_root.FWAd_AS1.frameworkSWFPath = _root.FWAd_AS1.swfFolder + "FrameworkAS2.swf";
_root.FWAd_AS1.AD_TYPE_LOADING = "loading";
_root.FWAd_AS1.AD_TYPE_CONTAINER = "container";
_root.FWAd_AS1.frameworkLoader;
_root.FWAd_AS1.mcl;
_root.FWAd_AS1.adValues = {};
_root.FWAd_AS1.showing;
_root.FWAd_AS1.intervalId;
_root.FWAd_AS1.showAd = function (_adValues) {
System.security.allowDomain(_root.FWAd_AS1.swfDomain);
System.security.allowInsecureDomain(_root.FWAd_AS1.swfDomain);
if (_adValues.adType == _root.FWAd_AS1.AD_TYPE_LOADING) {
if (_root.FWAd_AS1.showing) {
trace("\u7F13\u51B2\u5E7F\u544A\u4E0D\u5141\u8BB8\u77ED\u65F6\u95F4\u5185\u91CD\u590D\u521D\u59CB\u5316");
return(undefined);
}
}
_root.FWAd_AS1.reset();
for (var _local3 in _adValues) {
_root.FWAd_AS1.adValues[_local3] = _adValues[_local3];
}
if (_root.FWAd_AS1.adValues.container) {
_root.FWAd_AS1.showing = true;
if (_root.FWAd_AS1.adValues.onAdFinished) {
} else if (_root.FWAd_AS1.adValues.onClickCloseBtn) {
_root.FWAd_AS1.adValues.onAdFinished = _root.FWAd_AS1.adValues.onClickCloseBtn;
} else {
_root.FWAd_AS1.adValues.onAdFinished = _root.FWAd_AS1.adValues.onClickStartBtn;
}
var _local4 = _root.FWAd_AS1.adValues.container.getNextHighestDepth();
_root.FWAd_AS1.frameworkLoader = _root.FWAd_AS1.adValues.container.createEmptyMovieClip("frameworkLoader", ((_local4 > 0) ? (_local4) : 0));
_root.FWAd_AS1.frameworkLoader.createEmptyMovieClip("content", 0);
_root.FWAd_AS1.frameworkLoader.content.loadMovie(_root.FWAd_AS1.frameworkSWFPath);
_root.FWAd_AS1.frameworkLoader.checkLoadErrorDelayTime = 150;
_root.FWAd_AS1.frameworkLoader.onEnterFrame = function () {
if ((--_root.FWAd_AS1.frameworkLoader.checkLoadErrorDelayTime) > 0) {
if ((_root.FWAd_AS1.frameworkLoader.content.getBytesLoaded() > 0) && (_root.FWAd_AS1.frameworkLoader.content.getBytesLoaded() == _root.FWAd_AS1.frameworkLoader.content.getBytesTotal())) {
_root.FWAd_AS1.loadFrameworkComplete();
_root.FWAd_AS1.frameworkLoader.onEnterFrame = null;
}
} else {
_root.FWAd_AS1.loadFrameworkError();
_root.FWAd_AS1.frameworkLoader.onEnterFrame = null;
}
};
} else {
trace("\u672A\u6307\u5B9A\u5BB9\u5668,\u8BF7\u6539\u6210\u4F8B\u5982: _root.FWAd_AS1.showAd({container:root}");
}
};
_root.FWAd_AS1.reset = function () {
_root.FWAd_AS1.adValues = {x:int(_root.FWAd_AS1.adValues.x), y:int(_root.FWAd_AS1.adValues.y), wid:_root.FWAd_AS1.adValues.wid, hei:_root.FWAd_AS1.adValues.hei, id:_root.FWAd_AS1.adValues.id, adType:_root.FWAd_AS1.AD_TYPE_CONTAINER};
_root.FWAd_AS1.showing = false;
clearInterval(_root.FWAd_AS1.intervalId);
if (_root.FWAd_AS1.frameworkLoader) {
_root.FWAd_AS1.frameworkLoader.removeMovieClip();
_root.FWAd_AS1.frameworkLoader = null;
}
};
_root.FWAd_AS1.loadFrameworkComplete = function () {
_root.FWAd_AS1.frameworkLoader.content.framework.init(_root.FWAd_AS1);
};
_root.FWAd_AS1.loadFrameworkError = function () {
_root.FWAd_AS1.intervalId = setInterval(_root.FWAd_AS1.checkGameLoadComplete, 100);
};
_root.FWAd_AS1.checkGameLoadComplete = function () {
var _local2 = _root.FWAd_AS1.adValues.container;
while (_local2) {
if (_local2._parent == null) {
if ((_local2.getBytesLoaded() > 0) && (_local2.getBytesLoaded() == _local2.getBytesTotal())) {
if (_root.FWAd_AS1.adValues.onAdFinished) {
_root.FWAd_AS1.adValues.onAdFinished();
}
_root.FWAd_AS1.reset();
}
return(undefined);
}
_local2 = _local2._parent;
}
};
_root.FWAd_AS1.getValue = function (objName, thisObj) {
return(_root.FWAd_AS1.getObj(objName.split("."), thisObj));
};
_root.FWAd_AS1.setValue = function (objName, value, thisObj) {
var _local1 = objName.split(".");
if (_local1.length) {
var _local3 = _local1.pop();
var _local2 = getObj(_local1, thisObj);
if (_local2) {
_local2[_local3] = value;
}
}
};
_root.FWAd_AS1.getObj = function (objNameArr, thisObj) {
if (objNameArr.length) {
var obj;
if (thisObj) {
obj = thisObj[objNameArr.shift()];
} else {
var defCache = "";
if (objNameArr.length) {
var defStr = objNameArr.shift();
obj = eval (defCache + defStr);
if (obj) {
// unexpected jump
}
defCache = defCache + (defStr + ".");
// unexpected jump
}
}
if (obj) {
while (objNameArr.length) {
obj = obj[objNameArr.shift()];
}
}
return(obj);
}
return(null);
};
var _this = this;
var wid = int("550");
var hei = int("400");
this.clear();
this.beginFill(16777215);
this.moveTo(0, 0);
this.lineTo(wid, 0);
this.lineTo(wid, hei);
this.lineTo(0, hei);
this.lineTo(0, 0);
_root.FWAd_AS1.showAd({container:this, x:0, y:0, wid:wid, hei:hei, id:"zhenflash-276812562150691378453622-1", adType:"loading", onAdFinished:onAdFinished});
this.onEnterFrame = function () {
var _local3 = _root.getNextHighestDepth();
if (maxDepth > 0) {
} else {
maxDepth = 32767;
}
if (this.getDepth() < (maxDepth - 1)) {
this.swapDepths(maxDepth);
}
};
_root.FWAd_AS2 = {showAd:function (_adValues) {
_this.FWAd_AS2_onClickStartBtn = (_adValues.onAdFinished || (_adValues.onClickStartBtn)) || (_adValues.onClickCloseBtn);
}};
Symbol 4 MovieClip Frame 1
total = _root.getBytesTotal();
Symbol 4 MovieClip Frame 2
percent = _root.getBytesLoaded() / total;
bar._xscale = percent * 100;
Symbol 4 MovieClip Frame 3
gotoAndPlay (2);
Symbol 8 MovieClip Frame 1
changeColor = function (percent) {
_parent.myTransform.rb = 3 * percent;
_parent.myTransform.gb = 3 * percent;
_parent.myTransform.bb = 2.55 * percent;
_parent.myColor.setTransform(_parent.myTransform);
};
changeColor(0);
stop();
Symbol 8 MovieClip Frame 2
changeColor(10);
Symbol 8 MovieClip Frame 3
changeColor(20);
_parent.sounds.fx.window.start();
Symbol 8 MovieClip Frame 4
changeColor(30);
Symbol 8 MovieClip Frame 5
changeColor(40);
Symbol 8 MovieClip Frame 6
changeColor(50);
Symbol 8 MovieClip Frame 7
changeColor(60);
Symbol 8 MovieClip Frame 8
changeColor(80);
Symbol 8 MovieClip Frame 9
changeColor(100);
if (destination == "nextShot") {
_parent.game.nextShot();
} else if (destination == "resetGame") {
_parent.game.init();
} else {
_parent.gotoAndStop(destination);
}
Symbol 8 MovieClip Frame 10
changeColor(80);
Symbol 8 MovieClip Frame 11
changeColor(60);
Symbol 8 MovieClip Frame 12
changeColor(40);
Symbol 8 MovieClip Frame 13
changeColor(30);
Symbol 8 MovieClip Frame 14
play();
changeColor(20);
Symbol 8 MovieClip Frame 15
_parent.locked = false;
play();
changeColor(10);
Symbol 13 MovieClip Frame 1
function start() {
gotoAndPlay (2);
}
stop();
Symbol 16 MovieClip Frame 1
enter = function () {
s.stop();
playing = true;
gotoAndPlay ("enter");
};
exit = function () {
playing = false;
gotoAndPlay ("exit");
};
s = new Sound(this);
stop();
playing = false;
Symbol 16 MovieClip Frame 2
s.setVolume(20);
play();
Symbol 16 MovieClip Frame 3
s.setVolume(40);
Symbol 16 MovieClip Frame 4
s.setVolume(60);
Symbol 16 MovieClip Frame 5
s.setVolume(80);
Symbol 16 MovieClip Frame 6
s.setVolume(100);
Symbol 16 MovieClip Frame 9
trace("the wave volume is 100");
stop();
Symbol 16 MovieClip Frame 10
s.setVolume(80);
trace("fading out");
Symbol 16 MovieClip Frame 11
s.setVolume(60);
Symbol 16 MovieClip Frame 12
s.setVolume(40);
Symbol 16 MovieClip Frame 13
s.setVolume(20);
Symbol 16 MovieClip Frame 14
s.setVolume(0);
Symbol 16 MovieClip Frame 15
stop();
Symbol 18 MovieClip Frame 1
enter = function () {
s.stop();
playing = true;
gotoAndPlay ("enter");
};
exit = function () {
playing = false;
gotoAndPlay ("exit");
};
s = new Sound(this);
stop();
playing = false;
Symbol 18 MovieClip Frame 2
s.setVolume(20);
play();
Symbol 18 MovieClip Frame 3
s.setVolume(40);
Symbol 18 MovieClip Frame 4
s.setVolume(60);
Symbol 18 MovieClip Frame 5
s.setVolume(80);
Symbol 18 MovieClip Frame 6
s.setVolume(100);
Symbol 18 MovieClip Frame 9
trace("the wave volume is 100");
stop();
Symbol 18 MovieClip Frame 10
s.setVolume(80);
trace("fading out");
Symbol 18 MovieClip Frame 11
s.setVolume(60);
Symbol 18 MovieClip Frame 12
s.setVolume(40);
Symbol 18 MovieClip Frame 13
s.setVolume(20);
Symbol 18 MovieClip Frame 14
s.setVolume(0);
Symbol 18 MovieClip Frame 15
stop();
Symbol 20 MovieClip Frame 1
enter = function () {
s.stop();
playing = true;
gotoAndPlay ("enter");
};
exit = function () {
playing = false;
gotoAndPlay ("exit");
};
s = new Sound(this);
stop();
playing = false;
Symbol 20 MovieClip Frame 2
s.setVolume(20);
play();
Symbol 20 MovieClip Frame 3
s.setVolume(40);
Symbol 20 MovieClip Frame 4
s.setVolume(60);
Symbol 20 MovieClip Frame 5
s.setVolume(80);
Symbol 20 MovieClip Frame 6
s.setVolume(100);
Symbol 20 MovieClip Frame 9
trace("the wave volume is 100");
stop();
Symbol 20 MovieClip Frame 10
s.setVolume(80);
trace("fading out");
Symbol 20 MovieClip Frame 11
s.setVolume(60);
Symbol 20 MovieClip Frame 12
s.setVolume(40);
Symbol 20 MovieClip Frame 13
s.setVolume(20);
Symbol 20 MovieClip Frame 14
s.setVolume(0);
Symbol 20 MovieClip Frame 15
stop();
Symbol 24 MovieClip Frame 1
stop();
Symbol 26 Button
on (release) {
if (goals[0] == 100) {
goals[0] = 0;
} else {
goals[0] = 100;
}
}
Symbol 27 MovieClip Frame 1
instance = new Array();
names = ["this"];
goals = [100, 100, 100, 100, 100, 0];
volumes = [100, 100, 100, 100, 100, 0];
adjustments = [5, 5, 4, 5, 10, 10];
i = 0;
while (i < names.length) {
instance[i] = new Sound(eval (names[i]));
instance[i].setVolume(volumes[i]);
i++;
}
onEnterFrame = function () {
i = 0;
while (i < names.length) {
if (goals[i] < volumes[i]) {
volumes[i] = volumes[i] - adjustments[i];
} else if (goals[i] > volumes[i]) {
volumes[i] = volumes[i] + adjustments[i];
}
if (Math.abs(goals[i] - volumes[i]) < adjustments[i]) {
volumes[i] - goals[i];
}
instance[i].setVolume(volumes[i]);
i++;
}
frame = int(volumes[0] / 10) + 1;
speaker.gotoAndStop(frame);
};
Symbol 40 Button
on (press) {
_parent.fade("game");
}
on (press) {
_parent.sounds.press.start();
}
on (rollOver) {
_parent.sounds.rollOver.start();
}
Symbol 43 Button
on (press) {
_parent.fade("instructions");
}
on (press) {
_parent.sounds.press.start();
}
on (rollOver) {
_parent.sounds.rollOver.start();
}
Symbol 51 Button
on (press) {
_parent.fade("game");
}
on (press) {
_parent.sounds.press.start();
}
on (rollOver) {
_parent.sounds.rollOver.start();
}
Symbol 70 MovieClip Frame 1
_visible = false;
Symbol 120 MovieClip Frame 1
distance = function (x1, y1, x2, y2) {
var _local2 = x1 - x2;
var _local1 = y1 - y2;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
};
findAngle = function (goal) {
var _local3 = this._x - goal.x;
var _local4 = this._y - goal.y;
var _local2 = (Math.atan(_local4 / _local3) * rad) + 270;
if (_local3 < 0) {
_local2 = 180 + _local2;
}
_local2 = _local2 - 450;
if (_local2 < -180) {
_local2 = _local2 + 360;
}
return(_local2);
};
closify = function (a, b) {
var _local1 = (a - b) % 360;
if (_local1 > 180) {
_local1 = _local1 - 360;
} else if (_local1 < -180) {
_local1 = _local1 + 360;
}
return(_local1);
};
moveShark = function () {
speed = {y:Math.sin(this._rotation / rad) * velocity, x:Math.cos(this._rotation / rad) * velocity};
this._x = this._x + speed.x;
this._y = this._y + speed.y;
if (distance(this._x, this._y, dest.x, dest.y) < 50) {
dest = newDestination();
}
};
turnShark = function () {
var _local4 = {x:dest.x, y:dest.y};
var _local3 = findAngle(_local4);
var _local2 = closify(this._rotation, _local3);
if (Math.abs(_local2) > turnSpeed) {
if (_local2 > 0) {
this._rotation = this._rotation - turnSpeed;
} else {
this._rotation = this._rotation + turnSpeed;
}
}
trace(_local2);
};
newDestination = function () {
if (!_parent.guy.dead) {
var _local4 = random(550) - 275;
var _local3 = random(400) - 200;
while (distance(this._x, this._y, _local4, _local3) < 150) {
_local4 = random(550) - 275;
_local3 = random(400) - 200;
}
var _local5 = {x:_local4, y:_local3};
} else {
var _local5 = {x:_parent.guy._x, y:_parent.guy._y};
}
return(_local5);
};
init = function () {
velocity = 8;
turnSpeed = 5;
rad = 57.29578;
dest = newDestination();
};
testBite = function () {
if (!_parent.guy.dead) {
var _local3 = {x:inside.hitter._x, y:inside.hitter._y};
this.inside.localToGlobal(_local3);
if (_parent.guy.hitter.hitTest(_local3.x, _local3.y, true)) {
_parent.guy.getBit();
}
}
};
onEnterFrame = function () {
if (this._name != "sharkKing") {
moveShark();
turnShark();
testBite();
}
};
init();
Symbol 122 MovieClip Frame 1
_visible = false;
Symbol 124 MovieClip Frame 1
_visible = false;
Symbol 241 MovieClip Frame 1
accel = 1;
speed = {x:0, y:0};
maxSpeed = 10;
turnSpeed = 10;
rad = 57.29578;
distance = function (x1, y1, x2, y2) {
var _local2 = x1 - x2;
var _local1 = y1 - y2;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
};
contain = function () {
var _local2 = distance(0, 0, speed.x, speed.y);
if (_local2 > maxSpeed) {
var _local1 = maxSpeed / _local2;
speed.x = speed.x * _local1;
speed.y = speed.y * _local1;
}
};
doKeys = function () {
if (Key.isDown(37)) {
speed.x = speed.x - accel;
_parent.beginGame();
}
if (Key.isDown(39)) {
speed.x = speed.x + accel;
_parent.beginGame();
}
if (Key.isDown(38)) {
speed.y = speed.y - accel;
_parent.beginGame();
}
if (Key.isDown(40)) {
speed.y = speed.y + accel;
_parent.beginGame();
}
};
distance = function (x1, y1, x2, y2) {
var _local2 = x1 - x2;
var _local1 = y1 - y2;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
};
findAngle = function (goal) {
var _local3 = this._x - goal.x;
var _local4 = this._y - goal.y;
var _local2 = (Math.atan(_local4 / _local3) * rad) + 270;
if (_local3 < 0) {
_local2 = 180 + _local2;
}
_local2 = _local2 - 450;
if (_local2 < -180) {
_local2 = _local2 + 360;
}
return(_local2);
};
closify = function (a, b) {
var _local1 = (a - b) % 360;
if (_local1 > 180) {
_local1 = _local1 - 360;
} else if (_local1 < -180) {
_local1 = _local1 + 360;
}
return(_local1);
};
getBit = function () {
_parent._parent.sounds.music.exit();
_parent._parent.sounds.bite.start();
_parent.gameOver = true;
dead = true;
play();
};
turnGuy = function () {
var _local4 = {x:_x + speed.x, y:_y + speed.y};
var _local3 = findAngle(_local4);
var _local2 = closify(this._rotation, _local3);
if (Math.abs(_local2) > turnSpeed) {
if (_local2 > 0) {
this._rotation = this._rotation - turnSpeed;
} else {
this._rotation = this._rotation + turnSpeed;
}
}
trace(_local2);
};
moveGuy = function () {
speed.x = speed.x * 0.95;
speed.y = speed.y * 0.95;
_x = (_x + speed.x);
_y = (_y + speed.y);
if (_x >= 250) {
_x = 250;
speed.x = 0;
}
if (_x <= -250) {
_x = -250;
speed.x = 0;
}
if (_y >= 175) {
_y = 175;
speed.y = 0;
}
if (_y <= -175) {
_y = -175;
speed.y = 0;
}
};
makeRings = function () {
_parent.rings.makeRing(this);
};
onEnterFrame = function () {
if (!dead) {
doKeys();
contain();
moveGuy();
turnGuy();
}
};
stop();
Symbol 241 MovieClip Frame 46
_parent.doGameOver();
stop();
Symbol 250 MovieClip Frame 1
newShark = function () {
sharkCount++;
if (firstShark) {
_parent.sounds.music.enter();
firstShark = false;
}
duplicateMovieClip (sharkKing, "shark" + sharkCount, sharkCount);
var s = eval ("shark" + sharkCount);
r = random(2);
if (r == 0) {
t = random(2);
if (t == 0) {
s._x = corner0._x;
s._y = random(400) - 200;
} else {
s._x = corner1._x;
s._y = random(400) - 200;
}
} else {
t = random(2);
if (t == 0) {
s._y = corner0._y;
s._x = random(550) - 275;
} else {
s._y = corner1._y;
s._x = random(550) - 275;
}
}
if (sharkCount > 8) {
clearInterval(sharkInterval);
}
};
beginGame = function () {
if (!gameStarted) {
gameStarted = true;
sharkInterval = setInterval(newShark, 4000);
starter._visible = false;
startTime = getTimer();
}
};
doTime = function () {
if (!gameOver) {
if (gameStarted) {
var _local5 = getTimer() - startTime;
time = int(_local5 * 0.01) * 0.1;
var _local3 = int(time / 60);
if (_local3 < 10) {
_local3 = "0" + _local3;
}
var _local2 = time % 60;
if (int(_local2) == _local2) {
var _local4 = ".0";
} else {
var _local4 = "";
}
if (_local2 < 10) {
_local2 = "0" + _local2;
}
displayTime = ((_local3 + ":") + _local2) + _local4;
} else {
displayTime = "00:00.0";
}
if (time > _parent.best) {
_parent.best = time;
_parent.displayBest = displayTime;
}
}
};
doGameOver = function () {
_parent.sounds.aftermath.enter();
_parent.time = time;
_parent.fade("scores");
};
onEnterFrame = function () {
doTime();
};
firstShark = true;
gameStarted = false;
gameOver = false;
guy.dead = false;
overlay.swapDepths(500);
guy.swapDepths(600);
timer.swapDepths(700);
starter.swapDepths(800);
sharkCount = 0;
timer.bester._visible = _parent.best > 0;
Symbol 258 MovieClip Frame 1
stop();