Frame 1
stop();
Instance of Symbol 242 MovieClip in Frame 1
onClipEvent (mouseDown) {
_root.gotoAndStop(2);
}
Frame 2
_root.pressfresh = 0;
_root.menuloc = 1;
_root.totalplayers = 2;
_root.playernum = 1;
_root.clubtype = 1;
_root.shotinit = 0;
_root.ball.yaccel = 1;
_root.ball.xaccel = 0;
_root.ball.stilltimer = 0;
_root.endshot = 0;
_root.powerstart = 0;
_root.beginshot = 0;
_root.holed = 0;
_root.bitchinon = 0;
_root.targetcircle.targetinner._rotation = 65;
_root.bounce = 0.5;
_root.direction == 1;
_root.cloud1.speed = 1;
_root.cloud2.speed = 0.75;
_root.cloud2._xscale = 70;
_root.cloud2._yscale = 70;
_root.cloud3.speed = 0.5;
_root.cloud2._xscale = 60;
_root.cloud2._yscale = 60;
gravity = 0.25;
ypower = 0;
gxpower = 0;
spin = 0;
gridsize = 20;
gridsizehalf = 10;
gridsizequart = 5;
gridsizefarquart = 15;
basecounter = 0;
collision = 0;
fscommand ("allowscale", "false");
_root.powerbar.gotoAndStop(1);
_root.levelstarted = 0;
_root.loadlevel = 1;
mapdatamenu = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 13, 18, 1, 1, 1, 22, 15, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 13, 14, 21, 19, 19, 19, 24, 16, 15, 0, 0, 0, 0, 0, 0], [0, 0, 13, 27, 15, 0, 13, 14, 21, 19, 33, 19, 19, 19, 24, 23, 1, 1, 1, 26, 15, 0], [1, 1, 20, 28, 23, 1, 20, 21, 32, 19, 19, 32, 19, 19, 32, 19, 19, 19, 32, 24, 23, 1], [32, 19, 19, 32, 33, 19, 32, 19, 33, 19, 19, 19, 33, 32, 19, 33, 19, 32, 19, 33, 19, 19]];
mapxstartmenu = 60;
mapystartmenu = 160;
mapdata1 = [[19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19], [19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19], [19, 19, 19, 19, 19, 19, 33, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 32, 19, 19, 19, 19], [19, 19, 19, 19, 19, 19, 19, 19, 19, 33, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19], [19, 19, 32, 19, 19, 19, 19, 32, 19, 19, 19, 33, 19, 32, 19, 19, 19, 19, 19, 19, 19, 19], [19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 32, 19, 19, 33, 19, 19, 19, 19], [19, 19, 19, 19, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 19, 19, 19, 19, 33, 19, 19], [19, 19, 19, 19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 19, 19, 19, 19, 19, 19, 19], [19, 19, 19, 32, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 19, 19, 32, 19, 19, 19, 19], [19, 19, 19, 19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 19, 19, 19, 19, 19, 19, 19], [19, 32, 19, 19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 33, 19, 19, 19, 32, 19, 19], [19, 19, 19, 19, 5, 1, 26, 15, 0, 0, 0, 0, 13, 25, 6, 19, 19, 19, 19, 19, 19, 19], [19, 19, 19, 19, 19, 19, 24, 23, 34, 34, 17, 34, 20, 21, 19, 19, 19, 33, 19, 19, 19, 19], [19, 33, 19, 19, 19, 19, 19, 19, 19, 19, 32, 19, 19, 32, 19, 19, 19, 33, 19, 19, 19, 19], [19, 19, 33, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19], [19, 32, 19, 19, 19, 32, 19, 19, 19, 33, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19], [19, 19, 19, 33, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19]];
mapxstart1 = 120;
mapystart1 = 220;
mappar1 = 2;
mapdata2 = [[19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 33, 19, 19, 19, 19, 19, 33, 19, 19, 19, 32], [32, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 19], [33, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 33], [19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 19], [19, 3, 13, 34, 17, 34, 34, 15, 0, 9, 1, 1, 1, 22, 15, 0, 0, 0, 0, 0, 2, 19], [33, 5, 20, 21, 32, 19, 24, 23, 1, 6, 8, 4, 4, 4, 12, 0, 0, 0, 0, 0, 2, 19], [19, 19, 19, 32, 19, 19, 33, 19, 33, 32, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 32], [32, 8, 4, 4, 4, 4, 4, 4, 4, 4, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 18, 1, 1, 1, 6, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 19, 32, 19, 19, 33, 19], [33, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 25, 20, 21, 19, 19, 19, 19, 19, 33], [19, 3, 0, 0, 0, 0, 0, 0, 13, 18, 1, 1, 20, 21, 19, 32, 19, 19, 19, 19, 32, 19], [19, 3, 0, 0, 0, 0, 0, 13, 14, 21, 19, 19, 19, 19, 19, 19, 19, 19, 32, 19, 19, 19], [32, 3, 13, 27, 15, 0, 13, 14, 21, 32, 19, 19, 32, 19, 33, 19, 33, 19, 19, 19, 33, 19], [19, 5, 20, 28, 23, 1, 20, 21, 33, 19, 19, 33, 19, 19, 19, 19, 19, 19, 19, 19, 33, 19], [19, 19, 33, 19, 19, 32, 19, 19, 19, 19, 33, 19, 19, 32, 19, 19, 19, 19, 19, 19, 19, 19]];
mapxstart2 = 70;
mapystart2 = 280;
mappar2 = 5;
mapdata3 = [[32, 19, 19, 33, 19, 19, 19, 19, 32, 19, 19, 19, 19, 19, 19, 19, 19, 33, 19, 19, 19, 32], [19, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 19], [33, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 33], [8, 12, 13, 10, 0, 0, 0, 0, 0, 13, 27, 15, 0, 0, 0, 0, 0, 0, 0, 0, 2, 19], [5, 1, 20, 3, 9, 26, 15, 0, 13, 14, 28, 16, 15, 0, 0, 0, 0, 0, 0, 13, 14, 32], [19, 19, 33, 3, 2, 24, 23, 1, 20, 21, 33, 24, 23, 34, 34, 34, 34, 17, 34, 20, 19, 19], [19, 8, 4, 12, 11, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 32], [33, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 1, 1, 6, 19], [19, 23, 1, 22, 15, 0, 0, 13, 18, 31, 29, 30, 1, 26, 15, 0, 0, 2, 19, 32, 19, 33], [19, 33, 19, 24, 23, 31, 30, 20, 21, 32, 19, 19, 32, 24, 3, 0, 0, 11, 4, 4, 7, 19], [19, 19, 19, 19, 33, 19, 32, 19, 19, 19, 19, 33, 19, 19, 3, 0, 0, 0, 0, 0, 2, 33], [32, 19, 19, 32, 19, 19, 19, 19, 33, 19, 19, 19, 33, 19, 3, 0, 0, 0, 0, 0, 2, 19], [19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 3, 0, 0, 0, 13, 25, 20, 19], [19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 33, 19, 19, 32, 5, 1, 1, 1, 20, 19, 19, 33], [19, 19, 32, 19, 19, 19, 33, 19, 19, 19, 19, 32, 19, 19, 19, 33, 19, 19, 19, 32, 19, 19]];
mapxstart3 = 320;
mapystart3 = 300;
mappar3 = 6;
mapdata4 = [[19, 32, 19, 19, 33, 19, 19, 19, 19, 32, 19, 33, 19, 19, 19, 32, 19, 19, 32, 19, 3, 19], [19, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 33], [33, 3, 0, 0, 0, 0, 0, 0, 0, 0, 13, 15, 0, 0, 0, 0, 0, 0, 0, 13, 6, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 13, 15, 0, 0, 0, 13, 14, 21, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 2, 3, 0, 0, 13, 14, 21, 19, 33], [32, 3, 0, 0, 0, 0, 9, 15, 0, 13, 14, 3, 0, 2, 3, 0, 0, 11, 4, 4, 7, 19], [19, 5, 1, 26, 15, 0, 2, 23, 1, 20, 21, 3, 0, 2, 3, 0, 0, 0, 0, 0, 2, 19], [19, 19, 32, 19, 23, 1, 20, 19, 32, 19, 19, 3, 0, 2, 5, 1, 1, 22, 10, 0, 2, 32], [19, 32, 19, 33, 19, 19, 33, 19, 19, 19, 19, 3, 0, 2, 8, 4, 4, 4, 12, 0, 2, 19], [33, 19, 19, 19, 32, 19, 19, 32, 19, 32, 19, 3, 0, 2, 3, 0, 0, 0, 0, 0, 2, 19], [19, 19, 19, 33, 19, 19, 32, 19, 19, 19, 33, 3, 0, 2, 3, 0, 9, 18, 1, 1, 6, 32], [19, 19, 19, 19, 19, 19, 19, 33, 19, 19, 19, 3, 0, 11, 12, 0, 11, 4, 4, 4, 7, 19], [19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 16, 15, 0, 0, 0, 0, 0, 0, 0, 2, 19], [19, 19, 19, 19, 19, 19, 19, 19, 19, 33, 19, 24, 16, 15, 0, 0, 0, 0, 0, 0, 2, 33], [19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 24, 23, 34, 34, 34, 34, 17, 34, 6, 19], [19, 19, 19, 19, 19, 19, 19, 19, 19, 32, 19, 19, 19, 19, 33, 19, 32, 19, 32, 19, 19, 19]];
mapxstart4 = 70;
mapystart4 = 140;
mappar4 = 4;
mapdata5 = [[19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19], [19, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 0, 0, 0, 0, 0, 0, 0, 2, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 2, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 17, 34, 10, 0, 0, 0, 0, 2, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 4, 4, 4, 12, 0, 0, 0, 0, 2, 19], [19, 3, 0, 0, 0, 0, 9, 1, 26, 15, 0, 0, 0, 0, 0, 0, 0, 0, 13, 18, 6, 19], [19, 3, 0, 0, 0, 0, 11, 7, 19, 16, 15, 0, 0, 0, 0, 0, 0, 0, 11, 4, 7, 19], [19, 3, 0, 0, 0, 0, 0, 11, 4, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 19], [19, 3, 0, 0, 0, 0, 0, 13, 25, 10, 0, 9, 26, 15, 0, 0, 0, 0, 0, 0, 2, 19], [19, 3, 0, 0, 0, 0, 13, 14, 21, 3, 0, 2, 19, 16, 15, 0, 0, 0, 13, 25, 6, 19], [19, 3, 0, 0, 0, 13, 14, 19, 8, 12, 0, 11, 7, 19, 23, 31, 29, 30, 20, 19, 19, 19], [19, 3, 0, 0, 13, 14, 19, 19, 5, 31, 29, 30, 6, 19, 19, 19, 19, 19, 19, 19, 19, 19], [19, 5, 1, 1, 20, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19], [19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19], [19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19]];
mapxstart5 = 60;
mapystart5 = 280;
mappar5 = 4;
mapdata6 = [[19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19], [19, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 19], [19, 3, 0, 0, 0, 0, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 0, 0, 0, 2, 19], [19, 3, 0, 0, 0, 0, 11, 4, 4, 4, 4, 4, 4, 4, 7, 19, 5, 10, 0, 0, 2, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 4, 7, 5, 34, 17, 6, 19], [19, 3, 0, 0, 13, 25, 31, 29, 29, 29, 30, 26, 15, 0, 0, 0, 11, 4, 4, 4, 7, 19], [19, 5, 1, 1, 14, 8, 4, 4, 4, 4, 4, 7, 16, 15, 0, 0, 0, 0, 0, 0, 2, 19], [19, 19, 19, 19, 8, 12, 0, 0, 0, 0, 0, 11, 7, 23, 1, 15, 0, 0, 0, 0, 2, 19], [19, 8, 4, 4, 12, 0, 0, 0, 0, 0, 0, 0, 11, 4, 7, 16, 15, 0, 0, 0, 2, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 7, 16, 1, 1, 10, 2, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 0, 13, 15, 0, 13, 1, 6, 8, 4, 4, 12, 2, 19], [19, 3, 0, 0, 0, 0, 0, 0, 0, 13, 14, 3, 0, 11, 4, 4, 12, 0, 0, 0, 2, 19], [19, 3, 0, 0, 0, 0, 0, 0, 13, 14, 19, 16, 15, 0, 0, 0, 0, 0, 0, 0, 2, 19], [19, 3, 0, 0, 0, 0, 0, 13, 14, 19, 19, 19, 16, 15, 0, 0, 0, 0, 0, 0, 2, 19], [19, 5, 1, 1, 1, 1, 1, 20, 19, 19, 19, 19, 19, 16, 1, 1, 1, 1, 1, 1, 6, 19], [19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19]];
mapxstart6 = 60;
mapystart6 = 300;
mappar6 = 6;
stop();
startgame = function () {
_root.startgame01._x = -100;
_root.hiscores._x = -100;
_root.player01._x = 80;
_root.player02._x = 80;
_root.player03._x = 80;
_root.player04._x = 80;
_root.menuloc = 2;
};
Instance of Symbol 247 MovieClip "levelinit" in Frame 2
onClipEvent (enterFrame) {
if (_root.levelstarted == 0) {
mapdata = _root.mapdatamenu;
mapposx = _root.mapxstartmenu;
mapposy = _root.mapystartmenu;
_root.map.createEmptyMovieClip("mapo", 1);
i = 0;
while (i < 17) {
n = 0;
while (n < 22) {
basecounter = basecounter + 1;
currentgrid = mapdata[i][n];
clipneeded = "gridtype" + currentgrid;
newclipname = (("gridsection" + i) + "-") + n;
_root.map.mapo.attachMovie(clipneeded, newclipname, basecounter, gridparent);
_root.map.mapo[newclipname]._x = n * 20;
_root.map.mapo[newclipname]._y = i * 20;
n++;
}
i++;
}
_root.map2.createEmptyMovieClip("mapo", 2);
i = 0;
while (i < 17) {
n = 0;
while (n < 22) {
basecounter = basecounter + 1;
currentgrid = mapdata[i][n];
clipneeded = "gridtype" + currentgrid;
newclipname = (("gridsection" + i) + "-") + n;
_root.map2.mapo.attachMovie(clipneeded, newclipname, basecounter, gridparent);
_root.map2.mapo[newclipname]._x = n * 20;
_root.map2.mapo[newclipname]._y = i * 20;
n++;
}
i++;
}
_root.map._x = 0;
_root.map._y = -100;
_root.map2._x = 440;
_root.map2._y = -100;
_root.levelstarted = 1;
}
}
Instance of Symbol 255 MovieClip "gridparent" in Frame 2
on (press) {
startDrag (this, true);
roll = 0;
}
on (release) {
stopDrag();
}
on (dragOut) {
}
on (releaseOutside) {
stopDrag();
}
Instance of Symbol 247 MovieClip "playercode" in Frame 2
onClipEvent (keyDown) {
_root.pressfresh = 0;
if (_root.menuloc == 1) {
if (Key.getCode() == 40) {
if (_root.arrowchoice._y == 123) {
_root.arrowchoice._y = 139;
_root.pressfresh = 1;
}
}
if (Key.getCode() == 38) {
if (_root.arrowchoice._y == 139) {
_root.arrowchoice._y = 123;
_root.pressfresh = 1;
}
}
if ((Key.getCode() == 13) && (_root.arrowchoice._y < 130)) {
_root.startgame();
_root.pressfresh = 1;
}
if ((Key.getCode() == 32) && (_root.arrowchoice._y < 130)) {
_root.startgame();
_root.pressfresh = 1;
}
}
if ((_root.menuloc == 2) && (_root.pressfresh == 0)) {
if (Key.getCode() == 40) {
if (_root.arrowchoice._y < 171) {
_root.arrowchoice._y = _root.arrowchoice._y + 16;
}
}
if (Key.getCode() == 38) {
if (_root.arrowchoice._y > 123) {
_root.arrowchoice._y = _root.arrowchoice._y - 16;
}
}
if (Key.getCode() == 13) {
players = (_root.arrowchoice._y - 107) / 16;
_root.playernum = players;
_root.gotoAndPlay(5);
}
if (Key.getCode() == 32) {
players = (_root.arrowchoice._y - 107) / 16;
_root.playernum = players;
_root.gotoAndPlay(5);
}
}
}
Instance of Symbol 247 MovieClip "movelevel" in Frame 2
onClipEvent (enterFrame) {
if (_root.map._x < -438) {
_root.map._x = 440;
}
if (_root.map2._x < -438) {
_root.map2._x = 440;
}
_root.hillbox.text = _root.hills._x;
if (_root.hills._x < -348) {
_root.hills._x = 550;
}
if (_root.hills2._x < -348) {
_root.hills2._x = 550;
}
if (_root.cloud1._x < -160) {
seed = random(50) + 50;
_root.cloud1._x = 400;
_root.cloud1._y = seed;
_root.cloud1.speed = ((100 - seed) / 50) + 0.5;
_root.cloud1._xscale = 100 - (seed / 2);
_root.cloud1._yscale = 100 - (seed / 2);
}
if (_root.cloud2._x < -160) {
seed = random(50) + 50;
_root.cloud2._x = 400;
_root.cloud2._y = seed;
_root.cloud2.speed = ((100 - seed) / 50) + 0.5;
_root.cloud2._xscale = 100 - (seed / 2);
_root.cloud2._yscale = 100 - (seed / 2);
}
if (_root.cloud3._x < -160) {
seed = random(50) + 50;
_root.cloud3._x = 400;
_root.cloud3._y = seed;
_root.cloud3.speed = ((100 - seed) / 50) + 0.5;
_root.cloud3._xscale = 100 - (seed / 2);
_root.cloud3._yscale = 100 - (seed / 2);
}
_root.map._x = _root.map._x - 2;
_root.hills._x = _root.hills._x - 1;
_root.hills2._x = _root.hills2._x - 1;
_root.map2._x = _root.map2._x - 2;
_root.cloud1._x = _root.cloud1._x - _root.cloud1.speed;
_root.cloud2._x = _root.cloud2._x - _root.cloud2.speed;
_root.cloud3._x = _root.cloud3._x - _root.cloud3.speed;
}
Frame 5
_root.newplayer = 0;
_root.textinit = 0;
_root.ptextinit = 0;
_root.shotcount = 0;
_root.ball1.holed = 0;
_root.ball2.holed = 0;
_root.ball3.holed = 0;
_root.ball4.holed = 0;
_root.ball1.totalshots = 0;
_root.ball2.totalshots = 0;
_root.ball3.totalshots = 0;
_root.ball4.totalshots = 0;
_root.ball1.clubtype = 1;
_root.ball2.clubtype = 1;
_root.ball3.clubtype = 1;
_root.ball4.clubtype = 1;
_root.ball1.direction = 1;
_root.ball2.direction = 1;
_root.ball3.direction = 1;
_root.ball4.direction = 1;
_root.allholed = 0;
_root.lastshot = 0;
_root.totalshots = 0;
_root.clubtype = 1;
_root.shotinit = 0;
_root.ball.yaccel = 1;
_root.ball.xaccel = 0;
_root.ball.stilltimer = 0;
_root.endshot = 0;
_root.powerstart = 0;
_root.beginshot = 0;
_root.endtexton = 0;
_root.targetcircle.targetinner._rotation = 45;
_root.bounce = 0.5;
_root.direction == 1;
gravity = 0.25;
ypower = 0;
gxpower = 0;
spin = 0;
gridsize = 20;
gridsizehalf = 10;
gridsizequart = 5;
gridsizefarquart = 15;
basecounter = 0;
collision = 0;
fscommand ("allowscale", "false");
_root.powerbar.gotoAndStop(1);
_root.levelstarted = 0;
_root.loadlevel = 1;
initlevel = function () {
_root.lastplayer = 1;
_root.openingshot = 1;
ball = eval ("_root.ball" + _root.lastplayer);
mappar = eval ("_root.mappar" + _root.loadlevel);
_root.parbox.text = mappar;
i = 1;
while (i < (_root.playernum + 1)) {
pos = eval ("_root.ball" + i);
pos._x = 78 + (i * 2);
pos._y = 150;
pos.shotcount = 0;
pos.lastshot = 0;
pos.congrat = 0;
i++;
}
mapdata = eval ("_root.mapdata" + _root.loadlevel);
mapposx = eval ("_root.mapxstart" + _root.loadlevel);
mapposy = eval ("_root.mapystart" + _root.loadlevel);
_root.map.createEmptyMovieClip("mapo", 1);
i = 0;
while (i < 17) {
n = 0;
while (n < 22) {
basecounter = basecounter + 1;
currentgrid = mapdata[i][n];
clipneeded = "gridtype" + currentgrid;
newclipname = (("gridsection" + i) + "-") + n;
if (clipneeded != "gridtype0") {
_root.map.mapo.attachMovie(clipneeded, newclipname, basecounter, gridparent);
_root.map.mapo[newclipname]._x = n * 20;
_root.map.mapo[newclipname]._y = i * 20;
}
n++;
}
i++;
}
_root.radar.createEmptyMovieClip("mapo", 1);
i = 0;
while (i < 17) {
n = 0;
while (n < 22) {
basecounter = basecounter + 1;
currentgrid = mapdata[i][n];
clipneeded = ("gridtype" + currentgrid) + " copy";
newclipname = (("gridsection" + i) + "-") + n;
_root.radar.mapo.attachMovie(clipneeded, newclipname, basecounter, gridparent);
_root.radar.mapo[newclipname]._x = n * 20;
_root.radar.mapo[newclipname]._y = i * 20;
n++;
}
i++;
}
_root.radar._xscale = 15;
_root.radar._yscale = 15;
};
initcamera = function () {
ball = eval ("_root.ball" + _root.lastplayer);
if (((80 - mapposx) < 10) && ((80 - mapposx) > -270)) {
_root.map._x = 80 - mapposx;
}
if ((80 - mapposx) >= 10) {
_root.map._x = 9;
_root.ball._x = _root.ball._x + (mapposx - 82.5);
_root.ball2._x = _root.ball2._x + (mapposx - 82.5);
_root.ball3._x = _root.ball3._x + (mapposx - 82.5);
}
if ((80 - mapposx) <= -270) {
_root.map._x = -269;
_root.ball._x = _root.ball._x + ((mapposx - 80) - 270);
_root.ball2._x = _root.ball2._x + ((mapposx - 80) - 270);
_root.ball3._x = _root.ball3._x + ((mapposx - 80) - 270);
}
if (((150 - mapposy) < 10) && ((150 - mapposy) > -130)) {
_root.map._y = 150 - mapposy;
}
if ((150 - mapposy) >= 10) {
}
if ((150 - mapposy) <= -130) {
_root.map._y = -129;
_root.ball._y = _root.ball._y + ((mapposy - 150) - 130);
_root.ball2._y = _root.ball2._y + ((mapposy - 150) - 130);
_root.ball3._y = _root.ball3._y + ((mapposy - 150) - 130);
}
_root.levelstarted = 1;
};
reposcamera = function () {
ball = eval ("_root.ball" + _root.lastplayer);
reposx = ball._x - 80;
reposy = ball._y - 150;
if (map._x >= 9) {
if ((map._x - reposx) < 9) {
if ((map._x - reposx) < -270) {
usex = -270 - map._x;
map._x = map._x + usex;
ball1._x = ball1._x + usex;
ball2._x = ball2._x + usex;
ball3._x = ball3._x + usex;
} else {
map._x = map._x - reposx;
ball1._x = ball1._x - reposx;
ball2._x = ball2._x - reposx;
ball3._x = ball3._x - reposx;
}
}
} else if ((map._x - reposx) >= 9) {
usex = 9 - map._x;
map._x = map._x + usex;
ball1._x = ball1._x + usex;
ball2._x = ball2._x + usex;
ball3._x = ball3._x + usex;
} else if ((map._x - reposx) < -270) {
usex = -270 - map._x;
map._x = map._x + usex;
ball1._x = ball1._x + usex;
ball2._x = ball2._x + usex;
ball3._x = ball3._x + usex;
} else {
map._x = map._x - reposx;
ball1._x = ball1._x - reposx;
ball2._x = ball2._x - reposx;
ball3._x = ball3._x - reposx;
}
if (map._y >= 9) {
if ((map._y - reposy) < 9) {
if ((map._y - reposy) < -130) {
usey = -130 - map._y;
map._y = map._y + usey;
ball1._y = ball1._y + usey;
ball2._y = ball2._y + usey;
ball3._y = ball3._y + usey;
} else {
map._y = map._y - reposy;
ball1._y = ball1._y - reposy;
ball2._y = ball2._y - reposy;
ball3._y = ball3._y - reposy;
}
}
} else if ((map._y - reposy) >= 9) {
usey = 9 - map._y;
map._y = map._y + usey;
ball1._y = ball1._y + usey;
ball2._y = ball2._y + usey;
ball3._y = ball3._y + usey;
} else if ((map._y - reposy) < -130) {
usey = -130 - map._y;
map._y = map._y + usey;
ball1._y = ball1._y + usey;
ball2._y = ball2._y + usey;
ball3._y = ball3._y + usey;
} else {
map._y = map._y - reposy;
ball1._y = ball1._y - reposy;
ball2._y = ball2._y - reposy;
ball3._y = ball3._y - reposy;
}
};
removetext = function () {
_root.player1._x = 600;
_root.player1._y = 400;
_root.player2._x = 600;
_root.player2._y = 400;
_root.player3._x = 600;
_root.player3._y = 400;
_root.player4._x = 600;
_root.player4._y = 400;
_root.albatros._x = 600;
_root.albatros._y = 400;
_root.eagle._x = 600;
_root.eagle._y = 400;
_root.birdie._x = 600;
_root.birdie._y = 400;
_root.par._x = 600;
_root.par._y = 400;
_root.bogey._x = 600;
_root.bogey._y = 400;
_root.doublebogey._x = 600;
_root.doublebogey._y = 400;
_root.triplebogey._x = 600;
_root.triplebogey._y = 400;
_root.quadruplebogey._x = 600;
_root.quadruplebogey._y = 400;
};
stop();
Instance of Symbol 247 MovieClip "levelinit" in Frame 5
onClipEvent (enterFrame) {
if (_root.levelstarted == 0) {
if (_root.loadlevel == 7) {
_root.gotoAndStop(10);
} else {
_root.initlevel();
_root.initcamera();
}
}
}
Instance of Symbol 247 MovieClip "ballcode" in Frame 5
onClipEvent (enterFrame) {
ball = eval ("_root.ball" + _root.lastplayer);
mapdata = eval ("_root.mapdata" + _root.loadlevel);
ball.gridy = Math.floor(((ball._y - _root.map._y) + 10) / _root.gridsize);
ball.gridx = Math.floor(((ball._x - _root.map._x) + 10) / _root.gridsize);
ball.gridtype = mapdata[Math.floor(((ball._y - _root.map._y) + 10) / _root.gridsize)][Math.floor(((ball._x - _root.map._x) + 10) / _root.gridsize)];
ball.gridposx = ((ball._x - _root.map._x) + 10) - (Math.floor(((ball._x - _root.map._x) + 10) / _root.gridsize) * _root.gridsize);
ball.gridposy = ((ball._y - _root.map._y) + 10) - (Math.floor(((ball._y - _root.map._y) + 10) / _root.gridsize) * _root.gridsize);
futureposy = ball.gridposy - ball.yaccel;
futureposx = ball.gridposx - ball.xaccel;
_root.future._y = futureposy + (Math.floor(ball._y / _root.gridsize) * _root.gridsize);
if (((((ball.gridtype == 1) || (ball.gridtype == 27)) || (ball.gridtype == 25)) || (ball.gridtype == 26)) || (ball.gridtype == 34)) {
if ((futureposy >= _root.gridsizehalf) && (ball.yaccel < 0)) {
_root.collision = 1;
}
if (futureposy < _root.gridsizehalf) {
ball.roll = 0;
}
}
if ((ball.gridtype == 0) || (ball.gridtype == undefined)) {
ball.roll = 0;
_root.collision = 0;
}
if (ball.gridtype == 3) {
if ((futureposx <= _root.gridsizehalf) && (ball.xaccel > 0)) {
_root.collision = 3;
}
}
if (ball.gridtype == 2) {
if ((futureposx > _root.gridsizehalf) && (ball.xaccel < 0)) {
_root.collision = 2;
}
}
if (ball.gridtype == 4) {
if ((futureposy <= _root.gridsizehalf) && (ball.yaccel > 0)) {
playsound();
ball.yaccel = (-Math.abs(ball.yaccel)) * _root.bounce;
ball.xaccel = ball.xaccel * _root.bounce;
}
}
if (ball.gridtype == 5) {
if (((futureposx <= _root.gridsizehalf) && (futurposy <= _root.gridsizehalf)) && (ball.xaccel > 0)) {
_root.collision = 3;
}
if (((futureposy >= _root.gridsizehalf) && (futureposx > _root.gridsizehalf)) && (ball.yaccel < 0)) {
_root.collision = 1;
}
if (((futureposy > _root.gridsizehalf) && (futureposx < _root.gridsizehalf)) && (ball.yaccel < 0)) {
_root.collision = 1;
}
}
if (ball.gridtype == 6) {
if ((futureposy > _root.gridsizehalf) || (futureposx > _root.gridsizehalf)) {
if ((ball.gridposx >= ball.gridposy) && (ball.xaccel < 0)) {
_root.collision = 2;
}
if ((ball.gridposx < ball.gridposy) && (ball.yaccel < 0)) {
_root.collision = 1;
}
}
}
if (ball.gridtype == 7) {
if (((futureposx > _root.gridsizehalf) && (futureposy > _root.gridsizehalf)) && (ball.xaccel < 0)) {
ball.xaccel = (-ball.xaccel) * _root.bounce;
}
if (((futureposy <= _root.gridsizehalf) && (futureposx <= _root.gridsizehalf)) && (ball.yaccel > 0)) {
ball.yaccel = (-ball.yaccel) * _root.bounce;
ball.xaccel = ball.xaccel * _root.bounce;
}
if (((futureposy <= _root.gridsizehalf) && (futureposx > _root.gridsizehalf)) && (ball.yaccel > 0)) {
ball.yaccel = (-ball.yaccel) * _root.bounce;
ball.xaccel = (-ball.xaccel) * _root.bounce;
}
}
if (ball.gridtype == 8) {
if (((futureposx <= _root.gridsizehalf) && (futureposy > _root.gridsizehalf)) && (ball.xaccel > 0)) {
ball.xaccel = (-ball.xaccel) * _root.bounce;
}
if (((futureposy <= _root.gridsizehalf) && (futureposx > _root.gridsizehalf)) && (ball.yaccel > 0)) {
ball.yaccel = (-ball.yaccel) * _root.bounce;
ball.xaccel = ball.xaccel * _root.bounce;
}
if (((futureposy <= _root.gridsizehalf) && (futureposx <= _root.gridsizehalf)) && (ball.yaccel > 0)) {
ball.yaccel = (-ball.yaccel) * _root.bounce;
ball.xaccel = (-ball.xaccel) * _root.bounce;
}
}
if (ball.gridtype == 9) {
if ((futureposx > _root.gridsizehalf) && (futureposy > _root.gridsizehalf)) {
if (ball.gridposx >= ball.gridposy) {
_root.collision = 1;
}
if (ball.gridposx < ball.gridposy) {
_root.collision = 2;
}
}
}
if (ball.gridtype == 10) {
if ((futureposx <= _root.gridsizehalf) && (futureposy >= _root.gridsizehalf)) {
if ((ball.gridposx + ball.gridposy) <= _root.gridsize) {
_root.collision = 1;
}
if ((ball.gridposx + ball.gridposy) > _root.gridsize) {
_root.collision = 3;
}
}
}
if (ball.gridtype == 11) {
if ((futureposx > _root.gridsizehalf) && (futureposy <= _root.gridsizehalf)) {
if ((ball.gridposx + ball.gridposy) <= _root.gridsize) {
_root.collision = 2;
}
if ((ball.gridposx + ball.gridposy) > _root.gridsize) {
ball.yaccel = (-Math.abs(ball.yaccel)) * _root.bounce;
ball.xaccel = ball.xaccel * _root.bounce;
}
}
if ((futureposx > _root.gridsizehalf) || (futureposy <= _root.gridsizehalf)) {
ball.roll = 0;
}
}
if (ball.gridtype == 12) {
if ((futureposx <= _root.gridsizehalf) && (futureposy <= _root.gridsizehalf)) {
if (futureposx > futureposy) {
_root.collision = 3;
}
if (futureposy > futureposx) {
ball.yaccel = (-Math.abs(ball.yaccel)) * _root.bounce;
ball.xaccel = ball.xaccel * _root.bounce;
}
}
if ((futureposx <= _root.gridsizehalf) || (futureposy <= _root.gridsizehalf)) {
ball.roll = 0;
}
}
if (ball.gridtype == 13) {
if ((futureposx + futureposy) > (_root.gridsizehalf + _root.gridsize)) {
_root.collision = 5;
}
if ((futureposx + futureposy) <= (_root.gridsizehalf + _root.gridsize)) {
ball.roll = 0;
}
}
if ((ball.gridtype == 14) || (ball.gridtype == 20)) {
if ((futureposx + futureposy) >= _root.gridsizehalf) {
_root.collision = 5;
}
if ((futureposx + futureposy) <= _root.gridsizehalf) {
ball.roll = 0;
}
}
if (ball.gridtype == 15) {
if (((_root.gridsize - futureposx) + futureposy) >= (_root.gridsizehalf + _root.gridsize)) {
_root.collision = 6;
}
if (((_root.gridsize - futureposx) + futureposy) < (_root.gridsizehalf + _root.gridsize)) {
ball.roll = 0;
}
}
if ((ball.gridtype == 16) || (ball.gridtype == 23)) {
if (((_root.gridsize - futureposx) + futureposy) >= _root.gridsizehalf) {
_root.collision = 6;
}
if (((_root.gridsize - futureposx) + futureposy) < _root.gridsizehalf) {
ball.roll = 0;
}
}
if (ball.gridtype == 17) {
if (futureposy >= _root.gridsizehalf) {
if (futureposx <= _root.gridsizequart) {
if (((futureposx + futureposy) <= _root.gridsizefarquart) && (ball.yaccel < 0)) {
_root.collision = 1;
}
if ((((futureposx + futureposy) <= _root.gridsize) && ((futureposx + futureposy) > _root.gridsizefarquart)) && (ball.xaccel > 0)) {
_root.collision = 6;
}
if ((futureposx + futureposy) > _root.gridsize) {
_root.collision = 6;
}
}
if (futureposx >= _root.gridsizefarquart) {
if ((futureposx >= (futureposy + 5)) && (ball.yaccel < 0)) {
_root.collision = 1;
}
if ((futureposx < (futureposy + 5)) && (ball.xaccel < 0)) {
_root.collision = 5;
}
if ((futureposx + futureposy) > (_root.gridsize + _root.gridsizefarquart)) {
_root.collision = 5;
}
}
if ((((futureposy > _root.gridsizefarquart) && (futureposx >= _root.gridsizequart)) && (futureposx <= _root.gridsizefarquart)) && (ball.yaccel < 0)) {
_root.collision = 1;
ball.xaccel = 0;
ball.yaccel = 0;
ball.holed = 1;
}
}
if (((futureposx > _root.gridsizequart) && (futureposx < _root.gridsizefarquart)) && (futureposy <= _root.gridsizefarquart)) {
ball.roll = 0;
}
}
if ((ball.gridtype == 18) || (ball.gridtype == 22)) {
if (futureposx <= _root.gridsizehalf) {
if ((futureposx + futureposy) > _root.gridsizehalf) {
_root.collision = 5;
}
if ((futureposx + futureposy) <= _root.gridsizehalf) {
ball.roll = 0;
}
}
if (futureposx > _root.gridsizehalf) {
if (futureposx < (futureposy + _root.gridsizehalf)) {
_root.collision = 6;
}
if (futureposx >= (futureposy + _root.gridsizehalf)) {
ball.roll = 0;
}
}
}
if (((ball.gridtype == 29) || (ball.gridtype == 30)) || (ball.gridtype == 31)) {
if ((futureposy >= _root.gridsizehalf) && (ball.yaccel < 0)) {
_root.collision = 7;
}
if (futureposy < _root.gridsizehalf) {
ball.roll = 0;
}
}
if (_root.collision == 1) {
playsound();
if (ball.yaccel > -1) {
ball.roll = 1;
ball.yaccel = 0;
}
ball.yaccel = (-ball.yaccel) * _root.bounce;
ball.xaccel = (ball.xaccel + _root.spin) * _root.bounce;
_root.spin = ball.xaccel / 2;
_root.collision = 0;
}
if (_root.collision == 2) {
playsound();
ball.xaccel = ((-ball.xaccel) + _root.spin) * _root.bounce;
_root.spin = (-ball.yaccel) / 2;
_root.collision = 0;
}
if (_root.collision == 3) {
playsound();
ball.xaccel = ((-ball.xaccel) + _root.spin) * _root.bounce;
_root.spin = ball.yaccel / 2;
_root.collision = 0;
}
if (_root.collision == 5) {
playsound();
ball.roll = 2;
prexaccel = ball.xaccel;
preyaccel = ball.yaccel - 0.25;
ball.yaccel = ((-prexaccel) - _root.spin) * 0.4;
ball.xaccel = ((-preyaccel) + _root.spin) * 0.4;
_root.spin = ((-ball.yaccel) * 0.8) + (ball.xaccel * 0.8);
_root.collision = 0;
}
if (_root.collision == 6) {
playsound();
ball.roll = 2;
prexaccel = ball.xaccel;
preyaccel = ball.yaccel - 0.25;
ball.yaccel = (prexaccel + _root.spin) * 0.4;
ball.xaccel = (preyaccel + _root.spin) * 0.4;
_root.spin = (ball.yaccel * 0.8) + (ball.xaccel * 0.8);
_root.collision = 0;
}
if (_root.collision == 7) {
playsound();
if (ball.yaccel > -1) {
ball.roll = 1;
ball.yaccel = 0;
}
ball.yaccel = (-ball.yaccel) * (_root.bounce / 10);
ball.xaccel = (ball.xaccel + _root.spin) * (_root.bounce / 10);
_root.spin = 0;
_root.collision = 0;
}
if ((ball.yaccel > -25) && (ball.roll == 0)) {
ball.yaccel = ball.yaccel - _root.gravity;
}
if ((ball.yaccel > -25) && (ball.roll == 2)) {
ball.yaccel = ball.yaccel - (_root.gravity / 2);
}
if (ball.roll == 0) {
ball.xaccel = ball.xaccel * 0.99;
}
if (ball.roll == 1) {
ball.yaccel = 0;
}
if ((ball.xaccel > 0) && (ball.roll == 1)) {
ball.xaccel = ball.xaccel - math.abs(ball.xaccel / 20);
}
if ((ball.xaccel < 0) && (ball.roll == 1)) {
ball.xaccel = ball.xaccel + math.abs(ball.xaccel / 20);
}
if (math.abs(ball.xaccel) < 0.05) {
ball.xaccel = 0;
}
if ((math.abs(ball.xaccel) < 0.125) && (ball.roll == 1)) {
ball.xaccel = 0;
}
if (((_root.map._x + ball.xaccel) >= 10) || ((_root.map._x + ball.xaccel) <= -270)) {
ball._x = ball._x - ball.xaccel;
}
if (((_root.map._x + ball.xaccel) < 10) && ((_root.map._x + ball.xaccel) > -270)) {
if ((ball._x >= 72) && (ball._x <= 88)) {
_root.map._x = _root.map._x + ball.xaccel;
_root.targetcircle._x = _root.targetcircle._x + ball.xaccel;
_root.mani1._x = _root.mani1._x + ball.xaccel;
if (_root.lastplayer != 1) {
_root.ball1._x = _root.ball1._x + ball.xaccel;
}
if (_root.lastplayer != 2) {
_root.ball2._x = _root.ball2._x + ball.xaccel;
}
if (_root.lastplayer != 3) {
_root.ball3._x = _root.ball3._x + ball.xaccel;
}
}
if ((ball._x > 88) || (ball._x < 72)) {
ball._x = ball._x - ball.xaccel;
}
}
if (((_root.map._y + ball.yaccel) >= 10) || ((_root.map._y + ball.yaccel) <= -130)) {
ball._y = ball._y - ball.yaccel;
}
if (((_root.map._y + ball.yaccel) < 10) && ((_root.map._y + ball.yaccel) > -130)) {
if ((ball._y >= 142) && (ball._y <= 158)) {
usey = Math.round(ball.yaccel * 10) / 10;
_root.map._y = _root.map._y + usey;
_root.targetcircle._y = _root.targetcircle._y + usey;
_root.mani1._y = _root.mani1._y + usey;
if (_root.lastplayer != 1) {
_root.ball1._y = _root.ball1._y + usey;
}
if (_root.lastplayer != 2) {
_root.ball2._y = _root.ball2._y + usey;
}
if (_root.lastplayer != 3) {
_root.ball3._y = _root.ball3._y + usey;
}
}
if ((ball._y > 158) || (ball._y < 142)) {
ball._y = ball._y - ball.yaccel;
}
}
if ((math.abs(ball.yaccel) < 0.01) && (math.abs(ball.xaccel) < 0.01)) {
ball.stilltimer = ball.stilltimer + 1;
}
if ((math.abs(ball.yaccel) >= 0.01) || (math.abs(ball.xaccel) >= 0.01)) {
ball.stilltimer = 0;
}
if ((ball.stilltimer > 10) && (_root.endshot == 0)) {
_root.endshot = 1;
_root.ball.xlay = _root.ball._x - _root.map._x;
_root.ball.ylay = _root.ball._y - _root.map._y;
if ((ball.gridtype == 34) || (ball.gridtype == 17)) {
ball.clubtype = 3;
} else {
ball.clubtype = 1;
}
}
playsound = function () {
if (ball.roll == 0) {
ballbounce = new Sound();
ballbounce.attachSound("bounce");
ballbounce.setVolume((math.abs(ball.yaccel) * 2) + (math.abs(ball.xaccel) * 2));
ballbounce.start(0, 1);
}
};
}
Instance of Symbol 255 MovieClip "gridparent" in Frame 5
on (press) {
startDrag (this, true);
roll = 0;
}
on (release) {
stopDrag();
}
on (dragOut) {
}
on (releaseOutside) {
stopDrag();
}
Instance of Symbol 247 MovieClip "playercode" in Frame 5
onClipEvent (enterFrame) {
if (((_root.endshot == 1) && (_root.allholed != 1)) && (_root.shotinit == 0)) {
if (_root.openingshot == 1) {
_root.lastplayer = 1;
ball = eval ("_root.ball" + _root.lastplayer);
player = eval ("_root.player" + _root.lastplayer);
_root.openingshot = 0;
_root.newplayer = 1;
} else {
if (_root.lastplayer < _root.playernum) {
_root.lastplayer = _root.lastplayer + 1;
} else {
_root.lastplayer = 1;
}
ball = eval ("_root.ball" + _root.lastplayer);
_root.newplayer = 1;
if (ball.holed == 1) {
_root.endshot = 1;
} else {
_root.reposcamera();
}
}
if (ball.holed != 1) {
_root.targetcircle._x = Math.round(ball._x);
_root.targetcircle._y = Math.round(ball._y);
if (ball.direction == 1) {
_root.mani1.gotoAndStop(1);
}
if (ball.direction == -1) {
_root.mani1.gotoAndStop(11);
}
_root.mani1._x = Math.round(ball._x);
_root.mani1._y = Math.round(ball._y);
_root.powerbar._x = ball._x;
_root.powerbar._y = ball._y + 16;
_root.shotinit = 1;
if (ball.totalshots > 0) {
_root.scorebox.text = "+" + ball.totalshots;
}
if (ball.totalshots == 0) {
_root.scorebox.text = "EVENS";
}
if (ball.totalshots < 0) {
_root.scorebox.text = ball.totalshots;
}
if (ball.clubtype == 1) {
_root.targetcircle.targetinner._rotation = 45 * ball.direction;
}
if (ball.clubtype == 3) {
_root.targetcircle.targetinner._rotation = 90 * ball.direction;
}
}
}
if ((_root.newplayer == 1) && (_root.endtexton == 0)) {
player = eval ("_root.player" + _root.lastplayer);
if ((_root.playernum != 1) && (ball.holed != 1)) {
_root.removetext();
player._x = 80;
player._y = 100;
}
if (_root.ptextinit == 0) {
starttime = getTimer();
_root.ptextinit = 1;
} else if (getTimer() > (starttime + 3000)) {
_root.removetext();
_root.ptextinit = 0;
_root.newplayer = 0;
}
}
if ((ball.holed == 1) && (ball.congrat != 1)) {
ball.congrat = 1;
mappar = eval ("_root.mappar" + _root.loadlevel);
ball.lastshot = ball.shotcount - mappar;
ball.totalshots = ball.totalshots + (ball.shotcount - mappar);
if (ball.totalshots > 0) {
_root.scorebox.text = "+" + ball.totalshots;
}
if (ball.totalshots == 0) {
_root.scorebox.text = "EVENS";
}
if (ball.totalshots < 0) {
_root.scorebox.text = ball.totalshots;
}
_root.removetext();
if (ball.lastshot == -3) {
_root.albatros._x = 20;
_root.albatros._y = 100;
}
if (ball.lastshot == -2) {
_root.eagle._x = 60;
_root.eagle._y = 100;
}
if (ball.lastshot == -1) {
_root.birdie._x = 60;
_root.birdie._y = 100;
}
if (ball.lastshot == 0) {
_root.par._x = 70;
_root.par._y = 100;
}
if (ball.lastshot == 1) {
_root.bogey._x = 50;
_root.bogey._y = 100;
}
if (ball.lastshot == 2) {
_root.doublebogey._x = 5;
_root.doublebogey._y = 100;
}
if (ball.lastshot == 3) {
_root.triplebogey._x = 5;
_root.triplebogey._y = 100;
}
if (ball.lastshot == 4) {
_root.quadruplebogey._x = 0;
_root.quadruplebogey._y = 100;
}
_root.endtexton = 1;
ball.shotcount = 0;
}
_root.allholed = 1;
i = 1;
while (i < (_root.playernum + 1)) {
ballholed = eval ("_root.ball" + i);
if (ballholed.holed == 0) {
_root.allholed = 0;
}
i++;
}
if (_root.allholed == 1) {
}
if (_root.endtexton == 1) {
if (_root.textinit == 0) {
pstarttime = getTimer();
_root.textinit = 1;
} else if (getTimer() > (pstarttime + 3000)) {
_root.textinit = 0;
_root.removetext();
_root.endtexton = 0;
}
}
}
onClipEvent (keyDown) {
if (_root.endtexton == 1) {
_root.textinit = 0;
_root.removetext();
_root.endtexton = 0;
}
if ((_root.endtexton == 0) && (_root.allholed == 1)) {
_root.albatros._x = 600;
_root.albatros._y = 300;
_root.eagle._x = 600;
_root.eagle._y = 300;
_root.birdie._x = 600;
_root.birdie._y = 300;
_root.par._x = 600;
_root.par._y = 300;
_root.bogey._x = 600;
_root.bogey._y = 300;
_root.doublebogey._x = 600;
_root.doublebogey._y = 300;
_root.triplebogey._x = 600;
_root.triplebogey._y = 300;
_root.quadruplebogey._x = 600;
_root.quadruplebogey._y = 300;
_root.endtexton = 0;
_root.allholed = 0;
_root.ball1.holed = 0;
_root.ball2.holed = 0;
_root.ball3.holed = 0;
_root.ball4.holed = 0;
_root.ball1.clubtype = 1;
_root.ball2.clubtype = 1;
_root.ball3.clubtype = 1;
_root.ball4.clubtype = 1;
_root.ball1.clubtype = 1;
_root.ball2.clubtype = 1;
_root.ball3.clubtype = 1;
_root.ball4.clubtype = 1;
_root.shotbox.text = _root.shotcount;
_root.holed = 0;
_root.endshot = 0;
ball.stilltimer = 0;
_root.targetcircle._x = 400;
_root.targetcircle._y = 300;
_root.mani1._x = 600;
_root.mani1._y = 600;
_root.loadlevel = _root.loadlevel + 1;
_root.levelstarted = 0;
_root.targetcircle.targetinner._rotation = 45;
_root.club.gotoAndStop(1);
}
if (_root.targetcircle.targetinner._rotation >= 0) {
ball.direction = 1;
if (_root.powerstart == 0) {
_root.mani1.gotoAndStop(1);
}
}
if (_root.targetcircle.targetinner._rotation < 0) {
ball.direction = -1;
if (_root.powerstart == 0) {
_root.mani1.gotoAndStop(11);
}
}
}
onClipEvent (keyDown) {
ball = eval ("_root.ball" + _root.lastplayer);
if (Key.getCode() == 40) {
}
if (Key.getCode() == 38) {
}
if ((_root.endshot == 1) && (_root.holed != 1)) {
if (ball.clubtype == 1) {
if ((Key.getCode() == 37) && (_root.targetcircle.targetinner._rotation > -80)) {
_root.targetcircle.targetinner._rotation = _root.targetcircle.targetinner._rotation - 2.5;
}
if ((Key.getCode() == 39) && (_root.targetcircle.targetinner._rotation < 80)) {
_root.targetcircle.targetinner._rotation = _root.targetcircle.targetinner._rotation + 2.5;
}
}
if (ball.clubtype == 2) {
}
if (ball.clubtype == 3) {
if ((Key.getCode() == 37) && (_root.targetcircle.targetinner._rotation > -79)) {
_root.targetcircle.targetinner._rotation = _root.targetcircle.targetinner._rotation - 180;
}
if ((Key.getCode() == 39) && (_root.targetcircle.targetinner._rotation < 79)) {
_root.targetcircle.targetinner._rotation = _root.targetcircle.targetinner._rotation + 180;
}
}
if (Key.getCode() == 40) {
_root.userspin = _root.userspin + 1;
}
if (Key.getCode() == 38) {
_root.userspin = _root.userspin - 1;
}
if (Key.getCode() == 32) {
if (_root.powerstart == 1) {
_root.powerbar.stop();
_root.beginshot = 1;
}
if (_root.powerstart == 0) {
_root.powerbar.gotoAndPlay(1);
if (ball.direction == 1) {
_root.mani1.gotoAndPlay(2);
}
if (ball.direction == -1) {
_root.mani1.gotoAndPlay(12);
}
_root.powerstart = 1;
}
if (_root.powerbar._currentframe < 21) {
ballpower = (_root.powerbar._currentframe / 2) + 1;
}
if (_root.powerbar._currentframe > 20) {
ballpower = ((40 - _root.powerbar._currentframe) / 2) + 1;
}
if (_root.beginshot == 1) {
ball.shotcount = ball.shotcount + 1;
_root.shotbox.text = ball.shotcount;
golfswing = new Sound();
golfswing.attachSound("swing");
golfswing.setVolume(100);
golfswing.start(0, 1);
if (ball.direction == 1) {
_root.mani1.gotoAndPlay(5);
}
if (ball.direction == -1) {
_root.mani1.gotoAndPlay(15);
}
_root.beginshot = 0;
_root.powerstart = 0;
_root.powerbar.gotoAndStop(1);
useangle = ((_root.targetcircle.targetinner._rotation * 2) * Math.PI) / 360;
if (_root.targetcircle.targetinner._rotation < 0) {
_root.spin = -_root.userspin;
}
if (_root.targetcircle.targetinner._rotation > 0) {
_root.spin = _root.userspin;
}
if (ball.clubtype == 1) {
ball.yaccel = ballpower * math.cos(useangle);
ball.roll = 0;
ball.xaccel = -(ballpower * math.sin(useangle));
}
if (ball.clubtype == 3) {
ball.roll = 0;
ball.xaccel = -(ballpower * math.sin(useangle));
}
_root.endshot = 0;
_root.powerbar._x = -100;
_root.powerbar._y = -100;
_root.userspin = 0;
_root.shotinit = 0;
}
}
}
}
Frame 10
stop();
Instance of Symbol 247 MovieClip "levelinit" in Frame 10
onClipEvent (enterFrame) {
if (_root.levelstarted == 0) {
mapdata = _root.mapdatamenu;
mapposx = _root.mapxstartmenu;
mapposy = _root.mapystartmenu;
_root.map.createEmptyMovieClip("mapo", 1);
i = 0;
while (i < 17) {
n = 0;
while (n < 22) {
basecounter = basecounter + 1;
currentgrid = mapdata[i][n];
clipneeded = "gridtype" + currentgrid;
newclipname = (("gridsection" + i) + "-") + n;
_root.map.mapo.attachMovie(clipneeded, newclipname, basecounter, gridparent);
_root.map.mapo[newclipname]._x = n * 20;
_root.map.mapo[newclipname]._y = i * 20;
n++;
}
i++;
}
_root.map2.createEmptyMovieClip("mapo", 2);
i = 0;
while (i < 17) {
n = 0;
while (n < 22) {
basecounter = basecounter + 1;
currentgrid = mapdata[i][n];
clipneeded = "gridtype" + currentgrid;
newclipname = (("gridsection" + i) + "-") + n;
_root.map2.mapo.attachMovie(clipneeded, newclipname, basecounter, gridparent);
_root.map2.mapo[newclipname]._x = n * 20;
_root.map2.mapo[newclipname]._y = i * 20;
n++;
}
i++;
}
_root.map._x = 0;
_root.map._y = -100;
_root.map2._x = 440;
_root.map2._y = -100;
_root.levelstarted = 1;
}
}
Instance of Symbol 255 MovieClip "gridparent" in Frame 10
on (press) {
startDrag (this, true);
roll = 0;
}
on (release) {
stopDrag();
}
on (dragOut) {
}
on (releaseOutside) {
stopDrag();
}
Instance of Symbol 247 MovieClip "movelevel" in Frame 10
onClipEvent (enterFrame) {
if (_root.map._x < -438) {
_root.map._x = 440;
}
if (_root.map2._x < -438) {
_root.map2._x = 440;
}
_root.hillbox.text = _root.hills._x;
if (_root.hills._x < -348) {
_root.hills._x = 550;
}
if (_root.hills2._x < -348) {
_root.hills2._x = 550;
}
if (_root.cloud1._x < -160) {
seed = random(50) + 50;
_root.cloud1._x = 400;
_root.cloud1._y = seed;
_root.cloud1.speed = ((100 - seed) / 50) + 0.5;
_root.cloud1._xscale = 100 - (seed / 2);
_root.cloud1._yscale = 100 - (seed / 2);
}
if (_root.cloud2._x < -160) {
seed = random(50) + 50;
_root.cloud2._x = 400;
_root.cloud2._y = seed;
_root.cloud2.speed = ((100 - seed) / 50) + 0.5;
_root.cloud2._xscale = 100 - (seed / 2);
_root.cloud2._yscale = 100 - (seed / 2);
}
if (_root.cloud3._x < -160) {
seed = random(50) + 50;
_root.cloud3._x = 400;
_root.cloud3._y = seed;
_root.cloud3.speed = ((100 - seed) / 50) + 0.5;
_root.cloud3._xscale = 100 - (seed / 2);
_root.cloud3._yscale = 100 - (seed / 2);
}
_root.map._x = _root.map._x - 2;
_root.hills._x = _root.hills._x - 1;
_root.hills2._x = _root.hills2._x - 1;
_root.map2._x = _root.map2._x - 2;
_root.cloud1._x = _root.cloud1._x - _root.cloud1.speed;
_root.cloud2._x = _root.cloud2._x - _root.cloud2.speed;
_root.cloud3._x = _root.cloud3._x - _root.cloud3.speed;
}
Instance of Symbol 313 MovieClip in Frame 10
onClipEvent (keyDown) {
_root.gotoAndPlay(1);
}
Symbol 29 MovieClip Frame 1
stop();
Symbol 30 MovieClip [FCConnectionLightSymbol] Frame 1
#initclip 6
function FCConnectionLightClass() {
this.init();
}
FCConnectionLightClass.prototype = new MovieClip();
Object.registerClass("FCConnectionLightSymbol", FCConnectionLightClass);
FCConnectionLightClass.prototype.init = function () {
this.name = this._name;
if ((this.name == null) || (this.name == "")) {
this.name = "_DEFAULT_";
}
this.prefix = ("FCConnectionLight." + this.name) + ".";
this.light_mc.useHandCursor = true;
this.light_mc.orig_xscale = this.light_mc._xscale;
this.light_mc.orig_yscale = this.light_mc._yscale;
this.light_mc.onPress = function () {
this._xscale = this._xscale * 0.95;
this._yscale = this._yscale * 0.95;
};
this.light_mc.onRelease = function () {
if (this._parent.details_mc._visible) {
this._parent.collapse();
} else {
this._parent.expand();
}
this._xscale = this.orig_xscale;
this._yscale = this.orig_yscale;
};
this.light_mc.onReleaseOutside = function () {
this._xscale = this.orig_xscale;
this._yscale = this.orig_yscale;
};
};
FCConnectionLightClass.prototype.onUnload = function () {
this.close();
};
FCConnectionLightClass.prototype.connect = function (nc) {
this.nc = nc;
if (this.nc.FCConnectionLight == null) {
this.nc.FCConnectionLight = {};
}
this.nc.FCConnectionLight[this.name] = this;
this.nc.call(this.prefix + "connect", null, this.interval * 1000);
if (this.nc.isConnected) {
this.showGreen();
}
this.checkInterval = setInterval(this, "onCheckInterval", 500);
};
FCConnectionLightClass.prototype.close = function () {
clearInterval(this.checkInterval);
var fullName = ("FCConnectionLight." + this.name);
this.nc.call(this.prefix + "close", null);
this.nc.FCConnectionLight[this.name] = null;
this.nc = null;
this.showGrey();
this.details_mc.latency_txt.text = (this.details_mc.bwup_txt.text = (this.details_mc.bwdown_txt.text = "--"));
};
FCConnectionLightClass.prototype.onCheckInterval = function () {
if (this.nc != null) {
if ((!this.isGrey()) && (!this.nc.isConnected)) {
this.showRed();
this.details_mc.latency_txt.text = (this.details_mc.bwup_txt.text = (this.details_mc.bwdown_txt.text = "--"));
} else if ((!this.isGreen()) && (!this.isYellow())) {
this.showGreen();
}
}
};
FCConnectionLightClass.prototype.expand = function () {
var name = ("fc_details_" + this.name);
_root.attachMovie("FCDetailsSymbol", name, this.popUpLevel);
this.details_mc = _root[name];
this.details_mc._visible = false;
var p = {x:this.light_mc._x, y:this.light_mc._y};
this.localToGlobal(p);
this.details_mc._x = p.x + this._width;
this.details_mc._y = p.y + this._height;
if (Math.abs(p.x - 0) > Math.abs(p.x - Stage.width)) {
this.details_mc._x = p.x - this.details_mc._width;
}
if (Math.abs(p.y - 0) > Math.abs(p.y - Stage.height)) {
this.details_mc._y = p.y - this.details_mc._height;
}
this.details_mc._visible = true;
};
FCConnectionLightClass.prototype.collapse = function () {
this.details_mc.removeMovieClip();
this.details_mc = null;
};
FCConnectionLightClass.prototype.isGrey = function () {
return(this.light_mc._currentFrame == 1);
};
FCConnectionLightClass.prototype.isGreen = function () {
return(this.light_mc._currentFrame == 2);
};
FCConnectionLightClass.prototype.isYellow = function () {
return(this.light_mc._currentFrame == 3);
};
FCConnectionLightClass.prototype.isRed = function () {
return(this.light_mc._currentFrame == 4);
};
FCConnectionLightClass.prototype.showGrey = function () {
this.light_mc.gotoAndStop(1);
};
FCConnectionLightClass.prototype.showGreen = function () {
this.light_mc.gotoAndStop(2);
};
FCConnectionLightClass.prototype.showYellow = function () {
this.light_mc.gotoAndStop(3);
};
FCConnectionLightClass.prototype.showRed = function () {
this.light_mc.gotoAndStop(4);
};
FCConnectionLightClass.prototype.update = function (ping, up, down) {
if (ping > (1000 * this.threshold)) {
this.showYellow();
} else {
this.showGreen();
}
var latency = this.formatTime(ping / 1000);
var upval = this.formatRate(up * 8000);
var dnval = this.formatRate(down * 8000);
if (ping < 1) {
this.details_mc.latency_txt.text = "< 1 msec";
} else {
this.details_mc.latency_txt.text = (latency.value + " ") + latency.unit;
}
this.details_mc.bwup_txt.text = (upval.value + " ") + upval.unit;
this.details_mc.bwdown_txt.text = (dnval.value + " ") + dnval.unit;
};
FCConnectionLightClass.prototype.formatNumber = function (value) {
var result;
if (value < 0.001) {
result = {value:0, exponent:0};
} else if (value < 1) {
result = {value:value * 1000, exponent:-3};
} else if (value < 1000) {
result = {value:value, exponent:0};
} else if (value < 1000000) {
result = {value:value / 1000, exponent:3};
} else if (value < 1000000000) {
result = {value:value / 1000000, exponent:6};
}
if (result.value < 10) {
result.value = Math.round(result.value * 100) / 100;
} else if (result.value < 100) {
result.value = Math.round(result.value * 10) / 10;
} else {
result.value = Math.round(result.value);
}
return(result);
};
FCConnectionLightClass.prototype.formatTime = function (value) {
var fixp = this.formatNumber(value);
if (fixp.exponent == -3) {
fixp.unit = "msec";
} else if (fixp.exponent == 0) {
fixp.unit = "sec";
}
return(fixp);
};
FCConnectionLightClass.prototype.formatRate = function (value) {
var fixp = this.formatNumber(value);
if (fixp.exponent == -3) {
(fixp.value = 0);
(fixp.exponent = 0);
} else if (fixp.exponent == 0) {
fixp.unit = "bit/s";
} else if (fixp.exponent == 3) {
fixp.unit = "kbit/s";
} else if (fixp.exponent == 6) {
fixp.unit = "mbit/s";
}
return(fixp);
};
#endinitclip
stop();
if (_global._popUpLevel == null) {
_global._popUpLevel = 20000;
}
this.popUpLevel = ++_global._popUpLevel;
_global._popUpLevel++;
Symbol 35 MovieClip [FCFLabelSymbol] Frame 1
#initclip 1
_global.FCFLabelClass = function () {
if (this.hostComponent == undefined) {
this.hostComponent = ((this._parent.controller == undefined) ? (this._parent) : (this._parent.controller));
}
if (this.customTextStyle == undefined) {
if (this.hostComponent.textStyle == undefined) {
this.hostComponent.textStyle = new TextFormat();
}
this.textStyle = this.hostComponent.textStyle;
this.enable = true;
}
};
FCFLabelClass.prototype = new MovieClip();
Object.registerClass("FCFLabelSymbol", FCFLabelClass);
FCFLabelClass.prototype.setLabel = function (label) {
var val = this.hostComponent.styleTable.embedFonts.value;
if (val != undefined) {
this.labelField.embedFonts = val;
}
this.labelField.setNewTextFormat(this.textStyle);
this.labelField.text = label;
this.labelField._height = this.labelField.textHeight + 2;
};
FCFLabelClass.prototype.setSize = function (width) {
this.labelField._width = width;
};
FCFLabelClass.prototype.setEnabled = function (enable) {
this.enable = enable;
var tmpColor = this.hostComponent.styleTable[(enable ? "textColor" : "textDisabled")].value;
if (tmpColor == undefined) {
tmpColor = (enable ? 0 : 8947848);
}
this.setColor(tmpColor);
};
FCFLabelClass.prototype.getLabel = function () {
return(this.labelField.text);
};
FCFLabelClass.prototype.setColor = function (col) {
this.labelField.textColor = col;
};
#endinitclip
Symbol 45 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 53 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 62 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame4, "shadow");
component.registerSkinElement(frame2, "darkshadow");
component.registerSkinElement(frame3, "highlight");
component.registerSkinElement(frame1, "highlight3D");
Symbol 73 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 74 MovieClip [FCfpb_states] Frame 1
stop();
Symbol 74 MovieClip [FCfpb_states] Frame 2
stop();
Symbol 74 MovieClip [FCfpb_states] Frame 3
stop();
Symbol 74 MovieClip [FCfpb_states] Frame 4
stop();
Symbol 75 MovieClip [FCFUIComponentSymbol] Frame 1
#initclip 2
function FCFUIComponentClass() {
this.init();
}
FCFUIComponentClass.prototype = new MovieClip();
FCFUIComponentClass.prototype.init = function () {
this.enable = true;
this.focused = false;
this.useHandCursor = false;
this._accImpl = new Object();
this._accImpl.stub = true;
this.styleTable = new Array();
if (_global.globalStyleFormat == undefined) {
_global.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_global._focusControl = new Object();
_global._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_global._focusControl);
}
if (this._name != undefined) {
this._focusrect = false;
this.tabEnabled = true;
this.focusEnabled = true;
this.tabChildren = false;
this.tabFocused = true;
if (this.hostStyle == undefined) {
globalStyleFormat.addListener(this);
} else {
this.styleTable = this.hostStyle;
}
this.deadPreview._visible = false;
this.deadPreview._width = (this.deadPreview._height = 1);
this.methodTable = new Object();
this.keyListener = new Object();
this.keyListener.controller = this;
this.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
this.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var i in this.styleFormat_prm) {
this.setStyleProperty(i, this.styleFormat_prm[i]);
}
}
};
FCFUIComponentClass.prototype.setEnabled = function (enabledFlag) {
this.enable = ((arguments.length > 0) ? (enabledFlag) : true);
this.tabEnabled = (this.focusEnabled = enabledFlag);
if ((!this.enable) && (this.focused)) {
Selection.setFocus(undefined);
}
};
FCFUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FCFUIComponentClass.prototype.setSize = function (w, h) {
this.width = w;
this.height = h;
this.focusRect.removeMovieClip();
};
FCFUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
this.handlerObj = ((obj == undefined) ? (this._parent) : (obj));
this.changeHandler = chng;
};
FCFUIComponentClass.prototype.invalidate = function (methodName) {
this.methodTable[methodName] = true;
this.onEnterFrame = this.cleanUI;
};
FCFUIComponentClass.prototype.cleanUI = function () {
if (this.methodTable.setSize) {
this.setSize(this.width, this.height);
} else {
this.cleanUINotSize();
}
this.methodTable = new Object();
delete this.onEnterFrame;
};
FCFUIComponentClass.prototype.cleanUINotSize = function () {
for (var funct in this.methodTable) {
this[funct]();
}
};
FCFUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var inner = this.styleTable.focusRectInner.value;
var outer = this.styleTable.focusRectOuter.value;
if (inner == undefined) {
inner = 16777215 /* 0xFFFFFF */;
}
if (outer == undefined) {
outer = 0;
}
this.createEmptyMovieClip("focusRect", 1000);
this.focusRect.controller = this;
this.focusRect.lineStyle(1, outer);
this.focusRect.moveTo(x, y);
this.focusRect.lineTo(x + w, y);
this.focusRect.lineTo(x + w, y + h);
this.focusRect.lineTo(x, y + h);
this.focusRect.lineTo(x, y);
this.focusRect.lineStyle(1, inner);
this.focusRect.moveTo(x + 1, y + 1);
this.focusRect.lineTo((x + w) - 1, y + 1);
this.focusRect.lineTo((x + w) - 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, y + 1);
};
FCFUIComponentClass.prototype.pressFocus = function () {
this.tabFocused = false;
this.focusRect.removeMovieClip();
Selection.setFocus(this);
};
FCFUIComponentClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this.width + 4, this.height + 4);
};
FCFUIComponentClass.prototype.myOnSetFocus = function () {
this.focused = true;
Key.addListener(this.keyListener);
if (this.tabFocused) {
this.drawFocusRect();
}
};
FCFUIComponentClass.prototype.myOnKillFocus = function () {
this.tabFocused = true;
this.focused = false;
this.focusRect.removeMovieClip();
Key.removeListener(this.keyListener);
};
FCFUIComponentClass.prototype.executeCallBack = function () {
this.handlerObj[this.changeHandler](this);
};
FCFUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FCFUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
if (value == "") {
return(undefined);
}
var tmpValue = parseInt(value);
if (!isNaN(tmpValue)) {
value = tmpValue;
}
var global = ((arguments.length > 2) ? (isGlobal) : false);
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].useGlobal || (!global)) {
this.styleTable[propName].value = value;
if (this.setCustomStyleProperty(propName, value)) {
} else if (propName == "embedFonts") {
this.invalidate("setSize");
} else if (propName.subString(0, 4) == "text") {
if (this.textStyle == undefined) {
this.textStyle = new TextFormat();
}
var textProp = propName.subString(4, propName.length);
this.textStyle[textProp] = value;
this.invalidate("setSize");
} else {
for (var j in this.styleTable[propName].coloredMCs) {
var myColor = new Color(this.styleTable[propName].coloredMCs[j]);
if (this.styleTable[propName].value == undefined) {
var myTObj = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
myColor.setTransform(myTObj);
} else {
myColor.setRGB(value);
}
}
}
this.styleTable[propName].useGlobal = global;
}
};
FCFUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].coloredMCs == undefined) {
this.styleTable[propName].coloredMCs = new Object();
}
this.styleTable[propName].coloredMCs[skinMCRef] = skinMCRef;
if (this.styleTable[propName].value != undefined) {
var myColor = new Color(skinMCRef);
myColor.setRGB(this.styleTable[propName].value);
}
};
_global.FStyleFormat = function () {
this.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
this.listeners = new Object();
this.isGlobal = false;
if (arguments.length > 0) {
for (var i in arguments[0]) {
this[i] = arguments[0][i];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var arg = 0;
while (arg < arguments.length) {
var mcRef = arguments[arg];
this.listeners[arguments[arg]] = mcRef;
for (var i in this) {
if (this.isAStyle(i)) {
mcRef.updateStyleProperty(this, i.toString());
}
}
arg++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
this.listeners[component] = undefined;
for (var prop in this) {
if (this.isAStyle(prop)) {
if (component.styleTable[prop].useGlobal == this.isGlobal) {
component.styleTable[prop].useGlobal = true;
var value = (this.isGlobal ? undefined : (globalStyleFormat[prop]));
component.setStyleProperty(prop, value, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var count = 0;
for (var i in this.listeners) {
var component = this.listeners[i];
if (arguments.length > 0) {
var j = 0;
while (j < arguments.length) {
if (this.isAStyle(arguments[j])) {
component.updateStyleProperty(this, arguments[j]);
}
j++;
}
} else {
for (var j in this) {
if (this.isAStyle(j)) {
component.updateStyleProperty(this, j.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 76 MovieClip [SettingsXMLLoaderSymbol] Frame 1
#initclip 3
function SettingsXMLLoader() {
this.init();
}
SettingsXMLLoader.prototype = new MovieClip();
Object.registerClass("SettingsXMLLoaderSymbol", SettingsXMLLoader);
SettingsXMLLoader.prototype.init = function () {
this.settings_xml = new XML();
this.settings_xml.owner = this;
this.settings_xml.ignoreWhite = true;
this.settings_xml.onData = function (src) {
if (src == undefined) {
} else {
this.parseXML(src);
this.loaded = true;
this.onLoad(true);
}
};
this.settings_xml.onLoad = function () {
if (this.firstChild.nodeName == "appSettings") {
this.owner.ParseSettings(this.firstChild);
}
};
};
SettingsXMLLoader.prototype.load = function () {
this.settings_xml.load("./settings.xml");
};
SettingsXMLLoader.prototype.ParseSettings = function (theNode) {
var m_children = theNode.childNodes;
var i = 0;
while (i < m_children.length) {
if (m_children[i].nodeName == "serverName") {
this.serverName = m_children[i].firstChild + "";
if (this.serverName.charAt(this.serverName.length - 1) != "/") {
this.serverName = this.serverName + "/";
}
}
i++;
}
this.onLoadSettings();
};
#endinitclip
Symbol 81 MovieClip [FCFBoundingBoxSymbol] Frame 1
var component = _parent;
component.registerSkinElement(boundingBox, "background");
stop();
Symbol 81 MovieClip [FCFBoundingBoxSymbol] Frame 2
component.registerSkinElement(boundingBox2, "backgroundDisabled");
stop();
Symbol 84 MovieClip [FCFPushButtonSymbol] Frame 1
#initclip 4
function FCFPushButtonClass() {
this.init();
}
FCFPushButtonClass.prototype = new FCFUIComponentClass();
Object.registerClass("FCFPushButtonSymbol", FCFPushButtonClass);
FCFPushButtonClass.prototype.init = function () {
super.setSize(this._width, this._height);
this.boundingBox_mc.unloadMovie();
this.attachMovie("FCfpb_states", "fpbState_mc", 1);
this.attachMovie("FCFLabelSymbol", "fLabel_mc", 2);
this.attachMovie("FCfpb_hitArea", "fpb_hitArea_mc", 3);
super.init();
this.btnState = false;
this.setClickHandler(this.clickHandler);
this._xscale = 100;
this._yscale = 100;
this.setSize(this.width, this.height);
if (this.label != undefined) {
this.setLabel(this.label);
}
this.ROLE_SYSTEM_PUSHBUTTON = 43;
this.STATE_SYSTEM_PRESSED = 8;
this.EVENT_OBJECT_STATECHANGE = 32778;
this.EVENT_OBJECT_NAMECHANGE = 32780;
this._accImpl.master = this;
this._accImpl.stub = false;
this._accImpl.get_accRole = this.get_accRole;
this._accImpl.get_accName = this.get_accName;
this._accImpl.get_accState = this.get_accState;
this._accImpl.get_accDefaultAction = this.get_accDefaultAction;
this._accImpl.accDoDefaultAction = this.accDoDefaultAction;
};
FCFPushButtonClass.prototype.setHitArea = function (w, h) {
var hit = this.fpb_hitArea_mc;
this.hitArea = hit;
hit._visible = false;
hit._width = w;
hit._height = ((arguments.length > 1) ? (h) : (hit._height));
};
FCFPushButtonClass.prototype.setSize = function (w, h) {
w = ((w < 6) ? 6 : (w));
if (arguments.length > 1) {
if (h < 6) {
h = 6;
}
}
super.setSize(w, h);
this.setLabel(this.getLabel());
this.arrangeLabel();
this.setHitArea(w, h);
this.boundingBox_mc._width = w;
this.boundingBox_mc._height = h;
this.drawFrame();
if (this.focused) {
super.myOnSetFocus();
}
this.initContentPos("fLabel_mc");
};
FCFPushButtonClass.prototype.arrangeLabel = function () {
var label = this.fLabel_mc;
var h = this.height;
var w = (this.width - 2);
var b = 1;
this.fLabel_mc.setSize(w - (b * 4));
label._x = b * 3;
label._y = (h / 2) - (label._height / 2);
};
FCFPushButtonClass.prototype.getLabel = function () {
return(this.fLabel_mc.labelField.text);
};
FCFPushButtonClass.prototype.setLabel = function (label) {
this.fLabel_mc.setLabel(label);
this.txtFormat();
this.arrangeLabel();
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_NAMECHANGE);
}
};
FCFPushButtonClass.prototype.getEnabled = function () {
return(this.enabled);
};
FCFPushButtonClass.prototype.setEnabled = function (enable) {
if (enable || (enable == undefined)) {
this.fpbState_mc.gotoAndStop(1);
this.drawFrame();
this.flabel_mc.setEnabled(true);
this.enabled = true;
super.setEnabled(true);
} else {
this.fpbState_mc.gotoAndStop(4);
this.drawFrame();
this.flabel_mc.setEnabled(false);
this.enabled = false;
super.setEnabled(false);
}
};
FCFPushButtonClass.prototype.txtFormat = function () {
var txtS = this.textStyle;
var sTbl = this.styleTable;
txtS.align = ((sTbl.textAlign.value == undefined) ? ((txtS.align = "center")) : undefined);
txtS.leftMargin = ((sTbl.textLeftMargin.value == undefined) ? ((txtS.leftMargin = 1)) : undefined);
txtS.rightMargin = ((sTbl.textRightMargin.value == undefined) ? ((txtS.rightMargin = 1)) : undefined);
if (this.fLabel_mc._height > this.height) {
super.setSize(this.width, this.fLabel_mc._height);
} else {
super.setSize(this.width, this.height);
}
this.fLabel_mc.labelField.setTextFormat(this.textStyle);
this.setEnabled(this.enable);
};
FCFPushButtonClass.prototype.drawFrame = function () {
var b = 1;
var x1 = 0;
var y1 = 0;
var x2 = this.width;
var y2 = this.height;
var mc_array = ["up_mc", "over_mc", "down_mc", "disabled_mc"];
var frame = mc_array[this.fpbState_mc._currentframe - 1];
var mc = "frame";
var i = 0;
while (i < 6) {
x1 = x1 + ((i % 2) * b);
y1 = y1 + ((i % 2) * b);
x2 = x2 - (((i + 1) % 2) * b);
y2 = y2 - (((i + 1) % 2) * b);
var w = (Math.abs(x1 - x2) + (2 * b));
var h = (Math.abs(y1 - y2) + (2 * b));
this.fpbState_mc[frame][mc + i]._width = w;
this.fpbState_mc[frame][mc + i]._height = h;
this.fpbState_mc[frame][mc + i]._x = x1 - b;
this.fpbState_mc[frame][mc + i]._y = y1 - b;
i++;
}
};
FCFPushButtonClass.prototype.setClickHandler = function (chng, obj) {
this.handlerObj = ((arguments.length < 2) ? (this._parent) : (obj));
this.clickHandler = chng;
};
FCFPushButtonClass.prototype.executeCallBack = function () {
this.handlerObj[this.clickHandler](this);
};
FCFPushButtonClass.prototype.initContentPos = function (mc) {
this.incrVal = 1;
this.initx = this[mc]._x - (this.getBtnState() * this.incrVal);
this.inity = this[mc]._y - (this.getBtnState() * this.incrVal);
this.togx = this.initx + this.incrVal;
this.togy = this.inity + this.incrVal;
};
FCFPushButtonClass.prototype.setBtnState = function (state) {
this.btnState = state;
if (state) {
}
};
FCFPushButtonClass.prototype.getBtnState = function () {
return(this.btnState);
};
FCFPushButtonClass.prototype.myOnSetFocus = function () {
this.focused = true;
super.myOnSetFocus();
};
FCFPushButtonClass.prototype.onPress = function () {
this.pressFocus();
this.fpbState_mc.gotoAndStop(3);
this.drawFrame();
this.setBtnState(true);
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_STATECHANGE, true);
}
};
FCFPushButtonClass.prototype.onRelease = function () {
this.fpbState_mc.gotoAndStop(2);
this.drawFrame();
this.executeCallBack();
this.setBtnState(false);
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_STATECHANGE, true);
}
};
FCFPushButtonClass.prototype.onRollOver = function () {
this.fpbState_mc.gotoAndStop(2);
this.drawFrame();
};
FCFPushButtonClass.prototype.onRollOut = function () {
this.fpbState_mc.gotoAndStop(1);
this.drawFrame();
};
FCFPushButtonClass.prototype.onReleaseOutside = function () {
this.setBtnState(false);
this.fpbState_mc.gotoAndStop(1);
this.drawFrame();
};
FCFPushButtonClass.prototype.onDragOut = function () {
this.setBtnState(false);
this.fpbState_mc.gotoAndStop(1);
this.drawFrame();
};
FCFPushButtonClass.prototype.onDragOver = function () {
this.setBtnState(true);
this.fpbState_mc.gotoAndStop(3);
this.drawFrame();
};
FCFPushButtonClass.prototype.myOnKeyDown = function () {
if ((Key.getCode() == 32) && (this.pressOnce == undefined)) {
this.onPress();
this.pressOnce = 1;
}
};
FCFPushButtonClass.prototype.myOnKeyUp = function () {
if (Key.getCode() == 32) {
this.onRelease();
this.pressOnce = undefined;
}
};
FCFPushButtonClass.prototype.get_accRole = function (childId) {
return(this.master.ROLE_SYSTEM_PUSHBUTTON);
};
FCFPushButtonClass.prototype.get_accName = function (childId) {
return(this.master.getLabel());
};
FCFPushButtonClass.prototype.get_accState = function (childId) {
if (this.pressOnce) {
return(this.master.STATE_SYSTEM_PRESSED);
}
return(this.master.STATE_SYSTEM_DEFAULT);
};
FCFPushButtonClass.prototype.get_accDefaultAction = function (childId) {
return("Press");
};
FCFPushButtonClass.prototype.accDoDefaultAction = function (childId) {
this.master.onPress();
this.master.onRelease();
};
#endinitclip
var frogPushStyle = new FStyleFormat();
frogPushStyle.textColor = "0xffffff";
frogPushStyle.addListener(this);
boundingBox_mc._visible = false;
deadPreview._visible = false;
Symbol 89 MovieClip [FCSimpleConnectSymbol] Frame 1
#initclip 5
function FCSimpleConnectClass() {
this.init();
}
FCSimpleConnectClass.prototype = new MovieClip();
Object.registerClass("FCSimpleConnectSymbol", FCSimpleConnectClass);
FCSimpleConnectClass.prototype.onUnload = function () {
this.close();
};
FCSimpleConnectClass.prototype.init = function () {
this.name = ((this._name == null) ? "_DEFAULT_" : (this._name));
this.prefix = ("FCSimpleConnect." + this.name) + ".";
this.enterListener = new Object();
this.enterListener.owner = this;
this.enterListener.enterPressed = false;
this.enterListener.onChanged = function () {
if (this.owner.username_txt.text.length == 0) {
this.owner.changeName_btn.setEnabled(false);
} else {
this.owner.changeName_btn.setEnabled(true);
enterChar = this.owner.username_txt.text.charAt(Selection.getEndIndex() - 1);
if (enterChar == String.fromCharCode(13)) {
this.owner.username_txt.text = this.owner.username_txt.text.substring(0, this.owner.username_txt.text.length - 1);
this.owner.loginChange();
}
}
};
this.username_txt.addListener(this.enterListener);
};
FCSimpleConnectClass.prototype.close = function () {
this.nc.call(this.prefix + "close", null);
this.nc.FCSimpleConnect[this.name] = null;
this.nc = null;
};
FCSimpleConnectClass.prototype.serverConnect = function (username, appInstance) {
this.close();
var i = 0;
while (i < this.fcComponents.length) {
this._parent[this.fcComponents[i]].close();
i++;
}
this.main_nc.close();
if (appInstance != null) {
this.appDirectory = this.appDirectory + ("/" + appInstance);
}
if (username != null) {
this.username = username;
this.changeName_btn._visible = false;
this.inputBg_mc._visible = false;
} else {
this.local_so = SharedObject.getLocal("FCUsername", "/");
if (this.local_so.data.username != null) {
this.username = this.local_so.data.username;
this.changeName_btn.setEnabled(true);
}
}
if (this.appDirectory.substring(0, 8).toUpperCase() == "FROMXML/") {
this.attachMovie("SettingsXMLLoaderSymbol", "appSettings", 0);
this.appSettings.load();
this.appSettings.owner = this;
this.appSettings.onLoadSettings = function () {
if (this.serverName != "null/") {
this.owner.appDirectory = (("rtmp://" + this.serverName) + "") + this.owner.appDirectory.substring(8);
} else {
this.owner.appDirectory = "rtmp:/" + this.owner.appDirectory.substring(8);
}
this.owner.actualConnect();
};
} else {
this.actualConnect();
}
};
FCSimpleConnectClass.prototype.actualConnect = function (newName) {
this.rtmp_nc = new NetConnection();
this.rtmp_nc.owner = this;
this.rtmp_nc.onStatus = function (info) {
this.pending = false;
if (info.code == "NetConnection.Connect.Success") {
if (this.owner.rtmpt_nc.pending) {
this.owner.rtmpt_nc.onStatus = null;
this.owner.rtmpt_nc.close();
this.owner.rtmpt_nc = null;
}
this.owner.main_nc = this;
this.owner.connect(this);
} else if (!this.owner.rtmpt_nc.pending) {
this.owner.raiseOnStatus(info);
}
};
this.rtmpt_nc = new NetConnection();
this.rtmpt_nc.owner = this;
this.rtmpt_nc.onStatus = function (info) {
this.pending = false;
if (info.code == "NetConnection.Connect.Success") {
if (this.owner.rtmp_nc.pending) {
this.owner.rtmp_nc.onStatus = null;
this.owner.rtmp_nc.close();
this.owner.rtmp_nc = null;
}
this.owner.main_nc = this;
this.owner.connect(this);
} else if (!this.owner.rtmp_nc.pending) {
this.owner.raiseOnStatus(info);
}
};
this.rtmp_nc.pending = true;
this.rtmpt_nc.pending = true;
var i = this.appDirectory.indexOf(":");
if (this.appDirectory.substring(0, i) == "rtmp") {
this.appDirectoryNoProtocol = this.removeSpaces(this.appDirectory).substr(i);
this.rtmp_nc.connect("rtmp" + this.appDirectoryNoProtocol, this.username);
this.conn_int = setInterval(this, "connectRtmpt", 250);
} else {
this.rtmp_nc.connect(this.removeSpaces(this.appDirectory), this.username);
}
};
FCSimpleConnectClass.prototype.connectRtmpt = function () {
clearInterval(this.conn_int);
this.rtmpt_nc.connect("rtmpt" + this.appDirectoryNoProtocol, this.username);
};
FCSimpleConnectClass.prototype.connect = function (nc) {
this.setUsername(this.username);
this.nc = nc;
if (this.nc.FCSimpleConnect == null) {
this.nc.FCSimpleConnect = {};
}
this.nc.FCSimpleConnect[this.name] = this;
var res = new Object();
res.owner = this;
res.onResult = function (val) {
this.owner.attachComponents();
};
this.nc.call(this.prefix + "connect", res, this.username);
this.nc.call(this.prefix + "changeName", null, this.username);
};
FCSimpleConnectClass.prototype.attachComponents = function () {
var i = 0;
while (i < this.fcComponents.length) {
this._parent[this.fcComponents[i]].connect(this.main_nc);
this._parent[this.fcComponents[i]].setUsername(this.username);
i++;
}
this.onComponentsConnected();
};
FCSimpleConnectClass.prototype.setUsername = function (newName) {
if (newName == null) {
this.username_txt.text = "Your Name";
} else {
this.username = newName;
this.username_txt.text = newName;
}
};
FCSimpleConnectClass.prototype.changedName = function (newName) {
var i = 0;
while (i < this.fcComponents.length) {
this._parent[this.fcComponents[i]].setUsername(newName);
i++;
}
};
FCSimpleConnectClass.prototype.loginChange = function () {
if (this.username_txt.text.length == 0) {
this.changeName_btn.setEnabled(false);
} else if (this.username != this.username_txt.text) {
this.username = this.username_txt.text;
this.main_nc.call(this.prefix + "changeName", null, this.username);
this.local_so.data.username = this.username;
this.local_so.flush();
}
};
FCSimpleConnectClass.prototype.checkName = function () {
clearInterval(this.intervalID);
var newName = this.username_txt.text;
var btn = this.changeName_btn;
if (newName.length == 0) {
btn.setEnabled(false);
} else if (newName.charAt(0) == " ") {
btn.setEnabled(false);
} else if (btn.enabled == false) {
btn.setEnabled(true);
}
};
FCSimpleConnectClass.prototype.removeSpaces = function (str) {
var i = 0;
while (str.charAt(i) == " ") {
i++;
}
str = str.substr(i);
i = length(str) - 1;
while (str.charAt(i) == " ") {
i--;
}
str = str.substr(0, i + 1);
return(str);
};
FCSimpleConnectClass.prototype.setSize = function (newWidth, newHeight) {
this._xscale = 100;
this._yscale = 100;
this.username_txt._width = newWidth - 73;
this.changeName_btn._x = newWidth - this.changeName_btn._width;
this.inputBg_mc._width = this.username_txt._width;
};
#endinitclip
this.setSize(this._width, this._height);
this.serverConnect(_parent.username, _parent.appInstance);
Instance of Symbol 84 MovieClip [FCFPushButtonSymbol] "changeName_btn" in Symbol 89 MovieClip [FCSimpleConnectSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
label = "Login";
clickHandler = "loginChange";
}
Symbol 239 MovieClip [mani] Frame 1
stop();
Symbol 239 MovieClip [mani] Frame 4
stop();
Symbol 239 MovieClip [mani] Frame 10
stop();
Symbol 239 MovieClip [mani] Frame 11
stop();
Symbol 239 MovieClip [mani] Frame 14
stop();
Symbol 239 MovieClip [mani] Frame 20
stop();