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_50 (TouchNDownMadness_sa_fla.spriteFaceBack_50)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteFaceBack_50 extends MovieClip {
public var mc_MakeUpColor:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 4
//spriteFaceFront_60 (TouchNDownMadness_sa_fla.spriteFaceFront_60)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteFaceFront_60 extends MovieClip {
public var mc_MakeUpColor:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 5
//spriteFaceHappy_81 (TouchNDownMadness_sa_fla.spriteFaceHappy_81)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteFaceHappy_81 extends MovieClip {
public var mc_MakeUpColor:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 6
//spriteFaceSide_38 (TouchNDownMadness_sa_fla.spriteFaceSide_38)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteFaceSide_38 extends MovieClip {
public var mc_MakeUpColor:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 7
//spriteHelmet_83 (TouchNDownMadness_sa_fla.spriteHelmet_83)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteHelmet_83 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
public var mc_Color3:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 8
//spriteHelmetBack_52 (TouchNDownMadness_sa_fla.spriteHelmetBack_52)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteHelmetBack_52 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 9
//spriteHelmetFront_62 (TouchNDownMadness_sa_fla.spriteHelmetFront_62)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteHelmetFront_62 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 10
//spriteHelmetSide_41 (TouchNDownMadness_sa_fla.spriteHelmetSide_41)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteHelmetSide_41 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
public var mc_Color3:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 11
//spriteJockeyBeingHit_66 (TouchNDownMadness_sa_fla.spriteJockeyBeingHit_66)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyBeingHit_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_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_66(){
addFrameScript(31, frame32);
}
function frame32(){
stop();
}
}
}//package TouchNDownMadness_sa_fla
Section 12
//spriteJockeyDuck_71 (TouchNDownMadness_sa_fla.spriteJockeyDuck_71)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyDuck_71 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_72 (TouchNDownMadness_sa_fla.spriteJockeyHappy_72)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyHappy_72 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_72(){
addFrameScript(11, frame12);
}
function frame12(){
gotoAndPlay("Move Right");
}
}
}//package TouchNDownMadness_sa_fla
Section 14
//spriteJockeyHitting_65 (TouchNDownMadness_sa_fla.spriteJockeyHitting_65)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyHitting_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 spriteJockeyHitting_65(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package TouchNDownMadness_sa_fla
Section 15
//spriteJockeyKicking_69 (TouchNDownMadness_sa_fla.spriteJockeyKicking_69)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyKicking_69 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_69(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package TouchNDownMadness_sa_fla
Section 16
//spriteJockeyPlacingBall_70 (TouchNDownMadness_sa_fla.spriteJockeyPlacingBall_70)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyPlacingBall_70 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_70(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package TouchNDownMadness_sa_fla
Section 17
//spriteJockeyRunningDown_57 (TouchNDownMadness_sa_fla.spriteJockeyRunningDown_57)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyRunningDown_57 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_29 (TouchNDownMadness_sa_fla.spriteJockeyRunningRight_29)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyRunningRight_29 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_49 (TouchNDownMadness_sa_fla.spriteJockeyRunningUp_49)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyRunningUp_49 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_48 (TouchNDownMadness_sa_fla.spriteJockeyStanding_48)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteJockeyStanding_48 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_31 (TouchNDownMadness_sa_fla.spriteLeftHand_31)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteLeftHand_31 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 22
//spriteLeftHand_74 (TouchNDownMadness_sa_fla.spriteLeftHand_74)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteLeftHand_74 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 23
//spriteLeftHandFront_58 (TouchNDownMadness_sa_fla.spriteLeftHandFront_58)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteLeftHandFront_58 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 24
//spriteMenuPlayer1_115 (TouchNDownMadness_sa_fla.spriteMenuPlayer1_115)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteMenuPlayer1_115 extends MovieClip {
public var mc_Color1:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 25
//spriteMenuPlayer2_119 (TouchNDownMadness_sa_fla.spriteMenuPlayer2_119)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteMenuPlayer2_119 extends MovieClip {
public var mc_Color1:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 26
//spriteMenuPlayer3_117 (TouchNDownMadness_sa_fla.spriteMenuPlayer3_117)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteMenuPlayer3_117 extends MovieClip {
public var mc_Color1:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 27
//spriteRightHand_45 (TouchNDownMadness_sa_fla.spriteRightHand_45)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteRightHand_45 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 28
//spriteRightHand_87 (TouchNDownMadness_sa_fla.spriteRightHand_87)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteRightHand_87 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 29
//spriteRightHandFront_59 (TouchNDownMadness_sa_fla.spriteRightHandFront_59)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteRightHandFront_59 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 30
//spriteShirt_34 (TouchNDownMadness_sa_fla.spriteShirt_34)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteShirt_34 extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package TouchNDownMadness_sa_fla
Section 31
//spriteShirt_77 (TouchNDownMadness_sa_fla.spriteShirt_77)
package TouchNDownMadness_sa_fla {
import flash.display.*;
public dynamic class spriteShirt_77 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.net.*;
import flash.ui.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class Main extends MovieClip {
private var playerData:PlayerData;
public var mc_BGSpiral:MovieClip;
private var matchTimeTimer:Timer;
private var mc_Message:MovieClip;
private var logoMc:Sprite;
private var btnMute:MovieClip;
private var mc_Menu1:MovieClip;
private var gameTimer:Timer;
private var mc_Menu2:MovieClip;
private var myKickStrength:Number;
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;
public var mc_LoaderBar:MovieClip;
private var _highScoreFunction:Function;
public var mc_BG:MovieClip;
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, 1, frame2);
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;
}
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();
}
function frame2(){
stop();
startGame();
}
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(){
stop();
MochiAd.showPreGameAd({clip:root, id:"cbc7dd757fb5f903", res:"550x415"});
}
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 startGame():void{
initGame(this.stage, null, "logout");
}
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
//MochiAd (MochiAd)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.system.*;
import flash.net.*;
public class MochiAd {
public static function getVersion():String{
return ("2.7");
}
public static function showClickAwayAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_timeout:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var sendHostProgress:Boolean;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
sendHostProgress = false;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array;
var _local4:Number;
_local3 = _arg2.split(".");
_local4 = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = 10;
bar.y = (h - 20);
};
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
options.ad_progress(_local10);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7});
if (_local7 == 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local11 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 39
//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 40
//SCrowd (SCrowd)
package {
import flash.media.*;
public dynamic class SCrowd extends Sound {
}
}//package
Section 41
//SCrowd2 (SCrowd2)
package {
import flash.media.*;
public dynamic class SCrowd2 extends Sound {
}
}//package
Section 42
//SGameOver (SGameOver)
package {
import flash.media.*;
public dynamic class SGameOver extends Sound {
}
}//package
Section 43
//SMenuRiff (SMenuRiff)
package {
import flash.media.*;
public dynamic class SMenuRiff extends Sound {
}
}//package
Section 44
//SMenuRiff2 (SMenuRiff2)
package {
import flash.media.*;
public dynamic class SMenuRiff2 extends Sound {
}
}//package
Section 45
//SMenuSelect (SMenuSelect)
package {
import flash.media.*;
public dynamic class SMenuSelect extends Sound {
}
}//package
Section 46
//SourceBall (SourceBall)
package {
import flash.display.*;
public dynamic class SourceBall extends MovieClip {
}
}//package
Section 47
//SpriteChoosePlayer (SpriteChoosePlayer)
package {
import flash.display.*;
public dynamic class SpriteChoosePlayer extends MovieClip {
public var btn_Twee:SimpleButton;
public var btn_Gee:SimpleButton;
}
}//package
Section 48
//SpriteField (SpriteField)
package {
import flash.display.*;
public dynamic class SpriteField extends MovieClip {
public var mc_Bound:MovieClip;
public var mc_Grass:MovieClip;
}
}//package
Section 49
//SpriteIntroAnimation (SpriteIntroAnimation)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.text.*;
import flash.system.*;
import flash.net.*;
import flash.ui.*;
import flash.filters.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
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 50
//SpriteMainMenu (SpriteMainMenu)
package {
import flash.display.*;
public dynamic class SpriteMainMenu extends MovieClip {
public var btn_Start:SimpleButton;
}
}//package
Section 51
//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 52
//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 53
//SpritePlayerOnMap (SpritePlayerOnMap)
package {
import flash.display.*;
public dynamic class SpritePlayerOnMap extends MovieClip {
public var mc_Color1:MovieClip;
public var mc_Color2:MovieClip;
}
}//package
Section 54
//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 55
//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 56
//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 57
//SVSMenu (SVSMenu)
package {
import flash.media.*;
public dynamic class SVSMenu extends Sound {
}
}//package
Section 58
//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 59
//tweegeeLogo (tweegeeLogo)
package {
import flash.display.*;
public dynamic class tweegeeLogo extends MovieClip {
}
}//package