Frame 1
function getMyWeb() {
getURL ("http://mrjiggmin.com/", "_blank");
}
function changeToHigh() {
_root._quality = "HIGH";
_root.qualityLevel = "HIGH";
}
function changeToMed() {
_root._quality = "MEDIUM";
_root.qualityLevel = "MEDIUM";
}
function changeToLow() {
_root._quality = "LOW";
_root.qualityLevel = "LOW";
}
newMenu = new ContextMenu();
newMenu.hideBuiltInItems();
menuButton = new ContextMenuItem("MrJiggmin.com", getMyWeb);
newMenu.customItems.push(menuButton);
blankButton = new ContextMenuItem("");
newMenu.customItems.push(highButton);
highButton = new ContextMenuItem("High Quality", changeToHigh);
newMenu.customItems.push(highButton);
medButton = new ContextMenuItem("Medium Quality", changeToMed);
newMenu.customItems.push(medButton);
lowButton = new ContextMenuItem("Low Quality", changeToLow);
newMenu.customItems.push(lowButton);
_root.menu = newMenu;
compInfo = getVersion();
spaceChar = compInfo.indexOf(" ");
versionNum = compInfo.charAt(spaceChar + 1);
if (((versionNum == "8") || (versionNum == "9")) || (versionNum == "1")) {
noFlash._visible = false;
} else {
noFlash.flashText.text = ("You have flash " + versionNum) + ".";
stop();
}
Frame 2
function __com_mochibot__(swfid, mc, lv) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = ((((((((((("http://" + mbc) + "/my/core.swf?mv=5&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("abb86b19", this, 10301);
stop();
this.onEnterFrame = function () {
var _local4 = _root.getBytesLoaded();
var _local3 = _root.getBytesTotal();
loadBar.gotoAndStop(Math.ceil(Math.round(((_local4 / _local3) / 5) * 100)));
if (_local4 == _local3) {
gotoAndPlay ("initialize");
delete this.onEnterFrame;
}
};
Frame 8
function startMusicSeg() {
music.stop();
music.attachSound("seg" + musicArray[currentLevel - 1]);
music.start(0, 9999);
delete music.onSoundComplete;
music.onSoundComplete = function () {
nextMusicSeg();
};
}
function nextMusicSeg() {
if ((!isPaused) && (!placingBall)) {
currentLevel++;
music.stop();
music.attachSound("seg" + musicArray[currentLevel - 1]);
music.start(0, 9999);
musicVolume = maxMusicVolume;
adjustMusic();
tempLevel = currentLevel;
if (tempLevel > 5) {
tempLevel = 5;
}
dropBall(tempLevel);
createPUp(tempLevel);
prevScreen.gotoAndStop(tempLevel);
ballNum = (pUpNum = tempLevel);
potCount = 0;
if (currentLevel <= 5) {
notif("level" + currentLevel);
}
} else {
music.stop();
music.attachSound("seg" + musicArray[currentLevel - 1]);
music.start(0, 1);
}
}
function adjustMusic() {
musicVolume = musicVolume + ((Math.random() * musicChange) - (musicChange / 2));
if (musicVolume > maxMusicVolume) {
musicVolume = maxMusicVolume;
} else if (musicVolume < (maxMusicVolume * musicMod)) {
musicVolume = maxMusicVolume * musicMod;
}
pan = pan + ((Math.random() * panChange) - (panChange / 2));
if (pan > maxPan) {
pan = maxPan;
} else if (pan < (-maxPan)) {
pan = -maxPan;
}
music.setVolume(musicVolume);
music.setPan(pan);
}
function startHitSound(targetSound, hitVolume, hitVariety) {
if (hitVolume > 0.2) {
if (hitVolume > 1) {
hitVolume = 1;
}
var _local4 = Math.ceil(Math.random() * hitVariety);
var _local2 = _root["soundFX" + currentSoundFX];
_local2.attachSound(targetSound + _local4);
_local2.setVolume(soundVolume * hitVolume);
_local2.start(0, 1);
currentSoundFX++;
if (currentSoundFX > 5) {
currentSoundFX = 1;
}
}
}
function startSound(targetSound, variations) {
if (variations != 1) {
var _local2 = Math.ceil(Math.random() * variations);
_root.soundFX.attachSound(targetSound + _local2);
} else {
_root.soundFX.attachSound(targetSound);
}
_root.soundFX.setVolume((soundVolume + (Math.random() * (soundVolume * 0.4))) - (soundVolume * 0.2));
_root.soundFX.start(0, 1);
}
function pythag(xSide, ySide) {
return(Math.sqrt((xSide * xSide) + (ySide * ySide)));
}
xCenter = 375;
yCenter = 270;
var DEG_RAD = (Math.PI/180);
var RAD_DEG = 57.2957795130823;
qualityLevel = "HIGH";
keyListener = new Object();
Key.addListener(keyListener);
beenToMenu = false;
playerName = "your name here";
_root.createEmptyMovieClip("musicHolder_mc", _root.getNextHighestDepth());
music = new Sound(musicHolder_mc);
_root.createEmptyMovieClip("uberMusicHolder_mc", _root.getNextHighestDepth());
uberMusic = new Sound(uberMusicHolder_mc);
uberMusic.attachSound("uberSeg");
musicArray = new Array(1, 2, 4, 5, 6, 4, 5, 6, 7, 4, 5, 6, 7, 2, 4, 5, 6, 7);
currentSeg = 0;
currentSong = "none";
maxMusicVolume = 80;
musicVolume = maxMusicVolume * 0.8;
musicMod = 0.5;
musicChange = 20;
pan = 0;
panChange = 25;
maxPan = 50;
setInterval(adjustMusic, 500);
_root.createEmptyMovieClip("voiceHolder_mc", _root.getNextHighestDepth());
voiceFX = new Sound(voiceHolder_mc);
_root.createEmptyMovieClip("soundHolder_mc", _root.getNextHighestDepth());
soundFX = new Sound(soundHolder_mc);
_root.createEmptyMovieClip("soundHolder_mc1", _root.getNextHighestDepth());
soundFX1 = new Sound(soundHolder_mc1);
_root.createEmptyMovieClip("soundHolder_mc2", _root.getNextHighestDepth());
soundFX2 = new Sound(soundHolder_mc2);
_root.createEmptyMovieClip("soundHolder_mc3", _root.getNextHighestDepth());
soundFX3 = new Sound(soundHolder_mc3);
_root.createEmptyMovieClip("soundHolder_mc4", _root.getNextHighestDepth());
soundFX4 = new Sound(soundHolder_mc4);
_root.createEmptyMovieClip("soundHolder_mc5", _root.getNextHighestDepth());
soundFX5 = new Sound(soundHolder_mc5);
currentSoundFX = 1;
soundVolume = 95;
returnMusicVolume = maxMusicVolume;
returnSoundVolume = soundVolume;
gotoAndStop ("menu");
Frame 23
stop();
Frame 29
stop();
Frame 36
stop();
Frame 47
stop();
_root.scoretable.filename = "scores/uberPooly.sco";
_root.scoretable.scoresize = 10;
_root.scoretable.action = "VIEW";
_root.scoretable.viewtype = "FLASH";
_root.scoretable.winname = playerName;
_root.scoretable.winscore = score;
_root.scoretable.loadVariables("scores.php", "GET");
Frame 56
stop();
_root.scoretable.filename = "scores/uberPooly.sco";
_root.scoretable.scoresize = 10;
_root.scoretable.action = "INSERT";
_root.scoretable.viewtype = "FLASH";
_root.scoretable.winname = playerName;
_root.scoretable.winscore = score;
_root.scoretable.loadVariables("scores.php", "GET");
Frame 68
function createBall(xCreatePos, yCreatePos, isRandom) {
if (isRandom == 0) {
var _local4 = Math.ceil(Math.random() * ballNum);
var _local2 = _root.balls.attachMovie(("ball" + _local4) + "_mc", "ball" + _root.balls.getNextHighestDepth(), _root.balls.getNextHighestDepth());
} else {
var _local2 = _root.balls.attachMovie(("ball" + isRandom) + "_mc", "ball" + _root.balls.getNextHighestDepth(), _root.balls.getNextHighestDepth());
}
_local2._x = xCreatePos;
_local2._y = yCreatePos;
var _local3 = _root.shadows.attachMovie("ballShadow_mc", "shadow" + _root.shadows.getNextHighestDepth(), _root.shadows.getNextHighestDepth());
_local3._x = _local2._x;
_local3._y = _local2._y;
_local3._xscale = (_local3._yscale = (_local2._width / defaultShadowSize) * 100);
_local2.shadowName = _local3;
_local2.goin = true;
_local2.vel = Math.random() * 2;
_local2.angle = Math.random() * 360;
_local2.mass = 1;
ballArray.push(_local2);
}
function dropBall(isRandom) {
var _local1 = above.attachMovie("placeBallAnim_mc", "hand" + above.getNextHighestDepth(), above.getNextHighestDepth());
var _local2 = (Math.random() * ballSpawnDist) + ballSpawnMin;
_local1._rotation = Math.random() * 360;
_local1._x = (Math.cos((_local1._rotation + 90) * DEG_RAD) * _local2) + xCenter;
_local1._y = (Math.sin((_local1._rotation + 90) * DEG_RAD) * _local2) + yCenter;
while (holes.hitTest(_local1._x, _local1._y, true)) {
_local2 = (Math.random() * ballSpawnDist) + ballSpawnMin;
_local1._rotation = Math.random() * 360;
_local1._x = (Math.cos((_local1._rotation + 90) * DEG_RAD) * _local2) + xCenter;
_local1._y = (Math.sin((_local1._rotation + 90) * DEG_RAD) * _local2) + yCenter;
}
_local1.isRandom = isRandom;
}
function createCueBall() {
var _local2 = _root.balls.attachMovie("cueBall_mc", "cueBall", _root.balls.getNextHighestDepth());
_local2._x = ballMouse._x;
_local2._y = ballMouse._y;
var _local3 = _root.shadows.attachMovie("ballShadow_mc", "shadow" + _root.shadows.getNextHighestDepth(), _root.shadows.getNextHighestDepth());
_local3._x = _local2._x;
_local3._y = _local2._y;
_local3._xscale = (_local3._yscale = (_local2._width / defaultShadowSize) * 100);
_local2.shadowName = _local3;
_local2.goin = true;
_local2.vel = 0;
_local2.angle = 0;
_local2.mass = 1;
ballArray.push(_local2);
ball = _local2;
}
function testHit(tBall) {
var _local23 = 0;
while (_local23 <= (_root.ballArray.length - 1)) {
var _local2 = _root.ballArray[_local23];
var _local10 = (tBall._width + _local2._width) / 2;
if ((Math.abs(tBall._x - _local2._x) < _local10) && (_local2 != tBall)) {
if (Math.abs(tBall._y - _local2._y) < _local10) {
var _local12 = tBall._x - _local2._x;
var _local11 = tBall._y - _local2._y;
var _local14 = pythag(_local12, _local11);
if (_local14 < _local10) {
if (uberBall && ((_local2 == ball) || (tBall == ball))) {
if (tBall == ball) {
boomBall(_local2);
} else {
boomBall(tBall);
}
} else {
if (isNaN(tBall.vel)) {
tBall.vel = 0.01;
}
if (isNaN(_local2.vel)) {
_local2.vel = 0.01;
}
if (isNaN(tBall.angle)) {
tBall.angle = 0.01;
}
if (isNaN(_local2.angle)) {
_local2.angle = 0.01;
}
var _local9 = Math.cos(tBall.angle * DEG_RAD) * tBall.vel;
var _local7 = Math.sin(tBall.angle * DEG_RAD) * tBall.vel;
var _local8 = Math.cos(_local2.angle * DEG_RAD) * _local2.vel;
var _local6 = Math.sin(_local2.angle * DEG_RAD) * _local2.vel;
var _local5 = _local12 / _local14;
var _local4 = _local11 / _local14;
var _local15 = (_local9 * _local5) + (_local7 * _local4);
var _local18 = ((-_local9) * _local4) + (_local7 * _local5);
var _local13 = (_local8 * _local5) + (_local6 * _local4);
var _local17 = ((-_local8) * _local4) + (_local6 * _local5);
var _local20 = _local15 + (((1 + ed) * (_local13 - _local15)) / (1 + (tBall.mass / _local2.mass)));
var _local19 = _local13 + (((1 + ed) * (_local15 - _local13)) / (1 + (_local2.mass / tBall.mass)));
_local9 = (_local20 * _local5) - (_local18 * _local4);
_local7 = (_local20 * _local4) + (_local18 * _local5);
_local8 = (_local19 * _local5) - (_local17 * _local4);
_local6 = (_local19 * _local4) + (_local17 * _local5);
var _local16 = tBall.vel;
tBall.vel = pythag(_local9, _local7);
_local2.vel = pythag(_local8, _local6);
tBall.angle = Math.atan2(_local7, _local9) * RAD_DEG;
_local2.angle = Math.atan2(_local6, _local8) * RAD_DEG;
tBall.goin = true;
_local2.goin = true;
var _local24 = (tempVel / _local16) * tBall.vel;
var _local22 = 1 - (tempVel / _local16);
tempVel = _local24;
rad = tBall.angle * DEG_RAD;
xt = Math.cos(rad) * maxSpeed;
yt = Math.sin(rad) * maxSpeed;
var _local21 = Math.atan2(_local11, _local12);
tBall._x = (Math.cos(_local21) * _local10) + _local2._x;
tBall._y = (Math.sin(_local21) * _local10) + _local2._y;
_local2._x = _local2._x + (Math.cos(_local2.angle * DEG_RAD) * (_local22 * _local2.vel));
_local2._y = _local2._y + (Math.sin(_local2.angle * DEG_RAD) * (_local22 * _local2.vel));
_local2.shadowName._x = _local2._x;
_local2.shadowName._y = _local2._y;
startHitSound("ballHit", (((Math.abs(_local9 - _local8) + Math.abs(_local7 - _local6)) / 8) * _local2.mass) * tBall.mass, 3);
}
}
}
}
_local23++;
}
}
function removeArrayVal(targetArray, startVal) {
var _local1 = 0;
while (_local1 <= (targetArray.length - 1)) {
if (targetArray[_local1] == startVal) {
valFound = true;
break;
}
var valFound = false;
_local1++;
}
while (_local1 < (targetArray.length - 1)) {
targetArray[_local1] = targetArray[_local1 + 1];
_local1++;
}
if (valFound) {
targetArray.pop();
}
}
function removeBall(deadBall) {
removeArrayVal(ballArray, deadBall);
var _local4 = 1;
while (_local4 <= 4) {
holeName = "h" + _local4;
if (_root.holes[holeName].hitTest(deadBall._x, deadBall._y, false)) {
deadBall.xDead = _root.holes[holeName]._x;
deadBall.yDead = _root.holes[holeName]._y;
break;
}
_local4++;
}
deadBall.cover = dk;
deadBall.dd = 60;
deadBall.radiusDead = 22.5;
deadBall.gravityPull = 0.015;
deadBall.maxDistWall = ((deadBall.radiusDead - (deadBall._width / 2)) * deadBall._xscale) / 100;
deadBall.curDist = _root.pythag(deadBall._x - deadBall.xDead, deadBall._y - deadBall.yDead);
deadBall.onEnterFrame = function () {
this.xHoleDist = this.xDead - this._x;
this.yHoleDist = this.yDead - this._y;
this.rad = this.angle * _root.DEG_RAD;
this.xSpeed = Math.cos(this.rad) * this.vel;
this.ySpeed = Math.sin(this.rad) * this.vel;
this.xSpeed = this.xSpeed + (this.xHoleDist * this.gravityPull);
this.ySpeed = this.ySpeed + (this.yHoleDist * this.gravityPull);
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
this.vel = _root.pythag(this.xSpeed, this.ySpeed);
this.angle = Math.atan2(this.ySpeed, this.xSpeed) * _root.RAD_DEG;
this.totBallDist = _root.pythag(this.xHoleDist, this.yHoleDist);
if (this.totBallDist <= this.curDist) {
this.curDist = this.totBallDist;
} else {
this.totBallDist = (this.curDist = this.maxDistWall);
this.holeAngle = Math.atan2(this.yHoleDist, this.xHoleDist);
this.angle = Math.atan2(this.yHoleDist, this.xHoleDist) * _root.RAD_DEG;
this._x = (-(Math.cos(this.holeAngle) * this.curDist)) + this.xDead;
this._y = (-(Math.sin(this.holeAngle) * this.curDist)) + this.yDead;
}
this.shadowName._x = this._x;
this.shadowName._y = this._y;
if (this.totBallDist <= this.maxDistWall) {
this.swapDepths(0);
this.swapDepths(1);
this.swapDepths(2);
this.swapDepths(3);
removeMovieClip(this.shadowName);
this.tint = new Color(this);
startHitSound("ballFall", this.vel / 2, 1);
this.onEnterFrame = function () {
this.rad = this.angle * _root.DEG_RAD;
this._x = this._x + (Math.cos(this.rad) * this.vel);
this._y = this._y + (Math.sin(this.rad) * this.vel);
this.xBallDist = this.xDead - this._x;
this.yBallDist = this.yDead - this._y;
this.totBallDist = _root.pythag(this.xBallDist, this.yBallDist);
this.maxDistWall = ((this.radiusDead - (this._width / 2)) * this._xscale) / 100;
if (this.totBallDist > this.maxDistWall) {
this.centerAngle = Math.atan2(this.yBallDist, this.xBallDist) * _root.RAD_DEG;
this.hitAngle = this.angle - this.centerAngle;
_root.goat._rotation = this.hitAngle;
this.hitAngle = _root.goat._rotation;
this.angle = this.angle - ((this.hitAngle * 2) - 180);
_root.goat._rotation = this._angle;
this.angle = _root.goat._rotation;
this._x = (-((Math.cos(this.centerAngle * _root.DEG_RAD) * this.maxDistWall) * 0.96)) + this.xDead;
this._y = (-((Math.sin(this.centerAngle * _root.DEG_RAD) * this.maxDistWall) * 0.96)) + this.yDead;
this.vel = this.vel * 0.95;
startHitSound("holeHit", this.vel / 4, 4);
}
this.brightness = (this._xscale - 60) * 2.5;
this.newColor = {ra:this.brightness, rb:0, ga:this.brightness, gb:0, ba:this.brightness, bb:0, aa:100, ab:0};
this.tint.setTransform(this.newColor);
this._xscale = (this._yscale = this._xscale * 0.98);
if (this._xscale < this.dd) {
removeMovieClip(this);
}
};
}
};
}
function die() {
_root.lives--;
if (_root.lives <= 0) {
_root.gotoAndStop("gameOver");
} else {
removeBall(ball);
livesDisplay.gotoAndStop(lives);
timer = timerReset;
startPlacingBall();
timerBar.fill._width = (timerBar._height * timer) / timerReset;
}
}
function endGame() {
clearInterval(ballTimerInterval);
delete _root.onEnterFrame;
}
function changeScore(pAmmount) {
score = score + (pAmmount / 10);
scoreBox.text = Math.round(score);
}
function addToTimer(addToAmmount) {
timer = timer + addToAmmount;
if (timer > timerReset) {
timer = timerReset;
}
}
function runBallTimer() {
if ((!placingBall) && (!isPaused)) {
if (ballArray.length < maxBalls) {
ballTimer--;
if ((ballTimer < 0) || (ballArray.length <= 3)) {
dropBall(0);
ballTimer = (Math.random() * ballArray.length) * 1.5;
}
}
pUpTimer--;
if (pUpTimer < 0) {
pUpTimer = pUpTimer + (Math.random() * pUpRate);
createPUp(Math.ceil(Math.random() * pUpNum));
}
}
}
function startPlacingBall() {
placingBall = true;
placingBallFollow = true;
stick._visible = false;
shadows.ss._visible = false;
placingBall._visible = true;
ballMouse.onMouseDown = function () {
_root.placingBallFollow = false;
_root.ballMouse.play();
delete this.onMouseDown;
};
}
function createPUp(pUpName) {
var _local3 = _root.pUps.attachMovie("pUpAnim_mc", "pUp" + _root.pUps.getNextHighestDepth(), _root.pUps.getNextHighestDepth());
var _local4 = ((Math.random() * ((tableRadius - maxPlaceBallDist) - 35)) + maxPlaceBallDist) + 20;
var rot = ((Math.random() * 360) - 180);
_local3._x = (Math.cos(rot * DEG_RAD) * _local4) + xCenter;
_local3._y = (Math.sin(rot * DEG_RAD) * _local4) + yCenter;
_local3.bg.bg1._alpha = 50;
_local3.bg.bg2._alpha = 50;
_local3.rot = (Math.random() * 10) - 5;
_local3.rot2 = (Math.random() * 10) - 5;
_local3.rot3 = (Math.random() * 10) - 5;
_local3.bg.bg1.gotoAndPlay(Math.ceil(Math.random() * _local3.bg.bg1._totalframes));
_local3.bg.bg2.gotoAndPlay(Math.ceil(Math.random() * _local3.bg.bg2._totalframes));
_local3.bg.bg1._rotation = Math.random() * 360;
_local3.bg.bg2._rotation = Math.random() * 360;
_local3.timer = (Math.random() * 900) + 100;
_local3.hitArea = _local3.hit;
_local3.hit._visible = false;
pUpArray.push(_local3);
_local3.onEnterFrame = function () {
this._rotation = this._rotation + this.rot;
this.bg.bg1._rotation = this.bg.bg1._rotation + this.rot1;
this.bg.bg2._rotation = this.bg.bg2._rotation + this.rot2;
if (!_root.isPaused) {
this.timer--;
if (this.timer < 0) {
removeArrayVal(_root.pUpArray, this);
this.gotoAndPlay("expire");
delete this.onEnterFrame;
}
}
};
var _local5 = _local3.shape.attachMovie("pUp" + pUpName, "pUp" + _local3.shape.getNextHighestDepth(), _local3.shape.getNextHighestDepth());
_local3.shapeName = _local5;
}
function pUpHit() {
var _local1 = 0;
while (_local1 <= (pUpArray.length - 1)) {
if (pUpArray[_local1].hitTest(ball._x, ball._y, true)) {
startSound(pUpArray[_local1].shapeName.soundFX, 1);
delete pUpArray[_local1].onEnterFrame;
pUpArray[_local1].gotoAndPlay("die");
pUpArray[_local1].shapeName.play();
removeArrayVal(pUpArray, pUpArray[_local1]);
}
_local1++;
}
}
function testWall(wallBall) {
var _local7 = xCenter - wallBall._x;
var _local6 = yCenter - wallBall._y;
var _local3 = pythag(_local7, _local6);
var _local2 = tableRadius - (wallBall._width / 2);
if (_local3 > (_local2 - 20)) {
if (holes.hitTest(wallBall._x, wallBall._y, true)) {
if (wallBall == ball) {
die();
notif("scratchNotif_mc");
} else {
removeBall(wallBall);
timerDec = timerDec + timerDecInc;
changeScore(1000);
addToTimer(100);
potCount++;
}
} else if (_local3 > _local2) {
var _local4 = Math.atan2(_local6, _local7) * RAD_DEG;
var _local5 = wallBall.angle - _local4;
goat._rotation = _local5;
_local5 = goat._rotation;
wallBall.angle = wallBall.angle - ((_local5 * 2) - 180);
_local3 = tableRadius;
wallBall.shadowName._x = (wallBall._x = (-(Math.cos(_local4 * DEG_RAD) * _local2)) + xCenter);
wallBall.shadowName._y = (wallBall._y = (-(Math.sin(_local4 * DEG_RAD) * _local2)) + yCenter);
startHitSound("wallHit", wallBall.vel / 14, 3);
}
}
}
function boomBall(targetBall) {
var _local3 = balls.attachMovie("explosion_mc", "boom" + balls.getNextHighestDepth(), balls.getNextHighestDepth());
_local3._x = targetBall._x;
_local3._y = targetBall._y;
_local3._width = targetBall._width * 2;
_local3._height = targetBall._height * 2;
_local3._rotation = Math.random() * 360;
var _local6 = 0;
var _local4 = 20;
while (_local4 > 0) {
if (Math.random() > 0.5) {
_local3 = _root.below.attachMovie("fire_mc", "fire" + _root.below.getNextHighestDepth(), _root.below.getNextHighestDepth());
} else {
_local3 = _root.balls.attachMovie("fire_mc", "fire" + _root.balls.getNextHighestDepth(), _root.balls.getNextHighestDepth());
}
_local3._x = targetBall._x;
_local3._y = targetBall._y;
_local3._rotation = Math.random() * 360;
_local3._xscale = (_local3._yscale = (Math.random() * 50) + 50);
_local3._alpha = (Math.random() * 50) + 50;
_local3.rotInc = (Math.random() * 20) - 10;
_local3.gotoAndPlay(Math.ceil(Math.random() * 5));
_local3.onEnterFrame = function () {
this._rotation = this._rotation + this.rotInc;
};
_local4--;
}
changeScore(1000);
addToTimer(100);
removeArrayVal(ballArray, targetBall);
removeMovieClip(targetBall.shadowName);
removeMovieClip(targetBall);
startSound("ballBoom", 2);
}
function notif(notifName) {
m = above.attachMovie("notif_mc", "textAnim" + above.getNextHighestDepth(), above.getNextHighestDepth());
m._x = xCenter;
m._y = yCenter;
m.tHolder.attachMovie(notifName, "text" + m.tHolder.getNextHighestDepth(), m.tHolder.getNextHighestDepth());
if (notifName != "level1") {
_root.voiceFX.attachSound(notifName + "_voice");
_root.voiceFX.setVolume(soundVolume * 0.5);
_root.voiceFX.start(0, 1);
}
}
function pauseGame() {
isPaused = !isPaused;
if (isPaused) {
_root.pauseScreen.gotoAndStop("on");
} else {
_root.pauseScreen.gotoAndStop("off");
}
}
currentLevel = 1;
potCount = 0;
potReq = 3;
notif("level1");
pUpNum = 1;
pUpRate = 7;
pUpTimer = Math.random() * pUpRate;
pUpArray = new Array();
var timerReset = 100;
var timer = timerReset;
var timerDec = 0.08;
var timerDecInc = 0.007;
lives = 4;
score = 0;
livesDisplay.gotoAndStop(lives);
extraLives = 0;
stickSoundDelay = 0;
lastStickDist = 100;
stickFollowSpeed = 0.15;
xStickLast = 0;
yStickLast = 0;
stick.shading.stop();
shadows.ss.sShadow.stop();
var stickMod = 50;
lightAngle = 45;
tableRadius = 200;
ballNum = 1;
maxBalls = 7;
ballArray = new Array();
ballFriction = 0.97;
ballStop = 0.09;
ed = 0.85;
defaultShadowSize = 25;
maxSpeed = 4;
tempVel = 0.1;
xt = 0.1;
yt = 0.1;
ballSpawnDist = 100;
ballSpawnMin = 100;
var ii = 5;
while (ii > 0) {
var dist = ((Math.random() * ballSpawnDist) + ballSpawnMin);
var rot = ((Math.random() * 360) - 180);
var xPos = ((Math.cos(rot * DEG_RAD) * dist) + xCenter);
var yPos = ((Math.sin(rot * DEG_RAD) * dist) + yCenter);
createBall(xPos, yPos, 1);
ii--;
}
ballTimer = Math.random() * 10;
ballTimerInterval = setInterval(runBallTimer, 3000);
ballStickHit = 12.5 + stickMod;
ballRadius = 12.5;
uberBall = false;
placingBall = false;
placingBallFollow = false;
maxPlaceBallDist = 75 - ballRadius;
startPlacingBall();
startMusicSeg();
currentSong = "game";
_root.createEmptyMovieClip("goat", _root.getNextHighestDepth());
isPaused = false;
delete keyListener.onKeyUp;
keyListener.onKeyUp = function () {
if (Key.getCode() == 80) {
pauseGame();
}
};
onMouseDown = function () {
mousePressed = true;
};
onMouseUp = function () {
mousePressed = false;
};
this.onEnterFrame = function () {
if (!isPaused) {
var _local2 = 0;
while (_local2 <= (ballArray.length - 1)) {
var _local1 = ballArray[_local2];
if (_local1.goin) {
tempVel = _local1.vel;
rad = _local1.angle * DEG_RAD;
if (tempVel > maxSpeed) {
xt = Math.cos(rad) * maxSpeed;
yt = Math.sin(rad) * maxSpeed;
while (tempVel >= maxSpeed) {
tempVel = tempVel - maxSpeed;
_local1._x = _local1._x + xt;
_local1._y = _local1._y + yt;
testHit(_local1);
}
}
_local1._x = _local1._x + (Math.cos(rad) * tempVel);
_local1._y = _local1._y + (Math.sin(rad) * tempVel);
_local1.vel = _local1.vel * ballFriction;
if (_local1.vel < ballStop) {
_local1.goin = false;
}
testHit(_local1);
if (_local1 != ball) {
testWall(_local1);
}
_local1.shadowName._x = _local1._x;
_local1.shadowName._y = _local1._y;
}
_local2++;
}
if (placingBall) {
if (placingBallFollow) {
ballMouse._x = _xmouse;
ballMouse._y = _ymouse - 85;
var _local8 = _xmouse - xCenter;
var _local9 = (_ymouse - yCenter) - 85;
var _local16 = Math.sqrt((_local8 * _local8) + (_local9 * _local9));
if (_local16 > maxPlaceBallDist) {
placeBallRot = Math.atan2(_local9, _local8);
ballMouse._x = (Math.cos(placeBallRot) * maxPlaceBallDist) + xCenter;
ballMouse._y = (Math.sin(placeBallRot) * maxPlaceBallDist) + yCenter;
}
ballMouse._visible = true;
}
} else {
var _local11 = stick._x - _xmouse;
var _local12 = stick._y - _ymouse;
if (Math.abs(_local11) > 1) {
stick._x = stick._x - (_local11 * stickFollowSpeed);
}
if (Math.abs(_local12) > 1) {
stick._y = stick._y - (_local12 * stickFollowSpeed);
}
var _local15 = stick._x - ball._x;
var _local14 = stick._y - ball._y;
var _local4 = pythag(_local15, _local14);
var _local18 = Math.atan2(_local14, _local15) * RAD_DEG;
if (mousePressed) {
stick._x = (Math.cos((stick._rotation - 180) * DEG_RAD) * _local4) + ball._x;
stick._y = (Math.sin((stick._rotation - 180) * DEG_RAD) * _local4) + ball._y;
} else {
stick._rotation = _local18 - 180;
lastStickDist = _local4;
}
if (_local4 < ballStickHit) {
ball.goin = true;
ball.angle = stick._rotation;
var _local6 = xStickLast - stick._x;
var _local7 = yStickLast - stick._y;
var _local19 = Math.atan2(_local7, _local6) * RAD_DEG;
var _local3 = Math.abs(_local19 - stick._rotation);
if (_local3 > 180) {
_local3 = 360 - _local3;
}
_local3 = _local3 - 90;
if (_local3 < 0) {
_local3 = 0;
}
var _local17 = _local3 / 90;
var _local10 = Math.sqrt((_local6 * _local6) + (_local7 * _local7));
ball.vel = (_local10 * _local17) * 1.3;
ball.shadowName._x = (ball._x = (Math.cos(stick._rotation * DEG_RAD) * ballStickHit) + stick._x);
ball.shadowName._y = (ball._y = (Math.sin(stick._rotation * DEG_RAD) * ballStickHit) + stick._y);
if (stickSoundDelay <= 0) {
startHitSound("stickHit", _local10 / 11, 3);
stickSoundDelay = 4;
}
}
stickSoundDelay--;
xStickLast = stick._x;
yStickLast = stick._y;
xMouseLast = _xmouse;
yMouseLast = _ymouse;
var _local5 = Math.round(stick._rotation - lightAngle) + 90;
if (_local5 < 1) {
_local5 = 360 + _local5;
}
stick.shading.gotoAndStop(_local5);
shadows.ss.sShadow.gotoAndStop(_local5);
var _local13 = _local4 / 10;
shadows.ss.sShadow._x = (Math.cos((stick._rotation - lightAngle) * DEG_RAD) * _local13) + stickMod;
shadows.ss.sShadow._y = -(Math.sin((stick._rotation - lightAngle) * DEG_RAD) * _local13);
shadows.ss._rotation = stick._rotation;
shadows.ss._x = stick._x;
shadows.ss._y = stick._y;
shadows.ss._alpha = 100 - (_local4 / 5);
testWall(ball);
timer = timer - timerDec;
if (timer <= 0) {
die();
notif("outOfTimeNotif_mc");
}
timerBar.fill._width = (timerBar._height * timer) / timerReset;
changeScore(timerDec * 10);
if (timer < 25) {
timerBar.gotoAndStop("on");
} else {
timerBar.gotoAndStop("off");
}
if (pUps.hitTest(ball._x, ball._y, true)) {
pUpHit();
}
if (potCount >= potReq) {
potCount = 0;
var _local20 = music.position;
music.stop();
music.start(_local20 / 1000, 1);
}
}
}
};
Frame 72
stop();
endGame();
music.stop();
score = Math.round(score);
Frame 84
endGame();
gotoAndStop ("game");
Symbol 7 Button
on (release) {
getURL ("http://www.macromedia.com/go/getflash/", "_blank");
}
Symbol 17 MovieClip [ball1_mc] Frame 1
mass = 1;
Symbol 50 MovieClip Frame 1
rot1 = (Math.random() * 10) - 5;
rot2 = (Math.random() * 10) - 5;
this.onEnterFrame = function () {
bg1._rotation = bg1._rotation + rot1;
bg2._rotation = bg2._rotation + rot2;
};
Symbol 53 MovieClip [pUp1] Frame 1
stop();
soundFX = "pUpGood";
Symbol 53 MovieClip [pUp1] Frame 2
stop();
_root.changeScore(5000);
Symbol 55 MovieClip [ball2_mc] Frame 1
mass = 1;
xVel = 0;
yVel = 0;
xMax = 2;
yMax = 2;
this.onEnterFrame = function () {
goin = true;
xVel = Math.cos(this.angle * _root.DEG_RAD) * vel;
yVel = Math.sin(this.angle * _root.DEG_RAD) * vel;
xVel = xVel + ((Math.random() * 0.5) - 0.25);
yVel = yVel + ((Math.random() * 0.5) - 0.25);
angle = Math.atan2(yVel, xVel) * _root.RAD_DEG;
vel = _root.pythag(xVel, yVel);
};
Symbol 57 MovieClip [pUp2] Frame 1
stop();
soundFX = "pUpBad";
Symbol 57 MovieClip [pUp2] Frame 2
stop();
_root.changeScore(-5000);
Symbol 59 MovieClip [ball3_mc] Frame 1
mass = 0.5;
Symbol 61 MovieClip [pUp3] Frame 1
stop();
soundFX = "pUpGood";
Symbol 61 MovieClip [pUp3] Frame 2
stop();
_root.stick.timer = _root.stick.timer + 1000;
_root.stick.gotoAndStop("laser");
Symbol 63 MovieClip [ball4_mc] Frame 1
mass = 1;
maxAlpha = 50;
minAlpha = 5;
this._alpha = maxAlpha;
shadowName._visible = false;
this.onEnterFrame = function () {
this._alpha = this._alpha + ((Math.random() * 10) - 5);
if (this._alpha > maxAlpha) {
this._alpha = maxAlpha;
} else if (this._alpha < minAlpha) {
this._alpha = minAlpha;
}
};
Symbol 66 MovieClip [pUp4] Frame 1
stop();
soundFX = "pUpGood";
Symbol 66 MovieClip [pUp4] Frame 2
stop();
var i = (_root.ballArray.length - 1);
while (i >= 0) {
var ball = _root.ballArray[i];
if (ball != _root.ball) {
ball.goin = true;
ball.vel = Math.random() * 10;
ball.angle = (Math.random() * 360) - 180;
}
i--;
}
Symbol 68 MovieClip [ball5_mc] Frame 1
mass = 5;
Symbol 72 MovieClip [pUp5] Frame 1
stop();
soundFX = "pUpGood";
Symbol 72 MovieClip [pUp5] Frame 2
stop();
_root.timer = _root.timerReset;
_root.timerBar.fill._width = _root.timerBar._width;
Symbol 76 MovieClip [pUp6] Frame 1
stop();
soundFX = "pUpGood";
Symbol 76 MovieClip [pUp6] Frame 2
stop();
if (_root.ballArray.length < _root.maxBalls) {
_root.dropBall(0);
_root.dropBall(0);
_root.dropBall(0);
} else {
_root.dropBall(0);
}
Symbol 78 MovieClip [ball7_mc] Frame 1
mass = 3;
Symbol 80 MovieClip [pUp7] Frame 1
stop();
soundFX = "pUpGood";
if (_root.extraLives > 3) {
removeMovieClip(this._parent._parent);
}
Symbol 80 MovieClip [pUp7] Frame 2
stop();
if (_root.lives < 6) {
_root.lives++;
_root.extraLives++;
_root.livesDisplay.gotoAndStop(_root.lives);
}
Symbol 86 MovieClip [pUp8] Frame 1
stop();
soundFX = "pUpBad";
Symbol 86 MovieClip [pUp8] Frame 2
stop();
_root.ball.mass = 0.01;
_root.ball.attachMovie("panyBallAnim_mc", "mod", 50);
Symbol 90 MovieClip [pUp9] Frame 1
stop();
soundFX = "pUpGood";
this.onEnterFrame = function () {
var _local3 = _root.balls.attachMovie("fire_mc", "fire" + _root.balls.getNextHighestDepth(), _root.balls.getNextHighestDepth());
_local3._x = this._parent._parent._x;
_local3._y = this._parent._parent._y;
_local3._rotation = Math.random() * 360;
_local3._xscale = (_local3._yscale = (Math.random() * 50) + 10);
_local3._alpha = (Math.random() * 50) + 50;
_local3.rotInc = (Math.random() * 20) - 10;
_local3.onEnterFrame = function () {
this._rotation = this._rotation + this.rotInc;
};
};
Symbol 90 MovieClip [pUp9] Frame 2
stop();
_root.ball.mass = 1;
var m = _root.ball.attachMovie("uberBallAnim_mc", "mod", 50);
Symbol 92 MovieClip [ball10_mc] Frame 1
mass = 2;
this.onEnterFrame = function () {
if (!_root.isPaused) {
if (isNaN(vel)) {
angle = 0.01;
vel = 0.01;
}
goin = true;
xPullDist = this._x - _root.ball._x;
yPullDist = this._y - _root.ball._y;
totPullDist = _root.pythag(xPullDist, yPullDist);
pullAngle = Math.atan2(yPullDist, xPullDist);
pullForce = 15 / totPullDist;
xPullForce = Math.cos(pullAngle) * pullForce;
yPullForce = Math.sin(pullAngle) * pullForce;
xPullVel = (Math.cos(angle * _root.DEG_RAD) * vel) - xPullForce;
yPullVel = (Math.sin(angle * _root.DEG_RAD) * vel) - yPullForce;
angle = Math.atan2(yPullVel, xPullVel) * _root.RAD_DEG;
vel = _root.pythag(xPullVel, yPullVel);
}
};
Symbol 94 MovieClip [pUp10] Frame 1
stop();
soundFX = "pUpBad";
Symbol 94 MovieClip [pUp10] Frame 2
stop();
_root.notif("deathNotif_mc");
_root.die();
Symbol 95 MovieClip Frame 1
stop();
Symbol 97 MovieClip [cueBall_mc] Frame 1
mass = 1;
Symbol 101 MovieClip [placeBallAnim_mc] Frame 23
_root.createBall(this._x, this._y, isRandom);
Symbol 101 MovieClip [placeBallAnim_mc] Frame 41
removeMovieClip(this);
Symbol 108 MovieClip [pUpAnim_mc] Frame 21
stop();
Symbol 108 MovieClip [pUpAnim_mc] Frame 22
_root.changeScore(1000);
Symbol 108 MovieClip [pUpAnim_mc] Frame 34
removeMovieClip(this);
Symbol 108 MovieClip [pUpAnim_mc] Frame 49
removeMovieClip(this);
Symbol 111 MovieClip [panyBallAnim_mc] Frame 1
counter = 400;
this.onEnterFrame = function () {
if (!_root.isPaused) {
petals._rotation = petals._rotation + 5.5;
counter--;
if (counter < 0) {
_root.ball.mass = 1;
removeMovieClip(this);
}
}
};
Symbol 112 MovieClip [uberBallAnim_mc] Frame 1
counter = 400;
_root.uberBall = true;
delete _root.uberMusic.onSoundComplete;
_root.uberMusic.stop();
_root.uberMusic.setVolume(_root.maxMusicVolume * 0.7);
_root.uberMusic.start(_root.music.position / 1000, 1);
_root.uberMusic.onSoundComplete = function () {
this.start(0, 999);
delete this.onSoundComplete;
};
_root.musicVolume = 0;
_root.adjustMusic();
_root.startSound("boom", 1);
this.onEnterFrame = function () {
if (!_root.isPaused) {
var _local4 = 2;
while (_local4 > 0) {
if (Math.random() > 0.5) {
var _local3 = _root.below.attachMovie("fire_mc", "fire" + _root.below.getNextHighestDepth(), _root.below.getNextHighestDepth());
} else {
var _local3 = _root.balls.attachMovie("fire_mc", "fire" + _root.balls.getNextHighestDepth(), _root.balls.getNextHighestDepth());
}
_local3._x = this._parent._x;
_local3._y = this._parent._y;
_local3._rotation = Math.random() * 360;
_local3._xscale = (_local3._yscale = (Math.random() * 50) + 50);
_local3._alpha = (Math.random() * 50) + 50;
_local3.rotInc = (Math.random() * 20) - 10;
_local3.onEnterFrame = function () {
this._rotation = this._rotation + this.rotInc;
};
_local4--;
}
counter--;
if (counter < 0) {
_root.uberBall = false;
delete _root.uberMusic.onSoundComplete;
_root.uberMusic.stop();
removeMovieClip(this);
}
}
};
this.onUnload = function () {
_root.uberBall = false;
delete _root.uberMusic.onSoundComplete;
_root.uberMusic.stop();
};
Symbol 118 MovieClip Frame 1
gotoAndStop(Math.ceil(Math.random() * this._totalframes));
Symbol 119 MovieClip [fire_mc] Frame 16
removeMovieClip(this);
Symbol 120 MovieClip [ball8_mc] Frame 1
mass = 1;
num = 0;
ringCounter = 0;
ringCounterReset = 12;
counterReset = 3;
counter = 0;
this.onEnterFrame = function () {
if (!_root.isPaused) {
if (counter <= 0) {
counter = counterReset;
ball = _root.ball;
if (ball != this) {
ball.goin = true;
xPullDist = this._x - ball._x;
yPullDist = this._y - ball._y;
totPullDist = _root.pythag(xPullDist, yPullDist);
pullAngle = Math.atan2(yPullDist, xPullDist);
pullForce = 20 / totPullDist;
xPullForce = Math.cos(pullAngle) * pullForce;
yPullForce = Math.sin(pullAngle) * pullForce;
xPullVel = (Math.cos(ball.angle * _root.DEG_RAD) * ball.vel) - xPullForce;
yPullVel = (Math.sin(ball.angle * _root.DEG_RAD) * ball.vel) - yPullForce;
ball.angle = Math.atan2(yPullVel, xPullVel) * _root.RAD_DEG;
ball.vel = _root.pythag(xPullVel, yPullVel);
}
} else {
counter--;
}
}
if (ringCounter < 0) {
ringCounter = ringCounterReset;
m = _root.below.attachMovie("pushAnim_mc", "ring" + _root.below.getNextHighestDepth(), _root.below.getNextHighestDepth());
m._x = this._x;
m._y = this._y;
m.follow = this;
m._alpha = 25;
m.onEnterFrame = function () {
this._x = this.follow._x;
this._y = this.follow._y;
};
}
ringCounter--;
};
Symbol 121 MovieClip [ball6_mc] Frame 1
mass = 1;
num = 0;
ringCounterReset = 12;
ringCounter = 0;
counterReset = 3;
counter = 0;
this.onEnterFrame = function () {
if (!_root.isPaused) {
if (counter <= 0) {
counter = counterReset;
ball = _root.ball;
if (ball != this) {
ball.goin = true;
xPullDist = this._x - ball._x;
yPullDist = this._y - ball._y;
totPullDist = _root.pythag(xPullDist, yPullDist);
pullAngle = Math.atan2(yPullDist, xPullDist);
pullForce = 20 / totPullDist;
xPullForce = Math.cos(pullAngle) * pullForce;
yPullForce = Math.sin(pullAngle) * pullForce;
xPullVel = (Math.cos(ball.angle * _root.DEG_RAD) * ball.vel) + xPullForce;
yPullVel = (Math.sin(ball.angle * _root.DEG_RAD) * ball.vel) + yPullForce;
ball.angle = Math.atan2(yPullVel, xPullVel) * _root.RAD_DEG;
ball.vel = _root.pythag(xPullVel, yPullVel);
}
} else {
counter--;
}
}
if (ringCounter < 0) {
ringCounter = ringCounterReset;
m = _root.below.attachMovie("suckAnim_mc", "ring" + _root.below.getNextHighestDepth(), _root.below.getNextHighestDepth());
m._x = this._x;
m._y = this._y;
m.follow = this;
m._alpha = 25;
m.onEnterFrame = function () {
this._x = this.follow._x;
this._y = this.follow._y;
};
}
ringCounter--;
};
Symbol 124 MovieClip [pushAnim_mc] Frame 27
removeMovieClip(this);
Symbol 125 MovieClip [suckAnim_mc] Frame 27
removeMovieClip(this);
Symbol 126 MovieClip [ball9_mc] Frame 1
mass = 1;
timerReset = 300;
timer = Math.random() * timerReset;
this.onEnterFrame = function () {
timer--;
if (timer < 0) {
this.goin = true;
var _local3 = 10;
while (_local3 > 0) {
m = _root.balls.attachMovie("smokePoof_mc", "poof" + _root.balls.getNextHighestDepth(), _root.balls.getNextHighestDepth());
m._alpha = Math.random() * 100;
m._xscale = (m._yscale = (Math.random() * 75) + 25);
m._rotation = Math.random() * 360;
m._x = this._x;
m._y = this._y;
_local3--;
}
timer = Math.random() * timerReset;
poofDist = Math.random() * _root.tableRadius;
poofAngle = (Math.random() * 360) * _root.DEG_RAD;
this._x = (this.shadowName._x = (Math.sin(poofAngle) * poofDist) + _root.xCenter);
this._y = (this.shadowName._y = (Math.cos(poofAngle) * poofDist) + _root.yCenter);
while (_root.holes.hitTest(this._x, this._y, true)) {
poofDist = Math.random() * _root.tableRadius;
poofAngle = (Math.random() * 360) * _root.DEG_RAD;
this._x = (this.shadowName._x = (Math.sin(poofAngle) * poofDist) + _root.xCenter);
this._y = (this.shadowName._y = (Math.cos(poofAngle) * poofDist) + _root.yCenter);
}
_local3 = 10;
while (_local3 > 0) {
m = _root.balls.attachMovie("smokePoof_mc", "poof" + _root.balls.getNextHighestDepth(), _root.balls.getNextHighestDepth());
m._alpha = Math.random() * 100;
m._xscale = (m._yscale = (Math.random() * 75) + 25);
m._rotation = Math.random() * 360;
m._x = this._x;
m._y = this._y;
_local3--;
}
_root.startSound("poof", 1);
}
};
Symbol 127 MovieClip [smokePoof_mc] Frame 23
removeMovieClip(this);
Symbol 130 MovieClip [ray_mc] Frame 24
removeMovieClip(this);
Symbol 138 MovieClip [notif_mc] Frame 31
removeMovieClip(this);
Symbol 187 MovieClip [explosion_mc] Frame 15
removeMovieClip(this);
Symbol 230 Button
on (release) {
soundVolume = returnSoundVolume;
maxMusicVolume = returnSoundVolume;
musicVolume = returnMusicVolume * 0.75;
music.setVolume(musicVolume);
music.stop();
music.start(0, 999);
}
Symbol 233 Button
on (release) {
stopAllSounds();
soundVolume = 0;
maxMusicVolume = 0;
musicVolume = 0;
music.setVolume(0);
}
Symbol 246 MovieClip Frame 1
stop();
timer = 0;
Symbol 246 MovieClip Frame 2
this.onEnterFrame = function () {
if (!_root.isPaused) {
timer--;
if (timer < 0) {
this.gotoAndStop("off");
delete this.onEnterFrame;
}
}
};
Symbol 266 Button
on (release) {
_parent.gotoName = "game";
_parent.gotoAndPlay("leave");
}
Symbol 269 Button
on (release) {
_parent.gotoName = "credits";
_parent.gotoAndPlay("leave");
}
Symbol 272 Button
on (release) {
_parent.gotoName = "instructions";
_parent.gotoAndPlay("leave");
}
Symbol 276 Button
on (release) {
getURL ("http://www.dragongamez.com", "_blank");
}
Symbol 280 MovieClip Frame 1
function menuGraphics() {
xCenter = 325;
yCenter = 270;
totCenter = _root.pythag(xCenter, yCenter);
this.onEnterFrame = function () {
m = rays.attachMovie("ray_mc", "ray" + rays.getNextHighestDepth(), rays.getNextHighestDepth());
m._rotation = Math.random() * 360;
m._x = xCenter;
m._y = yCenter;
x1 = xCenter;
y1 = yCenter;
curRot++;
var _local12 = (Math.random() * 360) * _root.DEG_RAD;
var _local6 = (Math.cos(_local12) * totCenter) + xCenter;
var _local5 = (Math.sin(_local12) * totCenter) + yCenter;
var _local9 = x1 - _local6;
var _local8 = y1 - _local5;
var _local11 = rays.createEmptyMovieClip("bolt" + rays.getNextHighestDepth(), rays.getNextHighestDepth());
_local11.lineStyle(4, 16777215, 20);
_local11.moveTo(x1, y1);
var _local10 = rays.createEmptyMovieClip("bolt" + rays.getNextHighestDepth(), rays.getNextHighestDepth());
_local10.lineStyle(1, 16773231, 50);
_local10.moveTo(x1, y1);
var _local3 = x1;
var _local4 = y1;
var _local7 = 0;
do {
if (!((_local3 != _local6) || (_local4 != _local5))) {
break;
}
_local3 = _local3 - ((Math.random() * _local9) / 5);
_local4 = _local4 - ((Math.random() * _local8) / 5);
if (_local9 > 0) {
if (_local3 < _local6) {
_local3 = _local6;
}
} else if (_local3 > _local6) {
_local3 = _local6;
}
if (_local8 > 0) {
if (_local4 < _local5) {
_local4 = _local5;
}
} else if (_local4 > _local5) {
_local4 = _local5;
}
_local11.lineTo(_local3, _local4);
_local10.lineTo(_local3, _local4);
_local7++;
} while (_local7 <= 100);
_local11.onEnterFrame = function () {
this._alpha = this._alpha - 11;
if (this._alpha <= 0) {
removeMovieClip(this);
}
};
_local10.onEnterFrame = function () {
this._alpha = this._alpha - 34;
if (this._alpha <= 0) {
removeMovieClip(this);
}
};
};
}
if (_root.beenToMenu) {
gotoAndPlay ("cut");
} else {
_root.beenToMenu = true;
}
Symbol 280 MovieClip Frame 6
_root.startSound("wish", 1);
Symbol 280 MovieClip Frame 26
_root.startSound("wish", 1);
Symbol 280 MovieClip Frame 72
_root.startSound("superShot", 1);
Symbol 280 MovieClip Frame 83
menuGraphics();
Symbol 280 MovieClip Frame 84
_root.startSound("energyUp", 1);
Symbol 280 MovieClip Frame 122
function setTitleColor() {
titleColor = {ra:Math.random() * 100, rb:Math.random() * 255, ga:Math.random() * 100, gb:Math.random() * 255, ba:Math.random() * 100, bb:Math.random() * 255, aa:100, ab:0};
titleTint.setTransform(titleColor);
}
menuGraphics();
s1.shading.gotoAndStop(95);
s2.shading.gotoAndStop(5);
if (_root.currentSong != "menu") {
_root.currentSong = "menu";
_root.music.stop();
_root.music.attachSound("seg7");
_root.music.start(0, 9999);
_root.musicVolume = _root.maxMusicVolume;
_root.adjustMusic();
_root.startSound("boom", 1);
}
titleTint = new Color(title_mc.u.dots);
titleInterval = setInterval(setTitleColor, 200);
this.onUnload = function () {
clearInterval(titleInterval);
};
Symbol 280 MovieClip Frame 146
_root.startSound("uberPool", 1);
Symbol 280 MovieClip Frame 179
stop();
gotoName = "menu";
Symbol 280 MovieClip Frame 180
delete this.onEnterFrame;
Symbol 280 MovieClip Frame 202
_root.gotoAndStop(gotoName);
Symbol 284 Button
on (release) {
_root.gotoAndStop("menu");
}
Symbol 290 Button
on (release) {
getURL ("http://www.iconian.com/", "_blank");
}
Symbol 294 Button
on (release) {
getURL ("http://blackgoldfish.com/", "_blank");
}
Symbol 297 Button
on (release) {
getURL ("http://mrjiggmin.com/", "_blank");
}
Symbol 299 MovieClip Frame 12
stop();
Symbol 308 MovieClip Frame 11
stop();
Symbol 328 MovieClip Frame 1
stop();
Symbol 354 MovieClip Frame 1
this.onEnterFrame = function () {
m = this.attachMovie("fire_mc", "fire" + this.getNextHighestDepth(), this.getNextHighestDepth());
m._rotation = Math.random() * 360;
m._xscale = (m._yscale = (Math.random() * 50) + 10);
m._alpha = (Math.random() * 50) + 50;
m.rotInc = (Math.random() * 20) - 10;
m.onEnterFrame = function () {
this._rotation = this._rotation + this.rotInc;
};
};
Symbol 361 MovieClip Frame 1
stop();
bob.rot = (Math.random() * 10) - 5;
if (bob.rot > 0) {
bob.rot = bob.rot + 1;
} else {
bob.rot = bob.rot - 1;
}
bob.rot2 = (Math.random() * 10) - 5;
bob.rot3 = (Math.random() * 10) - 5;
bob.onEnterFrame = function () {
this._rotation = this._rotation + this.rot;
this.bg1._rotation = this.bg1._rotation + this.rot1;
this.bg2._rotation = this.bg2._rotation + this.rot2;
};
Symbol 364 Button
on (release) {
getURL ("http://www.dragongamez.com", "_blank");
}
Symbol 365 MovieClip Frame 1
stop();
Symbol 365 MovieClip Frame 4
_root.createCueBall();
Symbol 365 MovieClip Frame 27
_root.stick._visible = true;
_root.shadows.ss._visible = true;
_root.stick._x = 0;
_root.stick._y = 530;
_root.ballMouse._visible = false;
_root.placingBall = false;
Symbol 373 MovieClip Frame 1
this.onEnterFrame = function () {
gotoAndStop(_root.qualityLevel);
};
Symbol 375 Button
on (release) {
if (_root.qualityLevel == "LOW") {
_root.qualityLevel = "MEDIUM";
} else if (_root.qualityLevel == "MEDIUM") {
_root.qualityLevel = "HIGH";
} else {
_root.qualityLevel = "LOW";
}
_quality = _root.qualityLevel;
}
Symbol 382 MovieClip Frame 1
function moveSlider() {
slider._x = _xmouse;
if (slider._x > (sliderWidth + xSlider)) {
slider._x = sliderWidth + xSlider;
}
if (slider._x < xSlider) {
slider._x = xSlider;
}
_root.soundVolume = (slider._x - 5) * (1 / (sliderWidth / 100));
_root.soundFX.setVolume(_root.soundVolume);
}
stop();
dud._visible = false;
this.hitArea = dud;
sliderWidth = 150;
xSlider = 5;
onDragOver = (onRollOver = function () {
gotoAndStop ("on");
});
onRollOut = function () {
gotoAndStop ("off");
};
onDragOut = function () {
onMouseUp = function () {
gotoAndStop ("off");
delete slider.onEnterFrame;
delete onMouseUp;
};
};
onPress = function () {
moveSlider();
slider.onEnterFrame = function () {
moveSlider();
};
onMouseUp = function () {
delete slider.onEnterFrame;
};
};
Symbol 382 MovieClip Frame 2
stop();
slider._x = ((_root.soundVolume * sliderWidth) / 100) + xSlider;
Symbol 384 MovieClip Frame 1
function moveSlider() {
slider._x = _xmouse;
if (slider._x > (sliderWidth + xSlider)) {
slider._x = sliderWidth + xSlider;
}
if (slider._x < xSlider) {
slider._x = xSlider;
}
_root.musicVolume = (_root.maxMusicVolume = (slider._x - 5) * (1 / (sliderWidth / 100)));
}
stop();
dud._visible = false;
this.hitArea = dud;
sliderWidth = 150;
xSlider = 5;
onDragOver = (onRollOver = function () {
gotoAndStop ("on");
});
onRollOut = function () {
gotoAndStop ("off");
};
onDragOut = function () {
onMouseUp = function () {
gotoAndStop ("off");
delete slider.onEnterFrame;
delete onMouseUp;
};
};
onPress = function () {
moveSlider();
slider.onEnterFrame = function () {
moveSlider();
};
onMouseUp = function () {
delete slider.onEnterFrame;
};
};
Symbol 384 MovieClip Frame 2
stop();
slider._x = (_root.maxMusicVolume * (sliderWidth / 100)) + xSlider;
Symbol 387 Button
on (release) {
_root.gotoAndPlay("reset");
}
Symbol 390 Button
on (release) {
_root.gotoAndStop("gameOver");
}
Symbol 393 Button
on (release) {
_root.pauseGame();
}
Symbol 394 MovieClip Frame 1
stop();
Symbol 402 Button
on (release) {
_root.gotoAndStop("game");
}
Symbol 406 MovieClip Frame 11
_root.startSound("boom", 1);
scoreBox.text = "your score: " + _root.score;
dist = _root.pythag(Stage.height, Stage.width) / 2;
this.onEnterFrame = function () {
x1 = xCenter;
y1 = yCenter;
var _local12 = (Math.random() * 360) * _root.DEG_RAD;
var _local13 = (Math.random() * 360) * _root.DEG_RAD;
var x1 = (Math.cos(_local12) * dist);
var y1 = (Math.sin(_local12) * dist);
var _local6 = Math.cos(_local13) * dist;
var _local5 = Math.sin(_local13) * dist;
var _local9 = x1 - _local6;
var _local8 = y1 - _local5;
var _local11 = lightning.createEmptyMovieClip("bolt" + lightning.getNextHighestDepth(), lightning.getNextHighestDepth());
_local11.lineStyle(4, 16777215, 20);
_local11.moveTo(x1, y1);
var _local10 = lightning.createEmptyMovieClip("bolt" + lightning.getNextHighestDepth(), lightning.getNextHighestDepth());
_local10.lineStyle(1, 16773231, 50);
_local10.moveTo(x1, y1);
var _local3 = x1;
var _local4 = y1;
var _local7 = 0;
do {
if (!((_local3 != _local6) || (_local4 != _local5))) {
break;
}
_local3 = _local3 - ((Math.random() * _local9) / 5);
_local4 = _local4 - ((Math.random() * _local8) / 5);
if (_local9 > 0) {
if (_local3 < _local6) {
_local3 = _local6;
}
} else if (_local3 > _local6) {
_local3 = _local6;
}
if (_local8 > 0) {
if (_local4 < _local5) {
_local4 = _local5;
}
} else if (_local4 > _local5) {
_local4 = _local5;
}
_local11.lineTo(_local3, _local4);
_local10.lineTo(_local3, _local4);
_local7++;
} while (_local7 <= 100);
_local11.onEnterFrame = function () {
this._alpha = this._alpha - 11;
if (this._alpha <= 0) {
removeMovieClip(this);
}
};
_local10.onEnterFrame = function () {
this._alpha = this._alpha - 34;
if (this._alpha <= 0) {
removeMovieClip(this);
}
};
};
Symbol 406 MovieClip Frame 42
stop();
_root.voiceFX.attachSound("gameOver_voice");
_root.voiceFX.setVolume(_root.soundVolume * 0.5);
_root.voiceFX.start(0, 1);