Section 1
//Elastic (fl.transitions.easing.Elastic)
package fl.transitions.easing {
public class Elastic {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) + _arg3) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
--_arg1;
return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * (0.3 * 1.5));
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
};
--_arg1;
return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) * 0.5) + _arg3) + _arg2));
}
}
}//package fl.transitions.easing
Section 2
//Regular (fl.transitions.easing.Regular)
package fl.transitions.easing {
public class Regular {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
}
}//package fl.transitions.easing
Section 3
//spriteFaceBack_45 (TouchNDownMadness_sa_fla.spriteFaceBack_45)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteFaceBack_45 extends MovieClip {
public var mc_MakeUpColor:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 4
//spriteFaceFront_55 (TouchNDownMadness_sa_fla.spriteFaceFront_55)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteFaceFront_55 extends MovieClip {
public var mc_MakeUpColor:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 5
//spriteFaceHappy_76 (TouchNDownMadness_sa_fla.spriteFaceHappy_76)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteFaceHappy_76 extends MovieClip {
public var mc_MakeUpColor:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 6
//spriteFaceSide_33 (TouchNDownMadness_sa_fla.spriteFaceSide_33)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteFaceSide_33 extends MovieClip {
public var mc_MakeUpColor:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 7
//spriteHelmet_78 (TouchNDownMadness_sa_fla.spriteHelmet_78)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteHelmet_78 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
public var mc_Color3:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 8
//spriteHelmetBack_47 (TouchNDownMadness_sa_fla.spriteHelmetBack_47)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteHelmetBack_47 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 9
//spriteHelmetFront_57 (TouchNDownMadness_sa_fla.spriteHelmetFront_57)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteHelmetFront_57 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 10
//spriteHelmetSide_36 (TouchNDownMadness_sa_fla.spriteHelmetSide_36)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteHelmetSide_36 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
public var mc_Color3:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 11
//spriteJockeyBeingHit_61 (TouchNDownMadness_sa_fla.spriteJockeyBeingHit_61)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyBeingHit_61 extends MovieClip {
public var mc_Shadow:MovieClip;
public var mc_RightHand:MovieClip;
public var mc_ShootingGrass:MovieClip;
public var mc_Helmet:MovieClip;
public var mc_BallShadow:MovieClip;
public var mc_Ball:MovieClip;
public var mc_Face:MovieClip;
public var mc_LeftHand:MovieClip;
public var mc_Shirt:MovieClip;
public function spriteJockeyBeingHit_61(){
addFrameScript(31, frame32);
}
function frame32(){
stop();
}
}
}//package TouchNDownMadness_sa_fla
Section 12
//spriteJockeyDuck_66 (TouchNDownMadness_sa_fla.spriteJockeyDuck_66)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyDuck_66 extends MovieClip {
public var mc_Shadow:MovieClip;
public var mc_RightHand:MovieClip;
public var mc_ShootingGrass:MovieClip;
public var mc_Helmet:MovieClip;
public var mc_Ball:MovieClip;
public var mc_Face:MovieClip;
public var mc_LeftHand:MovieClip;
public var mc_Shirt:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 13
//spriteJockeyHappy_67 (TouchNDownMadness_sa_fla.spriteJockeyHappy_67)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyHappy_67 extends MovieClip {
public var mc_Shadow:MovieClip;
public var mc_RightHand:MovieClip;
public var mc_ShootingGrass:MovieClip;
public var mc_Helmet:MovieClip;
public var mc_Ball:MovieClip;
public var mc_Face:MovieClip;
public var mc_LeftHand:MovieClip;
public var mc_Shirt:MovieClip;
public function spriteJockeyHappy_67(){
addFrameScript(11, frame12);
}
function frame12(){
gotoAndPlay("Move Right");
}
}
}//package TouchNDownMadness_sa_fla
Section 14
//spriteJockeyHitting_60 (TouchNDownMadness_sa_fla.spriteJockeyHitting_60)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyHitting_60 extends MovieClip {
public var mc_Shadow:MovieClip;
public var mc_RightHand:MovieClip;
public var mc_ShootingGrass:MovieClip;
public var mc_Helmet:MovieClip;
public var mc_Ball:MovieClip;
public var mc_Face:MovieClip;
public var mc_LeftHand:MovieClip;
public var mc_Shirt:MovieClip;
public function spriteJockeyHitting_60(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package TouchNDownMadness_sa_fla
Section 15
//spriteJockeyKicking_64 (TouchNDownMadness_sa_fla.spriteJockeyKicking_64)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyKicking_64 extends MovieClip {
public var mc_Shadow:MovieClip;
public var mc_RightHand:MovieClip;
public var mc_ShootingGrass:MovieClip;
public var mc_Helmet:MovieClip;
public var mc_Ball:MovieClip;
public var mc_Face:MovieClip;
public var mc_LeftHand:MovieClip;
public var mc_Shirt:MovieClip;
public function spriteJockeyKicking_64(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package TouchNDownMadness_sa_fla
Section 16
//spriteJockeyPlacingBall_65 (TouchNDownMadness_sa_fla.spriteJockeyPlacingBall_65)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyPlacingBall_65 extends MovieClip {
public var mc_Shadow:MovieClip;
public var mc_RightHand:MovieClip;
public var mc_ShootingGrass:MovieClip;
public var mc_Helmet:MovieClip;
public var mc_Ball:MovieClip;
public var mc_Face:MovieClip;
public var mc_LeftHand:MovieClip;
public var mc_Shirt:MovieClip;
public function spriteJockeyPlacingBall_65(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package TouchNDownMadness_sa_fla
Section 17
//spriteJockeyRunningDown_52 (TouchNDownMadness_sa_fla.spriteJockeyRunningDown_52)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyRunningDown_52 extends MovieClip {
public var mc_Shadow:MovieClip;
public var mc_RightHand:MovieClip;
public var mc_Helmet:MovieClip;
public var mc_Ball:MovieClip;
public var mc_Face:MovieClip;
public var mc_LeftHand:MovieClip;
public var mc_Shirt:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 18
//spriteJockeyRunningRight_24 (TouchNDownMadness_sa_fla.spriteJockeyRunningRight_24)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyRunningRight_24 extends MovieClip {
public var mc_Shadow:MovieClip;
public var mc_RightHand:MovieClip;
public var mc_ShootingGrass:MovieClip;
public var mc_Helmet:MovieClip;
public var mc_Ball:MovieClip;
public var mc_Face:MovieClip;
public var mc_LeftHand:MovieClip;
public var mc_Shirt:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 19
//spriteJockeyRunningUp_44 (TouchNDownMadness_sa_fla.spriteJockeyRunningUp_44)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyRunningUp_44 extends MovieClip {
public var mc_Shadow:MovieClip;
public var mc_RightHand:MovieClip;
public var mc_Helmet:MovieClip;
public var mc_Ball:MovieClip;
public var mc_Face:MovieClip;
public var mc_LeftHand:MovieClip;
public var mc_Shirt:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 20
//spriteJockeyStanding_43 (TouchNDownMadness_sa_fla.spriteJockeyStanding_43)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyStanding_43 extends MovieClip {
public var mc_Shadow:MovieClip;
public var mc_RightHand:MovieClip;
public var mc_Helmet:MovieClip;
public var mc_Ball:MovieClip;
public var mc_Face:MovieClip;
public var mc_LeftHand:MovieClip;
public var mc_Shirt:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 21
//spriteLeftHand_26 (TouchNDownMadness_sa_fla.spriteLeftHand_26)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteLeftHand_26 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 22
//spriteLeftHand_69 (TouchNDownMadness_sa_fla.spriteLeftHand_69)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteLeftHand_69 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 23
//spriteLeftHandFront_53 (TouchNDownMadness_sa_fla.spriteLeftHandFront_53)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteLeftHandFront_53 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 24
//spriteMenuPlayer1_110 (TouchNDownMadness_sa_fla.spriteMenuPlayer1_110)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteMenuPlayer1_110 extends MovieClip {
public var mc_Color1:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 25
//spriteMenuPlayer2_114 (TouchNDownMadness_sa_fla.spriteMenuPlayer2_114)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteMenuPlayer2_114 extends MovieClip {
public var mc_Color1:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 26
//spriteMenuPlayer3_112 (TouchNDownMadness_sa_fla.spriteMenuPlayer3_112)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteMenuPlayer3_112 extends MovieClip {
public var mc_Color1:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 27
//spriteRightHand_40 (TouchNDownMadness_sa_fla.spriteRightHand_40)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteRightHand_40 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 28
//spriteRightHand_82 (TouchNDownMadness_sa_fla.spriteRightHand_82)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteRightHand_82 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 29
//spriteRightHandFront_54 (TouchNDownMadness_sa_fla.spriteRightHandFront_54)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteRightHandFront_54 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 30
//spriteShirt_29 (TouchNDownMadness_sa_fla.spriteShirt_29)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteShirt_29 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 31
//spriteShirt_72 (TouchNDownMadness_sa_fla.spriteShirt_72)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteShirt_72 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 32
//ButtonMute (ButtonMute)
package {
import flash.display.*;
public dynamic class ButtonMute extends MovieClip {
}
}//package
Section 33
//GameData (GameData)
package {
public class GameData {
public const OPPOSITE_TEAM_SPEED:Number = 6;
public const TEAM_NAME:String = "Player 1";
public const GRAVITY:Number = 1;
public const PLAYER_SPEED:Number = 5;
public const GAME_TIME:uint = 90;
private var _touchDown:Boolean;
public var teamPlayerHit:PlayerData;
private var _gameTime:uint;
private var _gameState:uint;
private var _matchTime:uint;
private var _gameOver:Boolean;
private var _gameLevel:uint;
public var numOfLevels:uint;
private var _totalScore:uint;
private var _currentAnimation:Object;
private var _matchScore:uint;
public var teamLevelData:Array;
private var _oppositeScore:uint;
private var _playerScore:uint;
public static const GAME_STATE_GAMEOVER:uint = 6;
public static const GAME_STATE_RUNNING:uint = 0;
public static const MAP_HEIGHT:Number = 900;
public static const GAME_STATE_TIMES_UP:uint = 8;
public static const ANIMATION_FIELD_ZOOM_OUT:uint = 0;
public static const GAME_STATE_SCORING:uint = 1;
public static const GAME_STATE_HIT:uint = 4;
public static const GAME_STATE_HIT_WHILE_BALL_ON_GROUND:uint = 10;
public static const ANIMATION_FOCUS_ON_PLAYER:uint = 2;
public static const ANIMATION_GOAL_ZOOM_IN:uint = 1;
public static const GAME_STATE_KICKING:uint = 2;
public static const MAP_WIDTH:Number = 1180;
public static const GAME_STATE_TOUCHDOWN:uint = 3;
public static const GAME_STATE_BALL_ON_GROUND:uint = 5;
public static const GAME_STATE_TOUCHDOWN_CELEBRATION:uint = 12;
public static const GAME_STATE_TIMES_UP_WHILE_BALL_IN_AIR:uint = 11;
public static const GAME_STATE_BALL_IN_AIR:uint = 7;
public static const GAME_STATE_HIT_WHILE_BALL_IN_AIR:uint = 9;
public static const ANIMATION_FOCUS_ON_PLAYER_CELEBRATING:uint = 3;
public function GameData():void{
var _local1:LevelData;
var _local2:Array;
super();
teamLevelData = new Array();
_currentAnimation = new Object();
_local1 = new LevelData();
_local1.teamName = "Mangles";
_local1.closureIdentification = 200;
_local1.teamColor1 = 0xFFFFFF;
_local1.teamColor2 = 0;
_local1.headStyle = PlayerData.HEAD_STYLE_HELMET;
_local2 = [500, 150, 500, (MAP_HEIGHT / 2), 700, 210];
_local1.addPlayer(_local2);
_local2 = [550, (MAP_HEIGHT / 2), 550, MAP_HEIGHT, 700, 210];
_local1.addPlayer(_local2);
teamLevelData.push(_local1);
_local1 = new LevelData();
_local1.teamName = "Kittens";
_local1.closureIdentification = 200;
_local1.teamColor1 = 0xCC0000;
_local1.teamColor2 = 0xFFFFFF;
_local1.headStyle = PlayerData.HEAD_STYLE_HELMET;
_local2 = [700, 150, 300, 150, 900, 400];
_local1.addPlayer(_local2);
_local2 = [700, (MAP_HEIGHT / 2), 300, (MAP_HEIGHT / 2), 400, 50];
_local1.addPlayer(_local2);
_local2 = [700, (MAP_HEIGHT - 200), 300, (MAP_HEIGHT - 200), 700, 700];
_local1.addPlayer(_local2);
teamLevelData.push(_local1);
_local1 = new LevelData();
_local1.teamName = "Monkeys";
_local1.closureIdentification = 250;
_local1.teamColor1 = 0xFF00FF;
_local1.teamColor2 = 0;
_local1.headStyle = PlayerData.HEAD_STYLE_MOHAWK;
_local2 = [500, 150, 500, (MAP_HEIGHT / 2), 700, 210];
_local1.addPlayer(_local2);
_local2 = [550, (MAP_HEIGHT / 2), 550, MAP_HEIGHT, 700, 210];
_local1.addPlayer(_local2);
_local2 = [550, (MAP_HEIGHT - 200), 550, (MAP_HEIGHT / 4), 700, 300];
_local1.addPlayer(_local2);
teamLevelData.push(_local1);
_local1 = new LevelData();
_local1.teamName = "Hooligans";
_local1.closureIdentification = 150;
_local1.teamColor1 = 51;
_local1.teamColor2 = 15323962;
_local1.headStyle = PlayerData.HEAD_STYLE_MOHAWK;
_local2 = [700, 150, 300, 150, 900, 400];
_local1.addPlayer(_local2);
_local2 = [800, 300, 400, 300, 900, 400];
_local1.addPlayer(_local2);
_local2 = [700, 450, 300, 450, 400, 50];
_local1.addPlayer(_local2);
_local2 = [800, 600, 400, 600, 900, 400];
_local1.addPlayer(_local2);
_local2 = [700, 750, 300, 750, 700, 700];
_local1.addPlayer(_local2);
teamLevelData.push(_local1);
_local1 = new LevelData();
_local1.teamName = "Jockeys";
_local1.closureIdentification = 150;
_local1.teamColor1 = 1590111;
_local1.teamColor2 = 6493268;
_local1.headStyle = PlayerData.HEAD_STYLE_HELMET_WITH_SPIKES;
_local2 = [700, 150, 300, 150, 900, 400];
_local1.addPlayer(_local2);
_local2 = [600, 100, 400, 200, 700, 400];
_local1.addPlayer(_local2);
_local2 = [700, 450, 300, 450, 400, 50];
_local1.addPlayer(_local2);
_local2 = [800, 300, 400, 800, 500, 400];
_local1.addPlayer(_local2);
_local2 = [200, 350, 300, 750, 100, 700];
_local1.addPlayer(_local2);
teamLevelData.push(_local1);
numOfLevels = 5;
}
public function set gameLevel(_arg1:uint):void{
_gameLevel = _arg1;
}
public function get touchDown():Boolean{
return (_touchDown);
}
public function set touchDown(_arg1:Boolean){
_touchDown = _arg1;
}
public function get currentAnimation():Object{
return (_currentAnimation);
}
public function set currentAnimation(_arg1:Object):void{
_currentAnimation = _arg1;
}
public function set matchScore(_arg1:uint):void{
_matchScore = _arg1;
}
public function get playerScore():uint{
return (_playerScore);
}
public function get matchTime():uint{
return (_matchTime);
}
public function get totalScore():uint{
return (_totalScore);
}
public function get gameLevel():uint{
return (_gameLevel);
}
public function get gameState():uint{
return (_gameState);
}
public function set gameOver(_arg1:Boolean):void{
_gameOver = _arg1;
}
public function set oppositeScore(_arg1:uint):void{
_oppositeScore = _arg1;
}
public function set gameTime(_arg1:uint):void{
_gameTime = _arg1;
}
public function set totalScore(_arg1:uint):void{
_totalScore = _arg1;
}
public function set matchTime(_arg1:uint):void{
_matchTime = _arg1;
}
public function get matchScore():uint{
return (_matchScore);
}
public function set playerScore(_arg1:uint):void{
_playerScore = _arg1;
}
public function get gameTime():uint{
return (_gameTime);
}
public function get oppositeScore():uint{
return (_oppositeScore);
}
public function get gameOver():Boolean{
return (_gameOver);
}
public function set gameState(_arg1:uint):void{
_gameState = _arg1;
trace(("Game state is " + _gameState));
}
}
}//package
Section 34
//GameSounds (GameSounds)
package {
import flash.events.*;
import flash.media.*;
public class GameSounds {
private var _soundChannels:SoundChannel;
private var _isMute:Boolean;
private var _menuVS:Sound;
private var _menuRiff2Sound:Sound;
private var _menuSelectSound:Sound;
private var _menuRiffSound:Sound;
private var _crowdGoal:Sound;
private var _menuGameOverSound:Sound;
private var _crowd:Sound;
private var _menuRiffCount:uint;
public function GameSounds(){
_crowd = new SCrowd();
_crowdGoal = new SCrowd2();
_menuRiffSound = new SMenuRiff();
_menuRiff2Sound = new SMenuRiff2();
_menuSelectSound = new SMenuSelect();
_menuGameOverSound = new SGameOver();
_menuVS = new SVSMenu();
super();
}
public function isMute():Boolean{
return (_isMute);
}
public function stopCrowd():void{
if (_soundChannels != null){
_soundChannels.removeEventListener(Event.SOUND_COMPLETE, handleCrowd);
_soundChannels.stop();
};
}
public function playCrowdGoal():void{
if (_isMute){
return;
};
try {
_crowdGoal.play();
} catch(err:Error) {
};
}
public function playMenuRiff():void{
if (_isMute){
return;
};
try {
this._menuRiffCount = 0;
_soundChannels = _menuRiffSound.play(0, 4);
if (_soundChannels != null){
_soundChannels.soundTransform = new SoundTransform();
_soundChannels.addEventListener(Event.SOUND_COMPLETE, handleMenuRiff);
};
} catch(err:Error) {
};
}
public function mute():void{
_isMute = true;
stopCrowd();
stopMenuRiff();
}
public function stopMenuRiff():void{
if (_soundChannels != null){
_soundChannels.stop();
};
}
public function playCrowd():void{
if (_isMute){
return;
};
try {
_soundChannels = _crowd.play(0, 40);
if (_soundChannels != null){
_soundChannels.addEventListener(Event.SOUND_COMPLETE, handleCrowd);
};
} catch(err:Error) {
};
}
public function playMenuSelectSound():void{
if (_isMute){
return;
};
_menuSelectSound.play();
}
public function setCrowdVolume(_arg1:Number):void{
if (_soundChannels != null){
_soundChannels.soundTransform = new SoundTransform(_arg1, 0);
};
}
private function handleCrowd(_arg1:Event):void{
var evt = _arg1;
if (_isMute){
return;
};
try {
_soundChannels = _menuRiffSound.play(0, 40);
if (_soundChannels != null){
_soundChannels.addEventListener(Event.SOUND_COMPLETE, handleCrowd);
};
} catch(err:Error) {
};
}
public function playVSMenu():void{
if (_isMute){
return;
};
try {
_menuVS.play();
} catch(err:Error) {
};
}
public function unmute():void{
_isMute = false;
}
public function playGameOverMenu():void{
if (_isMute){
return;
};
try {
_menuGameOverSound.play();
} catch(err:Error) {
};
}
private function handleMenuRiff(_arg1:Event):void{
var evt = _arg1;
if (_isMute){
return;
};
try {
this._menuRiffCount++;
_menuRiff2Sound.play();
_soundChannels = _menuRiffSound.play(0, 4);
if (_soundChannels != null){
_soundChannels.addEventListener(Event.SOUND_COMPLETE, handleMenuRiff);
};
} catch(err:Error) {
};
}
}
}//package
Section 35
//KickMeter (KickMeter)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.ui.*;
public class KickMeter extends MovieClip {
private var _timer:Timer;
private var _kickStrength:Number;
private var _gettingStronger:Boolean;
public var mc_Fill:MovieClip;
private var _returnFunc:Function;
public function KickMeter(_arg1:Function):void{
_timer = new Timer(10);
_returnFunc = _arg1;
initMeter();
}
private function handleKeyUp(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.SPACE){
removeEventListener(KeyboardEvent.KEY_UP, handleKeyUp);
removeEventListener(TimerEvent.TIMER, handleTimerEvent);
_timer.stop();
_returnFunc.call();
};
}
private function handleKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.SPACE){
removeEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown);
addEventListener(KeyboardEvent.KEY_UP, handleKeyUp);
_gettingStronger = true;
_kickStrength = 0;
mc_Fill.width = 0;
_timer.start();
};
}
private function initMeter():void{
this.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown);
_timer.addEventListener(TimerEvent.TIMER, handleTimerEvent);
}
private function handleTimerEvent(_arg1:TimerEvent):void{
if (_gettingStronger){
_kickStrength = (_kickStrength + 5);
} else {
_kickStrength = (_kickStrength - 5);
};
mc_Fill.width = (152 * (_kickStrength / 200));
if (_kickStrength >= 200){
_gettingStronger = false;
} else {
if (_kickStrength <= 0){
_gettingStronger = true;
};
};
}
public function get kickStrength():Number{
return (_kickStrength);
}
public function stopMeter():void{
_timer.stop();
removeEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown);
removeEventListener(KeyboardEvent.KEY_UP, handleKeyUp);
removeEventListener(TimerEvent.TIMER, handleTimerEvent);
}
}
}//package
Section 36
//LevelData (LevelData)
package {
public class LevelData {
private var _playerPath:Array;
private var _teamColor1:uint;
private var _teamColor2:uint;
private var _closureIdentification:uint;
private var _teamName:String;
private var _headStyle:String;
public function LevelData():void{
_playerPath = new Array();
}
public function getAllPaths():Array{
return (_playerPath);
}
public function get teamName():String{
return (_teamName);
}
public function get closureIdentification():uint{
return (_closureIdentification);
}
public function set teamName(_arg1:String):void{
_teamName = _arg1;
}
public function set closureIdentification(_arg1:uint):void{
_closureIdentification = _arg1;
}
public function getPlayer(_arg1:uint):Array{
return (_playerPath[_arg1]);
}
public function set teamColor2(_arg1:uint):void{
_teamColor2 = _arg1;
}
public function set teamColor1(_arg1:uint):void{
_teamColor1 = _arg1;
}
public function addPlayer(_arg1:Array):void{
_playerPath.push(_arg1);
}
public function set headStyle(_arg1:String):void{
_headStyle = _arg1;
}
public function get teamColor1():uint{
return (_teamColor1);
}
public function get teamColor2():uint{
return (_teamColor2);
}
public function get headStyle():String{
return (_headStyle);
}
}
}//package
Section 37
//Main (Main)
package {
import flash.display.*;
import flash.events.*;
import fl.transitions.easing.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
public class Main extends MovieClip {
private var playerData:PlayerData;
private var matchTimeTimer:Timer;
private var mc_Message:MovieClip;
private var gameTimer:Timer;
private var logoMc:Sprite;
private var btnMute:MovieClip;
private var mc_Menu1:MovieClip;
private var myKickStrength:Number;
private var mc_Menu2:MovieClip;
private var gameData:GameData;
private var mc_Field:SpriteField;
private var mc_Map:SpriteMap;
private var _isLogin:String;
private var mc_Ball:SourceBall;
private var mc_KickMeter:KickMeter;
private var _highScoreFunction:Function;
private var teamData:TeamData;
private var returnToMainMenu:Boolean;
private var animTimer:Timer;
private var btn_FullScreen:SimpleButton;
private var gameSounds:GameSounds;
private var _stage:Stage;
public function Main():void{
addFrameScript(0, frame1);
gameData = new GameData();
gameSounds = new GameSounds();
gameTimer = new Timer(20);
animTimer = new Timer(1);
animTimer.addEventListener(TimerEvent.TIMER, handleAnimTimer);
matchTimeTimer = new Timer(1000);
matchTimeTimer.addEventListener(TimerEvent.TIMER, handleMatchTimeTimer);
btnMute = new ButtonMute();
btnMute.buttonMode = true;
btnMute.addEventListener(MouseEvent.CLICK, handleMuteClick);
addChild(btnMute);
btnMute.x = 21;
btnMute.y = 408;
initGame(this.stage, null, "logout");
}
private function animFocusOnPlayer():void{
gameData.currentAnimation.frameNum = 1;
gameData.currentAnimation.numOfFrames = 100;
gameData.currentAnimation.originalX = mc_Field.x;
gameData.currentAnimation.originalY = mc_Field.y;
gameData.currentAnimation.destX = getFieldX();
gameData.currentAnimation.destY = getFieldY();
gameData.currentAnimation.animType = GameData.ANIMATION_FOCUS_ON_PLAYER;
animTimer.start();
}
private function handlePlayerChosen(_arg1:MouseEvent):void{
_stage.removeEventListener(KeyboardEvent.KEY_DOWN, handleChoosePlayerMenuKeyDown);
gameSounds.playMenuSelectSound();
if (_arg1.target.name == "btn_Twee"){
removeChild(mc_Menu2);
gameStart(PlayerData.PLAYER_COLOR_TWEE);
} else {
removeChild(mc_Menu2);
gameStart(PlayerData.PLAYER_COLOR_GEE);
};
}
private function handleKeyUp(_arg1:KeyboardEvent):void{
if (gameData.gameState == GameData.GAME_STATE_RUNNING){
switch (_arg1.keyCode){
case Keyboard.LEFT:
playerData.movingLeft = false;
break;
case Keyboard.RIGHT:
playerData.movingRight = false;
break;
case Keyboard.UP:
playerData.movingUp = false;
break;
case Keyboard.DOWN:
playerData.movingDown = false;
break;
};
};
}
private function initPlayer():void{
playerData.y = ((_stage.stageHeight / 2) - (playerData.height / 2));
playerData.onFieldX = 0;
playerData.onFieldY = ((mc_Field.height / 2) - playerData.height);
playerData.scaleX = Math.abs(playerData.scaleX);
playerData.setNoMovement();
if (playerData.chasing()){
playerData.disableChasePoint();
};
animFocusOnPlayer();
playerData.withBall();
}
public function convert3DToTopViewX(_arg1:Number):Number{
return (((_arg1 - mc_Field.x) - 102.5));
}
public function convert3DToTopViewY(_arg1:Number):Number{
return (((_arg1 - mc_Field.y) - 62.7));
}
private function handleKeyDown(_arg1:KeyboardEvent):void{
if (gameData.gameState == GameData.GAME_STATE_RUNNING){
switch (_arg1.keyCode){
case Keyboard.LEFT:
playerData.movingLeft = true;
break;
case Keyboard.RIGHT:
playerData.movingRight = true;
break;
case Keyboard.UP:
playerData.movingUp = true;
break;
case Keyboard.DOWN:
playerData.movingDown = true;
break;
case Keyboard.SPACE:
if (((!(playerData.standing)) && (!(playerData.ducking)))){
playerData.animDuck();
};
break;
};
};
}
private function animFocusOnPlayerCelebration():void{
gameData.currentAnimation.frameNum = 1;
gameData.currentAnimation.numOfFrames = 20;
gameData.currentAnimation.originalScaleX = mc_Field.scaleX;
gameData.currentAnimation.originalScaleY = mc_Field.scaleY;
gameData.currentAnimation.originalX = mc_Field.x;
gameData.currentAnimation.originalY = mc_Field.y;
gameData.currentAnimation.destX = (playerData.x - 1500);
gameData.currentAnimation.destY = -90;
trace((playerData.y - 600));
gameData.currentAnimation.animType = GameData.ANIMATION_FOCUS_ON_PLAYER_CELEBRATING;
animTimer.start();
}
private function handleNewGame(_arg1:MouseEvent):void{
removeChild(mc_Menu1);
gameSounds.playMenuSelectSound();
_stage.removeEventListener(KeyboardEvent.KEY_DOWN, handleMainMenuKeyDown);
mc_Menu2.btn_Twee.addEventListener(MouseEvent.CLICK, handlePlayerChosen);
mc_Menu2.btn_Gee.addEventListener(MouseEvent.CLICK, handlePlayerChosen);
mc_Menu2.btn_Twee.focusRect = false;
mc_Menu2.btn_Gee.focusRect = false;
_stage.addEventListener(KeyboardEvent.KEY_DOWN, handleChoosePlayerMenuKeyDown);
_stage.focus = mc_Menu2.btn_Twee;
addChild(mc_Menu2);
setChildIndex(logoMc, (numChildren - 1));
setChildIndex(btnMute, (numChildren - 1));
}
function frame1(){
}
private function handleAnimTimer(_arg1:TimerEvent):void{
var _local2:Number;
switch (gameData.currentAnimation.animType){
case GameData.ANIMATION_FIELD_ZOOM_OUT:
_local2 = Regular.easeOut(gameData.currentAnimation.frameNum, 0, 1, gameData.currentAnimation.numOfFrames);
mc_Field.scaleX = (gameData.currentAnimation.originalScaleX - (_local2 * 0.5));
mc_Field.scaleY = (gameData.currentAnimation.originalScaleY - (_local2 * 0.5));
mc_Field.x = (gameData.currentAnimation.originalX + (_local2 * (gameData.currentAnimation.destX - gameData.currentAnimation.originalX)));
mc_Field.y = (gameData.currentAnimation.originalY + (_local2 * (gameData.currentAnimation.destY - gameData.currentAnimation.originalY)));
gameData.currentAnimation.frameNum++;
break;
case GameData.ANIMATION_GOAL_ZOOM_IN:
_local2 = Elastic.easeOut(gameData.currentAnimation.frameNum, 0, 1, gameData.currentAnimation.numOfFrames);
mc_Field.scaleX = (gameData.currentAnimation.originalScaleX + (_local2 * (1 - gameData.currentAnimation.originalScaleX)));
mc_Field.scaleY = (gameData.currentAnimation.originalScaleY + (_local2 * (1 - gameData.currentAnimation.originalScaleY)));
mc_Field.x = (gameData.currentAnimation.originalX + (_local2 * (gameData.currentAnimation.destX - gameData.currentAnimation.originalX)));
mc_Field.y = (gameData.currentAnimation.originalY + (_local2 * (gameData.currentAnimation.destY - gameData.currentAnimation.originalY)));
gameData.currentAnimation.frameNum++;
break;
case GameData.ANIMATION_FOCUS_ON_PLAYER:
_local2 = Elastic.easeOut(gameData.currentAnimation.frameNum, 0, 1, gameData.currentAnimation.numOfFrames);
mc_Field.scaleX = 1;
mc_Field.scaleY = 1;
mc_Field.x = (gameData.currentAnimation.originalX + (_local2 * (gameData.currentAnimation.destX - gameData.currentAnimation.originalX)));
mc_Field.y = (gameData.currentAnimation.originalY + (_local2 * (gameData.currentAnimation.destY - gameData.currentAnimation.originalY)));
gameData.currentAnimation.frameNum++;
break;
case GameData.ANIMATION_FOCUS_ON_PLAYER_CELEBRATING:
_local2 = Regular.easeOut(gameData.currentAnimation.frameNum, 0, 1, gameData.currentAnimation.numOfFrames);
mc_Field.scaleX = (gameData.currentAnimation.originalScaleX - (_local2 * 0.5));
mc_Field.scaleY = (gameData.currentAnimation.originalScaleY - (_local2 * 0.5));
mc_Field.x = (gameData.currentAnimation.originalX + (_local2 * (gameData.currentAnimation.destX - gameData.currentAnimation.originalX)));
mc_Field.y = (gameData.currentAnimation.originalY + (_local2 * (gameData.currentAnimation.destY - gameData.currentAnimation.originalY)));
gameData.currentAnimation.frameNum++;
break;
};
if (gameData.currentAnimation.frameNum > gameData.currentAnimation.numOfFrames){
animTimer.stop();
};
}
private function handleMatchTimeTimer(_arg1:TimerEvent):void{
gameData.matchTime--;
if (gameData.matchTime < 10){
TextField(mc_Map.txtMatchTime).textColor = 0x990000;
} else {
TextField(mc_Map.txtMatchTime).textColor = 0xFFFFFF;
};
mc_Map.txtMatchTime.text = convertTime();
if (gameData.matchTime == 0){
trace("match over");
if (gameData.gameState == GameData.GAME_STATE_SCORING){
if (mc_KickMeter != null){
mc_KickMeter.stopMeter();
mc_Map.removeChild(mc_KickMeter);
mc_KickMeter = null;
};
_stage.focus = _stage;
};
if (gameData.gameState == GameData.GAME_STATE_BALL_IN_AIR){
gameData.gameState = GameData.GAME_STATE_TIMES_UP_WHILE_BALL_IN_AIR;
matchTimeTimer.stop();
};
gameData.gameState = GameData.GAME_STATE_TIMES_UP;
matchTimeTimer.stop();
gameTimer.stop();
gameOver();
if (gameData.playerScore > gameData.oppositeScore){
mc_Message = new SpriteYouWin();
mc_Message.btn_SendScore.visible = true;
if (gameData.gameLevel == gameData.numOfLevels){
returnToMainMenu = true;
mc_Message.txtScore.text = (gameData.totalScore + gameData.playerScore);
mc_Message.btn_SendScore.addEventListener(MouseEvent.CLICK, handleSendScore);
} else {
mc_Message.txtScore.text = gameData.playerScore;
mc_Message.btn_SendScore.visible = false;
};
mc_Message.btn_PlayAgain.addEventListener(MouseEvent.CLICK, handlePlayAgain);
addChild(mc_Message);
setChildIndex(logoMc, (numChildren - 1));
setChildIndex(btnMute, (numChildren - 1));
} else {
gameOverScreen();
};
};
}
private function animZoomInGoal():void{
gameData.currentAnimation.frameNum = 1;
gameData.currentAnimation.numOfFrames = 100;
gameData.currentAnimation.originalX = mc_Field.x;
gameData.currentAnimation.originalY = mc_Field.y;
gameData.currentAnimation.originalScaleX = mc_Field.scaleX;
gameData.currentAnimation.originalScaleY = mc_Field.scaleY;
gameData.currentAnimation.destX = -1500;
gameData.currentAnimation.destY = 0;
gameData.currentAnimation.animType = GameData.ANIMATION_GOAL_ZOOM_IN;
animTimer.start();
}
private function handleMainMenuKeyDown(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case Keyboard.LEFT:
_stage.focus = mc_Menu1.btn_Start;
break;
case Keyboard.RIGHT:
_stage.focus = mc_Menu1.btn_Start;
break;
case Keyboard.SPACE:
SimpleButton(_stage.focus).dispatchEvent(new MouseEvent(MouseEvent.CLICK));
break;
};
}
private function handleKick():void{
myKickStrength = (mc_KickMeter.kickStrength / 6);
playerData.animKicking(afterKickAnimation);
mc_Map.removeChild(mc_KickMeter);
mc_KickMeter = null;
_stage.focus = _stage;
}
private function handleStartTheMotherFuckingGame(_arg1:Event):void{
var _local2:LevelData;
var _local3:PlayerData;
if (MovieClip(_arg1.target).currentFrame == MovieClip(_arg1.target).totalFrames){
mc_Menu1.removeEventListener(Event.ENTER_FRAME, handleStartTheMotherFuckingGame);
removeChild(mc_Menu1);
_stage.focus = _stage;
_stage.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown);
_stage.addEventListener(KeyboardEvent.KEY_UP, handleKeyUp);
gameTimer.addEventListener(TimerEvent.TIMER, handleGameTimer);
initPlayer();
_local2 = gameData.teamLevelData[(gameData.gameLevel - 1)];
teamData = new TeamData(_local2.closureIdentification, _local2.teamColor1, _local2.teamColor2, _local2.headStyle, mc_Field, _local2.getAllPaths());
for each (_local3 in teamData.playersData) {
mc_Map.addPlayer(_local3, _local2.teamColor1, _local2.teamColor2);
};
mc_Map.txtMatchTime.text = convertTime();
mc_Map.txtPlayerScore.text = String(gameData.playerScore);
mc_Map.txtOppositeScore.text = String(gameData.oppositeScore);
mc_Map.txtOppositeTeamName.text = _local2.teamName;
matchTimeTimer.start();
gameTimer.start();
};
}
public function restartGame():void{
removeChild(mc_Message);
mc_Message = null;
gameData.gameLevel++;
if (returnToMainMenu){
gotoMainMenu();
} else {
newGame(gameData.gameLevel);
};
}
private function handleSendScore(_arg1:MouseEvent):void{
mc_Message.btn_SendScore.removeEventListener(MouseEvent.CLICK, handleSendScore);
mc_Message.btn_PlayAgain.removeEventListener(MouseEvent.CLICK, handlePlayAgain);
_highScoreFunction.call(this, gameData.totalScore);
}
private function showMainMenu():void{
mc_Menu1 = new SpriteMainMenu();
mc_Menu2 = new SpriteChoosePlayer();
mc_Menu1.btn_Start.addEventListener(MouseEvent.CLICK, handleNewGame);
mc_Menu1.btn_Start.focusRect = false;
_stage.addEventListener(KeyboardEvent.KEY_DOWN, handleMainMenuKeyDown);
_stage.focus = mc_Menu1.btn_Start;
gameSounds.playMenuRiff();
addChild(mc_Menu1);
logoMc = new tweegeeLogo();
logoMc.x = (stage.stageWidth - logoMc.width);
logoMc.y = 0;
logoMc.addEventListener(MouseEvent.CLICK, handleLogoClick);
logoMc.buttonMode = true;
addChild(logoMc);
setChildIndex(btnMute, (numChildren - 1));
}
function handleEndOfIntroAnim(_arg1:Event):void{
if (_arg1.target.currentFrame == _arg1.target.totalFrames){
removeChild(MovieClip(_arg1.target));
showMainMenu();
MovieClip(_arg1.target).removeEventListener(Event.ENTER_FRAME, handleEndOfIntroAnim);
};
}
private function handleChoosePlayerMenuKeyDown(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case Keyboard.LEFT:
_stage.focus = mc_Menu2.btn_Twee;
break;
case Keyboard.RIGHT:
_stage.focus = mc_Menu2.btn_Gee;
break;
case Keyboard.SPACE:
SimpleButton(_stage.focus).dispatchEvent(new MouseEvent(MouseEvent.CLICK));
break;
};
}
public function initGame(_arg1:Stage, _arg2:Function, _arg3:String):void{
_isLogin = _arg3;
_stage = _arg1;
_highScoreFunction = _arg2;
showMainMenu();
}
private function handleGameTimer(_arg1:TimerEvent):void{
var currentPlayer:PlayerData;
var playersDistance:uint;
var myPointX:Number;
var myPointY:Number;
var i:int;
var childList:Array;
var evt = _arg1;
if (gameData.gameState == GameData.GAME_STATE_RUNNING){
if (playerData.movingLeft){
if (((((playerData.x - gameData.PLAYER_SPEED) - playerData.PLAYER_PADDING) - (PlayerData.PLAYER_WIDTH / 2)) + mc_Field.x) < 0){
if ((mc_Field.x + gameData.PLAYER_SPEED) < 0){
mc_Field.x = (mc_Field.x + gameData.PLAYER_SPEED);
playerData.onFieldX = (playerData.onFieldX - gameData.PLAYER_SPEED);
};
} else {
playerData.onFieldX = (playerData.onFieldX - gameData.PLAYER_SPEED);
};
};
if (playerData.movingRight){
if ((((((playerData.x + gameData.PLAYER_SPEED) + playerData.PLAYER_PADDING) + playerData.PLAYER_RIGHTSIDE_PADDING) + (PlayerData.PLAYER_WIDTH / 2)) + mc_Field.x) > _stage.stageWidth){
if (((-(mc_Field.x) + _stage.stageWidth) + gameData.PLAYER_SPEED) < mc_Field.mc_Grass.width){
mc_Field.x = (mc_Field.x - gameData.PLAYER_SPEED);
playerData.onFieldX = (playerData.onFieldX + gameData.PLAYER_SPEED);
};
} else {
playerData.onFieldX = (playerData.onFieldX + gameData.PLAYER_SPEED);
};
};
if (playerData.movingUp){
if ((((playerData.y - gameData.PLAYER_SPEED) - playerData.PLAYER_PADDING) + mc_Field.y) < 0){
if ((mc_Field.y + gameData.PLAYER_SPEED) < 0){
mc_Field.y = (mc_Field.y + gameData.PLAYER_SPEED);
playerData.onFieldY = (playerData.onFieldY - gameData.PLAYER_SPEED);
};
} else {
playerData.onFieldY = (playerData.onFieldY - gameData.PLAYER_SPEED);
};
};
if (playerData.movingDown){
if (((((playerData.y + gameData.PLAYER_SPEED) + playerData.height) + playerData.PLAYER_PADDING) + mc_Field.y) > _stage.stageHeight){
if (((mc_Field.y - gameData.PLAYER_SPEED) - _stage.stageHeight) > (-(mc_Field.mc_Grass.height) - mc_Field.mc_Grass.y)){
mc_Field.y = (mc_Field.y - gameData.PLAYER_SPEED);
playerData.onFieldY = (playerData.onFieldY + gameData.PLAYER_SPEED);
};
} else {
playerData.onFieldY = (playerData.onFieldY + gameData.PLAYER_SPEED);
};
};
if ((playerData.onFieldX / GameData.MAP_WIDTH) > 0.6){
gameSounds.setCrowdVolume(((playerData.onFieldX / GameData.MAP_WIDTH) + 0.3));
} else {
gameSounds.setCrowdVolume(0.6);
};
playerData.x = convertTopViewTo3DX(playerData.onFieldX);
playerData.y = convertTopViewTo3DY(playerData.onFieldY);
if (playerData.onFieldX >= 1130){
if (gameData.gameState != GameData.GAME_STATE_SCORING){
animZoomOutField();
mc_KickMeter = new KickMeter(handleKick);
mc_KickMeter.x = mc_Map.mc_MapBound.x;
mc_KickMeter.focusRect = false;
mc_KickMeter.filters = new Array(new DropShadowFilter(0, 45, 0, 1, 7, 7, 1));
mc_Map.addChildAt(mc_KickMeter, 0);
mc_KickMeter.y = ((mc_Map.txtPlayerTeamName.y - mc_KickMeter.height) - 5);
_stage.focus = mc_KickMeter;
gameData.gameState = GameData.GAME_STATE_SCORING;
playerData.animPlacingBall();
for each (currentPlayer in teamData.playersData) {
currentPlayer.setChasePoint(playerData.onFieldX, playerData.onFieldY);
};
};
};
} else {
if ((((((((gameData.gameState == GameData.GAME_STATE_BALL_IN_AIR)) || ((gameData.gameState == GameData.GAME_STATE_TOUCHDOWN)))) || ((gameData.gameState == GameData.GAME_STATE_HIT_WHILE_BALL_IN_AIR)))) || ((gameData.gameState == GameData.GAME_STATE_TIMES_UP_WHILE_BALL_IN_AIR)))){
mc_Ball.x = (mc_Ball.x + mc_Ball.speedX);
mc_Ball.y = (mc_Ball.y - mc_Ball.speedY);
mc_Ball.rotation = (mc_Ball.rotation + 60);
mc_Ball.speedY = (mc_Ball.speedY - gameData.GRAVITY);
if (mc_Ball.y > (mc_Ball.originalY + 10)){
if (gameData.gameState == GameData.GAME_STATE_HIT_WHILE_BALL_IN_AIR){
gameData.gameState = GameData.GAME_STATE_HIT_WHILE_BALL_ON_GROUND;
} else {
gameData.gameState = GameData.GAME_STATE_BALL_ON_GROUND;
};
if (gameData.gameState == GameData.GAME_STATE_TIMES_UP_WHILE_BALL_IN_AIR){
gameTimer.stop();
gameOver();
if (gameData.playerScore > gameData.oppositeScore){
gameData.gameLevel++;
newGame(gameData.gameLevel);
} else {
gameOverScreen();
};
} else {
if (gameData.touchDown){
gameData.touchDown = false;
gameData.gameState = GameData.GAME_STATE_TOUCHDOWN_CELEBRATION;
playerData.animHappy();
animFocusOnPlayerCelebration();
setTimeout(function (){
myRestartGame();
mc_Field.removeChild(mc_Ball);
}, 4000);
} else {
setTimeout(function (){
myRestartGame();
mc_Field.removeChild(mc_Ball);
}, 1000);
};
};
};
if (gameData.gameState != GameData.GAME_STATE_TOUCHDOWN){
if ((((((((mc_Ball.x > mc_Field.mc_Bound.x)) && ((mc_Ball.x < (mc_Field.mc_Bound.x + mc_Field.mc_Bound.width))))) && ((mc_Ball.y > mc_Field.mc_Bound.y)))) && ((mc_Ball.y < (mc_Field.mc_Bound.y + mc_Field.mc_Bound.height))))){
gameData.gameState = GameData.GAME_STATE_TOUCHDOWN;
gameData.touchDown = true;
animZoomInGoal();
gameSounds.playCrowdGoal();
for each (currentPlayer in teamData.playersData) {
currentPlayer.setChasePoint((Math.random() * GameData.MAP_WIDTH), (Math.random() * GameData.MAP_HEIGHT));
};
mc_Map.mc_Team1Flag.play();
mc_Field.swapChildren(mc_Ball, mc_Field.mc_Bound);
gameData.playerScore++;
mc_Map.txtPlayerScore.text = String(gameData.playerScore);
trace("GOOOOALLL!");
};
};
} else {
if (gameData.gameState == GameData.GAME_STATE_TOUCHDOWN){
};
};
};
for each (currentPlayer in teamData.playersData) {
if (gameData.gameState == GameData.GAME_STATE_TOUCHDOWN_CELEBRATION){
playerData.x = (playerData.x + (-(Math.random()) * 2));
playerData.y = (playerData.y + ((Math.random() * 4) - 2));
};
if (gameData.teamPlayerHit != currentPlayer){
if (!currentPlayer.chasing()){
myPointX = currentPlayer.pathData[currentPlayer.nextPointInPath].pointX;
myPointY = currentPlayer.pathData[currentPlayer.nextPointInPath].pointY;
} else {
myPointX = currentPlayer.getChasePoint().pointX;
myPointY = currentPlayer.getChasePoint().pointY;
};
if (currentPlayer.onFieldX != myPointX){
if (currentPlayer.onFieldX > myPointX){
currentPlayer.onFieldX = (currentPlayer.onFieldX - gameData.OPPOSITE_TEAM_SPEED);
currentPlayer.movingLeft = true;
currentPlayer.movingRight = false;
if (currentPlayer.onFieldX < myPointX){
currentPlayer.onFieldX = myPointX;
};
} else {
if (currentPlayer.onFieldX < myPointX){
currentPlayer.onFieldX = (currentPlayer.onFieldX + gameData.OPPOSITE_TEAM_SPEED);
currentPlayer.movingRight = true;
currentPlayer.movingLeft = false;
if (currentPlayer.onFieldX > myPointX){
currentPlayer.onFieldX = myPointX;
};
};
};
} else {
currentPlayer.movingRight = false;
currentPlayer.movingLeft = false;
};
if (currentPlayer.onFieldY != myPointY){
if (currentPlayer.onFieldY > myPointY){
currentPlayer.onFieldY = (currentPlayer.onFieldY - gameData.OPPOSITE_TEAM_SPEED);
currentPlayer.movingUp = true;
currentPlayer.movingDown = false;
if (currentPlayer.onFieldY < myPointY){
currentPlayer.onFieldY = myPointY;
};
} else {
if (currentPlayer.onFieldY < myPointY){
currentPlayer.onFieldY = (currentPlayer.onFieldY + gameData.OPPOSITE_TEAM_SPEED);
currentPlayer.movingDown = true;
currentPlayer.movingUp = false;
if (currentPlayer.onFieldY > myPointY){
currentPlayer.onFieldY = myPointY;
};
};
};
} else {
currentPlayer.movingDown = false;
currentPlayer.movingUp = false;
};
if ((((((((currentPlayer.onFieldX > (myPointX - 5))) && ((currentPlayer.onFieldX < (myPointX + 5))))) && ((currentPlayer.onFieldY > (myPointY - 5))))) && ((currentPlayer.onFieldY < (myPointY + 5))))){
if (currentPlayer.chasing()){
currentPlayer.disableChasePoint();
};
currentPlayer.setNextPathPoint();
};
currentPlayer.scaleX = ((Math.abs(currentPlayer.scaleX) / currentPlayer.scaleX) * (((currentPlayer.onFieldY * 0.2) / GameData.MAP_HEIGHT) + 1));
currentPlayer.scaleY = Math.abs(currentPlayer.scaleX);
if (gameData.gameState != GameData.GAME_STATE_TOUCHDOWN){
playersDistance = Math.sqrt((Math.pow((currentPlayer.x - playerData.x), 2) + (Math.pow((currentPlayer.y - playerData.y), 2) * 16)));
if (playersDistance < teamData.closureIdentification){
currentPlayer.setChasePoint(playerData.onFieldX, playerData.onFieldY);
};
if ((((((((gameData.gameState == GameData.GAME_STATE_RUNNING)) || ((gameData.gameState == GameData.GAME_STATE_SCORING)))) || ((gameData.gameState == GameData.GAME_STATE_BALL_IN_AIR)))) || ((gameData.gameState == GameData.GAME_STATE_BALL_ON_GROUND)))){
if (playersDistance < 80){
if (playerData.x < currentPlayer.x){
currentPlayer.scaleX = -(Math.abs(currentPlayer.scaleX));
} else {
if (playerData.x > currentPlayer.x){
currentPlayer.scaleX = Math.abs(currentPlayer.scaleX);
};
};
currentPlayer.animHitting();
gameData.teamPlayerHit = currentPlayer;
setTimeout(function (){
gameData.teamPlayerHit = null;
}, 1500);
if (!playerData.ducking){
if (playerData.x < currentPlayer.x){
playerData.scaleX = Math.abs(playerData.scaleX);
} else {
if (playerData.x > currentPlayer.x){
playerData.scaleX = -(Math.abs(playerData.scaleX));
};
};
if (((!((gameData.gameState == GameData.GAME_STATE_HIT))) && (!((gameData.gameState == GameData.GAME_STATE_HIT_WHILE_BALL_IN_AIR))))){
playerData.animBeingHit();
};
if (gameData.gameState == GameData.GAME_STATE_BALL_IN_AIR){
gameData.gameState = GameData.GAME_STATE_HIT_WHILE_BALL_IN_AIR;
} else {
if (gameData.gameState == GameData.GAME_STATE_BALL_ON_GROUND){
gameData.gameState = GameData.GAME_STATE_HIT_WHILE_BALL_ON_GROUND;
} else {
if (((!((gameData.gameState == GameData.GAME_STATE_HIT))) && (!((gameData.gameState == GameData.GAME_STATE_HIT_WHILE_BALL_IN_AIR))))){
setTimeout(function (){
myRestartGame();
}, 1500);
trace("restarting");
if (gameData.gameState == GameData.GAME_STATE_SCORING){
if (mc_KickMeter != null){
mc_KickMeter.stopMeter();
mc_Map.removeChild(mc_KickMeter);
mc_KickMeter = null;
};
_stage.focus = _stage;
};
gameData.gameState = GameData.GAME_STATE_HIT;
};
};
};
};
};
};
};
};
};
playerData.scaleX = ((Math.abs(playerData.scaleX) / playerData.scaleX) * (((-(mc_Field.y) * 0.2) / GameData.MAP_HEIGHT) + 1));
playerData.scaleY = Math.abs(playerData.scaleX);
if (gameData.gameState != GameData.GAME_STATE_TOUCHDOWN){
childList = new Array();
i = mc_Field.numChildren;
while ((i = (i - 1)), i) {
childList[i] = mc_Field.getChildAt(i);
};
childList.sortOn("y", Array.NUMERIC);
i = mc_Field.numChildren;
while ((i = (i - 1)), i) {
if (childList[i] != mc_Field.getChildAt(i)){
mc_Field.setChildIndex(childList[i], i);
};
};
};
for each (currentPlayer in teamData.playersData) {
currentPlayer.x = convertTopViewTo3DX(currentPlayer.onFieldX);
currentPlayer.y = convertTopViewTo3DY(currentPlayer.onFieldY);
};
mc_Map.redrawMap();
}
private function convertTime():String{
var _local1:uint;
var _local2:uint;
_local1 = Math.floor((gameData.matchTime / 60));
_local2 = (gameData.matchTime % 60);
return (((((_local1)<10) ? ("0" + String(_local1)) : String(_local1) + ":") + ((_local2)<10) ? ("0" + String(_local2)) : String(_local2)));
}
private function gotoMainMenu():void{
returnToMainMenu = false;
removeChild(mc_Field);
removeChild(mc_Map);
showMainMenu();
}
private function handlePlayAgain(_arg1:MouseEvent):void{
mc_Message.btn_SendScore.removeEventListener(MouseEvent.CLICK, handleSendScore);
mc_Message.btn_PlayAgain.removeEventListener(MouseEvent.CLICK, handlePlayAgain);
removeChild(mc_Message);
gameData.gameLevel++;
if (returnToMainMenu){
gotoMainMenu();
} else {
newGame(gameData.gameLevel);
};
}
private function myRestartGame():void{
initPlayer();
gameData.gameState = GameData.GAME_STATE_RUNNING;
}
private function afterKickAnimation():void{
mc_Ball.x = (playerData.x + 10);
mc_Ball.y = ((playerData.y + playerData.height) - mc_Ball.height);
mc_Ball.originalY = mc_Ball.y;
mc_Ball.scaleX = 0.5;
mc_Ball.scaleY = 0.5;
mc_Ball.speedX = (myKickStrength / 2);
mc_Ball.speedY = myKickStrength;
playerData.withoutBall();
mc_Field.addChild(mc_Ball);
gameData.gameState = GameData.GAME_STATE_BALL_IN_AIR;
}
private function handleLogoClick(_arg1:MouseEvent):void{
var url:String;
var request:URLRequest;
var e = _arg1;
url = "http://www.tweegee.com/ch/main/Affiliation.aspx?AffCamId=2f359c9e-0603-4b54-a09e-e13e8304d8f4";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public function convertTopViewTo3DX(_arg1:Number):Number{
return ((_arg1 + 102.5));
}
public function gameStart(_arg1:String):void{
mc_Field = new SpriteField();
mc_Ball = new SourceBall();
mc_Map = new SpriteMap();
playerData = new PlayerData(((_arg1)=="Twee") ? 0xE6E600 : 8129638, 0, _arg1, PlayerData.HEAD_STYLE_HELMET, PlayerData.BALL_TYPE_FOOTBALL);
addChild(mc_Field);
setChildIndex(logoMc, (numChildren - 1));
mc_Field.addChild(playerData);
mc_Map.addPlayer(playerData, ((_arg1)=="Twee") ? 0xE6E600 : 8129638, 0);
mc_Map.txtPlayerTeamName.text = gameData.TEAM_NAME;
mc_Map.x = 0;
mc_Map.y = 0;
addChild(mc_Map);
gameData.totalScore = 0;
newGame(1);
setChildIndex(logoMc, (numChildren - 1));
setChildIndex(btnMute, (numChildren - 1));
}
public function convertTopViewTo3DY(_arg1:Number):Number{
return ((_arg1 + 62.7));
}
public function getFieldX():Number{
return (-(playerData.onFieldX));
}
public function getFieldY():Number{
return (-(playerData.onFieldY));
}
private function newGame(_arg1:uint):void{
var _local2:LevelData;
var _local3:uint;
var _local4:uint;
var _local5:uint;
mc_Menu1 = new SpriteMenuTeams();
gameData.gameState = GameData.GAME_STATE_RUNNING;
gameData.gameLevel = _arg1;
gameData.totalScore = (gameData.totalScore + gameData.playerScore);
gameData.matchScore = 0;
gameData.playerScore = 0;
gameData.oppositeScore = 0;
gameData.matchTime = gameData.GAME_TIME;
_local2 = gameData.teamLevelData[(_arg1 - 1)];
_local3 = (_local2.teamColor1 >> 16);
_local4 = ((_local2.teamColor1 >> 8) & 0xFF);
_local5 = (_local2.teamColor1 & 0xFF);
mc_Menu1.mc_Player2.mc_Color1.transform.colorTransform = new ColorTransform(0, 0, 0, 0, _local3, _local4, _local5, 0xFF);
mc_Map.mc_Team2Flag.mc_Color1.transform.colorTransform = new ColorTransform(0, 0, 0, 0, _local3, _local4, _local5, 0xFF);
_local3 = (_local2.teamColor2 >> 16);
_local4 = ((_local2.teamColor2 >> 8) & 0xFF);
_local5 = (_local2.teamColor2 & 0xFF);
mc_Map.mc_Team2Flag.mc_Color2.transform.colorTransform = new ColorTransform(0, 0, 0, 0, _local3, _local4, _local5, 0xFF);
_local3 = (playerData.teamColor1 >> 16);
_local4 = ((playerData.teamColor1 >> 8) & 0xFF);
_local5 = (playerData.teamColor1 & 0xFF);
mc_Menu1.mc_Player1.mc_Color1.transform.colorTransform = new ColorTransform(0, 0, 0, 0, _local3, _local4, _local5, 0xFF);
mc_Menu1.mc_Player3.mc_Color1.transform.colorTransform = new ColorTransform(0, 0, 0, 0, _local3, _local4, _local5, 0xFF);
mc_Map.mc_Team1Flag.mc_Color1.transform.colorTransform = new ColorTransform(0, 0, 0, 0, _local3, _local4, _local5, 0xFF);
_local3 = (playerData.teamColor2 >> 16);
_local4 = ((playerData.teamColor2 >> 8) & 0xFF);
_local5 = (playerData.teamColor2 & 0xFF);
mc_Map.mc_Team1Flag.mc_Color2.transform.colorTransform = new ColorTransform(0, 0, 0, 0, _local3, _local4, _local5, 0xFF);
if (playerData.playerType == PlayerData.PLAYER_COLOR_TWEE){
mc_Menu1.mc_Player1.visible = false;
} else {
mc_Menu1.mc_Player3.visible = false;
};
mc_Menu1.txtTeamName1.text = gameData.TEAM_NAME;
mc_Menu1.txtTeamName2.text = _local2.teamName;
mc_Menu1.addEventListener(Event.ENTER_FRAME, handleStartTheMotherFuckingGame);
addChild(mc_Menu1);
setChildIndex(logoMc, (numChildren - 1));
gameSounds.stopMenuRiff();
gameSounds.playCrowd();
gameSounds.playVSMenu();
}
private function handleMuteClick(_arg1:MouseEvent):void{
if (gameSounds.isMute()){
gameSounds.unmute();
btnMute.play();
} else {
gameSounds.mute();
btnMute.stop();
};
}
private function gameOver():void{
var _local1:PlayerData;
_stage.removeEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown);
_stage.removeEventListener(KeyboardEvent.KEY_UP, handleKeyUp);
gameTimer.removeEventListener(TimerEvent.TIMER, handleGameTimer);
for each (_local1 in teamData.playersData) {
mc_Field.removeChild(_local1);
mc_Map.removePlayer(_local1);
};
teamData = null;
gameSounds.stopCrowd();
gameData.gameState = GameData.GAME_STATE_GAMEOVER;
}
private function animZoomOutField():void{
gameData.currentAnimation.frameNum = 1;
gameData.currentAnimation.numOfFrames = 20;
gameData.currentAnimation.originalX = mc_Field.x;
gameData.currentAnimation.originalY = mc_Field.y;
gameData.currentAnimation.originalScaleX = mc_Field.scaleX;
gameData.currentAnimation.originalScaleY = mc_Field.scaleY;
gameData.currentAnimation.destX = (mc_Field.x + 500);
gameData.currentAnimation.destY = (mc_Field.y - (mc_Field.y / 1.4));
gameData.currentAnimation.animType = GameData.ANIMATION_FIELD_ZOOM_OUT;
animTimer.start();
}
private function gameOverScreen():void{
gameTimer.stop();
matchTimeTimer.stop();
gameSounds.playGameOverMenu();
mc_Message = new SpriteYouLose();
returnToMainMenu = true;
if ((gameData.totalScore + gameData.playerScore) == 0){
mc_Message.btn_SendScore.visible = false;
};
mc_Message.txtScore.text = (gameData.totalScore + gameData.playerScore);
mc_Message.btn_SendScore.addEventListener(MouseEvent.CLICK, handleSendScore);
mc_Message.btn_PlayAgain.addEventListener(MouseEvent.CLICK, handlePlayAgain);
addChild(mc_Message);
setChildIndex(logoMc, (numChildren - 1));
setChildIndex(btnMute, (numChildren - 1));
}
}
}//package
Section 38
//PlayerData (PlayerData)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class PlayerData extends MovieClip {
public const PLAYER_PADDING:uint = 60;
public const PLAYER_RIGHTSIDE_PADDING:int = 120;
private var _movement:String;
public var mc_Kicking:MovieClip;
private var _lastState:String;
private var _headStyle:String;
private var _chasePathPoint:Object;
private var playerPositions:Array;
private var _movingRight:Boolean;
private var _onFieldY:Number;
private var _onFieldX:Number;
public var mc_Ducking:MovieClip;
private var _pathData:Array;
public var mc_Happy:MovieClip;
public var mc_PlacingBall:MovieClip;
private var _movingUp:Boolean;
public var mc_Standing:MovieClip;
public var mc_BeingHit:MovieClip;
public var mc_Map:SpritePlayerOnMap;
private var _movingLeft:Boolean;
public var mc_RunningUp:MovieClip;
public var mc_Hitting:MovieClip;
private var _ballType:String;
private var _playerType:String;
private var _ducking:Boolean;
private var visibleMovementSprite:MovieClip;
private var _nextPointInPath:uint;
private var _teamColor1:uint;
private var _teamColor2:uint;
private var _runningInPath:Boolean;
private var _movingDown:Boolean;
public var mc_RunningRight:MovieClip;
private var _animDuckLastState:String;
public var mc_RunningDown:MovieClip;
public static const HEAD_STYLE_HELMET_WITH_SPIKES:String = "HelmetWithSpikes";
public static const PLAYER_WIDTH:int = 63;
public static const HEAD_STYLE_HELMET:String = "Helmet";
public static const PLAYER_COLOR_GEE:String = "Gee";
public static const BALL_TYPE_NOTHING:String = "Nothing";
public static const BALL_TYPE_FOOTBALL:String = "Football";
public static const HEAD_STYLE_MOHAWK:String = "Mohawk";
public static const PLAYER_COLOR_TWEE:String = "Twee";
public static const BALL_TYPE_CHICKEN:String = "Chicken";
public function PlayerData(_arg1:uint, _arg2:uint, _arg3:String, _arg4:String, _arg5:String):void{
mc_Standing.mc_Helmet.gotoAndStop(_arg4);
_headStyle = _arg4;
_ballType = _arg5;
_playerType = _arg3;
playerPositions = new Array();
playerPositions.push(mc_RunningRight);
playerPositions.push(mc_RunningUp);
playerPositions.push(mc_RunningDown);
playerPositions.push(mc_Standing);
playerPositions.push(mc_PlacingBall);
playerPositions.push(mc_Kicking);
playerPositions.push(mc_Hitting);
playerPositions.push(mc_BeingHit);
playerPositions.push(mc_Ducking);
playerPositions.push(mc_Happy);
teamColor1 = _arg1;
teamColor2 = _arg2;
visibleMovementSprite = mc_Standing;
mc_RunningRight.visible = false;
mc_RunningUp.visible = false;
mc_RunningDown.visible = false;
mc_PlacingBall.visible = false;
mc_Kicking.visible = false;
mc_Hitting.visible = false;
mc_BeingHit.visible = false;
mc_Ducking.visible = false;
mc_Happy.visible = false;
_chasePathPoint = new Object();
_chasePathPoint.active = false;
_runningInPath = false;
_pathData = new Array();
}
public function get movingDown():Boolean{
return (_movingDown);
}
public function set movingDown(_arg1:Boolean):void{
_movingDown = _arg1;
animMovement();
}
public function getChasePoint():Object{
return (_chasePathPoint);
}
public function setChasePoint(_arg1:Number, _arg2:Number):void{
_chasePathPoint.pointX = _arg1;
_chasePathPoint.pointY = _arg2;
_chasePathPoint.active = true;
}
public function get standing():Boolean{
return (((((((!(_movingRight)) && (!(_movingLeft)))) && (!(_movingUp)))) && (!(_movingDown))));
}
public function removePathPoint(_arg1:Object):void{
_pathData.splice(_pathData.indexOf(_arg1), 1);
}
public function animDuck():void{
_animDuckLastState = _lastState;
setMovementSprite("mc_Ducking");
_ducking = true;
mc_Ducking.addEventListener(Event.ENTER_FRAME, handleDuckingFinish);
}
public function get movingRight():Boolean{
return (_movingRight);
}
public function get ducking():Boolean{
return (_ducking);
}
public function animKicking(_arg1:Function):void{
var kickFunction = _arg1;
setMovementSprite("mc_Kicking");
mc_Kicking.addEventListener(Event.ENTER_FRAME, function (_arg1:Event){
if (_arg1.currentTarget.currentFrame == 7){
kickFunction.call();
};
});
}
public function stopRunningInPath(){
_runningInPath = false;
}
public function set onFieldX(_arg1:Number):void{
_onFieldX = _arg1;
}
public function addPathPoint(_arg1:Number, _arg2:Number):void{
var _local3:*;
_local3 = new Object();
_local3.pointX = _arg1;
_local3.pointY = _arg2;
_local3.temporary = false;
_pathData.push(_local3);
}
public function set onFieldY(_arg1:Number):void{
_onFieldY = _arg1;
}
public function withoutBall():void{
var _local1:Object;
for each (_local1 in playerPositions) {
_local1.mc_Ball.gotoAndStop(BALL_TYPE_NOTHING);
};
mc_BeingHit.mc_BallShadow.gotoAndStop(BALL_TYPE_NOTHING);
}
public function set movingLeft(_arg1:Boolean):void{
_movingLeft = _arg1;
animMovement();
}
public function set movingRight(_arg1:Boolean):void{
_movingRight = _arg1;
animMovement();
}
public function set ducking(_arg1:Boolean):void{
_ducking = _arg1;
}
public function set movingUp(_arg1:Boolean):void{
_movingUp = _arg1;
animMovement();
}
public function chasing():Boolean{
return (_chasePathPoint.active);
}
private function handleDuckingFinish(_arg1:Event):void{
if (_arg1.currentTarget.currentFrame == _arg1.currentTarget.totalFrames){
_ducking = false;
if (visibleMovementSprite == mc_Ducking){
setMovementSprite(_animDuckLastState);
};
mc_Ducking.removeEventListener(Event.ENTER_FRAME, handleDuckingFinish);
mc_Ducking.stop();
};
}
public function set nextPointInPath(_arg1:uint):void{
_nextPointInPath = _arg1;
}
public function animHappy():void{
setMovementSprite("mc_Happy");
}
public function animPlacingBall():void{
setMovementSprite("mc_PlacingBall");
}
public function runInPath(){
_runningInPath = true;
_onFieldX = _pathData[0].pointX;
_onFieldY = _pathData[0].pointY;
_nextPointInPath = 1;
}
private function setMovementSprite(_arg1:String):void{
_lastState = _arg1;
visibleMovementSprite.visible = false;
visibleMovementSprite = MovieClip(getChildByName(_arg1));
visibleMovementSprite.visible = true;
visibleMovementSprite.gotoAndPlay(1);
}
public function get onFieldX():Number{
return (_onFieldX);
}
public function get movingLeft():Boolean{
return (_movingLeft);
}
public function get pathData():Array{
return (_pathData);
}
public function disableChasePoint():void{
_chasePathPoint.active = false;
}
public function setNextPathPoint():void{
_nextPointInPath++;
if (_nextPointInPath >= _pathData.length){
_nextPointInPath = 0;
};
}
public function animBeingHit():void{
setMovementSprite("mc_BeingHit");
}
public function get movingUp():Boolean{
return (_movingUp);
}
public function get runningInPath():Boolean{
return (_runningInPath);
}
public function setNoMovement():void{
_movingRight = false;
_movingLeft = false;
_movingUp = false;
_movingDown = false;
animMovement();
}
public function get onFieldY():Number{
return (_onFieldY);
}
public function get nextPointInPath():uint{
return (_nextPointInPath);
}
public function animHitting():void{
setMovementSprite("mc_Hitting");
}
public function get playerType():String{
return (_playerType);
}
public function set teamColor1(_arg1:uint):void{
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:Object;
_teamColor1 = _arg1;
_local2 = (_arg1 >> 16);
_local3 = ((_arg1 >> 8) & 0xFF);
_local4 = (_arg1 & 0xFF);
for each (_local5 in playerPositions) {
_local5.mc_Shirt.mc_Color1.transform.colorTransform = new ColorTransform(0, 0, 0, 0, _local2, _local3, _local4, 0xFF);
_local5.mc_RightHand.mc_Color1.transform.colorTransform = new ColorTransform(0, 0, 0, 0, _local2, _local3, _local4, 0xFF);
_local5.mc_LeftHand.mc_Color1.transform.colorTransform = new ColorTransform(0, 0, 0, 0, _local2, _local3, _local4, 0xFF);
_local5.mc_Face.mc_MakeUpColor.transform.colorTransform = new ColorTransform(0, 0, 0, 0, _local2, _local3, _local4, 0xFF);
_local5.mc_Face.gotoAndStop(_playerType);
_local5.mc_RightHand.gotoAndStop(_playerType);
_local5.mc_LeftHand.gotoAndStop(_playerType);
_local5.mc_Helmet.gotoAndStop(_headStyle);
switch (_headStyle){
case HEAD_STYLE_HELMET:
_local5.mc_Helmet.mc_Color1.transform.colorTransform = new ColorTransform(0, 0, 0, 1, _local2, _local3, _local4, 0);
break;
case HEAD_STYLE_HELMET_WITH_SPIKES:
_local5.mc_Helmet.mc_Color1.transform.colorTransform = new ColorTransform(0, 0, 0, 1, _local2, _local3, _local4, 0);
break;
case HEAD_STYLE_MOHAWK:
break;
};
_local5.mc_Ball.gotoAndStop(_ballType);
};
}
private function animMovement():void{
var _local1:String;
_local1 = "";
if (_movingRight){
_local1 = "Right";
scaleX = Math.abs(scaleX);
} else {
if (_movingLeft){
_local1 = "Right";
scaleX = (-1 * Math.abs(scaleX));
} else {
if (_movingUp){
_local1 = "Up";
} else {
if (_movingDown){
_local1 = "Down";
};
};
};
};
if (((((!((_local1 == _movement))) || ((_lastState == "mc_Hitting")))) || ((_lastState == "mc_BeingHit")))){
_movement = _local1;
if (_local1 == ""){
setMovementSprite("mc_Standing");
} else {
mc_Standing.visible = false;
if (_local1 == "Right"){
setMovementSprite("mc_RunningRight");
} else {
if (_local1 == "Up"){
setMovementSprite("mc_RunningUp");
} else {
if (_local1 == "Down"){
setMovementSprite("mc_RunningDown");
};
};
};
};
};
}
public function withBall():void{
var _local1:Object;
for each (_local1 in playerPositions) {
_local1.mc_Ball.gotoAndStop(_ballType);
};
mc_BeingHit.mc_BallShadow.gotoAndStop(_ballType);
}
public function set teamColor2(_arg1:uint):void{
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:Object;
_teamColor2 = _arg1;
_local2 = (_arg1 >> 16);
_local3 = ((_arg1 >> 8) & 0xFF);
_local4 = (_arg1 & 0xFF);
for each (_local5 in playerPositions) {
_local5.mc_Shirt.mc_Color2.transform.colorTransform = new ColorTransform(0, 0, 0, 0, _local2, _local3, _local4, 0xFF);
_local5.mc_RightHand.mc_Color2.transform.colorTransform = new ColorTransform(0, 0, 0, 0, _local2, _local3, _local4, 0xFF);
_local5.mc_LeftHand.mc_Color2.transform.colorTransform = new ColorTransform(0, 0, 0, 0, _local2, _local3, _local4, 0xFF);
switch (_headStyle){
case HEAD_STYLE_HELMET:
_local5.mc_Helmet.mc_Color2.transform.colorTransform = new ColorTransform(0, 0, 0, 1, _local2, _local3, _local4, 0);
break;
case HEAD_STYLE_HELMET_WITH_SPIKES:
_local5.mc_Helmet.mc_Color2.transform.colorTransform = new ColorTransform(0, 0, 0, 1, _local2, _local3, _local4, 0);
break;
case HEAD_STYLE_MOHAWK:
break;
};
};
}
public function get teamColor1():uint{
return (_teamColor1);
}
public function get teamColor2():uint{
return (_teamColor2);
}
}
}//package
Section 39
//SCrowd (SCrowd)
package {
import flash.media.*;
public dynamic class SCrowd extends Sound {
}
}//package
Section 40
//SCrowd2 (SCrowd2)
package {
import flash.media.*;
public dynamic class SCrowd2 extends Sound {
}
}//package
Section 41
//SGameOver (SGameOver)
package {
import flash.media.*;
public dynamic class SGameOver extends Sound {
}
}//package
Section 42
//SMenuRiff (SMenuRiff)
package {
import flash.media.*;
public dynamic class SMenuRiff extends Sound {
}
}//package
Section 43
//SMenuRiff2 (SMenuRiff2)
package {
import flash.media.*;
public dynamic class SMenuRiff2 extends Sound {
}
}//package
Section 44
//SMenuSelect (SMenuSelect)
package {
import flash.media.*;
public dynamic class SMenuSelect extends Sound {
}
}//package
Section 45
//SourceBall (SourceBall)
package {
import flash.display.*;
public dynamic class SourceBall extends MovieClip {
}
}//package
Section 46
//SpriteChoosePlayer (SpriteChoosePlayer)
package {
import flash.display.*;
public dynamic class SpriteChoosePlayer extends MovieClip {
public var btn_Twee:SimpleButton;
public var btn_Gee:SimpleButton;
}
}//package
Section 47
//SpriteField (SpriteField)
package {
import flash.display.*;
public dynamic class SpriteField extends MovieClip {
public var mc_Bound:MovieClip;
public var mc_Grass:MovieClip;
}
}//package
Section 48
//SpriteIntroAnimation (SpriteIntroAnimation)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class SpriteIntroAnimation extends MovieClip {
public var mc_Running:MovieClip;
public function SpriteIntroAnimation(){
addFrameScript(0, frame1);
}
function frame1(){
mc_Running.mc_Ball.stop();
mc_Running.mc_Helmet.stop();
mc_Running.mc_Face.gotoAndStop(PlayerData.PLAYER_COLOR_TWEE);
mc_Running.mc_RightHand.gotoAndStop(PlayerData.PLAYER_COLOR_TWEE);
mc_Running.mc_LeftHand.gotoAndStop(PlayerData.PLAYER_COLOR_TWEE);
}
}
}//package
Section 49
//SpriteMainMenu (SpriteMainMenu)
package {
import flash.display.*;
public dynamic class SpriteMainMenu extends MovieClip {
public var btn_Start:SimpleButton;
}
}//package
Section 50
//SpriteMap (SpriteMap)
package {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
public class SpriteMap extends MovieClip {
private var _mapData:Array;
public var mc_MapBound:MovieClip;
public var txtOppositeTeamName:TextField;
public var txtPlayerTeamName:TextField;
public var txtOppositeScore:TextField;
public var mc_Team1Flag:SpriteTeamFlag;
public var txtPlayerScore:TextField;
public var txtMatchTime:TextField;
public var mc_Team2Flag:SpriteTeamFlag;
public function SpriteMap():void{
_mapData = new Array();
}
public function clearData():void{
var _local1:PlayerData;
for each (_local1 in _mapData) {
mc_MapBound.removeChild(_local1.mc_Map);
trace(("removing " + mc_MapBound));
};
_mapData = new Array(PlayerData);
}
public function removePlayer(_arg1:PlayerData){
trace(_arg1);
mc_MapBound.removeChild(_arg1.mc_Map);
}
public function redrawMap():void{
var _local1:PlayerData;
for each (_local1 in _mapData) {
_local1.mc_Map.x = (((_local1.onFieldX / GameData.MAP_WIDTH) * (mc_MapBound.width - _local1.mc_Map.width)) + 5);
_local1.mc_Map.y = ((_local1.onFieldY / GameData.MAP_HEIGHT) * (mc_MapBound.height - _local1.mc_Map.height));
};
}
public function addPlayer(_arg1:PlayerData, _arg2:uint, _arg3:uint){
var _local4:uint;
var _local5:uint;
var _local6:uint;
_arg1.mc_Map = new SpritePlayerOnMap();
_local4 = (_arg2 >> 16);
_local5 = ((_arg2 >> 8) & 0xFF);
_local6 = (_arg2 & 0xFF);
_arg1.mc_Map.mc_Color1.transform.colorTransform = new ColorTransform(0, 0, 0, 0, _local4, _local5, _local6, 0xFF);
_local4 = (_arg3 >> 16);
_local5 = ((_arg3 >> 8) & 0xFF);
_local6 = (_arg3 & 0xFF);
_arg1.mc_Map.mc_Color2.transform.colorTransform = new ColorTransform(0, 0, 0, 0, _local4, _local5, _local6, 0xFF);
_mapData.push(_arg1);
mc_MapBound.addChild(_arg1.mc_Map);
}
}
}//package
Section 51
//SpriteMenuTeams (SpriteMenuTeams)
package {
import flash.display.*;
import flash.text.*;
public dynamic class SpriteMenuTeams extends MovieClip {
public var txtTeamName2:TextField;
public var txtTeamName1:TextField;
public var mc_Player1:MovieClip;
public var mc_Player2:MovieClip;
public var mc_Player3:MovieClip;
}
}//package
Section 52
//SpritePlayerOnMap (SpritePlayerOnMap)
package {
import flash.display.*;
public dynamic class SpritePlayerOnMap extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package
Section 53
//SpriteTeamFlag (SpriteTeamFlag)
package {
import flash.display.*;
public dynamic class SpriteTeamFlag extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
public function SpriteTeamFlag(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 54
//SpriteYouLose (SpriteYouLose)
package {
import flash.display.*;
import flash.text.*;
public dynamic class SpriteYouLose extends MovieClip {
public var txtScore:TextField;
public var btn_PlayAgain:SimpleButton;
public var btn_SendScore:SimpleButton;
public function SpriteYouLose(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package
Section 55
//SpriteYouWin (SpriteYouWin)
package {
import flash.display.*;
import flash.text.*;
public dynamic class SpriteYouWin extends MovieClip {
public var txtScore:TextField;
public var btn_PlayAgain:SimpleButton;
public var btn_SendScore:SimpleButton;
public function SpriteYouWin(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package
Section 56
//SVSMenu (SVSMenu)
package {
import flash.media.*;
public dynamic class SVSMenu extends Sound {
}
}//package
Section 57
//TeamData (TeamData)
package {
import flash.display.*;
public class TeamData {
private var _mcField:DisplayObjectContainer;
public var closureIdentification:uint;
private var _teamColor1:uint;
private var _teamColor2:uint;
public var playersData:Array;
public function TeamData(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:String, _arg5:DisplayObjectContainer, _arg6:Array):void{
var _local7:uint;
var _local8:uint;
var _local9:PlayerData;
var _local10:uint;
var _local11:uint;
super();
playersData = new Array();
_teamColor1 = _arg2;
_teamColor2 = _arg3;
_mcField = _arg5;
closureIdentification = _arg1;
_local7 = _arg6.length;
_local10 = 0;
while (_local10 < _local7) {
_local9 = new PlayerData(_arg2, _arg3, PlayerData.PLAYER_COLOR_TWEE, _arg4, PlayerData.BALL_TYPE_NOTHING);
_local8 = _arg6[_local10].length;
_local11 = 0;
while (_local11 < _local8) {
_local9.addPathPoint(_arg6[_local10][_local11], _arg6[_local10][(_local11 + 1)]);
_local11 = (_local11 + 2);
};
_mcField.addChild(_local9);
playersData.push(_local9);
_local9.runInPath();
_local10++;
};
}
}
}//package
Section 58
//tweegeeLogo (tweegeeLogo)
package {
import flash.display.*;
public dynamic class tweegeeLogo extends MovieClip {
}
}//package