STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/62693149?noj=FRM62693149-22DC" width="1" height="1"></div>

sgfpool.swf

This is the info page for
Flash #108611

(Click the ID number above for more basic data on this flash file.)


Text
SPONSORED BY:

Clicking on the advertisement above opens the link
in a new window and does not interrupt the game

SFG POOL IS LOADING

WWW.SUGAR-FREE-GAMES.COM

PRESENTS

ENTER NAME:

<p align="center"></p>

Version 1.01

2 PLAYERS

PLAYER 1 NAME:

PLAYER 2 NAME:

INSTRUCTIONS

This is an 8 ball pool game that can be played in multiplayer mode, player against player or against the
computer. Press “8 BALL RULES” button to learn the rules of the game. To strike a ball you need to aim
with your mouse and press and hold the left mouse button until the power is increased to the desired
level. Release the mouse button to strike. There are 2 player boards in the top part of the screen. It’s your
turn when your board is lit. The sign below your name indicates your ball type. If it’s a question mark, the
type is not assigned yet, if it’s a circle with a stripe, your balls are stripes, if it’s a solid circle your balls
are solids and if it’s a black circle you’re striking the 8 ball. The number inside the circle indicates the
number of balls you have pocketed so far.
Multiplayer:
In multiplayer mode you can either join one of the available games or create your own game and wait
until someone joins it. You can accept or reject an opponent when he/she wants to join your game. If you
are a registered user you’ll earn points for defeating other players. Points will be converted to a rank. If
you win a game the number of points you earn is equal to the defeated opponent’s rank. If you lose your
points are not changed.
*Note: If you abandon a multiplayer game you lose 1 point unless the game is delayed by the opponent.
The game is delayed when you wait for the opponent’s strike for 1 minute or more. If you see the
“Delayed” sign above the exit button you can exit without losing any points.

The player’s goal in 8 ball pool is to pocket all balls of the player’s type and the 8 ball
(the black ball with number 8). The 8 ball must be pocketed last. There are 2 types of
balls: solids (balls of one single color) and stripes (white balls with stripes). In the
beginning of the game the types are not assigned. Players can strike balls of any
type until the first ball is pocketed. The type of the first pocketed ball is assigned to
the player who pockets it. The other type goes to the other player. Since this moment
players must pocket only their balls. The first ball touched by the cue ball must be of
the player’s type. Otherwise it’s a fault. When a fault occurs the opponent receives 2
strikes in a row. Apart from touching a wrong ball first, a player faults when he/she
does not touch any balls, pockets a wrong ball or pockets the cue ball. Double strike
is not valid if the player who is meant to receive it goes on the 8 ball or if ball types
are not assigned yet. When the cue ball is pocketed, the opponent will need to place
it somewhere inside the semicircle in the right part of the table. If a player pockets
the 8 ball before all his/her balls are pocketed, this player loses the game
immediately. The same thing occurs if a player pockets the 8 ball when he/she is
supposed to, but makes a fault within the same strike (pockets the cue ball or an
opponent’s ball or touches an opponent’s ball before touching the 8 ball).

8 BALL RULES

SELECT TOURNAMENT

FINAL

SKILL

ACCURACY

PLAYED

WON

0

0

SELECT OPPONENT

Name:

Password:

Remember Name

Remember Password

SIGN IN

LOG IN AS GUEST

*Note: If you login as guest you will not have a rank
and will not be able to track your statistics.
Registration is very easy. All you need to do is to
type a name and a password in "Sign In" section
and press "Register This Name". If the name you
choose is not taken, you will go directly to the game
and will not be asked to do anything else. Playing
this game as a registered user is much more fun.

MULTIPLAYER LOGIN

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

Rank: 999

click for more info

Guest

AVAILABLE GAMES:

PREV PAGE

NEXT PAGE

Rank 99

Points Text

Guest

AAAAAAAAAAAAAAAAAAA

Clck here to see your statistics

WAITING FOR AAAAAAAAAAAAAAAAAAA'S RESPONSE...

YOU'VE BEEN DISCONNECTED FROM THE SERVER

GAME
OFFER

PLAYER'S INFO

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

Last Results:

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAA
AAAAAAA
AAA

SOUND: OFF

MUSIC: OFF

1

?

8

8

DOUBLE

PLACE CUE

EXIT

Created by Dmitry Zheltobriukhov for Sugar-Free-Games.com

Delayed

ARE YOU SURE YOU WANT TO ABANDON THIS GAME?

YOU WILL LOSE 1 POINT IF YOU EXIT NOW.

DEFEAT

AAAAAAAAAAAAAAAAAAA

AAAAAA

YOU ARE THE CHAMPION OF THE WORLD!!!

ActionScript [AS1/AS2]

Frame 1
var CPMStarPoolID = 1580; var CPMStarSubPoolID = 1; System.security.allowDomain("server.cpmstar.com"); AdLoader = new MovieClipLoader(); AdLoader.loadClip((("http://server.cpmstar.com/adviewas2.swf?poolid=" + CPMStarPoolID) + "&subpoolid=") + CPMStarSubPoolID, adBox); adBox._visible = true;
Frame 2
adBox._visible = true; StartTime = new Date();
Frame 3
adBox._visible = true; Rel1 = getBytesLoaded() / getBytesTotal(); Now = new Date(); LoadProgress = AdLoader.getProgress(adBox); Rel2 = LoadProgress.bytesLoaded / LoadProgress.bytesTotal; Rel = Math.min(Rel1, Rel2); Loading.LoadingBar.gotoAndStop(Math.round(Rel * 100) + 1); Loading.PercentageText = Math.round(Rel * 100) + "%"; if (Rel >= 1) { Loading.gotoAndStop(2); }
Frame 4
adBox._visible = true; gotoAndPlay ("Preloader");
Frame 5
function CalcAngle(Xfrom, Yfrom, Xto, Yto) { if ((Xfrom == Xto) and (Yfrom == Yto)) { Angle = 0; } else { XDis = Math.abs(Xto - Xfrom); YDis = Math.abs(Yto - Yfrom); Angle = Math.atan(YDis / XDis); if (Xto > Xfrom) { if (Yto < Yfrom) { Angle = halfPI - Angle; } else { Angle = halfPI + Angle; } } else if (Yto > Yfrom) { Angle = (Math.PI + halfPI) - Angle; } else { Angle = (Math.PI + halfPI) + Angle; } if (Angle < 0) { Angle = Angle + (Math.PI*2); } } return(Angle); } function CalcDistance(Xfrom, Yfrom, Xto, Yto) { xDistance = Math.abs(Xto - Xfrom); yDistance = Math.abs(Yto - Yfrom); LineDistance = Math.sqrt(Math.pow(xDistance, 2) + Math.pow(yDistance, 2)); return(LineDistance); } function NumberFormat(Num, AfterComa) { var _local3 = Math.floor(Num); var _local4 = Math.round((Num - _local3) * Math.pow(10, AfterComa)); var _local1 = _local3.toString(); var _local2 = new Array(); ss = _local1.length - 3; while (ss >= 0) { _local2.unshift(_local1.substr(ss, 3)); ss = ss - 3; } if ((ss < 0) and (ss > -3)) { _local2.unshift(_local1.substr(0, ss + 3)); } _local1 = _local2.join("."); if (AfterComa > 0) { _local1 = _local1 + ("," + _local4); } return(_local1); } function AngleDifference(Angle1, Angle2) { Res = Angle2 - Angle1; while (Res > Math.PI) { Res = Res - dblPI; } while (Res < -3.14159265358979) { Res = Res + dblPI; } return(Res); } function LineHitsLine(Line1, Line2) { var _local1 = new Object(); if (Line1.a == Line2.a) { _local1.x = Infinity; _local1.y = Infinity; } else { if ((Line1.x == undefined) and (Line2.x == undefined)) { if ((Line1.a != 0) and (Line2.a != 0)) { _local1.x = (Line2.b - Line1.b) / (Line1.a - Line2.a); _local1.y = (Line2.a * _local1.x) + Line2.b; } if (Line1.a == 0) { _local1.y = Line1.b; _local1.x = (Line2.b - _local1.y) / (-Line2.a); } if (Line2.a == 0) { _local1.y = Line2.b; _local1.x = (_local1.y - Line1.b) / Line1.a; } } if (Line1.x != undefined) { _local1.x = Line1.x; _local1.y = (Line2.a * _local1.x) + Line2.b; } if (Line2.x != undefined) { _local1.x = Line2.x; _local1.y = (Line1.a * _local1.x) + Line1.b; } } return(_local1); } function co2ab(x1, y1, x2, y2) { var _local1 = new Object(); if (x1 == x2) { _local1.x = x1; } else { _local1.a = (y2 - y1) / (x2 - x1); _local1.b = y1 - (x1 * _local1.a); } return(_local1); } function ang2ab(x, y, Angle) { var _local1 = new Object(); if ((Angle == 0) or (Angle == Math.PI)) { _local1.x = x; } else { _local1.a = 1 / Math.tan(Angle); _local1.b = y - (x * _local1.a); } return(_local1); } function SegmentHitsSegment(l1x1, l1y1, l1x2, l1y2, l2x1, l2y1, l2x2, l2y2) { var _local11; var _local10; var _local1 = LineHitsLine(co2ab(l1x1, l1y1, l1x2, l1y2), co2ab(l2x1, l2y1, l2x2, l2y2)); _local1.x = Math.round(_local1.x * 1000000000) / 1000000000; _local1.y = Math.round(_local1.y * 1000000000) / 1000000000; _local11 = (((_local1.x >= Math.min(l1x1, l1x2)) and (_local1.x <= Math.max(l1x1, l1x2))) and (_local1.y >= Math.min(l1y1, l1y2))) and (_local1.y <= Math.max(l1y1, l1y2)); _local10 = (((_local1.x >= Math.min(l2x1, l2x2)) and (_local1.x <= Math.max(l2x1, l2x2))) and (_local1.y >= Math.min(l2y1, l2y2))) and (_local1.y <= Math.max(l2y1, l2y2)); if ((!_local11) or (!_local10)) { _local1 = null; } return(_local1); } function CreateFormation() { var _local1; var _local2 = new Array(); var _local12 = new Array(); var _local4 = new Array(); var _local6 = new Array(); var _local5; var _local3; var _local7; var _local8; if (Game == 1) { _local1 = 1; while (_local1 <= 7) { _local4[_local1 - 1] = {Num:_local1, Used:false, Type:2}; _local1++; } _local1 = 9; while (_local1 <= 15) { _local4[_local1 - 1] = {Num:_local1, Used:false, Type:1}; _local1++; } if (HasGame or (Mode != 3)) { _local2[11] = 8; _local4[7] = {Num:8, Used:true, Type:3}; _local2[1] = RandomBall(_local4, 2); _local2[5] = RandomBall(_local4, 1); _local1 = 1; while (_local1 <= 15) { if (_local2[_local1] == undefined) { _local2[_local1] = RandomBall(_local4, 0); } _local1++; } if (Mode == 3) { PL = ""; _local1 = 1; while (_local1 <= 15) { PL = PL + ("|" + _local2[_local1]); _local1++; } Con.send("3" + PL); } } if ((Mode == 3) and (!HasGame)) { _local1 = 1; while (_local1 <= 15) { _local2[_local1] = ReceivedPositions[_local1]; _local1++; } } _local8 = -(dblPI / 6); _local1 = 0; while (_local1 <= 4) { _local6[_local1] = {x:FootString + (((Math.sin(_local8) * _local1) * BallRadius) * FormationSpace), y:VerticalMiddle - (((Math.cos(_local8) * _local1) * BallRadius) * FormationSpace)}; _local1++; } _local7 = 5; _local3 = 1; _local5 = 4; _local1 = 0; while (_local1 <= 14) { _local12[_local1] = {Ball:_local2[_local1 + 1], x:_local6[_local5].x, y:_local6[_local5].y + (((_local3 - 1) * BallRadius) * FormationSpace)}; _local3++; if (_local3 > _local7) { _local3 = 1; _local5--; _local7--; } _local1++; } } return(_local12); } function RandomBall(Arr, Type) { var _local5; var _local1; var _local3; _local1 = random(Arr.length); _local3 = 0; while ((Arr[_local1].Used or ((Arr[_local1].Type != Type) and (Type != 0))) and (_local3 < Arr.length)) { _local1++; if (_local1 >= Arr.length) { _local1 = _local1 - Arr.length; } _local3++; } Arr[_local1].Used = true; return(Arr[_local1].Num); } function BallsHit(a, c, b, d, e, g, f, h, Distance, AllowNegative) { var _local1; var _local2; var _local5; var _local3; var _local7; var _local6; var _local4; _local1 = Math.pow(b - f, 2) + Math.pow(d - h, 2); _local2 = ((2 * (b - f)) * (a - e)) + ((2 * (d - h)) * (c - g)); _local5 = (Math.pow(a - e, 2) + Math.pow(c - g, 2)) - Math.pow(Distance, 2); _local3 = Math.pow(_local2, 2) - ((4 * _local1) * _local5); if (_local1 != 0) { if (_local3 > 0) { _local7 = ((-_local2) + Math.sqrt(_local3)) / (2 * _local1); _local6 = ((-_local2) - Math.sqrt(_local3)) / (2 * _local1); _local4 = Math.min(_local7, _local6); } if (_local3 == 0) { _local4 = (-_local2) / (2 * _local1); } } return(_local4); } function SwitchPlayers() { if (SO.data.SoundOn and (!MuteSounds)) { if ((Fault == 0) or (Fault == 4)) { SwitchPlayerSound.start(); } MuteSounds = false; } YourTurn = !YourTurn; if (YourTurn) { Player = Players[1]; Opponent = Players[2]; } else { Opponent = Players[1]; Player = Players[2]; } OpponentPhase = 0; } function CheckBallType(Num) { if ((Num > 0) and (Num < 8)) { return(2); } if (Num > 8) { return(1); } if (Num == 0) { return(0); } if (Num == 8) { return(3); } } function EndGame(WinLose) { if (WinLose == 1) { trace(Player.Name + " Wins"); Winner = Player; } if (WinLose == 2) { trace(Opponent.Name + " Wins"); Winner = Opponent; } if ((Mode == 2) and (Winner == Players[1])) { SO.data.CPUPlayers[SelectedOpponent].Won++; SO.flush(); } if (Mode == 3) { if (Winner == Players[1]) { Con.send("A"); } else { Con.send("B"); } } Mouse.show(); gotoAndStop ("GameEnd"); } function PlaceCueBall(X, Y) { switch (PlaceCue) { case 0 : RemoveBall.removeMovieClip(); RemoveShadow.removeMovieClip(); NewCueBall = AddBall(0, HeadString, VerticalMiddle); CueBall = Balls[NewCueBall]; PlaceCue = 1; case 1 : if (X < HeadString) { CueX = HeadString; CueY = Y; if (CueY < (VerticalMiddle - HeadRadius)) { CueY = VerticalMiddle - HeadRadius; } if (CueY > (VerticalMiddle + HeadRadius)) { CueY = VerticalMiddle + HeadRadius; } } else { Angle = CalcAngle(HeadString, VerticalMiddle, X, Y); Distance = CalcDistance(HeadString, VerticalMiddle, X, Y); if (Distance > HeadRadius) { Distance = HeadRadius; } CueX = HeadString + (Math.sin(Angle) * Distance); CueY = VerticalMiddle - (Math.cos(Angle) * Distance); } Angle = CalcAngle(HeadString, VerticalMiddle, CueX, CueY); Distance = CalcDistance(HeadString, VerticalMiddle, CueX, CueY); NowMoving = 1; Steps = 0; StartDistance = Distance; do { CueX = HeadString + (Math.sin(Angle) * Distance); CueY = VerticalMiddle - (Math.cos(Angle) * Distance); HitsAnotherBall = false; for (b in Balls) { if ((b != NewCueBall) and (CalcDistance(Balls[b].x, Balls[b].y, CueX, CueY) < BallDiameter)) { HitsAnotherBall = true; Steps++; Distance = StartDistance + ((Steps * BallRadius) * NowMoving); if (NowMoving == 1) { NowMoving = -1; } else { NowMoving = 1; } break; } } } while (HitsAnotherBall); CueBall.Shadow._x = (CueBall.Symbol._x = (CueBall.x = CueX)); CueBall.Shadow._y = (CueBall.Symbol._y = (CueBall.y = CueY)); } } function UpdateBoards() { if (YourTurn) { PB1.gotoAndStop(2); PB2.gotoAndStop(1); } else { PB1.gotoAndStop(1); PB2.gotoAndStop(2); } BS1.gotoAndStop(Players[1].BallType + 1); BS2.gotoAndStop(Players[2].BallType + 1); BS1.Num = Players[1].PocketedBalls; BS2.Num = Players[2].PocketedBalls; ST1._visible = false; ST2._visible = false; PC1._visible = false; PC2._visible = false; if (HitTwice) { if (YourTurn) { ST1._visible = true; } else { ST2._visible = true; } } if (CueBallPocketed) { if (YourTurn) { PC1._visible = true; } else { PC2._visible = true; } } } function GenerateBlocked(Ball) { var _local2; var _local12; var _local3; var _local5; var _local7; var _local6; var _local8; var _local10; var _local4; Ball.Blocked = new Array(); for (_local2 in Balls) { if (Balls[_local2] != Ball) { _local3 = CalcAngle(Ball.x, Ball.y, Balls[_local2].x, Balls[_local2].y); _local5 = _local3 - halfPI; _local7 = Balls[_local2].x + (Math.sin(_local5) * BallDiameter); _local6 = Balls[_local2].y - (Math.cos(_local5) * BallDiameter); _local8 = CalcAngle(Ball.x, Ball.y, _local7, _local6); _local10 = CalcDistance(Ball.x, Ball.y, _local7, _local6); _local4 = AngleDifference(_local3, _local8); Ball.Blocked.push({Distance:_local10, Start:_local3 + _local4, End:_local3 - _local4}); } } } function AngleFallsBetween(Angle, Start, End) { while (Start > End) { Start = Start - dblPI; } while (Angle >= dblPI) { Angle = Angle - dblPI; } if (Angle < Start) { while (Angle < Start) { Angle = Angle + dblPI; } return(Angle <= End); } if (Angle > End) { while (Angle > End) { Angle = Angle - dblPI; } return(Angle >= Start); } return(true); } function MakeSimilar(Angle, SimilarTo) { while ((Angle - SimilarTo) > dblPI) { Angle = Angle - dblPI; } while ((SimilarTo - Angle) > dblPI) { Angle = Angle + dblPI; } return(Angle); } function BorderReflection(TheBorder, SourceX, SourceY, TargetX, TargetY) { var _local4 = co2ab(TheBorder.StartX, TheBorder.StartY, TheBorder.EndX, TheBorder.EndY); var _local1 = LineHitsLine(ang2ab(SourceX, SourceY, TheBorder.Angle), _local4); var _local5 = CalcDistance(SourceX, SourceY, _local1.x, _local1.y); var _local3 = LineHitsLine(ang2ab(TargetX, TargetY, TheBorder.Angle), _local4); var _local7 = CalcDistance(TargetX, TargetY, _local3.x, _local3.y); var _local6 = _local5 / (_local7 + _local5); var _local8 = _local1.x + ((_local3.x - _local1.x) * _local6); var _local9 = _local1.y + ((_local3.y - _local1.y) * _local6); var _local10 = {x:_local8, y:_local9}; return(_local10); } function BlockedReflection(Border, Start, End) { if ((((Border == Borders[0]) or (Border == Borders[1])) or (Border == LongBorders[0])) and (Start.x < End.x)) { return(true); } if ((Border == Borders[2]) and (Start.y < End.y)) { return(true); } if ((((Border == Borders[3]) or (Border == Borders[4])) or (Border == LongBorders[1])) and (Start.x > End.x)) { return(true); } if ((Border == Borders[5]) and (Start.y > End.y)) { return(true); } return(false); } function Physics(Balls, Simulation) { var _local18; for (b in Balls) { Balls[b].FullMoveX = (Balls[b].MoveX = Math.sin(Balls[b].Angle) * Balls[b].Speed); Balls[b].FullMoveY = (Balls[b].MoveY = -(Math.cos(Balls[b].Angle) * Balls[b].Speed)); Balls[b].InitX = Balls[b].x; Balls[b].InitY = Balls[b].y; Balls[b].WasHit = 0; Balls[b].Affected = true; } PrevProgress = (Progress = 0); Hits = new Array(); do { for (h in Hits) { Hits[h].Distance = ((PrevProgress + (Hits[h].Distance * (1 - PrevProgress))) - Progress) / (1 - Progress); } PrevProgress = Progress; b = 0; while (b < (Balls.length - 1)) { bb = b + 1; while (bb < Balls.length) { if (Balls[b].Affected or Balls[bb].Affected) { Hitting = BallsHit(Balls[b].x, Balls[b].y, Balls[b].MoveX, Balls[b].MoveY, Balls[bb].x, Balls[bb].y, Balls[bb].MoveX, Balls[bb].MoveY, BallDiameter, false); if (((Hitting != undefined) and (Hitting >= 0)) and (Hitting <= 1)) { Hits.push({Ball1:b, Ball2:bb, Distance:Hitting, Type:1}); } } bb++; } b++; } for (b in Balls) { if (Balls[b].Affected) { for (br in Borders) { if (Math.abs(AngleDifference(Balls[b].Angle, Borders[br].Angle)) > halfPI) { HitBorder = SegmentHitsSegment(Borders[br].StartX, Borders[br].StartY, Borders[br].EndX, Borders[br].EndY, Balls[b].x, Balls[b].y, Balls[b].x + Balls[b].MoveX, Balls[b].y + Balls[b].MoveY); if (HitBorder != null) { FullDist = (1 - Progress) * Balls[b].Speed; RealHit = CalcDistance(Balls[b].x, Balls[b].y, HitBorder.x, HitBorder.y); Ds = RealHit / FullDist; Hits.push({Ball:b, Distance:Ds, Type:2, HitX:HitBorder.x, HitY:HitBorder.y, Angle:Borders[br].Angle}); } } } } } AllDone = Hits.length == 0; if (Hits.length > 0) { MinDist = Infinity; for (h in Hits) { if (Hits[h].Distance < MinDist) { MinDist = Hits[h].Distance; } Hits[h].Active = true; } for (b in Balls) { Balls[b].PrevX = Balls[b].x; Balls[b].PrevY = Balls[b].y; Balls[b].x = Balls[b].x + (Balls[b].MoveX * MinDist); Balls[b].y = Balls[b].y + (Balls[b].MoveY * MinDist); Balls[b].MoveX = Balls[b].MoveX * (1 - MinDist); Balls[b].MoveY = Balls[b].MoveY * (1 - MinDist); Balls[b].Affected = false; } Progress = Progress + ((1 - Progress) * MinDist); Forces = new Array(); for (h in Hits) { if (Hits[h].Distance == MinDist) { if (Hits[h].Type == 1) { b = Hits[h].Ball1; bb = Hits[h].Ball2; if (FirstHit == 0) { if (Balls[b].Num == 0) { FirstHit = Balls[bb].Num; } if (Balls[bb].Num == 0) { FirstHit = Balls[b].Num; } } Balls[b].Affected = true; Balls[bb].Affected = true; Balls[b].WasHit++; Balls[bb].WasHit++; BetweenBalls = CalcAngle(Balls[b].x, Balls[b].y, Balls[bb].x, Balls[bb].y); AP = Math.cos(AngleDifference(Balls[b].Angle, BetweenBalls)) * Balls[b].Speed; BP = Math.cos(AngleDifference(Balls[bb].Angle, BetweenBalls)) * Balls[bb].Speed; Proj = AP - BP; Forces.push({Ball:bb, Power:Proj, Angle:BetweenBalls}); Forces.push({Ball:b, Power:-Proj, Angle:BetweenBalls}); for (hh in Hits) { if ((((((Hits[hh].Ball1 == b) or (Hits[hh].Ball2 == b)) or (Hits[hh].Ball == b)) or (Hits[hh].Ball1 == bb)) or (Hits[hh].Ball2 == bb)) or (Hits[hh].Ball == bb)) { Hits[hh].Active = false; } } BallsSound.push({Power:Proj, x:Balls[b].x + ((Balls[bb].x - Balls[b].x) / 2)}); } if (Hits[h].Type == 2) { Balls[Hits[h].Ball].Affected = true; Balls[Hits[h].Ball].WasHit++; Ang = Hits[h].Angle; Balls[Hits[h].Ball].x = Hits[h].HitX; Balls[Hits[h].Ball].y = Hits[h].HitY; Power = -((Math.cos(AngleDifference(Balls[Hits[h].Ball].Angle, Ang)) * Balls[Hits[h].Ball].Speed) * 2); Forces.push({Ball:Hits[h].Ball, Power:Power, Angle:Ang}); for (hh in Hits) { if (((Hits[hh].Ball1 == Hits[h].Ball) or (Hits[hh].Ball2 == Hits[h].Ball)) or (Hits[hh].Ball == Hits[h].Ball)) { Hits[hh].Active = false; } } BordersSound.push({Power:Power, x:Balls[Hits[h].Ball].x}); } } } for (h in Hits) { if (!Hits[h].Active) { Hits.splice(h, 1); } } for (f in Forces) { b = Forces[f].Ball; Balls[b].FullMoveX = Balls[b].FullMoveX + (Math.sin(Forces[f].Angle) * Forces[f].Power); Balls[b].FullMoveY = Balls[b].FullMoveY - (Math.cos(Forces[f].Angle) * Forces[f].Power); Balls[b].MoveX = (1 - Progress) * Balls[b].FullMoveX; Balls[b].MoveY = (1 - Progress) * Balls[b].FullMoveY; Balls[b].Angle = CalcAngle(0, 0, Balls[b].FullMoveX, Balls[b].FullMoveY); Balls[b].Speed = CalcDistance(0, 0, Balls[b].FullMoveX, Balls[b].FullMoveY); } } } while (!AllDone); AllStopped = true; for (b in Balls) { Balls[b].x = Balls[b].x + Balls[b].MoveX; Balls[b].y = Balls[b].y + Balls[b].MoveY; if ((Balls[b].y <= ((TopOffset + Border) + BallRadius)) and (((Balls[b].x >= Borders[0].StartX) and (Balls[b].x <= Borders[0].EndX)) or ((Balls[b].x >= Borders[1].StartX) and (Balls[b].x <= Borders[1].EndX)))) { Balls[b].y = ((TopOffset + Border) + BallRadius) + 0.1; } if (((Balls[b].x >= ((740 - Border) - BallRadius)) and (Balls[b].y >= Borders[2].StartY)) and (Balls[b].y <= Borders[2].EndY)) { Balls[b].x = ((740 - Border) - BallRadius) - 0.1; } if ((Balls[b].y >= (((TopOffset + 370) - Border) - BallRadius)) and (((Balls[b].x <= Borders[3].StartX) and (Balls[b].x >= Borders[3].EndX)) or ((Balls[b].x <= Borders[4].StartX) and (Balls[b].x >= Borders[4].EndX)))) { Balls[b].y = (((TopOffset + 370) - Border) - BallRadius) - 0.1; } if (((Balls[b].x <= (Border + BallRadius)) and (Balls[b].y <= Borders[5].StartY)) and (Balls[b].y >= Borders[5].EndY)) { Balls[b].x = (Border + BallRadius) + 0.1; } Balls[b].Speed = (Balls[b].Speed * 0.98) - 0.01; if (Balls[b].Speed < 0.05) { Balls[b].Speed = 0; } if (Balls[b].Speed > 0) { AllStopped = false; } MovedX = Balls[b].x - Balls[b].InitX; MovedY = Balls[b].y - Balls[b].InitY; if (((Balls[b].Type == 1) or (Balls[b].Type == 2)) and ((MovedX != 0) or (MovedY != 0))) { RotateBall(Balls[b], -(MovedY / 8), 0, MovedX / 8); } Balls[b].Speed = Balls[b].Speed * (1 - (Balls[b].WasHit * 0.1)); if (Mode == 3) { Balls[b].x = Math.round(Balls[b].x * 1000) / 1000; Balls[b].y = Math.round(Balls[b].y * 1000) / 1000; } if (!Simulation) { Balls[b].Shadow._x = (Balls[b].Symbol._x = Balls[b].x); Balls[b].Shadow._y = (Balls[b].Symbol._y = Balls[b].y); } NearPocket = 0; if (Balls[b].y < (TopOffset + 47)) { if (Balls[b].x < 260) { NearPocket = 1; } if ((Balls[b].x >= 260) and (Balls[b].x <= 480)) { NearPocket = 2; } if (Balls[b].x > 480) { NearPocket = 3; } } if (Balls[b].y > ((TopOffset + 370) - 47)) { if (Balls[b].x < 260) { NearPocket = 4; } if ((Balls[b].x >= 260) and (Balls[b].x <= 480)) { NearPocket = 5; } if (Balls[b].x > 480) { NearPocket = 6; } } if (NearPocket > 0) { DistanceToPocket = CalcDistance(Balls[b].x, Balls[b].y, Pockets[NearPocket].x, Pockets[NearPocket].y); AngleFromPocket = CalcAngle(Pockets[NearPocket].x, Pockets[NearPocket].y, Balls[b].x, Balls[b].y); Pocketed = false; if (Math.abs(AngleDifference(AngleFromPocket, Pockets[NearPocket].Angle)) > halfPI) { Pocketed = true; if (DistanceToPocket > (16.97 - BallRadius)) { Balls[b].Symbol._x = (Balls[b].x = Pockets[NearPocket].x + (Math.sin(AngleFromPocket) * (16.97 - BallRadius))); Balls[b].Symbol._y = (Balls[b].y = Pockets[NearPocket].y - (Math.cos(AngleFromPocket) * (16.97 - BallRadius))); } } else if (DistanceToPocket <= 16.97) { Pocketed = true; } if (Pocketed) { PocketedNow.push(Balls[b].Num); if (SO.data.SoundOn) { PocketSound.setPan(Math.round((Pockets[NearPocket].x - 370) / 3.7)); PocketSound.start(); } if (!Simulation) { if (Balls[b].Num == 8) { BlackIn = NearPocket; } Angle = Math.random() * dblPI; Distance = Math.random() * 5; DiffX = (Pockets[NearPocket].x + (Math.sin(Angle) * Distance)) - Balls[b].x; DiffY = (Pockets[NearPocket].y - (Math.cos(Angle) * Distance)) - Balls[b].y; Steps = 5; MinDepth = Infinity; for (bb in Balls) { Depth = Balls[bb].Symbol.getDepth(); if (Depth < MinDepth) { MinDepth = Depth; } } Balls[b].Symbol.swapDepths(MinDepth); FallingBalls.push({Symbol:Balls[b].Symbol, Shadow:Balls[b].Shadow, Col:new Color(Balls[b].Symbol), MoveX:DiffX / Steps, MoveY:DiffY / Steps, Steps:Steps}); if (Balls[b].Num == 0) { CueBallPocketed = true; RemoveBall = Balls[b].Symbol; RemoveShadow = Balls[b].Shadow; PlaceCue = 0; } } Balls.splice(b, 1); } } } } function SelectOpponent(num) { SelectedOpponent = num; Players[2].Name = Opponents[num].Name; CPU.Skill = Opponents[num].Skill; CPU.Accuracy = Opponents[num].Accuracy; MDown = false; SO.data.CPUPlayers[num].Played++; SO.flush(); gotoAndPlay ("GameStart"); } function InitTournament(Difficulty) { TournamentType = Difficulty; switch (Difficulty) { case 1 : MinCategory = 1; MaxCategory = 4; InitMatches = 4; break; case 2 : MinCategory = 2; MaxCategory = 7; InitMatches = 8; break; case 3 : MinCategory = 4; MaxCategory = 10; InitMatches = 16; break; case 4 : MinCategory = 6; MaxCategory = 13; InitMatches = 32; } TotalCategories = (MaxCategory - MinCategory) + 1; PeoplePerCategory = Math.ceil((InitMatches * 2) / TotalCategories); Tourney = new Array(); TournamentSteps = Difficulty + 2; t = 1; while (t <= TournamentSteps) { Tourney[t] = new Array(); t++; } c = MinCategory; while (c <= MaxCategory) { switch (c) { case 1 : Accuracy = 1; Skill = 1; break; case 2 : Accuracy = 1; Skill = 2; break; case 3 : Accuracy = 2; Skill = 1; break; case 4 : Accuracy = 2; Skill = 2; break; case 5 : Accuracy = 2; Skill = 3; break; case 6 : Accuracy = 3; Skill = 2; break; case 7 : Accuracy = 3; Skill = 3; break; case 8 : Accuracy = 3; Skill = 4; break; case 9 : Accuracy = 4; Skill = 3; break; case 10 : Accuracy = 4; Skill = 4; break; case 11 : Accuracy = 4; Skill = 5; break; case 12 : Accuracy = 5; Skill = 4; break; case 13 : Accuracy = 5; Skill = 5; } TempCat = new Array(); CurrStage = 1; cc = 0; while (cc < TournamentCatagories[c].length) { TempCat.push(TournamentCatagories[c][cc]); cc++; } p = 1; while (p <= PeoplePerCategory) { CurrPart = random(TempCat.length); Tourney[1].push({Name:TempCat[CurrPart], Accuracy:Accuracy, Skill:Skill, Lost:false}); if (Tourney[1].length >= ((InitMatches * 2) - 1)) { break; } TempCat.splice(CurrPart, 1); p++; } c++; } Tourney[1].unshift(Players[1]); ChangesNum = random(Tourney[1].length * 200); ch = 1; while (ch <= ChangesNum) { ChangePos = 1 + random(Tourney[1].length - 2); Tmp = Tourney[1][ChangePos]; Tourney[1][ChangePos] = Tourney[1][ChangePos + 1]; Tourney[1][ChangePos + 1] = Tmp; ch++; } CurrMatch = 0; Frame3Squares = new Array(); Frame4Squares = new Array(); gotoAndPlay ("Tournament"); } function DisplayExitDialogue() { ExitScreen._visible = true; MDown = false; if (Mode != 3) { Paused = true; } ExitScreen.WarningMessage._visible = (Mode == 3) and (!ExitFree._visible); } function UpdateSigns() { if (SO.data.SoundOn) { SoundSign.Txt = "SOUND: ON"; } else { SoundSign.Txt = "SOUND: OFF"; } if (SO.data.MusicOn) { MusicSign.Txt = "MUSIC: ON"; } else { MusicSign.Txt = "MUSIC: OFF"; } } function UpdateLoginCBs() { if (SO.data.RememberLoginName) { CBName.gotoAndStop(1); } else { CBName.gotoAndStop(2); } if (SO.data.RememberLoginPass) { CBPass.gotoAndStop(1); } else { CBPass.gotoAndStop(2); } } function LeaveLoginScreen() { if (!SO.data.RememberLoginName) { SO.data.LoginName = ""; } if (!SO.data.RememberLoginPass) { SO.data.LoginPass = ""; } SO.flush(); } function DisableAll(Level) { if (Level == undefined) { Level = _root; } var _local3; for (_local3 in Level) { if (Level[_local3] instanceof TextField) { if (Level[_local3].type == "input") { Level[_local3].type = "dynamic"; Level[_local3].selectable = false; Disabled.push(Level[_local3]); } } else if (Level[_local3]._visible) { if (Level[_local3].enabled) { Level[_local3].enabled = false; Disabled.push(Level[_local3]); } if (Level[_local3] instanceof MovieClip) { DisableAll(Level[_local3]); } } } } function EnableAll() { var _local1; for (_local1 in Disabled) { if (Disabled[_local1] instanceof TextField) { Disabled[_local1].selectable = true; Disabled[_local1].type = "input"; } else { Disabled[_local1].enabled = true; } } Disabled = new Array(); } function LoginSend(Data) { if (!Connected) { if (!Con.connect("sugar-free-games.com", 10003)) { trace("Connection Failed"); OpenMB(10); } PendingData = Data; OpenMB(1); } else { Con.send(Data); OpenMB(2); } } function EncodeSpecial(Text) { var _local2; while (_local2 = Text.indexOf("|") , _local2 != -1) { Text = (Text.substring(0, _local2) + "[%s]") + Text.substr(_local2 + 1); } return(Text); } function DecodeSpecial(Text) { var _local2; while (_local2 = Text.indexOf("[%s]") , _local2 != -1) { Text = (Text.substring(0, _local2) + "|") + Text.substr(_local2 + 4); } return(Text); } function OpenMB(Type) { DisableAll(); MB._visible = true; switch (Type) { case 1 : MB.gotoAndStop(1); MB.Title = "CONNECTING"; break; case 2 : MB.gotoAndStop(1); MB.AbortButt.enabled = true; MB.Title = "SENDING/RECEIVING DATA"; break; case 3 : MB.gotoAndStop(2); MB.Title = "ERROR"; MB.Text = "You cannot login to the server with an empty name. Please enter your name in \"LOG IN AS GUEST\" section and try again."; MB.Butt1.Txt = "OK"; MB.Butt1.onPress = function () { MB._visible = false; EnableAll(); }; break; case 4 : MB.gotoAndStop(2); MB.Title = "ERROR"; MB.Text = "The game you are trying to join is no longer available. Please try another game."; MB.Butt1.Txt = "OK"; MB.Butt1.onPress = function () { MB._visible = false; EnableAll(); }; break; case 5 : MB.gotoAndStop(2); MB.Title = "NOT ACCEPTED"; MB.Text = "The opponent has not accepted the game."; MB.Butt1.Txt = "OK"; MB.Butt1.onPress = function () { MB._visible = false; EnableAll(); }; break; case 6 : MB.gotoAndStop(2); MB.Title = "ERROR"; MB.Text = "You cannot use an empty name.\rType your name in \"Sign In\" section and try again."; MB.Butt1.Txt = "OK"; MB.Butt1.onPress = function () { MB._visible = false; EnableAll(); }; break; case 7 : MB.gotoAndStop(2); MB.Title = "ERROR"; MB.Text = "You cannot use an empty password.\rPlease type your password and try again."; MB.Butt1.Txt = "OK"; MB.Butt1.onPress = function () { MB._visible = false; EnableAll(); }; break; case 8 : MB.gotoAndStop(2); MB.Title = "ERROR"; MB.Text = "You cannot use this name because it's taken by another user. Please select a different name and try again."; MB.Butt1.Txt = "OK"; MB.Butt1.onPress = function () { MB._visible = false; EnableAll(); Selection.setFocus("SignInName"); }; break; case 9 : MB.gotoAndStop(2); MB.Title = "ERROR"; MB.Text = "Incorrect name/password."; MB.Butt1.Txt = "OK"; MB.Butt1.onPress = function () { MB._visible = false; EnableAll(); Selection.setFocus("SignInName"); }; break; case 10 : MB.gotoAndStop(2); MB.Title = "CONNECTION FAILED"; MB.Text = "Possible Solutions:\rTemporary Server Problem: Wait for a couple of minutes and try again.\rNo Internet Connection: Make sure you are connected to the Internet.\rPort Blocked: Adjust your firewall settings to allow traffic on port 10003."; MB.Butt1.Txt = "OK"; MB.Butt1.onPress = function () { MB._visible = false; EnableAll(); }; } } function UpdateGames() { var _local2; var _local3; AvGamesTxt = ((("AVAILABLE GAMES (" + (Math.floor(GamesListOffset / 8) + 1)) + "/") + (Math.floor((Games.length - 1) / 8) + 1)) + "):"; _local2 = 0; while (_local2 <= 7) { _local3 = _local2 + GamesListOffset; if (_local3 < Games.length) { this["I" + _local2]._visible = true; if (Games[_local3].Rank == 0) { this["I" + _local2].Name.gotoAndStop(2); this["I" + _local2].RankSign.gotoAndStop(2); delete this["I" + _local2].RankSign.onPress; } else { this["I" + _local2].Name.gotoAndStop(1); this["I" + _local2].RankSign.gotoAndStop(1); this["I" + _local2].RankSign.RankText = "Rank " + Games[_local3].Rank; this["I" + _local2].RankSign.onPress = function () { RequestInfo(this._parent.Index); }; } this["I" + _local2].Name.Text = Games[_local3].Name; this["I" + _local2].Index = _local3; if (Games[_local3].ID == YourID) { this["I" + _local2].JoinButt._visible = false; } else { this["I" + _local2].JoinButt._visible = true; this["I" + _local2].JoinButt.onPress = function () { Con.send("2" + Games[this._parent.Index].ID); Players[2].Name = this._parent.Name.Text; MessageText = ("WAITING FOR " + this._parent.Name.Text.toUpperCase()) + "'S RESPONSE..."; gotoAndStop ("Waiting"); }; } } else { this["I" + _local2]._visible = false; } _local2++; } if (Games.length > (GamesListOffset + 8)) { NextButt.enabled = true; NextButt._alpha = 100; } else { NextButt.enabled = false; NextButt._alpha = 40; } if (GamesListOffset > 0) { PrevButt.enabled = true; PrevButt._alpha = 100; } else { PrevButt.enabled = false; PrevButt._alpha = 40; } } function UpdatePoints() { if (YouAreGuest) { RI.gotoAndStop(2); } else { RI.gotoAndStop(1); RI.PointsText = "Points: " + YourPoints; RI.RankText = "Rank: " + PointsToRank(YourPoints); } } function PointsToRank(Points) { return(Math.floor(Math.sqrt(Points)) + 1); } function RequestInfo(ID) { OpenMB(2); Con.send("C" + ID); } halfPI = (Math.PI/2); dblPI = (Math.PI*2); Rad2Deg = 360 / dblPI; Game = 1; adBox._visible = false; Connected = false; var SO = SharedObject.getLocal("PoolSaved"); if (SO.data.SoundOn == undefined) { SO.data.SoundOn = true; } if (SO.data.MusicOn == undefined) { SO.data.MusicOn = true; } if (SO.data.RememberLoginName == undefined) { SO.data.RememberLoginName = true; } if (SO.data.RememberLoginPass == undefined) { SO.data.RememberLoginPass = true; } if (SO.data.CPUPlayers == undefined) { SO.data.CPUPlayers = new Array(); i = 1; while (i <= 9) { SO.data.CPUPlayers[i] = {Played:0, Won:0}; i++; } } if (SO.data.Player1Name == undefined) { SO.data.Player1Name = "Player 1"; } if (SO.data.Player2Name == undefined) { SO.data.Player2Name = "Player 2"; } if (SO.data.LoginName == undefined) { SO.data.LoginName = SO.data.Player1Name; } if (SO.data.LoginPass == undefined) { SO.data.LoginPass = ""; } CPU = new Object(); Players = [undefined, {Name:SO.data.Player1Name}, {Name:SO.data.Player2Name}]; Opponents = [undefined, {Name:"Dodo Doodle", Skill:1, Accuracy:1}, {Name:"Lou Zer", Skill:1, Accuracy:2}, {Name:"John E.Z. Smith", Skill:2, Accuracy:2}, {Name:"Soso Machabeli", Skill:2, Accuracy:3}, {Name:"Sakamoto Okidoki", Skill:3, Accuracy:3}, {Name:"Michael Goodone", Skill:3, Accuracy:4}, {Name:"Jerry McTough", Skill:4, Accuracy:4}, {Name:"George S. Kika", Skill:4, Accuracy:5}, {Name:"Kent Beatme", Skill:5, Accuracy:5}]; TournamentCatagories = [undefined, ["John Smith", "Marco Van Hoosear", "Francesca Bianchi", "Vladimir Golubev", "Francisco Serrano", "Eithan Cohen", "Andrey Zoshenko", "Edna Goldberg", "Francois Guttier", "Friedrich Zimmermann"], ["Francesco Rossi", "Mario Rizzo", "Michael Sheppard", "Niclas Fleischer", "Cindy Fitzgerald", "Dmitry Petrov", "Jan Haasse", "Gustav Ericson", "Carl Larsen", "Jaanus Kallas"], ["Josef Kappel", "Lorenzo Ferrari", "Peter Jackson", "Anton Sidorov", "Jean Pasteur", "Knut Hansen", "Jozef Habich", "Yang Hu", "Petru Stoica", "Iwasawa Takashi"], ["Anna Klein", "Federico Esposito", "Marry White", "Olesia Kovach", "Claude Carol", "Peter Garborg", "Marat Bekmambetov", "Dimitris Fotopoulos", "Stefan Pascin", "Milan Markovic"], ["Lukas Bauer", "Filippo Ricci", "George Patton", "Bernardo Herrero", "Jacques Reno", "Jurgis Banionis", "Cemal Kaya", "Petr Krenek", "Martin Stanchev", "Stefan Sokolovic"], ["Jan Huber", "Stefano Romano", "Gregory Brown", "Ann Flynn", "Gregorio Vila", "Louis Maunier", "Thomas Van Houten", "Bohuslav Radok", "Maruyama Suzuki", "Sava Lazic"], ["Paul Farber", "Elisa Colombo", "Anthony Skinner", "Luis Schuster", "Antonio Torres", "Gabrielle Moulin", "Johan Brun", "Adam Kemula", "Timur Batyr", "Matija Simic"], ["Finn Schultz", "Stacy Johnson", "Jack Small", "Davide Russo", "Diego Hernandez", "Pierre Fourier", "Hans Kreuger", "Einar Scheving", "Sun Wang", "Dimitar Cheparinov"], ["Leon Koch", "Matteo Marino", "Nick Washington", "Heather McDonald", "David Blanco", "Bernard Van der Meer", "Wilhelm Jacobsen", "Ion Preda", "Georgios Kalomiris", "Peter Mitic"], ["Jonas Metzger", "Giuseppe Greco", "James Williams", "Pedro Jimenez", "Nils Bergman", "Lars Thomsen", "Andrius Kernagis", "Eugen Trailescu", "Yorgos Vamvakaris", "Svetomir Stojkov"], ["Simone Bruno", "Mark Evans", "David Ferguson", "Kevin Reilly", "Alain Dausset", "Kazimierz Godlewski", "Shimura Tokuhichi", "Konstantinos Georgiadis", "Filip Stupel", "Goran Nenadovic"], ["Vincenzo Gallo", "Alexander McQueen", "Douglas Gilmore", "Stewart O'Brien", "Richard Quinn", "Daniel Murray", "Tom Hayes", "Fred O'Neill", "Snorri Hauksson", "Tadeusz Brudzewski"], ["Luca Kaufmann", "Chris McNeely", "Robert Wilson", "Albert Scott", "Brad McMillan", "Bruce Boyle", "Steven O'Donnell", "Chung Lee", "Mehmet Batuk", "Jan Medek"]]; BallRadius = 9; BallDiameter = BallRadius * 2; StripeDivs = 10; StripeStep = dblPI / StripeDivs; StripeHeight = BallRadius / 2; NumCircleDivs = 8; LeftNC = 6; RightNC = 2; TopNC = 0; BottomNC = 4; NumCircleStep = dblPI / NumCircleDivs; NumCircleRadius = BallRadius / 2.4; OutsideRadius = BallRadius * 2; FormationSpace = 2.1; TopOffset = 65; Border = 40; TableLength = 740 - (Border * 2); TableWidth = 370 - (Border * 2); FootString = Border + (TableLength / 4); HeadString = Border + (TableLength * 0.793); VerticalMiddle = (TopOffset + Border) + (TableWidth / 2); HeadRadius = 50; HalfCornerMouth = 16; PocketRadius = Math.sqrt(Math.pow(HalfCornerMouth + BallRadius, 2) * 2) / 2; HalfSideMouth = PocketRadius + 1.776; CornerOffset = (Border + 8) + HalfCornerMouth; Top = (TopOffset + Border) + BallRadius; Bottom = ((TopOffset + 370) - Border) - BallRadius; Left = Border + BallRadius; Right = (740 - Border) - BallRadius; HalfPocket = 16.97; MiddlePocketAngle = CalcAngle(HalfPocket, 20, HalfPocket + 3, 40); HitPoint = LineHitsLine(co2ab(HalfPocket - BallRadius, 20, (HalfPocket + 3) - BallRadius, 40), co2ab(0, 40 + BallRadius, 10, 40 + BallRadius)); HalfMidMouth = HitPoint.x; Corner2X = Border + (Math.sin(halfPI / 2) * BallRadius); Corner2Y = 64 - (Math.cos(halfPI / 2) * BallRadius); Borders = [{StartX:CornerOffset, StartY:Top, EndX:370 - HalfMidMouth, EndY:Top}, {StartX:370 + HalfMidMouth, StartY:Top, EndX:740 - CornerOffset, EndY:Top}, {StartX:Right, StartY:TopOffset + CornerOffset, EndX:Right, EndY:(TopOffset + 370) - CornerOffset}, {StartX:740 - CornerOffset, StartY:Bottom, EndX:370 + HalfMidMouth, EndY:Bottom}, {StartX:370 - HalfMidMouth, StartY:Bottom, EndX:CornerOffset, EndY:Bottom}, {StartX:Left, StartY:(TopOffset + 370) - CornerOffset, EndX:Left, EndY:TopOffset + CornerOffset}, {StartX:Corner2X, StartY:TopOffset + Corner2Y, EndX:0, EndY:(TopOffset + Corner2Y) - Corner2X}, {StartX:0, StartY:(TopOffset + Corner2X) - Corner2Y, EndX:Corner2Y, EndY:TopOffset + Corner2X}, {StartX:740 - Corner2Y, StartY:TopOffset + Corner2X, EndX:740, EndY:(TopOffset + Corner2X) - Corner2Y}, {StartX:740, StartY:(TopOffset + Corner2Y) - Corner2X, EndX:740 - Corner2X, EndY:TopOffset + Corner2Y}, {StartX:740, StartY:((TopOffset + 370) - Corner2X) + Corner2Y, EndX:740 - Corner2Y, EndY:(TopOffset + 370) - Corner2X}, {StartX:740 - Corner2X, StartY:(TopOffset + 370) - Corner2Y, EndX:740, EndY:((TopOffset + 370) - Corner2Y) + Corner2X}, {StartX:0, StartY:((TopOffset + 370) - Corner2Y) + Corner2X, EndX:Corner2X, EndY:(TopOffset + 370) - Corner2Y}, {StartX:Corner2Y, StartY:(TopOffset + 370) - Corner2X, EndX:0, EndY:((TopOffset + 370) - Corner2X) + Corner2Y}, {StartX:370 - HalfMidMouth, StartY:Top, EndX:(370 - HalfPocket) + BallRadius, EndY:TopOffset + 20}, {StartX:(370 - HalfPocket) + BallRadius, StartY:TopOffset + 20, EndX:(370 - HalfPocket) + BallRadius, EndY:TopOffset}, {StartX:(370 + HalfPocket) - BallRadius, StartY:TopOffset + 20, EndX:370 + HalfMidMouth, EndY:Top}, {StartX:(370 + HalfPocket) - BallRadius, StartY:TopOffset, EndX:(370 + HalfPocket) - BallRadius, EndY:TopOffset + 20}, {StartX:(370 - HalfPocket) + BallRadius, StartY:TopOffset + 370, EndX:(370 - HalfPocket) + BallRadius, EndY:TopOffset + 350}, {StartX:(370 - HalfPocket) + BallRadius, StartY:TopOffset + 350, EndX:370 - HalfMidMouth, EndY:Bottom}, {StartX:(370 + HalfPocket) - BallRadius, StartY:TopOffset + 350, EndX:(370 + HalfPocket) - BallRadius, EndY:TopOffset + 370}, {StartX:370 + HalfMidMouth, StartY:Bottom, EndX:(370 + HalfPocket) - BallRadius, EndY:TopOffset + 350}]; Borders.push({StartX:Borders[5].EndX, StartY:Borders[5].EndY, EndX:Borders[6].StartX, EndY:Borders[6].StartY}); Borders.push({StartX:Borders[7].EndX, StartY:Borders[7].EndY, EndX:Borders[0].StartX, EndY:Borders[0].StartY}); Borders.push({StartX:Borders[1].EndX, StartY:Borders[1].EndY, EndX:Borders[8].StartX, EndY:Borders[8].StartY}); Borders.push({StartX:Borders[9].EndX, StartY:Borders[9].EndY, EndX:Borders[2].StartX, EndY:Borders[2].StartY}); Borders.push({StartX:Borders[10].EndX, StartY:Borders[10].EndY, EndX:Borders[3].StartX, EndY:Borders[3].StartY}); Borders.push({StartX:Borders[2].EndX, StartY:Borders[2].EndY, EndX:Borders[11].StartX, EndY:Borders[11].StartY}); Borders.push({StartX:Borders[12].EndX, StartY:Borders[12].EndY, EndX:Borders[5].StartX, EndY:Borders[5].StartY}); Borders.push({StartX:Borders[4].EndX, StartY:Borders[4].EndY, EndX:Borders[13].StartX, EndY:Borders[13].StartY}); LongBorders = [{StartX:Borders[0].StartX, StartY:Borders[0].StartY, EndX:Borders[1].EndX, EndY:Borders[1].EndY, Angle:Math.PI}, {StartX:Borders[3].StartX, StartY:Borders[3].StartY, EndX:Borders[4].EndX, EndY:Borders[4].EndY, Angle:0}]; Pockets = [undefined, {x:30, y:TopOffset + 30, Angle:2.35619449019234, StartEnterX:Borders[6].StartX, StartEnterY:Borders[6].StartY, EndEnterX:Borders[7].EndX, EndEnterY:Borders[7].EndY}, {x:370, y:TopOffset + 20, Angle:Math.PI, StartEnterX:Borders[14].StartX, StartEnterY:Borders[14].StartY, EndEnterX:Borders[16].EndX, EndEnterY:Borders[16].EndY}, {x:710, y:TopOffset + 30, Angle:3.92699081698724, StartEnterX:Borders[8].StartX, StartEnterY:Borders[8].StartY, EndEnterX:Borders[9].EndX, EndEnterY:Borders[9].EndY}, {x:30, y:TopOffset + 340, Angle:(Math.PI/4), StartEnterX:Borders[13].StartX, StartEnterY:Borders[13].StartY, EndEnterX:Borders[12].EndX, EndEnterY:Borders[12].EndY}, {x:370, y:TopOffset + 350, Angle:0, StartEnterX:Borders[21].StartX, StartEnterY:Borders[21].StartY, EndEnterX:Borders[19].EndX, EndEnterY:Borders[19].EndY}, {x:710, y:TopOffset + 340, Angle:5.49778714378214, StartEnterX:Borders[11].StartX, StartEnterY:Borders[11].StartY, EndEnterX:Borders[10].EndX, EndEnterY:Borders[10].EndY}]; Pockets[1].ReflectBorders = [2, 3, 4]; Pockets[2].ReflectBorders = [3, 4]; Pockets[3].ReflectBorders = [3, 4, 5]; Pockets[4].ReflectBorders = [2, 0, 1]; Pockets[5].ReflectBorders = [0, 1]; Pockets[6].ReflectBorders = [0, 1, 5]; for (p in Pockets) { ShiftX = Math.sin(Pockets[p].Angle + halfPI) * ((HalfPocket - BallRadius) - 1); ShiftY = Math.cos(Pockets[p].Angle + halfPI) * ((HalfPocket - BallRadius) - 1); Pockets[p].StartInsideX = Pockets[p].x + ShiftX; Pockets[p].StartInsideY = Pockets[p].y - ShiftY; Pockets[p].EndInsideX = Pockets[p].x - ShiftX; Pockets[p].EndInsideY = Pockets[p].y + ShiftY; } for (b in Borders) { Borders[b].Angle = CalcAngle(Borders[b].StartX, Borders[b].StartY, Borders[b].EndX, Borders[b].EndY) + halfPI; } MListener = new Object(); MListener.onMouseDown = function () { MDown = true; }; MListener.onMouseUp = function () { MDown = false; }; Mouse.addListener(MListener); Powers = new Array(); i = 0; while (i <= 60) { Powers[i] = 0; CurrSpeed = i; while (CurrSpeed > 0) { Powers[i] = Powers[i] + CurrSpeed; CurrSpeed = (CurrSpeed * 0.98) - 0.01; } i++; } Disabled = new Array(); var Con = new XMLSocket(); Con.onConnect = function () { Connected = true; Con.send(PendingData); OpenMB(2); PingCounter = 0; onEnterFrame = function () { PingCounter++; if ((!GameStarted) and (PingCounter >= 1500)) { Con.send("X"); PingCounter = 0; } Now = new Date(); if (((GameStarted and (!YourTurn)) and ((PingCounter % 250) == 0)) and ((Now - LastMove) > 10000)) { Con.send("F" + (LastActionNum + 1)); } }; }; Con.onData = function (src) { var _local1; var _local2; Command = src.substr(0, 1); if (src.length > 1) { _local2 = src.substr(1).split("|"); } else { _local2 = null; } switch (Command) { case "0" : YourID = _local2[0]; YourPoints = Number(_local2[1]); Games = new Array(); if (_local2.length > 3) { _local1 = 2; while (_local1 < _local2.length) { Games.push({ID:_local2[_local1], Name:DecodeSpecial(_local2[_local1 + 1]), Rank:Number(_local2[_local1 + 2])}); _local1 = _local1 + 3; } } LeaveLoginScreen(); MB._visible = false; gotoAndStop ("Lobby"); break; case "1" : Games.push({ID:_local2[0], Name:DecodeSpecial(_local2[1]), Rank:Number(_local2[2])}); UpdateGames(); break; case "2" : for (_local1 in Games) { if (Games[_local1].ID == _local2[0]) { Games.splice(_local1, 1); break; } } UpdateGames(); break; case "3" : gotoAndStop ("Lobby"); GameNotAvailable = true; break; case "4" : if (_local2[1] == "0") { RankText = "guest"; } else { RankText = "rank " + _local2[1]; } Players[2].Name = _local2[0]; MessageText = ((_local2[0] + " (") + RankText) + ") wants to join your game."; gotoAndStop ("AcceptOpponent"); break; case "5" : MDown = false; YourTurn = true; ReceivedPositions = new Array(); _local1 = 1; while (_local1 < _local2.length) { ReceivedPositions[_local1] = Number(_local2[_local1]); _local1++; } gotoAndPlay ("GameStart"); break; case "6" : if ((!HasGame) and (!GameStarted)) { IsDenied = true; gotoAndStop ("Lobby"); } break; case "7" : gotoAndStop ("OpponentLeft"); break; case "8" : if (Number(_local2[2]) == (LastActionNum + 1)) { ReceivedHits.push({Angle:Number(_local2[0]), Power:Number(_local2[1])}); LastMove = new Date(); LastActionNum++; } if (Number(_local2[2]) > (LastActionNum + 1)) { Con.send("F" + (LastActionNum + 1)); } break; case "9" : if (Number(_local2[2]) == (LastActionNum + 1)) { PlaceCueBall(Number(_local2[0]), Number(_local2[1])); PlaceCue = 3; CueBallPocketed = false; UpdateBoards(); LastMove = new Date(); LastActionNum++; } if (Number(_local2[2]) > (LastActionNum + 1)) { Con.send("F" + (LastActionNum + 1)); } break; case "A" : OpenMB(8); break; case "B" : OpenMB(9); break; case "C" : YourPoints = Number(_local2[0]); UpdatePoints(); break; case "D" : InfoArray = new Array(); _local1 = 0; while (_local1 < _local2.length) { InfoArray[_local1] = _local2[_local1]; _local1++; } gotoAndStop ("InfoPage"); break; case "E" : Con.close(); Connected = false; gotoAndStop ("Disconnected"); break; case "F" : if (Number(_local2[0]) > (LastActionNum + 1)) { Con.send("F" + (LastActionNum + 1)); } else { if (Actions[Number(_local2[0])] == undefined) { break; } Con.send(Actions[Number(_local2[0])]); } } };
Frame 6
adBox._visible = false; this.createEmptyMovieClip("BallHitsBallControl", this.getNextHighestDepth()); BallHitsBallSound = new Sound(BallHitsBallControl); BallHitsBallSound.attachSound("ballhitsball"); this.createEmptyMovieClip("BallHitsBorderControl", this.getNextHighestDepth()); BallHitsBorderSound = new Sound(BallHitsBorderControl); BallHitsBorderSound.attachSound("ballhitsborder"); this.createEmptyMovieClip("CueControl", this.getNextHighestDepth()); CueSound = new Sound(CueControl); CueSound.attachSound("cue"); this.createEmptyMovieClip("PocketControl", this.getNextHighestDepth()); PocketSound = new Sound(PocketControl); PocketSound.attachSound("pocket"); FaultSound = new Sound(this); FaultSound.attachSound("fault"); SwitchPlayerSound = new Sound(this); SwitchPlayerSound.attachSound("switchplayer"); WinSound = new Sound(this); WinSound.attachSound("win"); LoseSound = new Sound(this); LoseSound.attachSound("lose"); ClickSound = new Sound(this); ClickSound.attachSound("click"); stop();
Frame 7
adBox._visible = false; stop(); B1.Txt = "MULTIPLAYER"; B1.onPress = function () { Mode = 3; gotoAndStop ("MultiplayerLogin"); }; B2.Txt = "2 PLAYERS"; B2.onPress = function () { Mode = 1; gotoAndStop ("SetPlayerNames"); }; B3.Txt = "VS. CPU: SINGLE GAME"; B3.onPress = function () { Mode = 2; gotoAndStop ("OpponentSelect"); }; B4.Txt = "VS. CPU: TOURNAMENT"; B4.onPress = function () { Mode = 2; gotoAndStop ("TournamentSelect"); }; B5.Txt = "INSTRUCTIONS"; B5.onPress = function () { gotoAndStop ("Instructions"); }; B6.Txt = "TOP ONLINE PLAYERS"; B6.onPress = function () { getURL ("http://www.sugar-free-games.com/sfgpool.php", "_blank"); }; B7.Txt = "MORE BILLIARDS GAMES"; B7.onPress = function () { getURL ("http://www.sugar-free-games.com/billiards.php", "_blank"); }; B8.Txt = "PLAY AND DOWNLOAD THIS GAME\rAT SUGAR-FREE-GAMES.COM"; B8.onPress = function () { getURL ("http://www.sugar-free-games.com/showgame.php?game=2441", "_blank"); }; B9.Txt = "OTHER GREAT GAMES AT\rSUGAR-FREE-GAMES.COM"; B9.onPress = function () { getURL ("http://www.sugar-free-games.com", "_blank"); }; PlayerName.text = SO.data.Player1Name; Players[1].Name = SO.data.Player1Name; this.onEnterFrame = function () { if (eval (Selection.getFocus()) != PlayerName) { Selection.setFocus("PlayerName"); } else { delete this.onEnterFrame; } }; PlayerName.onChanged = function () { SO.data.Player1Name = PlayerName.text; Players[1].Name = PlayerName.text; }; PlayerName.onKillFocus = function () { SO.flush(); };
Frame 8
adBox._visible = false; Players[1].Name = SO.data.Player1Name; Players[2].Name = SO.data.Player2Name; this.onEnterFrame = function () { if (((Player1N.text != SO.data.Player1Name) or (Player2N.text != SO.data.Player2Name)) or (eval (Selection.getFocus()) != Player2N)) { Player1N.text = SO.data.Player1Name; Player2N.text = SO.data.Player2Name; Selection.setFocus("Player2N"); } else { delete this.onEnterFrame; } }; Player1N.onChanged = function () { SO.data.Player1Name = Player1N.text; Players[1].Name = Player1N.text; }; Player2N.onChanged = function () { SO.data.Player2Name = Player2N.text; Players[2].Name = Player2N.text; }; Player1N.onKillFocus = (Player2N.onKillFocus = function () { SO.flush(); }); PlayButt.Txt = "PLAY"; PlayButt.onPress = function () { MDown = false; gotoAndPlay ("GameStart"); }; BackButt.Txt = "BACK"; BackButt.onPress = function () { gotoAndStop ("MainMenu"); };
Frame 9
adBox._visible = false; Butt1.Txt = "8 BALL RULES"; Butt1.onPress = function () { gotoAndStop ("Rules"); }; Butt2.Txt = "MAIN MENU"; Butt2.onPress = function () { gotoAndStop ("MainMenu"); };
Frame 10
adBox._visible = false; Butt1.Txt = "INSTRUCTIONS"; Butt1.onPress = function () { gotoAndStop ("Instructions"); }; Butt2.Txt = "MAIN MENU"; Butt2.onPress = function () { gotoAndStop ("MainMenu"); };
Frame 11
adBox._visible = false; stop(); ItsATourney = true; TS1.Name = "TOURNEY FOR DUMMIES"; TS2.Name = "SCHOOL TOURNAMENT"; TS3.Name = "LOCAL COMPETITION"; TS4.Name = "WORLD CHAMPIONSHIP"; TS1.onPress = function () { InitTournament(1); }; TS2.onPress = function () { InitTournament(2); }; TS3.onPress = function () { InitTournament(3); }; TS4.onPress = function () { InitTournament(4); }; FromGame = false; Butt.Txt = "TO MAIN MENU"; Butt.onPress = function () { gotoAndStop ("MainMenu"); };
Frame 12
adBox._visible = false; AllPairs = new Array(); PlayButton.Txt = "PLAY"; StartFrom = (-((InitMatches * 350) / 2)) + 100; t = 1; while (t <= TournamentSteps) { AllPairs[t] = new Array(); CurrStageMatches = (InitMatches * 2) / Math.pow(2, t - 1); i = 0; while (i <= (CurrStageMatches - 1)) { if (!(AllPairs[t][Math.floor(i / 2)] instanceof Object)) { AllPairs[t][Math.floor(i / 2)] = new Object(); } TourneyScreen.TSquareSample.duplicateMovieClip((("TS" + t) + "x") + i, TourneyScreen.getNextHighestDepth()); TourneyScreen[(("TS" + t) + "x") + i].gotoAndStop(1); if (Tourney[t][i] != undefined) { TourneyScreen[(("TS" + t) + "x") + i].Name = Tourney[t][i].Name; } if (t != 1) { StartPair = AllPairs[t - 1][Math.floor(i / 2) * 2]; EndPair = AllPairs[t - 1][(Math.floor(i / 2) * 2) + 1]; BetweenPairs = StartPair.Square1._x + ((EndPair.Square2._x - StartPair.Square1._x) / 2); } if ((i % 2) == 0) { if (t == 1) { TourneyScreen[(("TS" + t) + "x") + i]._x = StartFrom + (Math.floor(i / 2) * 350); } else { TourneyScreen[(("TS" + t) + "x") + i]._x = BetweenPairs - 75; } AllPairs[t][Math.floor(i / 2)].Square1 = TourneyScreen[(("TS" + t) + "x") + i]; AllPairs[t][Math.floor(i / 2)].Player1 = Tourney[t][i]; } else { if (t == 1) { TourneyScreen[(("TS" + t) + "x") + i]._x = (StartFrom + (Math.floor(i / 2) * 350)) + 150; } else { TourneyScreen[(("TS" + t) + "x") + i]._x = BetweenPairs + 75; } AllPairs[t][Math.floor(i / 2)].Square2 = TourneyScreen[(("TS" + t) + "x") + i]; AllPairs[t][Math.floor(i / 2)].Player2 = Tourney[t][i]; } TourneyScreen[(("TS" + t) + "x") + i]._y = -(t * 150); i++; } t++; } for (i in Frame3Squares) { TourneyScreen[Frame3Squares[i]].gotoAndStop(3); } for (i in Frame4Squares) { TourneyScreen[Frame4Squares[i]].gotoAndStop(4); } HalfHeight = 30; TourneyScreen.createEmptyMovieClip("Draw", TourneyScreen.getNextHighestDepth()); TourneyScreen.Draw.lineStyle(0.5, 4465152, 100); t = 1; while (t <= (TournamentSteps - 1)) { i = 0; while (i < AllPairs[t].length) { TourneyScreen.Draw.moveTo(AllPairs[t][i].Square1._x, AllPairs[t][i].Square1._y - HalfHeight); TourneyScreen.Draw.lineTo(AllPairs[t][i].Square1._x, (AllPairs[t][i].Square1._y - HalfHeight) - 5); TourneyScreen.Draw.lineTo(AllPairs[t][i].Square2._x, (AllPairs[t][i].Square2._y - HalfHeight) - 5); TourneyScreen.Draw.lineTo(AllPairs[t][i].Square2._x, AllPairs[t][i].Square2._y - HalfHeight); Middle = AllPairs[t][i].Square1._x + ((AllPairs[t][i].Square2._x - AllPairs[t][i].Square1._x) / 2); NextLevelPair = AllPairs[t + 1][Math.floor(i / 2)]; if ((i % 2) == 0) { NextLevelSquare = NextLevelPair.Square1; NextLSX = NextLevelSquare._x - 74; } else { NextLevelSquare = NextLevelPair.Square2; NextLSX = NextLevelSquare._x + 74; } TourneyScreen.Draw.moveTo(Middle, (AllPairs[t][i].Square1._y - HalfHeight) - 5); TourneyScreen.Draw.lineTo(Middle, NextLevelSquare._y); TourneyScreen.Draw.lineTo(NextLSX, NextLevelSquare._y); i++; } t++; } TourneyScreen.FinalSign._x = 0; TourneyScreen.FinalSign._y = AllPairs[TournamentSteps][0].Square1._y - 100; TourneyScreen.TSquareSample._visible = false; TourneyScreen._x = (220 - AllPairs[CurrStage][0].Square1._x) + ((AllPairs[CurrStage][0].Square2._x - AllPairs[CurrStage][0].Square1._x) / 2); TourneyScreen._y = (250 - AllPairs[CurrStage][0].Square1._y) + ((AllPairs[CurrStage][0].Square2._y - AllPairs[CurrStage][0].Square1._y) / 2); Phase = 1; PlayButton._visible = false; PlayButton.onPress = function () { CPU.Skill = AllPairs[CurrStage][0].Player2.Skill; CPU.Accuracy = AllPairs[CurrStage][0].Player2.Accuracy; Players[2].Name = AllPairs[CurrStage][0].Player2.Name; MDown = false; FromGame = true; gotoAndPlay ("GameStart"); }; ScreenX = TourneyScreen._x; ScreenY = TourneyScreen._y; ScreenOffsetX = (ScreenOffsetY = 0); Mouse.show();
Frame 13
adBox._visible = false; switch (Phase) { case 1 : if (FromGame) { Tourney[CurrStage + 1].push(Players[1]); AllPairs[CurrStage + 1][Math.floor(CurrMatch / 2)].Player1 = Players[1]; AllPairs[CurrStage + 1][Math.floor(CurrMatch / 2)].Square1.Name = Players[1].Name; AllPairs[CurrStage][CurrMatch].Square1.gotoAndStop(3); AllPairs[CurrStage][CurrMatch].Square2.gotoAndStop(4); Frame3Squares.push(AllPairs[CurrStage][CurrMatch].Square1._name); Frame4Squares.push(AllPairs[CurrStage][CurrMatch].Square2._name); FromGame = false; Phase = 2; } else if (AllPairs[CurrStage][CurrMatch].Player1 != Players[1]) { Player1Score = (AllPairs[CurrStage][CurrMatch].Player1.Skill + (AllPairs[CurrStage][CurrMatch].Player1.Accuracy * 2)) + random(3); Player2Score = (AllPairs[CurrStage][CurrMatch].Player2.Skill + (AllPairs[CurrStage][CurrMatch].Player2.Accuracy * 2)) + random(3); if (Player1Score > Player2Score) { MatchWinner = AllPairs[CurrStage][CurrMatch].Player1; AllPairs[CurrStage][CurrMatch].Square1.gotoAndStop(3); AllPairs[CurrStage][CurrMatch].Square2.gotoAndStop(4); Frame3Squares.push(AllPairs[CurrStage][CurrMatch].Square1._name); Frame4Squares.push(AllPairs[CurrStage][CurrMatch].Square2._name); } else { MatchWinner = AllPairs[CurrStage][CurrMatch].Player2; AllPairs[CurrStage][CurrMatch].Square2.gotoAndStop(3); AllPairs[CurrStage][CurrMatch].Square1.gotoAndStop(4); Frame3Squares.push(AllPairs[CurrStage][CurrMatch].Square2._name); Frame4Squares.push(AllPairs[CurrStage][CurrMatch].Square1._name); } Tourney[CurrStage + 1].push(MatchWinner); if (SO.data.SoundOn) { ClickSound.start(); } if ((CurrMatch % 2) == 0) { AllPairs[CurrStage + 1][Math.floor(CurrMatch / 2)].Player1 = MatchWinner; AllPairs[CurrStage + 1][Math.floor(CurrMatch / 2)].Square1.Name = MatchWinner.Name; } else { AllPairs[CurrStage + 1][Math.floor(CurrMatch / 2)].Player2 = MatchWinner; AllPairs[CurrStage + 1][Math.floor(CurrMatch / 2)].Square2.Name = MatchWinner.Name; } Phase = 2; } else { AllPairs[CurrStage][0].Square1.gotoAndStop(2); AllPairs[CurrStage][0].Square2.gotoAndStop(2); PlayButton._visible = true; if (Key.isDown(37)) { ScreenOffsetX = ScreenOffsetX + 10; } if (Key.isDown(39)) { ScreenOffsetX = ScreenOffsetX - 10; } if (Key.isDown(38)) { ScreenOffsetY = ScreenOffsetY + 10; } if (Key.isDown(40)) { ScreenOffsetY = ScreenOffsetY - 10; } } break; case 2 : if (CurrMatch < (AllPairs[CurrStage].length - 1)) { CurrMatch++; } else { CurrMatch = 0; CurrStage++; } NextPair = AllPairs[CurrStage][CurrMatch]; MoveToX = (220 - AllPairs[CurrStage][CurrMatch].Square1._x) + ((AllPairs[CurrStage][CurrMatch].Square2._x - AllPairs[CurrStage][CurrMatch].Square1._x) / 2); MoveToY = (250 - AllPairs[CurrStage][CurrMatch].Square1._y) + ((AllPairs[CurrStage][CurrMatch].Square2._y - AllPairs[CurrStage][CurrMatch].Square1._y) / 2); Steps = 10; StepX = (MoveToX - TourneyScreen._x) / Steps; StepY = (MoveToY - TourneyScreen._y) / Steps; Counter = 0; Phase = 3; break; case 3 : Counter++; if (Counter >= 10) { Counter = 0; AllPairs[CurrStage][CurrMatch].Square1.gotoAndStop(2); AllPairs[CurrStage][CurrMatch].Square2.gotoAndStop(2); Phase = 4; } break; case 4 : ScreenX = ScreenX + StepX; ScreenY = ScreenY + StepY; Counter++; if (Counter < Steps) { break; } Phase = 1; } TourneyScreen._x = ScreenX + ScreenOffsetX; TourneyScreen._y = ScreenY + ScreenOffsetY;
Frame 14
adBox._visible = false; gotoAndPlay ("TournamentCycle");
Frame 15
adBox._visible = false; stop(); i = 1; while (i <= 9) { this["OS" + i].Name = Opponents[i].Name; this["OS" + i].SkillStars.gotoAndStop(Opponents[i].Skill); this["OS" + i].AccuracyStars.gotoAndStop(Opponents[i].Accuracy); this["OS" + i].Played = NumberFormat(SO.data.CPUPlayers[i].Played, 0); this["OS" + i].Won = SO.data.CPUPlayers[i].Won; this["OS" + i].Ind = i; this["OS" + i].onPress = function () { SelectOpponent(this.Ind); }; i++; } Mouse.show(); ItsATourney = false; Butt.Txt = "TO MAIN MENU"; Butt.onPress = function () { gotoAndStop ("MainMenu"); };
Frame 16
adBox._visible = false; IsDenied = false; GameNotAvailable = false; CancelButt.Txt = "CANCEL"; MB._visible = false; GamesListOffset = 0; CancelButt.onPress = function () { LeaveLoginScreen(); if (Connected) { Connected = false; Con.close(); delete onEnterFrame; } gotoAndStop ("MainMenu"); }; GuestLoginButt.Txt = "LOG IN AS GUEST"; GuestLoginButt.onPress = function () { if (GuestName.text.length == 0) { OpenMB(3); } else { LoginSend("0" + EncodeSpecial(GuestName.text)); } YourName = GuestName.text; YouAreGuest = true; }; SignInButt.Txt = "SIGN IN"; SignInButt.onPress = function () { YourName = SignInName.text; Players[1].Name = SignInName.text; YouAreGuest = false; if (SignInName.text.length == 0) { OpenMB(6); } else if (SignInPass.text.length == 0) { OpenMB(7); } else { LoginSend((("6" + EncodeSpecial(SignInName.text)) + "|") + EncodeSpecial(SignInPass.text)); } }; RegisterButt.Txt = "REGISTER THIS NAME"; RegisterButt.onPress = function () { YourName = SignInName.text; Players[1].Name = SignInName.text; YouAreGuest = false; if (SignInName.text.length == 0) { OpenMB(6); } else if (SignInPass.text.length == 0) { OpenMB(7); } else { LoginSend((("7" + EncodeSpecial(SignInName.text)) + "|") + EncodeSpecial(SignInPass.text)); } }; UpdateLoginCBs(); CBName.onPress = function () { SO.data.RememberLoginName = !SO.data.RememberLoginName; SO.flush(); UpdateLoginCBs(); }; CBPass.onPress = function () { SO.data.RememberLoginPass = !SO.data.RememberLoginPass; SO.flush(); UpdateLoginCBs(); }; if (SO.data.RememberLoginName) { SignInName.text = SO.data.LoginName; } if (SO.data.RememberLoginPass) { SignInPass.text = SO.data.LoginPass; } SignInName.onChanged = function () { if (SO.data.RememberLoginName) { SO.data.LoginName = SignInName.text; } }; SignInPass.onChanged = function () { if (SO.data.RememberLoginPass) { SO.data.LoginPass = SignInPass.text; } }; GuestName.onChanged = function () { SO.data.Player1Name = GuestName.text; Players[1].Name = GuestName.text; }; GuestName.text = SO.data.Player1Name;
Frame 17
adBox._visible = false; gotoAndStop ("MultiplayerLogin");
Frame 18
this.onEnterFrame = function () { if (adBox._visible) { adBox._visible = false; } }; AdLoader.loadClip((("http://server.cpmstar.com/adviewas2.swf?poolid=" + CPMStarPoolID) + "&subpoolid=") + CPMStarSubPoolID, adBox); adBox._visible = false; GameStarted = false; HasGame = false; MB._visible = false; CreateButt.Txt = "CREATE GAME"; CreateButt.onPress = function () { Con.send("1"); MessageText = "WAITING FOR AN OPPONENT TO JOIN.."; HasGame = true; gotoAndStop ("Waiting"); }; CancelButt.Txt = "LOG OUT"; CancelButt.onPress = function () { Con.close(); Connected = false; delete onEnterFrame; gotoAndStop ("MainMenu"); }; UpdateGames(); PrevButt.onPress = function () { GamesListOffset = GamesListOffset - 8; UpdateGames(); }; NextButt.onPress = function () { GamesListOffset = GamesListOffset + 8; UpdateGames(); }; if (IsDenied) { OpenMB(5); IsDenied = false; } if (GameNotAvailable) { OpenMB(4); GameNotAvailable = false; } UpdatePoints(); NameText = YourName; if (YouAreGuest) { StatButt._visible = false; } else { StatButt.onPress = function () { RequestInfo(YourID); }; }
Frame 19
this.onEnterFrame = function () { if (!adBox._visible) { adBox._visible = true; } }; CancelButt.Txt = "CANCEL"; CancelButt.onPress = function () { Con.send("5"); gotoAndStop ("Lobby"); };
Frame 20
adBox._visible = false; Mouse.show(); MessageText = "THE OPPONENT HAS LEFT THE GAME"; OKButt.Txt = "OK"; OKButt.onPress = function () { if (HasGame) { MessageText = "WAITING FOR AN OPPONENT TO JOIN..."; gotoAndStop ("Waiting"); } else { gotoAndStop ("Lobby"); } }; GameStarted = false;
Frame 21
adBox._visible = false; OKButt.Txt = "OK"; OKButt.onPress = function () { gotoAndStop ("MainMenu"); };
Frame 22
this.onEnterFrame = function () { if (adBox._visible) { adBox._visible = false; } }; AcceptButt.Txt = "ACCEPT"; AcceptButt.onPress = function () { MDown = false; YourTurn = false; gotoAndPlay ("GameStart"); }; DenyButt.Txt = "REJECT"; DenyButt.onPress = function () { Con.send("4"); MessageText = "WAITING FOR AN OPOPNENT TO JOIN..."; gotoAndStop ("Waiting"); };
Frame 23
adBox._visible = false; MonthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; NameText = InfoArray[0]; InfoArray[1] = Number(InfoArray[1]); R = PointsToRank(InfoArray[1]); RankText = "Rank: " + R; PointsText = "Points: " + NumberFormat(InfoArray[1], 0); PointsNextLevelText = "Needed for the next rank: " + NumberFormat(Math.pow(R, 2) - InfoArray[1], 0); PlayedText = "Games Played: " + NumberFormat(Number(InfoArray[2]), 0); WonText = "Games Won: " + NumberFormat(Number(InfoArray[3]), 0); LostText = "Games Lost: " + NumberFormat(Number(InfoArray[4]), 0); Now = new Date(); InFlashFormat = Number(InfoArray[5]) * 1000; Reg = new Date(); Reg.setTime(InFlashFormat); RegisteredText = ((((((("Registered: " + MonthNames[Reg.getMonth()]) + " ") + Reg.getDate()) + " ") + Reg.getFullYear()) + " (") + Math.floor((Now - InFlashFormat) / 86400000)) + " days ago)"; i = 0; while (i < 10) { InArr = 6 + (i * 2); if ((InArr < InfoArray.length) and (InfoArray[InArr] != "")) { this["Game" + i] = "vs. " + InfoArray[InArr]; if (InfoArray[InArr + 1] == "1") { this["Game" + i] = this["Game" + i] + " (won)"; } else { this["Game" + i] = this["Game" + i] + " (lost)"; } } else { this["Game" + i] = ""; } i++; } BackButt.Txt = "BACK"; BackButt.onPress = function () { gotoAndStop ("Lobby"); };
Frame 24
adBox._visible = false; Butt1.Txt = "PLAY THIS GAME AT\rSUGAR-FREE-GAMES.COM"; Butt1.onPress = function () { getURL ("http://www.sugar-free-games.com/showgame.php?game=2441", "_blank"); }; Butt2.Txt = "BACK"; Butt2.onPress = function () { gotoAndStop(GoBack); };
Frame 25
function RotateBall(Ball, XRot, YRot, ZRot) { var x; var y; var z; var InitX; var Visible; var Arr; var a; var Nexti; var TopLineStart; var TopLineEnd; var BottomLineStart; var BottomLineEnd; var i; var MidX; var MidZ; var ConnectEnds; var AngleToMid; var To; var VarName; var StartFrom; Ball.XRot = Ball.XRot + XRot; Ball.YRot = Ball.YRot + YRot; Ball.ZRot = Ball.ZRot + ZRot; Ball.XRot = Ball.XRot % dblPI; Ball.ZRot = Ball.ZRot % dblPI; Ball.YRot = Ball.YRot % dblPI; Ball.Symbol.Stripe.clear(); Ball.Symbol.Stripe.lineStyle(0, 0, 0); var TopLine = new Array(); var BottomLine = new Array(); var NumCircle = new Array(); i = 0; while (i < Ball.Points.length) { x = (Math.sin(YRot) * Ball.Points[i].z) + (Math.cos(YRot) * Ball.Points[i].x); z = (Math.cos(YRot) * Ball.Points[i].z) - (Math.sin(YRot) * Ball.Points[i].x); y = (Math.sin(XRot) * z) + (Math.cos(XRot) * Ball.Points[i].y); z = (Math.cos(XRot) * z) - (Math.sin(XRot) * Ball.Points[i].y); InitX = x; x = (Math.sin(ZRot) * y) + (Math.cos(ZRot) * x); y = (Math.cos(ZRot) * y) - (Math.sin(ZRot) * InitX); Visible = y >= 0; if (Ball.Points[i].Type == 3) { NumCircle.push({x:x, y:y, z:z, Visible:Visible}); } if (Ball.Points[i].Type == 1) { TopLine.push({x:x, y:y, z:z, Visible:Visible}); } if (Ball.Points[i].Type == 2) { BottomLine.push({x:x, y:y, z:z, Visible:Visible}); } Ball.Points[i].x = x; Ball.Points[i].y = y; Ball.Points[i].z = z; i++; } if (Ball.Type == 1) { StartFrom = 1; } else { StartFrom = 3; } a = StartFrom; while (a <= 3) { if (a == 1) { Arr = "TopLine"; } if (a == 2) { Arr = "BottomLine"; } if (a == 3) { Arr = "NumCircle"; } this[Arr + "Start"] = undefined; this[Arr + "End"] = undefined; i = 0; while (i < eval (Arr).length) { if (i < (eval (Arr).length - 1)) { Nexti = i + 1; } else { Nexti = 0; } if (eval (Arr)[i].Visible != eval (Arr)[Nexti].Visible) { if (eval (Arr)[Nexti].Visible) { To = eval (Arr)[i]; this[Arr + "Start"] = i; VarName = Arr + "StartAngle"; eval (Arr)[i].StartEnd = 1; } else { To = eval (Arr)[Nexti]; this[Arr + "End"] = Nexti; VarName = Arr + "EndAngle"; eval (Arr)[Nexti].StartEnd = 2; } AngleToMid = CalcAngle(0, 0, To.x, To.z); this[VarName] = AngleToMid; } i++; } if ((this[Arr + "Start"] == undefined) and (!eval (Arr)[0].Visible)) { this[Arr + "Exists"] = false; } else { this[Arr + "Exists"] = true; } a++; } if (Ball.Type == 1) { Ball.Symbol.Stripe.beginFill(Ball.StripeColor); if ((this.TopLineStart == undefined) and this.TopLineExists) { this.TopLineEnd = (this.TopLineStart = Math.floor(StripeDivs / 2)); this.TopLineStartAngle = (this.TopLineEndAngle = CalcAngle(0, 0, TopLine[this.TopLineStart].x, TopLine[this.TopLineStart].z)); } if ((this.BottomLineEnd == undefined) and this.BottomLineExists) { this.BottomLineEnd = (this.BottomLineStart = Math.floor(StripeDivs / 2)); this.BottomLineStartAngle = (this.BottomLineEndAngle = CalcAngle(0, 0, BottomLine[this.BottomLineStart].x, BottomLine[this.BottomLineStart].z)); } if (this.TopLineExists) { ConnectEnds = this.TopLineStart == this.TopLineEnd; Ball.Symbol.Stripe.moveTo(TopLine[this.TopLineStart].x, TopLine[this.TopLineStart].z); i = 0; while (i < StripeDivs) { Nexti = this.TopLineStart + i; if (Nexti >= TopLine.length) { Nexti = Nexti - TopLine.length; } if (TopLine[Nexti].Visible or (TopLine[Nexti].StartEnd > 0)) { Ball.Symbol.Stripe.lineTo(TopLine[Nexti].x, TopLine[Nexti].z); } i++; } if (ConnectEnds) { Ball.Symbol.Stripe.lineTo(TopLine[this.TopLineEnd].x, TopLine[this.TopLineEnd].z); } if (this.BottomLineExists) { FillGap(this.TopLineEndAngle, this.BottomLineEndAngle, Ball.Symbol.Stripe); } else { FillGap(this.TopLineStartAngle, this.TopLineEndAngle, Ball.Symbol.Stripe); } } else { Ball.Symbol.Stripe.moveTo(BottomLine[this.BottomLineStart].x, BottomLine[this.BottomLineStart].z); } if (this.BottomLineExists) { ConnectEnds = this.BottomLineStart == this.BottomLineEnd; i = 0; while (i < StripeDivs) { Nexti = this.BottomLineEnd - i; if (Nexti < 0) { Nexti = Nexti + BottomLine.length; } if (BottomLine[Nexti].Visible or (BottomLine[Nexti].StartEnd > 0)) { Ball.Symbol.Stripe.lineTo(BottomLine[Nexti].x, BottomLine[Nexti].z); } i++; } if (ConnectEnds) { Ball.Symbol.Stripe.lineTo(BottomLine[this.BottomLineStart].x, BottomLine[this.BottomLineStart].z); } if (this.TopLineExists) { FillGap(this.BottomLineStartAngle, this.TopLineStartAngle, Ball.Symbol.Stripe); } else { FillGap(this.BottomLineStartAngle, this.BottomLineEndAngle, Ball.Symbol.Stripe); } } Ball.Symbol.Stripe.endFill(); } if (((Ball.Type == 1) or (Ball.Type == 2)) and this.NumCircleExists) { Ball.Symbol.Stripe.beginFill(14540236); if (this.NumCircleStart == undefined) { this.NumCircleEnd = (this.NumCircleStart = 0); } Ball.Symbol.Stripe.moveTo(NumCircle[this.NumCircleStart].x, NumCircle[this.NumCircleStart].z); i = 0; while (i < NumCircleDivs) { Nexti = i + this.NumCircleStart; if (Nexti >= NumCircle.length) { Nexti = Nexti - NumCircle.length; } if (NumCircle[Nexti].Visible) { Ball.Symbol.Stripe.lineTo(NumCircle[Nexti].x, NumCircle[Nexti].z); } i++; } if (this.NumCircleStart != this.NumCircleEnd) { FillGap(this.NumCircleEndAngle, this.NumCircleStartAngle, Ball.Symbol.Stripe); } Ball.Symbol.Stripe.endFill(); if (Ball.Points[0].y > 0) { Ball.Symbol.Num._visible = true; NCRot = CalcAngle(NumCircle[BottomNC].x, NumCircle[BottomNC].z, NumCircle[TopNC].x, NumCircle[TopNC].z); NCVert = CalcDistance(NumCircle[BottomNC].x, NumCircle[BottomNC].z, NumCircle[TopNC].x, NumCircle[TopNC].z); NCHor = CalcDistance(NumCircle[LeftNC].x, NumCircle[LeftNC].z, NumCircle[RightNC].x, NumCircle[RightNC].z); Ball.Symbol.Num._rotation = NCRot * Rad2Deg; Ball.Symbol.Num._yscale = (NCVert / (NumCircleRadius * 2)) * 100; Ball.Symbol.Num._xscale = (NCHor / (NumCircleRadius * 2)) * 100; Ball.Symbol.Num._x = Ball.Points[0].x; Ball.Symbol.Num._y = Ball.Points[0].z; } else { Ball.Symbol.Num._visible = false; } } else { Ball.Symbol.Num._visible = false; } } function FillGap(StartAngle, EndAngle, Symbol) { var _local5; var _local2; var _local1; var _local4; var _local3; _local4 = AngleDifference(StartAngle, EndAngle); if (_local4 == 0) { _local4 = dblPI; } if (_local4 < 0) { _local4 = dblPI + _local4; } _local3 = Math.abs(Math.ceil(_local4 / 1)); _local5 = _local4 / _local3; _local1 = 0; while (_local1 <= _local3) { _local2 = StartAngle + (_local1 * _local5); Symbol.lineTo(Math.sin(_local2) * OutsideRadius, -(Math.cos(_local2) * OutsideRadius)); _local1++; } } function DrawPoint(Draw, x, y) { Draw.moveTo(x - 0.5, y); Draw.lineTo(x + 0.5, y); Draw.moveTo(x, y - 0.5); Draw.lineTo(x, y + 0.5); } function AddBall(BallNum, x, y) { var _local1; var _local8; var _local3; var _local2; _local2 = Balls.length; BallSymbolIndex++; BallsClip.BallSample.duplicateMovieClip("B" + BallSymbolIndex, BallsClip.getNextHighestDepth()); Shadows.ShadowSample.duplicateMovieClip("S" + BallSymbolIndex, Shadows.getNextHighestDepth()); Balls[_local2] = new Object(); Balls[_local2].Shadow = Shadows["S" + BallSymbolIndex]; Balls[_local2].Symbol = BallsClip["B" + BallSymbolIndex]; Balls[_local2].Points = new Array(); Balls[_local2].XRot = 0; Balls[_local2].YRot = 0; Balls[_local2].ZRot = 0; if (BallNum == 0) { Balls[_local2].BGColor = 14540236 /* 0xDDDDCC */; Balls[_local2].Type = 3; } if (Game == 1) { switch (BallNum) { case 1 : Balls[_local2].BGColor = 14526976 /* 0xDDAA00 */; break; case 2 : Balls[_local2].BGColor = 221; break; case 3 : Balls[_local2].BGColor = 14483456 /* 0xDD0000 */; break; case 4 : Balls[_local2].BGColor = 8913032 /* 0x880088 */; break; case 5 : Balls[_local2].BGColor = 14509568 /* 0xDD6600 */; break; case 6 : Balls[_local2].BGColor = 34816; break; case 7 : Balls[_local2].BGColor = 8921600 /* 0x882200 */; break; case 8 : Balls[_local2].BGColor = 2236962 /* 0x222222 */; break; case 9 : Balls[_local2].StripeColor = 14526976 /* 0xDDAA00 */; break; case 10 : Balls[_local2].StripeColor = 221; break; case 11 : Balls[_local2].StripeColor = 14483456 /* 0xDD0000 */; break; case 12 : Balls[_local2].StripeColor = 8913032 /* 0x880088 */; break; case 13 : Balls[_local2].StripeColor = 14509568 /* 0xDD6600 */; break; case 14 : Balls[_local2].StripeColor = 34816; break; case 15 : Balls[_local2].StripeColor = 8921600 /* 0x882200 */; } if ((BallNum > 0) and (BallNum <= 8)) { Balls[_local2].Type = 2; } if (BallNum > 8) { Balls[_local2].Type = 1; Balls[_local2].BGColor = 14540236 /* 0xDDDDCC */; } } else { Balls[_local2].Type = 3; } Balls[_local2].BGCol = new Color(Balls[_local2].Symbol.BG); Balls[_local2].BGCol.setRGB(Balls[_local2].BGColor); _local3 = Math.sqrt(Math.pow(BallRadius, 2) - Math.pow(StripeHeight, 2)); if ((Balls[_local2].Type == 1) or (Balls[_local2].Type == 2)) { Balls[_local2].Symbol.Num._visible = true; Balls[_local2].Symbol.Num.gotoAndStop(BallNum); Balls[_local2].Points[0] = {x:0, y:BallRadius, z:0, Type:4}; _local8 = Math.sqrt(Math.pow(BallRadius, 2) - Math.pow(NumCircleRadius, 2)); _local1 = 0; while (_local1 < NumCircleDivs) { Balls[_local2].Points[_local1 + 1] = {x:Math.sin(_local1 * NumCircleStep) * NumCircleRadius, y:_local8, z:-(Math.cos(_local1 * NumCircleStep) * NumCircleRadius), Type:3}; _local1++; } } else { Balls[_local2].Symbol.Num._visible = false; } if (Balls[_local2].Type == 1) { _local1 = 0; while (_local1 < StripeDivs) { Balls[_local2].Points[(_local1 + NumCircleDivs) + 1] = {x:Math.sin(_local1 * StripeStep) * _local3, y:Math.cos(_local1 * StripeStep) * _local3, z:-StripeHeight, Type:1}; Balls[_local2].Points[((_local1 + StripeDivs) + NumCircleDivs) + 1] = {x:Math.sin(_local1 * StripeStep) * _local3, y:Math.cos(_local1 * StripeStep) * _local3, z:StripeHeight, Type:2}; _local1++; } } Balls[_local2].Shadow._x = (Balls[_local2].Symbol._x = (Balls[_local2].x = x)); Balls[_local2].Shadow._y = (Balls[_local2].Symbol._y = (Balls[_local2].y = y)); Balls[_local2].Speed = 0; Balls[_local2].Angle = 0; Balls[_local2].Num = BallNum; RotateBall(Balls[_local2], 0, Math.random() * dblPI, 0); return(_local2); } function DrawPoint(x, y, Col) { Draw.lineStyle(1, Col, 100); Draw.moveTo(x - 1, y); Draw.lineTo(x + 1, y); Draw.moveTo(x, y - 1); Draw.lineTo(x, y + 1); } delete onEnterFrame; adBox._visible = false; MusicSign._visible = false; SFGLogo.onPress = function () { getURL ("http://www.sugar-free-games.com", "_blank"); }; if (Mode != 3) { YourTurn = false; } if ((Mode == 3) and YourTurn) { Cue._visible = false; } MusteSounds = true; SwitchPlayers(); HitTwice = false; FirstHit = 0; BlackIn = 0; LastActionNum = 0; Actions = new Array(); GameStarted = true; ReceivedHits = new Array(); UpdateSigns(); SoundSign.onPress = function () { SO.data.SoundOn = !SO.data.SoundOn; UpdateSigns(); SO.flush(); MDown = false; }; MusicSign.onPress = function () { SO.data.MusicOn = !SO.data.MusicOn; UpdateSigns(); SO.flush(); MDown = false; }; ExitButt.onPress = function () { DisplayExitDialogue(); }; ExitScreen._visible = false; PleaseWait._visible = false; AllStopped = false; Power = 0; Cue.Inside._y = BallRadius; CueBallPocketed = false; PocketedNow = new Array(); PrevAllStopped = true; if (CPU.Skill < 3) { CPU.MaxLevels = 1; } else { CPU.MaxLevels = 2; } Players[1].BallType = 0; Players[2].BallType = 0; Players[1].PocketedBalls = 0; Players[2].PocketedBalls = 0; PC1._visible = false; PC2._visible = false; Balls = new Array(); BallSymbolIndex = -1; BallsClip.BallSample._visible = false; Shadows.ShadowSample._visible = false; Formation = CreateFormation(); AddBall(0, HeadString, VerticalMiddle); CueBall = Balls[0]; i = 0; while (i <= 14) { AddBall(Formation[i].Ball, Formation[i].x, Formation[i].y); i++; } FallingBalls = new Array(); UpdateBoards(); Player1Name = Players[1].Name; Player2Name = Players[2].Name; Message = ""; this.createEmptyMovieClip("Draw", this.getNextHighestDepth()); Draw.lineStyle(1, 16711680, 100); ExitFree._visible = false; LastMove = new Date();
Frame 26
adBox._visible = false; if (!Paused) { BallsSound = new Array(); BordersSound = new Array(); if (!AllStopped) { Physics(Balls, false); if (SO.data.SoundOn and (BallsSound.length > 0)) { TotalPower = 0; TotalX = 0; for (bh in BallsSound) { TotalPower = TotalPower + BallsSound[bh].Power; TotalX = TotalX + BallsSound[bh].x; } AverageX = TotalX / BallsSound.length; BallHitsBallSound.setVolume(Math.round(TotalPower * 1.5)); BallHitsBallSound.setPan(Math.round((AverageX - 370) / 3.5)); BallHitsBallSound.start(); } if (SO.data.SoundOn and (BordersSound.length > 0)) { TotalPower = 0; TotalX = 0; for (bh in BordersSound) { TotalPower = TotalPower + BordersSound[bh].Power; TotalX = TotalX + BordersSound[bh].x; } AverageX = TotalX / BordersSound.length; BallHitsBorderSound.setVolume(Math.round(TotalPower * 1.5)); BallHitsBorderSound.setPan(Math.round((AverageX - 370) / 3.5)); BallHitsBorderSound.start(); } } for (b in FallingBalls) { FallingBalls[b].Symbol._x = FallingBalls[b].Symbol._x + FallingBalls[b].MoveX; FallingBalls[b].Symbol._y = FallingBalls[b].Symbol._y + FallingBalls[b].MoveY; FallingBalls[b].Shadow._x = FallingBalls[b].Symbol._x; FallingBalls[b].Shadow._y = FallingBalls[b].Symbol._y; Brightness = 20 + (FallingBalls[b].Steps * 16); FallingBalls[b].Col.setTransform({ra:Brightness, rb:0, ga:Brightness, gb:0, ba:Brightness, bb:0}); FallingBalls[b].Steps--; if (FallingBalls[b].Steps == 0) { FallingBalls.splice(b, 1); } } if (AllStopped) { if (!PrevAllStopped) { Message = ""; Fault = 0; if (Game == 1) { if (PocketedNow.length == 0) { if (HitTwice) { HitTwice = false; } else { Fault = 4; } } if ((Player.BallType > 0) and (CheckBallType(FirstHit) != Player.BallType)) { Fault = 1; } if (PocketedNow.length > 0) { HitTwice = false; if (!((PocketedNow.length == 1) and (PocketedNow[0] == 0))) { Message = Player.Name + " pockets "; } MessageAddition = ""; i = 0; while (i < PocketedNow.length) { if ((Player.BallType == 0) and (((PocketedNow[i] > 0) and (PocketedNow[i] < 8)) or (PocketedNow[i] > 8))) { if (PocketedNow[i] < 8) { Player.BallType = 2; Opponent.BallType = 1; MessageAddition = (Player.Name + "'s balls are solids.") + "\r"; } else { Player.BallType = 1; Opponent.BallType = 2; MessageAddition = (Player.Name + "'s balls are stripes.") + "\r"; } } if ((Player.BallType != 0) and (CheckBallType(PocketedNow[i]) == Player.BallType)) { Player.PocketedBalls++; } else { Fault = 3; } if ((Player.BallType != 0) and (CheckBallType(PocketedNow[i]) == Opponent.BallType)) { Opponent.PocketedBalls++; } if ((Player.PocketedBalls == 7) and (Player.BallType != 3)) { Player.BallType = 3; MessageAddition = MessageAddition + ((Player.Name + " goes on 8.") + "\r"); } if ((Opponent.PocketedBalls == 7) and (Opponent.BallType != 3)) { Opponent.BallType = 3; MessageAddition = MessageAddition + ((Opponent.Name + " goes on 8.") + "\r"); } if (PocketedNow[i] != 0) { Message = Message + PocketedNow[i]; if ((i < (PocketedNow.length - 1)) and (!((i == (PocketedNow.length - 2)) and (PocketedNow[i + 1] == 0)))) { Message = Message + ", "; } } i++; } if (!((PocketedNow.length == 1) and (PocketedNow[0] == 0))) { Message = Message + ".\r"; } Message = Message + MessageAddition; if (CueBallPocketed) { Fault = 2; } } if ((BlackIn > 0) and (Fault == 0)) { EndGame(1); } if ((BlackIn > 0) and (Fault > 0)) { EndGame(2); } if (BlackIn == 0) { if (Fault > 0) { if (((Fault != 4) and (Opponent.BallType != 3)) and (Opponent.BallType != 0)) { HitTwice = true; } if (Fault != 4) { Message = Message + "FAULT!!! "; id(SO.data.SoundOn); FaultSound.start(); } if (Fault == 1) { Message = Message + ((Player.Name + " scratches.") + "\r"); } if (Fault == 2) { Message = Message + (((((Player.Name + " pockets the cue ball.") + "\r") + Opponent.Name) + ", place the cue ball.") + "\r"); } if (Fault == 3) { Message = Message + ((Player.Name + " pockets an opponent's ball.") + "\r"); } SwitchPlayers(); } } PocketedNow = new Array(); } FirstHit = 0; BlackIn = 0; } UpdateBoards(); if (YourTurn or (Mode == 1)) { if (CueBallPocketed) { PlaceCueBall(_xmouse, _ymouse); if (MDown) { PlaceCue = 3; } if (PrevMDown and (!MDown)) { CueBallPocketed = false; UpdateBoards(); if (Mode == 3) { LastActionNum++; Actions[LastActionNum] = (((("9" + _xmouse) + "|") + _ymouse) + "|") + LastActionNum; Con.send(Actions[LastActionNum]); LastMove = new Date(); } } } else { Cue._visible = true; Angle = CalcAngle(CueBall.x, CueBall.y, _xmouse, _ymouse); Cue._x = CueBall.x; Cue._y = CueBall.y; Rot = Angle * Rad2Deg; Cue._rotation = Rot; Cue.Inside.gotoAndStop(Math.round(Rot)); if (MDown) { if (!PrevMDown) { Power = 0; } Power = Power + 3; if (Power > 100) { Power = 100; } Cue.Inside._y = BallRadius + Power; } else if (PrevMDown and (!ExitScreen._visible)) { if (Mode == 3) { Angle = Math.round(Angle * 10000) / 10000; } CueBall.Angle = Angle; CueBall.Speed = Power; Cue.Inside._y = BallRadius; AllStopped = false; if (Mode == 3) { LastActionNum++; Actions[LastActionNum] = (((("8" + Angle) + "|") + Power) + "|") + LastActionNum; Con.send(Actions[LastActionNum]); LastMove = new Date(); } if (SO.data.SoundOn) { CueSound.setVolume(Math.round(Power * 1.5)); CueSound.setPan(Math.round((CueBall.x - 370) / 3.5)); CueSound.start(); } } } } else { PleaseWait._visible = true; if (Mode == 3) { if (ReceivedHits.length > 0) { Angle = ReceivedHits[0].Angle; Power = ReceivedHits[0].Power; OpponentPhase = 4; ReceivedHits.shift(); } } if (Mode == 2) { if (OpponentPhase == 0) { if (CueBallPocketed) { Ang = Math.random() * dblPI; Dis = random(50); PlaceCueBall(HeadString + (Math.sin(Ang) * Dis), VerticalMiddle - (Math.cos(Ang) * Dis)); PlaceCue = 3; CueBallPocketed = false; UpdateBoards(); } Targets = new Array(); i = 0; while (i <= CPU.MaxLevels) { Targets[i] = new Array(); i++; } p = 1; while (p < Pockets.length) { if ((p == 2) or (p == 5)) { PVal = -10; PM = 0.9; OutsideMiddle = true; } else { PVal = 0; PM = 1; OutsideMiddle = false; } Targets[0].push({StartX:Pockets[p].StartEnterX, StartY:Pockets[p].StartEnterY, EndX:Pockets[p].EndEnterX, EndY:Pockets[p].EndEnterY, Pocket:Pockets[p], Points:PVal, PowerMultiplier:PM, OutsideMiddle:OutsideMiddle, Type:2}); Targets[0].push({StartX:Pockets[p].StartInsideX, StartY:Pockets[p].StartInsideY, EndX:Pockets[p].EndInsideX, EndY:Pockets[p].EndInsideY, Pocket:Pockets[p], Points:10, OutsideMiddle:false, Type:2}); p++; } CurrLevel = 0; OpponentPhase = 1; for (b in Balls) { BType = CheckBallType(Balls[b].Num); Balls[b].Hitable = ((Player.BallType != 0) and (BType == Player.BallType)) or (((Player.BallType == 0) and (BType >= 1)) and (BType <= 2)); } for (b in Balls) { Balls[b].Blocked = new Array(); } b = 0; while (b < (Balls.length - 1)) { bb = b + 1; while (bb < Balls.length) { if ((Balls[b] != CueBall) and (Balls[bb] != CueBall)) { DistanceBetweenBalls = CalcDistance(Balls[b].x, Balls[b].y, Balls[bb].x, Balls[bb].y); if (DistanceBetweenBalls < (BallDiameter * 2)) { AngleBetweenBalls = CalcAngle(Balls[b].x, Balls[b].y, Balls[bb].x, Balls[bb].y); AngleDiff = Math.acos((DistanceBetweenBalls / 2) / BallDiameter); Balls[b].Blocked.push({Start:AngleBetweenBalls - AngleDiff, End:AngleBetweenBalls + AngleDiff, Ball:Balls[bb]}); RevAngle = AngleBetweenBalls + Math.PI; while (RevAngle > dblPI) { RevAngle = RevAngle - dblPI; } Balls[bb].Blocked.push({Start:RevAngle - AngleDiff, End:RevAngle + AngleDiff, Ball:Balls[b]}); } } bb++; } b++; } TriedToHitAnything = false; b = 0; t = 0; Operations = 0; PossibleHits = new Array(); } if (OpponentPhase == 1) { while (true) { FoundAWay = false; if ((((((Balls[b] != Targets[CurrLevel][t].Ball) and (Targets[CurrLevel][t] instanceof Object)) and ((b == Targets[CurrLevel][t].DesignatedBall) or (Targets[CurrLevel][t].Type != 3))) and (Balls[b].Hitable or (CurrLevel != 0))) and ((Balls[b] == CueBall) or (CurrLevel != CPU.MaxLevels))) and ((Balls[b].Hitable or (Balls[b] == CueBall)) or (CurrLevel != (CPU.MaxLevels - 1)))) { Blocked = false; StartAngle = CalcAngle(Balls[b].x, Balls[b].y, Targets[CurrLevel][t].StartX, Targets[CurrLevel][t].StartY); EndAngle = CalcAngle(Balls[b].x, Balls[b].y, Targets[CurrLevel][t].EndX, Targets[CurrLevel][t].EndY); while (StartAngle > EndAngle) { StartAngle = StartAngle - dblPI; } AngleToStart = Targets[CurrLevel][t].AngleToStart; AngleToEnd = Targets[CurrLevel][t].AngleToEnd; if (Targets[CurrLevel][t].Type == 2) { SPDifference = Math.abs(AngleDifference(Targets[CurrLevel][t].Pocket.Angle, StartAngle)); EPDifference = Math.abs(AngleDifference(Targets[CurrLevel][t].Pocket.Angle, EndAngle)); } if (!((Targets[CurrLevel][t].Type == 2) and (((!Targets[CurrLevel][t].OutsideMiddle) and ((SPDifference <= halfPI) or (EPDifference <= halfPI))) or (Targets[CurrLevel][t].OutsideMiddle and ((SPDifference <= 2.19911485751286) or (EPDifference <= 2.19911485751286)))))) { Operations++; StartDistance = CalcDistance(Balls[b].x, Balls[b].y, Targets[CurrLevel][t].StartX, Targets[CurrLevel][t].StartY); EndDistance = CalcDistance(Balls[b].x, Balls[b].y, Targets[CurrLevel][t].EndX, Targets[CurrLevel][t].EndY); TargetStartX = Targets[CurrLevel][t].StartX; TargetStartY = Targets[CurrLevel][t].StartY; TargetEndX = Targets[CurrLevel][t].EndX; TargetEndY = Targets[CurrLevel][t].EndY; if (Targets[CurrLevel][t].Type == 1) { AngleFromTarget = CalcAngle(Targets[CurrLevel][t].Ball.x, Targets[CurrLevel][t].Ball.y, Balls[b].x, Balls[b].y); DistanceToTarget = CalcDistance(Targets[CurrLevel][t].Ball.x, Targets[CurrLevel][t].Ball.y, Balls[b].x, Balls[b].y); Alpha = Math.acos(BallDiameter / DistanceToTarget); StartLimit = AngleFromTarget + Alpha; EndLimit = AngleFromTarget - Alpha; if ((((StartLimit != undefined) and (EndLimit != undefined)) and (Targets[CurrLevel][t].AngleToStart != undefined)) and (Targets[CurrLevel][t].AngleToEnd != undefined)) { Blocked = true; FixStart = false; FixEnd = false; StartFallsBetween = AngleFallsBetween(Targets[CurrLevel][t].AngleToStart, EndLimit, StartLimit); EndFallsBetween = AngleFallsBetween(Targets[CurrLevel][t].AngleToEnd, EndLimit, StartLimit); if (StartFallsBetween and EndFallsBetween) { Blocked = false; } if (EndFallsBetween and (!StartFallsBetween)) { FixStart = true; } if (StartFallsBetween and (!EndFallsBetween)) { FixEnd = true; } if (AngleFallsBetween(StartLimit, Targets[CurrLevel][t].AngleToEnd, Targets[CurrLevel][t].AngleToStart) and AngleFallsBetween(EndLimit, Targets[CurrLevel][t].AngleToEnd, Targets[CurrLevel][t].AngleToStart)) { FixStart = true; FixEnd = true; } if (FixStart) { AngleToStart = StartLimit; TargetStartX = Targets[CurrLevel][t].Ball.x + (Math.sin(StartLimit) * BallDiameter); TargetStartY = Targets[CurrLevel][t].Ball.y - (Math.cos(StartLimit) * BallDiameter); NewStartAngle = CalcAngle(Balls[b].x, Balls[b].y, TargetStartX, TargetStartY); NewStartAngle = MakeSimilar(NewStartAngle, StartAngle); StartAngle = NewStartAngle; Blocked = false; } if (FixEnd) { AngleToEnd = EndLimit; TargetEndX = Targets[CurrLevel][t].Ball.x + (Math.sin(EndLimit) * BallDiameter); TargetEndY = Targets[CurrLevel][t].Ball.y - (Math.cos(EndLimit) * BallDiameter); NewEndAngle = CalcAngle(Balls[b].x, Balls[b].y, TargetEndX, TargetEndY); NewEndAngle = MakeSimilar(NewEndAngle, EndAngle); EndAngle = NewEndAngle; Blocked = false; } if (FixStart or FixEnd) { while (StartAngle > EndAngle) { StartAngle = StartAngle - dblPI; } StartDistance = CalcDistance(Balls[b].x, Balls[b].y, TargetStartX, TargetStartY); EndDistance = CalcDistance(Balls[b].x, Balls[b].y, TargetEndX, TargetEndY); Blocked = false; } } } if (!Blocked) { bb = 0; while (bb < Balls.length) { Balls[bb].AngleFromCurrent = CalcAngle(Balls[b].x, Balls[b].y, Balls[bb].x, Balls[bb].y); Balls[bb].DistanceFromCurrent = CalcDistance(Balls[b].x, Balls[b].y, Balls[bb].x, Balls[bb].y); Balls[bb].DistanceFromTarget = CalcDistance(Targets[CurrLevel][t].Ball.x, Targets[CurrLevel][t].Ball.y, Balls[bb].x, Balls[bb].y); bb++; } bb = 0; while (bb < Balls.length) { if ((bb != b) and (Balls[bb] != Targets[CurrLevel][t].Ball)) { Perp = StartAngle + halfPI; XShift = Math.sin(Perp) * BallDiameter; YShift = Math.cos(Perp) * BallDiameter; HitPoint = SegmentHitsSegment(Balls[b].x, Balls[b].y, TargetStartX, TargetStartY, Balls[bb].x - XShift, Balls[bb].y + YShift, Balls[bb].x + XShift, Balls[bb].y - YShift); if (((HitPoint.x != undefined) and (CalcDistance(Balls[bb].x, Balls[bb].y, HitPoint.x, HitPoint.y) < BallDiameter)) or ((CalcDistance(TargetStartX, TargetStartY, Balls[bb].x, Balls[bb].y) < BallDiameter) and (Targets[CurrLevel][t].Type != 1))) { AngleShift = Math.asin(BallDiameter / Balls[bb].DistanceFromCurrent); NewStartAngle = Balls[bb].AngleFromCurrent + AngleShift; while (NewStartAngle < StartAngle) { NewStartAngle = NewStartAngle + dblPI; } StartAngle = NewStartAngle; NewStartAngle = MakeSimilar(NewStartAngle, StartAngle); TargetStartX = Balls[b].x + (Math.sin(StartAngle) * StartDistance); TargetStartY = Balls[b].y - (Math.cos(StartAngle) * StartDistance); if (StartAngle > EndAngle) { break; } } } bb++; } bb = 0; while (bb < Balls.length) { if ((bb != b) and (Balls[bb] != Targets[CurrLevel][t].Ball)) { Perp = EndAngle - halfPI; XShift = Math.sin(Perp) * BallDiameter; YShift = Math.cos(Perp) * BallDiameter; HitPoint = SegmentHitsSegment(Balls[b].x, Balls[b].y, TargetEndX, TargetEndY, Balls[bb].x - XShift, Balls[bb].y + YShift, Balls[bb].x + XShift, Balls[bb].y - YShift); if (((HitPoint.x != undefined) and (CalcDistance(Balls[bb].x, Balls[bb].y, HitPoint.x, HitPoint.y) < BallDiameter)) or ((CalcDistance(TargetEndX, TargetEndY, Balls[bb].x, Balls[bb].y) < BallDiameter) and (Targets[CurrLevel][t].Type != 1))) { AngleShift = Math.asin(BallDiameter / Balls[bb].DistanceFromCurrent); NewEndAngle = Balls[bb].AngleFromCurrent - AngleShift; while (NewEndAngle > EndAngle) { NewEndAngle = NewEndAngle - dblPI; } NewEndAngle = MakeSimilar(NewEndAngle, EndAngle); EndAngle = NewEndAngle; TargetEndX = Balls[b].x + (Math.sin(EndAngle) * EndDistance); TargetEndY = Balls[b].y - (Math.cos(EndAngle) * EndDistance); if (EndAngle < StartAngle) { break; } } } bb++; } for (br in Borders) { if ((Targets[CurrLevel][t].Border != br) or (Targets[CurrLevel][t].Type != 3)) { StartHitPoint = SegmentHitsSegment(Balls[b].x, Balls[b].y, TargetStartX, TargetStartY, Borders[br].StartX, Borders[br].StartY, Borders[br].EndX, Borders[br].EndY); EndHitPoint = SegmentHitsSegment(Balls[b].x, Balls[b].y, TargetEndX, TargetEndY, Borders[br].StartX, Borders[br].StartY, Borders[br].EndX, Borders[br].EndY); Point2 = undefined; if (StartHitPoint.x != undefined) { Point2 = SegmentHitsSegment(TargetStartX, TargetStartY, TargetEndX, TargetEndY, Borders[br].StartX, Borders[br].StartY, Borders[br].EndX, Borders[br].EndY); if ((Point2.x != undefined) and (EndHitPoint.x == undefined)) { TargetStartX = Point2.x; TargetStartY = Point2.y; } else { TargetStartX = Borders[br].EndX; TargetStartY = Borders[br].EndY; } NewStartAngle = CalcAngle(Balls[b].x, Balls[b].y, TargetStartX, TargetStartY); while (NewStartAngle < StartAngle) { NewStartAngle = NewStartAngle + dblPI; } NewStartAngle = MakeSimilar(NewStartAngle, StartAngle); StartAngle = NewStartAngle; } if (EndHitPoint.x != undefined) { if (Point2 == undefined) { Point2 = SegmentHitsSegment(TargetStartX, TargetStartY, TargetEndX, TargetEndY, Borders[br].StartX, Borders[br].StartY, Borders[br].EndX, Borders[br].EndY); } if ((Point2.x != undefined) and (StartHitPoint.x == undefined)) { TargetEndX = Point2.x; TargetEndY = Point2.y; } else { TargetEndX = Borders[br].StartX; TargetEndY = Borders[br].StartY; } NewEndAngle = CalcAngle(Balls[b].x, Balls[b].y, TargetEndX, TargetEndY); while (NewEndAngle > EndAngle) { NewEndAngle = NewEndAngle - dblPI; } NewEndAngle = MakeSimilar(NewEndAngle, EndAngle); EndAngle = NewEndAngle; } } } StartAngle = MakeSimilar(StartAngle, EndAngle); if (((StartAngle <= EndAngle) and ((EndAngle - StartAngle) <= Math.PI)) and (!Blocked)) { if (Targets[CurrLevel][t].Type == 1) { AngleToStart = CalcAngle(Targets[CurrLevel][t].Ball.x, Targets[CurrLevel][t].Ball.y, TargetStartX, TargetStartY); AngleToEnd = CalcAngle(Targets[CurrLevel][t].Ball.x, Targets[CurrLevel][t].Ball.y, TargetEndX, TargetEndY); while (AngleToEnd > AngleToStart) { AngleToEnd = AngleToEnd - dblPI; } CurrX = Targets[CurrLevel][t].Ball.x; CurrY = Targets[CurrLevel][t].Ball.y - BallRadius; a = 0.01; while (a <= dblPI) { PrevX = CurrX; PrevY = CurrY; CurrX = Targets[CurrLevel][t].Ball.x + (Math.sin(a) * BallRadius); CurrY = Targets[CurrLevel][t].Ball.y - (Math.cos(a) * BallRadius); IsBlocked = false; for (bl in Targets[CurrLevel][t].Ball.Blocked) { if ((Targets[CurrLevel][t].Ball.Blocked[bl].Ball != Balls[b]) and AngleFallsBetween(a, Targets[CurrLevel][t].Ball.Blocked[bl].Start, Targets[CurrLevel][t].Ball.Blocked[bl].End)) { IsBlocked = true; break; } } a = a + 0.01; } for (bl in Targets[CurrLevel][t].Ball.Blocked) { if (((Targets[CurrLevel][t].Ball.Blocked[bl].Ball != Balls[b]) and AngleFallsBetween(AngleToStart, Targets[CurrLevel][t].Ball.Blocked[bl].Start, Targets[CurrLevel][t].Ball.Blocked[bl].End)) or (AngleFallsBetween(Targets[CurrLevel][t].Ball.Blocked[bl].Start, AngleToEnd, AngleToStart) and AngleFallsBetween(Targets[CurrLevel][t].Ball.Blocked[bl].End, AngleToEnd, AngleToStart))) { NewAngleToStart = Targets[CurrLevel][t].Ball.Blocked[bl].Start; while (NewAngleToStart > AngleToStart) { NewAngleToStart = NewAngleToStart - dblPI; } NewAngleToStart = MakeSimilar(NewAngleToStart, AngleToStart); AngleToStart = NewAngleToStart; } if (AngleFallsBetween(AngleToEnd, Targets[CurrLevel][t].Ball.Blocked[bl].Start, Targets[CurrLevel][t].Ball.Blocked[bl].End)) { NewAngleToEnd = Targets[CurrLevel][t].Ball.Blocked[bl].End; while (NewAngleToEnd < AngleToEnd) { NewAngleToEnd = NewAngleToEnd + dblPI; } NewAngleToEnd = MakeSimilar(NewAngleToEnd, AngleToEnd); AngleToEnd = NewAngleToEnd; } } if (AngleToStart < AngleToEnd) { Blocked = true; } else { TargetStartX = Targets[CurrLevel][t].Ball.x + (Math.sin(AngleToStart) * BallDiameter); TargetStartY = Targets[CurrLevel][t].Ball.y - (Math.cos(AngleToStart) * BallDiameter); TargetEndX = Targets[CurrLevel][t].Ball.x + (Math.sin(AngleToEnd) * BallDiameter); TargetEndY = Targets[CurrLevel][t].Ball.y - (Math.cos(AngleToEnd) * BallDiameter); NewStartAngle = CalcAngle(Balls[b].x, Balls[b].y, TargetStartX, TargetStartY); StartAngle = MakeSimilar(NewStartAngle, StartAngle); NewEndAngle = CalcAngle(Balls[b].x, Balls[b].y, TargetEndX, TargetEndY); EndAngle = MakeSimilar(NewEndAngle, EndAngle); } } if (!Blocked) { FoundAWay = true; if (Balls[b] == CueBall) { if (Targets[CurrLevel][t].Ball.Hitable or (Targets[CurrLevel][t].Type == 3)) { PossibleHits.push({Type:1, Ball:CueBall, Start:StartAngle, End:EndAngle, Points:0, Next:Targets[CurrLevel][t], Distance:(StartDistance + EndDistance) / 2}); } } else { RevStart = StartAngle + Math.PI; RevEnd = EndAngle + Math.PI; NewStartX = Balls[b].x + (Math.sin(RevEnd) * BallDiameter); NewStartY = Balls[b].y - (Math.cos(RevEnd) * BallDiameter); NewEndX = Balls[b].x + (Math.sin(RevStart) * BallDiameter); NewEndY = Balls[b].y - (Math.cos(RevStart) * BallDiameter); Targets[CurrLevel + 1].push({StartX:NewStartX, StartY:NewStartY, EndX:NewEndX, EndY:NewEndY, Ball:Balls[b], Next:Targets[CurrLevel][t], AngleToStart:RevEnd, AngleToEnd:RevStart, Distance:(StartDistance + EndDistance) / 2, Type:1}); } } } } } if (((CPU.Skill > 3) and (!FoundAWay)) or (CPU.Skill == 5)) { Operations++; ReflectBorders = new Array(); if (Targets[CurrLevel][t].Type == 1) { if (AngleFallsBetween(Targets[CurrLevel][t].AngleToStart, 4.71238898038469, halfPI)) { ReflectBorders.push(0, 1); } else { ReflectBorders.push(3, 4); } if (AngleFallsBetween(Targets[CurrLevel][t].AngleToStart, 0, Math.PI)) { ReflectBorders.push(2); } else { ReflectBorders.push(5); } if (AngleFallsBetween(Targets[CurrLevel][t].AngleToEnd, 4.71238898038469, halfPI)) { ReflectBorders.push(0, 1); } else { ReflectBorders.push(3, 4); } if (AngleFallsBetween(Targets[CurrLevel][t].AngleToEnd, 0, Math.PI)) { ReflectBorders.push(2); } else { ReflectBorders.push(5); } rb = 0; while (rb < (ReflectBorders.length - 1)) { rb2 = rb + 1; while (rb2 < ReflectBorders.length) { if (ReflectBorders[rb] == ReflectBorders[rb2]) { ReflectBorders.splice(rb2, 1); rb2--; } rb2++; } rb++; } } if (Targets[CurrLevel][t].Type == 2) { for (rb in Targets[CurrLevel][t].Pocket.ReflectBorders) { ReflectBorders[rb] = Targets[CurrLevel][t].Pocket.ReflectBorders[rb]; } } for (rb in ReflectBorders) { TargetStartX = Targets[CurrLevel][t].StartX; TargetStartY = Targets[CurrLevel][t].StartY; TargetEndX = Targets[CurrLevel][t].EndX; TargetEndY = Targets[CurrLevel][t].EndY; TheBorder = Borders[ReflectBorders[rb]]; Start = BorderReflection(TheBorder, Balls[b].x, Balls[b].y, TargetStartX, TargetStartY); End = BorderReflection(TheBorder, Balls[b].x, Balls[b].y, TargetEndX, TargetEndY); ToStart = CalcAngle(Start.x, Start.y, TargetStartX, TargetStartY); ToEnd = CalcAngle(End.x, End.y, TargetEndX, TargetEndY); Blocked = (Math.abs(AngleDifference(TheBorder.Angle, ToStart)) > halfPI) or (Math.abs(AngleDifference(TheBorder.Angle, ToEnd)) > halfPI); if (!Blocked) { StartDistance = CalcDistance(Start.x, Start.y, TargetStartX, TargetStartY); EndDistance = CalcDistance(End.x, End.y, TargetStartX, TargetStartY); MinX = Math.min(TheBorder.StartX, TheBorder.EndX); MaxX = Math.max(TheBorder.StartX, TheBorder.EndX); MinY = Math.min(TheBorder.StartY, TheBorder.EndY); MaxY = Math.max(TheBorder.StartY, TheBorder.EndY); StartOut = false; if (Start.x < MinX) { StartOut = true; Start.x = MinX; } if (Start.x > MaxX) { StartOut = true; Start.x = MaxX; } if (Start.y < MinY) { StartOut = true; Start.y = MinY; } if (Start.y > MaxY) { StartOut = true; Start.y = MaxY; } EndOut = false; if (End.x < MinX) { EndOut = true; End.x = MinX; } if (End.x > MaxX) { EndOut = true; End.x = MaxX; } if (End.y < MinY) { EndOut = true; End.y = MinY; } if (End.y > MaxY) { EndOut = true; End.y = MaxY; } } if ((!StartOut) or (!EndOut)) { for (bb in Balls) { if ((bb != b) and (Balls[bb] != CueBall)) { Perp = CalcAngle(Start.x, Start.y, Balls[bb].x, Balls[bb].y) + halfPI; XShift = Math.sin(Perp) * BallDiameter; YShift = Math.cos(Perp) * BallDiameter; HitPoint = SegmentHitsSegment(Start.x, Start.y, TargetStartX, TargetStartY, Balls[bb].x - XShift, Balls[bb].y + YShift, Balls[bb].x + XShift, Balls[bb].y - YShift); if (((HitPoint.x != undefined) and (CalcDistance(Balls[bb].x, Balls[bb].y, HitPoint.x, HitPoint.y) < BallDiameter)) or ((Targets[CurrLevel][t].Ball != Balls[bb]) and (CalcDistance(TargetStartX, TargetStartY, Balls[bb].x, Balls[bb].y) < BallDiameter))) { ShiftPointX = Balls[bb].x + XShift; ShiftPointY = Balls[bb].y - YShift; Start = BorderReflection(TheBorder, Balls[b].x, Balls[b].y, ShiftPointX, ShiftPointY); Blocked = BlockedReflection(TheBorder, Start, End); if (Blocked) { break; } NewAngle = CalcAngle(Start.x, Start.y, ShiftPointX, ShiftPointY); TargetStartX = Start.x + (Math.sin(NewAngle) * StartDistance); TargetStartY = Start.y - (Math.cos(NewAngle) * StartDistance); } if (!Blocked) { HitPoint = SegmentHitsSegment(End.x, End.y, TargetEndX, TargetEndY, Balls[bb].x - XShift, Balls[bb].y + YShift, Balls[bb].x + XShift, Balls[bb].y - YShift); if (((HitPoint.x != undefined) and (CalcDistance(Balls[bb].x, Balls[bb].y, HitPoint.x, HitPoint.y) < BallDiameter)) or ((Targets[CurrLevel][t].Ball != Balls[bb]) and (CalcDistance(TargetEndX, TargetEndY, Balls[bb].x, Balls[bb].y) < BallDiameter))) { ShiftPointX = Balls[bb].x - XShift; ShiftPointY = Balls[bb].y + YShift; End = BorderReflection(TheBorder, Balls[b].x, Balls[b].y, ShiftPointX, ShiftPointY); Blocked = BlockedReflection(TheBorder, Start, End); if (Blocked) { break; } NewAngle = CalcAngle(Start.x, Start.y, ShiftPointX, ShiftPointY); TargetEndX = Start.x + (Math.sin(NewAngle) * EndDistance); TargetEndY = Start.y - (Math.cos(NewAngle) * EndDistance); } } } } if (!Blocked) { BordersToCheck = new Array(); if (((Targets[CurrLevel][t].Pocket == Pockets[2]) or (Targets[CurrLevel][t].Pocket == Pockets[5])) or (Targets[CurrLevel][t].Type != 2)) { br = 0; while (br <= 5) { BordersToCheck.push(Borders[br]); br++; } } else { BordersToCheck.push(Borders[2]); BordersToCheck.push(Borders[5]); BordersToCheck.push(LongBorders[0]); BordersToCheck.push(LongBorders[1]); } } if (!Blocked) { for (br in BordersToCheck) { if (((BordersToCheck[br] != TheBorder) and (!((BordersToCheck[br] == LongBorders[0]) and ((TheBorder == Borders[0]) or (TheBorder == Borders[1]))))) and (!((BordersToCheck[br] == LongBorders[1]) and ((TheBorder == Borders[3]) or (TheBorder == Borders[4]))))) { StartHitPoint = SegmentHitsSegment(Start.x, Start.y, TargetStartX, TargetStartY, BordersToCheck[br].StartX, BordersToCheck[br].StartY, BordersToCheck[br].EndX, BordersToCheck[br].EndY); EndHitPoint = SegmentHitsSegment(End.x, End.y, TargetEndX, TargetEndY, BordersToCheck[br].StartX, BordersToCheck[br].StartY, BordersToCheck[br].EndX, BordersToCheck[br].EndY); Point2 = undefined; if (StartHitPoint.x != undefined) { Point2 = SegmentHitsSegment(TargetStartX, TargetStartY, TargetEndX, TargetEndY, BordersToCheck[br].StartX, BordersToCheck[br].StartY, BordersToCheck[br].EndX, BordersToCheck[br].EndY); if ((Point2.x != undefined) and (EndHitPoint.x == undefined)) { TargetStartX = Point2.x; TargetStartY = Point2.y; } else { TargetStartX = BordersToCheck[br].EndX; TargetStartY = BordersToCheck[br].EndY; } Start = BorderReflection(TheBorder, Balls[b].x, Balls[b].y, TargetStartX, TargetStartY); Blocked = BlockedReflection(TheBorder, Start, End); if (Blocked) { break; } } if ((EndHitPoint.x != undefined) and (!Blocked)) { if (Point2 == undefined) { Point2 = SegmentHitsSegment(TargetStartX, TargetStartY, TargetEndX, TargetEndY, BordersToCheck[br].StartX, BordersToCheck[br].StartY, BordersToCheck[br].EndX, BordersToCheck[br].EndY); } if ((Point2.x != undefined) and (StartHitPoint.x == undefined)) { TargetEndX = Point2.x; TargetEndY = Point2.y; } else { TargetEndX = BordersToCheck[br].StartX; TargetEndY = BordersToCheck[br].StartY; } End = BorderReflection(TheBorder, Balls[b].x, Balls[b].y, TargetEndX, TargetEndY); Blocked = BlockedReflection(TheBorder, Start, End); if (Blocked) { break; } } } } } if (!Blocked) { Targets[CurrLevel].push({Type:3, Border:ReflectBorders[rb], StartX:End.x, StartY:End.y, EndX:Start.x, EndY:Start.y, DesignatedBall:b, Distance:(StartDistance + EndDistance) / 2, Next:Targets[CurrLevel][t]}); } } } } } t++; if ((Operations >= 20) or (t >= Targets[CurrLevel].length)) { Operations = 0; break; } } if (t >= Targets[CurrLevel].length) { t = 0; b++; if (b >= Balls.length) { b = 0; CurrLevel++; if (CurrLevel > CPU.MaxLevels) { OpponentPhase = 2; } } } } if (OpponentPhase == 2) { if (CPU.Skill > 1) { for (h in PossibleHits) { PossibleHits[h].Score = 0; CurrPoint = PossibleHits[h]; TotalDistance = PossibleHits[h].Distance; Hits = 1; Divider = 1; PrevTarget = CueBall; Multiplier = 1; while (CurrPoint.Next instanceof Object) { if (CurrPoint.PowerMultiplier != undefined) { Multiplier = Multiplier * CurrPoint.PowerMultiplier; } CurrPoint = CurrPoint.Next; if (CurrPoint.Points != undefined) { PossibleHits[h].Score = PossibleHits[h].Score + CurrPoint.Points; } if (CurrPoint.Distance != undefined) { TotalDistance = TotalDistance + CurrPoint.Distance; } AvX = CurrPoint.StartX + ((CurrPoint.EndX - CurrPoint.StartX) / 2); AvY = CurrPoint.StartY + ((CurrPoint.EndY - CurrPoint.StartY) / 2); if (CurrPoint.Type == 3) { Hits++; } if ((CurrPoint.AngleToStart != undefined) and (CurrPoint.AngleToEnd != undefined)) { Hits++; AverageAngle = CurrPoint.AngleToStart + ((CurrPoint.AngleToEnd - CurrPoint.AngleToStart) / 2); while (AverageAngle > dblPI) { AverageAngle = AverageAngle - dblPI; } AngleToHit = CalcAngle(PrevTarget.x, PrevTarget.y, AvX, AvY); AngleDiff = AngleDifference(AngleToHit, AverageAngle + Math.PI); Divider = Divider * Math.abs(Math.cos(AngleDiff)); } if (CurrPoint.Type == 1) { PrevTarget = CurrPoint.Ball; } else { PrevTarget = {x:CurrPoint.StartX + ((CurrPoint.EndX - CurrPoint.StartX) / 2), y:CurrPoint.StartY + ((CurrPoint.EndY - CurrPoint.StartY) / 2)}; } } if (TotalDistance >= Powers[60]) { PossibleHits[h].Power = 60; } else { p = 1; while (p <= 59) { if ((Powers[p - 1] < TotalDistance) and (Powers[p + 1] > TotalDistance)) { PossibleHits[h].Power = p + 1; break; } p++; } } PossibleHits[h].Power = PossibleHits[h].Power / Divider; PossibleHits[h].Power = PossibleHits[h].Power * Multiplier; PossibleHits[h].Power = PossibleHits[h].Power / Math.pow(0.95, Hits); PossibleHits[h].Power = PossibleHits[h].Power + 2; if (PossibleHits[h].Power == undefined) { PossibleHits[h].Power = 20 + random(40); } } } if (PossibleHits.length > 0) { for (i in PossibleHits) { Range = PossibleHits[i].End - PossibleHits[i].Start; if (Range > Math.PI) { Tmp = PossibleHits[i].Start; PossibleHits[i].Start = PossibleHits[i].End; PossibleHits[i].End = Tmp; Range = dblPI - Range; } PossibleHits[i].Score = PossibleHits[i].Score + (Range * 100); if (CPU.Skill > 1) { if (PossibleHits[i].Power > 60) { PossibleHits[i].Score = PossibleHits[i].Score - (PossibleHits[i].Power / 5); } else { PossibleHits[i].Score = PossibleHits[i].Score - (PossibleHits[i].Power / 20); } } PossibleHits[i].Average = PossibleHits[i].Start + (Range / 2); } PossibleHits.sortOn("Score", 18); PHCounter = 0; AbsCounter = 0; InitLength = PossibleHits.length; if (CPU.Skill > 4) { do { CheckBalls = new Array(); PocketedNow = new Array(); for (b in Balls) { CheckBalls[b] = new Object(); CheckBalls[b].x = Balls[b].x; CheckBalls[b].y = Balls[b].y; if (Balls[b] == CueBall) { CheckBalls[b].Speed = Math.min(PossibleHits[0].Power, 60); CheckBalls[b].Angle = PossibleHits[0].Average; } else { CheckBalls[b].Speed = 0; CheckBalls[b].Angle = 0; } CheckBalls[b].Num = Balls[b].Num; } CAS = false; while (!CAS) { Physics(CheckBalls, true); CAS = true; for (b in CheckBalls) { if (CheckBalls[b].Speed > 0) { CAS = false; break; } } } Flt = false; Nothing = false; if ((!TriedToHitAnything) and (PocketedNow.length == 0)) { Flt = true; Nothing = true; PossibleHits.shift(); PHCounter--; } CurrType = Player.BallType; for (pn in PocketedNow) { BT = CheckBallType(PocketedNow[pn]); if ((BT == 3) and (CurrType != 3)) { Flt = true; Nothing = true; PossibleHits.shift(); PHCounter--; break; } if (((CurrType > 0) and (BT != CurrType)) or (((CurrType == 0) and (BT != 1)) and (BT != 2))) { Flt = true; PossibleHits[0].Score = PossibleHits[0].Score - 10000; if (CurrType == 3) { PossibleHits.shift(); PHCounter--; Nothing = true; } } else { PossibleHits[0].Score = PossibleHits[0].Score + 9000; if (CurrType == 0) { CurrType = BT; } } } if (Flt and (!Nothing)) { if (PossibleHits[0].Score > -1000) { MvHit = PossibleHits.shift(); PossibleHits.push(MvHit); PHCounter++; } else { PossibleHits.shift(); PHCounter--; } } if ((PHCounter >= PossibleHits.length) or (PossibleHits.length == 0)) { PossibleHits.sortOn("Score", 18); break; } if (!Flt) { break; } AbsCounter++; } while (AbsCounter <= InitLength); } PocketedNow = new Array(); FirstHit = 0; AllStopped = true; if (PossibleHits.length > 0) { if (CPU.Skill == 5) { SelHit = PossibleHits[0]; } else { SelHit = PossibleHits[Math.min(random(6 - CPU.Skill), PossibleHits.length - 1)]; } Angle = SelHit.Average; if (CPU.Skill > 1) { Power = SelHit.Power; if (((CPU.Skill > 2) and (Player.BallType == 0)) or ((Player.BallType == 3) and (Opponent.BallType == 3))) { Power = Power * 2; } if (TriedToHitAnything) { Power = Power * 2; } if (Power > 60) { Power = 60; } } else { Power = 20 + random(40); } } } OpponentPhase = 3; if ((PossibleHits.length == 0) and TriedToHitAnything) { trace("No Hits"); if (CPU.Skill < 3) { Angle = Math.random() * dblPI; } else { for (bl in Balls) { TP = CheckBallType(Balls[b].Num); if (((Player.BallType > 0) and (TP == Player.BallType)) or (((Player.BallType == 0) and (TP > 0)) and (TP < 3))) { Angle = CalcAngle(CueBall.x, CueBall.y, Balls[b].x, Balls[b].y); break; } } } Power = 10 + random(20); } if ((PossibleHits.length == 0) and (!TriedToHitAnything)) { trace("*******Trying to hit anything"); Targets[CPU.MaxLevels] = new Array(); for (b in Balls) { if (Balls[b].Hitable) { AngleToBall = CalcAngle(CueBall.x, CueBall.y, Balls[b].x, Balls[b].y); Perp = AngleToBall + halfPI; XShift = Math.sin(Perp) * BallDiameter; YShift = Math.cos(Perp) * BallDiameter; Targets[CPU.MaxLevels].push({StartX:Balls[b].x - XShift, StartY:Balls[b].y + YShift, EndX:Balls[b].x + XShift, EndY:Balls[b].y - YShift, Ball:Balls[b], AngleToStart:dblPI, AngleToEnd:0, Type:1}); } } CurrLevel = CPU.MaxLevels; b = 0; t = 0; Operations = 0; OpponentPhase = 1; TriedToHitAnything = true; } } if (OpponentPhase == 3) { PowerError = (5 - CPU.Accuracy) * 3; Power = Power + ((PowerError * 1.5) - ((Math.random() * PowerError) * 2)); Power = Math.round(Power); if ((!Power) > 0) { Power = 20 + random(40); } if (((!Angle) > 0) and (Angle != 0)) { Angle = Math.random() * dblPI; } if (Power > 60) { Power = 60; } if (Power < 2) { Power = 2; } switch (CPU.Accuracy) { case 5 : if (CPU.Skill == 5) { AngleError = 0; } else { AngleError = 0.001; } break; case 4 : AngleError = 0.005; break; case 3 : AngleError = 0.01; break; case 2 : AngleError = 0.03; break; case 1 : AngleError = 0.09; } Angle = Angle + (AngleError - ((Math.random() * AngleError) * 2)); PleaseWait._visible = false; OpponentPhase = 4; } } if (OpponentPhase == 4) { PleaseWait._visible = false; Cue._visible = true; Cue._x = CueBall.x; Cue._y = CueBall.y; Rot = Angle * Rad2Deg; Cue._rotation = Rot; Cue.Inside.gotoAndStop(Math.round(Rot)); CurrPower = CurrPower + 2; Cue.Inside._y = BallRadius + CurrPower; if (CurrPower >= Power) { CueBall.Angle = Angle; CueBall.Speed = Power; Cue.Inside._y = BallRadius; AllStopped = false; OpponentPhase = 0; if (SO.data.SoundOn) { CueSound.setVolume(Math.round(Power * 1.5)); CueSound.setPan(Math.round((CueBall.x - 370) / 3.5)); CueSound.start(); } } } } PrevMDown = MDown; } else { Cue._visible = false; } } if (((((_ymouse >= TopOffset) and (_ymouse <= (TopOffset + 370))) and (!CueBallPocketed)) and (!Paused)) and (!ExitScreen._visible)) { Mouse.hide(); Cursor._visible = true; Cursor._x = _xmouse; Cursor._y = _ymouse; } else { Mouse.show(); Cursor._visible = false; } PrevAllStopped = AllStopped; if (Mode == 3) { Now = new Date(); PrevStatus = ExitFree._visible; ExitFree._visible = ((!YouAreGuest) and (!YourTurn)) and ((Now - LastMove) >= 60000); if ((!PrevStatus) and ExitFree._visible) { Con.send("D"); } if (PrevStatus and (!ExitFree._visible)) { Con.send("E"); } }
Frame 27
adBox._visible = false; gotoAndPlay ("Cycle");
Frame 28
adBox._visible = false; GameStarted = false; HasGame = false; Mouse.show(); Butt.Txt = "CONTINUE"; TitleText = Winner.Name.toUpperCase() + " WINS!"; if (Mode == 2) { if (ItsATourney) { if (Winner == Players[1]) { if (CurrStage == (AllPairs.length - 1)) { gotoAndStop ("WinTourney"); } else { if (SO.data.SoundOn) { WinSound.start(); } MessageText = ("You won the game against " + Players[2].Name) + " and can proceed to the next game. Congratulations!"; Butt.onPress = function () { gotoAndPlay ("Tournament"); }; } } else { if (SO.data.SoundOn) { LoseSound.start(); } MessageText = "You lost the game and have been eliminated from the tournament. Sorry."; Butt.onPress = function () { gotoAndStop ("MainMenu"); }; } } else { Butt.onPress = function () { gotoAndStop ("OpponentSelect"); }; } } if ((Mode == 2) or (Mode == 3)) { if (Winner == Players[1]) { WinLose.gotoAndStop(1); if (!ItsATourney) { MessageText = "You won this game. Congratulations!"; } if (SO.data.SoundOn and ((!ItsATourney) or (Mode != 2))) { WinSound.start(); } } else { WinLose.gotoAndStop(2); if (!ItsATourney) { MessageText = "You lost this game. Sorry."; } if (SO.data.SoundOn) { LoseSound.start(); } } } else { WinLose.gotoAndStop(1); MessageText = ("Congratulations " + Winner.Name) + "!"; Butt.onPress = function () { gotoAndStop ("MainMenu"); }; } if (Mode == 3) { Butt.onPress = function () { gotoAndStop ("Lobby"); }; }
Frame 29
adBox._visible = false; gotoAndStop ("MainMenu");
Frame 30
adBox._visible = false; WinScreen.gotoAndStop(TournamentType); ContButt.Txt = "TO MAIN MENU"; ContButt.onPress = function () { gotoAndStop ("MainMenu"); };
Symbol 14 MovieClip Frame 1
stop();
Symbol 16 MovieClip Frame 1
stop();
Symbol 22 MovieClip Frame 1
stop();
Symbol 22 MovieClip Frame 2
Butt.Txt = "PLAY"; Butt.onPress = function () { _parent.gotoAndPlay("InitStuff"); };
Symbol 44 Button
on (press) { getURL ("http://www.sugar-free-games.com", "_SELF"); }
Symbol 53 MovieClip Frame 100
_parent.gotoAndStop("MainMenu");
Symbol 134 MovieClip Frame 1
AbortButt.Txt = "ABORT CONNECTION"; AbortButt.onPress = function () { _root.Con.close(); _root.Connected = false; _root.MB._visible = false; _root.gotoAndStop("MultiplayerLogin"); _root.EnableAll(); };
Symbol 145 MovieClip Frame 1
JoinButt.Txt = "JOIN";
Symbol 271 MovieClip Frame 1
YesButt.Txt = "YES"; YesButt.onPress = function () { _parent.Paused = false; if ((_parent.Mode == 1) or (_parent.Mode == 2)) { _parent.gotoAndStop("MainMenu"); } if (_parent.Mode == 3) { _parent.Con.send("5"); _parent.gotoAndStop("Lobby"); } }; NoButt.Txt = "NO"; NoButt.onPress = function () { _parent.Paused = false; _parent.MDown = false; _parent.ExitScreen._visible = false; };
Symbol 294 MovieClip Frame 2
DayNames = ["Sunday", "Monday", "Tuesday", "Wednsday", "Thursday", "Friday", "Saturday"]; MonthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; Name = _parent.Players[1].Name; Time = new Date(); Day = Time.getDate(); if (((Day % 10) == 1) and ((Day < 10) or (Day > 20))) { Ending = "st"; } if (((Day % 10) == 2) and ((Day < 10) or (Day > 20))) { Ending = "nd"; } if (((Day % 10) == 3) and ((Day < 10) or (Day > 20))) { Ending = "rd"; } if (((Day % 10) > 3) or ((Day % 10) == 0)) { Ending = "th"; } DateTxt = ((((((DayNames[Time.getDay()] + ", ") + MonthNames[Time.getMonth()]) + " ") + Day) + Ending) + " ") + Time.getFullYear();
Symbol 294 MovieClip Frame 3
DayNames = ["Sunday", "Monday", "Tuesday", "Wednsday", "Thursday", "Friday", "Saturday"]; MonthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; Name = _parent.Players[1].Name; Time = new Date(); Day = Time.getDate(); if (((Day % 10) == 1) and ((Day < 10) or (Day > 20))) { Ending = "st"; } if (((Day % 10) == 2) and ((Day < 10) or (Day > 20))) { Ending = "nd"; } if (((Day % 10) == 3) and ((Day < 10) or (Day > 20))) { Ending = "rd"; } if (((Day % 10) > 3) or ((Day % 10) == 0)) { Ending = "th"; } DateTxt = ((((((DayNames[Time.getDay()] + ", ") + MonthNames[Time.getMonth()]) + " ") + Day) + Ending) + " ") + Time.getFullYear();

Library Items

Symbol 1 GraphicUsed by:22 52 248 294  Timeline
Symbol 2 GraphicUsed by:3
Symbol 3 MovieClipUses:2Used by:Timeline
Symbol 4 GraphicUsed by:Timeline
Symbol 5 GraphicUsed by:10
Symbol 6 FontUsed by:7 17 20 23 59 62 64 65 66 69 70 71 72 75 77 94 99 100 105 106 107 108 117 118 121 124 130 132 136 141 146 148 151 153 157 160 161 162 163 166 167 168 171 174 189 197 198 199 203 206 231 236 238 241 243 245 247 251 252 268 269 273 274 283 284 288 289
Symbol 7 TextUses:6Used by:10
Symbol 8 FontUsed by:9 51 58 61 67 68 95 96 97 98 109 110 115 116 119 133 142 154 158 169 170 172 173 175 176 177 178 179 180 181 182 183 184 185
Symbol 9 TextUses:8Used by:10
Symbol 10 MovieClipUses:5 7 9Used by:Timeline
Symbol 11 ShapeTweeningUsed by:14
Symbol 12 GraphicUsed by:14
Symbol 13 GraphicUsed by:14 44 214
Symbol 14 MovieClipUses:11 12 13Used by:22
Symbol 15 GraphicUsed by:16
Symbol 16 MovieClipUses:15Used by:22
Symbol 17 EditableTextUses:6Used by:22
Symbol 18 BitmapUsed by:19
Symbol 19 GraphicUses:18Used by:21 60
Symbol 20 EditableTextUses:6Used by:21
Symbol 21 MovieClipUses:19 20Used by:22  Timeline
Symbol 22 MovieClipUses:1 14 16 17 21Used by:Timeline
Symbol 23 TextUses:6Used by:Timeline
Symbol 24 BitmapUsed by:25 63 272
Symbol 25 GraphicUses:24Used by:Timeline
Symbol 26 Sound [click]Used by:Timeline
Symbol 27 Sound [lose]Used by:Timeline
Symbol 28 Sound [win]Used by:Timeline
Symbol 29 Sound [fault]Used by:Timeline
Symbol 30 Sound [switchplayer]Used by:Timeline
Symbol 31 Sound [pocket]Used by:Timeline
Symbol 32 Sound [cue]Used by:Timeline
Symbol 33 Sound [ballhitsborder]Used by:Timeline
Symbol 34 Sound [ballhitsball]Used by:Timeline
Symbol 35 BitmapUsed by:36
Symbol 36 GraphicUses:35Used by:37
Symbol 37 MovieClipUses:36Used by:53
Symbol 38 BitmapUsed by:39
Symbol 39 GraphicUses:38Used by:40
Symbol 40 MovieClipUses:39Used by:53
Symbol 41 FontUsed by:42
Symbol 42 TextUses:41Used by:43
Symbol 43 MovieClipUses:42Used by:53
Symbol 44 ButtonUses:13Used by:53
Symbol 45 BitmapUsed by:46
Symbol 46 GraphicUses:45Used by:47
Symbol 47 MovieClipUses:46Used by:53
Symbol 48 BitmapUsed by:49
Symbol 49 GraphicUses:48Used by:50
Symbol 50 MovieClipUses:49Used by:53
Symbol 51 TextUses:8Used by:53
Symbol 52 MovieClipUses:1Used by:53
Symbol 53 MovieClipUses:37 40 43 44 47 50 51 52Used by:Timeline
Symbol 54 BitmapUsed by:55
Symbol 55 GraphicUses:54Used by:Timeline
Symbol 56 GraphicUsed by:57
Symbol 57 MovieClipUses:56Used by:Timeline
Symbol 58 TextUses:8Used by:Timeline
Symbol 59 EditableTextUses:6Used by:60
Symbol 60 MovieClipUses:19 59Used by:Timeline
Symbol 61 TextUses:8Used by:Timeline
Symbol 62 EditableTextUses:6Used by:Timeline
Symbol 63 GraphicUses:24Used by:Timeline
Symbol 64 EditableTextUses:6Used by:Timeline
Symbol 65 EditableTextUses:6Used by:Timeline
Symbol 66 TextUses:6Used by:Timeline
Symbol 67 TextUses:8Used by:Timeline
Symbol 68 TextUses:8Used by:Timeline
Symbol 69 TextUses:6Used by:Timeline
Symbol 70 TextUses:6Used by:Timeline
Symbol 71 TextUses:6Used by:Timeline
Symbol 72 TextUses:6Used by:Timeline
Symbol 73 BitmapUsed by:74
Symbol 74 GraphicUses:73Used by:76 104 145
Symbol 75 EditableTextUses:6Used by:76
Symbol 76 MovieClipUses:74 75Used by:Timeline
Symbol 77 TextUses:6Used by:Timeline
Symbol 78 BitmapUsed by:79
Symbol 79 GraphicUses:78Used by:80
Symbol 80 MovieClipUses:79Used by:88
Symbol 81 FontUsed by:82 83 84 85 164 277 290
Symbol 82 EditableTextUses:81Used by:88
Symbol 83 EditableTextUses:81Used by:88
Symbol 84 EditableTextUses:81Used by:88
Symbol 85 EditableTextUses:81Used by:88
Symbol 86 GraphicUsed by:87
Symbol 87 MovieClipUses:86Used by:88
Symbol 88 MovieClipUses:80 82 83 84 85 87Used by:93
Symbol 89 GraphicUsed by:92
Symbol 90 FontUsed by:91
Symbol 91 TextUses:90Used by:92
Symbol 92 MovieClipUses:89 91Used by:93
Symbol 93 MovieClipUses:88 92Used by:Timeline
Symbol 94 EditableTextUses:6Used by:104
Symbol 95 TextUses:8Used by:104
Symbol 96 TextUses:8Used by:104
Symbol 97 TextUses:8Used by:104
Symbol 98 TextUses:8Used by:104
Symbol 99 EditableTextUses:6Used by:104
Symbol 100 EditableTextUses:6Used by:104
Symbol 101 GraphicUsed by:102
Symbol 102 MovieClipUses:101Used by:103
Symbol 103 MovieClipUses:102Used by:104
Symbol 104 MovieClipUses:74 94 95 96 97 98 99 100 103Used by:Timeline
Symbol 105 TextUses:6Used by:Timeline
Symbol 106 EditableTextUses:6Used by:Timeline
Symbol 107 EditableTextUses:6Used by:Timeline
Symbol 108 EditableTextUses:6Used by:Timeline
Symbol 109 TextUses:8Used by:Timeline
Symbol 110 TextUses:8Used by:Timeline
Symbol 111 GraphicUsed by:112
Symbol 112 MovieClipUses:111Used by:114
Symbol 113 GraphicUsed by:114
Symbol 114 MovieClipUses:112 113Used by:Timeline
Symbol 115 TextUses:8Used by:Timeline
Symbol 116 TextUses:8Used by:Timeline
Symbol 117 TextUses:6Used by:Timeline
Symbol 118 TextUses:6Used by:Timeline
Symbol 119 TextUses:8Used by:Timeline
Symbol 120 GraphicUsed by:Timeline
Symbol 121 TextUses:6Used by:Timeline
Symbol 122 BitmapUsed by:123
Symbol 123 GraphicUses:122Used by:134 271
Symbol 124 EditableTextUses:6Used by:134
Symbol 125 GraphicUsed by:127
Symbol 126 GraphicUsed by:127
Symbol 127 MovieClipUses:125 126Used by:134
Symbol 128 BitmapUsed by:129
Symbol 129 GraphicUses:128Used by:131
Symbol 130 EditableTextUses:6Used by:131
Symbol 131 MovieClipUses:129 130Used by:134 145 271
Symbol 132 EditableTextUses:6Used by:134
Symbol 133 EditableTextUses:8Used by:134
Symbol 134 MovieClipUses:123 124 127 131 132 133Used by:Timeline
Symbol 135 GraphicUsed by:Timeline
Symbol 136 EditableTextUses:6Used by:139
Symbol 137 FontUsed by:138 143 155
Symbol 138 EditableTextUses:137Used by:139
Symbol 139 MovieClipUses:136 138Used by:145
Symbol 140 GraphicUsed by:144 159
Symbol 141 EditableTextUses:6Used by:144
Symbol 142 TextUses:8Used by:144
Symbol 143 TextUses:137Used by:144
Symbol 144 MovieClipUses:140 141 142 143Used by:145
Symbol 145 MovieClipUses:74 139 144 131Used by:Timeline
Symbol 146 EditableTextUses:6Used by:Timeline
Symbol 147 GraphicUsed by:149
Symbol 148 TextUses:6Used by:149
Symbol 149 MovieClipUses:147 148Used by:Timeline
Symbol 150 GraphicUsed by:152
Symbol 151 TextUses:6Used by:152
Symbol 152 MovieClipUses:150 151Used by:Timeline
Symbol 153 EditableTextUses:6Used by:156
Symbol 154 EditableTextUses:8Used by:156
Symbol 155 TextUses:137Used by:156
Symbol 156 MovieClipUses:153 154 155Used by:Timeline
Symbol 157 EditableTextUses:6Used by:Timeline
Symbol 158 TextUses:8Used by:159
Symbol 159 MovieClipUses:140 158Used by:Timeline
Symbol 160 EditableTextUses:6Used by:Timeline
Symbol 161 EditableTextUses:6Used by:Timeline
Symbol 162 TextUses:6Used by:Timeline
Symbol 163 EditableTextUses:6Used by:Timeline
Symbol 164 TextUses:81Used by:Timeline
Symbol 165 SoundUsed by:Timeline
Symbol 166 TextUses:6Used by:Timeline
Symbol 167 EditableTextUses:6Used by:Timeline
Symbol 168 EditableTextUses:6Used by:Timeline
Symbol 169 EditableTextUses:8Used by:Timeline
Symbol 170 EditableTextUses:8Used by:Timeline
Symbol 171 EditableTextUses:6Used by:Timeline
Symbol 172 EditableTextUses:8Used by:Timeline
Symbol 173 EditableTextUses:8Used by:Timeline
Symbol 174 TextUses:6Used by:Timeline
Symbol 175 EditableTextUses:8Used by:Timeline
Symbol 176 EditableTextUses:8Used by:Timeline
Symbol 177 EditableTextUses:8Used by:Timeline
Symbol 178 EditableTextUses:8Used by:Timeline
Symbol 179 EditableTextUses:8Used by:Timeline
Symbol 180 EditableTextUses:8Used by:Timeline
Symbol 181 EditableTextUses:8Used by:Timeline
Symbol 182 EditableTextUses:8Used by:Timeline
Symbol 183 EditableTextUses:8Used by:Timeline
Symbol 184 EditableTextUses:8Used by:Timeline
Symbol 185 EditableTextUses:8Used by:Timeline
Symbol 186 GraphicUsed by:Timeline
Symbol 187 GraphicUsed by:188
Symbol 188 MovieClipUses:187Used by:248  Timeline
Symbol 189 EditableTextUses:6Used by:Timeline
Symbol 190 BitmapUsed by:191
Symbol 191 GraphicUses:190Used by:Timeline
Symbol 192 BitmapUsed by:193
Symbol 193 GraphicUses:192Used by:196
Symbol 194 BitmapUsed by:195 200
Symbol 195 GraphicUses:194Used by:196
Symbol 196 MovieClipUses:193 195Used by:Timeline
Symbol 197 EditableTextUses:6Used by:Timeline
Symbol 198 EditableTextUses:6Used by:Timeline
Symbol 199 EditableTextUses:6Used by:Timeline
Symbol 200 GraphicUses:194Used by:201
Symbol 201 MovieClipUses:200Used by:Timeline
Symbol 202 GraphicUsed by:204
Symbol 203 EditableTextUses:6Used by:204
Symbol 204 MovieClipUses:202 203Used by:Timeline
Symbol 205 GraphicUsed by:207
Symbol 206 EditableTextUses:6Used by:207
Symbol 207 MovieClipUses:205 206Used by:Timeline
Symbol 208 GraphicUsed by:Timeline
Symbol 209 BitmapUsed by:210
Symbol 210 GraphicUses:209Used by:211
Symbol 211 MovieClipUses:210Used by:212
Symbol 212 MovieClipUses:211Used by:Timeline
Symbol 213 GraphicUsed by:234
Symbol 214 MovieClipUses:13Used by:234
Symbol 215 MovieClipUsed by:234
Symbol 216 GraphicUsed by:232
Symbol 217 GraphicUsed by:232
Symbol 218 GraphicUsed by:232
Symbol 219 GraphicUsed by:232
Symbol 220 GraphicUsed by:232
Symbol 221 GraphicUsed by:232
Symbol 222 GraphicUsed by:232
Symbol 223 GraphicUsed by:232
Symbol 224 GraphicUsed by:232
Symbol 225 GraphicUsed by:232
Symbol 226 GraphicUsed by:232
Symbol 227 GraphicUsed by:232
Symbol 228 GraphicUsed by:232
Symbol 229 GraphicUsed by:232
Symbol 230 GraphicUsed by:232
Symbol 231 TextUses:6Used by:232
Symbol 232 MovieClipUses:216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231Used by:234
Symbol 233 GraphicUsed by:234
Symbol 234 MovieClipUses:213 214 215 232 233Used by:235
Symbol 235 MovieClipUses:234Used by:Timeline
Symbol 236 TextUses:6Used by:242
Symbol 237 GraphicUsed by:242
Symbol 238 EditableTextUses:6Used by:242
Symbol 239 GraphicUsed by:242
Symbol 240 GraphicUsed by:242
Symbol 241 EditableTextUses:6Used by:242
Symbol 242 MovieClipUses:236 237 238 239 240 241Used by:Timeline
Symbol 243 TextUses:6Used by:244
Symbol 244 MovieClipUses:243Used by:Timeline
Symbol 245 TextUses:6Used by:246
Symbol 246 MovieClipUses:245Used by:Timeline
Symbol 247 TextUses:6Used by:Timeline
Symbol 248 MovieClipUses:1 188Used by:Timeline
Symbol 249 GraphicUsed by:250
Symbol 250 MovieClipUses:249Used by:Timeline
Symbol 251 TextUses:6Used by:Timeline
Symbol 252 TextUses:6Used by:253
Symbol 253 MovieClipUses:252Used by:Timeline
Symbol 254 GraphicUsed by:264
Symbol 255 ShapeTweeningUsed by:264
Symbol 256 ShapeTweeningUsed by:264
Symbol 257 ShapeTweeningUsed by:264
Symbol 258 ShapeTweeningUsed by:264
Symbol 259 ShapeTweeningUsed by:264
Symbol 260 ShapeTweeningUsed by:264
Symbol 261 ShapeTweeningUsed by:264
Symbol 262 ShapeTweeningUsed by:264
Symbol 263 GraphicUsed by:264
Symbol 264 MovieClipUses:254 255 256 257 258 259 260 261 262 263Used by:265
Symbol 265 MovieClipUses:264Used by:Timeline
Symbol 266 GraphicUsed by:267
Symbol 267 MovieClipUses:266Used by:Timeline
Symbol 268 TextUses:6Used by:271
Symbol 269 TextUses:6Used by:270
Symbol 270 MovieClipUses:269Used by:271
Symbol 271 MovieClipUses:123 131 268 270Used by:Timeline
Symbol 272 GraphicUses:24Used by:Timeline
Symbol 273 EditableTextUses:6Used by:Timeline
Symbol 274 EditableTextUses:6Used by:Timeline
Symbol 275 GraphicUsed by:278
Symbol 276 GraphicUsed by:278
Symbol 277 TextUses:81Used by:278
Symbol 278 MovieClipUses:275 276 277Used by:Timeline
Symbol 279 BitmapUsed by:280
Symbol 280 GraphicUses:279Used by:294
Symbol 281 BitmapUsed by:282
Symbol 282 GraphicUses:281Used by:294
Symbol 283 EditableTextUses:6Used by:294
Symbol 284 EditableTextUses:6Used by:294
Symbol 285 GraphicUsed by:294
Symbol 286 BitmapUsed by:287
Symbol 287 GraphicUses:286Used by:294
Symbol 288 EditableTextUses:6Used by:294
Symbol 289 EditableTextUses:6Used by:294
Symbol 290 TextUses:81Used by:291
Symbol 291 MovieClipUses:290Used by:294
Symbol 292 BitmapUsed by:293
Symbol 293 GraphicUses:292Used by:294
Symbol 294 MovieClipUses:280 282 283 284 285 287 288 289 1 291 293Used by:Timeline
Symbol 295 SoundUsed by:Timeline

Instance Names

"adBox"Frame 1Symbol 3 MovieClip
"Loading"Frame 1Symbol 22 MovieClip
"SFGad"Frame 6Symbol 53 MovieClip
"B1"Frame 7Symbol 21 MovieClip
"B2"Frame 7Symbol 21 MovieClip
"B7"Frame 7Symbol 21 MovieClip
"B6"Frame 7Symbol 21 MovieClip
"B3"Frame 7Symbol 21 MovieClip
"B4"Frame 7Symbol 21 MovieClip
"B5"Frame 7Symbol 21 MovieClip
"B9"Frame 7Symbol 60 MovieClip
"B8"Frame 7Symbol 60 MovieClip
"PlayerName"Frame 7Symbol 62 EditableText
"Player1N"Frame 8Symbol 64 EditableText
"Player2N"Frame 8Symbol 65 EditableText
"PlayButt"Frame 8Symbol 21 MovieClip
"BackButt"Frame 8Symbol 21 MovieClip
"Butt1"Frame 9Symbol 21 MovieClip
"Butt2"Frame 9Symbol 21 MovieClip
"TS1"Frame 11Symbol 76 MovieClip
"TS2"Frame 11Symbol 76 MovieClip
"TS3"Frame 11Symbol 76 MovieClip
"TS4"Frame 11Symbol 76 MovieClip
"Butt"Frame 11Symbol 21 MovieClip
"TourneyScreen"Frame 12Symbol 93 MovieClip
"PlayButton"Frame 12Symbol 21 MovieClip
"OS1"Frame 15Symbol 104 MovieClip
"OS2"Frame 15Symbol 104 MovieClip
"OS3"Frame 15Symbol 104 MovieClip
"OS4"Frame 15Symbol 104 MovieClip
"OS5"Frame 15Symbol 104 MovieClip
"OS6"Frame 15Symbol 104 MovieClip
"OS7"Frame 15Symbol 104 MovieClip
"OS8"Frame 15Symbol 104 MovieClip
"OS9"Frame 15Symbol 104 MovieClip
"Butt"Frame 15Symbol 21 MovieClip
"SignInName"Frame 16Symbol 106 EditableText
"GuestName"Frame 16Symbol 107 EditableText
"SignInPass"Frame 16Symbol 108 EditableText
"CBName"Frame 16Symbol 114 MovieClip
"CBPass"Frame 16Symbol 114 MovieClip
"CancelButt"Frame 16Symbol 21 MovieClip
"GuestLoginButt"Frame 16Symbol 21 MovieClip
"SignInButt"Frame 16Symbol 21 MovieClip
"RegisterButt"Frame 16Symbol 21 MovieClip
"MB"Frame 16Symbol 134 MovieClip
"CreateButt"Frame 18Symbol 21 MovieClip
"I0"Frame 18Symbol 145 MovieClip
"I1"Frame 18Symbol 145 MovieClip
"I2"Frame 18Symbol 145 MovieClip
"I3"Frame 18Symbol 145 MovieClip
"I4"Frame 18Symbol 145 MovieClip
"I5"Frame 18Symbol 145 MovieClip
"I6"Frame 18Symbol 145 MovieClip
"I7"Frame 18Symbol 145 MovieClip
"CancelButt"Frame 18Symbol 21 MovieClip
"PrevButt"Frame 18Symbol 149 MovieClip
"NextButt"Frame 18Symbol 152 MovieClip
"RI"Frame 18Symbol 156 MovieClip
"StatButt"Frame 18Symbol 159 MovieClip
"adBox"Frame 18Symbol 3 MovieClip
"OKButt"Frame 20Symbol 21 MovieClip
"AcceptButt"Frame 22Symbol 21 MovieClip
"DenyButt"Frame 22Symbol 21 MovieClip
"BackButt"Frame 23Symbol 21 MovieClip
"Butt1"Frame 24Symbol 60 MovieClip
"Butt2"Frame 24Symbol 21 MovieClip
"PB1"Frame 25Symbol 196 MovieClip
"PB2"Frame 25Symbol 196 MovieClip
"ExitButt"Frame 25Symbol 201 MovieClip
"SoundSign"Frame 25Symbol 204 MovieClip
"MusicSign"Frame 25Symbol 207 MovieClip
"Shadows"Frame 25Symbol 212 MovieClip
"BallsClip"Frame 25Symbol 235 MovieClip
"BS1"Frame 25Symbol 242 MovieClip
"BS2"Frame 25Symbol 242 MovieClip
"ST1"Frame 25Symbol 244 MovieClip
"ST2"Frame 25Symbol 244 MovieClip
"PC2"Frame 25Symbol 246 MovieClip
"PC1"Frame 25Symbol 246 MovieClip
"SFGLogo"Frame 25Symbol 248 MovieClip
"PleaseWait"Frame 25Symbol 250 MovieClip
"ExitFree"Frame 25Symbol 253 MovieClip
"Cue"Frame 25Symbol 265 MovieClip
"Cursor"Frame 25Symbol 267 MovieClip
"ExitScreen"Frame 25Symbol 271 MovieClip
"Butt"Frame 28Symbol 21 MovieClip
"WinLose"Frame 28Symbol 278 MovieClip
"WinScreen"Frame 30Symbol 294 MovieClip
"ContButt"Frame 30Symbol 21 MovieClip
"LoadingBar"Symbol 22 MovieClip Frame 1Symbol 14 MovieClip
"Butt"Symbol 22 MovieClip Frame 2Symbol 21 MovieClip
"TSquareSample"Symbol 93 MovieClip Frame 1Symbol 88 MovieClip
"FinalSign"Symbol 93 MovieClip Frame 1Symbol 92 MovieClip
"SkillStars"Symbol 104 MovieClip Frame 1Symbol 103 MovieClip
"AccuracyStars"Symbol 104 MovieClip Frame 1Symbol 103 MovieClip
"AbortButt"Symbol 134 MovieClip Frame 1Symbol 131 MovieClip
"Butt1"Symbol 134 MovieClip Frame 2Symbol 131 MovieClip
"Name"Symbol 145 MovieClip Frame 1Symbol 139 MovieClip
"RankSign"Symbol 145 MovieClip Frame 1Symbol 144 MovieClip
"JoinButt"Symbol 145 MovieClip Frame 1Symbol 131 MovieClip
"ShadowSample"Symbol 212 MovieClip Frame 1Symbol 211 MovieClip
"BG"Symbol 234 MovieClip Frame 1Symbol 214 MovieClip
"Stripe"Symbol 234 MovieClip Frame 1Symbol 215 MovieClip
"Num"Symbol 234 MovieClip Frame 1Symbol 232 MovieClip
"BallSample"Symbol 235 MovieClip Frame 1Symbol 234 MovieClip
"Inside"Symbol 265 MovieClip Frame 1Symbol 264 MovieClip
"YesButt"Symbol 271 MovieClip Frame 1Symbol 131 MovieClip
"NoButt"Symbol 271 MovieClip Frame 1Symbol 131 MovieClip
"WarningMessage"Symbol 271 MovieClip Frame 1Symbol 270 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS1/AS2.
Protect (24)Timeline Frame 10 bytes ""
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 256, ScriptTimeout: 600 seconds
ExportAssets (56)Timeline Frame 5Symbol 26 as "click"
ExportAssets (56)Timeline Frame 5Symbol 27 as "lose"
ExportAssets (56)Timeline Frame 5Symbol 28 as "win"
ExportAssets (56)Timeline Frame 5Symbol 29 as "fault"
ExportAssets (56)Timeline Frame 5Symbol 30 as "switchplayer"
ExportAssets (56)Timeline Frame 5Symbol 31 as "pocket"
ExportAssets (56)Timeline Frame 5Symbol 32 as "cue"
ExportAssets (56)Timeline Frame 5Symbol 33 as "ballhitsborder"
ExportAssets (56)Timeline Frame 5Symbol 34 as "ballhitsball"

Labels

"Preloader"Frame 3
"InitStuff"Frame 5
"Logo"Frame 6
"MainMenu"Frame 7
"SetPlayerNames"Frame 8
"Instructions"Frame 9
"Rules"Frame 10
"TournamentSelect"Frame 11
"Tournament"Frame 12
"TournamentCycle"Frame 13
"OpponentSelect"Frame 15
"MultiplayerLogin"Frame 16
"Lobby"Frame 18
"Waiting"Frame 19
"OpponentLeft"Frame 20
"Disconnected"Frame 21
"AcceptOpponent"Frame 22
"InfoPage"Frame 23
"AccessDenied"Frame 24
"GameStart"Frame 25
"Cycle"Frame 26
"GameEnd"Frame 28
"WinTourney"Frame 30
"AbortButt"Symbol 134 MovieClip Frame 1

Dynamic Text Variables

PercentageTextSymbol 17 EditableText""
TxtSymbol 20 EditableText""
TxtSymbol 59 EditableText"<p align="center"></p>"
NameSymbol 75 EditableText""
NameSymbol 82 EditableText""
NameSymbol 83 EditableText""
NameSymbol 84 EditableText""
NameSymbol 85 EditableText""
NameSymbol 94 EditableText""
PlayedSymbol 99 EditableText"0"
WonSymbol 100 EditableText"0"
TitleSymbol 124 EditableText""
TxtSymbol 130 EditableText""
TitleSymbol 132 EditableText""
TextSymbol 133 EditableText""
TextSymbol 136 EditableText"AAAAAAAAAAAAAAAAAAA"
TextSymbol 138 EditableText"AAAAAAAAAAAAAAAAAAA"
RankTextSymbol 141 EditableText"Rank: 999"
AvGamesTxtSymbol 146 EditableText"AVAILABLE GAMES:"
RankTextSymbol 153 EditableText"Rank 99"
PointsTextSymbol 154 EditableText"Points Text"
NameTextSymbol 157 EditableText"AAAAAAAAAAAAAAAAAAA"
MessageTextSymbol 160 EditableText"WAITING FOR AAAAAAAAAAAAAAAAAAA'S RESPONSE..."
MessageTextSymbol 161 EditableText""
MessageTextSymbol 163 EditableText""
NameTextSymbol 167 EditableText"AAAAAAAAAAAAAAAAAAA"
RankTextSymbol 168 EditableText"AAAAAAAAAAAAAAAAAAA"
PointsTextSymbol 169 EditableText"AAAAAAAAAAAAAAAAAAA"
PointsNextLevelTextSymbol 170 EditableText"AAAAAAAAAAAAAAAAAAA"
PlayedTextSymbol 171 EditableText"AAAAAAAAAAAAAAAAAAA"
WonTextSymbol 172 EditableText"AAAAAAAAAAAAAAAAAAA"
LostTextSymbol 173 EditableText"AAAAAAAAAAAAAAAAAAA"
Game0Symbol 175 EditableText"AAAAAAAAAAAAAAAAAAA"
RegisteredTextSymbol 176 EditableText"AAAAAAAAAAAAAAAAAAA"
Game1Symbol 177 EditableText"AAAAAAAAAAAAAAAAAAA"
Game2Symbol 178 EditableText"AAAAAAAAAAAAAAAAAAA"
Game3Symbol 179 EditableText"AAAAAAAAAAAAAAAAAAA"
Game4Symbol 180 EditableText"AAAAAAAAAAAAAAAAAAA"
Game5Symbol 181 EditableText"AAAAAAAAAAAAAAAAAAA"
Game6Symbol 182 EditableText"AAAAAAAAAAAAAAAAAAA"
Game7Symbol 183 EditableText"AAAAAAAAAAAAAAAAAAA"
Game8Symbol 184 EditableText"AAAAAAAAAAAAAAAAAAA"
Game9Symbol 185 EditableText"AAAAAAAAAAAAAAAAAAA"
DenyMessageSymbol 189 EditableText"AAAAAAA AAAAAAA AAA"
Player1NameSymbol 197 EditableText""
Player2NameSymbol 198 EditableText""
MessageSymbol 199 EditableText""
TxtSymbol 203 EditableText"SOUND: OFF"
TxtSymbol 206 EditableText"MUSIC: OFF"
NumSymbol 238 EditableText"8"
TitleTextSymbol 273 EditableText""
MessageTextSymbol 274 EditableText""
NameSymbol 283 EditableText""
DateTxtSymbol 284 EditableText""
NameSymbol 288 EditableText"AAAAAAAAAAAAAAAAAAA"
DateTxtSymbol 289 EditableText"AAAAAA"




http://swfchan.com/22/108611/info.shtml
Created: 15/3 -2019 07:55:43 Last modified: 15/3 -2019 07:55:43 Server time: 22/12 -2024 14:09:39