Section 1
//2_sound_259 (BirdRacing_fla.2_sound_259)
package BirdRacing_fla {
import flash.display.*;
public dynamic class 2_sound_259 extends MovieClip {
public function 2_sound_259(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 2
//3_sound_260 (BirdRacing_fla.3_sound_260)
package BirdRacing_fla {
import flash.display.*;
public dynamic class 3_sound_260 extends MovieClip {
public function 3_sound_260(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 3
//ai_picked_313 (BirdRacing_fla.ai_picked_313)
package BirdRacing_fla {
import flash.display.*;
public dynamic class ai_picked_313 extends MovieClip {
public function ai_picked_313(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 4
//allChickenNames_213 (BirdRacing_fla.allChickenNames_213)
package BirdRacing_fla {
import flash.display.*;
public dynamic class allChickenNames_213 extends MovieClip {
public function allChickenNames_213(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 5
//allChickens_208 (BirdRacing_fla.allChickens_208)
package BirdRacing_fla {
import flash.display.*;
public dynamic class allChickens_208 extends MovieClip {
public function allChickens_208(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 6
//anim_104 (BirdRacing_fla.anim_104)
package BirdRacing_fla {
import flash.display.*;
import com.ussgames.general.*;
import com.ussgames.sound.*;
public dynamic class anim_104 extends MovieClip {
public function anim_104(){
addFrameScript(2, frame3, 14, frame15);
}
function frame15(){
ScreenShaker.shakeScreen(1, 2);
SoundController.playSound("step");
}
function frame3(){
ScreenShaker.shakeScreen(1, 2);
SoundController.playSound("step");
}
}
}//package BirdRacing_fla
Section 7
//anim1hole_112 (BirdRacing_fla.anim1hole_112)
package BirdRacing_fla {
import flash.display.*;
public dynamic class anim1hole_112 extends MovieClip {
public function anim1hole_112(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package BirdRacing_fla
Section 8
//anim2_153 (BirdRacing_fla.anim2_153)
package BirdRacing_fla {
import flash.display.*;
import com.ussgames.general.*;
import com.ussgames.sound.*;
public dynamic class anim2_153 extends MovieClip {
public function anim2_153(){
addFrameScript(2, frame3, 14, frame15);
}
function frame15(){
ScreenShaker.shakeScreen(1, 2);
SoundController.playSound("step");
}
function frame3(){
ScreenShaker.shakeScreen(1, 2);
SoundController.playSound("step");
}
}
}//package BirdRacing_fla
Section 9
//anim2_wait_145 (BirdRacing_fla.anim2_wait_145)
package BirdRacing_fla {
import flash.display.*;
public dynamic class anim2_wait_145 extends MovieClip {
public function anim2_wait_145(){
addFrameScript(1, frame2, 6, frame7);
}
function frame7(){
stop();
}
function frame2(){
stop();
}
}
}//package BirdRacing_fla
Section 10
//anim2hole_161 (BirdRacing_fla.anim2hole_161)
package BirdRacing_fla {
import flash.display.*;
public dynamic class anim2hole_161 extends MovieClip {
public function anim2hole_161(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package BirdRacing_fla
Section 11
//anim3_118 (BirdRacing_fla.anim3_118)
package BirdRacing_fla {
import flash.display.*;
import com.ussgames.general.*;
import com.ussgames.sound.*;
public dynamic class anim3_118 extends MovieClip {
public function anim3_118(){
addFrameScript(2, frame3, 14, frame15);
}
function frame15(){
ScreenShaker.shakeScreen(1, 2);
SoundController.playSound("step");
}
function frame3(){
ScreenShaker.shakeScreen(1, 2);
SoundController.playSound("step");
}
}
}//package BirdRacing_fla
Section 12
//anim3_wait_114 (BirdRacing_fla.anim3_wait_114)
package BirdRacing_fla {
import flash.display.*;
public dynamic class anim3_wait_114 extends MovieClip {
public function anim3_wait_114(){
addFrameScript(1, frame2, 6, frame7);
}
function frame7(){
stop();
}
function frame2(){
stop();
}
}
}//package BirdRacing_fla
Section 13
//anim3fallinhole_125 (BirdRacing_fla.anim3fallinhole_125)
package BirdRacing_fla {
import flash.display.*;
public dynamic class anim3fallinhole_125 extends MovieClip {
public function anim3fallinhole_125(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package BirdRacing_fla
Section 14
//anim4_136 (BirdRacing_fla.anim4_136)
package BirdRacing_fla {
import flash.display.*;
import com.ussgames.general.*;
import com.ussgames.sound.*;
public dynamic class anim4_136 extends MovieClip {
public function anim4_136(){
addFrameScript(2, frame3, 14, frame15);
}
function frame15(){
ScreenShaker.shakeScreen(1, 2);
SoundController.playSound("step");
}
function frame3(){
ScreenShaker.shakeScreen(1, 2);
SoundController.playSound("step");
}
}
}//package BirdRacing_fla
Section 15
//anim4_tumble_139 (BirdRacing_fla.anim4_tumble_139)
package BirdRacing_fla {
import flash.display.*;
import com.ussgames.general.*;
import com.ussgames.birdRacing.*;
import com.ussgames.sound.*;
public dynamic class anim4_tumble_139 extends MovieClip {
public function anim4_tumble_139(){
addFrameScript(17, frame18, 21, frame22, 24, frame25);
}
function frame25(){
(parent as BigBird).backUp();
stop();
}
function frame18(){
(parent as BigBird).addDust();
ScreenShaker.shakeScreen(3, 3);
SoundController.playSound("clip");
}
function frame22(){
(parent as BigBird).addDust();
ScreenShaker.shakeScreen(3, 3);
SoundController.playSound("clip");
}
}
}//package BirdRacing_fla
Section 16
//anim4_wait_127 (BirdRacing_fla.anim4_wait_127)
package BirdRacing_fla {
import flash.display.*;
public dynamic class anim4_wait_127 extends MovieClip {
public function anim4_wait_127(){
addFrameScript(1, frame2, 6, frame7);
}
function frame7(){
stop();
}
function frame2(){
stop();
}
}
}//package BirdRacing_fla
Section 17
//anim4hole_143 (BirdRacing_fla.anim4hole_143)
package BirdRacing_fla {
import flash.display.*;
public dynamic class anim4hole_143 extends MovieClip {
public function anim4hole_143(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package BirdRacing_fla
Section 18
//applausesnd_286 (BirdRacing_fla.applausesnd_286)
package BirdRacing_fla {
import flash.display.*;
public dynamic class applausesnd_286 extends MovieClip {
public function applausesnd_286(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 19
//aSound_258 (BirdRacing_fla.aSound_258)
package BirdRacing_fla {
import flash.display.*;
public dynamic class aSound_258 extends MovieClip {
public function aSound_258(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 20
//bathfallsnd_276 (BirdRacing_fla.bathfallsnd_276)
package BirdRacing_fla {
import flash.display.*;
public dynamic class bathfallsnd_276 extends MovieClip {
public function bathfallsnd_276(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 21
//bathinlead_277 (BirdRacing_fla.bathinlead_277)
package BirdRacing_fla {
import flash.display.*;
public dynamic class bathinlead_277 extends MovieClip {
public function bathinlead_277(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 22
//bathoutsnd_279 (BirdRacing_fla.bathoutsnd_279)
package BirdRacing_fla {
import flash.display.*;
public dynamic class bathoutsnd_279 extends MovieClip {
public function bathoutsnd_279(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 23
//bathstumblesnd_275 (BirdRacing_fla.bathstumblesnd_275)
package BirdRacing_fla {
import flash.display.*;
public dynamic class bathstumblesnd_275 extends MovieClip {
public function bathstumblesnd_275(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 24
//bathwinsnd_278 (BirdRacing_fla.bathwinsnd_278)
package BirdRacing_fla {
import flash.display.*;
public dynamic class bathwinsnd_278 extends MovieClip {
public function bathwinsnd_278(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 25
//bgContainer_344 (BirdRacing_fla.bgContainer_344)
package BirdRacing_fla {
import flash.display.*;
public dynamic class bgContainer_344 extends MovieClip {
public function bgContainer_344(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 26
//bird1_fall_109 (BirdRacing_fla.bird1_fall_109)
package BirdRacing_fla {
import flash.display.*;
import com.ussgames.general.*;
import com.ussgames.birdRacing.*;
import com.ussgames.sound.*;
public dynamic class bird1_fall_109 extends MovieClip {
public function bird1_fall_109(){
addFrameScript(22, frame23, 28, frame29, 29, frame30, 30, frame31, 31, frame32, 32, frame33, 33, frame34, 34, frame35, 45, frame46);
}
function frame29(){
(parent as BigBird).addDust();
}
function frame34(){
(parent as BigBird).addDust();
}
function frame46(){
(parent as BigBird).backUp();
stop();
}
function frame30(){
(parent as BigBird).addDust();
}
function frame31(){
(parent as BigBird).addDust();
}
function frame32(){
(parent as BigBird).addDust();
}
function frame33(){
(parent as BigBird).addDust();
}
function frame23(){
(parent as BigBird).addDust();
ScreenShaker.shakeScreen(5, 5);
SoundController.playSound("fallland");
}
function frame35(){
(parent as BigBird).addDust();
}
}
}//package BirdRacing_fla
Section 27
//bird2_tumble_157 (BirdRacing_fla.bird2_tumble_157)
package BirdRacing_fla {
import flash.display.*;
import com.ussgames.general.*;
import com.ussgames.birdRacing.*;
import com.ussgames.sound.*;
public dynamic class bird2_tumble_157 extends MovieClip {
public function bird2_tumble_157(){
addFrameScript(17, frame18, 21, frame22, 24, frame25);
}
function frame25(){
(parent as BigBird).backUp();
stop();
}
function frame18(){
(parent as BigBird).addDust();
ScreenShaker.shakeScreen(3, 3);
SoundController.playSound("clip");
}
function frame22(){
(parent as BigBird).addDust();
ScreenShaker.shakeScreen(3, 3);
SoundController.playSound("clip");
}
}
}//package BirdRacing_fla
Section 28
//bird2Fall_158 (BirdRacing_fla.bird2Fall_158)
package BirdRacing_fla {
import flash.display.*;
import com.ussgames.general.*;
import com.ussgames.birdRacing.*;
import com.ussgames.sound.*;
public dynamic class bird2Fall_158 extends MovieClip {
public function bird2Fall_158(){
addFrameScript(21, frame22, 27, frame28, 28, frame29, 29, frame30, 30, frame31, 31, frame32, 32, frame33, 33, frame34, 44, frame45);
}
function frame28(){
(parent as BigBird).addDust();
}
function frame29(){
(parent as BigBird).addDust();
}
function frame33(){
(parent as BigBird).addDust();
}
function frame45(){
(parent as BigBird).backUp();
stop();
}
function frame30(){
(parent as BigBird).addDust();
}
function frame31(){
(parent as BigBird).addDust();
}
function frame32(){
(parent as BigBird).addDust();
}
function frame22(){
(parent as BigBird).addDust();
ScreenShaker.shakeScreen(5, 5);
SoundController.playSound("fallland");
}
function frame34(){
(parent as BigBird).addDust();
}
}
}//package BirdRacing_fla
Section 29
//bird3Fall_122 (BirdRacing_fla.bird3Fall_122)
package BirdRacing_fla {
import flash.display.*;
import com.ussgames.general.*;
import com.ussgames.birdRacing.*;
import com.ussgames.sound.*;
public dynamic class bird3Fall_122 extends MovieClip {
public function bird3Fall_122(){
addFrameScript(21, frame22, 27, frame28, 28, frame29, 29, frame30, 30, frame31, 31, frame32, 32, frame33, 33, frame34, 44, frame45);
}
function frame28(){
(parent as BigBird).addDust();
}
function frame29(){
(parent as BigBird).addDust();
}
function frame33(){
(parent as BigBird).addDust();
}
function frame45(){
(parent as BigBird).backUp();
stop();
}
function frame30(){
(parent as BigBird).addDust();
}
function frame31(){
(parent as BigBird).addDust();
}
function frame32(){
(parent as BigBird).addDust();
}
function frame22(){
(parent as BigBird).addDust();
ScreenShaker.shakeScreen(5, 5);
SoundController.playSound("fallland");
}
function frame34(){
(parent as BigBird).addDust();
}
}
}//package BirdRacing_fla
Section 30
//bird4Fall_140 (BirdRacing_fla.bird4Fall_140)
package BirdRacing_fla {
import flash.display.*;
import com.ussgames.general.*;
import com.ussgames.birdRacing.*;
import com.ussgames.sound.*;
public dynamic class bird4Fall_140 extends MovieClip {
public function bird4Fall_140(){
addFrameScript(21, frame22, 27, frame28, 28, frame29, 29, frame30, 30, frame31, 31, frame32, 32, frame33, 33, frame34, 44, frame45);
}
function frame28(){
(parent as BigBird).addDust();
}
function frame29(){
(parent as BigBird).addDust();
}
function frame33(){
(parent as BigBird).addDust();
}
function frame45(){
(parent as BigBird).backUp();
stop();
}
function frame30(){
(parent as BigBird).addDust();
}
function frame31(){
(parent as BigBird).addDust();
}
function frame32(){
(parent as BigBird).addDust();
}
function frame22(){
(parent as BigBird).addDust();
ScreenShaker.shakeScreen(5, 5);
SoundController.playSound("fallland");
}
function frame34(){
(parent as BigBird).addDust();
}
}
}//package BirdRacing_fla
Section 31
//birdwait1_87 (BirdRacing_fla.birdwait1_87)
package BirdRacing_fla {
import flash.display.*;
public dynamic class birdwait1_87 extends MovieClip {
public function birdwait1_87(){
addFrameScript(1, frame2, 6, frame7);
}
function frame7(){
stop();
}
function frame2(){
stop();
}
}
}//package BirdRacing_fla
Section 32
//brainfallsnd_266 (BirdRacing_fla.brainfallsnd_266)
package BirdRacing_fla {
import flash.display.*;
public dynamic class brainfallsnd_266 extends MovieClip {
public function brainfallsnd_266(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 33
//brainleadsnd_267 (BirdRacing_fla.brainleadsnd_267)
package BirdRacing_fla {
import flash.display.*;
public dynamic class brainleadsnd_267 extends MovieClip {
public function brainleadsnd_267(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 34
//brainout_269 (BirdRacing_fla.brainout_269)
package BirdRacing_fla {
import flash.display.*;
public dynamic class brainout_269 extends MovieClip {
public function brainout_269(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 35
//brainstumbsnd_265 (BirdRacing_fla.brainstumbsnd_265)
package BirdRacing_fla {
import flash.display.*;
public dynamic class brainstumbsnd_265 extends MovieClip {
public function brainstumbsnd_265(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 36
//brainwinsnd_268 (BirdRacing_fla.brainwinsnd_268)
package BirdRacing_fla {
import flash.display.*;
public dynamic class brainwinsnd_268 extends MovieClip {
public function brainwinsnd_268(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 37
//cameraSound_295 (BirdRacing_fla.cameraSound_295)
package BirdRacing_fla {
import flash.display.*;
public dynamic class cameraSound_295 extends MovieClip {
public function cameraSound_295(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 38
//chooseCountdown_314 (BirdRacing_fla.chooseCountdown_314)
package BirdRacing_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.geom.*;
import com.ussgames.game.*;
import flash.text.*;
import flash.media.*;
import flash.external.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class chooseCountdown_314 extends MovieClip {
public function chooseCountdown_314(){
addFrameScript(0, frame1, 330, frame331);
}
function frame331(){
stop();
Controller.main.birdsChosen();
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 39
//clipsound_287 (BirdRacing_fla.clipsound_287)
package BirdRacing_fla {
import flash.display.*;
public dynamic class clipsound_287 extends MovieClip {
public function clipsound_287(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 40
//confettiPiece_15 (BirdRacing_fla.confettiPiece_15)
package BirdRacing_fla {
import flash.display.*;
public dynamic class confettiPiece_15 extends MovieClip {
public function confettiPiece_15(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop((Math.floor((Math.random() * 8)) + 1));
}
}
}//package BirdRacing_fla
Section 41
//dollyfalls_271 (BirdRacing_fla.dollyfalls_271)
package BirdRacing_fla {
import flash.display.*;
public dynamic class dollyfalls_271 extends MovieClip {
public function dollyfalls_271(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 42
//dollyleadsnd_272 (BirdRacing_fla.dollyleadsnd_272)
package BirdRacing_fla {
import flash.display.*;
public dynamic class dollyleadsnd_272 extends MovieClip {
public function dollyleadsnd_272(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 43
//dollyoutsnd_274 (BirdRacing_fla.dollyoutsnd_274)
package BirdRacing_fla {
import flash.display.*;
public dynamic class dollyoutsnd_274 extends MovieClip {
public function dollyoutsnd_274(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 44
//dollystumbsnd_270 (BirdRacing_fla.dollystumbsnd_270)
package BirdRacing_fla {
import flash.display.*;
public dynamic class dollystumbsnd_270 extends MovieClip {
public function dollystumbsnd_270(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 45
//dollywinsnd_273 (BirdRacing_fla.dollywinsnd_273)
package BirdRacing_fla {
import flash.display.*;
public dynamic class dollywinsnd_273 extends MovieClip {
public function dollywinsnd_273(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 46
//dust1_67 (BirdRacing_fla.dust1_67)
package BirdRacing_fla {
import flash.display.*;
public dynamic class dust1_67 extends MovieClip {
public function dust1_67(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
gotoAndStop((Math.floor((Math.random() * 4)) + 1));
}
}
}//package BirdRacing_fla
Section 47
//fade1_10 (BirdRacing_fla.fade1_10)
package BirdRacing_fla {
import flash.display.*;
public dynamic class fade1_10 extends MovieClip {
public function fade1_10(){
addFrameScript(17, frame18);
}
function frame18(){
(parent as MovieClip).gotoAndStop("podgeSplash");
}
}
}//package BirdRacing_fla
Section 48
//falllandsnd_291 (BirdRacing_fla.falllandsnd_291)
package BirdRacing_fla {
import flash.display.*;
public dynamic class falllandsnd_291 extends MovieClip {
public function falllandsnd_291(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 49
//FFall_350 (BirdRacing_fla.FFall_350)
package BirdRacing_fla {
import flash.display.*;
import com.ussgames.birdRacing.*;
public dynamic class FFall_350 extends MovieClip {
public var tips:MovieClip;
public function FFall_350(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
tips.gotoAndStop(BirdRacingMain.raceType);
}
}
}//package BirdRacing_fla
Section 50
//gameContainer_outer_345 (BirdRacing_fla.gameContainer_outer_345)
package BirdRacing_fla {
import flash.display.*;
public dynamic class gameContainer_outer_345 extends MovieClip {
public var gameContainer:MovieClip;
public function gameContainer_outer_345(){
addFrameScript(0, frame1, 29, frame30);
}
function frame30(){
stop();
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 51
//hedgeTumble_294 (BirdRacing_fla.hedgeTumble_294)
package BirdRacing_fla {
import flash.display.*;
public dynamic class hedgeTumble_294 extends MovieClip {
public function hedgeTumble_294(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 52
//helpScreens_302 (BirdRacing_fla.helpScreens_302)
package BirdRacing_fla {
import flash.display.*;
public dynamic class helpScreens_302 extends MovieClip {
public function helpScreens_302(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 53
//INFOPANBG_300 (BirdRacing_fla.INFOPANBG_300)
package BirdRacing_fla {
import flash.display.*;
public dynamic class INFOPANBG_300 extends MovieClip {
public function INFOPANBG_300(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 54
//INFOPANBGPOD_425 (BirdRacing_fla.INFOPANBGPOD_425)
package BirdRacing_fla {
import flash.display.*;
public dynamic class INFOPANBGPOD_425 extends MovieClip {
public function INFOPANBGPOD_425(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 55
//INFOPANBGSelectBird_303 (BirdRacing_fla.INFOPANBGSelectBird_303)
package BirdRacing_fla {
import flash.display.*;
public dynamic class INFOPANBGSelectBird_303 extends MovieClip {
public var birdh1:MovieClip;
public var birdh2:MovieClip;
public var birdh4:MovieClip;
public var birdh3:MovieClip;
public var bird1:MovieClip;
public var bird2:MovieClip;
public var bird3:MovieClip;
public var bird4:MovieClip;
public function INFOPANBGSelectBird_303(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 56
//ingamePanelContent_194 (BirdRacing_fla.ingamePanelContent_194)
package BirdRacing_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.geom.*;
import com.ussgames.game.*;
import com.ussgames.birdRacing.*;
import flash.text.*;
import flash.media.*;
import flash.external.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class ingamePanelContent_194 extends MovieClip {
public var r2:MovieClip;
public var r3:MovieClip;
public var r4:MovieClip;
public var levelName:TextField;
public var on1:MovieClip;
public var on2:MovieClip;
public var on3:MovieClip;
public var on4:MovieClip;
public var t1:TextField;
public var t2:TextField;
public var t3:TextField;
public var t4:TextField;
public var courseRecord:TextField;
public var i:int;
public var n:int;
public var pr1:TextField;
public var pr2:TextField;
public var pr3:TextField;
public var pr4:TextField;
public var nrClip1:MovieClip;
public var nrClip3:MovieClip;
public var raceDetail:MovieClip;
public var n1:MovieClip;
public var n2:MovieClip;
public var n3:MovieClip;
public var n4:MovieClip;
public var nrClip4:MovieClip;
public var nrClip2:MovieClip;
public var dnf1:MovieClip;
public var dnf2:MovieClip;
public var dnf3:MovieClip;
public var dnf4:MovieClip;
public var kr1:MovieClip;
public var kr2:MovieClip;
public var kr3:MovieClip;
public var kr4:MovieClip;
public var or1:MovieClip;
public var or2:MovieClip;
public var or3:MovieClip;
public var or4:MovieClip;
public var okr1:MovieClip;
public var okr3:MovieClip;
public var courseLength:TextField;
public var okr2:MovieClip;
public var ot1:TextField;
public var ot2:TextField;
public var ot3:TextField;
public var ot4:TextField;
public var okr4:MovieClip;
public var r1:MovieClip;
public function ingamePanelContent_194(){
addFrameScript(0, frame1, 1, frame2, 9, frame10, 19, frame20, 29, frame30, 39, frame40, 49, frame50);
}
function frame10(){
stop();
}
function frame2(){
stop();
}
function frame1(){
stop();
}
function frame30(){
stop();
}
function frame20(){
stop();
}
function frame40(){
stop();
levelName.text = CourseConfig.COURSENAMES[(Controller.getLevelNumber() - 1)];
raceDetail.gotoAndStop(BirdRacingMain.raceType);
courseRecord.text = CourseRecordData.COURSERECORDS[(Controller.getLevelNumber() - 1)][(BirdRacingMain.raceType - 1)].toFixed(2);
courseLength.text = (String(CourseConfig.ALLCOURSELENGTHSK[(Controller.getLevelNumber() - 1)][(BirdRacingMain.raceType - 1)]) + " KM");
}
function frame50(){
stop();
n = 1;
i = 3;
while (i >= 0) {
this[("r" + n)].gotoAndStop(TournamentStanding.lastRace[i]);
this[("n" + n)].gotoAndStop(TournamentStanding.lastRace[i]);
if (TournamentStanding.aiPlayer[(TournamentStanding.lastRace[i] - 1)]){
this[("kr" + n)].gotoAndStop(5);
} else {
this[("kr" + n)].gotoAndStop(TournamentStanding.lastRace[i]);
};
this[("t" + n)].text = CourseRecordData.convertMillisToSecs(TournamentStanding.raceTime[i]).toFixed(2);
if (CourseRecordData.convertMillisToSecs(TournamentStanding.raceTime[i]) == 100){
this[("dnf" + n)].visible = true;
} else {
this[("dnf" + n)].visible = false;
};
n++;
i--;
};
n = 1;
i = 0;
while (i < 4) {
this[("or" + (i + 1))].gotoAndStop(TournamentStanding.totalPoints[i].lane);
this[("on" + (i + 1))].gotoAndStop(TournamentStanding.totalPoints[i].lane);
if (TournamentStanding.aiPlayer[(TournamentStanding.totalPoints[i].lane - 1)]){
this[("okr" + n)].gotoAndStop(5);
} else {
this[("okr" + n)].gotoAndStop(TournamentStanding.totalPoints[i].lane);
};
this[("pr" + (i + 1))].text = TournamentStanding.totalPoints[i].points;
this[("ot" + n)].text = CourseRecordData.convertMillisToSecs(TournamentStanding.totalPoints[i].time).toFixed(2);
n++;
i++;
};
if (Controller.main.raceRecord > 0){
this[("nrClip" + Controller.main.raceRecord)].gotoAndStop(2);
};
}
}
}//package BirdRacing_fla
Section 57
//introVoiceClip_297 (BirdRacing_fla.introVoiceClip_297)
package BirdRacing_fla {
import flash.display.*;
import com.ussgames.sound.*;
public dynamic class introVoiceClip_297 extends MovieClip {
public function introVoiceClip_297(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
SoundController.playSound("introvoice");
}
}
}//package BirdRacing_fla
Section 58
//introvoicesnd_285 (BirdRacing_fla.introvoicesnd_285)
package BirdRacing_fla {
import flash.display.*;
public dynamic class introvoicesnd_285 extends MovieClip {
public function introvoicesnd_285(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 59
//kr1_214 (BirdRacing_fla.kr1_214)
package BirdRacing_fla {
import flash.display.*;
public dynamic class kr1_214 extends MovieClip {
public function kr1_214(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 60
//kr1copy_427 (BirdRacing_fla.kr1copy_427)
package BirdRacing_fla {
import flash.display.*;
public dynamic class kr1copy_427 extends MovieClip {
public function kr1copy_427(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 61
//kr1inbird_98 (BirdRacing_fla.kr1inbird_98)
package BirdRacing_fla {
import flash.display.*;
public dynamic class kr1inbird_98 extends MovieClip {
public function kr1inbird_98(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 62
//level_locker_337 (BirdRacing_fla.level_locker_337)
package BirdRacing_fla {
import flash.display.*;
public dynamic class level_locker_337 extends MovieClip {
public function level_locker_337(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 63
//levelSelectButtonBG_328 (BirdRacing_fla.levelSelectButtonBG_328)
package BirdRacing_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.geom.*;
import com.ussgames.birdRacing.*;
import flash.text.*;
import flash.media.*;
import flash.external.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class levelSelectButtonBG_328 extends MovieClip {
public var phTime:TextField;
public var spTime:TextField;
public var stTime:TextField;
public var ovTime:TextField;
public function levelSelectButtonBG_328(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stTime.text = CourseRecordData.COURSERECORDS[0][0].toFixed(2);
spTime.text = CourseRecordData.COURSERECORDS[0][1].toFixed(2);
phTime.text = CourseRecordData.COURSERECORDS[0][2].toFixed(2);
ovTime.text = CourseRecordData.LOCATIONRECORDS[0].toFixed(2);
stop();
}
function frame3(){
stTime.text = CourseRecordData.COURSERECORDS[2][0].toFixed(2);
spTime.text = CourseRecordData.COURSERECORDS[2][1].toFixed(2);
phTime.text = CourseRecordData.COURSERECORDS[2][2].toFixed(2);
ovTime.text = CourseRecordData.LOCATIONRECORDS[2].toFixed(2);
}
function frame4(){
ovTime.text = CourseRecordData.LOCATIONRECORDS[3].toFixed(2);
}
function frame2(){
stTime.text = CourseRecordData.COURSERECORDS[1][0].toFixed(2);
spTime.text = CourseRecordData.COURSERECORDS[1][1].toFixed(2);
phTime.text = CourseRecordData.COURSERECORDS[1][2].toFixed(2);
ovTime.text = CourseRecordData.LOCATIONRECORDS[1].toFixed(2);
}
}
}//package BirdRacing_fla
Section 64
//loadBar_4 (BirdRacing_fla.loadBar_4)
package BirdRacing_fla {
import flash.display.*;
public dynamic class loadBar_4 extends MovieClip {
public var marker:MovieClip;
public function loadBar_4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 65
//MainTimeline (BirdRacing_fla.MainTimeline)
package BirdRacing_fla {
import flash.display.*;
import flash.events.*;
import com.ussgames.particles.*;
import flash.net.*;
import flash.utils.*;
import flash.geom.*;
import com.ussgames.game.*;
import com.ussgames.birdRacing.*;
import com.ussgames.sound.*;
import flash.text.*;
import flash.media.*;
import flash.external.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var particleClip2:MovieClip;
public var soundClip:MovieClip;
public var ai1:MovieClip;
public var ai2:MovieClip;
public var ai3:MovieClip;
public var ai4:MovieClip;
public var inGamePanel:ingamePanel;
public var musicClip:MovieClip;
public var scrollyBar:scrollBar;
public var raceOmeter:MovieClip;
public var challengeData:Object;
public var gameContainer:MovieClip;
public var isChallenged:Boolean;
public var allBirds:MovieClip;
public var raceTime:TextField;
public var challengeBeat:Boolean;
public var bgContainer:MovieClip;
public var recordTime:TextField;
public var gameMain:BirdRacingMain;
public var loadBar:MovieClip;
public var challengeString:String;
public var transition:transitioner;
public var tournamentString:String;
public var podium:MovieClip;
public var chooserCountDown:MovieClip;
public var levelButtons:MovieClip;
public var url_locker:Symbol2;
public var FFlogo:MovieClip;
public var photoContainer:MovieClip;
public var particleClip:MovieClip;
public function MainTimeline(){
addFrameScript(0, frame1, 29, frame30, 38, frame39, 48, frame49, 58, frame59, 68, frame69, 78, frame79);
}
function frame79(){
stop();
SoundController.playMusic("tune1");
podium.gotoAndStop((Controller.main.level.value - 1));
podium.banner.gotoAndStop((Controller.main.level.value - 1));
if (!BirdRacingMain.levelUnlocked){
podium.banner.visible = false;
};
tournamentString = "";
if (TournamentStanding.fullTournament){
tournamentString = "Grand Tour";
} else {
tournamentString = CourseConfig.COURSENAMES[(Controller.main.level.value - 2)];
};
if (TournamentStanding.getNumberOfPlayers() == 1){
challengeData = new Object();
challengeData.friendName = Controller.fbName;
challengeData.friendTime = CourseRecordData.convertMillisToSecs(TournamentStanding.totalPoints[(Controller.main as BirdRacingMain).locationRecord].time);
challengeData.friendTournament = "";
challengeData.challenge = true;
if (TournamentStanding.fullTournament){
challengeData.friendTournament = "Grand Tour";
} else {
challengeData.friendTournament = CourseConfig.COURSENAMES[(Controller.main.level.value - 2)];
};
challengeBeat = Controller.challengeBeat(challengeData.friendTime, challengeData.friendTournament);
isChallenged = true;
if (Controller.challengeData == null){
isChallenged = false;
} else {
if (challengeData.friendTournament != Controller.challengeData.friendTournament){
isChallenged = false;
};
};
challengeString = ("with a time of " + CourseRecordData.convertMillisToSecs(TournamentStanding.totalPoints[(Controller.main as BirdRacingMain).locationRecord].time).toFixed(2));
if (isChallenged){
if (challengeBeat){
challengeString = (challengeString + (", beating " + Controller.challengeData.friendName));
} else {
challengeString = (challengeString + (", but failed to beat " + Controller.challengeData.friendName));
};
};
challengeString = (challengeString + ". Can you beat my time?");
if (TournamentStanding.findBestHumanPoints() == TournamentStanding.totalPoints[0].points){
Controller.ff_submitAchievement((("{0} came first and beat the computer on the " + tournamentString) + " in {1}"), "beat_ai", ("Beat the computer in " + tournamentString), true, challengeString, challengeData);
} else {
Controller.ff_submitAchievement((("{0} completed the " + tournamentString) + " in {1}"), "completed_championship", ("Completed " + tournamentString), true, challengeString, challengeData);
};
};
podium.bird1.gotoAndStop(TournamentStanding.totalPoints[0].lane);
podium.bird2.gotoAndStop(TournamentStanding.totalPoints[1].lane);
podium.bird3.gotoAndStop(TournamentStanding.totalPoints[2].lane);
podium.bird4.gotoAndStop(TournamentStanding.totalPoints[3].lane);
podium.name1.text = BirdClassConfig.BIRDNAMES[(TournamentStanding.totalPoints[0].lane - 1)];
podium.name2.text = BirdClassConfig.BIRDNAMES[(TournamentStanding.totalPoints[1].lane - 1)];
podium.name3.text = BirdClassConfig.BIRDNAMES[(TournamentStanding.totalPoints[2].lane - 1)];
podium.name4.text = BirdClassConfig.BIRDNAMES[(TournamentStanding.totalPoints[3].lane - 1)];
podium.points1.text = TournamentStanding.totalPoints[0].points;
podium.points2.text = TournamentStanding.totalPoints[1].points;
podium.points3.text = TournamentStanding.totalPoints[2].points;
podium.points4.text = TournamentStanding.totalPoints[3].points;
if (TournamentStanding.aiPlayer[(TournamentStanding.totalPoints[0].lane - 1)]){
podium["kr1"].gotoAndStop(5);
} else {
podium["kr1"].gotoAndStop(TournamentStanding.totalPoints[0].lane);
};
if (TournamentStanding.aiPlayer[(TournamentStanding.totalPoints[1].lane - 1)]){
podium["kr2"].gotoAndStop(5);
} else {
podium["kr2"].gotoAndStop(TournamentStanding.totalPoints[1].lane);
};
if (TournamentStanding.aiPlayer[(TournamentStanding.totalPoints[2].lane - 1)]){
podium["kr3"].gotoAndStop(5);
} else {
podium["kr3"].gotoAndStop(TournamentStanding.totalPoints[2].lane);
};
if (TournamentStanding.aiPlayer[(TournamentStanding.totalPoints[3].lane - 1)]){
podium["kr4"].gotoAndStop(5);
} else {
podium["kr4"].gotoAndStop(TournamentStanding.totalPoints[3].lane);
};
podium.totalTime.text = (CourseRecordData.convertMillisToSecs(TournamentStanding.totalPoints[0].time).toFixed(2) + " ");
if ((Controller.main as BirdRacingMain).locationRecord > -1){
podium.totalTime.text = (CourseRecordData.convertMillisToSecs(TournamentStanding.totalPoints[(Controller.main as BirdRacingMain).locationRecord].time).toFixed(2) + " ");
podium.nr.visible = true;
SoundController.playSound("nrsound");
Controller.ff_submitAchievement((((("{0} set a new record on the " + tournamentString) + " of ") + CourseRecordData.convertMillisToSecs(TournamentStanding.totalPoints[(Controller.main as BirdRacingMain).locationRecord].time).toFixed(2)) + " in {1}"), "new_record", ((("Set a new record of " + CourseRecordData.convertMillisToSecs(TournamentStanding.totalPoints[(Controller.main as BirdRacingMain).locationRecord].time).toFixed(2)) + " on ") + tournamentString));
} else {
podium.nr.visible = false;
};
SoundController.playSound("applause");
}
function frame30(){
stop();
stage.scaleMode = "noScale";
stage.quality = "medium";
stage.showDefaultContextMenu = false;
stage.stageFocusRect = false;
gameMain = new BirdRacingMain();
Controller.init(this, gameMain, transition);
Controller.initSound(soundClip, musicClip);
SoundController.playMusic("tune1");
CourseRecordData.loadRecordsFromSO();
if (!ParticleSystem.inited){
ParticleSystem.init(this, 650, 550);
ParticleSystem.addParticleSprite(new StarParticles(), 1, 1, 0, 0);
ParticleSystem.addParticleSprite(new StarParticles(), 1, 1, 1, 0);
ParticleSystem.addParticleSprite(new StarParticles(), 1, 0, 1, 0);
ParticleSystem.addParticleSprite(new StarParticles(), 1, 0, 1, 1);
ParticleSystem.addParticleSprite(new StarParticles(), 1, 0, 0, 1);
ParticleSystem.addParticleSprite(new StarParticles(), 1, 1, 0, 1);
ParticleSystem.addParticleSprite(new DustParticle(), 0.4, 1, 1, 1);
};
}
function frame39(){
stop();
}
public function updateLoader(_arg1:Event){
if (currentLabel != "loader"){
return;
};
if (stage.loaderInfo.bytesLoaded == stage.loaderInfo.bytesTotal){
loadBar.gotoAndStop(100);
removeEventListener(Event.ENTER_FRAME, updateLoader);
Controller.initFunFlow();
} else {
loadBar.gotoAndStop(Math.floor(((stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal) * 100)));
};
}
function frame49(){
stop();
gameMain.startBirdChooser();
}
function frame59(){
stop();
scrollyBar.init(levelButtons, new Rectangle(0, 0, 590, 410));
gameMain.resetGame();
}
function frame69(){
stop();
ParticleSystem.particleLayers = new Array();
ParticleSystem.addParticleLayer(particleClip);
ParticleSystem.addParticleLayer(particleClip2);
Controller.startLevel();
}
function frame1(){
stop();
stage.scaleMode = "noScale";
stage.quality = "medium";
stage.showDefaultContextMenu = false;
Controller.root = this;
MochiBot.track(this, "c76e72d0");
updateLoader(null);
addEventListener(Event.ENTER_FRAME, updateLoader);
}
}
}//package BirdRacing_fla
Section 66
//musicClip_296 (BirdRacing_fla.musicClip_296)
package BirdRacing_fla {
import flash.display.*;
public dynamic class musicClip_296 extends MovieClip {
public function musicClip_296(){
addFrameScript(0, frame1, 9, frame10, 19, frame20, 29, frame30);
}
function frame30(){
stop();
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 67
//newRecordClip_215 (BirdRacing_fla.newRecordClip_215)
package BirdRacing_fla {
import flash.display.*;
import com.ussgames.sound.*;
public dynamic class newRecordClip_215 extends MovieClip {
public function newRecordClip_215(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
SoundController.playSound("nrsound");
}
}
}//package BirdRacing_fla
Section 68
//nrsnd_290 (BirdRacing_fla.nrsnd_290)
package BirdRacing_fla {
import flash.display.*;
public dynamic class nrsnd_290 extends MovieClip {
public function nrsnd_290(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 69
//ohnosound_263 (BirdRacing_fla.ohnosound_263)
package BirdRacing_fla {
import flash.display.*;
public dynamic class ohnosound_263 extends MovieClip {
public function ohnosound_263(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 70
//photoContainer_outer_346 (BirdRacing_fla.photoContainer_outer_346)
package BirdRacing_fla {
import flash.display.*;
public dynamic class photoContainer_outer_346 extends MovieClip {
public var photoContainer:MovieClip;
public function photoContainer_outer_346(){
addFrameScript(0, frame1, 29, frame30);
}
function frame30(){
stop();
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 71
//photosound_264 (BirdRacing_fla.photosound_264)
package BirdRacing_fla {
import flash.display.*;
public dynamic class photosound_264 extends MovieClip {
public function photosound_264(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 72
//podgeSplashFade_243 (BirdRacing_fla.podgeSplashFade_243)
package BirdRacing_fla {
import flash.display.*;
public dynamic class podgeSplashFade_243 extends MovieClip {
public function podgeSplashFade_243(){
addFrameScript(199, frame200);
}
function frame200(){
stop();
(parent as MovieClip).gotoAndStop("menu");
}
}
}//package BirdRacing_fla
Section 73
//podium_uyuyiuy_354 (BirdRacing_fla.podium_uyuyiuy_354)
package BirdRacing_fla {
import flash.display.*;
import flash.text.*;
public dynamic class podium_uyuyiuy_354 extends MovieClip {
public var nr:MovieClip;
public var name1:TextField;
public var name2:TextField;
public var name3:TextField;
public var name4:TextField;
public var bird2:MovieClip;
public var bird3:MovieClip;
public var bird4:MovieClip;
public var confettiHolder:ConfettiHolderClip;
public var confettiHolder2:ConfettiHolder2;
public var bird1:MovieClip;
public var kr1:MovieClip;
public var kr2:MovieClip;
public var kr3:MovieClip;
public var kr4:MovieClip;
public var points1:TextField;
public var points2:TextField;
public var points3:TextField;
public var points4:TextField;
public var banner:MovieClip;
public var totalTime:TextField;
public function podium_uyuyiuy_354(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
confettiHolder.init();
confettiHolder2.init();
}
function frame3(){
stop();
confettiHolder.init();
confettiHolder2.init();
}
function frame2(){
stop();
confettiHolder.init();
confettiHolder2.init();
}
}
}//package BirdRacing_fla
Section 74
//poofallsnd_281 (BirdRacing_fla.poofallsnd_281)
package BirdRacing_fla {
import flash.display.*;
public dynamic class poofallsnd_281 extends MovieClip {
public function poofallsnd_281(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 75
//pooleadsnd_282 (BirdRacing_fla.pooleadsnd_282)
package BirdRacing_fla {
import flash.display.*;
public dynamic class pooleadsnd_282 extends MovieClip {
public function pooleadsnd_282(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 76
//poooutsnd_284 (BirdRacing_fla.poooutsnd_284)
package BirdRacing_fla {
import flash.display.*;
public dynamic class poooutsnd_284 extends MovieClip {
public function poooutsnd_284(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 77
//poostumbsnd_280 (BirdRacing_fla.poostumbsnd_280)
package BirdRacing_fla {
import flash.display.*;
public dynamic class poostumbsnd_280 extends MovieClip {
public function poostumbsnd_280(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 78
//poowinsnd_283 (BirdRacing_fla.poowinsnd_283)
package BirdRacing_fla {
import flash.display.*;
public dynamic class poowinsnd_283 extends MovieClip {
public function poowinsnd_283(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 79
//raceDetail_206 (BirdRacing_fla.raceDetail_206)
package BirdRacing_fla {
import flash.display.*;
import flash.text.*;
public dynamic class raceDetail_206 extends MovieClip {
public var levelNumber:TextField;
public function raceDetail_206(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 80
//raceTypeCountDown_47 (BirdRacing_fla.raceTypeCountDown_47)
package BirdRacing_fla {
import flash.display.*;
public dynamic class raceTypeCountDown_47 extends MovieClip {
public function raceTypeCountDown_47(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 81
//selectblipsnd_289 (BirdRacing_fla.selectblipsnd_289)
package BirdRacing_fla {
import flash.display.*;
public dynamic class selectblipsnd_289 extends MovieClip {
public function selectblipsnd_289(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 82
//soundsClip_257 (BirdRacing_fla.soundsClip_257)
package BirdRacing_fla {
import flash.display.*;
public dynamic class soundsClip_257 extends MovieClip {
public var dollyout:MovieClip;
public var poostumbles:MovieClip;
public var poofalls:MovieClip;
public var camerasound:MovieClip;
public var brainwins:MovieClip;
public var dollyinlead:MovieClip;
public var fallland:MovieClip;
public var bathwins:MovieClip;
public var startgun:MovieClip;
public var brainout:MovieClip;
public var bathstumbles:MovieClip;
public var three:MovieClip;
public var brainstumbles:MovieClip;
public var brainfalls:MovieClip;
public var dollywins:MovieClip;
public var hedgetumble:MovieClip;
public var dollystumbles:MovieClip;
public var theyareoff:MovieClip;
public var photofinish:MovieClip;
public var introvoice:MovieClip;
public var pooinlead:MovieClip;
public var nrsound:MovieClip;
public var step:MovieClip;
public var bathfalls:MovieClip;
public var bathinlead:MovieClip;
public var clip:MovieClip;
public var ohno:MovieClip;
public var two:MovieClip;
public var dollyfalls:MovieClip;
public var one:MovieClip;
public var poowins:MovieClip;
public var raceunderway:MovieClip;
public var selectblip:MovieClip;
public var splash:MovieClip;
public var applause:MovieClip;
public var braininlead:MovieClip;
public var bathout:MovieClip;
public var pooout:MovieClip;
public function soundsClip_257(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 83
//splashsnd_293 (BirdRacing_fla.splashsnd_293)
package BirdRacing_fla {
import flash.display.*;
public dynamic class splashsnd_293 extends MovieClip {
public function splashsnd_293(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 84
//startgunsnd_292 (BirdRacing_fla.startgunsnd_292)
package BirdRacing_fla {
import flash.display.*;
public dynamic class startgunsnd_292 extends MovieClip {
public function startgunsnd_292(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 85
//stepsnd_288 (BirdRacing_fla.stepsnd_288)
package BirdRacing_fla {
import flash.display.*;
public dynamic class stepsnd_288 extends MovieClip {
public function stepsnd_288(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 86
//theyoffsound_261 (BirdRacing_fla.theyoffsound_261)
package BirdRacing_fla {
import flash.display.*;
public dynamic class theyoffsound_261 extends MovieClip {
public function theyoffsound_261(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 87
//theyoffsoundcopy_262 (BirdRacing_fla.theyoffsoundcopy_262)
package BirdRacing_fla {
import flash.display.*;
public dynamic class theyoffsoundcopy_262 extends MovieClip {
public function theyoffsoundcopy_262(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 88
//trackStrip_76 (BirdRacing_fla.trackStrip_76)
package BirdRacing_fla {
import flash.display.*;
public dynamic class trackStrip_76 extends MovieClip {
public function trackStrip_76(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 89
//tumble1_108 (BirdRacing_fla.tumble1_108)
package BirdRacing_fla {
import flash.display.*;
import com.ussgames.general.*;
import com.ussgames.birdRacing.*;
import com.ussgames.sound.*;
public dynamic class tumble1_108 extends MovieClip {
public function tumble1_108(){
addFrameScript(17, frame18, 21, frame22, 24, frame25);
}
function frame25(){
(parent as BigBird).backUp();
stop();
}
function frame18(){
(parent as BigBird).addDust();
ScreenShaker.shakeScreen(3, 3);
SoundController.playSound("clip");
}
function frame22(){
(parent as BigBird).addDust();
ScreenShaker.shakeScreen(3, 3);
SoundController.playSound("clip");
}
}
}//package BirdRacing_fla
Section 90
//tumbleAnim3_121 (BirdRacing_fla.tumbleAnim3_121)
package BirdRacing_fla {
import flash.display.*;
import com.ussgames.general.*;
import com.ussgames.birdRacing.*;
import com.ussgames.sound.*;
public dynamic class tumbleAnim3_121 extends MovieClip {
public function tumbleAnim3_121(){
addFrameScript(17, frame18, 21, frame22, 24, frame25);
}
function frame25(){
(parent as BigBird).backUp();
stop();
}
function frame18(){
(parent as BigBird).addDust();
ScreenShaker.shakeScreen(3, 3);
SoundController.playSound("clip");
}
function frame22(){
(parent as BigBird).addDust();
ScreenShaker.shakeScreen(3, 3);
SoundController.playSound("clip");
}
}
}//package BirdRacing_fla
Section 91
//water1_70 (BirdRacing_fla.water1_70)
package BirdRacing_fla {
import flash.display.*;
public dynamic class water1_70 extends MovieClip {
public function water1_70(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
gotoAndStop((Math.floor((Math.random() * 4)) + 1));
}
}
}//package BirdRacing_fla
Section 92
//waterMask_86 (BirdRacing_fla.waterMask_86)
package BirdRacing_fla {
import flash.display.*;
public dynamic class waterMask_86 extends MovieClip {
public function waterMask_86(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BirdRacing_fla
Section 93
//JSON (com.adobe.serialization.json.JSON)
package com.adobe.serialization.json {
public class JSON {
public static function decode(_arg1:String){
var _local2:JSONDecoder = new JSONDecoder(_arg1);
return (_local2.getValue());
}
public static function encode(_arg1:Object):String{
var _local2:JSONEncoder = new JSONEncoder(_arg1);
return (_local2.getString());
}
}
}//package com.adobe.serialization.json
Section 94
//JSONDecoder (com.adobe.serialization.json.JSONDecoder)
package com.adobe.serialization.json {
public class JSONDecoder {
private var value;
private var tokenizer:JSONTokenizer;
private var token:JSONToken;
public function JSONDecoder(_arg1:String){
tokenizer = new JSONTokenizer(_arg1);
nextToken();
value = parseValue();
}
private function parseObject():Object{
var _local2:String;
var _local1:Object = new Object();
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACE){
return (_local1);
};
while (true) {
if (token.type == JSONTokenType.STRING){
_local2 = String(token.value);
nextToken();
if (token.type == JSONTokenType.COLON){
nextToken();
_local1[_local2] = parseValue();
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACE){
return (_local1);
};
if (token.type == JSONTokenType.COMMA){
nextToken();
} else {
tokenizer.parseError(("Expecting } or , but found " + token.value));
};
} else {
tokenizer.parseError(("Expecting : but found " + token.value));
};
} else {
tokenizer.parseError(("Expecting string but found " + token.value));
};
};
return (null);
}
private function parseValue():Object{
if (token == null){
tokenizer.parseError("Unexpected end of input");
};
switch (token.type){
case JSONTokenType.LEFT_BRACE:
return (parseObject());
case JSONTokenType.LEFT_BRACKET:
return (parseArray());
case JSONTokenType.STRING:
case JSONTokenType.NUMBER:
case JSONTokenType.TRUE:
case JSONTokenType.FALSE:
case JSONTokenType.NULL:
return (token.value);
default:
tokenizer.parseError(("Unexpected " + token.value));
};
return (null);
}
private function nextToken():JSONToken{
return ((token = tokenizer.getNextToken()));
}
public function getValue(){
return (value);
}
private function parseArray():Array{
var _local1:Array = new Array();
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACKET){
return (_local1);
};
while (true) {
_local1.push(parseValue());
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACKET){
return (_local1);
};
if (token.type == JSONTokenType.COMMA){
nextToken();
} else {
tokenizer.parseError(("Expecting ] or , but found " + token.value));
};
};
return (null);
}
}
}//package com.adobe.serialization.json
Section 95
//JSONEncoder (com.adobe.serialization.json.JSONEncoder)
package com.adobe.serialization.json {
import flash.utils.*;
public class JSONEncoder {
private var jsonString:String;
public function JSONEncoder(_arg1){
jsonString = convertToString(_arg1);
}
private function escapeString(_arg1:String):String{
var _local3:String;
var _local6:String;
var _local7:String;
var _local2 = "";
var _local4:Number = _arg1.length;
var _local5:int;
while (_local5 < _local4) {
_local3 = _arg1.charAt(_local5);
switch (_local3){
case "\"":
_local2 = (_local2 + "\\\"");
break;
case "\\":
_local2 = (_local2 + "\\\\");
break;
case "\b":
_local2 = (_local2 + "\\b");
break;
case "\f":
_local2 = (_local2 + "\\f");
break;
case "\n":
_local2 = (_local2 + "\\n");
break;
case "\r":
_local2 = (_local2 + "\\r");
break;
case "\t":
_local2 = (_local2 + "\\t");
break;
default:
if (_local3 < " "){
_local6 = _local3.charCodeAt(0).toString(16);
_local7 = ((_local6.length == 2)) ? "00" : "000";
_local2 = (_local2 + (("\\u" + _local7) + _local6));
} else {
_local2 = (_local2 + _local3);
};
};
_local5++;
};
return ((("\"" + _local2) + "\""));
}
private function arrayToString(_arg1:Array):String{
var _local2 = "";
var _local3:int;
while (_local3 < _arg1.length) {
if (_local2.length > 0){
_local2 = (_local2 + ",");
};
_local2 = (_local2 + convertToString(_arg1[_local3]));
_local3++;
};
return ((("[" + _local2) + "]"));
}
public function getString():String{
return (jsonString);
}
private function objectToString(_arg1:Object):String{
var value:Object;
var key:String;
var v:XML;
var o = _arg1;
var s = "";
var classInfo:XML = describeType(o);
if (classInfo.@name.toString() == "Object"){
for (key in o) {
value = o[key];
if ((value is Function)){
} else {
if (s.length > 0){
s = (s + ",");
};
s = (s + ((escapeString(key) + ":") + convertToString(value)));
};
};
} else {
for each (v in classInfo..*.(((name() == "variable")) || ((name() == "accessor")))) {
if (s.length > 0){
s = (s + ",");
};
s = (s + ((escapeString(v.@name.toString()) + ":") + convertToString(o[v.@name])));
};
};
return ((("{" + s) + "}"));
}
private function convertToString(_arg1):String{
if ((_arg1 is String)){
return (escapeString((_arg1 as String)));
};
if ((_arg1 is Number)){
return ((isFinite((_arg1 as Number))) ? _arg1.toString() : "null");
} else {
if ((_arg1 is Boolean)){
return ((_arg1) ? "true" : "false");
} else {
if ((_arg1 is Array)){
return (arrayToString((_arg1 as Array)));
};
if ((((_arg1 is Object)) && (!((_arg1 == null))))){
return (objectToString(_arg1));
};
};
};
return ("null");
}
}
}//package com.adobe.serialization.json
Section 96
//JSONParseError (com.adobe.serialization.json.JSONParseError)
package com.adobe.serialization.json {
public class JSONParseError extends Error {
private var _location:int;
private var _text:String;
public function JSONParseError(_arg1:String="", _arg2:int=0, _arg3:String=""){
super(_arg1);
name = "JSONParseError";
_location = _arg2;
_text = _arg3;
}
public function get location():int{
return (_location);
}
public function get text():String{
return (_text);
}
}
}//package com.adobe.serialization.json
Section 97
//JSONToken (com.adobe.serialization.json.JSONToken)
package com.adobe.serialization.json {
public class JSONToken {
private var _value:Object;
private var _type:int;
public function JSONToken(_arg1:int=-1, _arg2:Object=null){
_type = _arg1;
_value = _arg2;
}
public function get value():Object{
return (_value);
}
public function get type():int{
return (_type);
}
public function set type(_arg1:int):void{
_type = _arg1;
}
public function set value(_arg1:Object):void{
_value = _arg1;
}
}
}//package com.adobe.serialization.json
Section 98
//JSONTokenizer (com.adobe.serialization.json.JSONTokenizer)
package com.adobe.serialization.json {
public class JSONTokenizer {
private var loc:int;
private var ch:String;
private var obj:Object;
private var jsonString:String;
public function JSONTokenizer(_arg1:String){
jsonString = _arg1;
loc = 0;
nextChar();
}
private function skipComments():void{
if (ch == "/"){
nextChar();
switch (ch){
case "/":
do {
nextChar();
} while (((!((ch == "\n"))) && (!((ch == "")))));
nextChar();
break;
case "*":
nextChar();
while (true) {
if (ch == "*"){
nextChar();
if (ch == "/"){
nextChar();
break;
};
} else {
nextChar();
};
if (ch == ""){
parseError("Multi-line comment not closed");
};
};
break;
default:
parseError((("Unexpected " + ch) + " encountered (expecting '/' or '*' )"));
};
};
}
private function isDigit(_arg1:String):Boolean{
return ((((_arg1 >= "0")) && ((_arg1 <= "9"))));
}
private function readString():JSONToken{
var _local3:String;
var _local4:int;
var _local1:JSONToken = new JSONToken();
_local1.type = JSONTokenType.STRING;
var _local2 = "";
nextChar();
while (((!((ch == "\""))) && (!((ch == ""))))) {
if (ch == "\\"){
nextChar();
switch (ch){
case "\"":
_local2 = (_local2 + "\"");
break;
case "/":
_local2 = (_local2 + "/");
break;
case "\\":
_local2 = (_local2 + "\\");
break;
case "b":
_local2 = (_local2 + "\b");
break;
case "f":
_local2 = (_local2 + "\f");
break;
case "n":
_local2 = (_local2 + "\n");
break;
case "r":
_local2 = (_local2 + "\r");
break;
case "t":
_local2 = (_local2 + "\t");
break;
case "u":
_local3 = "";
_local4 = 0;
while (_local4 < 4) {
if (!isHexDigit(nextChar())){
parseError((" Excepted a hex digit, but found: " + ch));
};
_local3 = (_local3 + ch);
_local4++;
};
_local2 = (_local2 + String.fromCharCode(parseInt(_local3, 16)));
break;
default:
_local2 = (_local2 + ("\\" + ch));
};
} else {
_local2 = (_local2 + ch);
};
nextChar();
};
if (ch == ""){
parseError("Unterminated string literal");
};
nextChar();
_local1.value = _local2;
return (_local1);
}
private function nextChar():String{
return ((ch = jsonString.charAt(loc++)));
}
public function getNextToken():JSONToken{
var _local2:String;
var _local3:String;
var _local4:String;
var _local1:JSONToken = new JSONToken();
skipIgnored();
switch (ch){
case "{":
_local1.type = JSONTokenType.LEFT_BRACE;
_local1.value = "{";
nextChar();
break;
case "}":
_local1.type = JSONTokenType.RIGHT_BRACE;
_local1.value = "}";
nextChar();
break;
case "[":
_local1.type = JSONTokenType.LEFT_BRACKET;
_local1.value = "[";
nextChar();
break;
case "]":
_local1.type = JSONTokenType.RIGHT_BRACKET;
_local1.value = "]";
nextChar();
break;
case ",":
_local1.type = JSONTokenType.COMMA;
_local1.value = ",";
nextChar();
break;
case ":":
_local1.type = JSONTokenType.COLON;
_local1.value = ":";
nextChar();
break;
case "t":
_local2 = ((("t" + nextChar()) + nextChar()) + nextChar());
if (_local2 == "true"){
_local1.type = JSONTokenType.TRUE;
_local1.value = true;
nextChar();
} else {
parseError(("Expecting 'true' but found " + _local2));
};
break;
case "f":
_local3 = (((("f" + nextChar()) + nextChar()) + nextChar()) + nextChar());
if (_local3 == "false"){
_local1.type = JSONTokenType.FALSE;
_local1.value = false;
nextChar();
} else {
parseError(("Expecting 'false' but found " + _local3));
};
break;
case "n":
_local4 = ((("n" + nextChar()) + nextChar()) + nextChar());
if (_local4 == "null"){
_local1.type = JSONTokenType.NULL;
_local1.value = null;
nextChar();
} else {
parseError(("Expecting 'null' but found " + _local4));
};
break;
case "\"":
_local1 = readString();
break;
default:
if (((isDigit(ch)) || ((ch == "-")))){
_local1 = readNumber();
} else {
if (ch == ""){
return (null);
};
parseError((("Unexpected " + ch) + " encountered"));
};
};
return (_local1);
}
private function skipWhite():void{
while (isWhiteSpace(ch)) {
nextChar();
};
}
public function parseError(_arg1:String):void{
throw (new JSONParseError(_arg1, loc, jsonString));
}
private function isWhiteSpace(_arg1:String):Boolean{
return ((((((((_arg1 == " ")) || ((_arg1 == "\t")))) || ((_arg1 == "\n")))) || ((_arg1 == "\r"))));
}
private function skipIgnored():void{
var _local1:int;
do {
_local1 = loc;
skipWhite();
skipComments();
} while (_local1 != loc);
}
private function isHexDigit(_arg1:String):Boolean{
var _local2:String = _arg1.toUpperCase();
return (((isDigit(_arg1)) || ((((_local2 >= "A")) && ((_local2 <= "F"))))));
}
private function readNumber():JSONToken{
var _local1:JSONToken = new JSONToken();
_local1.type = JSONTokenType.NUMBER;
var _local2 = "";
if (ch == "-"){
_local2 = (_local2 + "-");
nextChar();
};
if (!isDigit(ch)){
parseError("Expecting a digit");
};
if (ch == "0"){
_local2 = (_local2 + ch);
nextChar();
if (isDigit(ch)){
parseError("A digit cannot immediately follow 0");
};
} else {
while (isDigit(ch)) {
_local2 = (_local2 + ch);
nextChar();
};
};
if (ch == "."){
_local2 = (_local2 + ".");
nextChar();
if (!isDigit(ch)){
parseError("Expecting a digit");
};
while (isDigit(ch)) {
_local2 = (_local2 + ch);
nextChar();
};
};
if ((((ch == "e")) || ((ch == "E")))){
_local2 = (_local2 + "e");
nextChar();
if ((((ch == "+")) || ((ch == "-")))){
_local2 = (_local2 + ch);
nextChar();
};
if (!isDigit(ch)){
parseError("Scientific notation number needs exponent value");
};
while (isDigit(ch)) {
_local2 = (_local2 + ch);
nextChar();
};
};
var _local3:Number = Number(_local2);
if (((isFinite(_local3)) && (!(isNaN(_local3))))){
_local1.value = _local3;
return (_local1);
};
parseError((("Number " + _local3) + " is not valid!"));
return (null);
}
}
}//package com.adobe.serialization.json
Section 99
//JSONTokenType (com.adobe.serialization.json.JSONTokenType)
package com.adobe.serialization.json {
public class JSONTokenType {
public static const NUMBER:int = 11;
public static const FALSE:int = 8;
public static const RIGHT_BRACKET:int = 4;
public static const NULL:int = 9;
public static const TRUE:int = 7;
public static const RIGHT_BRACE:int = 2;
public static const UNKNOWN:int = -1;
public static const COMMA:int = 0;
public static const LEFT_BRACKET:int = 3;
public static const STRING:int = 10;
public static const LEFT_BRACE:int = 1;
public static const COLON:int = 6;
}
}//package com.adobe.serialization.json
Section 100
//Base64 (com.midasplayer.extras.Base64)
package com.midasplayer.extras {
import flash.utils.*;
public class Base64 {
public static const version:String = "1.1.0";
private static const BASE64_CHARS:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
public function Base64(){
throw (new Error("Base64 class is static container only"));
}
public static function encode(_arg1:String):String{
var _local2:ByteArray = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (encodeByteArray(_local2));
}
public static function encodeByteArray(_arg1:ByteArray):String{
var _local3:Array;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local2 = "";
var _local4:Array = new Array(4);
_arg1.position = 0;
while (_arg1.bytesAvailable > 0) {
_local3 = new Array();
_local5 = 0;
while ((((_local5 < 3)) && ((_arg1.bytesAvailable > 0)))) {
_local3[_local5] = _arg1.readUnsignedByte();
_local5++;
};
_local4[0] = ((_local3[0] & 252) >> 2);
_local4[1] = (((_local3[0] & 3) << 4) | (_local3[1] >> 4));
_local4[2] = (((_local3[1] & 15) << 2) | (_local3[2] >> 6));
_local4[3] = (_local3[2] & 63);
_local6 = _local3.length;
while (_local6 < 3) {
_local4[(_local6 + 1)] = 64;
_local6++;
};
_local7 = 0;
while (_local7 < _local4.length) {
_local2 = (_local2 + BASE64_CHARS.charAt(_local4[_local7]));
_local7++;
};
};
return (_local2);
}
public static function decode(_arg1:String):String{
var _local2:ByteArray = decodeToByteArray(_arg1);
return (_local2.readUTFBytes(_local2.length));
}
public static function decodeToByteArray(_arg1:String):ByteArray{
var _local6:uint;
var _local7:uint;
var _local2:ByteArray = new ByteArray();
var _local3:Array = new Array(4);
var _local4:Array = new Array(3);
var _local5:uint;
while (_local5 < _arg1.length) {
_local6 = 0;
while ((((_local6 < 4)) && (((_local5 + _local6) < _arg1.length)))) {
_local3[_local6] = BASE64_CHARS.indexOf(_arg1.charAt((_local5 + _local6)));
_local6++;
};
_local4[0] = ((_local3[0] << 2) + ((_local3[1] & 48) >> 4));
_local4[1] = (((_local3[1] & 15) << 4) + ((_local3[2] & 60) >> 2));
_local4[2] = (((_local3[2] & 3) << 6) + _local3[3]);
_local7 = 0;
while (_local7 < _local4.length) {
if (_local3[(_local7 + 1)] == 64){
break;
};
_local2.writeByte(_local4[_local7]);
_local7++;
};
_local5 = (_local5 + 4);
};
_local2.position = 0;
return (_local2);
}
}
}//package com.midasplayer.extras
Section 101
//FunflowSerializer (com.midasplayer.extras.FunflowSerializer)
package com.midasplayer.extras {
import flash.net.*;
import flash.utils.*;
public class FunflowSerializer {
public static function amfEncode(_arg1:Object):String{
var _local2:ByteArray = new ByteArray();
_local2.writeObject(_arg1);
return (Base64.encodeByteArray(_local2));
}
public static function objectToFlashURLVariables(_arg1:Object):URLVariables{
var _local3:String;
var _local2:URLVariables = new URLVariables();
if (_arg1 != null){
for (_local3 in _arg1) {
if (_local3 != null){
if ((_arg1[_local3] is Array)){
_local2[("fv_" + _local3)] = _arg1[_local3];
} else {
_local2[("fv_" + _local3)] = _arg1[_local3].toString();
};
};
};
};
return (_local2);
}
public static function amfDecode(_arg1:String):Object{
var _local2:ByteArray = Base64.decodeToByteArray(_arg1);
return (_local2.readObject());
}
}
}//package com.midasplayer.extras
Section 102
//md5 (com.midasplayer.extras.md5)
package com.midasplayer.extras {
public class md5 {
public static const HEX_FORMAT_LOWERCASE:uint = 0;
public static const HEX_FORMAT_UPPERCASE:uint = 1;
public static const BASE64_PAD_CHARACTER_DEFAULT_COMPLIANCE:String = "";
public static const BASE64_PAD_CHARACTER_RFC_COMPLIANCE:String = "=";
public static var hexcase:uint = 0;
public static var b64pad:String = "";
public static function md5_gg(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn(((_arg2 & _arg4) | (_arg3 & ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function md5_cmn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Number{
return (safe_add(bit_rol(safe_add(safe_add(_arg2, _arg1), safe_add(_arg4, _arg6)), _arg5), _arg3));
}
public static function binl_md5(_arg1:Array, _arg2:Number):Array{
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
_arg1[(_arg2 >> 5)] = (_arg1[(_arg2 >> 5)] | (128 << (_arg2 % 32)));
_arg1[((((_arg2 + 64) >>> 9) << 4) + 14)] = _arg2;
var _local3:Number = 1732584193;
var _local4:Number = -271733879;
var _local5:Number = -1732584194;
var _local6:Number = 271733878;
var _local7:Number = 0;
while (_local7 < _arg1.length) {
_local8 = _local3;
_local9 = _local4;
_local10 = _local5;
_local11 = _local6;
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 7, -680876936);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 1)], 12, -389564586);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 17, 606105819);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 3)], 22, -1044525330);
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 7, -176418897);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 5)], 12, 1200080426);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 17, -1473231341);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 7)], 22, -45705983);
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 7, 1770035416);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 9)], 12, -1958414417);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 17, -42063);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 11)], 22, -1990404162);
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 7, 1804603682);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 13)], 12, -40341101);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 17, -1502002290);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 15)], 22, 1236535329);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 5, -165796510);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 6)], 9, -1069501632);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 14, 643717713);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 0)], 20, -373897302);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 5, -701558691);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 10)], 9, 38016083);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 14, -660478335);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 4)], 20, -405537848);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 5, 568446438);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 14)], 9, -1019803690);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 14, -187363961);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 8)], 20, 1163531501);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 5, -1444681467);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 2)], 9, -51403784);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 14, 1735328473);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 12)], 20, -1926607734);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 4, -378558);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 8)], 11, -2022574463);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 16, 1839030562);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 14)], 23, -35309556);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 4, -1530992060);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 4)], 11, 1272893353);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 16, -155497632);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 10)], 23, -1094730640);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 4, 681279174);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 0)], 11, -358537222);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 16, -722521979);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 6)], 23, 76029189);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 4, -640364487);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 12)], 11, -421815835);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 16, 530742520);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 2)], 23, -995338651);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 6, -198630844);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 7)], 10, 1126891415);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 15, -1416354905);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 5)], 21, -57434055);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 6, 1700485571);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 3)], 10, -1894986606);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 15, -1051523);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 1)], 21, -2054922799);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 6, 1873313359);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 15)], 10, -30611744);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 15, -1560198380);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 13)], 21, 1309151649);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 6, -145523070);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 11)], 10, -1120210379);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 15, 718787259);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 9)], 21, -343485551);
_local3 = safe_add(_local3, _local8);
_local4 = safe_add(_local4, _local9);
_local5 = safe_add(_local5, _local10);
_local6 = safe_add(_local6, _local11);
_local7 = (_local7 + 16);
};
return ([_local3, _local4, _local5, _local6]);
}
public static function str2rstr_utf16le(_arg1:String):String{
var _local2 = "";
var _local3:Number = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode((_arg1.charCodeAt(_local3) & 0xFF), ((_arg1.charCodeAt(_local3) >>> 8) & 0xFF)));
_local3++;
};
return (_local2);
}
public static function hex_hmac_md5(_arg1:String, _arg2:String):String{
return (rstr2hex(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2))));
}
public static function binl2rstr(_arg1:Array):String{
var _local2 = "";
var _local3:Number = 0;
while (_local3 < (_arg1.length * 32)) {
_local2 = (_local2 + String.fromCharCode(((_arg1[(_local3 >> 5)] >>> (_local3 % 32)) & 0xFF)));
_local3 = (_local3 + 8);
};
return (_local2);
}
public static function md5_ff(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn(((_arg2 & _arg3) | (~(_arg2) & _arg4)), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function md5_ii(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn((_arg3 ^ (_arg2 | ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function rstr2binl(_arg1:String):Array{
var _local2:Number = 0;
var _local3:Array = new Array((_arg1.length >> 2));
_local2 = 0;
while (_local2 < _local3.length) {
_local3[_local2] = 0;
_local2++;
};
_local2 = 0;
while (_local2 < (_arg1.length * 8)) {
_local3[(_local2 >> 5)] = (_local3[(_local2 >> 5)] | ((_arg1.charCodeAt((_local2 / 8)) & 0xFF) << (_local2 % 32)));
_local2 = (_local2 + 8);
};
return (_local3);
}
public static function md5_vm_test():Boolean{
return ((hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"));
}
public static function b64_md5(_arg1:String):String{
return (rstr2b64(rstr_md5(str2rstr_utf8(_arg1))));
}
public static function any_hmac_md5(_arg1:String, _arg2:String, _arg3:String):String{
return (rstr2any(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2)), _arg3));
}
public static function hex_md5(_arg1:String):String{
return (rstr2hex(rstr_md5(str2rstr_utf8(_arg1))));
}
public static function bit_rol(_arg1:Number, _arg2:Number):Number{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
public static function encrypt(_arg1:String):String{
return (hex_md5(_arg1));
}
public static function md5_hh(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn(((_arg2 ^ _arg3) ^ _arg4), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function rstr2hex(_arg1:String):String{
var _local4:Number;
var _local2:String = (hexcase) ? "0123456789ABCDEF" : "0123456789abcdef";
var _local3 = "";
var _local5:Number = 0;
while (_local5 < _arg1.length) {
_local4 = _arg1.charCodeAt(_local5);
_local3 = (_local3 + (_local2.charAt(((_local4 >>> 4) & 15)) + _local2.charAt((_local4 & 15))));
_local5++;
};
return (_local3);
}
public static function any_md5(_arg1:String, _arg2:String):String{
return (rstr2any(rstr_md5(str2rstr_utf8(_arg1)), _arg2));
}
public static function b64_hmac_md5(_arg1:String, _arg2:String):String{
return (rstr2b64(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2))));
}
public static function rstr2b64(_arg1:String):String{
var _local6:Number;
var _local7:Number;
var _local2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _local3 = "";
var _local4:Number = _arg1.length;
var _local5:Number = 0;
while (_local5 < _local4) {
_local6 = (((_arg1.charCodeAt(_local5) << 16) | (((_local5 + 1) < _local4)) ? (_arg1.charCodeAt((_local5 + 1)) << 8) : 0) | (((_local5 + 2) < _local4)) ? _arg1.charCodeAt((_local5 + 2)) : 0);
_local7 = 0;
while (_local7 < 4) {
if (((_local5 * 8) + (_local7 * 6)) > (_arg1.length * 8)){
_local3 = (_local3 + b64pad);
} else {
_local3 = (_local3 + _local2.charAt(((_local6 >>> (6 * (3 - _local7))) & 63)));
};
_local7++;
};
_local5 = (_local5 + 3);
};
return (_local3);
}
public static function safe_add(_arg1:Number, _arg2:Number):Number{
var _local3:Number = ((_arg1 & 0xFFFF) + (_arg2 & 0xFFFF));
var _local4:Number = (((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16));
return (((_local4 << 16) | (_local3 & 0xFFFF)));
}
public static function str2rstr_utf8(_arg1:String):String{
var _local4:Number;
var _local5:Number;
var _local2 = "";
var _local3:Number = -1;
while (++_local3 < _arg1.length) {
_local4 = _arg1.charCodeAt(_local3);
_local5 = (((_local3 + 1) < _arg1.length)) ? _arg1.charCodeAt((_local3 + 1)) : 0;
if ((((((((0xD800 <= _local4)) && ((_local4 <= 56319)))) && ((0xDC00 <= _local5)))) && ((_local5 <= 57343)))){
_local4 = ((65536 + ((_local4 & 1023) << 10)) + (_local5 & 1023));
_local3++;
};
if (_local4 <= 127){
_local2 = (_local2 + String.fromCharCode(_local4));
} else {
if (_local4 <= 2047){
_local2 = (_local2 + String.fromCharCode((192 | ((_local4 >>> 6) & 31)), (128 | (_local4 & 63))));
} else {
if (_local4 <= 0xFFFF){
_local2 = (_local2 + String.fromCharCode((224 | ((_local4 >>> 12) & 15)), (128 | ((_local4 >>> 6) & 63)), (128 | (_local4 & 63))));
} else {
if (_local4 <= 2097151){
_local2 = (_local2 + String.fromCharCode((240 | ((_local4 >>> 18) & 7)), (128 | ((_local4 >>> 12) & 63)), (128 | ((_local4 >>> 6) & 63)), (128 | (_local4 & 63))));
};
};
};
};
};
return (_local2);
}
public static function rstr_hmac_md5(_arg1:String, _arg2:String):String{
var _local3:Array = rstr2binl(_arg1);
if (_local3.length > 16){
_local3 = binl_md5(_local3, (_arg1.length * 8));
};
var _local4:Array = new Array(16);
var _local5:Array = new Array(16);
var _local6:Number = 0;
while (_local6 < 16) {
_local4[_local6] = (_local3[_local6] ^ 909522486);
_local5[_local6] = (_local3[_local6] ^ 1549556828);
_local6++;
};
var _local7:Array = binl_md5(_local4.concat(rstr2binl(_arg2)), (0x0200 + (_arg2.length * 8)));
return (binl2rstr(binl_md5(_local5.concat(_local7), (0x0200 + 128))));
}
public static function str2rstr_utf16be(_arg1:String):String{
var _local2 = "";
var _local3:Number = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode(((_arg1.charCodeAt(_local3) >>> 8) & 0xFF), (_arg1.charCodeAt(_local3) & 0xFF)));
_local3++;
};
return (_local2);
}
public static function rstr2any(_arg1:String, _arg2:String):String{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Array;
var _local3:Number = _arg2.length;
var _local4:Array = [];
var _local9:Array = ((_arg1.length / 2) as Array);
_local5 = 0;
while (_local5 < _local9.length) {
_local9[_local5] = ((_arg1.charCodeAt((_local5 * 2)) << 8) | _arg1.charCodeAt(((_local5 * 2) + 1)));
_local5++;
};
while (_local9.length > 0) {
_local8 = [];
_local7 = 0;
_local5 = 0;
while (_local5 < _local9.length) {
_local7 = ((_local7 << 16) + _local9[_local5]);
_local6 = Math.floor((_local7 / _local3));
_local7 = (_local7 - (_local6 * _local3));
if ((((_local8.length > 0)) || ((_local6 > 0)))){
_local8[_local8.length] = _local6;
};
_local5++;
};
_local4[_local4.length] = _local7;
_local9 = _local8;
};
var _local10 = "";
_local5 = (_local4.length - 1);
while (_local5 >= 0) {
_local10 = (_local10 + _arg2.charAt(_local4[_local5]));
_local5--;
};
return (_local10);
}
public static function rstr_md5(_arg1:String):String{
return (binl2rstr(binl_md5(rstr2binl(_arg1), (_arg1.length * 8))));
}
}
}//package com.midasplayer.extras
Section 103
//FunflowAPI (com.midasplayer.FunflowAPI)
package com.midasplayer {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import com.adobe.serialization.json.*;
import com.midasplayer.extras.*;
import flash.external.*;
public class FunflowAPI {
private static const shareURL:String = "http://facebook.king.com/facebook/kinggames/games/share.jsp";
private static const LINK_TYPE_SOLUTIONS:String = "solutions";
private static const gameURL:String = "http://apps.facebook.com/funflow/game.jsp";
private static const LINK_TYPE_HIGHSCORES:String = "highscores";
public static const SHARED_DATA_SAVED_EVENT:String = "sharedDataSaved";
public static const BROWSE_SHARED_DATA_FAILED_EVENT:String = "browseShaeredDataFailed";
public static const INITIALIZED_EVENT:String = "initialized";
public static const GET_NUM_SHARED_OBJECTS_EVENT:String = "getNumSharedObjects";
public static const SHARED_DATA_SAVE_FAILED_EVENT:String = "sharedDataSaveFailed";
public static const BROWSE_SHARED_DATA_EVENT:String = "browseSharedData";
public static const HOST_BANNED_EVENT:String = "hostBanned";
public static const GAME_SAVE_FAILED_EVENT:String = "gameSaveFailed";
private static const LINK_TYPE_RIGHT_CLICK:String = "rightclick";
public static const GET_NUM_SHARED_OBJECTS_FAILED_EVENT:String = "getNumSharedObjectsFailed";
private static const LINK_TYPE_SIGN:String = "sign";
private static const inviteURL:String = "http://apps.facebook.com/funflow/invite.jsp";
private static const LINK_TYPE_OTHER_GAMES:String = "other_games";
private static const SAK:String = "ggfd7sday923mdsfd8csfds34";
private static const LINK_TYPE_LOADER_MOVIE:String = "loader_movie";
private static const bounceURL:String = "http://www.mygame.com/king/bounce.jsp";
private static const LINK_TYPE_PROTECT:String = "protect";
public static const GAME_SAVED_EVENT:String = "gameSaved";
private static const LINK_TYPE_ADD_GAME:String = "add_game";
private static const loadCountURL:String = "http://www.mygame.com/king/loadcount.jsp";
private static const LINK_TYPE_LOADER_PROGRESS:String = "loader_progress";
private static const sharerURL:String = "http://www.facebook.com/sharer.php";
public static var banned:Boolean = false;
public static var isHome:Boolean = false;
private static var sessionID:String;
public static var userAccessToken:String;
public static var fromURL:String;
public static var friends:Array = null;
public static var gameName:String;
public static var userRegistered:Boolean = false;
protected static var dispatcher:EventDispatcher = new EventDispatcher();
public static var sharedData:Object = null;
public static var openSame:Boolean = false;
public static var kingGameServlet:String = "http://facebook.king.com/servlet/kingGameServlet";
public static var currentUser:FunflowUser = null;
private static var SSK:String = "ng43ui54hy35tdsnd6f54rews";
public static function openAddToWebsiteLink():void{
openFunflowPage(LINK_TYPE_ADD_GAME, "website_content.jsp");
}
private static function openShareScorePage(_arg1:int):void{
var _local2:URLVariables = new URLVariables();
_local2.score = _arg1;
_local2.game = gameName;
navigateToURL(new URLRequest(((sharerURL + "?u=") + escape(((shareURL + "?") + _local2.toString())))), "_blank");
}
public static function saveGame(_arg1:Object):void{
var data = _arg1;
var servletLoader:URLLoader = new URLLoader();
var reqvars:URLVariables = new URLVariables();
reqvars.action = "saveGameState";
reqvars.data = FunflowSerializer.amfEncode(data);
reqvars.game = gameName;
reqvars.accessToken = userAccessToken;
var request:URLRequest = new URLRequest(kingGameServlet);
request.method = URLRequestMethod.POST;
request.data = reqvars;
servletLoader.addEventListener(Event.COMPLETE, gameSavedHandler);
servletLoader.addEventListener(IOErrorEvent.IO_ERROR, gameSaveFailedHandler);
servletLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, gameSaveFailedHandler);
try {
servletLoader.load(request);
} catch(error:Error) {
dispatcher.dispatchEvent(new Event(GAME_SAVE_FAILED_EVENT));
};
}
public static function openSolutionsLink():void{
if (isHome){
ExternalInterface.call("loadSolutionsSwf");
} else {
openFunflowPage(LINK_TYPE_SOLUTIONS);
};
}
private static function sharedDataSavedHandler(_arg1:Event):void{
var servletLoader:URLLoader;
var vars:URLVariables;
var gameReqvars:URLVariables;
var evt:Event;
var event = _arg1;
try {
servletLoader = URLLoader(event.target);
if (servletLoader.data == "nok"){
dispatcher.dispatchEvent(new Event(SHARED_DATA_SAVE_FAILED_EVENT));
} else {
vars = new URLVariables(servletLoader.data);
gameReqvars = new URLVariables();
gameReqvars.game = gameName;
gameReqvars.ref = gameName;
gameReqvars.sdid = vars.sharedDataId;
evt = new SharedDataSavedEvent(vars.sharedDataId, ((gameURL + "?") + gameReqvars.toString()));
dispatcher.dispatchEvent(evt);
};
} catch(e:Error) {
dispatcher.dispatchEvent(new Event(SHARED_DATA_SAVE_FAILED_EVENT));
};
}
public static function openOfflineProtectionLink():void{
openFunflowPage(LINK_TYPE_PROTECT);
}
public static function openOtherGamesLink():void{
openFunflowPage(LINK_TYPE_OTHER_GAMES);
}
public static function init(_arg1:String, _arg2:LoaderInfo):void{
var friend:Object;
var so:SharedObject;
var rnd1:Number;
var rnd2:Number;
var name = _arg1;
var loaderInfo = _arg2;
gameName = name;
fromURL = loaderInfo.url;
if (loaderInfo.parameters.hasOwnProperty("user_access_token")){
userAccessToken = loaderInfo.parameters.user_access_token;
};
if (loaderInfo.parameters.hasOwnProperty("user_registered")){
userRegistered = true;
currentUser = new FunflowUser();
currentUser.fbId = loaderInfo.parameters.fbId;
currentUser.name = loaderInfo.parameters.user_name;
currentUser.firstName = loaderInfo.parameters.user_firstName;
currentUser.picture = loaderInfo.parameters.user_picture;
currentUser.score = loaderInfo.parameters.user_score;
currentUser.level = loaderInfo.parameters.user_level;
currentUser.diplomaLevel = loaderInfo.parameters.user_diplomaLevel;
if (loaderInfo.parameters.hasOwnProperty("user_game_state")){
try {
currentUser.gameState = FunflowSerializer.amfDecode(loaderInfo.parameters.user_game_state);
} catch(e:Error) {
};
};
};
if (loaderInfo.parameters.hasOwnProperty("user_friends")){
try {
friends = JSON.decode(loaderInfo.parameters.user_friends);
for each (friend in friends) {
if (friend.hasOwnProperty("serializedGameState")){
friend.gameState = FunflowSerializer.amfDecode(friend.serializedGameState);
};
};
} catch(e:Error) {
};
};
if (loaderInfo.parameters.hasOwnProperty("shared_data")){
sharedData = FunflowSerializer.amfDecode(loaderInfo.parameters.shared_data);
};
var loadCounter:URLLoader = new URLLoader();
var reqvars:URLVariables = new URLVariables();
reqvars.game = gameName;
reqvars.from = fromURL;
try {
so = SharedObject.getLocal("sessionId");
if (so.data.sessionID == null){
rnd1 = Math.abs(Math.floor((Math.random() * 4294967295)));
rnd2 = Math.abs(Math.floor((Math.random() * 4294967295)));
so.data.sessionID = (rnd1.toString(16) + rnd2.toString(16));
so.flush();
};
sessionID = so.data.sessionID;
} catch(e:Error) {
sessionID = "error";
};
reqvars.session = sessionID;
var request:URLRequest = new URLRequest(loadCountURL);
request.data = reqvars;
loadCounter.addEventListener(Event.COMPLETE, loadCountHandler);
loadCounter.addEventListener(IOErrorEvent.IO_ERROR, loadUrlErrorHandler);
loadCounter.addEventListener(SecurityErrorEvent.SECURITY_ERROR, loadUrlErrorHandler);
try {
loadCounter.load(request);
} catch(error:Error) {
dispatcher.dispatchEvent(new Event(INITIALIZED_EVENT));
};
}
public static function openInviteDialog(_arg1:Object=null, _arg2:String=null):void{
var parameters:URLVariables;
var flashVars = _arg1;
var customMessage = _arg2;
try {
parameters = FunflowSerializer.objectToFlashURLVariables(flashVars);
if (customMessage != null){
parameters.customMessage = customMessage;
};
if (isHome){
ExternalInterface.call("openInviteDialog", unescape(parameters.toString()));
} else {
parameters.game = gameName;
navigateToURL(new URLRequest(((inviteURL + "?") + parameters.toString())), "_blank");
};
} catch(e:Error) {
};
}
public static function saveSharedData(_arg1:Object):void{
var data = _arg1;
var servletLoader:URLLoader = new URLLoader();
var reqvars:URLVariables = new URLVariables();
reqvars.action = "saveSharedData";
reqvars.data = FunflowSerializer.amfEncode(data);
reqvars.game = gameName;
var request:URLRequest = new URLRequest(kingGameServlet);
request.method = URLRequestMethod.POST;
request.data = reqvars;
servletLoader.addEventListener(Event.COMPLETE, sharedDataSavedHandler);
servletLoader.addEventListener(IOErrorEvent.IO_ERROR, saveSharedDataFailedHandler);
servletLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, saveSharedDataFailedHandler);
try {
servletLoader.load(request);
} catch(error:Error) {
dispatcher.dispatchEvent(new Event(SHARED_DATA_SAVED_EVENT));
};
}
private static function loadCountHandler(_arg1:Event):void{
var loadCounter:URLLoader;
var vars:URLVariables;
var event = _arg1;
try {
loadCounter = URLLoader(event.target);
vars = new URLVariables(loadCounter.data);
if (vars.h == "true"){
isHome = true;
};
if (vars.o == "true"){
openSame = true;
};
if (vars.b == "true"){
banned = true;
dispatcher.dispatchEvent(new Event(HOST_BANNED_EVENT));
} else {
dispatcher.dispatchEvent(new Event(INITIALIZED_EVENT));
};
} catch(e:Error) {
dispatcher.dispatchEvent(new Event(INITIALIZED_EVENT));
};
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
if (dispatcher == null){
dispatcher = new EventDispatcher();
};
dispatcher.addEventListener(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
if (dispatcher == null){
return;
};
dispatcher.removeEventListener(_arg1, _arg2);
}
public static function submitLevel(_arg1:int):void{
var level = _arg1;
var hash:String = md5.encrypt(((((level + ":") + gameName) + ":") + SSK));
try {
if (isHome){
ExternalInterface.call("submitLevel", level, hash);
};
} catch(e:Error) {
};
}
public static function submitScore(_arg1:int):void{
var score = _arg1;
var hash:String = md5.encrypt(((((score + ":") + gameName) + ":") + SSK));
try {
if (isHome){
ExternalInterface.call("submitScore", score, hash);
} else {
openShareScorePage(score);
};
} catch(e:Error) {
};
}
public static function openLoaderProgressLink():void{
if (!isHome){
openFunflowPage(LINK_TYPE_LOADER_PROGRESS);
};
}
private static function loadUrlErrorHandler(_arg1:Event):void{
dispatcher.dispatchEvent(new Event(INITIALIZED_EVENT));
}
private static function saveSharedDataFailedHandler(_arg1:Event):void{
dispatcher.dispatchEvent(new Event(SHARED_DATA_SAVE_FAILED_EVENT));
}
public static function openFunflowPage(_arg1:String, _arg2:String=null):void{
var _local3:URLVariables = new URLVariables();
_local3.game = gameName;
_local3.from = fromURL;
_local3.type = _arg1;
_local3.session = sessionID;
if (_arg2 != null){
_local3.redirect = _arg2;
};
var _local4 = "_blank";
if (((isHome) && (openSame))){
_local4 = "_top";
};
navigateToURL(new URLRequest(((bounceURL + "?") + _local3.toString())), _local4);
}
public static function funflowEventPost(_arg1:String, _arg2:int=1):void{
var eventText = _arg1;
var priority = _arg2;
try {
if (isHome){
ExternalInterface.call("customGameEventPost", eventText, priority);
};
} catch(e:Error) {
};
}
public static function facebookStreamPost(_arg1:String, _arg2:String, _arg3:Object=null):void{
var parameters:URLVariables;
var description = _arg1;
var type = _arg2;
var flashVars = _arg3;
try {
parameters = FunflowSerializer.objectToFlashURLVariables(flashVars);
if (isHome){
ExternalInterface.call("customGameStreamPost", description, type, parameters.toString());
} else {
openSharePage(description, flashVars, type);
};
} catch(e:Error) {
};
}
public static function getFunflowGamePage(_arg1:Object=null):String{
var _local2:URLVariables = FunflowSerializer.objectToFlashURLVariables(_arg1);
_local2.game = gameName;
_local2.ref = gameName;
return (((gameURL + "?") + _local2.toString()));
}
public static function openSignLink():void{
if (!isHome){
openFunflowPage(LINK_TYPE_SIGN);
};
}
public static function openLoaderMovieLink():void{
if (!isHome){
openFunflowPage(LINK_TYPE_LOADER_MOVIE);
};
}
public static function openHighscoresLink():void{
if (!isHome){
openFunflowPage(LINK_TYPE_HIGHSCORES, (("game/" + gameName) + "/highscores"));
};
}
public static function openRightClickLink():void{
openFunflowPage(LINK_TYPE_RIGHT_CLICK);
}
public static function openSharePage(_arg1:String, _arg2:Object=null, _arg3:String=null):void{
var _local4:URLVariables = FunflowSerializer.objectToFlashURLVariables(_arg2);
_local4.description = _arg1;
_local4.game = gameName;
_local4.description = _arg1;
if (_arg3 != null){
_local4.type = _arg3;
};
navigateToURL(new URLRequest(((sharerURL + "?u=") + escape(((shareURL + "?") + _local4.toString())))), "_blank");
}
private static function gameSavedHandler(_arg1:Event):void{
var servletLoader:URLLoader;
var event = _arg1;
try {
servletLoader = URLLoader(event.target);
if (servletLoader.data == "ok"){
dispatcher.dispatchEvent(new Event(GAME_SAVED_EVENT));
} else {
dispatcher.dispatchEvent(new Event(GAME_SAVE_FAILED_EVENT));
};
} catch(e:Error) {
dispatcher.dispatchEvent(new Event(GAME_SAVE_FAILED_EVENT));
};
}
public static function submitAchievement(_arg1:String):void{
var achievement = _arg1;
var hash:String = md5.encrypt(((((achievement + ":") + gameName) + ":") + SAK));
try {
if (isHome){
ExternalInterface.call("submitAchievement", achievement, hash);
};
} catch(e:Error) {
};
}
private static function gameSaveFailedHandler(_arg1:Event):void{
dispatcher.dispatchEvent(new Event(GAME_SAVE_FAILED_EVENT));
}
}
}//package com.midasplayer
Section 104
//FunflowUser (com.midasplayer.FunflowUser)
package com.midasplayer {
public class FunflowUser {
public var diplomaLevel:int;// = 0
public var name:String;// = ""
public var weeklyScore:Number;// = 0
public var score:Number;// = 0
public var level:int;// = 0
public var fbId:String;// = ""
public var firstName:String;// = ""
public var picture:String;// = ""
public var gameState:Object;// = null
}
}//package com.midasplayer
Section 105
//SharedDataSavedEvent (com.midasplayer.SharedDataSavedEvent)
package com.midasplayer {
import flash.events.*;
public class SharedDataSavedEvent extends Event {
public var sharedDataId:String;
public var sharedDataGameUrl:String;
public function SharedDataSavedEvent(_arg1:String, _arg2:String, _arg3:Boolean=false, _arg4:Boolean=false){
this.sharedDataId = _arg1;
this.sharedDataGameUrl = _arg2;
super(FunflowAPI.SHARED_DATA_SAVED_EVENT, _arg3, _arg4);
}
}
}//package com.midasplayer
Section 106
//BigBird (com.ussgames.birdRacing.BigBird)
package com.ussgames.birdRacing {
import flash.display.*;
import com.ussgames.general.*;
import flash.geom.*;
import com.ussgames.game.*;
import com.ussgames.sound.*;
public class BigBird extends MovieClip {
public var lastX:Number;// = 0
public var feetHit:MovieClip;
public var sprintTime:int;// = 0
public var jumpSensor:MovieClip;
public var yoshiJumpOK:Boolean;// = true
public var jumpKeyPressed:Boolean;// = false
public var state:int;// = 1
public var sprintBar:MovieClip;
public var mainHit:MovieClip;
public var startYPos:Number;// = 100
public var waterMask:MovieClip;
public var lastCollisionClip:MovieClip;
public var xSpeed:Number;// = 0
public var bird:MovieClip;
public var sprintBarSize:Number;// = 0
public var birdClass:int;// = 0
public var yoshiJumpCount:int;// = 0
public var ySpeed:Number;// = 0
public var yoshiJumpsDone:int;// = 0
public var stumbleTime:int;// = 0
public var hotkey:MovieClip;
public var lane:int;// = 1
public var flutterSensor:MovieClip;
public var courseXPos:Number;// = 0
public var inWater:Boolean;// = false
public var myDust:Array;
public static const BARDECREASE:Array = [0.4, 0.8, 1.5, 1.8];
public static const JUMPING:int = 3;
public static const TUMBLE:int = 5;
public static const RUNNING:int = 2;
public static const FALLEN:int = 6;
public static const CLIPPED:int = 4;
public static const FELLINHOLE:int = 8;
public static const WAITING:int = 1;
public static const OUT:int = 7;
public static const ACCELLERATERATIO:Array = [0.5, 1, 2, 3];
public static const SPEEDRATIO:Array = [0.4, 0.75, 1, 1.5];
public static const BARINCREASE:int = 8;
public static var jumpKeys:Array = [Key.Q, Key.V, Key.M, Key.P];
public static var birdRunning:Boolean = false;
public function BigBird(){
myDust = [];
super();
}
public function jumpReleased(){
if (!TournamentStanding.aiPlayer[(this.lane - 1)]){
jumpKeyPressed = false;
};
}
public function init(_arg1:int){
this.startYPos = ((CourseConfig.LANEYPOS[(_arg1 - 1)] + CourseConfig.LANEWIDTH) - 30);
this.y = startYPos;
this.x = 325;
this.xSpeed = 0;
this.ySpeed = 0;
this.state = WAITING;
this.lane = _arg1;
this.courseXPos = 0;
lastX = this.x;
sprintBar.visible = false;
birdRunning = false;
}
public function resume(){
if (state == WAITING){
if (this["bird"].currentFrame > 1){
this["bird"].play();
};
} else {
this["bird"].play();
};
}
public function jump(){
var _local1:int;
if (((!(Key.isDown(jumpKeys[(this.lane - 1)]))) && (!(TournamentStanding.aiPlayer[(this.lane - 1)])))){
jumpKeyPressed = false;
};
if (jumpKeyPressed){
return;
};
if (BirdRacingMain.raceType == CourseConfig.HURDLES){
if ((((this.y == startYPos)) && ((this.state == RUNNING)))){
this.state = JUMPING;
this.ySpeed = -(BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.JUMPSPEED]);
yoshiJumpOK = true;
yoshiJumpCount = 0;
jumpKeyPressed = true;
};
};
if (BirdRacingMain.raceType == CourseConfig.FLUTTER){
if ((((ySpeed > 1)) || ((((this.y == startYPos)) && ((this.state == RUNNING)))))){
this.ySpeed = -3;
this.state = JUMPING;
jumpKeyPressed = true;
};
};
if (BirdRacingMain.raceType == CourseConfig.SPRINT){
_local1 = getBarBlock();
sprintBarSize = (sprintBarSize + BARINCREASE);
if (sprintBarSize > 100){
sprintBarSize = 100;
};
state = RUNNING;
jumpKeyPressed = true;
};
}
public function getBarBlock():int{
var _local1:int = Math.floor((sprintBarSize / 25));
if (_local1 > 3){
_local1 = 3;
};
return (_local1);
}
public function collide(_arg1:MovieClip){
lastCollisionClip = _arg1;
if (((!((state == RUNNING))) && (!((state == JUMPING))))){
return;
};
if (TournamentStanding.aiPlayer[(this.lane - 1)]){
if (BirdRacingMain.raceType == CourseConfig.HURDLES){
if ((((Math.random() < 0.3)) || ((((Controller.main.level.value == 3)) && ((Math.random() < 0.6)))))){
jump();
};
};
if (BirdRacingMain.raceType == CourseConfig.FLUTTER){
if (this.flutterSensor.hitTestObject(_arg1.mainHit)){
if ((((ySpeed > 0)) || ((y >= (startYPos - 3))))){
jump();
};
};
};
};
if (BirdRacingMain.raceType == CourseConfig.FLUTTER){
if (this.feetHit.hitTestObject(_arg1.mainHit)){
if (y == startYPos){
state = FELLINHOLE;
Commentary.playComment("ohno", lane);
};
};
return;
};
if (((this.feetHit.hitTestObject(_arg1.mainHit)) && ((y >= (startYPos - 5))))){
if (JumpTypesConfig.JUMPTYPES[(Controller.main.level.value - 1)][(_arg1.currentFrame - 1)] == JumpTypesConfig.SOLID){
state = FALLEN;
if (xSpeed > (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.75)){
xSpeed = (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.75);
};
yoshiJumpOK = false;
yoshiJumpCount = 1000;
stumbleTime = BirdClassConfig.STUMBLEDELAYS[2];
Commentary.playComment("falls", lane);
SoundController.playSound("clip");
} else {
state = TUMBLE;
if (xSpeed > (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.75)){
xSpeed = (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.75);
};
yoshiJumpOK = false;
yoshiJumpCount = 1000;
stumbleTime = BirdClassConfig.STUMBLEDELAYS[1];
Commentary.playComment("stumbles", lane);
SoundController.playSound("clip");
if ((((Controller.main.level.value == 1)) || ((Controller.main.level.value == 2)))){
SoundController.playSound("hedgetumble");
};
};
} else {
if (((this.feetHit.hitTestObject(_arg1.clipHit)) && ((y < (startYPos - 5))))){
state = CLIPPED;
if (xSpeed > (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.75)){
xSpeed = (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.75);
};
yoshiJumpOK = false;
yoshiJumpCount = 1000;
stumbleTime = BirdClassConfig.STUMBLEDELAYS[0];
addDust();
Commentary.playComment("stumbles", lane);
SoundController.playSound("clip");
} else {
if (((((_arg1.waterClip) && (this.feetHit.hitTestObject(_arg1.waterClip)))) && ((y == startYPos)))){
if (Controller.main.level.value == 1){
state = CLIPPED;
stumbleTime = BirdClassConfig.STUMBLEDELAYS[0];
inWater = true;
waterMask.gotoAndStop(2);
Commentary.playComment("stumbles", lane);
} else {
if (Controller.main.level.value >= 2){
state = FALLEN;
stumbleTime = BirdClassConfig.STUMBLEDELAYS[2];
Commentary.playComment("falls", lane);
};
};
if (xSpeed > (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.75)){
xSpeed = (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.75);
};
yoshiJumpOK = false;
yoshiJumpCount = 1000;
addDust(30);
};
};
};
}
public function update(_arg1:int){
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Point;
var _local2:Boolean;
if (TournamentStanding.aiPlayer[(this.lane - 1)]){
if ((((((Controller.main.level.value >= 2)) && (lastCollisionClip))) && (lastCollisionClip.waterClip))){
if (Math.random() < 0.4){
jumpKeyPressed = false;
if (this.flutterSensor.hitTestObject(lastCollisionClip.waterClip)){
_local2 = true;
};
};
} else {
if (jumpKeyPressed){
if ((((Math.random() < 0.3)) || (((lastCollisionClip) && (!(lastCollisionClip.waterClip)))))){
jumpKeyPressed = false;
if (((lastCollisionClip) && (lastCollisionClip.waterClip))){
if (this.flutterSensor.hitTestObject(lastCollisionClip.waterClip)){
_local2 = true;
};
};
};
};
};
if (state == RUNNING){
jumpKeyPressed = false;
yoshiJumpsDone = 0;
};
if (state == WAITING){
if (Math.random() < 0.1){
start();
};
};
if (BirdRacingMain.raceType == CourseConfig.SPRINT){
if ((((_arg1 < 100)) || ((Controller.main.level.value == 1)))){
if (getBarBlock() < 4){
if (Math.random() < 0.2){
jump();
};
} else {
if (Math.random() < 0.07){
jump();
};
};
} else {
if (getBarBlock() < 4){
if (Math.random() < 0.25){
jump();
};
} else {
if (Math.random() < 0.12){
jump();
};
};
};
};
} else {
if (!Key.isDown(jumpKeys[(this.lane - 1)])){
jumpKeyPressed = false;
};
};
if (BirdRacingMain.raceType == CourseConfig.SPRINT){
if (state == WAITING){
return;
};
_local3 = getBarBlock();
_local4 = getBarBlockFraction();
_local4 = (_local4 - _local3);
_local4 = (_local4 / (8 - _local3));
_local4 = (_local4 + 1);
xSpeed = (xSpeed + (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.ACCELLERATION] * (ACCELLERATERATIO[_local3] * _local4)));
if (xSpeed > (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * (SPEEDRATIO[_local3] * _local4))){
xSpeed = (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * (SPEEDRATIO[_local3] * _local4));
};
sprintBarSize = (sprintBarSize - BARDECREASE[_local3]);
if (sprintBarSize < 0){
sprintBarSize = 0;
};
sprintBar.visible = true;
sprintBar.fill.width = sprintBarSize;
updateCoursePos();
if (currentLabel != "running"){
gotoAndStop("running");
};
return;
};
sprintBar.visible = false;
if (lastCollisionClip){
inWater = false;
_local5 = this.x;
_local6 = this.y;
if (lastCollisionClip.waterClip){
_local7 = new Point(_local5, _local6);
_local7 = this.parent.localToGlobal(_local7);
if (lastCollisionClip.waterClip.hitTestPoint(_local7.x, _local7.y)){
inWater = true;
};
};
};
if (((!(inWater)) || ((Controller.main.level.value >= 2)))){
waterMask.gotoAndStop(1);
if ((((ySpeed == 0)) && ((y > startYPos)))){
this.y = startYPos;
};
} else {
if (waterMask.currentFrame == 1){
waterMask.gotoAndStop(2);
if (Controller.main.level.value == 1){
SoundController.playSound("splash");
};
};
if (state == CLIPPED){
this.y = (startYPos + 10);
} else {
this.y = startYPos;
};
};
switch (state){
case JUMPING:
if (currentLabel != "jumping"){
gotoAndStop("jumping");
};
if (BirdRacingMain.raceType == CourseConfig.HURDLES){
xSpeed = (xSpeed + BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.ACCELLERATION]);
if (xSpeed > (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] + (_arg1 / 300))){
xSpeed = (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] + (_arg1 / 300));
};
} else {
if (xSpeed > (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.5)){
xSpeed = (xSpeed - 0.5);
};
};
break;
case RUNNING:
if (currentLabel != "running"){
gotoAndStop("running");
};
xSpeed = (xSpeed + BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.ACCELLERATION]);
if (xSpeed > (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] + (_arg1 / 300))){
xSpeed = (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] + (_arg1 / 300));
};
yoshiJumpsDone = 0;
break;
case CLIPPED:
if (currentLabel != "clipped"){
gotoAndStop("clipped");
};
xSpeed = (xSpeed - BirdClassConfig.STUMBLESPEEDDECREASE);
if (xSpeed < (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.5)){
xSpeed = (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.5);
};
stumbleTime--;
if (stumbleTime <= 0){
state = RUNNING;
};
break;
case TUMBLE:
if (currentLabel != "tumble"){
gotoAndStop("tumble");
};
xSpeed = (xSpeed - BirdClassConfig.STUMBLESPEEDDECREASE);
if (xSpeed < (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.5)){
xSpeed = (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.5);
};
if (stumbleTime <= 0){
state = RUNNING;
};
break;
case FALLEN:
if (currentLabel != "fallen"){
gotoAndStop("fallen");
};
xSpeed = (xSpeed - BirdClassConfig.STUMBLESPEEDDECREASE);
if (xSpeed < (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.5)){
xSpeed = (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.5);
};
if (stumbleTime <= 0){
state = RUNNING;
};
break;
case FELLINHOLE:
if (currentLabel != "fallinhole"){
gotoAndStop("fallinhole");
};
xSpeed = 0;
if (((this.bird) && ((this.bird.currentFrame == this.bird.totalFrames)))){
TournamentStanding.birdOut(lane);
state = OUT;
pause();
};
break;
};
if (((!((ySpeed == 0))) || ((this.y < startYPos)))){
this.y = (this.y + ySpeed);
ySpeed = (ySpeed + GameConfig.GRAVITY);
if ((((((((yoshiJumpsDone < 2)) && (!(jumpKeyPressed)))) && ((BirdRacingMain.raceType == CourseConfig.HURDLES)))) && (((Key.isDown(jumpKeys[(this.lane - 1)])) || (_local2))))){
if ((((((yoshiJumpCount <= BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.YOSHIJUMPTIME])) && ((yoshiJumpOK == false)))) || ((((ySpeed >= 3)) && (yoshiJumpOK))))){
this.ySpeed = -3;
yoshiJumpCount++;
jumpKeyPressed = true;
yoshiJumpsDone++;
if (xSpeed > (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.5)){
xSpeed = (xSpeed * 0.6);
if (xSpeed < (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.5)){
xSpeed = (BirdClassConfig.BIRDCLASSES[birdClass][BirdClassConfig.SPEED] * 0.5);
};
};
};
};
if (ySpeed > GameConfig.TERMINALVELOCITY){
ySpeed = GameConfig.TERMINALVELOCITY;
};
if (this.y >= startYPos){
this.y = startYPos;
ySpeed = 0;
if ((((state == JUMPING)) || ((state == CLIPPED)))){
state = RUNNING;
};
ScreenShaker.shakeScreen(5, 5);
};
};
updateCoursePos();
}
public function getBarBlockFraction():Number{
return ((sprintBarSize / 25));
}
public function backUp(){
stumbleTime = 0;
}
public function updateCoursePos(){
courseXPos = (courseXPos + xSpeed);
var _local1:* = (lastX - this.x);
var _local2:int = (myDust.length - 1);
while (_local2 >= 0) {
if (myDust[_local2].parent){
myDust[_local2].x = (myDust[_local2].x - _local1);
} else {
myDust.splice(_local2, 1);
};
_local2--;
};
lastX = this.x;
}
public function start(){
this.state = RUNNING;
jumpKeyPressed = true;
if (!birdRunning){
Commentary.startRaceComment();
};
birdRunning = true;
}
public function addDust(_arg1:Number=0){
var _local3:Number;
var _local4:Number;
var _local5:MovieClip;
var _local6:Point;
if (!this.parent){
return;
};
var _local2:int;
while (_local2 < 2) {
_local3 = (((this.x + (Math.random() * 32)) - 8) - _arg1);
_local4 = ((this.y + (Math.random() * 12)) - 4);
_local5 = new DustParticle2();
if (((lastCollisionClip.waterClip) && ((Controller.main.level.value == 1)))){
_local6 = new Point(_local3, _local4);
_local6 = this.parent.localToGlobal(_local6);
if (lastCollisionClip.waterClip.hitTestPoint(_local6.x, _local6.y)){
_local5 = new WaterParticles();
};
};
if (Controller.main.level.value == 3){
_local5 = new WaterParticles();
};
_local5.x = _local3;
_local5.y = _local4;
if (parent){
parent.addChild(_local5);
};
myDust.push(_local5);
_local2++;
};
}
public function pause(){
this["bird"].stop();
}
}
}//package com.ussgames.birdRacing
Section 107
//BirdClassConfig (com.ussgames.birdRacing.BirdClassConfig)
package com.ussgames.birdRacing {
public class BirdClassConfig {
public static const JUMPSPEED:int = 1;
public static const SLOW:int = 0;
public static const ACCELLERATION:int = 2;
public static const BIRDNAMES:Array = ["BRAIN", "DOLLY", "BATH", "POO"];
public static const STUMBLEDELAYS:Array = [5, 45, 60];
public static const YOSHIJUMPBOOST:int = 4;
public static const SLOWCLASSSETTINGS:Array = [20, 5.5, 0.75, 10, 2, 5];
public static const FAST:int = 2;
public static const FASTCLASSSETTINGS:Array = [22, 5.5, 1, 20, 2, 3];
public static const STUMBLESPEEDDECREASE:Number = 0.5;
public static const MEDIUMCLASSSETTINGS:Array = [18, 5.5, 1, 20, 2, 4];
public static const SPEED:int = 0;
public static const BIRDCLASSES:Array = [SLOWCLASSSETTINGS, MEDIUMCLASSSETTINGS, FASTCLASSSETTINGS];
public static const MEDIUM:int = 1;
public static const YOSHIJUMPDELAY:int = 5;
public static const YOSHIJUMPTIME:int = 3;
}
}//package com.ussgames.birdRacing
Section 108
//BirdRacingMain (com.ussgames.birdRacing.BirdRacingMain)
package com.ussgames.birdRacing {
import flash.display.*;
import com.ussgames.general.*;
import flash.events.*;
import flash.geom.*;
import com.ussgames.game.*;
import com.ussgames.sound.*;
import com.ussgames.panels.*;
public class BirdRacingMain extends Main {
var frontBirdPos:Number;// = 0
public var raceRecord:int;// = 0
public var bgObjects2:Array;
public var timeSinceLastBGObject:Number;// = 0
var photoBitmap:Bitmap;
var frontBird:int;// = -1
public var timeSinceLastBGObject2:Number;// = 0
public var raceOverCountDown:int;// = 0
public var bgObjects:Array;
public var allBirdies:Array;
public var behindObjectsContainer:MovieClip;
public var gameContainer:MovieClip;
public var startCountDown:MovieClip;
public var bgObjectsContainer:MovieClip;
public var raceTime:int;// = 0
public var bgObjectsContainer2:MovieClip;
public var raceOver:Boolean;// = false
var photoBitmapData:BitmapData;
public var pixelsToMoveCourseThisFrame:Number;// = 0
public var locationRecord:int;// = 0
public var endLine:MovieClip;
public var trackNShadows:MovieClip;
public var courseObjects:Array;
public static var fps:int = 0;
public static var idealFrameTime:Number = 33.3333333333333;
public static var levelUnlocked:Boolean = false;
public static var birdChooserActive:Boolean = false;
public static var gameContainerX:Number = 0;
public static var gameContainerY:Number = 0;
public static var raceType:int = 1;
public static var raceStarted:Boolean = false;
public static var lastFrameStartTime:Number = 0;
public static var timeFactor:Number = 1;
public function BirdRacingMain(){
allBirdies = [];
courseObjects = [];
bgObjects = [];
bgObjects2 = [];
super();
}
public function updateBirds(){
var _local1:int;
var _local15:Boolean;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local2:int;
var _local3:Number = Infinity;
var _local4:Boolean;
var _local5:int = frontBird;
_local1 = 0;
while (_local1 < 4) {
if (allBirdies[_local1].state != BigBird.OUT){
_local4 = false;
if (Key.isDown(BigBird.jumpKeys[(allBirdies[_local1].lane - 1)])){
if (allBirdies[_local1].state == BigBird.WAITING){
allBirdies[_local1].start();
} else {
allBirdies[_local1].jump();
};
};
allBirdies[_local1].update(raceTime);
if (allBirdies[_local1].courseXPos > frontBirdPos){
frontBird = _local1;
frontBirdPos = allBirdies[_local1].courseXPos;
};
if (allBirdies[_local1].courseXPos < _local3){
_local2 = _local1;
_local3 = allBirdies[_local1].courseXPos;
};
trackNShadows[("shad" + (_local1 + 1))].x = (allBirdies[_local1].x + 650);
} else {
trackNShadows[("shad" + (_local1 + 1))].visible = false;
};
_local1++;
};
if (_local4){
photoFinish(true);
return;
};
if (((!((_local5 == frontBird))) && (!((_local5 == -1))))){
Commentary.playComment("inlead", (frontBird + 1));
};
var _local6:Number = 0;
if (frontBird >= 0){
if (allBirdies[frontBird].x < 350){
pixelsToMoveCourseThisFrame = (allBirdies[frontBird].xSpeed / 2);
allBirdies[frontBird].x = (allBirdies[frontBird].x + (allBirdies[frontBird].xSpeed / 2));
_local6 = allBirdies[frontBird].x;
} else {
pixelsToMoveCourseThisFrame = allBirdies[frontBird].xSpeed;
};
};
if (frontBird != -1){
_local1 = 0;
while (_local1 < 4) {
_local15 = false;
if (_local1 != frontBird){
if (allBirdies[_local1].state == BigBird.OUT){
_local15 = true;
};
if (allBirdies[_local1].state != BigBird.OUT){
allBirdies[_local1].x = (allBirdies[frontBird].x - Math.abs((allBirdies[frontBird].courseXPos - allBirdies[_local1].courseXPos)));
};
if (allBirdies[_local1].x < (-325 - allBirdies[_local1].getBounds(allBirdies[_local1]).right)){
if (allBirdies[_local1].state != BigBird.OUT){
TournamentStanding.birdOut((_local1 + 1));
};
allBirdies[_local1].state = BigBird.OUT;
allBirdies[_local1].pause();
if (!_local15){
Commentary.playComment("out", allBirdies[_local1].lane);
};
allBirdies[_local1].visible = false;
if (allBirdies[_local1].parent){
allBirdies[_local1].parent.removeChild(allBirdies[_local1]);
};
};
};
_local1++;
};
};
var _local7:Number = Math.abs((frontBirdPos - _local3));
var _local8:Number = 1;
var _local9:Number = 1;
var _local10:Number = 0;
var _local11:Number = 0;
if (_local7 > 300){
_local16 = (_local7 - 300);
_local17 = (_local16 / 300);
_local18 = (_local17 / 2);
if (_local18 > 0.5){
_local18 = 0.5;
};
if (_local18 < 0){
_local18 = 0;
};
_local8 = (1 - _local18);
_local10 = (500 * _local18);
_local11 = (450 * _local18);
_local9 = (1 - (_local18 / 2));
} else {
_local8 = 1;
_local10 = 0;
_local11 = 0;
_local9 = 1;
};
gameContainer.scaleX = (gameContainer.scaleX + ((_local8 - gameContainer.scaleX) / 5));
gameContainer.scaleY = (gameContainer.scaleY + ((_local8 - gameContainer.scaleY) / 5));
gameContainer.x = (gameContainer.x + ((_local10 - gameContainer.x) / 5));
gameContainer.y = (gameContainer.y + ((_local11 - gameContainer.y) / 5));
gameContainerX = gameContainer.x;
gameContainerY = gameContainer.y;
Controller.root.bgContainer.scaleX = (Controller.root.bgContainer.scaleX + ((_local9 - Controller.root.bgContainer.scaleX) / 5));
Controller.root.bgContainer.scaleY = (Controller.root.bgContainer.scaleY + ((_local9 - Controller.root.bgContainer.scaleY) / 5));
Controller.root.bgContainer.y = (Controller.root.bgContainer.y + (((275 + (_local11 / 3)) - Controller.root.bgContainer.y) / 5));
bgObjectsContainer2.y = -((500 - (500 * Controller.root.bgContainer.scaleY)));
bgObjectsContainer2.scaleX = (1 + ((Controller.root.bgContainer.scaleX - gameContainer.scaleX) / 2));
bgObjectsContainer2.scaleY = (1 + ((Controller.root.bgContainer.scaleY - gameContainer.scaleY) / 2));
var _local12 = 394;
var _local13:Number = (_local12 / CourseConfig.COURSELENGTH);
var _local14:Number = (_local13 * frontBirdPos);
if (_local14 > _local12){
_local14 = _local12;
};
Controller.root.raceOmeter.marker.x = _local14;
if (frontBirdPos >= CourseConfig.COURSELENGTH){
photoFinish();
_local1 = 0;
while (_local1 < 4) {
if (allBirdies[_local1].bird){
allBirdies[_local1].bird.stop();
};
_local1++;
};
};
}
public function updateBGObjects2(){
var _local1:int = (bgObjects2.length - 1);
while (_local1 >= 0) {
if (level.value >= 1){
bgObjects2[_local1].x = (bgObjects2[_local1].x - (pixelsToMoveCourseThisFrame / 30));
} else {
bgObjects2[_local1].x = (bgObjects2[_local1].x - (pixelsToMoveCourseThisFrame / 4));
if (bgObjects2[_local1].x < (-500 - bgObjects2[_local1].getBounds(bgObjects2[_local1]).right)){
if (bgObjects2[_local1].parent){
bgObjects2[_local1].parent.removeChild(bgObjects2[_local1]);
};
bgObjects2.splice(_local1, 1);
};
};
_local1--;
};
}
override public function initGame(){
var _local3:MovieClip;
SoundController.stopMusic();
if (Math.random() < 0.5){
SoundController.playMusic("tune2");
} else {
SoundController.playMusic("tune3");
};
CourseConfig.COURSELENGTH = CourseConfig.ALLCOURSELENGTHS[(level.value - 1)][(raceType - 1)];
gameContainer = Controller.root.gameContainer.gameContainer;
courseObjects = [];
allBirdies = [];
ScreenShaker.init(gameContainer);
bgObjectsContainer2 = new MovieClip();
gameContainer.addChild(bgObjectsContainer2);
behindObjectsContainer = new MovieClip();
gameContainer.addChild(behindObjectsContainer);
trackNShadows = new TrackNShadows();
trackNShadows.x = -650;
trackNShadows.y = 188;
gameContainer.addChild(trackNShadows);
trackNShadows.trackStrip.gotoAndStop(level.value);
bgObjectsContainer = new MovieClip();
gameContainer.addChild(bgObjectsContainer);
var _local1:MovieClip = new StartLine2();
_local1.x = 375;
_local1.y = CourseConfig.LANEYPOS[0];
_local1.special = true;
gameContainer.addChild(_local1);
bgObjects.push(_local1);
endLine = new FinishLine2();
endLine.x = (325 + CourseConfig.COURSELENGTH);
endLine.y = CourseConfig.LANEYPOS[0];
endLine.special = true;
bgObjects.push(endLine);
var _local2:int;
while (_local2 < 4) {
if (_local2 == 0){
_local3 = new BigBirdClip1();
};
if (_local2 == 1){
_local3 = new BigBirdClip2();
};
if (_local2 == 2){
_local3 = new BigBirdClip3();
};
if (_local2 == 3){
_local3 = new BigBirdClip4();
};
_local3.init((_local2 + 1));
gameContainer.addChild(_local3);
allBirdies.push(_local3);
_local2++;
};
Key.initialize(Controller.root.stage);
addInitalBGObjects();
addInitalBGObjects2();
Controller.root.bgContainer.gotoAndStop(level.value);
startCountDown = new StartCountDown();
startCountDown.x = 325;
startCountDown.y = 100;
Controller.root.addChild(startCountDown);
gameContainer.scaleX = 1;
gameContainer.scaleY = 1;
gameContainer.x = -100;
gameContainer.y = 0;
gameContainerX = -100;
gameContainerY = 0;
Controller.root.bgContainer.scaleX = 1;
Controller.root.bgContainer.scaleY = 1;
raceStarted = false;
raceOver = false;
pixelsToMoveCourseThisFrame = 0;
raceTime = 0;
timeSinceLastBGObject = 0;
frontBirdPos = 0;
TournamentStanding.resetRaceStats();
Controller.root.raceOmeter.marker.x = 0;
raceRecord = 0;
locationRecord = 0;
levelUnlocked = false;
frontBird = -1;
}
public function addNewBGObject(){
var _local1:MovieClip = new DesertBGDetail();
_local1.y = ((CourseConfig.LANEYPOS[0] - 15) - Math.floor((Math.random() * 30)));
_local1.x = 975;
_local1.gotoAndStop((Math.floor((Math.random() * _local1.totalFrames)) + 1));
bgObjects.push(_local1);
behindObjectsContainer.addChild(_local1);
timeSinceLastBGObject = -(_local1.width);
}
public function pauseBirds(){
var _local1:int;
while (_local1 < 4) {
allBirdies[_local1].pause();
_local1++;
};
if (startCountDown.parent){
startCountDown.stop();
startCountDown.visible = false;
};
}
public function startBirdChooser(){
TournamentStanding.resetPlayers();
Controller.root.addEventListener(Event.ENTER_FRAME, updateBirdChooser);
birdChooserActive = true;
Controller.root.allBirds.addEventListener(Event.REMOVED_FROM_STAGE, stopBirdChooser, false, 0, true);
}
public function resumeBirds(){
var _local1:int;
while (_local1 < 4) {
allBirdies[_local1].resume();
_local1++;
};
if (startCountDown.parent){
startCountDown.play();
startCountDown.visible = true;
};
}
public function updateBirdChooser(_arg1:Event){
if (Key.isDown(BigBird.jumpKeys[0])){
if (TournamentStanding.aiPlayer[0]){
TournamentStanding.aiPlayer[0] = false;
Controller.root.ai1.gotoAndStop(2);
Controller.root.chooserCountDown.play();
Controller.root.allBirds.birdh1.alpha = 1;
SoundController.playSound("selectblip");
};
};
if (Key.isDown(BigBird.jumpKeys[1])){
if (TournamentStanding.aiPlayer[1]){
TournamentStanding.aiPlayer[1] = false;
Controller.root.ai2.gotoAndStop(2);
Controller.root.chooserCountDown.play();
Controller.root.allBirds.birdh2.alpha = 1;
SoundController.playSound("selectblip");
};
};
if (Key.isDown(BigBird.jumpKeys[2])){
if (TournamentStanding.aiPlayer[2]){
TournamentStanding.aiPlayer[2] = false;
Controller.root.ai3.gotoAndStop(2);
Controller.root.chooserCountDown.play();
Controller.root.allBirds.birdh3.alpha = 1;
SoundController.playSound("selectblip");
};
};
if (Key.isDown(BigBird.jumpKeys[3])){
if (TournamentStanding.aiPlayer[3]){
TournamentStanding.aiPlayer[3] = false;
Controller.root.ai4.gotoAndStop(2);
Controller.root.chooserCountDown.play();
Controller.root.allBirds.birdh4.alpha = 1;
SoundController.playSound("selectblip");
};
};
}
public function keyReleased(){
var _local1:int;
_local1 = 0;
while (_local1 < 4) {
if (((allBirdies) && (allBirdies[_local1]))){
if (!Key.isDown(BigBird.jumpKeys[(allBirdies[_local1].lane - 1)])){
allBirdies[_local1].jumpReleased();
};
};
_local1++;
};
}
public function addInitalBGObjects2(){
var _local1:MovieClip;
var _local2:int;
var _local3:MovieClip;
if (level.value == 3){
_local1 = new IceBGDetail();
_local1.y = (CourseConfig.LANEYPOS[0] - 140);
_local1.x = -200;
_local1.gotoAndStop(2);
bgObjects2.push(_local1);
bgObjectsContainer2.addChild(_local1);
timeSinceLastBGObject = 0;
} else {
if (level.value == 2){
_local1 = new JungleBGDetail();
_local1.y = (CourseConfig.LANEYPOS[0] - 140);
_local1.x = -200;
_local1.gotoAndStop(2);
bgObjects2.push(_local1);
bgObjectsContainer2.addChild(_local1);
timeSinceLastBGObject = 0;
} else {
if (level.value == 1){
_local1 = new DesertBGDetail2();
_local1.y = (CourseConfig.LANEYPOS[0] - 140);
_local1.x = -200;
_local1.gotoAndStop(2);
bgObjects2.push(_local1);
bgObjectsContainer2.addChild(_local1);
timeSinceLastBGObject = 0;
} else {
_local2 = -1;
while (_local2 < 2) {
_local3 = new DesertBGDetail();
_local3.y = ((CourseConfig.LANEYPOS[0] - 120) - Math.floor((Math.random() * 20)));
_local3.x = ((_local2 * 350) + (Math.random() * 50));
_local3.scaleX = (_local3.scaleY = 0.5);
_local3.gotoAndStop((Math.floor((Math.random() * _local3.totalFrames)) + 1));
bgObjects2.push(_local3);
bgObjectsContainer2.addChild(_local3);
timeSinceLastBGObject2 = 0;
_local2++;
};
};
};
};
}
public function slowZoomOut(){
var _local1:Number = 1;
var _local2:Number = 1;
var _local3:Number = 0;
var _local4:Number = 0;
var _local5:Number = gameContainer.scaleX;
var _local6:Number = (1 - _local5);
_local6 = (_local6 + 0.01);
if (_local6 > 0.5){
_local6 = 0.5;
};
_local1 = (1 - _local6);
_local3 = (500 * _local6);
_local4 = (450 * _local6);
_local2 = (1 - (_local6 / 2));
gameContainer.scaleX = (gameContainer.scaleX + ((_local1 - gameContainer.scaleX) / 5));
gameContainer.scaleY = (gameContainer.scaleY + ((_local1 - gameContainer.scaleY) / 5));
gameContainer.y = (gameContainer.y + ((_local4 - gameContainer.y) / 5));
gameContainerX = gameContainer.x;
gameContainerY = gameContainer.y;
Controller.root.bgContainer.scaleX = (Controller.root.bgContainer.scaleX + ((_local2 - Controller.root.bgContainer.scaleX) / 5));
Controller.root.bgContainer.scaleY = (Controller.root.bgContainer.scaleY + ((_local2 - Controller.root.bgContainer.scaleY) / 5));
Controller.root.bgContainer.y = (Controller.root.bgContainer.y + (((275 + (_local4 / 3)) - Controller.root.bgContainer.y) / 5));
bgObjectsContainer2.y = -((500 - (500 * Controller.root.bgContainer.scaleY)));
bgObjectsContainer2.scaleX = (1 + ((Controller.root.bgContainer.scaleX - gameContainer.scaleX) / 2));
bgObjectsContainer2.scaleY = (1 + ((Controller.root.bgContainer.scaleY - gameContainer.scaleY) / 2));
}
public function getTime():Number{
var _local1:Date = new Date();
return (_local1.getTime());
}
override public function cleanUp(){
var _local1:int;
if (((trackNShadows) && (trackNShadows.parent))){
gameContainer.removeChild(trackNShadows);
};
trackNShadows = null;
_local1 = 0;
while (_local1 < allBirdies.length) {
if (((allBirdies[_local1]) && (allBirdies[_local1].parent))){
allBirdies[_local1].parent.removeChild(allBirdies[_local1]);
};
allBirdies[_local1].gotoAndStop(1);
allBirdies[_local1] = null;
_local1++;
};
_local1 = 0;
while (_local1 < courseObjects.length) {
if (((courseObjects[_local1]) && (courseObjects[_local1].parent))){
courseObjects[_local1].parent.removeChild(courseObjects[_local1]);
};
_local1++;
};
_local1 = 0;
while (_local1 < bgObjects.length) {
if (((bgObjects[_local1]) && (bgObjects[_local1].parent))){
bgObjects[_local1].parent.removeChild(bgObjects[_local1]);
};
_local1++;
};
allBirdies = [];
courseObjects = [];
bgObjects = [];
bgObjects2 = [];
if (((bgObjectsContainer2) && (bgObjectsContainer2.parent))){
bgObjectsContainer2.parent.removeChild(bgObjectsContainer2);
};
bgObjectsContainer2 = null;
if (((bgObjectsContainer) && (bgObjectsContainer.parent))){
bgObjectsContainer.parent.removeChild(bgObjectsContainer);
};
bgObjectsContainer = null;
if (((behindObjectsContainer) && (behindObjectsContainer.parent))){
behindObjectsContainer.parent.removeChild(behindObjectsContainer);
};
behindObjectsContainer = null;
if (((endLine) && (endLine.parent))){
endLine.parent.removeChild(endLine);
};
endLine = null;
if (((photoBitmap) && (photoBitmap.parent))){
Controller.root.photoContainer.photoContainer.removeChild(photoBitmap);
};
photoBitmap = null;
photoBitmapData = null;
Controller.root.photoContainer.gotoAndStop(1);
gameContainer = null;
}
override public function update(){
var _local1:Number = getTime();
var _local2:Number = (_local1 - lastFrameStartTime);
if ((((_local2 < idealFrameTime)) || ((lastFrameStartTime == 0)))){
timeFactor = 1;
} else {
timeFactor = (_local2 / idealFrameTime);
};
if (timeFactor > 2){
timeFactor = 2;
};
lastFrameStartTime = _local1;
fps = Math.round((1000 / _local2));
var _local3 = 1;
if (noHumanPlayersLeft()){
_local3 = 3;
if (Controller.root.FFlogo.currentFrame != 2){
Controller.root.FFlogo.gotoAndStop(2);
};
} else {
Controller.root.FFlogo.gotoAndStop(1);
};
var _local4:int;
while (_local4 < _local3) {
mainUpdate();
_local4++;
};
ScreenShaker.update();
}
public function noHumanPlayersLeft():Boolean{
if (raceOver){
return (false);
};
var _local1:Boolean;
var _local2:int;
while (_local2 < 4) {
if (((!(TournamentStanding.aiPlayer[(allBirdies[_local2].lane - 1)])) && (!((allBirdies[_local2].state == BigBird.OUT))))){
_local1 = false;
};
_local2++;
};
return (_local1);
}
override public function nextLevel(){
var _local2:int;
stopGame();
raceType++;
var _local1:int = TournamentStanding.findBestHumanPoints();
if (raceType <= CourseConfig.FLUTTER){
(this as Main).resetLevel();
} else {
if (level.value < Config.NUMBEROFLEVELS){
locationRecord = CourseRecordData.updateLocationRecord();
raceType = CourseConfig.HURDLES;
levelUnlocked = false;
_local2 = level.value;
level.addValue(1);
if (((!(TournamentStanding.fullTournament)) && ((_local1 >= CourseConfig.POINTSTOUNLOCK[(_local2 - 1)])))){
Controller.unlockLevel(level.value);
levelUnlocked = true;
};
if (TournamentStanding.fullTournament){
(this as Main).resetLevel();
} else {
Controller.gameComplete();
};
} else {
locationRecord = CourseRecordData.updateLocationRecord();
if (((!(TournamentStanding.fullTournament)) && ((_local1 >= CourseConfig.POINTSTOUNLOCK[2])))){
Controller.unlockLevel(4);
levelUnlocked = true;
};
level.addValue(1);
Controller.gameComplete();
};
};
}
public function addInitalBGObjects(){
var _local1:MovieClip;
var _local2:int;
var _local3:MovieClip;
if (level.value == 3){
_local1 = new IceBGDetail();
_local1.y = (CourseConfig.LANEYPOS[0] - 50);
_local1.x = -200;
_local1.gotoAndStop(1);
bgObjects.push(_local1);
behindObjectsContainer.addChild(_local1);
timeSinceLastBGObject = 0;
} else {
if (level.value == 2){
_local1 = new JungleBGDetail();
_local1.y = (CourseConfig.LANEYPOS[0] - 50);
_local1.x = -200;
_local1.gotoAndStop(1);
bgObjects.push(_local1);
behindObjectsContainer.addChild(_local1);
timeSinceLastBGObject = 0;
} else {
if (level.value == 1){
_local1 = new DesertBGDetail2();
_local1.y = (CourseConfig.LANEYPOS[0] - 50);
_local1.x = -200;
_local1.gotoAndStop(1);
bgObjects.push(_local1);
behindObjectsContainer.addChild(_local1);
timeSinceLastBGObject = 0;
} else {
_local2 = -1;
while (_local2 < 2) {
_local3 = new DesertBGDetail();
_local3.y = ((CourseConfig.LANEYPOS[0] - 10) - Math.floor((Math.random() * 20)));
_local3.x = ((_local2 * 350) + (Math.random() * 50));
_local3.gotoAndStop((Math.floor((Math.random() * _local3.totalFrames)) + 1));
bgObjects.push(_local3);
behindObjectsContainer.addChild(_local3);
timeSinceLastBGObject = 0;
_local2++;
};
};
};
};
}
public function updateCourse(){
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:MovieClip;
if ((((raceType == CourseConfig.HURDLES)) || ((raceType == CourseConfig.FLUTTER)))){
_local1 = (courseObjects.length - 1);
while (_local1 >= 0) {
courseObjects[_local1].x = (courseObjects[_local1].x - pixelsToMoveCourseThisFrame);
if (courseObjects[_local1].x < (-500 - courseObjects[_local1].getBounds(courseObjects[_local1]).right)){
if (courseObjects[_local1].parent){
courseObjects[_local1].parent.removeChild(courseObjects[_local1]);
};
courseObjects.splice(_local1, 1);
} else {
_local2 = 0;
while (_local2 < 4) {
if ((((courseObjects[_local1].lane == allBirdies[_local2].lane)) && (courseObjects[_local1].mainArea.hitTestObject(allBirdies[_local2])))){
allBirdies[_local2].collide(courseObjects[_local1]);
};
_local2++;
};
};
_local1--;
};
CourseConfig.TIMESINCELASTJUMP = (CourseConfig.TIMESINCELASTJUMP + pixelsToMoveCourseThisFrame);
if ((((CourseConfig.TIMESINCELASTJUMP > CourseConfig.MINTIMEBETWEENJUMPS)) && ((frontBirdPos < (CourseConfig.COURSELENGTH - (CourseConfig.MINTIMEBETWEENJUMPS + 600)))))){
if (Math.random() > 0.8){
CourseConfig.TIMESINCELASTJUMP = -((Math.random() * 150));
_local3 = (Math.floor((Math.random() * 6)) + 1);
if ((((((level.value > 1)) && ((_local3 == 3)))) || ((_local3 == 6)))){
CourseConfig.TIMESINCELASTJUMP = (CourseConfig.TIMESINCELASTJUMP - 300);
};
_local1 = 3;
while (_local1 >= 0) {
if (raceType == CourseConfig.FLUTTER){
if (level.value == 1){
_local4 = new DesertHoles();
} else {
if (level.value == 2){
_local4 = new JungleHoles();
} else {
_local4 = new IceHoles();
};
};
} else {
if (level.value == 1){
_local4 = new AllFences();
} else {
if (level.value == 2){
_local4 = new JungleFences();
} else {
_local4 = new IceFences();
};
};
};
_local4.y = CourseConfig.LANEYPOS[_local1];
_local4.x = 975;
_local4.gotoAndStop(_local3);
_local4.lane = (_local1 + 1);
if (_local1 > 0){
_local4.visible = false;
};
courseObjects.push(_local4);
gameContainer.addChildAt(_local4, 4);
_local1--;
};
};
};
};
trackNShadows.trackStrip.x = (trackNShadows.trackStrip.x - pixelsToMoveCourseThisFrame);
if (trackNShadows.trackStrip.x < -650){
trackNShadows.trackStrip.x = (trackNShadows.trackStrip.x + 650);
};
}
override public function resetGame(){
super.resetGame();
raceType = CourseConfig.HURDLES;
TournamentStanding.resetTournament();
}
public function mainUpdate(){
if (raceOver){
raceOverCountDown--;
if (raceOverCountDown <= 0){
stopGame();
levelComplete();
};
return;
};
var _local1:int = Math.floor((raceTime * (1000 / 30)));
var _local2:int = Math.floor((_local1 / 1000));
var _local3:int = Math.floor((((_local1 / 1000) - _local2) * 100));
var _local4 = "00";
if (_local3 < 10){
_local4 = ("0" + String(_local3));
} else {
_local4 = String(_local3);
};
Controller.root.raceTime.text = ((String(_local2) + ".") + _local4);
Controller.root.recordTime.text = ("wr " + String(CourseRecordData.COURSERECORDS[(level.value - 1)][(raceType - 1)].toFixed(2)));
if (((!(GamePanel.panelOpen)) && (!(raceStarted)))){
slowZoomOut();
if (startCountDown.currentFrame == 1){
startCountDown.gotoAndPlay(2);
};
};
Commentary.update();
if (((GamePanel.panelOpen) || (!(raceStarted)))){
return;
};
updateBirds();
updateCourse();
if ((((endLine.x < 900)) && (!(endLine.parent)))){
gameContainer.addChildAt(endLine, 4);
};
if (pixelsToMoveCourseThisFrame > 0){
raceTime++;
};
updateBGObjects();
updateBGObjects2();
}
public function stopBirdChooser(_arg1:Event){
if (birdChooserActive){
Controller.root.removeEventListener(Event.ENTER_FRAME, updateBirdChooser);
birdChooserActive = false;
};
}
public function photoFinish(_arg1:Boolean=false){
var _local5:int;
photoBitmapData = new BitmapData(650, 550);
photoBitmapData.draw(Controller.root.bgContainer, new Matrix(Controller.root.bgContainer.scaleX, 0, 0, Controller.root.bgContainer.scaleX, 325, 275), null, null, null, true);
photoBitmapData.draw(Controller.root.gameContainer, new Matrix(Controller.root.gameContainer.scaleX, 0, 0, Controller.root.gameContainer.scaleX, 0, 0), null, null, null, true);
photoBitmap = new Bitmap(photoBitmapData);
Controller.root.photoContainer.photoContainer.addChild(photoBitmap);
Controller.root.photoContainer.play();
raceOver = true;
raceOverCountDown = 60;
var _local2:Array = [];
var _local3:int;
while (_local3 < 4) {
if (allBirdies[_local3].state != BigBird.OUT){
_local2.push(allBirdies[_local3]);
};
_local3++;
};
if (_local2.length > 0){
_local2.sortOn("courseXPos", (Array.DESCENDING | Array.NUMERIC));
};
var _local4:int = (_local2.length - 1);
while (_local4 >= 0) {
_local5 = 0;
if (_local4 > 0){
_local5 = (_local2[0].courseXPos - _local2[_local4].courseXPos);
_local5 = (_local5 * 2);
};
TournamentStanding.birdFinished(_local2[_local4].lane, (Math.floor((raceTime * (1000 / 30))) + Math.floor(_local5)));
_local4--;
};
TournamentStanding.raceOver();
raceRecord = CourseRecordData.updateRecords();
if (!_arg1){
if ((((_local2.length > 1)) && (((_local2[0].courseXPos - _local2[1].courseXPos) <= 20)))){
SoundController.playSound("photofinish");
} else {
Commentary.playComment("wins", _local2[0].lane);
};
};
SoundController.playSound("camerasound");
}
public function updateBGObjects(){
var _local1:int = (bgObjects.length - 1);
while (_local1 >= 0) {
if (level.value >= 1){
if (bgObjects[_local1].special){
bgObjects[_local1].x = (bgObjects[_local1].x - pixelsToMoveCourseThisFrame);
} else {
bgObjects[_local1].x = (bgObjects[_local1].x - (pixelsToMoveCourseThisFrame / 10));
};
} else {
if (bgObjects[_local1].special){
bgObjects[_local1].x = (bgObjects[_local1].x - pixelsToMoveCourseThisFrame);
} else {
bgObjects[_local1].x = (bgObjects[_local1].x - (pixelsToMoveCourseThisFrame / 2));
};
if (bgObjects[_local1].x < (-500 - bgObjects[_local1].getBounds(bgObjects[_local1]).right)){
if (bgObjects[_local1].parent){
bgObjects[_local1].parent.removeChild(bgObjects[_local1]);
};
bgObjects.splice(_local1, 1);
};
};
_local1--;
};
}
public function birdsChosen(){
Controller.root.removeEventListener(Event.ENTER_FRAME, updateBirdChooser);
birdChooserActive = false;
Controller.transitioner.goto("levelSelect");
}
public function addNewBGObject2(){
var _local1:MovieClip = new DesertBGDetail();
_local1.y = ((CourseConfig.LANEYPOS[0] - 120) - Math.floor((Math.random() * 40)));
_local1.x = 975;
_local1.scaleX = (_local1.scaleY = 0.5);
_local1.gotoAndStop((Math.floor((Math.random() * _local1.totalFrames)) + 1));
bgObjects2.push(_local1);
bgObjectsContainer2.addChild(_local1);
timeSinceLastBGObject2 = -(_local1.width);
}
public static function startRace(){
raceStarted = true;
var _local1:int;
while (_local1 < 4) {
Controller.main.allBirdies[_local1].bird.play();
_local1++;
};
}
}
}//package com.ussgames.birdRacing
Section 109
//Commentary (com.ussgames.birdRacing.Commentary)
package com.ussgames.birdRacing {
import com.ussgames.sound.*;
public class Commentary {
public static const MINFRAMESBETWEENCOMMENTS:int = 45;
public static const birdSoundPrefixes:Array = ["brain", "dolly", "bath", "poo"];
public static const MINREPEATTIME:int = 60;
public static var commentaryDelay:int = 0;
public static var lastComment:String = "";
public static var repeatDelay:int = 0;
public static function playComment(_arg1:String, _arg2:int){
if (commentaryDelay <= 0){
if ((((repeatDelay > 0)) && ((_arg1 == lastComment)))){
return;
};
if (_arg1 == "ohno"){
if (Math.random() < 0.5){
SoundController.playSound("ohno");
} else {
SoundController.playSound((birdSoundPrefixes[(_arg2 - 1)] + "out"));
};
} else {
SoundController.playSound((birdSoundPrefixes[(_arg2 - 1)] + _arg1));
};
commentaryDelay = MINFRAMESBETWEENCOMMENTS;
repeatDelay = MINREPEATTIME;
lastComment = _arg1;
};
}
public static function startRaceComment(){
if (Math.random() < 0.5){
SoundController.playSound("theyareoff");
} else {
SoundController.playSound("raceunderway");
};
commentaryDelay = MINFRAMESBETWEENCOMMENTS;
repeatDelay = 0;
lastComment = "start";
}
public static function update(){
if (commentaryDelay > 0){
commentaryDelay--;
};
if (repeatDelay > 0){
repeatDelay--;
};
}
}
}//package com.ussgames.birdRacing
Section 110
//ConfettiEffect (com.ussgames.birdRacing.ConfettiEffect)
package com.ussgames.birdRacing {
import flash.display.*;
import flash.events.*;
public class ConfettiEffect extends MovieClip {
public var confettiBits:Array;
public static const FALLSPEED:int = 3;
public static const NUMCONFETTI:int = 40;
public function ConfettiEffect(){
confettiBits = new Array();
super();
}
public function init(){
var _local2:MovieClip;
confettiBits = new Array();
var _local1:int;
while (_local1 < NUMCONFETTI) {
_local2 = new AllConfetti();
_local2.rotation = (Math.random() * 360);
_local2.x = (Math.random() * 650);
_local2.y = -((Math.random() * 550));
_local2.scaleX = (_local2.scaleY = (1 + (Math.random() * 0.2)));
_local2.gotoAndStop((Math.floor((Math.random() * 4)) + 1));
_local2.extraYSpeed = (Math.random() * 2);
addChild(_local2);
confettiBits.push(_local2);
_local1++;
};
this.addEventListener(Event.ENTER_FRAME, update);
this.addEventListener(Event.REMOVED_FROM_STAGE, stopConfetti);
}
public function update(_arg1:Event){
var _local2:int;
while (_local2 < NUMCONFETTI) {
confettiBits[_local2].y = (confettiBits[_local2].y + (FALLSPEED + confettiBits[_local2].extraYSpeed));
if (confettiBits[_local2].y > 600){
confettiBits[_local2].y = (confettiBits[_local2].y - 600);
confettiBits[_local2].rotation = (Math.random() * 360);
confettiBits[_local2].x = (Math.random() * 650);
confettiBits[_local2].scaleX = (confettiBits[_local2].scaleY = (1 + (Math.random() * 0.2)));
confettiBits[_local2].extraYSpeed = (Math.random() * 2);
confettiBits[_local2].gotoAndStop((Math.floor((Math.random() * 4)) + 1));
};
_local2++;
};
}
public function stopConfetti(_arg1:Event){
this.removeEventListener(Event.ENTER_FRAME, update);
}
}
}//package com.ussgames.birdRacing
Section 111
//ConfettiEffect2 (com.ussgames.birdRacing.ConfettiEffect2)
package com.ussgames.birdRacing {
import flash.display.*;
import flash.events.*;
public class ConfettiEffect2 extends MovieClip {
public var confettiBits:Array;
public static const FALLSPEED:int = 2;
public static const NUMCONFETTI:int = 80;
public function ConfettiEffect2(){
confettiBits = new Array();
super();
}
public function init(){
var _local2:MovieClip;
confettiBits = new Array();
var _local1:int;
while (_local1 < NUMCONFETTI) {
_local2 = new AllConfetti();
_local2.rotation = (Math.random() * 360);
_local2.x = (Math.random() * 650);
_local2.y = -((Math.random() * 550));
_local2.scaleX = (_local2.scaleY = (0.4 + (Math.random() * 0.2)));
_local2.gotoAndStop((Math.floor((Math.random() * 4)) + 1));
_local2.extraYSpeed = Math.random();
addChild(_local2);
confettiBits.push(_local2);
_local1++;
};
this.addEventListener(Event.ENTER_FRAME, update);
this.addEventListener(Event.REMOVED_FROM_STAGE, stopConfetti);
}
public function update(_arg1:Event){
var _local2:int;
while (_local2 < NUMCONFETTI) {
confettiBits[_local2].y = (confettiBits[_local2].y + (FALLSPEED + confettiBits[_local2].extraYSpeed));
if (confettiBits[_local2].y > 600){
confettiBits[_local2].y = (confettiBits[_local2].y - 600);
confettiBits[_local2].rotation = (Math.random() * 360);
confettiBits[_local2].x = (Math.random() * 650);
confettiBits[_local2].scaleX = (confettiBits[_local2].scaleY = (0.4 + (Math.random() * 0.2)));
confettiBits[_local2].extraYSpeed = Math.random();
confettiBits[_local2].gotoAndStop((Math.floor((Math.random() * 4)) + 1));
};
_local2++;
};
}
public function stopConfetti(_arg1:Event){
this.removeEventListener(Event.ENTER_FRAME, update);
}
}
}//package com.ussgames.birdRacing
Section 112
//CourseConfig (com.ussgames.birdRacing.CourseConfig)
package com.ussgames.birdRacing {
public class CourseConfig {
public static const LANEWIDTH:int = 69;
public static const JUNGLELENGTHSK:Array = [1.33, 1, 1.33];
public static const DESERTLENGTHS:Array = [15000, 7500, 15000];
public static const FLUTTER:int = 3;
public static const POINTSTOUNLOCK:Array = [10, 15, 21];
public static const JUNGLELENGTHS:Array = [20000, 15000, 20000];
public static const ALLCOURSELENGTHS:Array = [DESERTLENGTHS, JUNGLELENGTHS, ICELENGTHS];
public static const DESERTLENGTHSK:Array = [1, 0.5, 1];
public static const ALLCOURSELENGTHSK:Array = [DESERTLENGTHSK, JUNGLELENGTHSK, ICELENGTHSK];
public static const HURDLES:int = 1;
public static const SPRINT:int = 2;
public static const LANEYPOS:Array = [200, 269, 338, 407];
public static const ICELENGTHS:Array = [30000, 20000, 30000];
public static const COURSENAMES:Array = ["Crispy Chicken Chase", "Parrot Persuit", "Frozen Turkey Rally"];
public static const ICELENGTHSK:Array = [2, 1.33, 2];
public static var COURSELENGTH:int = 10000;
public static var TIMESINCELASTJUMP:Number = 0;
public static var MINTIMEBETWEENJUMPS:Number = 750;
}
}//package com.ussgames.birdRacing
Section 113
//CourseRecordData (com.ussgames.birdRacing.CourseRecordData)
package com.ussgames.birdRacing {
import com.ussgames.game.*;
public class CourseRecordData {
public static var COURSERECORDS:Array = [[99.99, 99.99, 99.99], [99.99, 99.99, 99.99], [99.99, 99.99, 99.99]];
public static var LOCATIONRECORDS:Array = [999.99, 999.99, 999.99, 999.99];
public static function loadRecordsFromSO(){
if (Controller.sharedObjectData.courseRecords){
COURSERECORDS = Controller.sharedObjectData.courseRecords;
};
if (Controller.sharedObjectData.locationRecords){
LOCATIONRECORDS = Controller.sharedObjectData.locationRecords;
};
}
public static function convertMillisToSecs(_arg1:Number):Number{
var _local2:int = _arg1;
var _local3:int = Math.floor((_local2 / 1000));
var _local4:int = Math.floor((((_local2 / 1000) - _local3) * 100));
var _local5:Number = (_local3 + (_local4 / 100));
return (_local5);
}
public static function updateRecords():int{
var _local3:Number;
var _local4:Number;
var _local1 = -1;
var _local2:int;
while (_local2 < 4) {
if (!TournamentStanding.aiPlayer[(TournamentStanding.lastRace[_local2] - 1)]){
_local3 = TournamentStanding.raceTime[_local2];
_local4 = convertMillisToSecs(_local3);
if (_local4 < COURSERECORDS[(Controller.main.level.value - 1)][(BirdRacingMain.raceType - 1)]){
COURSERECORDS[(Controller.main.level.value - 1)][(BirdRacingMain.raceType - 1)] = _local4;
_local1 = (4 - _local2);
};
};
_local2++;
};
saveRecordsToSO();
return (_local1);
}
public static function saveRecordsToSO(){
Controller.sharedObjectData.courseRecords = COURSERECORDS;
Controller.sharedObjectData.locationRecords = LOCATIONRECORDS;
Controller.saveSharedObject();
}
public static function updateLocationRecord():int{
var _local2:int;
var _local3:Number;
var _local4:Number;
var _local1 = -1;
if (((!(TournamentStanding.fullTournament)) || (((TournamentStanding.fullTournament) && ((Controller.main.level.value == Config.NUMBEROFLEVELS)))))){
_local2 = 0;
while (_local2 < 4) {
if (!TournamentStanding.aiPlayer[(TournamentStanding.totalPoints[_local2].lane - 1)]){
_local3 = TournamentStanding.totalPoints[_local2].time;
_local4 = convertMillisToSecs(_local3);
if (!TournamentStanding.fullTournament){
if (_local4 < LOCATIONRECORDS[(Controller.main.level.value - 1)]){
LOCATIONRECORDS[(Controller.main.level.value - 1)] = _local4;
_local1 = _local2;
};
} else {
if (_local4 < LOCATIONRECORDS[3]){
LOCATIONRECORDS[3] = _local4;
_local1 = _local2;
};
};
};
_local2++;
};
saveRecordsToSO();
};
return (_local1);
}
}
}//package com.ussgames.birdRacing
Section 114
//GameConfig (com.ussgames.birdRacing.GameConfig)
package com.ussgames.birdRacing {
public class GameConfig {
public static const TERMINALVELOCITY:Number = 10;
public static const GRAVITY:Number = 0.5;
}
}//package com.ussgames.birdRacing
Section 115
//JumpTypesConfig (com.ussgames.birdRacing.JumpTypesConfig)
package com.ussgames.birdRacing {
public class JumpTypesConfig {
public static const ICEJUMPS:Array = [HEDGE, SOLID, HEDGE, SOLID, SOLID, SOLID];
public static const JUMPTYPES:Array = [ALLJUMPS, JUNGLEJUMPS, ICEJUMPS];
public static const HEDGE:int = 1;
public static const SOLIDWATER:int = 4;
public static const JUNGLEJUMPS:Array = [HEDGE, SOLID, SOLID, SOLID, HEDGE, SOLID];
public static const WIDEHEDGE:int = 5;
public static const HEDGEWATER:int = 3;
public static const SOLID:int = 2;
public static const ALLJUMPS:Array = [HEDGE, SOLID, HEDGE, SOLID, HEDGE, SOLID];
public static const HEDGELONGWATER:int = 6;
}
}//package com.ussgames.birdRacing
Section 116
//TournamentStanding (com.ussgames.birdRacing.TournamentStanding)
package com.ussgames.birdRacing {
public class TournamentStanding {
public static var lastRace:Array;
public static var aiPlayer:Array = [true, true, true, true];
public static var defaultTime:int = 100000;
public static var totalPoints:Array;
public static var fullTournament:Boolean = false;
public static var pointsForPlaces:Array = [10, 7, 3, 0];
public static var raceTime:Array;
public static function raceOver(){
var _local2:int;
var _local1:int;
while (_local1 < 4) {
_local2 = 0;
while (_local2 < 4) {
if (totalPoints[_local1].lane == lastRace[_local2]){
totalPoints[_local1].points = (totalPoints[_local1].points + pointsForPlaces[(3 - _local2)]);
totalPoints[_local1].time = (totalPoints[_local1].time + raceTime[_local2]);
};
_local2++;
};
_local1++;
};
totalPoints.sortOn("points", (Array.NUMERIC | Array.DESCENDING));
}
public static function resetRaceStats(){
lastRace = new Array();
raceTime = new Array();
}
public static function resetPlayers(){
aiPlayer = [true, true, true, true];
}
public static function birdFinished(_arg1:int, _arg2:int){
lastRace.push(_arg1);
raceTime.push(_arg2);
}
public static function birdOut(_arg1:int){
lastRace.push(_arg1);
raceTime.push(defaultTime);
}
public static function findBestHumanPoints():int{
var _local1:int;
var _local2:int;
while (_local2 < 4) {
if (!aiPlayer[(totalPoints[_local2].lane - 1)]){
if (totalPoints[_local2].points > _local1){
_local1 = totalPoints[_local2].points;
};
};
_local2++;
};
return (_local1);
}
public static function getNumberOfPlayers():int{
var _local1:int;
var _local2:int;
while (_local2 < 4) {
if (!aiPlayer[_local2]){
_local1++;
};
_local2++;
};
return (_local1);
}
public static function resetTournament(){
lastRace = new Array();
raceTime = new Array();
totalPoints = [{lane:1, points:0, time:0}, {lane:2, points:0, time:0}, {lane:3, points:0, time:0}, {lane:4, points:0, time:0}];
fullTournament = false;
}
}
}//package com.ussgames.birdRacing
Section 117
//ClosePanelButton (com.ussgames.buttons.ClosePanelButton)
package com.ussgames.buttons {
import com.ussgames.game.*;
public class ClosePanelButton extends SimpleButton {
override public function init(){
allowKeyActivation = true;
super.init();
}
override public function buttonAction(){
Main.inGamePanel.closePanel();
}
}
}//package com.ussgames.buttons
Section 118
//CreditsButton (com.ussgames.buttons.CreditsButton)
package com.ussgames.buttons {
import com.ussgames.game.*;
public class CreditsButton extends SimpleButton {
override public function buttonAction(){
Controller.transitioner.goto("credits");
}
}
}//package com.ussgames.buttons
Section 119
//FunflowLockButton (com.ussgames.buttons.FunflowLockButton)
package com.ussgames.buttons {
import com.ussgames.game.*;
public class FunflowLockButton extends SimpleButton {
override public function buttonAction(){
Controller.ff_openBannedLink();
}
}
}//package com.ussgames.buttons
Section 120
//FunflowMenuLogoButton (com.ussgames.buttons.FunflowMenuLogoButton)
package com.ussgames.buttons {
import com.ussgames.game.*;
public class FunflowMenuLogoButton extends SimpleButton {
override public function buttonAction(){
Controller.ff_funflowLink();
}
}
}//package com.ussgames.buttons
Section 121
//FunflowSplashLogoButton (com.ussgames.buttons.FunflowSplashLogoButton)
package com.ussgames.buttons {
import com.ussgames.game.*;
public class FunflowSplashLogoButton extends SimpleButton {
override public function buttonAction(){
Controller.ff_funflowBigLink();
}
}
}//package com.ussgames.buttons
Section 122
//HelpButton (com.ussgames.buttons.HelpButton)
package com.ussgames.buttons {
import com.ussgames.game.*;
public class HelpButton extends SimpleButton {
override public function buttonAction(){
Controller.showGameHelp();
}
}
}//package com.ussgames.buttons
Section 123
//HelpButton_Next (com.ussgames.buttons.HelpButton_Next)
package com.ussgames.buttons {
import flash.display.*;
public class HelpButton_Next extends SimpleButton {
override public function buttonAction(){
if (parent){
(parent as MovieClip).nextFrame();
};
}
}
}//package com.ussgames.buttons
Section 124
//HelpButton_Prev (com.ussgames.buttons.HelpButton_Prev)
package com.ussgames.buttons {
import flash.display.*;
public class HelpButton_Prev extends SimpleButton {
override public function buttonAction(){
if (parent){
(parent as MovieClip).prevFrame();
};
}
}
}//package com.ussgames.buttons
Section 125
//HelpButtonInGame (com.ussgames.buttons.HelpButtonInGame)
package com.ussgames.buttons {
import com.ussgames.game.*;
public class HelpButtonInGame extends SimpleButton {
override public function buttonAction(){
Main.inGameHelp();
}
}
}//package com.ussgames.buttons
Section 126
//InviteFriendsButton (com.ussgames.buttons.InviteFriendsButton)
package com.ussgames.buttons {
import com.ussgames.game.*;
public class InviteFriendsButton extends SimpleButton {
override public function buttonAction(){
Controller.ff_inviteFriends();
}
}
}//package com.ussgames.buttons
Section 127
//LevelSelectButton (com.ussgames.buttons.LevelSelectButton)
package com.ussgames.buttons {
import flash.display.*;
import flash.events.*;
import com.ussgames.game.*;
import com.ussgames.birdRacing.*;
import com.ussgames.sound.*;
public class LevelSelectButton extends SimpleButton {
public var level:int;// = 1
public var locker:MovieClip;
public var levelBG:MovieClip;
override public function init(){
this.level = int(this.name.substring(1));
this["levelBG"].gotoAndStop(this.level);
if (Controller.isLevelUnlocked(this.level)){
this.buttonMode = true;
this.useHandCursor = (this.enabled = this.unlocked);
this.addEventListener(MouseEvent.MOUSE_OVER, over, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_OUT, out, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_DOWN, down, false, 0, true);
this.addEventListener(MouseEvent.CLICK, click, false, 0, true);
} else {
this["locker"].gotoAndStop(this.level);
gotoAndStop("locked");
};
}
override public function buttonAction(){
SoundController.playSound("selectblip");
if (level < 4){
TournamentStanding.fullTournament = false;
Controller.selectLevel(level);
} else {
TournamentStanding.fullTournament = true;
Controller.selectLevel(1);
};
}
}
}//package com.ussgames.buttons
Section 128
//MenuButton (com.ussgames.buttons.MenuButton)
package com.ussgames.buttons {
import com.ussgames.game.*;
public class MenuButton extends SimpleButton {
override public function init(){
super.init();
}
override public function buttonAction(){
Controller.showMainMenu();
}
}
}//package com.ussgames.buttons
Section 129
//MenuButtonInGame (com.ussgames.buttons.MenuButtonInGame)
package com.ussgames.buttons {
import com.ussgames.game.*;
public class MenuButtonInGame extends SimpleButton {
override public function buttonAction(){
Main.inGamePanel.closePanel(function (){
Controller.quitGame();
});
}
}
}//package com.ussgames.buttons
Section 130
//MoreGamesButton (com.ussgames.buttons.MoreGamesButton)
package com.ussgames.buttons {
import com.ussgames.game.*;
public class MoreGamesButton extends SimpleButton {
override public function buttonAction(){
Controller.ff_showMoreGames();
}
}
}//package com.ussgames.buttons
Section 131
//MusicButton (com.ussgames.buttons.MusicButton)
package com.ussgames.buttons {
import flash.display.*;
import com.ussgames.sound.*;
public class MusicButton extends SimpleButton {
public var onOffDisplay:MovieClip;
override public function init(){
super.init();
SoundController.musicButton = this;
update();
}
override public function buttonAction(){
SoundController.toggleMusic();
}
public function update(){
onOffDisplay.visible = !(SoundController.musicOn);
}
}
}//package com.ussgames.buttons
Section 132
//PauseButton (com.ussgames.buttons.PauseButton)
package com.ussgames.buttons {
import com.ussgames.game.*;
public class PauseButton extends SimpleButton {
override public function buttonAction(){
Main.pauseGame();
}
}
}//package com.ussgames.buttons
Section 133
//PlayAgainButton (com.ussgames.buttons.PlayAgainButton)
package com.ussgames.buttons {
import com.ussgames.game.*;
public class PlayAgainButton extends SimpleButton {
override public function init(){
super.init();
}
override public function buttonAction(){
Controller.transitioner.goto("levelSelect");
}
}
}//package com.ussgames.buttons
Section 134
//PlayButton (com.ussgames.buttons.PlayButton)
package com.ussgames.buttons {
import com.ussgames.game.*;
public class PlayButton extends SimpleButton {
override public function init(){
allowKeyActivation = true;
super.init();
}
override public function buttonAction(){
Controller.newGame();
}
}
}//package com.ussgames.buttons
Section 135
//PodgeLinkButton (com.ussgames.buttons.PodgeLinkButton)
package com.ussgames.buttons {
import flash.net.*;
public class PodgeLinkButton extends SimpleButton {
override public function buttonAction(){
try {
navigateToURL(new URLRequest("http://www.thepodge.co.uk/"));
} catch(e:Error) {
};
}
}
}//package com.ussgames.buttons
Section 136
//ScoresButton (com.ussgames.buttons.ScoresButton)
package com.ussgames.buttons {
import com.ussgames.game.*;
public class ScoresButton extends SimpleButton {
override public function buttonAction(){
Controller.ff_showScores();
}
}
}//package com.ussgames.buttons
Section 137
//SimpleButton (com.ussgames.buttons.SimpleButton)
package com.ussgames.buttons {
import flash.display.*;
import com.ussgames.general.*;
import flash.events.*;
import com.ussgames.game.*;
public class SimpleButton extends MovieClip {
var unlocked:Boolean;// = true
var allowKeyActivation:Boolean;// = false
public function SimpleButton(){
init();
}
public function down(_arg1:Event){
if (unlocked){
gotoAndStop("down");
};
}
public function disable(){
this.useHandCursor = (this.enabled = (this.unlocked = false));
}
public function enable(){
this.useHandCursor = (this.enabled = (this.unlocked = true));
}
public function out(_arg1:Event){
gotoAndStop("out");
}
public function click(_arg1:Event){
if (unlocked){
buttonAction();
};
}
public function init(){
this.buttonMode = true;
this.useHandCursor = (this.enabled = this.unlocked);
this.addEventListener(MouseEvent.MOUSE_OVER, over, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_OUT, out, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_DOWN, down, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_UP, over, false, 0, true);
this.addEventListener(MouseEvent.CLICK, click, false, 0, true);
if (allowKeyActivation){
this.addEventListener(Event.ADDED_TO_STAGE, addKeyListener);
this.addEventListener(Event.REMOVED_FROM_STAGE, removeKeyListener);
};
}
public function keyPressed(_arg1:Event){
if (Key.isDown(Key.SPACE)){
buttonAction();
};
}
public function over(_arg1:Event){
if (unlocked){
gotoAndStop("over");
};
}
public function removeKeyListener(_arg1:Event){
Controller.root.stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
}
public function buttonAction(){
}
public function addKeyListener(_arg1:Event){
this.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed, false, 0, true);
}
}
}//package com.ussgames.buttons
Section 138
//SoundButton (com.ussgames.buttons.SoundButton)
package com.ussgames.buttons {
import flash.display.*;
import com.ussgames.sound.*;
public class SoundButton extends SimpleButton {
public var onOffDisplay:MovieClip;
override public function init(){
super.init();
SoundController.soundButton = this;
update();
}
override public function buttonAction(){
SoundController.toggleSound();
SoundController.toggleMusic();
}
public function update(){
onOffDisplay.visible = !(SoundController.soundOn);
}
}
}//package com.ussgames.buttons
Section 139
//StartNowButton (com.ussgames.buttons.StartNowButton)
package com.ussgames.buttons {
import com.ussgames.game.*;
public class StartNowButton extends SimpleButton {
override public function init(){
allowKeyActivation = true;
super.init();
}
override public function buttonAction(){
Controller.main.birdsChosen();
}
}
}//package com.ussgames.buttons
Section 140
//SubmitButtonInGame (com.ussgames.buttons.SubmitButtonInGame)
package com.ussgames.buttons {
import com.ussgames.game.*;
public class SubmitButtonInGame extends SimpleButton {
override public function buttonAction(){
Main.inGamePanel.closePanel(function (){
Controller.transitioner.goto("submitScore");
});
}
}
}//package com.ussgames.buttons
Section 141
//KillButton (com.ussgames.frameworkTest.KillButton)
package com.ussgames.frameworkTest {
import com.ussgames.game.*;
import com.ussgames.buttons.*;
public class KillButton extends SimpleButton {
override public function buttonAction(){
Controller.main.loseLife();
}
}
}//package com.ussgames.frameworkTest
Section 142
//ScoreButton (com.ussgames.frameworkTest.ScoreButton)
package com.ussgames.frameworkTest {
import com.ussgames.game.*;
import com.ussgames.buttons.*;
public class ScoreButton extends SimpleButton {
override public function buttonAction(){
Controller.main.score.addValue(1);
}
}
}//package com.ussgames.frameworkTest
Section 143
//Config (com.ussgames.game.Config)
package com.ussgames.game {
public class Config {
public static var RESETLIVESEVERYLEVEL:Boolean = true;
public static var STARTLIVES:int = 3;
public static var SONAME:String = "bigbirdracing_podge_sharedobject";
public static var NUMBEROFLEVELS:int = 3;
}
}//package com.ussgames.game
Section 144
//Controller (com.ussgames.game.Controller)
package com.ussgames.game {
import flash.display.*;
import com.ussgames.general.*;
import flash.events.*;
import flash.net.*;
import com.ussgames.birdRacing.*;
import com.ussgames.sound.*;
import com.midasplayer.*;
public class Controller {
public static var main;
public static var transitioner:Transitioner;
public static var loggedIn:Boolean = false;
public static var sharedObjectData:Object;
public static var fbName:String = "";
public static var root:MovieClip;
public static var challengeData:Object = null;
public static function ff_openBannedLink(){
FunflowAPI.openOfflineProtectionLink();
}
public static function ff_funflowLink(){
FunflowAPI.openSignLink();
}
public static function startLevel(){
main.initGame();
Main.inGamePanel.openPanel("levelstart");
startGame();
}
public static function loadSharedObject(){
var _local2:int;
var _local1:SharedObject = SharedObject.getLocal(Config.SONAME);
if (_local1.data.gameData != undefined){
sharedObjectData = _local1.data.gameData;
SoundController.soundOn = sharedObjectData.soundOn;
SoundController.musicOn = sharedObjectData.musicOn;
} else {
sharedObjectData = new Object();
sharedObjectData.soundOn = true;
sharedObjectData.musicOn = true;
sharedObjectData.levelsUnlocked = new Array();
sharedObjectData.levelsUnlocked[0] = true;
_local2 = 1;
while (_local2 < Config.NUMBEROFLEVELS) {
sharedObjectData.levelsUnlocked[_local2] = false;
_local2++;
};
saveSharedObject();
};
}
public static function unlockAllLevels(){
var _local1 = 1;
while (_local1 <= 4) {
sharedObjectData.levelsUnlocked[(_local1 - 1)] = true;
_local1++;
};
saveSharedObject();
}
public static function ff_inviteFriends(){
FunflowAPI.openInviteDialog();
unlockAllLevels();
}
public static function init(_arg1:MovieClip, _arg2, _arg3:Transitioner){
root = _arg1;
main = _arg2;
transitioner = _arg3;
Key.initialize(root.stage);
Transitioner.setRoot(_arg1);
if (sharedObjectData == null){
loadSharedObject();
SoundController.updateSoundButtons();
};
}
public static function challengeBeat(_arg1:Number, _arg2:String):Boolean{
if (challengeData != null){
if ((((challengeData.friendTournament == _arg2)) && ((_arg1 < Number(challengeData.friendTime))))){
return (true);
};
};
return (false);
}
public static function gameComplete(){
stopGame();
transitioner.goto("complete", function (){
main.cleanUp();
});
ff_submitScore(TournamentStanding.findBestHumanPoints());
}
public static function ff_funflowBigLink(){
FunflowAPI.openLoaderMovieLink();
}
public static function stopGame(){
main.stopGame();
}
public static function showMainMenu(){
transitioner.goto("menu");
}
public static function ff_initialized(_arg1:Event){
var _local2:FunflowUser = FunflowAPI.currentUser;
if (_local2 != null){
fbName = _local2.name;
loggedIn = true;
};
challengeData = new Object();
if (root.loaderInfo.parameters.challenge === true){
challengeData.friendName = root.loaderInfo.parameters.friendName;
challengeData.friendTime = root.loaderInfo.parameters.friendTime;
challengeData.friendTournament = root.loaderInfo.parameters.friendTournament;
} else {
challengeData = null;
};
root.nextFrame();
}
public static function saveSoundSettings(){
sharedObjectData.soundOn = SoundController.soundOn;
sharedObjectData.musicOn = SoundController.musicOn;
saveSharedObject();
}
public static function initSound(_arg1:MovieClip=null, _arg2:MovieClip=null){
SoundController.init(_arg1, _arg2);
}
public static function unlockLevel(_arg1:int){
sharedObjectData.levelsUnlocked[(_arg1 - 1)] = true;
saveSharedObject();
}
public static function quitGame(){
stopGame();
Main.gamePaused = false;
transitioner.goto("menu", function (){
main.cleanUp();
});
}
public static function initFunFlow(){
FunflowAPI.addEventListener(FunflowAPI.INITIALIZED_EVENT, ff_initialized);
FunflowAPI.addEventListener(FunflowAPI.HOST_BANNED_EVENT, ff_banned);
FunflowAPI.init("big-bird-racing", root.loaderInfo);
}
public static function saveSharedObject(){
var _local1:SharedObject = SharedObject.getLocal(Config.SONAME);
_local1.data.gameData = sharedObjectData;
_local1.flush();
}
public static function ff_banned(_arg1:Event){
root.url_locker.alpha = 1;
root.url_locker.gotoAndStop(2);
}
public static function ff_showScores(){
FunflowAPI.openHighscoresLink();
}
public static function selectLevel(_arg1:int=1){
main.level.setValue(_arg1);
transitioner.goto("theGame");
}
public static function showGameHelp(){
transitioner.goto("help");
}
public static function newGame(){
transitioner.goto("characterSelect");
main.resetGame();
}
public static function ff_submitScore(_arg1:int){
FunflowAPI.submitScore(_arg1);
}
public static function startGame(){
main.startGame();
}
public static function getLevelNumber():int{
return (main.level.value);
}
public static function ff_submitAchievement(_arg1:String, _arg2:String, _arg3:String, _arg4:Boolean=false, _arg5:String="", _arg6:Object=null){
var _local7:Array;
FunflowAPI.submitAchievement(_arg3);
if (loggedIn){
_local7 = _arg1.split("{0}");
if (_local7.length > 1){
_arg1 = _local7.join(fbName);
};
_local7 = _arg1.split("{1}");
if (_local7.length > 1){
_arg1 = _local7.join("Big Bird Racing");
};
if (_arg4){
_arg1 = (_arg1 + (" " + _arg5));
FunflowAPI.facebookStreamPost(_arg1, _arg2, _arg6);
} else {
FunflowAPI.facebookStreamPost(_arg1, _arg2);
};
};
}
public static function getDomain():String{
var _local1:String = root.stage.loaderInfo.url;
var _local2:Number = (_local1.indexOf("://") + 3);
var _local3:Number = _local1.indexOf("/", _local2);
var _local4:String = _local1.substring(_local2, _local3);
var _local5:Number = (_local4.lastIndexOf(".") - 1);
var _local6:Number = (_local4.lastIndexOf(".", _local5) + 1);
_local4 = _local4.substring(_local6, _local4.length);
return (_local4);
}
public static function isLevelUnlocked(_arg1:int):Boolean{
return (sharedObjectData.levelsUnlocked[(_arg1 - 1)]);
}
public static function ff_showMoreGames(){
FunflowAPI.openOtherGamesLink();
}
}
}//package com.ussgames.game
Section 145
//Main (com.ussgames.game.Main)
package com.ussgames.game {
import flash.events.*;
import com.ussgames.birdRacing.*;
import mochi.as3.*;
import com.ussgames.panels.*;
public class Main {
public var level:MochiDigits;
public var lives:MochiDigits;
public var score:MochiDigits;
public static var gamePaused:Boolean = false;
public static var inGamePanel:GamePanel;
public function Main(){
score = new MochiDigits();
lives = new MochiDigits();
level = new MochiDigits();
}
public function resetGame(){
score.setValue();
lives.setValue(Config.STARTLIVES);
}
public function initGame(){
}
public function gameOver(){
Main.inGamePanel.openPanel("gameover");
}
public function update(){
if (GamePanel.panelOpen){
return;
};
}
public function cleanUp(){
}
public function nextLevel(){
stopGame();
if (level.value < Config.NUMBEROFLEVELS){
level.addValue(1);
if (Config.RESETLIVESEVERYLEVEL){
lives.setValue(Config.STARTLIVES);
};
Controller.unlockLevel(level.value);
resetLevel();
} else {
Controller.gameComplete();
};
}
public function startGame(){
Controller.root.addEventListener(Event.ENTER_FRAME, gameLoop, false, 0, true);
}
public function resetLevel(){
if (lives.value == 0){
resetGame();
};
cleanUp();
Controller.startLevel();
}
public function gameLoop(_arg1:Event){
if (!gamePaused){
update();
};
}
public function loseLife(){
lives.addValue(-1);
if (lives.value > 0){
reactToDeath();
} else {
gameOver();
};
}
public function reactToDeath(){
Main.inGamePanel.openPanel("loselife", function (){
retryLevel();
});
}
public function stopGame(){
Controller.root.removeEventListener(Event.ENTER_FRAME, gameLoop);
}
public function retryLevel(){
stopGame();
Controller.transitioner.goto("theGame", resetLevel);
}
public function levelComplete(){
Main.inGamePanel.openPanel("levelcomplete", function (){
Controller.transitioner.goto("theGame", nextLevel);
});
}
public static function inGameHelp(){
if (!GamePanel.panelOpen){
Main.inGamePanel.openPanel("help");
};
}
public static function pauseGame(){
if (!GamePanel.panelOpen){
(Controller.main as BirdRacingMain).pauseBirds();
gamePaused = true;
Main.inGamePanel.openPanel("paused", function (){
Main.resumeGame();
});
};
}
public static function resumeGame(){
Main.gamePaused = false;
(Controller.main as BirdRacingMain).resumeBirds();
}
}
}//package com.ussgames.game
Section 146
//Key (com.ussgames.general.Key)
package com.ussgames.general {
import flash.display.*;
import flash.events.*;
import com.ussgames.game.*;
public class Key {
public static const LEFT:uint = 37;
public static const NUMPAD_DECIMAL:uint = 110;
public static const A:uint = 65;
public static const B:uint = 66;
public static const C:uint = 67;
public static const D:uint = 68;
public static const E:uint = 69;
public static const F:uint = 70;
public static const G:uint = 71;
public static const H:uint = 72;
public static const I:uint = 73;
public static const J:uint = 74;
public static const K:uint = 75;
public static const L:uint = 76;
public static const M:uint = 77;
public static const N:uint = 78;
public static const O:uint = 79;
public static const MINUS:uint = 189;
public static const Q:uint = 81;
public static const PAGE_DOWN:uint = 34;
public static const S:uint = 83;
public static const T:uint = 84;
public static const U:uint = 85;
public static const V:uint = 86;
public static const P:uint = 80;
public static const X:uint = 88;
public static const R:uint = 82;
public static const ALTERNATE:uint = 18;
public static const QUOTE:uint = 222;
public static const W:uint = 87;
public static const BACKSPACE:uint = 8;
public static const Y:uint = 89;
public static const SHIFT:uint = 16;
public static const PAGE_UP:uint = 33;
public static const Z:uint = 90;
public static const ESCAPE:uint = 27;
public static const NUMPAD_ADD:uint = 107;
public static const SEMICOLON:uint = 186;
public static const UP:uint = 38;
public static const DOWN:uint = 40;
public static const F1:uint = 112;
public static const F3:uint = 114;
public static const F5:uint = 116;
public static const F6:uint = 117;
public static const F7:uint = 118;
public static const F8:uint = 119;
public static const F2:uint = 113;
public static const F4:uint = 115;
public static const ENTER:uint = 13;
public static const INSERT:uint = 45;
public static const END:uint = 35;
public static const COMMA:uint = 188;
public static const NUMBER_3:uint = 51;
public static const NUMBER_5:uint = 53;
public static const NUMBER_6:uint = 54;
public static const NUMBER_0:uint = 48;
public static const F9:uint = 120;
public static const NUMBER_4:uint = 52;
public static const NUMBER_7:uint = 55;
public static const NUMBER_8:uint = 56;
public static const NUMBER_2:uint = 50;
public static const LEFTBRACKET:uint = 219;
public static const NUMBER_9:uint = 57;
public static const NUMBER_1:uint = 49;
public static const BACKSLASH:uint = 220;
public static const NUMPAD_MULTIPLY:uint = 106;
public static const HOME:uint = 36;
public static const F10:uint = 121;
public static const F11:uint = 122;
public static const F12:uint = 123;
public static const F13:uint = 124;
public static const F14:uint = 125;
public static const SPACE:uint = 32;
public static const F15:uint = 126;
public static const RIGHTBRACKET:uint = 221;
public static const EQUAL:uint = 187;
public static const COMMAND:uint = 15;
public static const CONTROL:uint = 17;
public static const NUMPAD_ENTER:uint = 108;
public static const NUMPAD:uint = 21;
public static const TAB:uint = 9;
public static const SLASH:uint = 191;
public static const DELETE:uint = 46;
public static const NUMPAD_DIVIDE:uint = 111;
public static const NUMPAD_1:uint = 97;
public static const NUMPAD_2:uint = 98;
public static const NUMPAD_3:uint = 99;
public static const NUMPAD_4:uint = 100;
public static const NUMPAD_5:uint = 101;
public static const NUMPAD_6:uint = 102;
public static const NUMPAD_7:uint = 103;
public static const NUMPAD_8:uint = 104;
public static const NUMPAD_9:uint = 105;
public static const PERIOD:uint = 190;
public static const CAPS_LOCK:uint = 20;
public static const NUMPAD_0:uint = 96;
public static const BACKQUOTE:uint = 192;
public static const NUMPAD_SUBTRACT:uint = 109;
public static const RIGHT:uint = 39;
protected static var keysDown:Object = new Object();
protected static var initialized:Boolean = false;
public static function terminate(_arg1:Stage):void{
if (initialized){
_arg1.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
_arg1.removeEventListener(KeyboardEvent.KEY_UP, keyReleased);
_arg1.removeEventListener(Event.DEACTIVATE, clearKeys);
initialized = false;
keysDown = new Object();
};
}
public static function isReady():Boolean{
return (initialized);
}
public static function keyReleased(_arg1:KeyboardEvent):void{
if ((_arg1.keyCode in keysDown)){
delete keysDown[_arg1.keyCode];
Controller.main.keyReleased();
};
}
public static function keyPressed(_arg1:KeyboardEvent):void{
keysDown[_arg1.keyCode] = true;
}
public static function isDown(_arg1:uint):Boolean{
if (!initialized){
};
return (Boolean((_arg1 in keysDown)));
}
public static function initialize(_arg1:Stage):void{
if (!initialized){
_arg1.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
_arg1.addEventListener(KeyboardEvent.KEY_UP, keyReleased);
_arg1.addEventListener(Event.DEACTIVATE, clearKeys);
initialized = true;
};
}
public static function clearKeys(_arg1:Event):void{
keysDown = new Object();
}
}
}//package com.ussgames.general
Section 147
//ScreenShaker (com.ussgames.general.ScreenShaker)
package com.ussgames.general {
import flash.display.*;
import com.ussgames.game.*;
import com.ussgames.birdRacing.*;
public class ScreenShaker {
public static var screenShakeTime:int = 0;
public static var gameContainer:MovieClip;
public static var screenShakeAmount:int = 0;
public static var gcx:Number;
public static var gcy:Number;
public static function update(){
var _local1:Number;
var _local2:Number;
if (screenShakeTime <= 0){
gameContainer.x = BirdRacingMain.gameContainerX;
gameContainer.y = BirdRacingMain.gameContainerY;
if (((Controller.root) && (Controller.root.bgContainer))){
Controller.root.bgContainer.x = 325;
Controller.root.bgContainer.y = 275;
};
screenShakeAmount = 0;
} else {
screenShakeTime--;
_local1 = (Math.random() * (screenShakeAmount * 2));
_local2 = (Math.random() * (screenShakeAmount * 2));
gameContainer.x = (BirdRacingMain.gameContainerX + (_local1 - screenShakeAmount));
gameContainer.y = (BirdRacingMain.gameContainerY + (_local2 - screenShakeAmount));
if (((Controller.root) && (Controller.root.bgContainer))){
Controller.root.bgContainer.x = (325 + ((_local1 / 2) - (screenShakeAmount / 2)));
Controller.root.bgContainer.y = (275 + ((_local2 / 2) - (screenShakeAmount / 2)));
};
};
}
public static function init(_arg1:MovieClip){
gameContainer = _arg1;
gcx = _arg1.x;
gcy = _arg1.y;
screenShakeAmount = 0;
screenShakeTime = 0;
}
public static function shakeScreen(_arg1:int, _arg2:int){
screenShakeAmount = (screenShakeAmount + _arg1);
if (screenShakeAmount > 10){
screenShakeAmount = 10;
};
screenShakeTime = _arg2;
}
}
}//package com.ussgames.general
Section 148
//ScrollBar (com.ussgames.general.ScrollBar)
package com.ussgames.general {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class ScrollBar extends MovieClip {
private var viewMinX:Number;
private var viewMinY:Number;
public var draggingSlider:Boolean;// = false
private var maxScroll:Number;
public var viewArea:MovieClip;
private var viewScrollRatio:Number;
public var track:MovieClip;
public var wheelScrollSpeed:Number;// = 10
public var slider:MovieClip;
public var mouseWheelEnabled:Boolean;// = false
public var viewWindow:Rectangle;
private var viewStartX:Number;
private var viewStartY:Number;
public var vertical:Boolean;// = true
private function mouseWheelHandler(_arg1:MouseEvent):void{
this.slider.y = (this.slider.y - (_arg1.delta * wheelScrollSpeed));
if (this.slider.y < 0){
this.slider.y = 0;
};
if (this.slider.y > (this.track.height - this.slider.height)){
this.slider.y = (this.track.height - this.slider.height);
};
sliderMoved(_arg1);
}
public function init(_arg1:MovieClip, _arg2:Rectangle, _arg3:Boolean=true, _arg4:Boolean=true, _arg5:Number=10){
this.viewArea = _arg1;
this.viewStartX = _arg1.x;
this.viewStartY = _arg1.y;
this.viewWindow = _arg2;
this.viewMinX = (viewStartX - (_arg1.width - _arg2.width));
if (viewMinX > viewStartX){
viewMinX = viewStartX;
};
this.viewMinY = (viewStartY - (_arg1.height - _arg2.height));
if (viewMinY > viewStartY){
viewMinY = viewStartY;
};
this.vertical = _arg3;
if (_arg3){
maxScroll = (viewStartY - viewMinY);
} else {
maxScroll = (viewStartX - viewMinX);
};
viewScrollRatio = (maxScroll / (this.track.height - this.slider.height));
this.slider.addEventListener(MouseEvent.MOUSE_DOWN, startDragSlider, false, 0, true);
this.stage.addEventListener(MouseEvent.MOUSE_UP, stopDragSlider, false, 0, true);
this.slider.addEventListener(MouseEvent.MOUSE_OVER, sliderRollOver, false, 0, true);
this.slider.addEventListener(MouseEvent.MOUSE_OUT, sliderRollOut, false, 0, true);
this.track.addEventListener(MouseEvent.MOUSE_DOWN, trackClicked, false, 0, true);
if (_arg4){
this.stage.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler, false, 0, true);
mouseWheelEnabled = _arg4;
};
this.wheelScrollSpeed = _arg5;
this.slider.buttonMode = true;
this.slider.useHandCursor = true;
}
private function trackClicked(_arg1:MouseEvent){
slider.y = (_arg1.localY - (slider.height / 2));
sliderMoved(_arg1);
startDragSlider(_arg1);
}
private function stopDragSlider(_arg1:Event):void{
this.slider.stopDrag();
this.stage.removeEventListener(MouseEvent.MOUSE_MOVE, sliderMoved);
sliderMoved(_arg1);
draggingSlider = false;
sliderRollOut(_arg1);
}
private function sliderRollOut(_arg1:Event):void{
if (!draggingSlider){
this.slider.gotoAndStop("out");
};
}
private function sliderMoved(_arg1:Event){
if (vertical){
this.viewArea.y = Math.floor((viewStartY - (slider.y * viewScrollRatio)));
} else {
this.viewArea.x = Math.floor((viewStartX - (slider.x * viewScrollRatio)));
};
}
private function startDragSlider(_arg1:Event):void{
this.slider.startDrag(false, new Rectangle(0, 0, 0, (this.track.height - this.slider.height)));
this.stage.addEventListener(MouseEvent.MOUSE_MOVE, sliderMoved);
draggingSlider = true;
sliderRollOver(_arg1);
}
private function sliderRollOver(_arg1:Event):void{
this.slider.gotoAndStop("over");
}
}
}//package com.ussgames.general
Section 149
//Transitioner (com.ussgames.general.Transitioner)
package com.ussgames.general {
import flash.display.*;
public class Transitioner extends MovieClip {
public var frameLabel:String;
public var transEndFunction:Function;
public static var theRoot:MovieClip;
public function transEnd(){
if (transEndFunction != null){
transEndFunction();
};
theRoot.gotoAndStop(frameLabel);
}
public function goto(_arg1:String, _arg2:Function=null){
this.transEndFunction = _arg2;
this.frameLabel = _arg1;
this.play();
}
public static function setRoot(_arg1:MovieClip){
theRoot = _arg1;
}
}
}//package com.ussgames.general
Section 150
//Trig (com.ussgames.general.Trig)
package com.ussgames.general {
public class Trig {
public static const RADCONVERT:Number = 57.2957795130823;
private static var hasSetup:Boolean = false;
public static var cos:Array;
public static var sin:Array;
public static function getCos(_arg1:Number):Number{
_arg1 = (_arg1 % 360);
if (_arg1 < 0){
_arg1 = (_arg1 + 360);
};
return (cos[(_arg1 << 0)]);
}
public static function getSin(_arg1:Number):Number{
_arg1 = (_arg1 % 360);
if (_arg1 < 0){
_arg1 = (_arg1 + 360);
};
return (sin[(_arg1 << 0)]);
}
public static function setup():void{
if (hasSetup){
return;
};
sin = [];
cos = [];
var _local1:int;
while (_local1 <= 360) {
sin[_local1] = Math.sin((_local1 / RADCONVERT));
cos[_local1] = Math.cos((_local1 / RADCONVERT));
_local1++;
};
hasSetup = true;
}
}
}//package com.ussgames.general
Section 151
//GamePanel (com.ussgames.panels.GamePanel)
package com.ussgames.panels {
import flash.display.*;
import com.ussgames.game.*;
public class GamePanel extends MovieClip {
public var afterCloseFunction:Function;
public var panelContent:MovieClip;
public static var panelOpen:Boolean = false;
public function GamePanel(){
Main.inGamePanel = this;
}
public function executeAfterCloseFunction(){
panelOpen = false;
if (afterCloseFunction != null){
afterCloseFunction();
};
}
public function openPanel(_arg1:String, _arg2:Function=null){
afterCloseFunction = _arg2;
this["panelContent"].gotoAndStop(_arg1);
this.gotoAndPlay("open");
panelOpen = true;
}
public function closePanel(_arg1:Function=null){
if (currentFrame <= 15){
if (_arg1 != null){
afterCloseFunction = _arg1;
};
this.gotoAndPlay("close");
};
}
}
}//package com.ussgames.panels
Section 152
//Particle (com.ussgames.particles.Particle)
package com.ussgames.particles {
public class Particle {
var life:int;// = 0
var ySpeed:Number;// = 0
var xPos:Number;// = 0
var gravity:Boolean;// = false
var yPos:Number;// = 0
var autoAdjust:Boolean;// = false
var hasSparkTrail:Boolean;// = false
var sparkTrail:Array;
var particleLayer:Object;
var xSpeed:Number;// = 0
var particleSprite:Object;
var startLife:int;// = 0
public function Particle(){
sparkTrail = new Array();
super();
}
function update():Boolean{
var _local2:Object;
if (life > 0){
_local2 = new Object();
_local2.x = xPos;
_local2.y = yPos;
_local2.frame = 1;
_local2.alpha = (life / startLife);
if (hasSparkTrail){
sparkTrail.push(_local2);
} else {
sparkTrail[0] = _local2;
};
xPos = (xPos + xSpeed);
yPos = (yPos + ySpeed);
if (((gravity) && ((ySpeed < ParticleSystem.terminalVelocity)))){
ySpeed = (ySpeed + ParticleSystem.gravity);
};
life--;
};
var _local1:int = (sparkTrail.length - 1);
while (_local1 >= 0) {
if (sparkTrail[_local1].frame < particleSprite.f){
ParticleSystem.plotSingleParticle(sparkTrail[_local1].x, sparkTrail[_local1].y, Math.floor(sparkTrail[_local1].frame), particleSprite, particleLayer, sparkTrail[_local1].alpha, autoAdjust);
sparkTrail[_local1].frame++;
} else {
sparkTrail.splice(_local1, 1);
};
_local1--;
};
if (life > 0){
return (true);
};
if (sparkTrail.length == 0){
return (false);
};
return (true);
}
function init(_arg1:ParticleEmitter){
this.xPos = _arg1.xPos;
this.yPos = _arg1.yPos;
this.life = _arg1.particleLifeSpan;
this.startLife = _arg1.particleLifeSpan;
this.gravity = _arg1.gravity;
this.autoAdjust = _arg1.autoAdjust;
this.hasSparkTrail = _arg1.sparkTrail;
this.particleSprite = _arg1.particleSprite;
this.particleLayer = _arg1.particleLayer;
}
}
}//package com.ussgames.particles
Section 153
//ParticleEmitter (com.ussgames.particles.ParticleEmitter)
package com.ussgames.particles {
import com.ussgames.general.*;
public class ParticleEmitter {
var xPos:Number;// = 0
var sparksToEmit:int;// = 0
private var sparksEmitted:int;// = 0
var gravity:Boolean;// = false
private var delayCount:int;// = 0
var yPos:Number;// = 0
var autoAdjust:Boolean;// = false
var particlePower:Number;
var particleType:int;// = 1
var delayBetweenSparks:int;// = 0
var particleLifeSpan:int;
var particlePowerRange:Number;
var sparksPerFrame:int;// = 0
var sparkTrail:Boolean;// = false
var particleSprite:Object;
var particleLayer:Object;
var angleBetweenParticles:Number;
function update():Boolean{
var _local1:int;
var _local2:Particle;
if ((((delayCount == 0)) && ((sparksEmitted < sparksToEmit)))){
_local1 = 0;
while (_local1 < sparksPerFrame) {
_local2 = new Particle();
_local2.init(this);
switch (particleType){
case ParticleSystem.RANDOM:
_local2.xSpeed = (Math.floor((Math.random() * (particlePower * 2))) - particlePower);
_local2.ySpeed = (Math.floor((Math.random() * (particlePower * 2))) - particlePower);
break;
case ParticleSystem.CIRCULAR:
_local2.xSpeed = (Math.sin((_local1 * angleBetweenParticles)) * particlePower);
_local2.ySpeed = (Math.cos((_local1 * angleBetweenParticles)) * particlePower);
break;
case ParticleSystem.STRAIGHT:
break;
case ParticleSystem.STRAIGHTWITHWOBBLE:
break;
};
ParticleSystem.activeParticles.push(_local2);
sparksEmitted++;
_local1++;
};
delayCount = delayBetweenSparks;
} else {
delayCount--;
};
if (sparksEmitted >= sparksToEmit){
return (false);
};
return (true);
}
function init(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:Object, _arg9:Object, _arg10:Number, _arg11:Number=0, _arg12:Boolean=false, _arg13:Boolean=false, _arg14:Boolean=false){
this.xPos = _arg1;
this.yPos = _arg2;
this.sparksToEmit = _arg3;
this.sparksPerFrame = _arg4;
this.delayBetweenSparks = _arg5;
this.gravity = _arg13;
this.autoAdjust = _arg14;
this.sparkTrail = _arg12;
this.particlePower = _arg10;
this.particlePowerRange = _arg11;
this.particleSprite = _arg8;
this.particleLayer = _arg9;
this.particleType = _arg6;
this.particleLifeSpan = _arg7;
this.angleBetweenParticles = ((360 / _arg4) / Trig.RADCONVERT);
}
}
}//package com.ussgames.particles
Section 154
//ParticleSystem (com.ussgames.particles.ParticleSystem)
package com.ussgames.particles {
import flash.display.*;
import flash.geom.*;
public class ParticleSystem {
public static const STRAIGHT:int = 3;
public static const RANDOM:int = 1;
public static const STRAIGHTWITHWOBBLE:int = 4;
public static const CIRCULAR:int = 2;
public static var activeParticles:Array;
public static var gravity:Number;
public static var particleLayers:Array;
public static var root:MovieClip;
public static var activeEmitters:Array;
public static var particleSprites:Array;
public static var screenHeight:int;
public static var inited:Boolean = false;
public static var terminalVelocity:Number;
public static var screenWidth:int;
public static function addParticleLayer(_arg1:MovieClip){
var _local2:Object = new Object();
_local2.container = _arg1;
var _local3:BitmapData = new BitmapData(screenWidth, screenHeight, true, 0);
var _local4:Bitmap = new Bitmap(_local3);
_arg1.addChild(_local4);
_local2.bitmap = _local4;
_local2.bitmapData = _local3;
particleLayers.push(_local2);
}
public static function cleanUp(){
activeEmitters = new Array();
activeParticles = new Array();
clearParticleLayers();
}
public static function addEmitter(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int, _arg9:int, _arg10:Number, _arg11:Number=0, _arg12:Boolean=false, _arg13:Boolean=false, _arg14:Boolean=false){
var _local15:ParticleEmitter = new ParticleEmitter();
_local15.init(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, particleSprites[_arg8], particleLayers[_arg9], _arg10, _arg11, _arg12, _arg13, _arg14);
activeEmitters.push(_local15);
}
public static function prepParticleBitmap(_arg1:MovieClip, _arg2:Number=1, _arg3:Number=1, _arg4:Number=1, _arg5:Number=1):Object{
var _local14:int;
var _local15:ColorTransform;
var _local6:* = ((_arg1.width * _arg2) + 1);
var _local7:* = ((_arg1.height * _arg2) + 1);
var _local8:* = Math.ceil((_local6 / 2));
var _local9:* = Math.ceil((_local7 / 2));
var _local10:BitmapData = new BitmapData((_local6 * _arg1.totalFrames), (_local7 * 10), true, 0);
var _local11:Number = 0;
var _local12 = 100;
while (_local12 >= 0) {
_local14 = 0;
while (_local14 < _arg1.totalFrames) {
if ((((_arg1.width > 0)) && ((_arg1.height > 0)))){
_arg1.gotoAndStop((_local14 + 1));
_local15 = new ColorTransform(_arg3, _arg4, _arg5, (_local12 / 100), 0, 0, 0, 0);
_local10.draw(_arg1, new Matrix(_arg2, 0, 0, _arg2, ((_local6 * _local14) + _local8), (_local9 + _local11)), _local15);
};
_local14++;
};
_local11 = (_local11 + _local7);
_local12 = (_local12 - 10);
};
var _local13:Object = new Object();
_local13.w = _local6;
_local13.h = _local7;
_local13.f = _arg1.totalFrames;
_local13.bitmap = _local10;
return (_local13);
}
public static function clearParticleLayers(){
var _local1:int;
while (_local1 < particleLayers.length) {
particleLayers[_local1].bitmapData.fillRect(new Rectangle(0, 0, screenWidth, screenHeight), 0);
_local1++;
};
}
public static function addParticleSprite(_arg1:MovieClip, _arg2:Number=1, _arg3:Number=1, _arg4:Number=1, _arg5:Number=1){
particleSprites.push(prepParticleBitmap(_arg1, _arg2, _arg3, _arg4, _arg5));
}
public static function plotSingleParticle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Object, _arg5:Object, _arg6:Number=1, _arg7:Boolean=false){
_arg1 = (_arg1 - Math.floor((_arg4.w / 2)));
_arg2 = (_arg2 - Math.floor((_arg4.h / 2)));
if (_arg6 > 1){
_arg6 = 1;
};
if (_arg6 < 0){
_arg6 = 0;
};
if (_arg7){
_arg1 = (_arg1 + _arg5.container.x);
_arg2 = (_arg2 + _arg5.container.y);
};
var _local8:Number = (1 - _arg6);
_local8 = Math.floor((_local8 * 10));
_local8 = (_local8 * _arg4.h);
_arg3--;
var _local9:Rectangle = new Rectangle((_arg3 * _arg4.w), (0 + _local8), _arg4.w, _arg4.h);
_arg5.bitmapData.copyPixels(_arg4.bitmap, _local9, new Point(_arg1, _arg2), null, null, true);
}
public static function updateParticles(){
var _local1:int;
_local1 = (activeEmitters.length - 1);
while (_local1 >= 0) {
if (!activeEmitters[_local1].update()){
activeEmitters.splice(_local1, 1);
};
_local1--;
};
_local1 = 0;
while (_local1 < particleLayers.length) {
particleLayers[_local1].bitmapData.lock();
_local1++;
};
clearParticleLayers();
_local1 = (activeParticles.length - 1);
while (_local1 >= 0) {
if (!activeParticles[_local1].update()){
activeParticles.splice(_local1, 1);
};
_local1--;
};
_local1 = 0;
while (_local1 < particleLayers.length) {
particleLayers[_local1].bitmapData.unlock();
_local1++;
};
}
public static function init(_arg1:MovieClip, _arg2:int, _arg3:int, _arg4:Number=0.25, _arg5:Number=20){
root = _arg1;
particleSprites = new Array();
particleLayers = new Array();
activeEmitters = new Array();
activeParticles = new Array();
screenWidth = _arg2;
screenHeight = _arg3;
gravity = _arg4;
terminalVelocity = _arg5;
inited = true;
}
}
}//package com.ussgames.particles
Section 155
//SoundController (com.ussgames.sound.SoundController)
package com.ussgames.sound {
import flash.display.*;
import com.ussgames.game.*;
import flash.media.*;
public class SoundController {
public static var soundButton:MovieClip;
public static var musicOn:Boolean = true;
public static var currentMusicID:String;
public static var soundsClip:MovieClip;
public static var musicClip:MovieClip;
public static var musicButton:MovieClip;
public static var soundOn:Boolean = true;
public static function stopMusic(){
SoundMixer.stopAll();
currentMusicID = "";
if (musicClip){
musicClip.gotoAndStop(1);
};
}
public static function init(_arg1:MovieClip=null, _arg2:MovieClip=null){
soundsClip = _arg1;
musicClip = _arg2;
}
public static function toggleMusic(){
musicOn = soundOn;
if (!musicOn){
SoundMixer.stopAll();
} else {
if (currentMusicID != ""){
playMusic(currentMusicID);
};
};
updateSoundButtons();
Controller.saveSoundSettings();
}
public static function toggleSound(){
soundOn = !(soundOn);
updateSoundButtons();
Controller.saveSoundSettings();
}
public static function playMusic(_arg1:String){
if (((((musicOn) && (musicClip))) && (!((_arg1 == ""))))){
SoundMixer.stopAll();
musicClip.gotoAndPlay(_arg1);
};
currentMusicID = _arg1;
}
public static function updateSoundButtons(){
if (soundButton){
soundButton.update();
};
if (musicButton){
musicButton.update();
};
}
public static function playSound(_arg1:String){
if (((((soundOn) && (soundsClip))) && (!((_arg1 == ""))))){
soundsClip[_arg1].gotoAndPlay(2);
};
}
}
}//package com.ussgames.sound
Section 156
//MochiDigits (mochi.as3.MochiDigits)
package mochi.as3 {
public final class MochiDigits {
private var Sibling:MochiDigits;
private var Fragment:Number;
private var Encoder:Number;
public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{
Encoder = 0;
setValue(_arg1, _arg2);
}
public function reencode():void{
var _local1:uint = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (_local1 ^ Encoder));
Encoder = _local1;
}
public function set value(_arg1:Number):void{
setValue(_arg1);
}
public function toString():String{
var _local1:String = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
_local1 = (_local1 + Sibling.toString());
};
return (_local1);
}
public function setValue(_arg1:Number=0, _arg2:uint=0):void{
var _local3:String = _arg1.toString();
var _temp1 = _arg2;
_arg2 = (_arg2 + 1);
Fragment = (_local3.charCodeAt(_temp1) ^ Encoder);
if (_arg2 < _local3.length){
Sibling = new MochiDigits(_arg1, _arg2);
} else {
Sibling = null;
};
reencode();
}
public function get value():Number{
return (Number(this.toString()));
}
public function addValue(_arg1:Number):void{
value = (value + _arg1);
}
}
}//package mochi.as3
Section 157
//AllConfetti (AllConfetti)
package {
import flash.display.*;
public dynamic class AllConfetti extends MovieClip {
public var bit:MovieClip;
public function AllConfetti(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
bit.gotoAndPlay((Math.floor((Math.random() * 40)) + 1));
}
function frame2(){
bit.gotoAndPlay((Math.floor((Math.random() * 40)) + 1));
}
function frame3(){
bit.gotoAndPlay((Math.floor((Math.random() * 40)) + 1));
}
function frame4(){
bit.gotoAndPlay((Math.floor((Math.random() * 40)) + 1));
}
}
}//package
Section 158
//AllFences (AllFences)
package {
import flash.display.*;
public dynamic class AllFences extends MovieClip {
public var clipHit:MovieClip;
public var mainArea:MovieClip;
public var waterClip:MovieClip;
public var mainHit:MovieClip;
public function AllFences(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 159
//BigBirdClip1 (BigBirdClip1)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.geom.*;
import com.ussgames.birdRacing.*;
import flash.text.*;
import flash.media.*;
import flash.external.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class BigBirdClip1 extends BigBird {
public function BigBirdClip1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
if (TournamentStanding.aiPlayer[0]){
hotkey.gotoAndStop(5);
} else {
hotkey.gotoAndStop(1);
};
}
}
}//package
Section 160
//BigBirdClip2 (BigBirdClip2)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.geom.*;
import com.ussgames.birdRacing.*;
import flash.text.*;
import flash.media.*;
import flash.external.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class BigBirdClip2 extends BigBird {
public function BigBirdClip2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
if (TournamentStanding.aiPlayer[1]){
hotkey.gotoAndStop(5);
} else {
hotkey.gotoAndStop(2);
};
}
}
}//package
Section 161
//BigBirdClip3 (BigBirdClip3)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.geom.*;
import com.ussgames.birdRacing.*;
import flash.text.*;
import flash.media.*;
import flash.external.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class BigBirdClip3 extends BigBird {
public function BigBirdClip3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
if (TournamentStanding.aiPlayer[2]){
hotkey.gotoAndStop(5);
} else {
hotkey.gotoAndStop(3);
};
}
}
}//package
Section 162
//BigBirdClip4 (BigBirdClip4)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.geom.*;
import com.ussgames.birdRacing.*;
import flash.text.*;
import flash.media.*;
import flash.external.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class BigBirdClip4 extends BigBird {
public function BigBirdClip4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
if (TournamentStanding.aiPlayer[3]){
hotkey.gotoAndStop(5);
} else {
hotkey.gotoAndStop(4);
};
}
}
}//package
Section 163
//closePanelButton (closePanelButton)
package {
import com.ussgames.buttons.*;
public dynamic class closePanelButton extends ClosePanelButton {
public function closePanelButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 164
//ConfettiHolder2 (ConfettiHolder2)
package {
import com.ussgames.birdRacing.*;
public dynamic class ConfettiHolder2 extends ConfettiEffect2 {
}
}//package
Section 165
//ConfettiHolderClip (ConfettiHolderClip)
package {
import com.ussgames.birdRacing.*;
public dynamic class ConfettiHolderClip extends ConfettiEffect {
}
}//package
Section 166
//creditsButton (creditsButton)
package {
import com.ussgames.buttons.*;
public dynamic class creditsButton extends CreditsButton {
public function creditsButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 167
//DesertBGDetail (DesertBGDetail)
package {
import flash.display.*;
public dynamic class DesertBGDetail extends MovieClip {
public function DesertBGDetail(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 168
//DesertBGDetail2 (DesertBGDetail2)
package {
import flash.display.*;
public dynamic class DesertBGDetail2 extends MovieClip {
}
}//package
Section 169
//DesertHoles (DesertHoles)
package {
import flash.display.*;
public dynamic class DesertHoles extends MovieClip {
public var clipHit:MovieClip;
public var mainArea:MovieClip;
public var mainHit:MovieClip;
public function DesertHoles(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 170
//DustParticle (DustParticle)
package {
import flash.display.*;
public dynamic class DustParticle extends MovieClip {
}
}//package
Section 171
//DustParticle2 (DustParticle2)
package {
import flash.display.*;
public dynamic class DustParticle2 extends MovieClip {
public function DustParticle2(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
if (parent){
parent.removeChild(this);
};
}
}
}//package
Section 172
//FinishLine (FinishLine)
package {
import flash.display.*;
public dynamic class FinishLine extends MovieClip {
}
}//package
Section 173
//FinishLine2 (FinishLine2)
package {
import flash.display.*;
public dynamic class FinishLine2 extends MovieClip {
}
}//package
Section 174
//funflowButton (funflowButton)
package {
import com.ussgames.buttons.*;
public dynamic class funflowButton extends FunflowMenuLogoButton {
public function funflowButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 175
//funflowButton_big (funflowButton_big)
package {
import com.ussgames.buttons.*;
public dynamic class funflowButton_big extends FunflowSplashLogoButton {
public function funflowButton_big(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 176
//funflowLockButton (funflowLockButton)
package {
import com.ussgames.buttons.*;
public dynamic class funflowLockButton extends FunflowLockButton {
public function funflowLockButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 177
//helpButton (helpButton)
package {
import com.ussgames.buttons.*;
public dynamic class helpButton extends HelpButton {
public function helpButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 178
//helpButtonInGame (helpButtonInGame)
package {
import com.ussgames.buttons.*;
public dynamic class helpButtonInGame extends HelpButtonInGame {
public function helpButtonInGame(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 179
//helpNext (helpNext)
package {
import com.ussgames.buttons.*;
public dynamic class helpNext extends HelpButton_Next {
public function helpNext(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 180
//helpPrev (helpPrev)
package {
import com.ussgames.buttons.*;
public dynamic class helpPrev extends HelpButton_Prev {
public function helpPrev(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 181
//IceBGDetail (IceBGDetail)
package {
import flash.display.*;
public dynamic class IceBGDetail extends MovieClip {
}
}//package
Section 182
//IceFences (IceFences)
package {
import flash.display.*;
public dynamic class IceFences extends MovieClip {
public var clipHit:MovieClip;
public var mainArea:MovieClip;
public var waterClip:MovieClip;
public var mainHit:MovieClip;
public function IceFences(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 183
//IceHoles (IceHoles)
package {
import flash.display.*;
public dynamic class IceHoles extends MovieClip {
public var clipHit:MovieClip;
public var mainArea:MovieClip;
public var mainHit:MovieClip;
public function IceHoles(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 184
//ingamePanel (ingamePanel)
package {
import com.ussgames.panels.*;
public dynamic class ingamePanel extends GamePanel {
public function ingamePanel(){
addFrameScript(0, frame1, 14, frame15, 28, frame29);
}
function frame15(){
stop();
}
function frame29(){
this.executeAfterCloseFunction();
}
function frame1(){
stop();
panelContent.gotoAndStop(1);
}
}
}//package
Section 185
//inviteButton (inviteButton)
package {
import com.ussgames.buttons.*;
public dynamic class inviteButton extends InviteFriendsButton {
public function inviteButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 186
//JungleBGDetail (JungleBGDetail)
package {
import flash.display.*;
public dynamic class JungleBGDetail extends MovieClip {
}
}//package
Section 187
//JungleFences (JungleFences)
package {
import flash.display.*;
public dynamic class JungleFences extends MovieClip {
public var clipHit:MovieClip;
public var mainArea:MovieClip;
public var waterClip:MovieClip;
public var mainHit:MovieClip;
public function JungleFences(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 188
//JungleHoles (JungleHoles)
package {
import flash.display.*;
public dynamic class JungleHoles extends MovieClip {
public var clipHit:MovieClip;
public var mainArea:MovieClip;
public var mainHit:MovieClip;
public function JungleHoles(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 189
//killButton (killButton)
package {
import com.ussgames.frameworkTest.*;
public dynamic class killButton extends KillButton {
public function killButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 190
//levelSelectButton (levelSelectButton)
package {
import com.ussgames.buttons.*;
public dynamic class levelSelectButton extends LevelSelectButton {
public function levelSelectButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 191
//menuButton (menuButton)
package {
import com.ussgames.buttons.*;
public dynamic class menuButton extends MenuButton {
public function menuButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 192
//menuButton_big (menuButton_big)
package {
import com.ussgames.buttons.*;
public dynamic class menuButton_big extends MenuButton {
public function menuButton_big(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 193
//menuButton_inGame (menuButton_inGame)
package {
import com.ussgames.buttons.*;
public dynamic class menuButton_inGame extends MenuButtonInGame {
public function menuButton_inGame(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 194
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
if (Security.sandboxType == "localWithFile"){
return (null);
};
var _local3:MochiBot = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
var _local4 = "http://core.mochibot.com/my/core.swf";
var _local5:URLVariables = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
var _local6:String = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
var _local7:URLRequest = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
var _local8:Loader = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 195
//moreGamesButton (moreGamesButton)
package {
import com.ussgames.buttons.*;
public dynamic class moreGamesButton extends MoreGamesButton {
public function moreGamesButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 196
//musicButton (musicButton)
package {
import com.ussgames.buttons.*;
public dynamic class musicButton extends MusicButton {
public function musicButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 197
//nextRaceButton (nextRaceButton)
package {
import com.ussgames.buttons.*;
public dynamic class nextRaceButton extends ClosePanelButton {
public function nextRaceButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 198
//pauseButton (pauseButton)
package {
import com.ussgames.buttons.*;
public dynamic class pauseButton extends PauseButton {
public function pauseButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 199
//playAgainButton (playAgainButton)
package {
import com.ussgames.buttons.*;
public dynamic class playAgainButton extends PlayAgainButton {
public function playAgainButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 200
//playButton (playButton)
package {
import com.ussgames.buttons.*;
public dynamic class playButton extends PlayButton {
public function playButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 201
//podgeLinkButton (podgeLinkButton)
package {
import com.ussgames.buttons.*;
public dynamic class podgeLinkButton extends PodgeLinkButton {
public function podgeLinkButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 202
//scoreButton (scoreButton)
package {
import com.ussgames.frameworkTest.*;
public dynamic class scoreButton extends ScoreButton {
public function scoreButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 203
//scoresButton (scoresButton)
package {
import com.ussgames.buttons.*;
public dynamic class scoresButton extends ScoresButton {
public function scoresButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 204
//scrollBar (scrollBar)
package {
import com.ussgames.general.*;
public dynamic class scrollBar extends ScrollBar {
}
}//package
Section 205
//simpleButton (simpleButton)
package {
import com.ussgames.buttons.*;
public dynamic class simpleButton extends SimpleButton {
public function simpleButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 206
//skipChooseButton (skipChooseButton)
package {
import com.ussgames.buttons.*;
public dynamic class skipChooseButton extends StartNowButton {
public function skipChooseButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 207
//soundButton (soundButton)
package {
import com.ussgames.buttons.*;
public dynamic class soundButton extends SoundButton {
public function soundButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 208
//StarParticles (StarParticles)
package {
import flash.display.*;
public dynamic class StarParticles extends MovieClip {
}
}//package
Section 209
//StartCountDown (StartCountDown)
package {
import flash.display.*;
import com.ussgames.birdRacing.*;
import com.ussgames.sound.*;
public dynamic class StartCountDown extends MovieClip {
public var raceType:MovieClip;
public function StartCountDown(){
addFrameScript(0, frame1, 1, frame2, 5, frame6, 35, frame36, 65, frame66, 95, frame96, 121, frame122);
}
function frame36(){
SoundController.playSound("two");
}
function frame122(){
stop();
if (parent){
parent.removeChild(this);
};
}
function frame1(){
stop();
}
function frame2(){
raceType.gotoAndStop(BirdRacingMain.raceType);
}
function frame6(){
SoundController.playSound("three");
}
function frame96(){
BirdRacingMain.startRace();
SoundController.playSound("startgun");
}
function frame66(){
SoundController.playSound("one");
}
}
}//package
Section 210
//StartLine (StartLine)
package {
import flash.display.*;
public dynamic class StartLine extends MovieClip {
}
}//package
Section 211
//StartLine2 (StartLine2)
package {
import flash.display.*;
public dynamic class StartLine2 extends MovieClip {
}
}//package
Section 212
//startRaceButton (startRaceButton)
package {
import com.ussgames.buttons.*;
public dynamic class startRaceButton extends ClosePanelButton {
public function startRaceButton(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 213
//submitButton_inGame (submitButton_inGame)
package {
import com.ussgames.buttons.*;
public dynamic class submitButton_inGame extends SubmitButtonInGame {
public function submitButton_inGame(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame20(){
stop();
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 214
//Symbol2 (Symbol2)
package {
import flash.display.*;
public dynamic class Symbol2 extends MovieClip {
public function Symbol2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 215
//TrackNShadows (TrackNShadows)
package {
import flash.display.*;
public dynamic class TrackNShadows extends MovieClip {
public var shad1:MovieClip;
public var shad2:MovieClip;
public var shad3:MovieClip;
public var shad4:MovieClip;
public var trackStrip:MovieClip;
}
}//package
Section 216
//transitioner (transitioner)
package {
import com.ussgames.general.*;
public dynamic class transitioner extends Transitioner {
public function transitioner(){
addFrameScript(15, frame16, 32, frame33);
}
function frame16(){
stop();
}
function frame33(){
transEnd();
}
}
}//package
Section 217
//WaterParticles (WaterParticles)
package {
import flash.display.*;
public dynamic class WaterParticles extends MovieClip {
public function WaterParticles(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
if (parent){
parent.removeChild(this);
};
}
}
}//package