Instance of Symbol 31 MovieClip "vPoint" in Frame 11
onClipEvent (load) {
}
Instance of Symbol 33 MovieClip in Frame 11
/* no clip actions */
Instance of Symbol 42 MovieClip "pin7" in Frame 11
onClipEvent (load) {
function initPin() {
var _local1 = this;
_local1.hitAngle = 0;
_local1.hitRot = _parent.scripts.randomIn(-20, 20);
_local1.hitUp = _parent.scripts.randomIn(-30, -45);
_local1._x = startX;
_local1._y = startY;
_local1._rotation = 0;
_local1._alpha = 100;
_local1._visible = true;
_local1.Hit = false;
_local1.active = true;
}
function hitMe() {
var _local1 = this;
_local1.active = false;
_local1._rotation = _local1.hitAngle;
_local1.hit = true;
}
startX = this._x;
startY = this._y;
pinNum = 7;
initPin();
}
onClipEvent (enterFrame) {
if (_parent.scripts.pinsActive) {
if (this.hitTest(_parent.sonic._x, _parent.sonic._y, true)) {
_parent.scripts.pinHit(pinNum, _parent.sonic.spinVal);
}
}
if (hit) {
this.hitUp = this.hitUp + 3;
this._y = this._y + this.hitUp;
this._rotation = this._rotation + hitRot;
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
this.hit = false;
this._visible = true;
this._alpha = 100;
this._x = 1500;
}
}
}
Instance of Symbol 42 MovieClip "pin8" in Frame 11
onClipEvent (load) {
function initPin() {
var _local1 = this;
_local1.hitAngle = 0;
_local1.hitRot = _parent.scripts.randomIn(-20, 20);
_local1.hitUp = _parent.scripts.randomIn(-30, -45);
_local1._x = startX;
_local1._y = startY;
_local1._rotation = 0;
_local1._alpha = 100;
_local1._visible = true;
_local1.Hit = false;
_local1.active = true;
}
function hitMe() {
var _local1 = this;
_local1.active = false;
_local1._rotation = _local1.hitAngle;
_local1.hit = true;
}
startX = this._x;
startY = this._y;
pinNum = 8;
initPin();
}
onClipEvent (enterFrame) {
if (_parent.scripts.pinsActive) {
if (this.hitTest(_parent.sonic._x, _parent.sonic._y, true)) {
_parent.scripts.pinHit(pinNum, _parent.sonic.spinVal);
}
}
if (hit) {
this.hitUp = this.hitUp + 3;
this._y = this._y + this.hitUp;
this._rotation = this._rotation + hitRot;
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
this.hit = false;
this._visible = true;
this._alpha = 100;
this._x = 1500;
}
}
}
Instance of Symbol 42 MovieClip "pin9" in Frame 11
onClipEvent (load) {
function initPin() {
var _local1 = this;
_local1.hitAngle = 0;
_local1.hitRot = _parent.scripts.randomIn(-20, 20);
_local1.hitUp = _parent.scripts.randomIn(-30, -45);
_local1._x = startX;
_local1._y = startY;
_local1._rotation = 0;
_local1._alpha = 100;
_local1._visible = true;
_local1.Hit = false;
_local1.active = true;
}
function hitMe() {
var _local1 = this;
_local1.active = false;
_local1._rotation = _local1.hitAngle;
_local1.hit = true;
}
startX = this._x;
startY = this._y;
pinNum = 9;
initPin();
}
onClipEvent (enterFrame) {
if (_parent.scripts.pinsActive) {
if (this.hitTest(_parent.sonic._x, _parent.sonic._y, true)) {
_parent.scripts.pinHit(pinNum, _parent.sonic.spinVal);
}
}
if (hit) {
this.hitUp = this.hitUp + 3;
this._y = this._y + this.hitUp;
this._rotation = this._rotation + hitRot;
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
this.hit = false;
this._visible = true;
this._alpha = 100;
this._x = 1500;
}
}
}
Instance of Symbol 42 MovieClip "pin10" in Frame 11
onClipEvent (load) {
function initPin() {
var _local1 = this;
_local1.hitAngle = 0;
_local1.hitRot = _parent.scripts.randomIn(-20, 20);
_local1.hitUp = _parent.scripts.randomIn(-30, -45);
_local1._x = startX;
_local1._y = startY;
_local1._rotation = 0;
_local1._alpha = 100;
_local1._visible = true;
_local1.Hit = false;
_local1.active = true;
}
function hitMe() {
var _local1 = this;
_local1.active = false;
_local1._rotation = _local1.hitAngle;
_local1.hit = true;
}
startX = this._x;
startY = this._y;
pinNum = 10;
initPin();
}
onClipEvent (enterFrame) {
if (_parent.scripts.pinsActive) {
if (this.hitTest(_parent.sonic._x, _parent.sonic._y, true)) {
_parent.scripts.pinHit(pinNum, _parent.sonic.spinVal);
}
}
if (hit) {
this.hitUp = this.hitUp + 3;
this._y = this._y + this.hitUp;
this._rotation = this._rotation + hitRot;
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
this.hit = false;
this._visible = true;
this._alpha = 100;
this._x = 1500;
}
}
}
Instance of Symbol 42 MovieClip "pin4" in Frame 11
onClipEvent (load) {
function initPin() {
var _local1 = this;
_local1.hitAngle = 0;
_local1.hitRot = _parent.scripts.randomIn(-20, 20);
_local1.hitUp = _parent.scripts.randomIn(-30, -45);
_local1._x = startX;
_local1._y = startY;
_local1._rotation = 0;
_local1._alpha = 100;
_local1._visible = true;
_local1.Hit = false;
_local1.active = true;
}
function hitMe() {
var _local1 = this;
_local1.active = false;
_local1._rotation = _local1.hitAngle;
_local1.hit = true;
}
startX = this._x;
startY = this._y;
pinNum = 4;
initPin();
}
onClipEvent (enterFrame) {
if (_parent.scripts.pinsActive) {
if (this.hitTest(_parent.sonic._x, _parent.sonic._y, true)) {
_parent.scripts.pinHit(pinNum, _parent.sonic.spinVal);
}
}
if (hit) {
this.hitUp = this.hitUp + 3;
this._y = this._y + this.hitUp;
this._rotation = this._rotation + hitRot;
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
this.hit = false;
this._visible = true;
this._alpha = 100;
this._x = 1500;
}
}
}
Instance of Symbol 42 MovieClip "pin5" in Frame 11
onClipEvent (load) {
function initPin() {
var _local1 = this;
_local1.hitAngle = 0;
_local1.hitRot = _parent.scripts.randomIn(-20, 20);
_local1.hitUp = _parent.scripts.randomIn(-30, -45);
_local1._x = startX;
_local1._y = startY;
_local1._rotation = 0;
_local1._alpha = 100;
_local1._visible = true;
_local1.Hit = false;
_local1.active = true;
}
function hitMe() {
var _local1 = this;
_local1.active = false;
_local1._rotation = _local1.hitAngle;
_local1.hit = true;
}
startX = this._x;
startY = this._y;
pinNum = 5;
initPin();
}
onClipEvent (enterFrame) {
if (_parent.scripts.pinsActive) {
if (this.hitTest(_parent.sonic._x, _parent.sonic._y, true)) {
_parent.scripts.pinHit(pinNum, _parent.sonic.spinVal);
}
}
if (hit) {
this.hitUp = this.hitUp + 3;
this._y = this._y + this.hitUp;
this._rotation = this._rotation + hitRot;
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
this.hit = false;
this._visible = true;
this._alpha = 100;
this._x = 1500;
}
}
}
Instance of Symbol 42 MovieClip "pin6" in Frame 11
onClipEvent (load) {
function initPin() {
var _local1 = this;
_local1.hitAngle = 0;
_local1.hitRot = _parent.scripts.randomIn(-20, 20);
_local1.hitUp = _parent.scripts.randomIn(-30, -45);
_local1._x = startX;
_local1._y = startY;
_local1._rotation = 0;
_local1._alpha = 100;
_local1._visible = true;
_local1.Hit = false;
_local1.active = true;
}
function hitMe() {
var _local1 = this;
_local1.active = false;
_local1._rotation = _local1.hitAngle;
_local1.hit = true;
}
startX = this._x;
startY = this._y;
pinNum = 6;
initPin();
}
onClipEvent (enterFrame) {
if (_parent.scripts.pinsActive) {
if (this.hitTest(_parent.sonic._x, _parent.sonic._y, true)) {
_parent.scripts.pinHit(pinNum, _parent.sonic.spinVal);
}
}
if (hit) {
this.hitUp = this.hitUp + 3;
this._y = this._y + this.hitUp;
this._rotation = this._rotation + hitRot;
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
this.hit = false;
this._visible = true;
this._alpha = 100;
this._x = 1500;
}
}
}
Instance of Symbol 42 MovieClip "pin2" in Frame 11
onClipEvent (load) {
function initPin() {
var _local1 = this;
_local1.hitAngle = 0;
_local1.hitRot = _parent.scripts.randomIn(-20, 20);
_local1.hitUp = _parent.scripts.randomIn(-30, -45);
_local1._x = startX;
_local1._y = startY;
_local1._rotation = 0;
_local1._alpha = 100;
_local1._visible = true;
_local1.Hit = false;
_local1.active = true;
}
function hitMe() {
var _local1 = this;
_local1.active = false;
_local1._rotation = _local1.hitAngle;
_local1.hit = true;
}
startX = this._x;
startY = this._y;
pinNum = 2;
initPin();
}
onClipEvent (enterFrame) {
if (_parent.scripts.pinsActive) {
if (this.hitTest(_parent.sonic._x, _parent.sonic._y, true)) {
_parent.scripts.pinHit(pinNum, _parent.sonic.spinVal);
}
}
if (hit) {
this.hitUp = this.hitUp + 3;
this._y = this._y + this.hitUp;
this._rotation = this._rotation + hitRot;
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
this.hit = false;
this._visible = true;
this._alpha = 100;
this._x = 1500;
}
}
}
Instance of Symbol 42 MovieClip "pin3" in Frame 11
onClipEvent (load) {
function initPin() {
var _local1 = this;
_local1.hitAngle = 0;
_local1.hitRot = _parent.scripts.randomIn(-20, 20);
_local1.hitUp = _parent.scripts.randomIn(-30, -45);
_local1._x = startX;
_local1._y = startY;
_local1._rotation = 0;
_local1._alpha = 100;
_local1._visible = true;
_local1.Hit = false;
_local1.active = true;
}
function hitMe() {
var _local1 = this;
_local1.active = false;
_local1._rotation = _local1.hitAngle;
_local1.hit = true;
}
startX = this._x;
startY = this._y;
pinNum = 3;
initPin();
}
onClipEvent (enterFrame) {
if (_parent.scripts.pinsActive) {
if (this.hitTest(_parent.sonic._x, _parent.sonic._y, true)) {
_parent.scripts.pinHit(pinNum, _parent.sonic.spinVal);
}
}
if (hit) {
this.hitUp = this.hitUp + 3;
this._y = this._y + this.hitUp;
this._rotation = this._rotation + hitRot;
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
this.hit = false;
this._visible = true;
this._alpha = 100;
this._x = 1500;
}
}
}
Instance of Symbol 42 MovieClip "pin1" in Frame 11
onClipEvent (load) {
function initPin() {
var _local1 = this;
_local1.hitAngle = 0;
_local1.hitRot = _parent.scripts.randomIn(-20, 20);
_local1.hitUp = _parent.scripts.randomIn(-5, -10);
_local1._x = startX;
_local1._y = startY;
_local1._rotation = 0;
_local1._alpha = 100;
_local1._visible = true;
_local1.Hit = false;
_local1.active = true;
}
function hitMe() {
var _local1 = this;
_local1.active = false;
_local1._rotation = _local1.hitAngle;
_local1.hit = true;
}
startX = this._x;
startY = this._y;
pinNum = 1;
gravity = 1;
initPin();
}
onClipEvent (enterFrame) {
if (_parent.scripts.pinsActive) {
if (this.hitTest(_parent.sonic._x, _parent.sonic._y, true)) {
_parent.scripts.pinHit(pinNum, _parent.sonic.spinVal);
}
}
if (hit) {
this.hitUp = this.hitUp + gravity;
this._y = this._y + this.hitUp;
this._rotation = this._rotation + hitRot;
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
this.hit = false;
this._visible = true;
this._alpha = 100;
this._x = 1500;
}
}
}
Instance of Symbol 56 MovieClip "scripts" in Frame 11
onClipEvent (load) {
function randomIn(lowerbound, upperbound) {
return(Math.round(((upperbound - lowerbound) * Math.random()) + lowerbound));
}
function initGame() {
frameNum = 1;
ballNum = 1;
score = 0;
totalscore = 0;
bonus = 0;
totalBonus = 0;
}
function scoreMe(pins) {
var _local1 = _parent;
var _local2 = pins;
var _local3 = _root;
pinreset = false;
if (ballNum == 1) {
frameScore = _local2;
if (_local2 == 10) {
_local1.scoreComment.comment = "Strike! <BR>Frame Total: " + _local1.strikeVal;
score = score + _local1.strikeVal;
if (frameNum < 10) {
frameNum++;
ball1Score = 0;
ballNum = 1;
} else {
gameOver = true;
}
pinReset = true;
} else {
_local1.scoreComment.comment = (_local2 + " pins, <BR>Spare will be worth ") + _local1.spareVal;
ball1Score = _local2;
ballNum++;
pinReset = false;
}
} else if (ballNum == 2) {
frameScore = ball1Score + _local2;
if (frameScore == 10) {
_local3.scoreComment.comment = "Spare! <BR>Frame Total: " + _local1.spareVal;
score = score + _local1.spareVal;
} else {
_local3.scoreComment.comment = (("Picked up " + _local2) + "<BR>Frame Total: ") + framescore;
score = score + frameScore;
}
if (frameNum < 10) {
frameNum++;
ball1Score = 0;
ballNum = 1;
} else {
gameOver = true;
}
pinReset = true;
if (_local2 == 0) {
_local3.scoreComment.comment = "Nuthin..<BR>Frame Total: " + framescore;
}
}
_local1.gotoAndPlay("scoreDisplay");
}
function resetPins() {
pinsActive = true;
i = 0;
while (i < pinArray.length) {
eval ("_parent." + pinArray[i]).initPin();
i++;
}
_parent.flasher.gotoAndPlay(1);
_parent.strikeVal = 0;
_parent.spareVal = 0;
}
function pinHit(myPin, ballSpin) {
if (_parent.sonic.hitAble) {
_parent.sonic.hide();
pinCount = 0;
p1 = new Array(100, 90, 90, 80, 80, 80, 70, 70, 70, 70);
p2 = new Array(90, 100, 90, 90, 90, 80, 80, 80, 70, 70);
p3 = new Array(90, 90, 100, 80, 90, 90, 70, 70, 80, 80);
p4 = new Array(80, 90, 80, 100, 90, 80, 90, 80, 70, 70);
p5 = new Array(80, 90, 90, 90, 100, 90, 80, 90, 90, 80);
p6 = new Array(80, 80, 90, 80, 90, 100, 70, 80, 90, 90);
p7 = new Array(50, 70, 60, 90, 80, 70, 100, 90, 80, 70);
p8 = new Array(70, 80, 70, 90, 90, 80, 90, 100, 90, 80);
p9 = new Array(70, 70, 80, 80, 90, 90, 80, 90, 100, 90);
p10 = new Array(50, 60, 70, 60, 80, 90, 70, 80, 90, 100);
switch (myPin) {
case 1 :
proxArray = p1;
break;
case 2 :
proxArray = p2;
break;
case 3 :
proxArray = p3;
break;
case 4 :
proxArray = p4;
break;
case 5 :
proxArray = p5;
break;
case 6 :
proxArray = p6;
break;
case 7 :
proxArray = p7;
break;
case 8 :
proxArray = p8;
break;
case 9 :
proxArray = p9;
break;
case 10 :
proxArray = p10;
break;
default :
proxArray = p1;
}
spinAdjust = 2.8;
i = 0;
while (i < 10) {
prox = proxArray[i];
spinAdd = spinAdjust * Math.abs(ballSpin);
myOdds = prox + spinAdd;
tOdds = randomIn(1, 100);
if (tOdds <= myOdds) {
myHit = true;
} else {
myHit = false;
}
if (tOdds <= myOdds) {
pinName = "_parent." + pinArray[i];
if (eval (pinName).active) {
eval (pinName).hitMe();
pinCount++;
}
}
i++;
}
if (pinCount == 10) {
strikePinSound.start();
}
if ((pinCount > 3) && (pinCount < 10)) {
bigPinSound.start();
}
if (pinCount <= 3) {
pinSound.start();
}
scoreMe(pinCount);
}
}
rollSound = new Sound();
pinSound = new Sound();
bigPinSound = new Sound();
strikePinSound = new Sound();
gutterSound = new Sound();
rollSound.attachSound("roll");
pinSound.attachSound("fewPins");
bigPinSound.attachSound("lottopins");
strikePinSound.attachSound("strikePins");
gutterSound.attachSound("Clunker");
pinArray = new Array("pin1", "pin2", "pin3", "pin4", "pin5", "pin6", "pin7", "pin8", "pin9", "pin10");
resetPins();
}
Frame 12
scripts.initGame();
Frame 31
Instance of Symbol 75 MovieClip "sonic" in Frame 31
onClipEvent (load) {
function initBall() {
var _local1 = this;
_local1.gotoAndPlay(1);
_local1.slaved = true;
_local1.released = false;
_local1.startY = 364;
_local1.startX = _parent.vPoint._x;
_local1.spinVal = 0;
_local1._xscale = 100;
_local1._yscale = 100;
_local1.deltaY = -5;
_local1._x = _local1.startX;
_local1._y = _local1.startY;
_local1.active = true;
_local1.hitAble = true;
_parent.scripts.pinsactive = true;
}
function hide() {
var _local1 = this;
_local1.active = false;
_parent.scripts.rollSound.stop();
_local1.released = false;
_local1._x = 1000;
}
function doPerspective() {
var _local1 = this;
var _local2 = _parent;
horizonV = _local2.vPoint._y;
horizonH = _local2.vPoint._x;
foreGround = _local1.startY - horizonV;
_local1.depth = foreGround;
newY = _local1._y + _local1.deltaY;
_local1.depth = newY - horizonV;
myScale = (_local1.depth / foreground) * 100;
deltaX = deltaX + spinval;
OffsetH = lastOffsetH + deltaX;
myNewH = horizonH + ((OffsetH * myScale) / 100);
_local1._xscale = myScale;
_local1._yscale = myScale;
_local1._x = myNewH;
_local1._y = newY;
if (_local1.depth <= 0) {
_local1.hide();
_local2.scripts.scoreMe(0);
}
}
initBall();
}
onClipEvent (mouseUp) {
if (this.released == false) {
if (this.active) {
_parent.flasher.stop();
flashFrame = _parent.flasher._currentFrame;
_parent.strikeVal = flashFrame * 200;
_parent.spareVal = flashFrame * 150;
this.spinFrame = spinner._currentFrame;
spinVal = 0;
if (spinFrame == 1) {
spinVal = 0;
}
if ((spinFrame > 1) && (spinFrame <= 10)) {
spinVal = spinFrame * -1;
}
if ((spinFrame > 10) && (spinFrame < 20)) {
spinVal = spinFrame - 20;
}
if (spinFrame == 20) {
spinVal = 0;
}
if ((spinFrame > 20) && (spinFrame <= 30)) {
spinVal = spinFrame - 20;
}
if ((spinFrame > 30) && (spinFrame < 40)) {
spinVal = 40 - spinFrame;
}
if (spinFrame == 40) {
spinVal = 0;
}
horizonV = _parent.vPoint._y;
horizonH = _parent.vPoint._x;
deltaX = spinval;
this.slaved = false;
this.gotoAndPlay("released");
this.released = true;
_parent.scripts.rollsound.start();
myOffsetH = this._x - horizonH;
lastOffsetH = myOffsetH;
trace("myx = " + this._x);
trace("myOffsetH=" + myOffsetH);
trace("lastOffsetH=" + lastOffsetH);
}
}
}
onClipEvent (enterFrame) {
if (this.active) {
if (this.slaved) {
newX = _root._xmouse;
if (newX < 150) {
newX = 150;
}
if (newX > 500) {
newX = 500;
}
this._x = newX;
}
if (this.released) {
doPerspective();
}
}
}
Frame 37
this.stop();
Frame 115
if (scripts.pinReset) {
scripts.resetPins();
}
if (scripts.gameOver) {
this.gotoAndPlay("GameOver");
} else {
this.gotoAndPlay("walkout");
}
Frame 141
this.stop();
Symbol 17 MovieClip Frame 1
fscommand ("allowscale", true);
fscommand ("showmenu", false);
versionString = String(getVersion());
theVersion = substring(versionString, 5, 1);
if (theVersion >= 5) {
gotoAndPlay ("load");
}
Symbol 17 MovieClip Frame 4
this.stop();
Symbol 17 MovieClip Frame 5
loadBarLength = this.loadBar._width;
LOADED = Math.round(_root.getBytesLoaded());
TOTAL = Math.round(_root.getBytesTotal());
PERCENT = LOADED / TOTAL;
this.loadBar._width = PERCENT * loadBarLength;
if (TOTAL < 1) {
TEXT = "0%";
} else {
TEXT = (PERCENT * 100) + "%";
}
this.loadPercent = TEXT;
Symbol 17 MovieClip Frame 9
if (LOADED == TOTAL) {
_root.nextScene();
} else {
this.gotoAndPlay("load");
}
Symbol 27 MovieClip Frame 21
Symbol 45 Button
on (release) {
scripts.resetPins();
}
Symbol 75 MovieClip Frame 4
this.stop();
Symbol 75 MovieClip Frame 9
this.stop();
Symbol 83 Button
on (release) {
_root.gotoAndPlay(1);
}