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

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

he-scores.swf

This is the info page for
Flash #216277

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


Text
"HE SCORES" IS LOADING

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

"HE SCORES" IS LOADING

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

<p align="center"><font face="Comic Sans MS" size="13" color="#ff0000" letterSpacing="0.000000" kerning="1"><b>content2</b></font></p>

<p align="center"><font face="Comic Sans MS" size="13" color="#000000" letterSpacing="0.000000" kerning="1"><b>content2</b></font></p>

ASSET
HOLDER

<p align="center"><font face="Verdana" size="10" color="#ffffff" letterSpacing="0.000000" kerning="1"><b>..</b></font></p><p align="center"></p>

LOADING CLUBS...

LOADING CLUBS...

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

LOADING ERROR!

LOADING ERROR!

<p align="center"><font face="Verdana" size="14" color="#003300" letterSpacing="0.000000" kerning="1"><b>ARE YOU SURE? THIS WILL QUIT THE CURRENT TOURNAMENT. </b></font></p>

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

START

<p align="center"><font face="Comic Sans MS" size="13" color="#666666" letterSpacing="0.000000" kerning="1"><b>content2</b></font></p>

<p align="center"><font face="Comic Sans MS" size="13" color="#ff0000" letterSpacing="0.000000" kerning="1"><b>content2</b></font></p>

<p align="center"><font face="Comic Sans MS" size="13" color="#000000" letterSpacing="0.000000" kerning="1"><b>content2</b></font></p>

<p align="center"><font face="Comic Sans MS" size="16" color="#99cc00" letterSpacing="0.000000" kerning="1"><b>content</b></font></p>

<p align="center"><font face="Comic Sans MS" size="16" color="#000000" letterSpacing="0.000000" kerning="1"><b>content</b></font></p>

by us

<p align="center"><font face="Verdana" size="12" color="#003333" letterSpacing="0.000000" kerning="1"><a href="http://www.flashfooty.com" target = "_blank"><b>football games</b></a></font></p>

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

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

<p align="center"><font face="Verdana" size="14" color="#003300" letterSpacing="0.000000" kerning="1"><b>PLEASE WAIT...</b></font></p>

SORRY, BUT DUE TO SECURITY
REASONS, HIGHSCORES ARE
AVAILABLE ONLY ON
FLASHFOOTY.COM

CONNECTION WITH THE
DATABASE COULD NOT BE
ESTABLISHED.

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

<p align="center"><font face="Verdana" size="9" color="#000000" letterSpacing="0.000000" kerning="1"><b> SORT:</b></font></p><p align="center"></p><p align="center"></p><p align="center"><font face="Verdana" size="9" color="#000000" letterSpacing="0.000000" kerning="1"><b>JUMP TO</b></font></p><p align="center"><font face="Verdana" size="9" color="#000000" letterSpacing="0.000000" kerning="1"><b>CLASS:</b></font></p>

<p align="center"><font face="Verdana" size="9" color="#000000" letterSpacing="0.000000" kerning="1"><b> SORT:</b></font></p><p align="center"></p><p align="center"></p><p align="center"><font face="Verdana" size="9" color="#000000" letterSpacing="0.000000" kerning="1"><b>JUMP TO</b></font></p><p align="center"><font face="Verdana" size="9" color="#000000" letterSpacing="0.000000" kerning="1"><b>CLASS:</b></font></p>

<p align="center"><font face="Verdana" size="9" color="#ffff00" letterSpacing="0.000000" kerning="1"><b> SORT:</b></font></p><p align="center"></p><p align="center"></p><p align="center"><font face="Verdana" size="9" color="#ffff00" letterSpacing="0.000000" kerning="1"><b>JUMP TO</b></font></p><p align="center"><font face="Verdana" size="9" color="#ffff00" letterSpacing="0.000000" kerning="1"><b>CLASS:</b></font></p>

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


Select your favourite club and help them become
the best team in the world cup for clubs.

Teams are categorized in 5 classes.
Categorization is made according to team's
placement in the previous weekly Championship.
(played on FlashFooty.com)

Your role is to help your team to rank better by
playing 5-round tournaments in which you will try
to win points for your club.



To win the match, you need to score certain
number of goals, which depends of your team's
and your oponnent's team class.

It's easier to beat the team of class 5, than one
with class 1. Also, it's easier to win if your team
has stronger class.


For each goal you score, you will get one point in
the 1st round, 2 points in 2n round etc. You can
also win bonus points if you make it to the last
stage.

Points you earn will be recorded to your team's
balance.
Players that are logged into their FlashFooty
accounts will also get their achievements 
recorded and shown in rankings.



Championships are played each week, from
Monday 00:00, till Sunday 23:59 according to
FlashFooty time.

Each week, one club will become the champion.
Also, the best scorer will get the 'Player of the
week' title.

Good luck!

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

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

<p align="left"></p>

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

ENERGY:

FLASHFOOTY.COM                                                         FLASHFOOTY.COM

<p align="center"><font face="Verdana" size="20" color="#000000" letterSpacing="0.000000" kerning="1"><b>GO</b></font></p>

<p align="center"><font face="Verdana" size="20" color="#000000" letterSpacing="0.000000" kerning="1"><b>GO</b></font></p>

STEP 1: CLICK ON THE TARGET (                  ) WHEN IT APPEARS
STEP 2: WHILE YOUR PLAYER IS RUNNING, ADJUST DIRECTION OF THE SHOT
WITH YOUR MOUSE.
STEP 3:  CLICK THE MOUSE BUTTON TO DETERMINE HEIGHT OF THE SHOT, AND
RELEASE IT.
YOU DON'T HAVE TO SHOOT IMMEDIATELY! IF YOU SKIP STEP 3, YOUR PLAYER
WILL  MOVE THE BALL AWAY, SO YOU CAN SHOOT FROM ANOTHER POSITION.

<p align="center"><font face="Verdana" size="18" color="#000000" letterSpacing="0.000000" kerning="1"><b>...</b></font></p>

<p align="center"><font face="Verdana" size="18" color="#ff6600" letterSpacing="0.000000" kerning="1"><b>...</b></font></p>

<p align="center"><font face="Verdana" size="22" color="#ff6600" letterSpacing="0.000000" kerning="1"><b>...</b></font></p><p align="center"></p>

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

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

<p align="center"><font face="Verdana" size="18" color="#000000" letterSpacing="0.000000" kerning="1"><b>...</b></font></p>

<p align="center"><font face="Verdana" size="18" color="#ff6600" letterSpacing="0.000000" kerning="1"><b>...</b></font></p>

<p align="center"><font face="Verdana" size="37" color="#000000" letterSpacing="0.000000" kerning="1"><b>/</b></font></p>

<p align="center"><font face="Verdana" size="37" color="#ff6600" letterSpacing="0.000000" kerning="1"><b>/</b></font></p>

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

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

<p align="center"><font face="Verdana" size="12" color="#000000" letterSpacing="0.000000" kerning="1"><b>QUALIFIED!</b></font></p>

<p align="center"><font face="Verdana" size="12" color="#ffcc00" letterSpacing="0.000000" kerning="1"><b>QUALIFIED!</b></font></p>

<p align="center"><font face="Verdana" size="37" color="#000000" letterSpacing="0.000000" kerning="1"><b>ACTION</b></font></p><p align="center"><font face="Verdana" size="37" color="#000000" letterSpacing="0.000000" kerning="1"><b>SYMBOLS</b></font></p><p align="center"></p>

ActionScript [AS3]

Section 1
//actionMain (com.action.actionMain) package com.action { import fl.controls.*; import flash.display.*; import flash.events.*; import flash.text.*; import com.*; import flash.geom.*; import flash.media.*; public class actionMain extends Game { const sceneWidth:int = 600; var betaDistance:Number; var tileKrug:circles; var pointerNum:Number; var numberOfSteps; var targetStartPositions:Array; var restartButton:Button; var cpuTeam:String; var myTeam; var shotNum:int; var actionFunction:Function; var tempObject:MovieClip; var playerTargetAngleDeg:Number; var canvasDimX:Number;// = 600 var canvasDimY:Number;// = 400 var ugaoBeta:Number; var playerBasicStep:int;// = 4 var ballStartPositions:Array; var _goal_upper_net:upper_net; var roundC:int; var opponentReactionCounter; var playerYStep:Number; var actionType:Array; var MyStage:Stage; var opponentX:Array; var opponentY:Array; var playerNumberOfSteps:int; var closestFound; var canvasBitmap:Bitmap; var goalieStartYPositions:Array; var myArrayListeners:Array; var actionNames:Array; var display:semafor; var ballStartAlphaRad:Array; var ballTargetAngleRad:Number; var actionCounter:int; var yHeight:int; var opponentFormationY:Array; var opponentFormationX:Array; var playerXStep; public var soundFlag:Boolean; var ugaoStep:int; var strengthIncreases:Boolean; var roundName:Array; var pointsInMatch:int; var secondClosestFound:Boolean; var myPoint:Point; var pointerFreeze:int; var Y_komponenta_Felsha:Number; var playerStartPositions:Array; var numberOfDots:int; var _goClip:goClip; var goalieStartXPositions:Array; var tilePoint:Point; var ballStartTimers:Array; var stepCounter:int; var goalsNeeded:int; var canvasBD:BitmapData; var lower_dots_array_x; var lower_dots_array_y:Array; var _endOfShotClip:MovieClip; var X_komponenta_Felsha; var actionMirror:Boolean; var krugdim;// = 10 var bendIntense:int; var maxShots:int; var tileRect:Rectangle; var opponentReactionCounterStart:int; var actionID:int; var playerFunction:Function; var felshPrirastaj:Number;// = 0 var _instrukcije:instructionsMC_pokretni; var playerStepCounter; var goalsScored:int; static const pointDD:Point = new Point(600, 400); static const pointDL:Point = new Point(0, 400); static const ACTION_STATE_END:int = 3; static const BALL_GOAL:int = 3; static const BALL_KICKED_EVENT:int = 0; static const pointGD:Point = new Point(600, 90); static const ACTION_STATE_MAIN:int = 2; static const PLAYER_STATE_KICK:int = 2; static const pointGL:Point = new Point(0, 90); static const ACTION_STATE_INTRO:int = 1; static const goalPointDD:Point = new Point(415, 100); static const PLAYER_STATE_CHEER:int = 3; static const goalPointDL:Point = new Point(180, 100); static const ACTION_STATE_INITIALIZATION:int = 0; static const BALL_OPPONENT:int = 4; static const ACTION_STATE_MISS:int = 4; static const PLAYER_STATE_RUN:int = 1; static const GOALKEEPER:int = 12; static const MY_PLAYER:int = 10; static const BALL_STOP_EVERYTHING:int = 2; static const goalPointGD:Point = new Point(415, 70); static const PLAYER_STATE_STILL:int = 0; static const goalPointGL:Point = new Point(180, 70); static const FIELD_PLAYER:int = 11; static const BALL_OUT:int = 1; static const PLAYER_ILLUSTRATION:int = 4; static const BALL:int = 13; static var _player:playerGen; public static var iKickedTheBall:Boolean; static var _myDressType:int; static var _dressCol1:int; static var _dressCol2:int; static var _shortsCol:int; public static var actionState:int; static var _targetClip:target; public static var sounds:Array = new Array(); static var _myDressCol2:int; static var _myDressCol1:int; static var _goalie:goalkeeperGen; static var _dressType:int; static var objectsArray:Array; static var indikatorCilja:indikator_cilja; static var _myShortsCol:int; static var _opponent:playerGen; static var objectHolder:MovieClip; public static var mySoundFlag:String; static var _goal_net:gol_i_mreza; static var _theBall:theBall; static var pointerShow:Boolean; static var _goal_bars:goal_bars; static var shot:Boolean; public static var _field:field; public function actionMain(_arg1:int=10, _arg2:String="cup", _arg3:String="03011000", _arg4:String="01001111", _arg5:int=6, _arg6:uint=5, _arg7:String="Player", _arg8:String="Opponent", _arg9:int=0, _arg10:String="ON"){ myArrayListeners = []; roundName = ["1/16 Finals", "1/8 Finals", "Quarterfinals", "Semifinals", "Final Match"]; canvasDimX = 600; canvasDimY = 400; krugdim = 10; playerBasicStep = 4; felshPrirastaj = 0; actionType = [2, 0, 3, 1, 5, 9, 1, 2, 6, 7, 8, 9, 0, 3, 4, 6, 7, 11, 0, 5, 11, 8, 10, 12, 3, 4, 6, 12, 10, 8]; actionNames = ["Aim The Opposite Side", "Goal Is Almost Empty", "Path Is Clear - Don't Mess It", "One Side Is Still Free", "Stay Calm, Shoot Precisely", "Aim Behind Him", "Move In One, Shoot In Another Direction", "Kick it immediately!", "Quick Shot From The Distance", "Crowded, But Not Hard", "Aim Good, Or Be Fast", "After The Free Kick", "Go Back And Around"]; opponentX = [[50, 200, 450, 550], [50, 200, 450, 650], [50, 200, 450, 650], [50, 200, 450, 520], [50, 200, 500, 450], [50, 200, 450, 550], [50, 200, 400, 450], [50, 200, 450, 550], [150, 200, 450, 550], [50, 200, 450, 500], [50, 200, 450, 450], [200, 230, 250, 480], [-50, 200, 250, 400]]; opponentY = [[120, 220, 470, 300], [410, 470, 470, 250], [210, 470, 470, 250], [210, 490, 270, 250], [160, 420, 220, 200], [200, 120, 550, 150], [250, 200, 460, 120], [250, 200, 460, 120], [250, 200, 460, 120], [210, 320, 350, 280], [210, 470, 470, 250], [300, 300, 300, 150], [150, 140, 300, 150]]; opponentFormationX = [[250, 250, 400, 550], [250, 200, 400, 550], [250, 200, 400, 550], [250, 200, 400, 320], [250, 150, 350, 500], [200, 300, 450, 500], [250, 350, 400, 500], [300, 300, 400, 500], [300, 300, 400, 400], [250, 300, 400, 550], [250, 200, 400, 550], [250, 200, 400, 550], [150, 200, 300, 400]]; opponentFormationY = [[200, 150, 200, 150], [250, 200, 200, 550], [250, 200, 200, 550], [250, 200, 200, 120], [250, 200, 200, 550], [250, 200, 200, 500], [200, 150, 200, 150], [150, 150, 200, 150], [150, 150, 200, 150], [250, 160, 200, 550], [250, 200, 200, 550], [250, 200, 200, 550], [150, 200, 200, 150]]; ballStartPositions = [[610, 110], [610, 410], [610, 410], [-10, 410], [610, 410], [610, 340], [610, 290], [610, 290], [300, 410], [610, 130], [610, 410], [300, 420], [-10, 200]]; targetStartPositions = [[400, 170], [300, 250], [350, 250], [300, 250], [310, 300], [320, 280], [300, 280], [300, 280], [270, 330], [300, 200], [300, 300], [400, 300], [200, 250]]; playerStartPositions = [[250, 220], [100, 380], [150, 380], [150, 380], [150, 380], [100, 380], [100, 380], [100, 380], [200, 400], [200, 350], [150, 380], [500, 380], [150, 350]]; goalieStartXPositions = [280, 450, 280, 280, 380, 280, 380, 280, 380, 280, 380, 380, 280]; goalieStartYPositions = [100, 300, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]; ballStartTimers = [0, 65, 0, 65, 0, 0, 0, 67, 0, 0, 0, 0, 0]; ballStartAlphaRad = [0, (Math.PI / 6), 0, (Math.PI / 6), 0, 0, 0, (Math.PI / 6), 0, 0, 0, 0, 0]; super(); maxShots = _arg5; goalsNeeded = _arg6; goalsScored = 0; pointsInMatch = 0; shotNum = 1; myTeam = _arg7; cpuTeam = _arg8; roundC = _arg9; mySoundFlag = _arg10; actionCounter = 0; _dressType = int(_arg4.substring(0, 2)); _dressCol1 = int(_arg4.substring(2, 4)); _dressCol2 = int(_arg4.substring(4, 6)); _shortsCol = int(_arg4.substring(6, 8)); _myDressType = int(_arg3.substring(0, 2)); _myDressCol1 = int(_arg3.substring(2, 4)); _myDressCol2 = int(_arg3.substring(4, 6)); _myShortsCol = int(_arg3.substring(6, 8)); actionState = ACTION_STATE_INITIALIZATION; addSound("bump", new DOOP()); addSound("gool", new gool()); addSound("shot", new shut()); addSound("bump2", new odbitak()); addSound("miss", new miss()); addSound("gameOver", new zvizdukSudija()); actionMirror = Boolean(Math.round(Math.random())); addEventListener(Event.ADDED_TO_STAGE, addedToStage); } public function addedToStage(_arg1:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, addedToStage); if (stage){ trace("IMA STAGE"); } else { trace("NEMA STAGE"); }; MyStage = stage; init(); } function shoot(_arg1:MouseEvent):void{ strengthIncreases = true; pointerFreeze = 1; MyStage.removeEventListener(MouseEvent.MOUSE_DOWN, shoot); MyStage.addEventListener(MouseEvent.MOUSE_UP, shootRelease, false, 0, true); } public function endOfShotMessage(_arg1:String="missed"):void{ switch (_arg1){ case "missed": trace("PROMASAJ!"); _endOfShotClip = new missClip(); break; case "goal": trace("GOL!"); _endOfShotClip = new gooaalClip(); _targetClip = new target(); _targetClip.x = (Math.round(Math.random()) * 600); _targetClip.y = 500; _targetClip._clipIncrement = 0.1; _targetClip._clipWait = 30; _targetClip.scaleX = (_targetClip.scaleY = 0); _targetClip._state = (_targetClip._clipWait + 1); _targetClip.removeEventListener(MouseEvent.CLICK, targetClicked); _field.addChild(_targetClip); _player.playerTargetAngleRad = FindAngle(_player, _targetClip); _player.playerXStep = (playerBasicStep * Math.cos(_player.playerTargetAngleRad)); _player.playerYStep = (playerBasicStep * Math.sin(_player.playerTargetAngleRad)); _player.playerStepCounter = Math.round((FindDistance(_player, _targetClip) / playerBasicStep)); _player._state = PLAYER_STATE_RUN; break; }; trace("Postavka poruke:", _arg1); _endOfShotClip.x = 300; _endOfShotClip.y = 170; _endOfShotClip.scaleX = (_endOfShotClip.scaleY = 0); _endOfShotClip._state = 0; _endOfShotClip._clipIncrement = 0.1; _endOfShotClip._clipWait = 15; addChild(_endOfShotClip); actionState = ACTION_STATE_MISS; } override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=true):void{ super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); myArrayListeners.push({type:_arg1, listener:_arg2}); } public function goTitle():void{ animateTitle(_goClip); if (_goClip.scaleX <= 0){ removeChild(_goClip); _targetClip = new target(); _targetClip.x = targetStartPositions[actionID][0]; if (actionMirror){ _targetClip.x = (sceneWidth - _targetClip.x); }; _targetClip.y = targetStartPositions[actionID][1]; _targetClip.scaleX = (_targetClip.scaleY = 0); _targetClip._state = 0; _targetClip._clipIncrement = 0.1; _targetClip._clipWait = 30; _targetClip.addEventListener(MouseEvent.CLICK, targetClicked, false, 0, true); _field.addChild(_targetClip); addChild(canvasBitmap); canvasBD.fillRect(canvasBD.rect, 0); opponents(); actionState = ACTION_STATE_MAIN; }; } public function actionMiss():void{ plRun(_player); _goalie.goalkeeperBehaviour(); depthManager(); animateTitle(_endOfShotClip); if (_endOfShotClip.scaleX <= 0){ removeChild(_endOfShotClip); actionState = ACTION_STATE_END; }; } function display_refresh():void{ var _local1:qualifiedT; display._statistike.text = ""; display._statistike.appendText(((((((((((((myTeam.substr(0, 12) + "-") + cpuTeam.substr(0, 12)) + ", Shot number: ") + shotNum) + "/") + maxShots) + ", Goals scored: ") + goalsScored) + "/") + goalsNeeded) + ", Points: ") + pointsInMatch)); display._statistikeSenka.text = display._statistike.text; if (goalsScored >= goalsNeeded){ if (!Boolean(_field.getChildByName("qualiffiedAlert"))){ _local1 = new (qualifiedT); _local1.x = 530; _local1.y = 20; _local1.name = "qualiffiedAlert"; _field.addChild(_local1); }; }; } public function drawPointer():void{ var _local1:Array; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:int; numberOfDots = 10; myPoint = new Point(); myPoint.x = mouseX; myPoint.y = mouseY; if (pointerFreeze == 0){ ugaoBeta = FindAngle(myPoint, _targetClip); } else { if (pointerFreeze == 1){ bendIntense = Math.floor(((-(myPoint.x) + _targetClip.x) / 20)); if (Math.abs(bendIntense) > 5){ bendIntense = ((5 * bendIntense) / Math.abs(bendIntense)); }; }; }; canvasBD.fillRect(canvasBD.rect, 0); _local1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; lower_dots_array_x = new Array(); lower_dots_array_y = new Array(); tileRect.x = 10; tileRect.y = 0; felshPrirastaj = 0; _local4 = (_targetClip.y - krugdim); _local5 = 0; while (_local5 < numberOfDots) { felshPrirastaj = (felshPrirastaj - (((0.8 * _local5) * bendIntense) / 10)); felshPrirastaj = 0; X_komponenta_Felsha = (felshPrirastaj * Math.sin(ugaoBeta)); Y_komponenta_Felsha = (felshPrirastaj * Math.cos(ugaoBeta)); Y_komponenta_Felsha = 0; _local3 = (10 * Math.sin(ugaoBeta)); lower_dots_array_x.push(((((_targetClip.x - krugdim) - ((_local5 * 10) * Math.cos(ugaoBeta))) + X_komponenta_Felsha) + (krugdim / 2))); lower_dots_array_y.push(((_local4 + Y_komponenta_Felsha) + (krugdim / 2))); _local4 = (_local4 - _local3); tilePoint.x = lower_dots_array_x[_local5]; tilePoint.y = lower_dots_array_y[_local5]; canvasBD.copyPixels(tileKrug, tileRect, tilePoint, null, null, true); _local5++; }; if (((strengthIncreases) && ((pointerNum < 10)))){ pointerNum = (pointerNum + 0.4); }; yHeight = pointerNum; if (yHeight > 10){ yHeight = 10; }; _local5 = 0; while (_local5 < numberOfDots) { tilePoint.x = lower_dots_array_x[_local5]; tilePoint.y = (lower_dots_array_y[_local5] - (_local5 * yHeight)); tileRect.x = 0; tileRect.y = 0; canvasBD.copyPixels(tileKrug, tileRect, tilePoint, null, null, true); _local5++; }; } public function getObjectFromArrayByPoperty(_arg1:Array, _arg2, _arg3:int):Object{ var _local4:int; _local4 = 0; while (_local4 < _arg1.length) { if (_arg1[_local4][_arg2] == _arg3){ return (_arg1[_local4]); }; _local4++; }; return (null); } public function runAction(_arg1:Event):void{ switch (actionState){ case ACTION_STATE_INITIALIZATION: actionFunction = goInstructions; break; case ACTION_STATE_INTRO: actionFunction = goTitle; break; case ACTION_STATE_MAIN: actionFunction = actionMainPart; break; case ACTION_STATE_MISS: actionFunction = actionMiss; break; case ACTION_STATE_END: actionFunction = actionEnd; break; }; actionFunction(); _theBall.ballFlight(); if (pointerShow){ drawPointer(); }; } public function goInstructions():void{ var _local1:playerGen; var _local2:playerGen; if (Boolean(this.getChildByName("instr"))){ } else { _instrukcije = new instructionsMC_pokretni(); _instrukcije.x = 300; _instrukcije.y = 200; _instrukcije.instr_baza.startButton.addEventListener(MouseEvent.CLICK, startTheGame, false, 0, true); _instrukcije.instr_baza.akciona_poruka.text = (roundName[roundC] + ":\n"); _instrukcije.instr_baza._myTeam.text = myTeam; _instrukcije.instr_baza._hisTeam.text = cpuTeam; _instrukcije.instr_baza._obavestenje.text = (_instrukcije.instr_baza._obavestenjeSenka.text = (("GET READY FOR THE FIRST SITUATION:\n\"" + actionNames[actionID]) + "\"")); _instrukcije.name = "instr"; _local1 = new playerGen(); _local1.x = 400; _local1.y = 25; _local1.dressType = _dressType; _local1.shirtCol1Ind = _dressCol1; _local1.shirtCol2Ind = _dressCol2; _local1.shortsColInd = _shortsCol; _local1.role = PLAYER_ILLUSTRATION; _local1.generisanjeSpriteSheet(); _local1.animacijaIgracaTrk(10); _instrukcije.instr_baza.addChild(_local1); _local2 = new playerGen(); _local2.x = 100; _local2.y = 25; _local2.dressType = _myDressType; _local2.shirtCol1Ind = _myDressCol1; _local2.shirtCol2Ind = _myDressCol2; _local2.shortsColInd = _myShortsCol; _local2.role = PLAYER_ILLUSTRATION; _local2.generisanjeSpriteSheet(); _local2.animacijaIgracaTrk(0); _instrukcije.instr_baza.addChild(_local2); addChild(_instrukcije); }; } function opponents():void{ var _local1:Number; var _local2:Number; var _local3:int; if (opponentReactionCounter == 0){ _local3 = 0; while (_local3 < objectsArray.length) { tempObject = objectsArray[_local3]; tempObject.targetDistance = FindDistance(_theBall, tempObject); opponentReactionCounter = opponentReactionCounterStart; _local3++; }; }; opponentReactionCounter--; objectsArray.sortOn("targetDistance", Array.NUMERIC); closestFound = false; secondClosestFound = false; _local3 = 0; myPoint = new Point(); _local2 = 0; while (_local3 < objectsArray.length) { tempObject = objectsArray[_local3]; if (tempObject.role == FIELD_PLAYER){ if (!closestFound){ tempObject.playerTargetAngleRad = FindAngle(tempObject, _theBall); tempObject.playerXStep = ((0.7 * playerBasicStep) * Math.cos(tempObject.playerTargetAngleRad)); tempObject.playerYStep = ((0.7 * playerBasicStep) * Math.sin(tempObject.playerTargetAngleRad)); tempObject.playerStepCounter = Math.round((FindDistance(tempObject, _theBall) / playerBasicStep)); tempObject._state = PLAYER_STATE_RUN; if (tempObject.playerStepCounter < _local2){ tempObject.playerStepCounter = 0; tempObject.x = _theBall.x; tempObject.y = _theBall.y; tempObject._state = PLAYER_STATE_STILL; }; closestFound = true; } else { if (!secondClosestFound){ myPoint.x = (goalPointDL.x + ((goalPointDD.x - goalPointDL.x) / 2)); myPoint.y = goalPointDL.y; _local1 = FindAngle(_player, myPoint); myPoint.x = (_player.x + (100 * Math.cos(_local1))); myPoint.y = (_player.y + (100 * Math.sin(_local1))); if (myPoint.y < goalPointDL.y){ myPoint.y = goalPointDL.y; }; tempObject.playerTargetAngleRad = FindAngle(tempObject, myPoint); tempObject.playerXStep = ((0.7 * playerBasicStep) * Math.cos(tempObject.playerTargetAngleRad)); tempObject.playerYStep = ((0.7 * playerBasicStep) * Math.sin(tempObject.playerTargetAngleRad)); tempObject.playerStepCounter = Math.round((FindDistance(tempObject, myPoint) / playerBasicStep)); tempObject._state = PLAYER_STATE_RUN; if (tempObject.playerStepCounter < _local2){ tempObject.playerStepCounter = 0; tempObject.x = myPoint.x; tempObject.y = myPoint.y; tempObject._state = PLAYER_STATE_STILL; }; secondClosestFound = true; } else { myPoint.x = tempObject.playerStartX; myPoint.y = tempObject.playerStartY; tempObject.playerTargetAngleRad = FindAngle(tempObject, myPoint); tempObject.playerXStep = ((0.7 * playerBasicStep) * Math.cos(tempObject.playerTargetAngleRad)); tempObject.playerYStep = ((0.7 * playerBasicStep) * Math.sin(tempObject.playerTargetAngleRad)); tempObject.playerStepCounter = Math.round((FindDistance(tempObject, myPoint) / playerBasicStep)); tempObject._state = PLAYER_STATE_RUN; if (tempObject.playerStepCounter < 1){ tempObject.playerStepCounter = 0; tempObject.x = myPoint.x; tempObject.y = myPoint.y; tempObject._state = PLAYER_STATE_STILL; }; }; }; }; _local3++; }; _goalie.goalkeeperBehaviour(); } public function actionEnd():void{ var _local1:*; var _local2:numbers_drawing; removeEventListener(Event.ENTER_FRAME, runAction); if (shotNum == maxShots){ playSound("gameOver"); display_refresh(); dispatchEvent(new endOfGameEvent("endOfGameEvent", false, false, String(pointsInMatch), String(goalsScored))); trace("Kraj utakmice"); } else { shotNum++; display_refresh(); actionCounter++; _local1 = new nextShotAnnouncement(); _local1.x = 300; _local1.y = 160; _local1.nextShotDugme.addEventListener(MouseEvent.CLICK, restartAction, false, 0, true); _local1._obavestenje.text = (_local1._obavestenjeSenka.text = (("\"" + actionNames[actionType[(actionCounter + (roundC * maxShots))]]) + "\"")); _local2 = new numbers_drawing(); _local2.x = -50; _local2.y = 25; _local2.numbersUpdate(shotNum); _local1.addChild(_local2); _local2 = new numbers_drawing(); _local2.x = 25; _local2.y = 25; _local2.numbersUpdate(maxShots); _local1.addChild(_local2); addChild(_local1); trace("Kraj akcije"); }; } function shootRelease(_arg1:MouseEvent):void{ strengthIncreases = false; MyStage.removeEventListener(MouseEvent.MOUSE_DOWN, shootRelease); } public function plRun(_arg1:Object):void{ if (_arg1.playerStepCounter > 0){ _arg1.x = (_arg1.x + _arg1.playerXStep); _arg1.y = (_arg1.y + _arg1.playerYStep); _arg1.animacijaIgracaTrk(); _arg1.playerStepCounter--; } else { _arg1._state = PLAYER_STATE_STILL; }; } public function addSound(_arg1:String, _arg2:Sound):void{ sounds[_arg1] = _arg2; } public function init():void{ var _local1:int; stage.focus = stage; MyStage = stage; objectsArray = new Array(); actionMirror = !(actionMirror); actionID = actionType[(actionCounter + (roundC * maxShots))]; opponentReactionCounter = (opponentReactionCounterStart = 10); _field = new field(); addChild(_field); _goal_net = new gol_i_mreza(); _goal_net.x = 300; _goal_net.y = 40; addChild(_goal_net); objectHolder = new MovieClip(); objectHolder.mouseChildren = false; objectHolder.mouseEnabled = false; addChild(objectHolder); _goal_bars = new goal_bars(); _goal_bars.x = 180; _goal_bars.name = "goal_bars"; _goal_bars.y = 21; objectHolder.addChild(_goal_bars); objectsArray.push(_goal_bars); _goal_upper_net = new upper_net(); _goal_upper_net.x = 182; _goal_upper_net.y = 0; _goal_upper_net.name = "upper_net"; objectHolder.addChild(_goal_upper_net); objectsArray.push(_goal_upper_net); _goClip = new goClip(); _goClip.x = 300; _goClip.y = 170; _goClip.scaleX = (_goClip.scaleY = 0); _goClip.alpha = 0; _goClip._state = 0; _goClip._clipIncrement = 0.5; _goClip._clipWait = 15; addChild(_goClip); _player = new playerGen(); _player.role = MY_PLAYER; _player.x = playerStartPositions[actionID][0]; if (actionMirror){ _player.x = (sceneWidth - _player.x); }; _player.y = playerStartPositions[actionID][1]; _player._state = PLAYER_STATE_STILL; _player.dressType = _myDressType; _player.shirtCol1Ind = _myDressCol1; _player.shirtCol2Ind = _myDressCol2; _player.shortsColInd = _myShortsCol; _player.generisanjeSpriteSheet(); objectHolder.addChild(_player); objectsArray.push(_player); _local1 = 0; while (_local1 < 4) { _opponent = new playerGen(); _opponent.x = opponentX[actionID][_local1]; _opponent.y = opponentY[actionID][_local1]; _opponent.playerStartX = opponentFormationX[actionID][_local1]; if (actionMirror){ _opponent.playerStartX = (sceneWidth - _opponent.playerStartX); _opponent.x = (sceneWidth - _opponent.x); }; _opponent.playerStartY = opponentFormationY[actionID][_local1]; _opponent.role = FIELD_PLAYER; _opponent._state = PLAYER_STATE_STILL; _opponent.dressType = _dressType; _opponent.shirtCol1Ind = _dressCol1; _opponent.shirtCol2Ind = _dressCol2; _opponent.shortsColInd = _shortsCol; _opponent.generisanjeSpriteSheet(); objectsArray.push(_opponent); objectHolder.addChild(_opponent); _local1++; }; _goalie = new goalkeeperGen(); _goalie.x = goalieStartXPositions[actionID]; if (actionMirror){ _goalie.x = (sceneWidth - _goalie.x); }; _goalie.y = goalieStartYPositions[actionID]; _goalie.role = GOALKEEPER; _goalie._state = _goalie.GOALKEEPER_STATE_MOVE; _goalie.generisanjeSpriteSheet(); objectsArray.push(_goalie); objectHolder.addChild(_goalie); _theBall = new theBall(); _theBall.x = ballStartPositions[actionID][0]; if (actionMirror){ _theBall.x = (sceneWidth - _theBall.x); }; _theBall.y = ballStartPositions[actionID][1]; _theBall.name = "ball"; _theBall.role = BALL; _theBall.goalEventFlag = false; _theBall.ballSpeed = 8; _theBall.alfaPocRad = ballStartAlphaRad[actionID]; _theBall.t = ballStartTimers[actionID]; _theBall._state = theBall.BALL_STATE_STILL; _theBall.addEventListener("myCustomEvent", ballMessage, false, 0, true); objectsArray.push(_theBall); objectHolder.addChild(_theBall); display = new semafor(); display.x = 300; display.y = 390; display._podloga.alpha = 0.5; addChild(display); display_refresh(); canvasBD = new BitmapData(canvasDimX, canvasDimY, true, 0); canvasBitmap = new Bitmap(canvasBD); tileKrug = new circles((krugdim * 2), krugdim); tileRect = new Rectangle(0, 0, krugdim, krugdim); tilePoint = new Point(0, 0); pointerShow = false; shot = false; ugaoStep = 90; ugaoBeta = ((ugaoStep * Math.PI) / 180); strengthIncreases = false; pointerNum = 0; bendIntense = 0; pointerFreeze = 0; indikatorCilja = new indikator_cilja(); indikatorCilja.alpha = 0; addChild(indikatorCilja); addEventListener(Event.ENTER_FRAME, runAction, false, 0, true); } public function plStill(_arg1:Object):void{ tempObject.playerTargetAngleRad = FindAngle(tempObject, _theBall); _arg1.animacijaIgracaTrk(); } override public function clearance():void{ var _local1:int; var _local2:int; removeEventListener(Event.ENTER_FRAME, runAction); SoundMixer.stopAll(); MyStage.removeEventListener(MouseEvent.MOUSE_DOWN, shootRelease); MyStage.removeEventListener(MouseEvent.MOUSE_DOWN, shoot); _local1 = (objectsArray.length - 1); while (_local1 >= 0) { tempObject = objectsArray[_local1]; objectsArray.splice(_local1, 1); objectHolder.removeChild(tempObject); _local1--; }; _local2 = this.numChildren; while (_local2--) { this.removeChildAt(_local2); }; canvasBitmap.bitmapData.dispose(); canvasBitmap = null; actionState = ACTION_STATE_INTRO; } private function ballMessage(_arg1:myCustomEvent):void{ var _local2:Number; switch (_arg1.myMessage){ case BALL_KICKED_EVENT: pointerShow = false; canvasBD.fillRect(canvasBD.rect, 0); _theBall.t = 0; if (pointerNum == 0){ _theBall.ballSpeed = 30; _theBall.slowingFactor = 0.5; _theBall.alfaPocRad = 0; } else { _theBall.ballSpeed = (5 + theBall.ballInitialSpeed); _theBall.slowingFactor = (0.98 + (pointerNum * 0.001)); _theBall.alfaPocRad = ((yHeight * Math.PI) / 25); }; ugaoBeta = (ugaoBeta + Math.PI); _theBall.ballXStep = (_theBall.ballSpeed * Math.cos(ugaoBeta)); _theBall.ballYStep = (_theBall.ballSpeed * Math.sin(ugaoBeta)); if (pointerNum == 0){ pointerShow = true; _theBall.x = _targetClip.x; _theBall.y = _targetClip.y; _targetClip.x = (_targetClip.x + (_theBall.ballXStep * 2.1)); _targetClip.y = (_targetClip.y + (_theBall.ballYStep * 2.1)); playerBasicStep = 3; _player.playerTargetAngleRad = FindAngle(_player, _targetClip); _local2 = ((100 - (5 * (_theBall.targetTouchNumber - 1))) / 100); if (_local2 < 0.5){ _local2 = 0.5; }; _field._energy.energy_mask.x = (_field._energy.energy_mask.x - 5); _player.playerXStep = ((_local2 * playerBasicStep) * Math.cos(_player.playerTargetAngleRad)); _player.playerYStep = ((_local2 * playerBasicStep) * Math.sin(_player.playerTargetAngleRad)); _player.playerStepCounter = Math.round((FindDistance(_player, _targetClip) / (_local2 * playerBasicStep))); playSound("bump"); } else { _field.removeChild(_targetClip); _theBall.x = (_theBall.x + (0.2 * _theBall.ballXStep)); _theBall.y = (_theBall.y + (0.2 * _theBall.ballYStep)); iKickedTheBall = true; shot = true; playSound("shot"); }; break; case BALL_OPPONENT: playSound("shot"); endOfShotMessage("missed"); break; case BALL_OUT: playSound("miss"); endOfShotMessage("missed"); break; case BALL_GOAL: goalsScored++; pointsInMatch = (pointsInMatch + (roundC + 1)); endOfShotMessage("goal"); playSound("gool"); break; case BALL_STOP_EVERYTHING: removeEventListener(Event.ENTER_FRAME, runAction); break; }; } function restartAction(_arg1:MouseEvent):void{ trace("Restart"); clearance(); init(); } function startTheGame(_arg1:MouseEvent):void{ trace("Pritisnuto dugme za start"); _instrukcije.instr_baza.startButton.removeEventListener(MouseEvent.CLICK, startTheGame); removeChild(_instrukcije); actionState = ACTION_STATE_INTRO; } public function targetClicked(_arg1:MouseEvent):void{ _targetClip.scaleX = (_targetClip.scaleY = 1); _targetClip._state = (_targetClip._clipWait + 1); _targetClip.removeEventListener(MouseEvent.CLICK, targetClicked); pointerShow = true; _player.playerTargetAngleRad = FindAngle(_player, _targetClip); _player.playerXStep = (playerBasicStep * Math.cos(_player.playerTargetAngleRad)); _player.playerYStep = (playerBasicStep * Math.sin(_player.playerTargetAngleRad)); _player.playerStepCounter = Math.round((FindDistance(_player, _targetClip) / playerBasicStep)); MyStage.addEventListener(MouseEvent.MOUSE_DOWN, shoot, false, 0, true); _player._state = PLAYER_STATE_RUN; } function depthManager():void{ var _local1:int; if (!_theBall.goalEventFlag){ objectsArray.sortOn("y", Array.NUMERIC); _local1 = objectsArray.length; while (_local1--) { if (objectHolder.getChildIndex(objectsArray[_local1]) != _local1){ objectHolder.setChildIndex(objectsArray[_local1], _local1); }; }; } else { objectHolder.setChildIndex(objectHolder.getChildByName("ball"), 0); }; } function clearEvents():void{ var _local1:Number; _local1 = 0; while (_local1 < myArrayListeners.length) { if (MyStage.hasEventListener(myArrayListeners[_local1].type)){ MyStage.removeEventListener(myArrayListeners[_local1].type, myArrayListeners[_local1].listener); }; _local1++; }; } public function actionMainPart():void{ var _local1:int; var _local2:Number; var _local3:Number; depthManager(); animateTitle(_targetClip); if (_targetClip.scaleX <= 0){ _targetClip._state = (_targetClip._clipWait + 1); _targetClip.scaleX = 0; }; _local1 = 0; while (_local1 < objectsArray.length) { tempObject = objectsArray[_local1]; if ((((tempObject.role == FIELD_PLAYER)) || ((tempObject.role == MY_PLAYER)))){ switch (tempObject._state){ case PLAYER_STATE_STILL: playerFunction = plStill; break; case PLAYER_STATE_RUN: playerFunction = plRun; break; }; playerFunction(tempObject); }; _local1++; }; _local2 = (FindDistance(_player, _targetClip) / playerBasicStep); _local3 = (FindDistance(_theBall, _targetClip) / theBall.ballInitialSpeed); if ((((((_local2 < _local3)) || ((_targetClip.scaleX <= 0)))) && ((_theBall._state == theBall.BALL_STATE_STILL)))){ ballTargetAngleRad = FindAngle(_theBall, _targetClip); _theBall.ballXStep = (_theBall.ballSpeed * Math.cos(ballTargetAngleRad)); _theBall.ballYStep = (_theBall.ballSpeed * Math.sin(ballTargetAngleRad)); _theBall._state = theBall.BALL_STATE_FLY; }; opponents(); } public function animateTitle(_arg1):void{ var _local2:*; var _local3:*; var _local4:Number; _local2 = _arg1; if (_local2._state == 0){ _local2.scaleX = (_local2.scaleX + _local2._clipIncrement); _local2.scaleY = (_local2.scaleY + _local2._clipIncrement); if (_local2.scaleX >= 1){ _local2._state = 1; }; }; if ((((_local2._state >= 1)) && ((_local2._state < _local2._clipWait)))){ _local2._state++; }; if (_local2._state == _local2._clipWait){ _local2.scaleX = (_local2.scaleX - _local2._clipIncrement); _local2.scaleY = (_local2.scaleY - _local2._clipIncrement); }; } public static function FindDistance(_arg1, _arg2):Number{ var _local3:Number; var _local4:Number; var _local5:Number; _local3 = (_arg2.x - _arg1.x); _local4 = (_arg2.y - _arg1.y); _local5 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4))); return (_local5); } public static function playSound(_arg1:String):void{ var _local2:SoundTransform; var _local3:Sound; var _local4:SoundChannel; _local2 = new SoundTransform(0.3, 0); if (mySoundFlag == "ON"){ _local3 = sounds[_arg1]; _local4 = _local3.play(30, 0, _local2); }; } public static function FindAngle(_arg1, _arg2):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = (_arg2.x - _arg1.x); _local4 = (_arg2.y - _arg1.y); _local5 = Math.atan2(_local4, _local3); _local6 = ((_local5 * 180) / Math.PI); return (_local5); } } }//package com.action
Section 2
//Collision_update (com.action.Collision_update) package com.action { import flash.display.*; import flash.geom.*; public class Collision_update extends MovieClip { public function isColliding(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:DisplayObjectContainer, _arg4:Boolean=false, _arg5:Number=0):Boolean{ var _local6:Rectangle; _local6 = getCollisionRect(_arg1, _arg2, _arg3, _arg4, _arg5); if (((!((_local6 == null))) && ((_local6.size.length > 0)))){ return (true); }; return (false); } public static function getCollisionRect(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:DisplayObjectContainer, _arg4:Boolean=false, _arg5:Number=0):Rectangle{ var _local6:Rectangle; var _local7:Rectangle; var _local8:Rectangle; var _local9:BitmapData; var _local10:BitmapData; var _local11:uint; var _local12:Rectangle; var _local13:int; _local6 = _arg1.getBounds(_arg3); _local7 = _arg2.getBounds(_arg3); _local8 = _local6.intersection(_local7); if (_local8.size.length > 0){ if (_arg4){ _local8.width = Math.ceil(_local8.width); _local8.height = Math.ceil(_local8.height); _local9 = getAlphaMap(_arg1, _local8, BitmapDataChannel.RED, _arg3); _local10 = getAlphaMap(_arg2, _local8, BitmapDataChannel.GREEN, _arg3); _local9.draw(_local10, null, null, BlendMode.LIGHTEN); if (_arg5 <= 0){ _local11 = 65792; } else { if (_arg5 > 1){ _arg5 = 1; }; _local13 = Math.round((_arg5 * 0xFF)); _local11 = (((_local13 << 16) | (_local13 << 8)) | 0); }; _local12 = _local9.getColorBoundsRect(_local11, _local11); _local9.getColorBoundsRect(_local11, _local11).x = (_local12.x + _local8.x); _local12.y = (_local12.y + _local8.y); return (_local12); } else { return (_local8); }; //unresolved jump }; return (null); } public static function getCollisionPoint(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:DisplayObjectContainer, _arg4:Boolean=false, _arg5:Number=0):Point{ var _local6:Rectangle; var _local7:Number; var _local8:Number; _local6 = getCollisionRect(_arg1, _arg2, _arg3, _arg4, _arg5); if (((!((_local6 == null))) && ((_local6.size.length > 0)))){ _local7 = ((_local6.left + _local6.right) / 2); _local8 = ((_local6.top + _local6.bottom) / 2); return (new Point(_local7, _local8)); }; return (null); } private static function getAlphaMap(_arg1:DisplayObject, _arg2:Rectangle, _arg3:uint, _arg4:DisplayObjectContainer):BitmapData{ var _local5:Matrix; var _local6:Matrix; var _local7:BitmapData; var _local8:BitmapData; _arg4 = _arg1.parent.parent; _local5 = _arg4.transform.concatenatedMatrix.clone(); _local5.invert(); _local6 = _arg1.transform.concatenatedMatrix.clone(); _local6.concat(_local5); _local6.translate(-(_arg2.x), -(_arg2.y)); _local7 = new BitmapData(_arg2.width, _arg2.height, true, 0); _local7.draw(_arg1, _local6); _local8 = new BitmapData(_arg2.width, _arg2.height, false, 0); _local8.copyChannel(_local7, _local7.rect, new Point(0, 0), BitmapDataChannel.ALPHA, _arg3); return (_local8); } } }//package com.action
Section 3
//endOfGameEvent (com.action.endOfGameEvent) package com.action { import flash.events.*; public class endOfGameEvent extends Event { public var myMessage; public function endOfGameEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, ... _args){ super(_arg1, _arg2, _arg3); myMessage = _args; } override public function clone():Event{ return (new endOfGameEvent(type, bubbles, cancelable, myMessage)); } } }//package com.action
Section 4
//goalkeeperGen (com.action.goalkeeperGen) package com.action { import flash.display.*; import flash.events.*; import flash.geom.*; public class goalkeeperGen extends MovieClip { public const GOALKEEPER_STATE_PARADE_LOW:int = 2; public const GOALKEEPER_STATE_JUMP_FALL:int = 4; public const GOALKEEPER_STATE_FREEZE:int = 8; public const GOALKEEPER_STATE_KNEEL:int = 6; public const GOALKEEPER_STATE_STILL:int = 7; public const GOALKEEPER_WALK_SPEED:int = 2; public const GOALKEEPER_STATE_FOREHAND:int = 5; const goalie_ball_deltaY:int = 10; public const GOALKEEPER_FLY_SPEED:int = 4; const paradeDistance:int = 150; public const GOALKEEPER_STATE_MOVE:int = 0; public const GOALKEEPER_STATE_PARADE_HIGH:int = 1; public const GOALKEEPER_STATE_JUMP:int = 3; var xCorrection:int; var bitmapDataXdim:int; public var playerTargetAngleRad:Number; var set_frizura:uint; var animationStep:int; var thisStartY:Number; public var role:int; var frejmIgracaStart:int; var targetPoint:Point; public var playerYStep:Number; var bitmapDataYdim:int; var sekvencaXDim:int; public var shortsColInd:int; var shadowRot:Array; public var shirtCol1Ind:int; var sliceRect:Rectangle; public var targetDistance:Number; var directionParade:int; var faktor_korekcije;// = 0 var frejmIgracaTrk0:int; var igraceviElementi:BitmapData; public var shirtCol2Ind:int; var sekvencaYDim:int; public var playerXStep:Number; var mySprites:playerSheet; var tempNum:Number; var slicePoint:Point; var _playerShadow:player; var set_dresova:uint; var set_koze:uint; var igracSpriteSheet:BitmapData; public var _state:int; var animRect:Rectangle; var collisiondetection:Collision_update; public var igracSekvencaBitmap:Bitmap; var igracSekvenca:BitmapData; public var playerStepCounter:Number; public function goalkeeperGen(){ faktor_korekcije = 0; shadowRot = [0, 45, 90, 135, 0, 45, 90, 135]; super(); animationStep = 0; targetPoint = new Point(); xCorrection = 0; _playerShadow = new player(); _playerShadow.y = 6; _playerShadow.alpha = 1; addChild(_playerShadow); bitmapDataXdim = 390; bitmapDataYdim = 540; sekvencaXDim = (bitmapDataXdim / 6); sekvencaYDim = (bitmapDataYdim / 6); slicePoint = new Point(0, 0); sliceRect = new Rectangle(0, 0, bitmapDataXdim, bitmapDataYdim); animRect = new Rectangle(0, 0, sekvencaXDim, sekvencaYDim); igracSekvenca = new BitmapData(sekvencaXDim, sekvencaYDim, true, 0); igracSekvencaBitmap = new Bitmap(igracSekvenca); igracSpriteSheet = new goalkeeperSheet(bitmapDataXdim, bitmapDataYdim); set_koze = Math.floor((Math.random() * 5)); set_frizura = Math.floor((Math.random() * 5)); igracSekvencaBitmap.x = -35; igracSekvencaBitmap.y = -80; addChild(igracSekvencaBitmap); collisiondetection = new Collision_update(); } function isBallDangerous():void{ if (actionMain._theBall){ if ((((((Math.abs((this.x - actionMain._theBall.x)) > 15)) && ((this.x > actionMain.goalPointDL.x)))) && ((this.x < actionMain.goalPointDD.x)))){ _state = GOALKEEPER_STATE_MOVE; }; if ((((actionMain._theBall.ballYStep < 0)) && (actionMain.shot))){ if ((((actionMain.indikatorCilja.x > (actionMain.goalPointDL.x - 20))) && ((actionMain.indikatorCilja.x < (actionMain.goalPointDD.x + 20))))){ if (actionMain.FindDistance(actionMain.indikatorCilja, actionMain._theBall) < paradeDistance){ animationStep = -1; if (Math.abs((this.x - actionMain.indikatorCilja.x)) < 30){ _state = GOALKEEPER_STATE_JUMP; if (actionMain._theBall.alfaPocRad < ((3 * Math.PI) / 25)){ _state = GOALKEEPER_STATE_KNEEL; }; if ((this.x - actionMain.indikatorCilja.x) > 15){ xCorrection = -1; }; if ((this.x - actionMain.indikatorCilja.x) < -15){ xCorrection = 1; }; } else { _state = GOALKEEPER_STATE_PARADE_HIGH; directionParade = -1; if (this.x < actionMain.indikatorCilja.x){ directionParade = 1; }; }; }; }; }; }; } function animProba(_arg1:Event):void{ animacijaIgracaTrk(frejmIgracaTrk0); if (frejmIgracaTrk0 < 30){ frejmIgracaTrk0++; } else { frejmIgracaTrk0 = frejmIgracaStart; }; } public function goalkeeperBehaviour():void{ var _local1:int; targetPoint.y = actionMain.goalPointDL.y; _local1 = 40; animationStep++; switch (_state){ case GOALKEEPER_STATE_MOVE: if (actionMain._theBall.targetTouchNumber > 0){ targetPoint.x = actionMain._theBall.x; } else { targetPoint.x = actionMain._targetClip.x; }; if ((((actionMain._theBall.alfaPocRad == 0)) && ((actionMain._theBall.y < 180)))){ if ((((actionMain._theBall.x < 440)) && ((actionMain._theBall.x > 150)))){ targetPoint.y = actionMain._theBall.y; _local1 = 0; }; }; if (targetPoint.x < (actionMain.goalPointDL.x + _local1)){ targetPoint.x = (actionMain.goalPointDL.x + _local1); }; if (targetPoint.x > (actionMain.goalPointDD.x - _local1)){ targetPoint.x = (actionMain.goalPointDD.x - _local1); }; if ((((Math.abs((this.x - targetPoint.x)) < 5)) && ((Math.abs((this.y - targetPoint.y)) < 5)))){ _state = GOALKEEPER_STATE_STILL; } else { if (this.x < targetPoint.x){ this.x = (this.x + GOALKEEPER_WALK_SPEED); }; if (this.x > targetPoint.x){ this.x = (this.x - GOALKEEPER_WALK_SPEED); }; if (this.y < targetPoint.y){ this.y = (this.y + GOALKEEPER_WALK_SPEED); }; if (this.y > targetPoint.y){ this.y = (this.y - GOALKEEPER_WALK_SPEED); }; tempNum = (34 + (Math.floor((this.x / 8)) % 2)); animacijaIgracaTrk(tempNum); }; isBallDangerous(); break; case GOALKEEPER_STATE_PARADE_HIGH: this.scaleX = -(directionParade); tempNum = (3 + (Math.floor((animationStep / 2)) % 12)); if (tempNum == 14){ _state = GOALKEEPER_STATE_FOREHAND; } else { animacijaIgracaTrk(tempNum); this.x = (this.x + (directionParade * GOALKEEPER_FLY_SPEED)); }; break; case GOALKEEPER_STATE_PARADE_LOW: break; case GOALKEEPER_STATE_JUMP: tempNum = (25 + (Math.floor((animationStep / 2)) % 7)); this.x = (this.x + xCorrection); if (tempNum == 31){ _state = GOALKEEPER_STATE_JUMP_FALL; animationStep = 0; } else { animacijaIgracaTrk(tempNum); }; break; case GOALKEEPER_STATE_JUMP_FALL: tempNum = (30 - (Math.floor((animationStep / 2)) % 7)); if (tempNum == 24){ _state = GOALKEEPER_STATE_FOREHAND; } else { animacijaIgracaTrk(tempNum); }; this.x = (this.x + xCorrection); break; case GOALKEEPER_STATE_FOREHAND: break; case GOALKEEPER_STATE_KNEEL: animacijaIgracaTrk(32); break; case GOALKEEPER_STATE_STILL: animationStep = -1; animacijaIgracaTrk(1); isBallDangerous(); break; case GOALKEEPER_STATE_FREEZE: animacijaIgracaTrk(12); break; }; } public function animacijaIgracaTrk(_arg1:int=0):void{ var _local2:int; _local2 = (bitmapDataXdim / sekvencaXDim); animRect.x = ((_arg1 % _local2) * sekvencaXDim); animRect.y = ((Math.floor((_arg1 / _local2)) * sekvencaYDim) - faktor_korekcije); igracSekvenca.fillRect(igracSekvenca.rect, 0); igracSekvenca.copyPixels(igracSpriteSheet, animRect, slicePoint, null, null, true); } public function generisanjeSpriteSheet(){ var _local1:uint; var _local2:uint; var _local3:uint; var _local4:Array; var _local5:Array; var _local6:int; igracSpriteSheet.lock(); _local3 = 4294967295; _local4 = new Array(4278255360, 4294901760, 4278190182); _local5 = [4294967295, 4294901761, 4278190335, 4294967041, 4288269567, 4294927872, 4294941132, 4288230195, 4281584691, 4284874956, 4278203238, 4278190080, 4288217088, 4278205440, 4284927231, 4291611852, 4294954137]; _local6 = 0; while (_local6 < 3) { _local1 = _local4[_local6]; switch (_local6){ case 0: _local2 = _local5[shirtCol1Ind]; break; case 1: _local2 = _local5[shirtCol2Ind]; break; case 2: _local2 = _local5[shortsColInd]; break; }; igracSpriteSheet.threshold(igracSpriteSheet, sliceRect, slicePoint, "==", _local1, _local2, _local3, true); _local6++; }; animacijaIgracaTrk(); } } }//package com.action
Section 5
//gol_i_mreza (com.action.gol_i_mreza) package com.action { import flash.display.*; public class gol_i_mreza extends MovieClip { var mrezaBMP:mrezaMC; public function gol_i_mreza(){ mrezaBMP = new mrezaMC(); mrezaBMP._zadnja_mreza.stop(); addChild(mrezaBMP); } public function trese(_arg1:int=0):void{ mrezaBMP._zadnja_mreza.x = (mrezaBMP._zadnja_mreza.x + _arg1); mrezaBMP._zadnja_mreza.play(); } } }//package com.action
Section 6
//myCustomEvent (com.action.myCustomEvent) package com.action { import flash.events.*; public class myCustomEvent extends Event { public var myMessage:int; public function myCustomEvent(_arg1:int, _arg2:Boolean=false, _arg3:Boolean=false){ super("myCustomEvent"); this.myMessage = _arg1; } override public function clone():Event{ return (new myCustomEvent(myMessage, bubbles, cancelable)); } } }//package com.action
Section 7
//numbers_drawing (com.action.numbers_drawing) package com.action { import flash.display.*; import flash.geom.*; public class numbers_drawing extends Sprite { var slicePoint:Point; var bitmapDataXdim:int;// = 300 var displayYDim:int;// = 36 var numberDisplayData:BitmapData; var sliceRectangleHeight:int;// = 36 var numArray:Array; var sliceRect:Rectangle; var bitmapDataYdim:int;// = 36 public var numberToShow:int;// = 0 var numberDisplayBitmap:Bitmap; var sliceRectangleWidth:int;// = 30 var displayXDim:int;// = 300 var numbersSpriteSheet:numbers_final; public function numbers_drawing(){ bitmapDataXdim = 300; bitmapDataYdim = 36; displayXDim = 300; displayYDim = 36; numberDisplayData = new BitmapData(displayXDim, displayYDim, true, 0); numberDisplayBitmap = new Bitmap(numberDisplayData); numberToShow = 0; slicePoint = new Point(0, 0); sliceRectangleWidth = 30; sliceRectangleHeight = 36; sliceRect = new Rectangle(0, 0, sliceRectangleWidth, sliceRectangleHeight); super(); numbersSpriteSheet = new numbers_final(bitmapDataXdim, bitmapDataYdim); addChild(numberDisplayBitmap); numbersUpdate(0); } public function numbersUpdate(_arg1:int):void{ var _local2:int; var _local3:int; _local3 = _arg1; slicePoint.y = 0; slicePoint.x = 0; sliceRect.y = 0; numArray = new Array(); while (_local3 > 0) { numArray.push((_local3 % 10)); _local3 = Math.floor((_local3 / 10)); }; if (numArray.length == 0){ numArray.push(0); }; numberDisplayData.fillRect(numberDisplayData.rect, 0); while (numArray.length > 0) { _local2 = (numArray.length - 1); sliceRect.x = (sliceRectangleWidth * numArray[_local2]); numberDisplayData.copyPixels(numbersSpriteSheet, sliceRect, slicePoint, null, null, true); numArray.splice(_local2, 1); slicePoint.x = (slicePoint.x + 25); }; } } }//package com.action
Section 8
//playerGen (com.action.playerGen) package com.action { import flash.display.*; import flash.events.*; import flash.geom.*; public class playerGen extends MovieClip { var mySprites:playerSheet; var sekvencaYDim:int; public var playerXStep:Number; var igraceviElementi:BitmapData; var slicePoint:Point; public var dressType:int; var bitmapDataXdim:int; public var playerTargetAngleRad:Number; var set_koze:uint; public var shirtCol2Ind:int; var _playerShadow:player; var animationStep:int; var set_frizura:uint; public var role:int; var frejmIgracaStart:int; public var playerStartY:int; public var playerYStep:Number; var animRect:Rectangle; var bitmapDataYdim:int; public var shirtCol1Ind:int; public var _state:int; public var shortsColInd:int; public var targetDistance:Number; var igracSekvencaBitmap:Bitmap; var sekvencaXDim:int; public var iShotTheBall:Boolean; public var playerStartX:int; var igracSpriteSheet:BitmapData; var shadowRot:Array; var sliceRect:Rectangle; var igracSekvenca:BitmapData; var faktor_korekcije;// = 0 public var playerStepCounter:Number; var frejmIgracaTrk0:int; public function playerGen(){ faktor_korekcije = 0; shadowRot = [0, 45, 90, 135, 0, 45, 90, 135]; super(); animationStep = 0; iShotTheBall = false; _playerShadow = new player(); _playerShadow.y = 6; _playerShadow.alpha = 0.1; addChild(_playerShadow); bitmapDataXdim = 450; bitmapDataYdim = 720; sekvencaXDim = (bitmapDataXdim / 9); sekvencaYDim = (bitmapDataYdim / 8); slicePoint = new Point(0, 0); sliceRect = new Rectangle(0, 0, bitmapDataXdim, bitmapDataYdim); animRect = new Rectangle(0, 0, sekvencaXDim, sekvencaYDim); igracSekvenca = new BitmapData(sekvencaXDim, sekvencaYDim, true, 0); igracSekvencaBitmap = new Bitmap(igracSekvenca); igracSpriteSheet = new playerSheet(bitmapDataXdim, bitmapDataYdim); set_koze = Math.floor((Math.random() * 5)); set_frizura = Math.floor((Math.random() * 5)); igracSekvencaBitmap.x = -20; igracSekvencaBitmap.y = -60; addChild(igracSekvencaBitmap); } function animProba(_arg1:Event):void{ animacijaIgracaTrk(frejmIgracaTrk0); if (frejmIgracaTrk0 < 30){ frejmIgracaTrk0++; } else { frejmIgracaTrk0 = frejmIgracaStart; }; } public function generisanjeSpriteSheet(){ var _local1:uint; var _local2:uint; var _local3:uint; var _local4:Array; var _local5:Array; var _local6:int; switch (dressType){ case 3: igraceviElementi = new prazan(bitmapDataXdim, bitmapDataYdim); break; case 1: igraceviElementi = new uzduzne_pruge(bitmapDataXdim, bitmapDataYdim); break; case 2: igraceviElementi = new poprecne(bitmapDataXdim, bitmapDataYdim); break; case 4: igraceviElementi = new pola_pola_uzduz(bitmapDataXdim, bitmapDataYdim); break; case 5: igraceviElementi = new river(bitmapDataXdim, bitmapDataYdim); break; case 6: igraceviElementi = new arsenal(bitmapDataXdim, bitmapDataYdim); break; case 7: igraceviElementi = new boka(bitmapDataXdim, bitmapDataYdim); break; case 8: igraceviElementi = new ajax(bitmapDataXdim, bitmapDataYdim); break; case 14: igraceviElementi = new pola_pola_dijagon(bitmapDataXdim, bitmapDataYdim); break; default: igraceviElementi = new prazan(bitmapDataXdim, bitmapDataYdim); break; }; igracSpriteSheet.copyPixels(igraceviElementi, sliceRect, slicePoint, null, null, true); igraceviElementi.dispose(); _local3 = 4294967295; _local4 = new Array(4278255360, 4294901760, 4278190335); _local5 = [4294967295, 4294901761, 4278255871, 4294967041, 4288269567, 4294927872, 4294941132, 4288230195, 4281584691, 4284874956, 4278203238, 4278190080, 4288217088, 4278205440, 4284927231, 4291611852, 4294954137]; _local6 = 0; while (_local6 < 3) { _local1 = _local4[_local6]; switch (_local6){ case 0: _local2 = _local5[shirtCol1Ind]; break; case 1: _local2 = _local5[shirtCol2Ind]; break; case 2: _local2 = _local5[shortsColInd]; break; }; igracSpriteSheet.threshold(igracSpriteSheet, sliceRect, slicePoint, "==", _local1, _local2, _local3, true); _local6++; }; animacijaIgracaTrk(); } public function animacijaIgracaTrk(_arg1:int=0):void{ var _local2:Number; var _local3:int; var _local4:int; _local3 = 62; if (this.role == actionMain.MY_PLAYER){ _local3 = 26; }; if (this.role == actionMain.PLAYER_ILLUSTRATION){ _local3 = 27; }; if (playerTargetAngleRad){ _local2 = ((180 * playerTargetAngleRad) / Math.PI); if (_local2 < 0){ _local2 = (_local2 * -1); } else { _local2 = (360 - _local2); }; _local3 = Math.floor(((_local2 + 22.5) / 45)); if (_local3 > 7){ _local3 = 0; }; if (_local3 <= 4){ _local3 = (4 - _local3); } else { _local3 = (12 - _local3); }; _playerShadow.rotation = shadowRot[_local3]; _local3 = (_local3 * 9); }; _arg1 = _local3; switch (_state){ case actionMain.PLAYER_STATE_RUN: animationStep++; _arg1 = (_arg1 + Math.floor((animationStep / 2))); if (_arg1 > (_local3 + 7)){ animationStep = 0; _arg1 = _local3; }; break; case actionMain.PLAYER_STATE_STILL: if (actionMain.actionState == actionMain.ACTION_STATE_MAIN){ _arg1 = (_arg1 + 8); }; break; }; _local4 = (bitmapDataXdim / sekvencaXDim); animRect.x = ((_arg1 % _local4) * sekvencaXDim); animRect.y = ((Math.floor((_arg1 / _local4)) * sekvencaYDim) - faktor_korekcije); igracSekvenca.fillRect(igracSekvenca.rect, 0); igracSekvenca.copyPixels(igracSpriteSheet, animRect, slicePoint, null, null, true); } } }//package com.action
Section 9
//theBall (com.action.theBall) package com.action { import flash.display.*; import flash.events.*; import flash.geom.*; public class theBall extends MovieClip { var ballFunction:Function; public var targetTouchNumber:int; public var ballYStep:Number; var Y0:Number; public var alfaPocStep:Number; var tempObject:MovieClip; var ugaoBeta:Number; public var isBallIn; public var alfaPocRad:Number; public var goalEventFlag:Boolean; public var uniqueEventFlag:Boolean; var dY:Number; public var role:int; public var g:Number;// = 0.3 public var t:int; public var ballSpeed:Number; public var _state:int; public var _ball_shadow:ball_shadow; var indicationPoint:Point; public var targetDistance:Number; var collisiondetection:Collision_update; public var ballXStep:Number; public var wasBallIn:Boolean; public var _ball:ball; public var opponentTouch:Boolean; public var slowingFactor:Number;// = 0.98 public static const BALL_STATE_FLY:int = 1; public static const BALL_STATE_STILL:int = 0; public static var ballInitialSpeed:int = 8; public function theBall(){ slowingFactor = 0.98; g = 0.3; super(); Y0 = 0; uniqueEventFlag = false; goalEventFlag = false; opponentTouch = false; _ball_shadow = new ball_shadow(); _ball_shadow.x = 0; _ball_shadow.y = 0; addChild(_ball_shadow); _ball_shadow.mouseEnabled = false; _ball = new ball(); _ball.x = 0; _ball.y = 0; addChild(_ball); _ball.mouseEnabled = false; targetTouchNumber = 0; t = 0; alfaPocRad = 0; ballSpeed = 0; isBallIn = false; collisiondetection = new Collision_update(); actionMain.iKickedTheBall = false; indicationPoint = new Point(); } public function ballStill():void{ } function getOrtodoxPoint(_arg1:Point, _arg2:Point):Point{ var _local3:Point; var _local4:Number; _local3 = new Point(); _local4 = ((_arg2.y - _arg1.y) / (_arg2.x - _arg1.x)); if (_arg2.x == _arg1.x){ _local3.y = this.y; _local3.x = _arg2.x; } else { _local3.y = ((1 / (1 + (_local4 * _local4))) * (_arg1.y + (_local4 * ((this.x + (_local4 * this.y)) - _arg1.x)))); _local3.x = (this.x - (_local4 * (_local3.y - this.y))); }; return (_local3); } function goalPointIndikator():void{ indicationPoint.x = this.x; indicationPoint.y = this.y; if ((((ballYStep < 0)) && (actionMain.iKickedTheBall))){ actionMain.iKickedTheBall = false; while (indicationPoint.y > actionMain.goalPointDL.y) { indicationPoint.x = (indicationPoint.x + ballXStep); indicationPoint.y = (indicationPoint.y + ballYStep); }; actionMain.indikatorCilja.x = indicationPoint.x; actionMain.indikatorCilja.y = indicationPoint.y; }; } public function ballMove():void{ var _local1:Point; var _local2:Number; var _local3:int; var _local4:Boolean; var _local5:Number; var _local6:Boolean; this.x = (this.x + ballXStep); this.y = (this.y + ballYStep); if (ballSpeed > 0){ dY = ((Y0 - (((0.8 * ballSpeed) * Math.sin(alfaPocRad)) * t)) + (((0.1 * g) * t) * t)); t++; } else { dY = 0; }; if (dY > 0){ t = 0; Y0 = 0; ballSpeed = (ballSpeed * 0.9); if (ballSpeed <= 1){ ballSpeed = 0; }; } else { _ball.y = dY; }; if (targetTouchNumber > 0){ ballXStep = (ballXStep * slowingFactor); ballYStep = (ballYStep * slowingFactor); }; _local1 = new Point(this.x, this.y); _local2 = actionMain.FindDistance(_local1, actionMain._player); if ((((((_local2 < ballInitialSpeed)) && (!(uniqueEventFlag)))) && (!(opponentTouch)))){ targetTouchNumber++; dispatchEvent(new myCustomEvent(actionMain.BALL_KICKED_EVENT)); }; wasBallIn = isBallIn; isBallIn = false; if (getOrtodoxPoint(actionMain.pointDL, actionMain.pointGL).x < this.x){ if (getOrtodoxPoint(actionMain.pointGL, actionMain.pointGD).y < this.y){ if (getOrtodoxPoint(actionMain.pointGD, actionMain.pointDD).x > this.x){ if (getOrtodoxPoint(actionMain.pointDD, actionMain.pointDL).y > this.y){ isBallIn = true; }; }; }; }; _local3 = 0; while (_local3 < actionMain.objectsArray.length) { tempObject = actionMain.objectsArray[_local3]; if ((((tempObject.role == actionMain.FIELD_PLAYER)) && (isBallIn))){ _local2 = actionMain.FindDistance(_local1, tempObject); if ((((_local2 < (2 * ballInitialSpeed))) && (!(opponentTouch)))){ if (Math.abs(dY) < 70){ opponentTouch = true; slowingFactor = 1; if (Math.abs(dY) < 5){ ballSpeed = (5 + ballInitialSpeed); ugaoBeta = (0.5 * Math.PI); ballXStep = (ballSpeed * Math.cos(ugaoBeta)); ballYStep = (ballSpeed * Math.sin(ugaoBeta)); alfaPocRad = ((5 * Math.PI) / 25); } else { ballYStep = (0.9 * Math.abs(ballYStep)); ballXStep = (ballXStep * 0.9); }; actionMain.playSound("shot"); }; }; }; if ((((tempObject.role == actionMain.GOALKEEPER)) && ((actionMain.actionState == actionMain.ACTION_STATE_MAIN)))){ _local4 = collisiondetection.isColliding(tempObject.igracSekvencaBitmap, _ball, stage, true, 0); _local5 = Math.abs((tempObject.y - this.y)); if (((((_local4) && ((_local5 < 10)))) && (!(opponentTouch)))){ trace("Golman"); actionMain.playSound("bump"); opponentTouch = true; slowingFactor = 0.98; ballYStep = (0.8 * Math.abs(ballYStep)); ballXStep = (ballXStep * 0.8); if ((((alfaPocRad == 0)) && (!(actionMain.shot)))){ ballYStep = (ballXStep = 0); tempObject._state = 8; }; dispatchEvent(new myCustomEvent(actionMain.BALL_OUT)); }; }; _local3++; }; _local4 = collisiondetection.isColliding(_ball_shadow, actionMain._field.goalArea, stage, true, 0); if (((((_local4) && (!(uniqueEventFlag)))) && (!(opponentTouch)))){ uniqueEventFlag = true; _local6 = collisiondetection.isColliding(_ball, actionMain._field.goalBars, stage, true, 0); if (_local6){ trace("Precka/stativa"); actionMain.playSound("bump"); ballYStep = (0.8 * Math.abs(ballYStep)); ballXStep = (ballXStep * 0.8); dispatchEvent(new myCustomEvent(actionMain.BALL_OUT)); } else { if (Math.abs(_ball.y) > 80){ trace("preko gola"); dispatchEvent(new myCustomEvent(actionMain.BALL_OUT)); } else { trace("Gol!"); goalEventFlag = true; dispatchEvent(new myCustomEvent(actionMain.BALL_GOAL)); }; }; }; _local4 = collisiondetection.isColliding(_ball_shadow, actionMain._field._netArea, stage, true, 0); if (((((((_local4) && (!((ballYStep == 0))))) && (!((ballXStep == 0))))) && (goalEventFlag))){ ballYStep = 0; ballXStep = 0; Y0 = dY; t = 0; ballSpeed = 3; actionMain._goal_net.trese((this.x - actionMain._goal_net.x)); }; if (((((!(isBallIn)) && (wasBallIn))) && (!(uniqueEventFlag)))){ trace("Lopta je u autu"); uniqueEventFlag = true; dispatchEvent(new myCustomEvent(actionMain.BALL_OUT)); }; goalPointIndikator(); } public function ballFlight(){ switch (_state){ case BALL_STATE_STILL: ballFunction = ballStill; break; case BALL_STATE_FLY: ballFunction = ballMove; break; }; ballFunction(); } } }//package com.action
Section 10
//areYouSure (com.areYouSure) package com { import flash.display.*; import flash.events.*; import flash.text.*; public class areYouSure extends MovieClip { public var confirmButton:buttonM; public var cancelButton:buttonM; public var info:TextField; public function areYouSure(){ cancelButton.label2.text = "NO, CONTINUE THE GAME"; cancelButton.label2.mouseEnabled = false; cancelButton.addEventListener(MouseEvent.MOUSE_DOWN, cancel_dugme, false, 0, true); confirmButton.label2.text = "YES, GO BACK TO MENU"; confirmButton.label2.mouseEnabled = false; confirmButton.addEventListener(MouseEvent.MOUSE_DOWN, confirm_dugme, false, 0, true); } function cancel_dugme(_arg1:MouseEvent):void{ areYouSureClose(); dispatchEvent(new myCustomEvent(FrameWorkStates.BUTTON_CLOSE_WINDOW)); } function confirm_dugme(_arg1:MouseEvent):void{ areYouSureClose(); dispatchEvent(new myCustomEvent(FrameWorkStates.BUTTON_MAIN_MENU)); } public function areYouSureClose():void{ cancelButton.removeEventListener(MouseEvent.MOUSE_DOWN, cancel_dugme); confirmButton.removeEventListener(MouseEvent.MOUSE_DOWN, confirm_dugme); } } }//package com
Section 11
//clubSelection (com.clubSelection) package com { import flash.display.*; import flash.events.*; import flash.net.*; public class clubSelection extends MovieClip { var myButton:simpleButtonClass; var clubNamesSpeedStart:int;// = 3 var tempObject:Object; var clubNamesSpeed:int;// = 3 var _clubNamesMask:MovieClip; var buttonArray:Array; var j:int; var clubNamesYMin:int; var buttonsInRow:int;// = 4 var colorInd:int; var k:int; var clubNamesYMax:int;// = 0 var tempLabel:String; var clubNamesHolder:MovieClip; var navigationButtonSpecies:int;// = 1 public function clubSelection(){ var _local1:int; clubNamesSpeed = 3; clubNamesSpeedStart = 3; clubNamesYMax = 0; buttonsInRow = 4; navigationButtonSpecies = 1; super(); buttonArray = new Array(); k = Main.clubObjectArray.length; clubNamesPlacement(); if (Main.myLastTeamIndex >= 0){ if (Main.myLastTeamIndex > (Main.clubObjectArray.length - 1)){ Main.myLastTeamIndex = 1; }; tempObject = Main.clubObjectArray[Main.myLastTeamIndex]; trace("Poslednji put igrao za:", tempObject.teamName); tempLabel = tempObject.teamName; colorInd = (tempObject.teamClass - 1); myButton = new simpleButtonClass(Main.myLastTeamIndex, tempLabel, 10, "club", colorInd); myButton.addEventListener("myCustomEvent", clubButtonClick, false, 0, true); myButton.buttonState = "off"; myButton.width = 115; myButton.x = 297; myButton.y = 105; addChild(myButton); buttonArray.push(myButton); }; tempLabel = "A-Z"; myButton = new simpleButtonClass(-10, tempLabel); myButton.buttonState = tempLabel; myButton.width = 60; myButton.x = 565; myButton.y = 275; myButton.addEventListener("myCustomEvent", sortingButtonClick, false, 0, true); addChild(myButton); buttonArray.push(myButton); _local1 = 0; while (_local1 < 2) { myButton = new simpleButtonClass(_local1, tempLabel, 11, "triangle"); myButton.buttonState = "off"; myButton.x = 565; myButton.y = (160 + (_local1 * 55)); myButton.scaleY = (1 - (2 * _local1)); myButton.addEventListener("myCustomEvent", navigationButton, false, 0, true); myButton.addEventListener(MouseEvent.MOUSE_DOWN, scrollSpeedy, false, 0, true); myButton.addEventListener(MouseEvent.MOUSE_UP, scrollSlowly, false, 0, true); addChild(myButton); buttonArray.push(myButton); _local1++; }; _local1 = 0; while (_local1 < 5) { tempLabel = String((_local1 + 1)); colorInd = _local1; myButton = new simpleButtonClass(_local1, tempLabel, 16, "classColor", colorInd); myButton.addEventListener("myCustomEvent", classShortcut, false, 0, true); myButton.classColorIndex = 2; myButton.width = 20; myButton.height = 25; myButton.x = (555 + ((_local1 % 2) * myButton.width)); myButton.y = (335 + ((myButton.height - 5) * Math.floor((_local1 / 2)))); addChild(myButton); buttonArray.push(myButton); _local1++; }; if (GameFrameWork.provera_adrese == -1){ myButton = new simpleButtonClass(1, "PLAY VERSION WITH MORE THAN 300 TEAMS!", 14); myButton.addEventListener("myCustomEvent", playFullVersion, false, 0, true); myButton.x = 297; myButton.y = 385; myButton.width = 450; myButton.height = 25; addChild(myButton); buttonArray.push(myButton); }; } function movementTableStop(_arg1:MouseEvent):void{ clubNamesSpeed = 0; } function scrollSpeedy(_arg1:MouseEvent):void{ clubNamesSpeed = (navigationButtonSpecies * 8); } public function navigationButton(_arg1:myCustomEvent):void{ var _local2:*; navigationButtonSpecies = (1 - (2 * _arg1.target.my_button_species)); clubNamesSpeed = (Math.abs(clubNamesSpeedStart) * (1 - (2 * _arg1.target.my_button_species))); _local2 = _arg1.target.buttonState; if (_local2 == "on"){ addEventListener(Event.ENTER_FRAME, scrollClubs, false, 0, true); } else { removeEventListener(Event.ENTER_FRAME, scrollClubs); }; } public function playFullVersion(_arg1:myCustomEvent):void{ var _local2:URLRequest; _local2 = new URLRequest("http://www.flashfooty.com/igre/he-scores/"); navigateToURL(_local2, "_blank"); } public function sortingButtonClick(_arg1:myCustomEvent):void{ var _local2:String; removeChild(clubNamesHolder); removeChild(_clubNamesMask); _local2 = "A-Z"; _local2 = _arg1.target.buttonState; clubNamesPlacement("teamName", _local2); } function scrollSlowly(_arg1:MouseEvent):void{ clubNamesSpeed = (clubNamesSpeedStart * navigationButtonSpecies); } function onMouseWheelEvent(_arg1:MouseEvent):void{ clubNamesSpeed = _arg1.delta; } public function movementTableCore():void{ } public function scrollClubs(_arg1:Event):void{ if ((((clubNamesHolder.y > clubNamesYMin)) && ((clubNamesSpeed < 0)))){ clubNamesHolder.y = (clubNamesHolder.y + clubNamesSpeed); }; if ((((clubNamesHolder.y < clubNamesYMax)) && ((clubNamesSpeed > 0)))){ clubNamesHolder.y = (clubNamesHolder.y + clubNamesSpeed); }; } public function clubNamesPlacement(_arg1="lastPosition", _arg2:String="A-Z"):void{ var _local3:Array; var _local4:int; var _local5:int; _local3 = Main.clubObjectArray.slice(); if (_arg1 == "lastPosition"){ _local3.sortOn([_arg1], Array.NUMERIC); } else { if (_arg2 == "Z-A"){ _local3.sortOn([_arg1], Array.DESCENDING); } else { _local3.sortOn([_arg1]); }; }; clubNamesHolder = new MovieClip(); addChild(clubNamesHolder); _clubNamesMask = new clubNamesMask(); _clubNamesMask.x = 50; _clubNamesMask.y = 130; addChild(_clubNamesMask); clubNamesHolder.mask = _clubNamesMask; trace("-------------------------------"); _local5 = 0; while (_local5 < k) { tempLabel = _local3[_local5].teamName; _local4 = _local3[_local5].clubID; colorInd = (_local3[_local5].teamClass - 1); _local4 = _local3[_local5].ind; myButton = new simpleButtonClass(_local4, tempLabel, 11, "club", colorInd); myButton.addEventListener("myCustomEvent", clubButtonClick, false, 0, true); myButton.classColorIndex = 2; myButton.width = 110; myButton.x = (125 + ((_local5 % buttonsInRow) * (myButton.width + 5))); myButton.y = (140 + (35 * Math.floor((_local5 / buttonsInRow)))); clubNamesHolder.addChild(myButton); buttonArray.push(myButton); _local5++; }; clubNamesYMin = (145 - clubNamesHolder.height); } public function classShortcut(_arg1:myCustomEvent):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; trace("Klasa:", _arg1.myMessage); removeChild(clubNamesHolder); removeChild(_clubNamesMask); clubNamesPlacement(); _local2 = 0; _local3 = 0; while (_local3 < Main.clubObjectArray.length) { if (Main.clubObjectArray[_local3].teamClass < (_arg1.myMessage + 1)){ _local2++; }; _local3++; }; trace("Broj boljih:", _local2); _local4 = 0; _local5 = (35 * (Math.floor((_local2 / buttonsInRow)) + _local4)); clubNamesHolder.y = (clubNamesHolder.y - _local5); } public function clubButtonClick(_arg1:myCustomEvent):void{ trace("index odabranog kluba u nizu klubova:", _arg1.myMessage); Main.myTeamIndex = _arg1.myMessage; dispatchEvent(new myCustomEvent(0)); } public static function getObjectFromArrayByPoperty(_arg1:Array, _arg2, _arg3:int):Object{ var _local4:int; _local4 = 0; while (_local4 < _arg1.length) { if (_arg1[_local4][_arg2] == _arg3){ return (_arg1[_local4]); }; _local4++; }; return (null); } } }//package com
Section 12
//evenSimplerBC (com.evenSimplerBC) package com { import flash.display.*; import flash.events.*; import flash.text.*; import flash.geom.*; public class evenSimplerBC extends MovieClip { public var my_button_index:int; var colorTransform:ColorTransform; public var displayLabel:String; public var buttonState:String; var classColours:Array; public var classColorIndex:int; public var myButt; public function evenSimplerBC(_arg1:int, _arg2:String="", _arg3:int=14, _arg4:String="normal", _arg5:int=1, _arg6:String="R1: "){ var _local7:TextFormat; classColours = [16777028, 0xFF7700, 43724, 16742348, 0x999999]; super(); _local7 = new TextFormat(); _local7.size = _arg3; classColorIndex = _arg5; my_button_index = _arg1; myButt = new round_label(); displayLabel = _arg2; myButt.textD.text = displayLabel; myButt.textD.setTextFormat(_local7); myButt.textD.mouseEnabled = false; myButt.roundD.text = _arg6; myButt.roundD.mouseEnabled = false; myButt.unvisible.addEventListener(MouseEvent.MOUSE_DOWN, clickRound, false, 0, true); colorTransform = myButt.colBox.transform.colorTransform; colorTransform.color = classColours[_arg5]; myButt.colBox.transform.colorTransform = colorTransform; addChild(myButt); } private function clickRound(_arg1:MouseEvent):void{ trace("odapinjem event:", my_button_index); dispatchEvent(new myCustomEvent(my_button_index)); } } }//package com
Section 13
//FrameWorkStates (com.FrameWorkStates) package com { public class FrameWorkStates { public static const STATE_HIGHSCORE_TABLE_RECORDING:int = 10; public static const BUTTON_OTHER_GAMES:int = 4; public static const STATE_SYSTEM_SECOND_MENU_DISSOLVE:int = 7; public static const STATE_HIGHSCORE_TABLE_CLOSE:int = 7; public static const STATE_HIGHSCORE_TABLE_FORBIDDEN:int = 0; public static const QUIT_CURRENT_GAME:int = 99; public static const _dressColor:Array = [4294967295, 4294901761, 4278255871, 4294967041, 4278229452, 4291585587, 4291598796, 4288230195, 4281584691, 4284874956, 4278203238, 4278190080, 4286714132, 4281558579, 4284927231, 4291611852, 4294967244, 4294954137, 4294954086, 4284874752, 4284806240]; public static const STATE_SYSTEM_NEWGROUNDS_AD:int = 3; public static const STATE_SYSTEM_MOCHI_AD:int = 1; public static const STATE_SYSTEM_SECOND_MENU_INIT:int = 6; public static const BACK_TO_COMPETITION_TREE:int = 98; public static const BUTTON_CLOSE_WINDOW:int = 8; public static const BUTTON_NUM_PLAYERS:int = 2; public static const ENTER_HIGHSCORE_ENDED:int = 101; public static const STATE_SYSTEM_GAME:int = 11; public static const STATE_SYSTEM_WAIT_FOR_CLOSE:int = 13; public static const BUTTON_ALL_TIME_CLUB_TITLES:int = 11; public static const BUTTON_PLAY_WITH_HIGHSCORES = 17; public static const STATE_SYSTEM_MOCHI_HIGHSCORES:int = 14; public static const STATE_SYSTEM_SHOW_HIGHSCORES:int = 15; public static const STATE_HIGHSCORE_TABLE_CLUBS_THIS_WEEK:int = 3; public static const STATE_SYSTEM_START_DATA:int = 100; public static const STATE_SYSTEM_MENU_DISSOLVE:int = 5; public static const ENTER_HIGHSCORE = 100; public static const STATE_SYSTEM_INSTRUCTIONS_SHOW:int = 8; public static const BUTTON_MAIN_MENU:int = 12; public static const STATE_SYSTEM_PRELOAD:int = 2; public static const BUTTON_START_NOW:int = 6; public static const BUTTON_PLAYERS_WEEK:int = 10; public static const BUTTON_VIDEO_TUTORIAL = 18; public static const BUTTON_ALL_TIME_PLAYER_TITLES = 14; public static const STATE_HIGHSCORE_TABLE_START:int = 99; public static const STATE_HIGHSCORE_TABLE_CHECKING:int = 8; public static const BUTTON_BACK_TO_THE_GAME = 15; public static const STATE_SYSTEM_GAME_START:int = 10; public static const STATE_SYSTEM_COMPETITION_TREE:int = 16; public static const URL_PREFIX:String = ""; public static const BUTTON_SEE_HIGHSCORES:int = 7; public static const STATE_HIGHSCORE_INPUT_SUCCESS:int = 11; public static const STATE_SYSTEM_INSTRUCTIONS_HIDE:int = 9; public static const BUT_LABELS:Array = ["PLAY", "SOUND: ", "NUMBER OF PLAYERS: ", "LEVEL OF DIFFICULTY: ", "ALL FOOTBALL GAMES", "INSTRUCTIONS", "START", "HIGHSCORES", "X", "CLUBS THIS WEEK", "PLAYERS THIS WEEK", "ALL TIME TITLES", "BACK TO MENU", "SUBMIT SCORE", "ALL TIME PLAYERS", "CONTINUE >>", "PLAY AGAIN", "PLAY WITH HIGHSCORES", "VIDEO TUTORIAL"]; public static const BUTTON_INSTRUCTIONS:int = 5; public static const BUTTON_PLAY_AGAIN = 16; public static const BUTTON_SOUND:int = 1; public static const STATE_HIGHSCORE_ALL_TIME_CLUB_TITLES:int = 5; public static const STATE_HIGHSCORE_TABLE_PLAYERS_THIS_WEEK:int = 4; public static const BUTTON_CLUBS_WEEK:int = 9; public static const BUTTON_SUBMIT:int = 13; public static const STATE_SYSTEM_PAUSE:int = 99; public static const STATE_HIGHSCORE_TABLE_CONNECTION_ERROR:int = 2; public static const STATE_HIGHSCORE_TABLE_LOADING:int = 1; public static const STATE_HIGHSCORE_ALL_TIME_PLAYER_TITLES:int = 6; public static const STATE_HIGHSCORE_TABLE_INPUT:int = 9; public static const STATE_SYSTEM_MENU_INIT:int = 4; public static const BUTTON_DIFFICULTY:int = 3; public static const BUTTON_START:int = 0; public static const STATE_SYSTEM_GAME_OVER:int = 12; } }//package com
Section 14
//Game (com.Game) package com { import flash.display.*; public class Game extends MovieClip { public static const GAME_OVER:String = "game over"; public static const NEW_LEVEL:String = "new level"; public static const QUIT_GAME:int = 27; public function clearance():void{ } public function runGame():void{ } public function newDkickerGame(_arg1:int=10, _arg2:String="striker challenge", _arg3:String="10402070", _arg4:String="10204020", _arg5:String="0024323166", _arg6:uint=1, _arg7:uint=5, _arg8:uint=0, _arg9:int=10, _arg10:uint=0, _arg11:String="Player", _arg12:String="Opponent", _arg13:int=1, _arg14:String="ON", _arg15:int=1):void{ } public function newGame(_arg1:String, _arg2:int):void{ } public function newLevel():void{ } } }//package com
Section 15
//GameFrameWork (com.GameFrameWork) package com { import flash.display.*; import flash.events.*; import mochi.as3.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.net.*; public class GameFrameWork extends MovieClip { public const BUTTON_Y_END:int = 350; public const BUTTON_X_START:int = 300; public var stvarna_adresa:String; var _buttonM:myButtonClass; public var _controls:Controls; public var korektna_adresa:String;// = "flashfooty" public var currentSystemState:int; var i:int; public var gameTimer:Timer; public var mochiBoardId:String; var _buttonArray:Array; public var nextSystemState:int; var button_expansion_rate:Number; public var mochiGameId:String; public var _titleScreen:titleScreen; public var preloaderStarted:Boolean;// = false public var lastSystemState:int; public var systemFunction:Function; public var _menu2Screen:menu2Screen; public var timerPeriod:Number; public var preloadString:String; var soundTrack:mainSoundTrack; public var buttonType:Array; public var lastScore:Number; public var buttonSpecies:int; var lengthAr:int; public var preloadScreen:LoadingBox; public var frameRate:int; public var game:Game; public static var tipNumber:int = 0; public static var tipsStatus:String = "ON"; public static var numberOfPlayers:int = 1; public static var difficultyLevels:Array = ["NOVICE", "NORMAL", "EXPERT"]; public static var privacyFlag:Boolean = false; public static var so:SharedObject = SharedObject.getLocal("Game_vars"); public static var levelOfDifficulty:int = 1; public static var soundStatus:String = "ON"; public static var aKeyPress:Array = []; public static var soundTrackChannel:SoundChannel; public static var player_plays_for:String = ""; public static var pointsWon:int; public static var provera_adrese:int; public static var keyReleaseFlag:Boolean = true; public function GameFrameWork(){ preloaderStarted = false; preloadString = new String(); korektna_adresa = "flashfooty"; stvarna_adresa = loaderInfo.url.substr(0, 25); super(); } public function startTimer():void{ timerPeriod = (1000 / frameRate); gameTimer = new Timer(timerPeriod); gameTimer.addEventListener(TimerEvent.TIMER, runGame); gameTimer.start(); } public function systemSecondMenuDissolve():void{ button_expansion_rate = -0.1; addEventListener(Event.ENTER_FRAME, button_expand, false, 0, true); switchSystemState(FrameWorkStates.STATE_SYSTEM_WAIT_FOR_CLOSE); } public function button_placement(_arg1:int=0, _arg2:int=0):void{ var _local3:*; _local3 = _arg1; _buttonArray = new Array(); lengthAr = buttonType.length; i = 0; while (i < lengthAr) { buttonSpecies = buttonType[((lengthAr - 1) - i)]; _buttonM = new myButtonClass(buttonSpecies); _buttonM.scaleX = 0; _buttonM.x = (BUTTON_X_START + _arg2); _buttonM.y = ((BUTTON_Y_END - (i * 35)) - _local3); _buttonM.addEventListener("myCustomEvent", buttonClick, false, 0, true); addChild(_buttonM); _buttonArray.push(_buttonM); i++; }; button_expansion_rate = 0.1; addEventListener(Event.ENTER_FRAME, button_expand, false, 0, true); switchSystemState(FrameWorkStates.STATE_SYSTEM_WAIT_FOR_CLOSE); } public function systemGameStart():void{ } private function keyUpListener(_arg1:KeyboardEvent){ aKeyPress[_arg1.keyCode] = false; if (((!(aKeyPress[86])) && (!(aKeyPress[17])))){ keyReleaseFlag = true; }; } function button_expand(_arg1:Event):void{ var _local2:*; lengthAr = _buttonArray.length; i = 0; while (i < lengthAr) { _local2 = _buttonArray[i]; _local2.scaleX = (_local2.scaleX + button_expansion_rate); if (_local2.scaleX <= 0){ _local2.scaleX = 0; }; i++; }; if ((((_local2.scaleX >= 0.7)) || ((_local2.scaleX <= 0)))){ removeEventListener(Event.ENTER_FRAME, button_expand); if (button_expansion_rate < 0){ i = (lengthAr - 1); while (i >= 0) { _local2 = _buttonArray[i]; _local2.removeEventListener("myCustomEvent", buttonClick); _buttonArray.splice(i, 1); removeChild(_local2); i--; }; switch (lastSystemState){ case FrameWorkStates.STATE_SYSTEM_MENU_DISSOLVE: switchSystemState(FrameWorkStates.STATE_SYSTEM_SECOND_MENU_INIT); break; case FrameWorkStates.STATE_SYSTEM_SECOND_MENU_DISSOLVE: switchSystemState(FrameWorkStates.STATE_SYSTEM_GAME_START); break; }; }; }; } public function systemMochiAd():void{ var _local1:String; trace("Pocetak MochiAds reklame"); _local1 = ((stage.width + "x") + stage.height); MochiAd.showPreGameAd({clip:this, id:mochiGameId, res:_local1, ad_finished:mochiAdComplete, ad_failed:mochiAdComplete, ad_skipped:mochiAdComplete}); switchSystemState(FrameWorkStates.STATE_SYSTEM_WAIT_FOR_CLOSE); nextSystemState = FrameWorkStates.STATE_SYSTEM_PRELOAD; } public function systemMenuInit():void{ trace("BROJ DECE GameFrameWork:", this.numChildren); stage.focus = stage; stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownListener); stage.addEventListener(KeyboardEvent.KEY_UP, keyUpListener); _titleScreen = new titleScreen(); addChild(_titleScreen); if (so.size != 0){ numberOfPlayers = so.data._numberOfPlayers; levelOfDifficulty = so.data._levelOfDifficulty; soundStatus = so.data._soundStatus; tipsStatus = so.data._tipsStatus; tipNumber = so.data.tipNumber; }; buttonTypeInit(); SoundMixer.stopAll(); soundTrack = new mainSoundTrack(); if (soundStatus == "ON"){ trace("pustam muziku"); soundTrackChannel = soundTrack.play(0, 999); }; button_placement(50, 120); } public function systemHideInstructions():void{ } public function systemHighscoreEnter():void{ } public function systemMenuDissolve():void{ so.data._numberOfPlayers = numberOfPlayers; so.data._levelOfDifficulty = levelOfDifficulty; so.data._soundStatus = soundStatus; so.data._tipsStatus = tipsStatus; so.data.tipNumber = tipNumber; so.flush(); button_expansion_rate = -0.1; addEventListener(Event.ENTER_FRAME, button_expand, false, 0, true); switchSystemState(FrameWorkStates.STATE_SYSTEM_WAIT_FOR_CLOSE); } public function buttonTypeInit():void{ buttonType = [FrameWorkStates.BUTTON_START, FrameWorkStates.BUTTON_SOUND, FrameWorkStates.BUTTON_NUM_PLAYERS, FrameWorkStates.BUTTON_DIFFICULTY, FrameWorkStates.BUTTON_SEE_HIGHSCORES, FrameWorkStates.BUTTON_OTHER_GAMES]; } private function systemPreload():void{ var _local1:int; if (!preloaderStarted){ trace("preload started"); preloadScreen = new LoadingBox(); preloadScreen.loading_txt.text = (preloadScreen.loading_txt_shadow.text = "0%"); addChild(preloadScreen); preloaderStarted = true; } else { _local1 = ((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100); trace(_local1); preloadScreen.loading_txt.text = (preloadScreen.loading_txt_shadow.text = (String(_local1) + "%")); if (_local1 > 99){ trace(">99"); this.play(); }; if (currentFrame == 3){ trace("frame == 3"); removeChild(preloadScreen); nextSystemState = FrameWorkStates.STATE_SYSTEM_START_DATA; switchSystemState(nextSystemState); }; }; } public function systemWaitForClose():void{ } public function init():void{ } public function runGame(_arg1:TimerEvent):void{ systemFunction(); _arg1.updateAfterEvent(); } public function systemGameOver():void{ gameRemoval(); switchSystemState(FrameWorkStates.STATE_SYSTEM_MENU_INIT); } public function systemShowHighScores():void{ } public function systemHighscoreShow():void{ } private function keyDownListener(_arg1:KeyboardEvent){ aKeyPress[_arg1.keyCode] = true; } public function systemMochiHighscores():void{ } public function buttonClick(_arg1:myCustomEvent):void{ var _local2:URLRequest; var _local3:instructions; switch (_arg1.myMessage){ case FrameWorkStates.BUTTON_START: switchSystemState(FrameWorkStates.STATE_SYSTEM_MENU_DISSOLVE); break; case FrameWorkStates.BUTTON_INSTRUCTIONS: trace("Kliknuto Instructions"); _local3 = new instructions(); _local3.x = 300; _local3.y = 210; addChild(_local3); break; case FrameWorkStates.BUTTON_SOUND: if (soundStatus == "ON"){ soundTrackChannel = soundTrack.play(0, 999); } else { soundTrackChannel.stop(); }; break; case FrameWorkStates.BUTTON_SEE_HIGHSCORES: trace("Highscores"); showHighScore(); break; case FrameWorkStates.BUTTON_OTHER_GAMES: trace("Kliknuto Football Games"); _local2 = new URLRequest("http://www.flashfooty.com/football_games.php"); navigateToURL(_local2, "_blank"); break; case FrameWorkStates.BUTTON_VIDEO_TUTORIAL: trace("Kliknuto Video Tutorial"); _local2 = new URLRequest("http://www.flashfooty.com/igre/he-scores/index.php?he_scores_page=goals"); navigateToURL(_local2, "_blank"); break; case FrameWorkStates.BUTTON_START_NOW: trace("Start match"); break; case FrameWorkStates.BUTTON_MAIN_MENU: trace("Are you sure?..."); break; case FrameWorkStates.QUIT_CURRENT_GAME: switchSystemState(FrameWorkStates.STATE_SYSTEM_GAME_OVER); break; case FrameWorkStates.BACK_TO_COMPETITION_TREE: trace("Back to competition tree"); backToCompetitionTree(); break; }; } public function systemShowInstructions():void{ } public function showHighScore():void{ } function gameRemoval():void{ game.removeEventListener("myCustomEvent", buttonClick); game.clearance(); removeChild(game); } public function systemSecondMenuInit():void{ } public function systemStartData():void{ } public function switchSystemState(_arg1:int):void{ if (currentSystemState != FrameWorkStates.STATE_SYSTEM_WAIT_FOR_CLOSE){ lastSystemState = currentSystemState; }; currentSystemState = _arg1; switch (_arg1){ case FrameWorkStates.STATE_SYSTEM_MOCHI_AD: systemFunction = systemMochiAd; break; case FrameWorkStates.STATE_SYSTEM_START_DATA: systemFunction = systemStartData; break; case FrameWorkStates.STATE_SYSTEM_MOCHI_HIGHSCORES: systemFunction = systemMochiHighscores; break; case FrameWorkStates.STATE_SYSTEM_PRELOAD: systemFunction = systemPreload; break; case FrameWorkStates.STATE_SYSTEM_MENU_INIT: systemFunction = systemMenuInit; break; case FrameWorkStates.STATE_SYSTEM_MENU_DISSOLVE: systemFunction = systemMenuDissolve; break; case FrameWorkStates.STATE_SYSTEM_SHOW_HIGHSCORES: systemFunction = systemShowHighScores; break; case FrameWorkStates.STATE_SYSTEM_SECOND_MENU_INIT: systemFunction = systemSecondMenuInit; break; case FrameWorkStates.STATE_SYSTEM_SECOND_MENU_DISSOLVE: systemFunction = systemSecondMenuDissolve; break; case FrameWorkStates.STATE_SYSTEM_COMPETITION_TREE: systemFunction = systemCompetitionTree; break; case FrameWorkStates.STATE_SYSTEM_GAME_START: systemFunction = systemGameStart; break; case FrameWorkStates.STATE_SYSTEM_GAME_OVER: systemFunction = systemGameOver; break; case FrameWorkStates.STATE_SYSTEM_WAIT_FOR_CLOSE: systemFunction = systemWaitForClose; break; case FrameWorkStates.STATE_SYSTEM_INSTRUCTIONS_SHOW: systemFunction = systemShowInstructions; break; case FrameWorkStates.STATE_SYSTEM_INSTRUCTIONS_HIDE: systemFunction = systemHideInstructions; break; default: systemFunction = systemMenuInit; }; } public function backToCompetitionTree():void{ gameRemoval(); _menu2Screen = new menu2Screen(); addChild(_menu2Screen); _menu2Screen.textBase.height = 65; _menu2Screen.textBase.y = (_menu2Screen.textBase.y + 20); switchSystemState(FrameWorkStates.STATE_SYSTEM_COMPETITION_TREE); } public function systemCompetitionTree():void{ } public function mochiAdComplete():void{ trace("Gotova reklama"); if (nextSystemState == FrameWorkStates.STATE_SYSTEM_PRELOAD){ switchSystemState(nextSystemState); trace("Stanje sistema:", currentSystemState); }; } public function systemGoal():void{ } } }//package com
Section 16
//highScoresShow (com.highScoresShow) package com { import flash.display.*; import flash.events.*; import flash.text.*; import flash.net.*; import flash.ui.*; import flash.errors.*; public class highScoresShow extends MovieClip { const scoreBoardStartY:int = -100; const scoreBoardMaxY:int = 22; const scoreBoardX:int = -150; var teamsWithEqualPoints:int; var _buttonM:myButtonClass; var highScoreTitle:TextField; var tempObject:Object; var formatSmallest:TextFormat; var playersWithMorePoints:int; var currentSystemState:int; public var cardShape:card; var playersWithEqualPoints:int; var _buttonArray:Array; public var playerObjectArray:Array; var highScoreBoard:TextField; var triangleUp; var triangleDown:triangleButton; var myTeamObject:Object; var highScoreInfo:TextField; var _buttonMSimple:simpleButtonClass; var maska:maskField; var highScorePoints:TextField; var format2; var format3; var lastSystemState:int; var format4; var myLastTeamID:int; var teamsWithMorePoints:int; var showArrayLength:int; public var whatsThis:TextField; public var highscoreTableFunction:Function; public var playerObject:Object; public var _closeButton:buttonM; public var clubObject:Object; var myPlayerID:int; var formatSmallerLeft; var buttonSpecies:int; var lengthAr:int; public var clubObjectArray:Array; var scrollFlag:int; var scoreBoardMinY:int; var highScoreHolder:Sprite; var format; var formatSmaller; static var brojKlubova:int; static var brojIgraca:int; public function highScoresShow(_arg1:int=-1){ myLastTeamID = _arg1; trace("myLastTeamID:", myLastTeamID); clubObjectArray = []; playerObjectArray = []; _closeButton.label2.text = "X"; _closeButton.label2.mouseEnabled = false; scrollFlag = 0; if (GameFrameWork.provera_adrese == -1){ switchHighscoreTableState(FrameWorkStates.STATE_HIGHSCORE_TABLE_FORBIDDEN); } else { switchHighscoreTableState(FrameWorkStates.STATE_HIGHSCORE_TABLE_LOADING); }; _closeButton.addEventListener(MouseEvent.MOUSE_DOWN, klik_dugme, false, 0, true); } function scrollSpeedy(_arg1:MouseEvent):void{ scrollFlag = (-(_arg1.target.scaleY) * 8); trace("Speedy"); } public function highScoreAllTimePlayerTitles():void{ var _local1:int; var _local2:Object; cardShape.x = 155; highScoreTitle.text = "TOP PLAYERS OF THE WEEK"; if (myPlayerID > -1){ _local2 = getObjectFromArrayByPoperty(playerObjectArray, "ID", myPlayerID); highScoreInfo.text = (_local2.playerName + " has "); _local1 = _local2.weekly_titles; if (_local1 == 0){ highScoreInfo.appendText("no titles so far"); } else { highScoreInfo.appendText((formatNumber(_local2.weekly_titles) + " title")); }; if (_local1 > 1){ highScoreInfo.appendText("s"); }; highScoreInfo.appendText("."); } else { highScoreInfo.text = "Top player of the week is the player with most points in that week."; }; _local2 = getObjectFromArrayByPoperty(playerObjectArray, "lastPosition", 1); if (((_local2) && ((_local2.ID >= 1)))){ highScoreInfo.appendText(("\nLast week's best player: " + _local2.playerName)); }; highScoreGenerate(FrameWorkStates.STATE_HIGHSCORE_ALL_TIME_PLAYER_TITLES); } public function highscorePlayersWeek():void{ var _local1:Object; var _local2:int; cardShape.x = -55; highScoreTitle.text = "THIS WEEK'S TOP PLAYERS"; if (myPlayerID > -1){ _local1 = getObjectFromArrayByPoperty(playerObjectArray, "ID", myPlayerID); highScoreInfo.text = (_local1.playerName + " has "); _local2 = _local1.this_week_points; if (_local2 == 0){ highScoreInfo.appendText("no points this week"); } else { highScoreInfo.appendText((formatNumber(_local1.this_week_points) + " point")); }; if (_local2 > 1){ highScoreInfo.appendText("s"); }; highScoreInfo.appendText("."); } else { highScoreInfo.text = "Only logged users can have their points recorded."; }; _local1 = getObjectFromArrayByPoperty(playerObjectArray, "lastPosition", 1); if (((_local1) && ((_local1.ID >= 1)))){ highScoreInfo.appendText(("\nLast week's best player: " + _local1.playerName)); }; highScoreGenerate(FrameWorkStates.STATE_HIGHSCORE_TABLE_PLAYERS_THIS_WEEK); } function scrollSlowly(_arg1:MouseEvent):void{ scrollFlag = (-(_arg1.target.scaleY) * 2); trace("Slowly"); } public function highscoreAllTimeTitles():void{ var _local1:Object; var _local2:int; cardShape.x = 50; highScoreTitle.text = "PAST WEEKLY CHAMPIONS"; if (myLastTeamID > 0){ _local1 = getObjectFromArrayByPoperty(clubObjectArray, "ID", myLastTeamID); highScoreInfo.text = (_local1.teamName + " has "); _local2 = _local1.weekly_titles; if (_local2 == 0){ highScoreInfo.appendText("no titles so far"); } else { highScoreInfo.appendText((formatNumber(_local1.weekly_titles) + " title")); }; if (_local2 > 1){ highScoreInfo.appendText("s"); }; highScoreInfo.appendText("."); } else { highScoreInfo.text = "Each week, one team becomes the champion."; }; _local1 = getObjectFromArrayByPoperty(clubObjectArray, "lastPosition", 1); if (((_local1) && ((_local1.ID >= 1)))){ highScoreInfo.appendText(("\nLast week's champions: " + _local1.teamName)); }; highScoreGenerate(FrameWorkStates.STATE_HIGHSCORE_ALL_TIME_CLUB_TITLES); } public function getObjectFromArrayByPoperty(_arg1:Array, _arg2, _arg3):Object{ var _local4:int; _local4 = 0; while (_local4 < _arg1.length) { if (_arg1[_local4][_arg2] == _arg3){ return (_arg1[_local4]); }; _local4++; }; return (null); } function onMouseWheelEvent(_arg1:MouseEvent):void{ scrollFlag = -(_arg1.delta); movementTableCore(showArrayLength); } function movementTableCore(_arg1):void{ if ((((((_arg1 > 12)) && (((highScoreHolder.y - scrollFlag) > scoreBoardMinY)))) && (((highScoreHolder.y - scrollFlag) < scoreBoardMaxY)))){ highScoreHolder.y = (highScoreHolder.y - scrollFlag); }; } function onDataLoad(_arg1:Event){ var _local2:*; var _local3:uint; var _local4:String; var _local5:Array; var _local6:Array; var _local7:String; var _local8:String; _local2 = _arg1.target.data.al_potvrda; trace("Status transfera je:", _local2); if (_local2 == 1){ gotoAndStop("tables"); format = new TextFormat(); format.font = "Verdana"; format.color = 0x225500; format.size = 18; format.align = TextFormatAlign.LEFT; format4 = new TextFormat(); format4.font = "Verdana"; format4.color = 0; format4.size = 18; format4.align = TextFormatAlign.LEFT; format2 = new TextFormat(); format2.font = format.font; format2.color = 0x225500; format2.size = format.size; format2.align = TextFormatAlign.CENTER; format3 = new TextFormat(); format3.font = format.font; format3.color = 0; format3.size = format.size; format3.align = TextFormatAlign.CENTER; formatSmaller = new TextFormat(); formatSmaller.font = format.font; formatSmaller.color = 0; formatSmaller.size = 14; formatSmaller.align = TextFormatAlign.CENTER; formatSmallerLeft = new TextFormat(); formatSmallerLeft.font = format.font; formatSmallerLeft.color = 0; formatSmallerLeft.size = 14; formatSmallerLeft.align = TextFormatAlign.LEFT; maska = new maskField(); maska.height = 220; maska.y = 35; addChild(maska); highScoreHolder = new Sprite(); highScoreHolder.y = 20; highScoreHolder.mask = maska; addChild(highScoreHolder); highScoreTitle = new TextField(); highScoreTitle.x = -150; highScoreTitle.y = -155; highScoreTitle.width = 300; addChild(highScoreTitle); highScoreTitle.defaultTextFormat = format3; highScoreInfo = new TextField(); highScoreInfo.x = -250; highScoreInfo.y = 155; highScoreInfo.width = 500; addChild(highScoreInfo); highScoreInfo.defaultTextFormat = formatSmaller; highScoreBoard = new TextField(); setHighscoreTextField(highScoreBoard); highScoreBoard.defaultTextFormat = formatSmallerLeft; highScoreHolder.addChild(highScoreBoard); highScorePoints = new TextField(); setHighscoreTextField(highScorePoints, 110, 240, 1); highScoreHolder.addChild(highScorePoints); _local5 = [FrameWorkStates.BUTTON_CLUBS_WEEK, FrameWorkStates.BUTTON_PLAYERS_WEEK, FrameWorkStates.BUTTON_ALL_TIME_CLUB_TITLES, FrameWorkStates.BUTTON_ALL_TIME_PLAYER_TITLES]; _local6 = ["Teams", "Players", "Team Titles", "Player Titles"]; _buttonArray = new Array(); lengthAr = _local5.length; _local3 = 0; while (_local3 < lengthAr) { buttonSpecies = _local5[_local3]; _local4 = _local6[_local3]; _buttonMSimple = new simpleButtonClass(buttonSpecies, _local4, 10); _buttonMSimple.height = 27; _buttonMSimple.width = 95; _buttonMSimple.x = ((this.x - 460) + (_local3 * 105)); _buttonMSimple.y = (this.y - 292); _buttonMSimple.addEventListener("myCustomEvent", buttonClick, false, 0, true); addChild(_buttonMSimple); _buttonArray.push(_buttonMSimple); _local3++; }; highScoreHolder.addEventListener(Event.ENTER_FRAME, moveHighScores, false, 0, true); highScoreHolder.addEventListener(MouseEvent.CLICK, movementTableStop, false, 0, true); highScoreHolder.addEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheelEvent, false, 0, true); triangleUp = new triangleButton(); triangleUp.x = -195; triangleUp.y = -70; triangleUp.addEventListener(MouseEvent.MOUSE_OVER, scrollHighscores, false, 0, true); triangleUp.addEventListener(MouseEvent.MOUSE_OUT, stopHighscores, false, 0, true); triangleUp.addEventListener(MouseEvent.MOUSE_DOWN, scrollSpeedy, false, 0, true); triangleUp.addEventListener(MouseEvent.MOUSE_UP, scrollSlowly, false, 0, true); addChild(triangleUp); triangleDown = new triangleButton(); triangleDown.x = triangleUp.x; triangleDown.y = (triangleUp.y + 190); triangleDown.scaleY = -1; triangleDown.addEventListener(MouseEvent.MOUSE_OVER, scrollHighscores, false, 0, true); triangleDown.addEventListener(MouseEvent.MOUSE_OUT, stopHighscores, false, 0, true); triangleDown.addEventListener(MouseEvent.MOUSE_DOWN, scrollSpeedy, false, 0, true); triangleDown.addEventListener(MouseEvent.MOUSE_UP, scrollSlowly, false, 0, true); addChild(triangleDown); brojKlubova = _arg1.target.data["num_of_clubs"]; trace("brojKlubova:", _arg1.target.data["num_of_clubs"]); playersWithMorePoints = 0; playersWithEqualPoints = 0; _local3 = 0; while (_local3 < brojKlubova) { clubObject = new Object(); clubObject.ind = _local3; _local7 = _arg1.target.data[("club_" + _local3)]; _local7 = _local7.replace("--", "&"); clubObject.teamName = _local7.substr(0, 25); clubObject.ID = _arg1.target.data[("clubID_" + _local3)]; clubObject.lastPosition = _arg1.target.data[("lastweek_pos_" + _local3)]; clubObject.this_week_stars = _arg1.target.data[("this_week_stars_" + _local3)]; clubObject.this_week_points = _arg1.target.data[("this_week_points_" + _local3)]; clubObject.all_time_stars = _arg1.target.data[("all_time_stars_" + _local3)]; clubObject.all_time_points = _arg1.target.data[("all_time_points_" + _local3)]; clubObject.weekly_titles = _arg1.target.data[("weekly_titles_" + _local3)]; clubObject.club_sponsor = _arg1.target.data[("club_sponsor_" + _local3)]; clubObjectArray.push(clubObject); _local3++; }; teamsWithMorePoints = 0; teamsWithEqualPoints = 0; if (myLastTeamID > 0){ myTeamObject = getObjectFromArrayByPoperty(clubObjectArray, "ID", myLastTeamID); trace("Moj broj poena:", myTeamObject.this_week_points); _local3 = 0; while (_local3 < brojKlubova) { clubObject = clubObjectArray[_local3]; if (int(clubObject.this_week_points) == int(myTeamObject.this_week_points)){ teamsWithEqualPoints++; }; if (int(clubObject.this_week_points) > int(myTeamObject.this_week_points)){ teamsWithMorePoints++; }; _local3++; }; teamsWithEqualPoints--; trace("Boljih timova ima:", teamsWithMorePoints, ", istih ima:", teamsWithEqualPoints); }; brojIgraca = _arg1.target.data["num_of_players"]; trace("brojIgraca:", brojIgraca); myPlayerID = _arg1.target.data["playerID"]; trace("ID igraca:", myPlayerID); _local3 = 0; while (_local3 < brojIgraca) { playerObject = new Object(); playerObject.ind = _local3; playerObject.ID = _arg1.target.data[("playerID_" + _local3)]; playerObject.playerName = _arg1.target.data[("playername_" + _local3)].substr(0, 25); playerObject.teamName = _arg1.target.data[("pl_team_name_" + _local3)]; playerObject.lastPosition = _arg1.target.data[("pl_lastweek_pos_" + _local3)]; playerObject.this_week_stars = _arg1.target.data[("pl_this_week_stars_" + _local3)]; playerObject.this_week_points = _arg1.target.data[("pl_this_week_points_" + _local3)]; playerObject.all_time_stars = _arg1.target.data[("pl_all_time_stars_" + _local3)]; playerObject.all_time_points = _arg1.target.data[("pl_all_time_points_" + _local3)]; playerObject.weekly_titles = _arg1.target.data[("pl_weekly_titles_" + _local3)]; playerObjectArray.push(playerObject); _local3++; }; switchHighscoreTableState(FrameWorkStates.STATE_HIGHSCORE_TABLE_CLUBS_THIS_WEEK); } else { switchHighscoreTableState(FrameWorkStates.STATE_HIGHSCORE_TABLE_CONNECTION_ERROR); }; } private function scrollHighscores(_arg1:MouseEvent):void{ trace("over"); scrollFlag = (-(_arg1.target.scaleY) * 2); _arg1.target.alpha = 0.5; } function movementTableStop(_arg1:MouseEvent):void{ scrollFlag = 0; } public function highscoreLoading():void{ var _local1:URLRequest; var _local2:URLLoader; gotoAndStop("please_wait"); _local1 = new URLRequest((FrameWorkStates.URL_PREFIX + "scoreboard.php")); _local1.method = URLRequestMethod.POST; _local2 = new URLLoader(); _local2.dataFormat = URLLoaderDataFormat.VARIABLES; _local2.load(_local1); _local2.addEventListener(Event.COMPLETE, onDataLoad); _local2.addEventListener(IOErrorEvent.IO_ERROR, onIOError); _local2.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError); _local2.addEventListener(HTTPStatusEvent.HTTP_STATUS, onHTTPStatus); } function klik_dugme(_arg1:MouseEvent):void{ highscoreClose(); } private function moveHighScores(_arg1:Event):void{ movementTableCore(showArrayLength); } function onSecurityError(_arg1:SecurityErrorEvent){ trace(("SecurityError: " + _arg1.text)); trace("Problem3"); switchHighscoreTableState(FrameWorkStates.STATE_HIGHSCORE_TABLE_CONNECTION_ERROR); } private function buttonClick(_arg1:myCustomEvent):void{ var _local2:URLRequest; switch (_arg1.myMessage){ case FrameWorkStates.BUTTON_CLUBS_WEEK: switchHighscoreTableState(FrameWorkStates.STATE_HIGHSCORE_TABLE_CLUBS_THIS_WEEK); break; case FrameWorkStates.BUTTON_PLAYERS_WEEK: switchHighscoreTableState(FrameWorkStates.STATE_HIGHSCORE_TABLE_PLAYERS_THIS_WEEK); break; case FrameWorkStates.BUTTON_ALL_TIME_CLUB_TITLES: switchHighscoreTableState(FrameWorkStates.STATE_HIGHSCORE_ALL_TIME_CLUB_TITLES); break; case FrameWorkStates.BUTTON_ALL_TIME_PLAYER_TITLES: switchHighscoreTableState(FrameWorkStates.STATE_HIGHSCORE_ALL_TIME_PLAYER_TITLES); break; case FrameWorkStates.BUTTON_PLAY_WITH_HIGHSCORES: _local2 = new URLRequest("http://www.flashfooty.com/igre/he-scores/"); navigateToURL(_local2, "_blank"); break; }; } private function setHighscoreTextField(_arg1:TextField, _arg2:int=300, _arg3:int=0, _arg4:int=0, _arg5:int=0):void{ _arg1.width = _arg2; _arg1.multiline = true; _arg1.wordWrap = true; _arg1.selectable = false; _arg1.x = (scoreBoardX + _arg3); _arg1.y = (scoreBoardStartY + _arg5); if (_arg4 == 0){ _arg1.defaultTextFormat = format; } else { _arg1.defaultTextFormat = formatSmaller; }; } public function highscoreClose():void{ var _local1:*; _closeButton.removeEventListener(MouseEvent.MOUSE_DOWN, klik_dugme); if (highScoreHolder){ highScoreHolder.removeEventListener(Event.ENTER_FRAME, moveHighScores); highScoreHolder.removeEventListener(MouseEvent.CLICK, movementTableStop); highScoreHolder.removeEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheelEvent); triangleDown.removeEventListener(MouseEvent.MOUSE_OVER, scrollHighscores); triangleDown.removeEventListener(MouseEvent.MOUSE_OUT, stopHighscores); triangleUp.removeEventListener(MouseEvent.MOUSE_OVER, scrollHighscores); triangleUp.removeEventListener(MouseEvent.MOUSE_OUT, stopHighscores); _local1 = (lengthAr - 1); while (_local1 >= 0) { _buttonArray[_local1].removeEventListener("myCustomEvent", buttonClick); _buttonArray.splice(_local1, 1); _local1--; }; }; parent.removeChild(this); } public function highscoreForbidden():void{ var _local1:myButtonClass; gotoAndStop("forbidden"); _buttonArray = new Array(); _local1 = new myButtonClass(FrameWorkStates.BUTTON_PLAY_WITH_HIGHSCORES); _local1.scaleX = 1; _local1.x = this.x; _local1.y = (this.y + 70); _local1.addEventListener("myCustomEvent", buttonClick, false, 0, true); addChild(_local1); _buttonArray.push(_local1); } public function highScoreGenerate(_arg1:int):void{ var _local2:int; var _local3:Array; var _local4:String; var _local5:String; var _local6:Array; var _local7:String; var _local8:String; var _local9:int; var _local10:uint; _local2 = _arg1; switch (_local2){ case FrameWorkStates.STATE_HIGHSCORE_TABLE_CLUBS_THIS_WEEK: _local3 = clubObjectArray; whatsThis.text = "POINTS"; _local5 = "teamName"; _local4 = "this_week_points"; _local3.sortOn(_local4, (Array.DESCENDING | Array.NUMERIC)); trace("Tabela timova ove nedelje"); break; case FrameWorkStates.STATE_HIGHSCORE_TABLE_PLAYERS_THIS_WEEK: _local3 = playerObjectArray; whatsThis.text = "POINTS"; _local5 = "playerName"; _local4 = "this_week_points"; _local3.sortOn(_local4, (Array.DESCENDING | Array.NUMERIC)); trace("Tabela igraca ove nedelje"); break; case FrameWorkStates.STATE_HIGHSCORE_ALL_TIME_CLUB_TITLES: _local3 = clubObjectArray; whatsThis.text = "TITLES"; _local5 = "teamName"; _local4 = "weekly_titles"; _local3.sortOn(_local4, (Array.DESCENDING | Array.NUMERIC)); trace("Tabela titula timova"); break; case FrameWorkStates.STATE_HIGHSCORE_ALL_TIME_PLAYER_TITLES: _local3 = playerObjectArray; whatsThis.text = "TITLES"; _local5 = "playerName"; _local4 = "weekly_titles"; _local3.sortOn(_local4, (Array.DESCENDING | Array.NUMERIC)); trace("Tabela titula igraca"); break; }; highScorePoints.text = ""; highScoreBoard.text = ""; highScoreBoard.wordWrap = false; highScoreBoard.height = 0; highScoreHolder.y = 20; _local6 = new Array(); _local9 = 0; showArrayLength = _local3.length; _local10 = 0; while (_local10 < showArrayLength) { if (_local3[_local10][_local4] > 0){ _local7 = ""; if (_local10 < 9){ _local7 = (_local7 + " "); }; _local7 = (_local7 + ((((_local10 + 1) + ". ") + _local3[_local10][_local5]) + "\n")); highScoreBoard.appendText(_local7); _local6.push(_local7); highScoreBoard.height = (highScoreBoard.height + 17.5); highScorePoints.appendText((formatNumber(_local3[_local10][_local4]) + "\n")); _local9++; }; _local10++; }; if ((((_local9 == 0)) || (!(_local3)))){ whatsThis.text = ""; highScoreBoard.width = 320; highScoreBoard.text = "\n\n\n\nTHERE ARE NO RECORDS AT THE MOMENT.\nMAYBE YOU COULD BE THE FIRST?"; highScoreBoard.height = 260; }; if (highScoreBoard.height < 150){ highScoreBoard.height = 150; }; highScorePoints.height = highScoreBoard.height; scoreBoardMinY = (-(highScoreBoard.height) + 245); } function onHTTPStatus(_arg1:HTTPStatusEvent){ trace(("HTTPStatus: " + _arg1.status)); return ("Pogresni ulazni podaci"); } public function highscoreClubsWeek():void{ var _local1:String; var _local2:int; var _local3:int; var _local4:*; var _local5:int; var _local6:int; var _local7:int; var _local8:int; _local2 = (teamsWithMorePoints + 1); _local3 = ((teamsWithMorePoints + teamsWithEqualPoints) + 1); cardShape.x = -160; highScoreTitle.text = "THIS WEEK'S TOP TEAMS"; if (myLastTeamID > 0){ tempObject = getObjectFromArrayByPoperty(clubObjectArray, "ID", myLastTeamID); highScoreInfo.text = (((tempObject.teamName + " currently has ") + formatNumber(tempObject.this_week_points)) + " points."); if (teamsWithEqualPoints == 0){ _local1 = "hold"; } else { _local1 = "share"; }; highScoreInfo.appendText(((("\nThey " + _local1) + " ") + _local2)); if (_local3 != _local2){ highScoreInfo.appendText(("-" + _local3)); }; highScoreInfo.appendText(". place "); _local6 = 1; _local7 = 12; _local8 = 12; while (_local2 > _local7) { _local6++; _local8 = (_local8 * 2); _local7 = (_local7 + _local8); }; _local5 = _local6; while (_local3 > _local7) { _local6++; _local8 = (_local8 * 2); _local7 = (_local7 + _local8); }; _local4 = _local6; highScoreInfo.appendText(("(will be Class " + _local5)); if (_local5 != _local4){ if (_local5 == (_local4 + 1)){ highScoreInfo.appendText(" or "); } else { highScoreInfo.appendText(" - "); }; highScoreInfo.appendText(_local4); }; highScoreInfo.appendText(" next week)"); } else { highScoreInfo.text = "Only teams that have any points won this week \n are shown."; }; highScoreGenerate(FrameWorkStates.STATE_HIGHSCORE_TABLE_CLUBS_THIS_WEEK); } function onIOError(_arg1:IOErrorEvent){ trace(("IOError: " + _arg1.text)); trace("Problem`"); switchHighscoreTableState(FrameWorkStates.STATE_HIGHSCORE_TABLE_CONNECTION_ERROR); } function highscoreWait(_arg1:MouseEvent):void{ } public function highscoreError():void{ gotoAndStop("error"); } private function stopHighscores(_arg1:MouseEvent):void{ trace("out"); scrollFlag = 0; _arg1.target.alpha = 1; } public function switchHighscoreTableState(_arg1:int):void{ lastSystemState = currentSystemState; currentSystemState = _arg1; switch (_arg1){ case FrameWorkStates.STATE_HIGHSCORE_TABLE_FORBIDDEN: highscoreTableFunction = highscoreForbidden; break; case FrameWorkStates.STATE_HIGHSCORE_TABLE_LOADING: highscoreTableFunction = highscoreLoading; break; case FrameWorkStates.STATE_HIGHSCORE_TABLE_CONNECTION_ERROR: trace("ERROR"); highscoreTableFunction = highscoreError; break; case FrameWorkStates.STATE_HIGHSCORE_TABLE_CLUBS_THIS_WEEK: highscoreTableFunction = highscoreClubsWeek; break; case FrameWorkStates.STATE_HIGHSCORE_TABLE_PLAYERS_THIS_WEEK: highscoreTableFunction = highscorePlayersWeek; break; case FrameWorkStates.STATE_HIGHSCORE_ALL_TIME_CLUB_TITLES: highscoreTableFunction = highscoreAllTimeTitles; break; case FrameWorkStates.STATE_HIGHSCORE_ALL_TIME_PLAYER_TITLES: highscoreTableFunction = highScoreAllTimePlayerTitles; break; case FrameWorkStates.STATE_HIGHSCORE_TABLE_CLOSE: highscoreTableFunction = highscoreClose; break; }; highscoreTableFunction(); } public static function formatNumber(_arg1:Number):String{ var _local2:String; var _local3:String; var _local4:String; _local2 = _arg1.toString(); _local3 = ""; while (_local2.length > 3) { _local4 = _local2.substr(-3); _local2 = _local2.substr(0, (_local2.length - 3)); _local3 = (("," + _local4) + _local3); }; if (_local2.length > 0){ _local3 = (_local2 + _local3); }; return (_local3); } } }//package com
Section 17
//instructions (com.instructions) package com { import flash.display.*; import flash.events.*; public class instructions extends MovieClip { public var _prevButton:buttonM; public var instrText:MovieClip; var instrMaxPage:int;// = 4 public var _closeButton:buttonM; public var _nextButton:buttonM; var instrPage:int;// = 1 public function instructions(){ instrPage = 1; instrMaxPage = 4; super(); _closeButton.label2.text = "X"; _closeButton.label2.mouseEnabled = false; _closeButton.addEventListener(MouseEvent.MOUSE_DOWN, instrClose, false, 0, true); nextButtonInitialize(); previousButtonHide(); _nextButton.my_button_species = 1; _prevButton.my_button_species = -1; instrText.stop(); } function previousButtonHide(){ _prevButton.label2.text = ""; _prevButton.removeEventListener(MouseEvent.MOUSE_DOWN, instrPrevious); _prevButton.label2.mouseEnabled = false; _prevButton.alpha = 0; } function instrPrevious(_arg1:MouseEvent):void{ if (instrPage > 1){ instrPage--; }; nextButtonInitialize(); if (instrPage == 1){ previousButtonHide(); }; trace("previous page"); instrText.gotoAndStop(instrPage); } function nextButtonInitialize(){ _nextButton.addEventListener(MouseEvent.MOUSE_DOWN, instrNext, false, 0, true); _nextButton.alpha = 1; _nextButton.label2.text = ">>"; } function instrClose(_arg1:MouseEvent):void{ parent.removeChild(this); } function previousButtonInitialize(){ _prevButton.addEventListener(MouseEvent.MOUSE_DOWN, instrPrevious, false, 0, true); _prevButton.alpha = 1; _prevButton.label2.text = "<<"; } function nextButtonHide(){ _nextButton.removeEventListener(MouseEvent.MOUSE_DOWN, instrNext); _nextButton.alpha = 0; _nextButton.label2.text = ""; } function instrNext(_arg1:MouseEvent):void{ if (instrPage < instrMaxPage){ instrPage++; }; previousButtonInitialize(); if (instrPage == instrMaxPage){ nextButtonHide(); }; trace("next page"); instrText.gotoAndStop(instrPage); } } }//package com
Section 18
//Main (com.Main) package com { import flash.events.*; import mochi.as3.*; import flash.utils.*; import flash.geom.*; import com.action.*; import flash.net.*; public dynamic class Main extends GameFrameWork { public var oppGoalsInMatch:int; public var areYousurePanel:areYouSure; public var scoredGoalsArray:Array; public var _clubButtons:clubSelection; public var _roundButtonArray:Array; public var _showPairs:showPairs; var pointsRecordingPanel:pointsRecordingBigCup; var numberOfClasses:int;// = 5 var colorTransform:ColorTransform; var _loadingData:startDataBigCup; public var numberOfClubs:int; var _classes_sort_label:classesC; var opponentIndex:int; var pointsInThisMatchCore; public var myGoalsInMatch:int; var pointsToWrite:int; public var opponentsGoalsArray:Array; var myButton:simpleButtonClass; static var competitionRound:int; static var cupClubs2f:Array; static var goalsNeeded:int; static var classColours:Array = [16759739, 12320699, 12303359, 16777147, 12320767]; static var myTeamMainID:int; public static var myTeamIndex:int; static var cupClubs16f:Array; static var myLastTeamIndex:int; static var goalsPerMatchArray:Array; static var areWeStillInTheGame:String; static var mainClubsLeagues:Array; static var mainClubsColours:Array; static var clubObjectArray:Array; static var numberOfRounds:int = 5; static var totalPoints:int; static var cupClubs8f:Array; static var myTeamClass:int; static var mainClubsCountries:Array; static var cupClubs4f:Array; static var goalsNeededArray:Array; static var myTeamName:String; static var mainClubsLWPositions:Array; static var cupClubs:Array; static var mainClubsNames:Array; static var tournamentIsOver:Boolean; static var opponentIndexArray:Array; static var cupClubs1f:Array; public function Main(){ numberOfClasses = 5; super(); addFrameScript(0, frame1, 2, frame3); init(); } override public function systemGameStart():void{ var _local1:int; var _local2:String; var _local3:String; var _local4:String; var _local5:String; var _local6:String; _local1 = clubObjectArray[opponentIndex].teamClass; _local2 = clubObjectArray[opponentIndex].teamName; _local3 = clubObjectArray[opponentIndex].teamColour; _local4 = clubObjectArray[myTeamIndex].teamColour; _local5 = clubObjectArray[myTeamIndex].strikerLooks; _local6 = clubObjectArray[opponentIndex].altColour; if ((((int(_local4.substring(2, 4)) == int(_local3.substring(2, 4)))) && ((int(_local4.substring(6, 8)) == int(_local3.substring(6, 8)))))){ _local3 = _local6; }; if (soundTrackChannel){ soundTrackChannel.stop(); }; switchSystemState(FrameWorkStates.STATE_SYSTEM_WAIT_FOR_CLOSE); game = new actionMain(10, "cup", _local4, _local3, 6, goalsNeeded, myTeamName, _local2, competitionRound, GameFrameWork.soundStatus); addChild(game); game.addEventListener("endOfGameEvent", gameEnded, false, 0, true); } function otherResultsAndDraw(_arg1:int=0):void{ var _local2:int; var _local3:int; var _local4:*; var _local5:*; var _local6:*; var _local7:int; var _local8:*; var _local9:Object; var _local10:*; var _local11:int; var _local12:*; var _local13:*; var _local14:*; var _local15:Number; trace("!!"); _local2 = _arg1; _local3 = cupClubs.length; _local10 = 0; while (_local10 < _local3) { _local8 = cupClubs[_local10]; _local9 = cupClubs[(_local10 + 1)]; _local8.penaltyGoalsScored = (_local9.penaltyGoalsScored = "-"); _local5 = 0; _local4 = _local5; _local11 = 0; while (_local11 < 6) { _local12 = (Math.random() * (8 - _local8.teamClass)); _local14 = ((Math.random() * (7 - _local9.teamClass)) * 3); _local4 = (_local4 + (_local12 > _local14)); _local13 = (Math.random() * (8 - _local9.teamClass)); _local15 = ((Math.random() * (7 - _local8.teamClass)) * 3); _local5 = (_local5 + (_local13 > _local15)); _local11++; }; if (_local8.clubID == myTeamMainID){ trace("igracev tim, situacija 1:", pointsToWrite); if (myGoalsInMatch == goalsNeeded){ goalsNeeded--; }; _local4 = myGoalsInMatch; _local5 = goalsNeeded; }; if (_local9.clubID == myTeamMainID){ trace("igracev tim, situacija 2:", pointsToWrite); if (myGoalsInMatch == goalsNeeded){ goalsNeeded--; }; _local4 = goalsNeeded; _local5 = myGoalsInMatch; }; _local8.goalsScored = _local4; _local9.goalsScored = _local5; trace(_local8.teamName, " - ", _local9.teamName, " ", _local8.goalsScored, ":", _local9.goalsScored); if (_local4 == _local5){ _local6 = Math.floor(((Math.random() * 4) + 3)); _local7 = (_local6 - Math.floor((Math.random() + 1))); if (Math.round(Math.random()) == 1){ _local8.penaltyGoalsScored = _local6; _local9.penaltyGoalsScored = _local7; _local9.stillInTheCup = 0; } else { _local8.penaltyGoalsScored = _local7; _local9.penaltyGoalsScored = _local6; _local8.stillInTheCup = 0; }; } else { if (_local8.goalsScored > _local9.goalsScored){ _local9.stillInTheCup = 0; } else { _local8.stillInTheCup = 0; }; }; _local10 = (_local10 + 2); }; switch (_local2){ case 0: cupClubs16f = clone(cupClubs); break; case 1: cupClubs8f = clone(cupClubs); break; case 2: cupClubs4f = clone(cupClubs); break; case 3: cupClubs2f = clone(cupClubs); break; case 4: cupClubs1f = clone(cupClubs); break; }; _local10 = (cupClubs.length - 1); while (_local10 >= 0) { if (cupClubs[_local10].stillInTheCup == 0){ cupClubs.splice(_local10, 1); }; _local10--; }; trace("Idu dalje:"); _local10 = 0; while (_local10 < cupClubs.length) { trace(cupClubs[_local10].teamName); cupClubs[_local10].goalsScored = "-"; cupClubs[_local10].penaltyGoalsScored = "-"; _local10++; }; switch (_local2){ case 0: cupClubs8f = clone(cupClubs); break; case 1: cupClubs4f = clone(cupClubs); break; case 2: cupClubs2f = clone(cupClubs); break; case 3: cupClubs1f = clone(cupClubs); break; }; } function backToMenu():void{ removeChild(_menu2Screen); switchSystemState(FrameWorkStates.STATE_SYSTEM_MENU_INIT); } function frame3(){ stop(); } function frame1(){ stop(); } override public function buttonTypeInit():void{ numberOfClubs = Main.clubObjectArray.length; buttonType = [FrameWorkStates.BUTTON_START, FrameWorkStates.BUTTON_INSTRUCTIONS, FrameWorkStates.BUTTON_VIDEO_TUTORIAL, FrameWorkStates.BUTTON_SOUND, FrameWorkStates.BUTTON_SEE_HIGHSCORES, FrameWorkStates.BUTTON_OTHER_GAMES]; _titleScreen.menu_info.text = (_titleScreen.menu_info_highlight.text = ""); _titleScreen.textBase.alpha = 0; _titleScreen.menu_info_red.text = (_titleScreen.menu_info_red_shadow.text = (_titleScreen.menu_info_red_shadow2.text = "")); if (so.data.myLastTeamIndex !== undefined){ myLastTeamIndex = so.data.myLastTeamIndex; myTeamMainID = so.data.myTeamMainID; }; trace("so.data.myLastTeamIndex:", myLastTeamIndex); trace("so.data.myTeamMainID:", myTeamMainID); resetData(); } public function dataLoadingFinished(_arg1:myCustomEvent):void{ var _local2:error; trace("Status:", _arg1.myMessage); if ((((_arg1.myMessage == 1)) || ((_arg1.myMessage == 2)))){ clubObjectArray = _loadingData.clubObjectArray; trace("klubovi su ucitani"); switchSystemState(FrameWorkStates.STATE_SYSTEM_MENU_INIT); } else { trace("error"); _local2 = new error(); addChild(_local2); }; _loadingData.removeEventListener("myCustomEvent", dataLoadingFinished); removeChild(_loadingData); } public function showPairsFunc(_arg1:myCustomEvent):void{ _showPairs = new showPairs(_arg1.myMessage); _menu2Screen.addChild(_showPairs); } function getMeAnOpponent():void{ var _local1:int; var _local2:int; var _local3:int; _local3 = 0; while (_local3 < cupClubs.length) { if (cupClubs[_local3].clubID == myTeamMainID){ if ((_local3 % 2) == 0){ _local1 = (_local3 + 1); } else { _local1 = (_local3 - 1); }; _local2 = cupClubs[_local1].ind; opponentIndexArray[competitionRound] = _local2; trace("ETO: ", clubObjectArray[_local2].teamName, ",", competitionRound); }; _local3++; }; _local3 = 0; while (_local3 < opponentIndexArray.length) { trace(1, ":", clubObjectArray[opponentIndexArray[_local3]].teamName); _local3++; }; } override public function init():void{ provera_adrese = stvarna_adresa.search(korektna_adresa); trace(stvarna_adresa, "***", provera_adrese); mochiGameId = "b67a0ff79f5c77e5"; switchSystemState(FrameWorkStates.STATE_SYSTEM_MOCHI_AD); frameRate = 30; startTimer(); } function clone(_arg1:Object){ var _local2:ByteArray; _local2 = new ByteArray(); _local2.writeObject(_arg1); _local2.position = 0; return (_local2.readObject()); } function outOfFlashFooty():void{ var _local1:Object; var _local2:Array; var _local3:Array; var _local4:Array; var _local5:Array; var _local6:Array; var _local7:Array; var _local8:*; var _local9:int; clubObjectArray = []; _local2 = ["ARSENAL", "MANCHESTER UNITED", "LIVERPOOL", "BARCELONA", "REAL MADRID", "ATLéTICO MADRID", "SEVILLA", "PALMEIRAS", "OLYMPIQUE MARSEILLE", "OLYMPIQUE LYON", "BORDEAUX", "MILAN", "INTERNAZIONALE", "ROMA", "BAYER LEVERKUSEN", "BAYERN MüNCHEN", "WERDER BREMEN", "SCHALKE 04", "PSV", "AJAX", "PORTO", "BENFICA", "SPORTING LISBON", "RANGERS", "ESTUDIANTES", "VéLEZ SARSFIELD", "RIVER PLATE", "BOCA JUNIORS", "FLUMINENSE", "GRêMIO", "SANTOS", "VASCO DA GAMA", "FLAMENGO", "SALZBURG", "UNIVERSIDAD CATóLICA", "APOEL", "SPARTA PRAHA", "KøBENHAVN", "LDU QUITO", "OLYMPIAKOS PIRAEUS", "CERRO PORTEñO", "LIBERTAD", "STEAUA BUCURESTI", "CSKA MOSKVA", "SPARTAK MOSKVA", "BASEL", "FENERBAHCE", "SHAKHTAR DONETSK", "DYNAMO KYIV", "PEñAROL"]; _local3 = []; _local4 = ["06000100", "03011100", "03010101", "01121010", "03000000", "01000102", "03000100", "03131300", "03000000", "05000100", "09100010", "01011100", "01021111", "03121100", "05110111", "01000101", "09081308", "03020200", "01010011", "08000100", "01020002", "03010100", "02000811", "03021100", "01000111", "09000200", "05000100", "07020302", "01081200", "01110411", "03000000", "05110011", "02110100", "03000001", "07000202", "01020302", "03121100", "03000000", "03000000", "01000101", "01010202", "03001111", "01020101", "01010202", "07010000", "01010202", "01031010", "01110511", "07000200", "01111611"]; _local5 = []; _local6 = []; _local7 = [1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 1, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5]; _local8 = _local2.length; _local9 = 0; while (_local9 < _local8) { _local1 = new Object(); _local1.ind = _local9; _local1.clubID = _local9; _local1.teamName = _local2[_local9]; _local1.teamColour = _local4[_local9]; _local1.altColour = "03000000"; _local1.strikerLooks = "0000000000"; _local1.teamCountry = ""; _local1.teamLeague = ""; _local1.teamClass = _local7[_local9]; _local1.lastPosition = ((100 * _local1.teamClass) + _local9); _local1.goalsScored = "-"; _local1.penaltyGoalsScored = "-"; clubObjectArray.push(_local1); trace(_local1.ind, _local1.clubID, _local1.teamName, _local1.teamClass); _local9++; }; trace("!!!"); switchSystemState(FrameWorkStates.STATE_SYSTEM_MENU_INIT); } public function clubSelected(_arg1:myCustomEvent):void{ myTeamName = clubObjectArray[myTeamIndex].teamName; myTeamMainID = clubObjectArray[myTeamIndex].clubID; myTeamClass = clubObjectArray[myTeamIndex].teamClass; trace("Main: Odabran je klub:", myTeamName, myTeamIndex, "klase:", myTeamClass); _clubButtons.removeEventListener("myCustomEvent", clubSelected); removeChild(_clubButtons); _menu2Screen.removeChild(_classes_sort_label); so.data.myLastTeamIndex = myTeamIndex; so.data.myTeamMainID = myTeamMainID; so.flush(); zreb(); } public function buttonClick2(_arg1:myCustomEvent):void{ var _local2:URLRequest; switch (_arg1.myMessage){ case FrameWorkStates.BUTTON_START: removeChild(_menu2Screen); switchSystemState(FrameWorkStates.STATE_SYSTEM_GAME_START); break; case FrameWorkStates.BUTTON_MAIN_MENU: trace("Ako nije kraj igre, pitati igraca da li je siguran. Ako je kraj, onda samo resetovati sve."); if (!tournamentIsOver){ switchSystemState(FrameWorkStates.STATE_SYSTEM_WAIT_FOR_CLOSE); areYousurePanel = new areYouSure(); areYousurePanel.x = 300; areYousurePanel.y = 200; areYousurePanel.addEventListener("myCustomEvent", closeAreYousure, false, 0, true); _menu2Screen.addChild(areYousurePanel); } else { backToMenu(); }; break; case FrameWorkStates.BUTTON_PLAY_AGAIN: trace("Turnir je gotov. Ovo dugme omogucava da se opet igra sa istim timom, bez povratka na meni"); removeChild(_menu2Screen); _menu2Screen = new menu2Screen(); addChild(_menu2Screen); _menu2Screen.textBase.y = (_menu2Screen.textBase.y + 20); resetData(); zreb(); switchSystemState(FrameWorkStates.STATE_SYSTEM_COMPETITION_TREE); break; case FrameWorkStates.BUTTON_VIDEO_TUTORIAL: trace("Kliknuto Video Tutorial"); _local2 = new URLRequest("http://www.flashfooty.com/igre/he-scores/index.php?he_scores_page=goals"); navigateToURL(_local2, "_blank"); break; }; } public function resetData():void{ totalPoints = 0; competitionRound = 0; areWeStillInTheGame = "yes"; tournamentIsOver = false; goalsPerMatchArray = new Array(); goalsNeededArray = new Array(); } override public function showHighScore():void{ var _local1:highScoresShow; _local1 = new highScoresShow(myTeamMainID); _local1.x = 300; _local1.y = 180; addChild(_local1); } override public function systemSecondMenuInit():void{ removeChild(_titleScreen); _menu2Screen = new menu2Screen(); addChild(_menu2Screen); _menu2Screen.textBase.height = 65; _menu2Screen.textBase.y = (_menu2Screen.textBase.y + 20); _menu2Screen.menu_info.text = ""; _menu2Screen.menu_info.appendText("\n"); _menu2Screen.menu_info.appendText("FIRST, PICK YOUR TEAM.\n"); _menu2Screen.menu_info.appendText("ROLL OVER / CLICK GREEN ARROW BUTTONS TO SCROLL THE LIST."); if ((((myLastTeamIndex > 0)) && ((myLastTeamIndex < numberOfClubs)))){ _menu2Screen.menu_info.appendText("\nOR- PICK THE LAST TEAM YOU PLAYED FOR:\n"); } else { _menu2Screen.menu_info.appendText("\nUSE SHORTCUT BUTTONS TO FIND TEAM EASIER.\n"); }; _menu2Screen.menu_info_red_shadow.text = _menu2Screen.menu_info.text; _clubButtons = new clubSelection(); _clubButtons.addEventListener("myCustomEvent", clubSelected, false, 0, true); addChild(_clubButtons); _classes_sort_label = new classesC(); _classes_sort_label.x = 560; _classes_sort_label.y = 250; _menu2Screen.addChild(_classes_sort_label); switchSystemState(FrameWorkStates.STATE_SYSTEM_WAIT_FOR_CLOSE); } override public function systemStartData():void{ scoredGoalsArray = new Array(); opponentsGoalsArray = new Array(); myLastTeamIndex = -1; switchSystemState(FrameWorkStates.STATE_SYSTEM_WAIT_FOR_CLOSE); if (GameFrameWork.provera_adrese == -1){ outOfFlashFooty(); } else { _loadingData = new startDataBigCup(stage); _loadingData.addEventListener("myCustomEvent", dataLoadingFinished, false, 0, true); trace("dodat listener startDataBigCup-u"); addChild(_loadingData); }; } override public function systemCompetitionTree():void{ var _local1:int; var _local2:String; var _local3:Array; var _local4:Array; var _local5:Array; var _local6:String; var _local7:round_label; var _local8:triangleButton; var _local9:littleInfo; var _local10:evenSimplerBC; var _local11:int; var _local12:simpleButtonClass; var _local13:int; var _local14:String; var _local15:int; var _local16:String; trace("Comp tree"); switchSystemState(FrameWorkStates.STATE_SYSTEM_WAIT_FOR_CLOSE); _local2 = "S"; _local3 = ["WELCOME TO THE FIRST ROUND.\n", "SECOND ROUND.\n", "THIRD ROUND.\n", "FOURTH ROUND.\n", "YOU QUALLIFIED FOR THE FIFTH ROUND.\n", "YOU HAVE BEATEN ALL 5 OPPONENTS - CONGRATULATIONS!\nALL POINTS YOU WON SO FAR ARE DOUBLED!"]; _local4 = ["YOU LOST IN THE FIRST ROUND.\nWELL, IT HAPPENS TO THE BEST OF US...", "A LITTLE BIT MORE PRACTICE SHOULD DO THE TRICK...\n", "DEFEAT NEVER COMES TO ANY MAN UNTIL HE ADMITS IT.\nMAYBE YOU COULD TRY AGAIN?", "YOU PLAYED WELL BUT THAT WASN'T ENOUGH...\n", "IF YOU LEARN FROM DEFEAT, YOU HAVEN'T REALLY LOST.\n", "YOU WERE SO CLOSE! WHAT A PITY...\n"]; _local5 = ["1/16: ", "1/8: ", "1/4: ", "1/2: ", "Fin.: "]; _local6 = ""; _menu2Screen.textBase.height = 115; _menu2Screen.textBase.y = (_menu2Screen.textBase.y + 20); _menu2Screen.menu_info.text = ""; _menu2Screen.menu_info.appendText("\n"); if ((((areWeStillInTheGame == "no")) || ((competitionRound == numberOfRounds)))){ tournamentIsOver = true; }; if (areWeStillInTheGame == "yes"){ _menu2Screen.menu_info.appendText(_local3[competitionRound]); if (competitionRound < numberOfRounds){ getMeAnOpponent(); opponentIndex = opponentIndexArray[competitionRound]; _local16 = (_local16 + clubObjectArray[opponentIndex].teamName); goalsNeeded = 3; if (clubObjectArray[opponentIndex].teamClass > myTeamClass){ goalsNeeded--; }; if (clubObjectArray[opponentIndex].teamClass < myTeamClass){ goalsNeeded++; }; goalsNeededArray.push(goalsNeeded); _local1 = clubObjectArray[opponentIndex].teamClass; _local14 = ""; _local15 = (competitionRound + 1); if (_local15 > 1){ _local14 = "S"; }; _menu2Screen.menu_info.appendText((((("YOUR OPPONENT IS A CLASS " + _local1) + " TEAM - ") + clubObjectArray[opponentIndex].teamName) + ".\n")); _menu2Screen.menu_info.appendText((("TO WIN, YOU NEED TO SCORE " + goalsNeeded) + " GOALS FROM 6 ATTEMPTS.\n")); _menu2Screen.menu_info.appendText((((("IN THIS ROUND, EACH GOAL BRINGS YOU " + _local15) + " POINT") + _local14) + ".\n")); _menu2Screen.menu_info.appendText("(press buttons below to see all pairs and results)\n"); } else { if (totalPoints == 1){ _local2 = ""; }; _menu2Screen.menu_info.appendText((((("\nYOU HAVE WON " + totalPoints) + " POINT") + _local2) + " IN THIS TOURNAMENT.")); }; } else { _menu2Screen.menu_info.appendText(_local4[competitionRound]); if (totalPoints == 1){ _local2 = ""; }; _menu2Screen.menu_info.appendText((((("\nYOU HAVE WON " + totalPoints) + " POINT") + _local2) + " IN THIS TOURNAMENT.")); }; _menu2Screen.menu_info_red_shadow.text = _menu2Screen.menu_info.text; _local9 = new littleInfo(); _local9.x = 100; _local9.y = 375; _local9.littleText.text = ((((("Your team: " + myTeamName) + " (Class ") + myTeamClass) + ") Points: ") + totalPoints); _menu2Screen.addChild(_local9); _roundButtonArray = new Array(); trace("TU SMO"); _local11 = 0; while (_local11 < numberOfRounds) { _local1 = (_local11 + 1); _local16 = ""; if ((((_local11 <= competitionRound)) && ((_local11 < 5)))){ _local16 = (_local16 + clubObjectArray[opponentIndexArray[_local11]].teamName); trace("TEMPLABEL:", _local16); if (goalsPerMatchArray[_local11] == goalsNeededArray[_local11]){ var _local17 = goalsNeededArray; var _local18 = _local11; var _local19 = (_local17[_local18] - 1); _local17[_local18] = _local19; }; if ((((_local11 < competitionRound)) || ((areWeStillInTheGame == "no")))){ _local16 = (_local16 + (((" " + goalsPerMatchArray[_local11]) + ":") + goalsNeededArray[_local11])); }; } else { _local16 = (_local16 + " -\n"); }; _local1 = ((numberOfClasses - _local11) - 1); _local10 = new evenSimplerBC(_local11, _local16, 12, "roundShow", _local1, _local5[_local11]); _local10.x = 300; _local10.y = (350 - (_local11 * 47)); _local10.addEventListener("myCustomEvent", showPairsFunc, false, 0, true); _menu2Screen.addChild(_local10); _roundButtonArray.push(_local10); _local11++; }; buttonType = [FrameWorkStates.BUTTON_MAIN_MENU, FrameWorkStates.BUTTON_START]; if (tournamentIsOver){ buttonType = [FrameWorkStates.BUTTON_MAIN_MENU, FrameWorkStates.BUTTON_PLAY_AGAIN, FrameWorkStates.BUTTON_VIDEO_TUTORIAL]; }; _local13 = buttonType.length; _local11 = 0; while (_local11 < _local13) { buttonSpecies = buttonType[_local11]; _local12 = new simpleButtonClass(buttonSpecies, FrameWorkStates.BUT_LABELS[buttonSpecies], 12); _local12.width = 120; _local12.x = (100 + (_local11 * 400)); _local12.y = 220; if (tournamentIsOver){ _local12.width = 130; _local12.x = (160 + (_local11 * 140)); _local12.y = 105; }; _local12.addEventListener("myCustomEvent", buttonClick2, false, 0, true); _menu2Screen.addChild(_local12); _local11++; }; } function closeAreYousure(_arg1:myCustomEvent):void{ areYousurePanel.removeEventListener("myCustomEvent", closeAreYousure); _menu2Screen.removeChild(areYousurePanel); switch (_arg1.myMessage){ case FrameWorkStates.BUTTON_CLOSE_WINDOW: trace("Kliknuto Cancel"); break; case FrameWorkStates.BUTTON_MAIN_MENU: trace("Povratak na meni"); backToMenu(); break; }; } public function gameEnded(_arg1:endOfGameEvent):void{ var _local2:int; trace("poeni:", _arg1.myMessage[0], ", golovi: ", _arg1.myMessage[1]); _local2 = (competitionRound + 1); pointsToWrite = int(_arg1.myMessage[0]); myGoalsInMatch = int(_arg1.myMessage[1]); oppGoalsInMatch = 0; otherResultsAndDraw(competitionRound); if (myGoalsInMatch < goalsNeeded){ areWeStillInTheGame = "no"; while (_local2 < 5) { otherResultsAndDraw(_local2); _local2++; }; } else { competitionRound++; }; totalPoints = (totalPoints + pointsToWrite); goalsPerMatchArray.push(myGoalsInMatch); pointsInThisMatchCore = pointsToWrite; if ((((competitionRound == 5)) && ((areWeStillInTheGame == "yes")))){ pointsToWrite = (totalPoints + pointsToWrite); totalPoints = (totalPoints * 2); }; trace("Broj poena za snimanje: ", pointsToWrite, "; Totalni broj poena: ", totalPoints); pointsRecordingPanel = new pointsRecordingBigCup(myTeamMainID, pointsToWrite, pointsInThisMatchCore, areWeStillInTheGame, competitionRound); pointsRecordingPanel.x = 300; pointsRecordingPanel.y = 200; pointsRecordingPanel.addEventListener("myCustomEvent", pointsRecEvent, false, 0, true); addChild(pointsRecordingPanel); } function pointsRecEvent(_arg1:myCustomEvent):void{ pointsRecordingPanel.removeEventListener("myCustomEvent", pointsRecEvent); removeChild(pointsRecordingPanel); backToCompetitionTree(); } public function zreb():void{ var _local1:Object; var _local2:Array; var _local3:Array; var _local4:Array; var _local5:int; var _local6:int; var _local7:int; cupClubs16f = []; cupClubs8f = []; cupClubs4f = []; cupClubs2f = []; cupClubs1f = []; _local2 = [6, 12, 6, 5, 3]; var _local8 = _local2; var _local9 = (myTeamClass - 1); var _local10 = (_local8[_local9] - 1); _local8[_local9] = _local10; cupClubs = clubObjectArray.slice(myTeamIndex, (myTeamIndex + 1)); _local3 = clubObjectArray.slice(); _local3.splice(myTeamIndex, 1); _local4 = []; while (_local3.length > 0) { _local4.push(_local3.splice(Math.round((Math.random() * (_local3.length - 1))), 1)[0]); }; _local5 = 0; while (_local5 < _local4.length) { _local1 = _local4[_local5]; if (_local2[(_local1.teamClass - 1)] > 0){ cupClubs.push(_local1); _local8 = _local2; _local9 = (_local1.teamClass - 1); _local10 = (_local8[_local9] - 1); _local8[_local9] = _local10; }; _local5++; }; trace("Duzina niza cupClubs je konacno: ", cupClubs.length); opponentIndexArray = new Array(); _local5 = 0; while (_local5 < cupClubs.length) { cupClubs[_local5].stillInTheCup = 1; cupClubs[_local5].goalsScored = "-"; cupClubs[_local5].penaltyGoalsScored = "-"; _local5++; }; cupClubs16f = clone(cupClubs); _local7 = Math.ceil((numberOfClubs / numberOfClasses)); opponentIndexArray = []; switchSystemState(FrameWorkStates.STATE_SYSTEM_COMPETITION_TREE); } } }//package com
Section 19
//myButtonClass (com.myButtonClass) package com { import flash.display.*; import flash.events.*; public class myButtonClass extends MovieClip { public var my_button_species:int; var additionalText:String;// = "" var displayLabel:String; public var button_smer:int; var buttonTypeLabel:Array; var myButt:buttonM; public function myButtonClass(_arg1:int){ buttonTypeLabel = FrameWorkStates.BUT_LABELS; additionalText = ""; super(); my_button_species = _arg1; myButt = new buttonM(); displayLabel = buttonTypeLabel[my_button_species]; myButt.label2.text = displayLabel; if (my_button_species == FrameWorkStates.BUTTON_SOUND){ myButt.label2.appendText(String(GameFrameWork.soundStatus)); }; if (my_button_species == FrameWorkStates.BUTTON_NUM_PLAYERS){ myButt.label2.appendText(String(GameFrameWork.numberOfPlayers)); }; if (my_button_species == FrameWorkStates.BUTTON_DIFFICULTY){ myButt.label2.appendText(String(GameFrameWork.difficultyLevels[(GameFrameWork.levelOfDifficulty - 1)])); }; myButt.label2.mouseEnabled = false; myButt.addEventListener(MouseEvent.MOUSE_DOWN, klik_dugme, false, 0, true); if (my_button_species == FrameWorkStates.BUTTON_OTHER_GAMES){ myButt.label2.htmlText = (("<a href='http://www.flashfooty.com/games.php' target='_blank'>" + displayLabel) + "</a>"); }; addChild(myButt); } private function update_label(_arg1:String):void{ myButt.label2.text = (buttonTypeLabel[my_button_species] + _arg1); } private function klik_dugme(_arg1:MouseEvent):void{ additionalText = ""; switch (my_button_species){ case FrameWorkStates.BUTTON_DIFFICULTY: if (GameFrameWork.levelOfDifficulty < 3){ GameFrameWork.levelOfDifficulty++; } else { GameFrameWork.levelOfDifficulty = 1; }; additionalText = String(GameFrameWork.difficultyLevels[(GameFrameWork.levelOfDifficulty - 1)]); break; case FrameWorkStates.BUTTON_SOUND: if (GameFrameWork.soundStatus == "ON"){ GameFrameWork.soundStatus = "OFF"; } else { GameFrameWork.soundStatus = "ON"; }; additionalText = String(GameFrameWork.soundStatus); break; case FrameWorkStates.BUTTON_NUM_PLAYERS: GameFrameWork.numberOfPlayers = (3 - GameFrameWork.numberOfPlayers); additionalText = String(GameFrameWork.numberOfPlayers); break; }; update_label(additionalText); dispatchEvent(new myCustomEvent(my_button_species)); } } }//package com
Section 20
//myCustomEvent (com.myCustomEvent) package com { import flash.events.*; public class myCustomEvent extends Event { public var myMessage:int; public function myCustomEvent(_arg1:int, _arg2:Boolean=false, _arg3:Boolean=false){ super("myCustomEvent"); this.myMessage = _arg1; } override public function clone():Event{ return (new myCustomEvent(myMessage, bubbles, cancelable)); } } }//package com
Section 21
//pointsRecordingBigCup (com.pointsRecordingBigCup) package com { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.text.*; import flash.net.*; import flash.errors.*; public class pointsRecordingBigCup extends MovieClip { var format; var formatInput:TextFormat; var _buttonM:myButtonClass; var teamIdToRecord:int; var lastSystemState:int; var _sekuritatea:String; var tempText:String; var currentSystemState:int; public var infoText:TextField; var _buttonArray:Array; var _securResult:int; var pointsToRecord:int; var serverTime:int; var buttonSpecies:int; public var enterHighscorePanelFunction:Function; var buttonType:Array; var lengthAr:int; var _tajnaRec:String;// = "zlatya1389" var dodatna_poruka:String;// = "" var serverTimeHash:String; var didWeWin:String; public function pointsRecordingBigCup(_arg1:int, _arg2:int, _arg3:int, _arg4:String, _arg5:uint){ _tajnaRec = "zlatya1389"; dodatna_poruka = ""; super(); teamIdToRecord = _arg1; pointsToRecord = _arg2; didWeWin = _arg4; currentSystemState = FrameWorkStates.STATE_HIGHSCORE_TABLE_START; if (didWeWin == "yes"){ tempText = "MATCH OVER - YOU WON!"; } else { tempText = "MATCH OVER - YOU LOST..."; }; tempText = (tempText + (("\n\n YOUR SCORE: " + _arg3) + " POINT")); if (pointsToRecord != 1){ tempText = (tempText + "S"); }; tempText = (tempText + ".\n\n"); if (GameFrameWork.provera_adrese == -1){ switchEnterPointsState(FrameWorkStates.STATE_HIGHSCORE_TABLE_FORBIDDEN); } else { switchEnterPointsState(FrameWorkStates.STATE_HIGHSCORE_TABLE_CHECKING); }; } function onSecurityError(_arg1:SecurityErrorEvent){ trace(("SecurityError: " + _arg1.text)); trace("Problem3"); switchEnterPointsState(FrameWorkStates.STATE_HIGHSCORE_TABLE_CONNECTION_ERROR); } public function highscoreInputSuccess():void{ infoText.text = (tempText + dodatna_poruka); _buttonArray = new Array(); _buttonM = new myButtonClass(FrameWorkStates.BUTTON_BACK_TO_THE_GAME); _buttonM.scaleX = 0.8; _buttonM.x = 0; _buttonM.y = 85; _buttonM.addEventListener("myCustomEvent", buttonClick, false, 0, true); addChild(_buttonM); _buttonArray.push(_buttonM); } public function initialCheck():void{ var request_1:URLRequest; var myLoader:URLLoader; var onDataLoad:Function; onDataLoad = function (_arg1:Event){ var _local2:sha1Encrypt; var _local3:String; serverTime = _arg1.target.data.al_time; serverTimeHash = _arg1.target.data.al_time_hash; _local2 = new sha1Encrypt(true); _local3 = sha1Encrypt.encrypt((serverTime + _tajnaRec)); if (_local3 == serverTimeHash){ recordingResult(); } else { trace("Vreme sa servera nije doslo u korektnom obliku"); switchEnterPointsState(FrameWorkStates.STATE_HIGHSCORE_TABLE_CONNECTION_ERROR); }; }; _securResult = 0; request_1 = new URLRequest(((FrameWorkStates.URL_PREFIX + "serverTime.php?ranTest=") + String((Math.random() * 9999)))); request_1.method = URLRequestMethod.POST; myLoader = new URLLoader(); myLoader.dataFormat = URLLoaderDataFormat.VARIABLES; myLoader.load(request_1); myLoader.addEventListener(Event.COMPLETE, onDataLoad); myLoader.addEventListener(IOErrorEvent.IO_ERROR, onIOError); myLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError); myLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, onHTTPStatus); } private function buttonClick(_arg1:myCustomEvent):void{ var _local2:URLRequest; var _local3:*; switch (_arg1.myMessage){ case FrameWorkStates.BUTTON_BACK_TO_THE_GAME: _local3 = (lengthAr - 1); while (_local3 >= 0) { _buttonArray[_local3].removeEventListener("myCustomEvent", buttonClick); _buttonArray.splice(_local3, 1); _local3--; }; dispatchEvent(new myCustomEvent(FrameWorkStates.ENTER_HIGHSCORE_ENDED)); break; case FrameWorkStates.BUTTON_PLAY_WITH_HIGHSCORES: _local2 = new URLRequest("http://www.flashfooty.com/igre/he-scores/"); navigateToURL(_local2, "_blank"); break; }; } function recordingResult():void{ var request_1:URLRequest; var enc:sha1Encrypt; var toEncrypt:String; var sekuritatea:String; var variables:URLVariables; var sender:URLLoader; var completeHandler_receive:Function; completeHandler_receive = function (_arg1:Event):void{ var _local2:URLVariables; var _local3:String; var _local4:String; trace("Poslato"); _local2 = new URLVariables(sender.data); _local3 = _local2.al_potvrda; dodatna_poruka = _local2.fin_message; _local4 = _local2.finalna; trace("Status bezbednosti:", _local4); trace("Status potvrde:", _local3); if (_local3 == "1"){ trace("Sve je proslo ok, potvrda=", _local3); switchEnterPointsState(FrameWorkStates.STATE_HIGHSCORE_INPUT_SUCCESS); } else { trace("Ne valja, potvrda = ", _local3); switchEnterPointsState(FrameWorkStates.STATE_HIGHSCORE_TABLE_CONNECTION_ERROR); }; }; trace("Vreme sa servera je proslo osnovnu proveru"); request_1 = new URLRequest((FrameWorkStates.URL_PREFIX + "recordingPoints.php")); request_1.method = URLRequestMethod.POST; enc = new sha1Encrypt(true); toEncrypt = (((String(teamIdToRecord) + String(pointsToRecord)) + String(serverTime)) + _tajnaRec); sekuritatea = sha1Encrypt.encrypt(toEncrypt); trace("Flashova sifra:", sekuritatea); variables = new URLVariables(); variables.teamIdToRecord = teamIdToRecord; variables.pointsToRecord = pointsToRecord; variables.nFlashTime = serverTime; variables.nFlashHash = sekuritatea; request_1.data = variables; sender = new URLLoader(); sender.dataFormat = URLLoaderDataFormat.VARIABLES; sender.addEventListener(Event.COMPLETE, completeHandler_receive); sender.addEventListener(IOErrorEvent.IO_ERROR, onIOError); sender.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError); sender.addEventListener(HTTPStatusEvent.HTTP_STATUS, onHTTPStatus); sender.load(request_1); } public function highscoreForbidden():void{ var _local1:uint; infoText.text = tempText; infoText.appendText("(POINTS CAN BE SUBMITTED ON FLASHFOOTY.COM)\n"); buttonType = [FrameWorkStates.BUTTON_BACK_TO_THE_GAME, FrameWorkStates.BUTTON_PLAY_WITH_HIGHSCORES]; _buttonArray = new Array(); lengthAr = buttonType.length; _local1 = 0; while (_local1 < lengthAr) { buttonSpecies = buttonType[_local1]; _buttonM = new myButtonClass(buttonSpecies); _buttonM.scaleX = 0.8; _buttonM.x = 0; _buttonM.y = (45 + (_local1 * 30)); _buttonM.addEventListener("myCustomEvent", buttonClick, false, 0, true); addChild(_buttonM); _buttonArray.push(_buttonM); _local1++; }; } public function highscoreFirstCheck():void{ infoText.text = "RECORDING POINTS, PLEASE WAIT...\n\n\n\n\n(IF THE PROCESS GETS STUCKED, CLICK THE BUTTON BELOW)"; if (pointsToRecord > 0){ infoText.text = "\n\n\nRECORDING POINTS, PLEASE WAIT..."; } else { infoText.text = "\n\n\nPLEASE WAIT..."; }; initialCheck(); } public function switchEnterPointsState(_arg1:int):void{ lastSystemState = currentSystemState; currentSystemState = _arg1; switch (_arg1){ case FrameWorkStates.STATE_HIGHSCORE_TABLE_FORBIDDEN: enterHighscorePanelFunction = highscoreForbidden; break; case FrameWorkStates.STATE_HIGHSCORE_TABLE_CHECKING: enterHighscorePanelFunction = highscoreFirstCheck; break; case FrameWorkStates.STATE_HIGHSCORE_TABLE_CONNECTION_ERROR: enterHighscorePanelFunction = highscoreError; break; case FrameWorkStates.STATE_HIGHSCORE_INPUT_SUCCESS: enterHighscorePanelFunction = highscoreInputSuccess; break; }; enterHighscorePanelFunction(); } function onHTTPStatus(_arg1:HTTPStatusEvent){ trace(("HTTPStatus: " + _arg1.status)); return ("Pogresni ulazni podaci"); } public function highscoreError():void{ infoText.text = "\n\n\nSORRY, BUT THE CONNECTION WITH DATABASE COULD NOT BE ESTABLISHED..."; _buttonArray = new Array(); _buttonM = new myButtonClass(FrameWorkStates.BUTTON_BACK_TO_THE_GAME); _buttonM.scaleX = 0.8; _buttonM.x = 0; _buttonM.y = 85; _buttonM.addEventListener("myCustomEvent", buttonClick, false, 0, true); addChild(_buttonM); _buttonArray.push(_buttonM); } function onIOError(_arg1:IOErrorEvent){ trace(("IOError: " + _arg1.text)); trace("Problem1"); switchEnterPointsState(FrameWorkStates.STATE_HIGHSCORE_TABLE_CONNECTION_ERROR); } } }//package com
Section 22
//sha1Encrypt (com.sha1Encrypt) package com { public class sha1Encrypt { private static var charInputBit:uint; public function sha1Encrypt(_arg1:Boolean){ if (_arg1){ charInputBit = 8; } else { charInputBit = 16; }; } private static function string_to_bin(_arg1:String):Array{ var _local2:Array; var _local3:Number; var _local4:Number; _local2 = new Array(); _local3 = ((1 << charInputBit) - 1); _local4 = 0; while (_local4 < (_arg1.length * charInputBit)) { _local2[(_local4 >> 5)] = (_local2[(_local4 >> 5)] | ((_arg1.charCodeAt((_local4 / charInputBit)) & _local3) << ((32 - charInputBit) - (_local4 % 32)))); _local4 = (_local4 + charInputBit); }; return (_local2); } public static function encrypt(_arg1:String):String{ return (hex_sha1(_arg1)); } private static function sha_f_mod(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ if (_arg1 < 20){ return (((_arg2 & _arg3) | (~(_arg2) & _arg4))); }; if (_arg1 < 40){ return (((_arg2 ^ _arg3) ^ _arg4)); }; if (_arg1 < 60){ return ((((_arg2 & _arg3) | (_arg2 & _arg4)) | (_arg3 & _arg4))); }; return (((_arg2 ^ _arg3) ^ _arg4)); } private static function bin_to_hex(_arg1:Array):String{ var _local2:String; var _local3:String; var _local4:Number; _local2 = "0123456789abcdef"; _local3 = new String(); _local4 = 0; while (_local4 < (_arg1.length * 4)) { _local3 = (_local3 + (_local2.charAt(((_arg1[(_local4 >> 2)] >> (((3 - (_local4 % 4)) * 8) + 4)) & 15)) + _local2.charAt(((_arg1[(_local4 >> 2)] >> ((3 - (_local4 % 4)) * 8)) & 15)))); _local4++; }; return (_local3); } private static function sha1_convert(_arg1:Array, _arg2:Number):Array{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Array; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; _local3 = 1732584193; _local4 = -271733879; _local5 = -1732584194; _local6 = 271733878; _local7 = -1009589776; _local8 = new Array(); _arg1[(_arg2 >> 5)] = (_arg1[(_arg2 >> 5)] | (128 << (24 - (_arg2 % 32)))); _arg1[((((_arg2 + 64) >> 9) << 4) + 15)] = _arg2; _local9 = 0; while (_local9 < _arg1.length) { _local10 = _local3; _local11 = _local4; _local12 = _local5; _local13 = _local6; _local14 = _local7; _local15 = 0; while (_local15 < 80) { if (_local15 < 16){ _local8[_local15] = _arg1[(_local9 + _local15)]; } else { _local8[_local15] = rol((((_local8[(_local15 - 3)] ^ _local8[(_local15 - 8)]) ^ _local8[(_local15 - 14)]) ^ _local8[(_local15 - 16)]), 1); }; _local16 = safe_add(safe_add(rol(_local3, 5), sha_f_mod(_local15, _local4, _local5, _local6)), safe_add(safe_add(_local7, _local8[_local15]), sha_z_mod(_local15))); _local7 = _local6; _local6 = _local5; _local5 = rol(_local4, 30); _local4 = _local3; _local3 = _local16; _local15++; }; _local3 = safe_add(_local3, _local10); _local4 = safe_add(_local4, _local11); _local5 = safe_add(_local5, _local12); _local6 = safe_add(_local6, _local13); _local7 = safe_add(_local7, _local14); _local9 = (_local9 + 16); }; return ([_local3, _local4, _local5, _local6, _local7]); } private static function hex_sha1(_arg1:String):String{ return (bin_to_hex(sha1_convert(string_to_bin(_arg1), (_arg1.length * charInputBit)))); } private static function sha_z_mod(_arg1:Number):Number{ return (((_arg1)<20) ? 1518500249 : ((_arg1)<40) ? 1859775393 : ((_arg1)<60) ? -1894007588 : -899497514); } private static function rol(_arg1:Number, _arg2:Number):Number{ return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2)))); } private static function safe_add(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; _local3 = ((_arg1 & 0xFFFF) + (_arg2 & 0xFFFF)); _local4 = (((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16)); return (((_local4 << 16) | (_local3 & 0xFFFF))); } } }//package com
Section 23
//showPairs (com.showPairs) package com { import flash.display.*; import flash.events.*; import flash.text.*; public class showPairs extends MovieClip { public var infoPage:int;// = 1 public var _infoText:TextField; public var _closeButton:buttonM; static var roundToShow:Array; public function showPairs(_arg1:int=0){ var _local2:Array; var _local3:Array; var _local4:Array; var _local5:int; infoPage = 1; super(); trace(_arg1); roundToShow = [Main.cupClubs16f, Main.cupClubs8f, Main.cupClubs4f, Main.cupClubs2f, Main.cupClubs1f]; _closeButton.label2.text = "X"; _closeButton.label2.mouseEnabled = false; _infoText.mouseEnabled = false; _closeButton.addEventListener(MouseEvent.MOUSE_DOWN, showPairsClose, false, 0, true); _local2 = ["1/16 Finals", "1/8 Finals", "Quarterfinals", "Semifinals", "Final Match"]; _local3 = ["\nClass 5 is the weakiest in this competition. Teams ranked below 180th place in previous week fall into this group.", "\nClass 4 is only a step better than class 5. This class contains 96 teams, which were ranked between 85th and 180th place in previous week.", "\nClass 3 is a upper-middle class of this game. It has 48 teams, placed between 37th and 84th place in previous weekly championship.", "\nClass 2 are close to the best. 24 teams that were between 13th and 36th place last week. These are nasty and tough opponents.", "Class 1 is an elite class in this game, made of top 12 clubs from the previous week.\nIf you defeat this opponent, you will get a special bonus - ALL points you won in this tournament will be doubled!"]; _infoText.htmlText = (_local2[_arg1] + "\n\n"); _local4 = roundToShow[_arg1]; _local5 = 0; while (_local5 < _local4.length) { _infoText.appendText((((_local4[_local5].teamName + " - ") + _local4[(_local5 + 1)].teamName) + " ")); if (_local4[_local5].goalsScored != "-"){ _infoText.appendText(((_local4[_local5].goalsScored + " : ") + _local4[(_local5 + 1)].goalsScored)); if (_local4[_local5].penaltyGoalsScored != "-"){ _infoText.appendText((((", pen. " + _local4[_local5].penaltyGoalsScored) + " : ") + _local4[(_local5 + 1)].penaltyGoalsScored)); }; }; _infoText.appendText("\n"); _local5 = (_local5 + 2); }; if (_local4.length == 0){ if (_arg1 < 4){ _infoText.appendText("Pairs for this round are still not known"); } else { _infoText.appendText("Final match pair is still not known"); }; }; } function showPairsClose(_arg1:MouseEvent):void{ parent.removeChild(this); } } }//package com
Section 24
//simpleButtonClass (com.simpleButtonClass) package com { import flash.display.*; import flash.events.*; import flash.text.*; import flash.geom.*; public class simpleButtonClass extends MovieClip { var myColor; public var my_button_species:int; var colorTransform:ColorTransform; public var displayLabel:String; public var buttonState:String; var classColours:Array; public var classColorIndex:int; public var myButt; public function simpleButtonClass(_arg1:int, _arg2:String="", _arg3:int=14, _arg4:String="normal", _arg5:int=1, _arg6:String="R1: "){ var _local7:TextFormat; classColours = [16777028, 0xFF7700, 43724, 16742348, 0x999999]; super(); _local7 = new TextFormat(); _local7.size = _arg3; _local7.bold = true; classColorIndex = _arg5; my_button_species = _arg1; if (_arg4 == "normal"){ myButt = new buttonM(); displayLabel = _arg2; myButt.label2.text = displayLabel; myButt.label2.setTextFormat(_local7); myButt.label2.mouseEnabled = false; myButt.addEventListener(MouseEvent.MOUSE_DOWN, klik_dugme, false, 0, true); }; if (_arg4 == "triangle"){ myButt = new trianButton(); myButt.addEventListener(MouseEvent.ROLL_OVER, rollover, false, 0, true); myButt.addEventListener(MouseEvent.ROLL_OUT, rollout, false, 0, true); }; if (_arg4 == "club"){ myButt = new clubButtonM(); displayLabel = _arg2; myButt.label2.text = displayLabel; myButt.label2.setTextFormat(_local7); myButt.label2.mouseEnabled = false; if (myButt.label2.text.length < 14){ myButt.label2.y = (myButt.label2.y + 5); }; myButt.addEventListener(MouseEvent.MOUSE_DOWN, klik_dugme, false, 0, true); colorTransform = myButt.buttonBaza.transform.colorTransform; colorTransform.color = classColours[_arg5]; myButt.buttonBaza.transform.colorTransform = colorTransform; }; if (_arg4 == "classColor"){ myButt = new clubButtonM(); displayLabel = _arg2; myButt.label2.text = displayLabel; myButt.label2.setTextFormat(_local7); myButt.label2.mouseEnabled = false; myButt.addEventListener(MouseEvent.MOUSE_DOWN, klik_dugme, false, 0, true); colorTransform = myButt.buttonBaza.transform.colorTransform; colorTransform.color = classColours[_arg5]; myButt.buttonBaza.transform.colorTransform = colorTransform; }; if (_arg4 == "roundShow"){ myButt = new round_label(); displayLabel = _arg2; myButt.textD.text = displayLabel; myButt.textD.setTextFormat(_local7); myButt.textD.mouseEnabled = false; myButt.roundD.text = _arg6; myButt.addEventListener(MouseEvent.MOUSE_DOWN, clickRound, false, 0, true); colorTransform = myButt.colBox.transform.colorTransform; colorTransform.color = classColours[_arg5]; myButt.colBox.transform.colorTransform = colorTransform; }; addChild(myButt); } private function klik_dugme(_arg1:MouseEvent):void{ dispatchEvent(new myCustomEvent(my_button_species)); if (my_button_species == -10){ trace(buttonState); if (buttonState == "A-Z"){ buttonState = "Z-A"; } else { buttonState = "A-Z"; }; myButt.label2.text = buttonState; }; } private function rollout(_arg1:MouseEvent):void{ buttonState = "off"; dispatchEvent(new myCustomEvent(my_button_species)); } private function rollover(_arg1:MouseEvent):void{ buttonState = "on"; dispatchEvent(new myCustomEvent(my_button_species)); } private function clickRound(_arg1:MouseEvent):void{ dispatchEvent(new myCustomEvent(my_button_species)); } } }//package com
Section 25
//startDataBigCup (com.startDataBigCup) package com { import flash.display.*; import flash.events.*; import flash.text.*; import flash.net.*; import flash.errors.*; public class startDataBigCup extends MovieClip { var exitVar:int; var korektna_adresa:String;// = "flashfooty" var _sekuritatea:String; var _username:String; public var clubObject:Object; var confirm_flag:int;// = 1 var _time:int; var serverTime:int; var _securResult:int; var pleaseWaitMessage; var _tajnaRec:String;// = "silver1389" var privatnostFF:int; var serverTimeHash:String; public var clubObjectArray:Array; public static var privacyCheck:Boolean = false; static var brojKlubova:int; public function startDataBigCup(_arg1:DisplayObject){ _tajnaRec = "silver1389"; confirm_flag = 1; korektna_adresa = "flashfooty"; super(); trace("startDataBigCup"); pleaseWaitMessage = new clubsInitializing(); addChild(pleaseWaitMessage); clubObjectArray = []; _username = "unknown_mnbvcxz"; ulaznaBezbednost(); } function onSecurityError(_arg1:SecurityErrorEvent){ trace(("SecurityError: " + _arg1.text)); trace("Problem3"); } function ulaznaBezbednost():void{ var request_1:URLRequest; var myLoader:URLLoader; var nowFlash:Date; var nowHour:int; var nowMinutes:int; var FlashTimeCode:*; var variables:URLVariables; var enc:sha1Encrypt; var sekuritatea:String; var onDataLoad:Function; onDataLoad = function (_arg1:Event){ var _local2:int; var _local3:int; var _local4:Date; var _local5:int; var _local6:int; var _local7:*; var _local8:sha1Encrypt; var _local9:String; var _local10:String; var _local11:int; var _local12:int; var _local13:int; var _local14:int; var _local15:int; pleaseWaitMessage.inft.appendText("\ndata checking\n"); _local2 = _arg1.target.data.al_potvrda; trace("Status transfera:", _local2); _time = _arg1.target.data.al_time; trace("Vreme koje je php vratio", _time); _username = _arg1.target.data.al_player; _sekuritatea = _arg1.target.data.al_sekuritatea; _local3 = 0; _local4 = new Date(); _local5 = _local4.getHours(); _local6 = _local4.getMinutes(); _local7 = ((_local5 * 60) + _local6); trace("TajmKod, novi:", _local7); if ((((((_time == _local7)) || (((_local7 - _time) == 1)))) || (((_local7 - _time) == 1439)))){ _local3 = 1; }; _local8 = new sha1Encrypt(true); _local9 = sha1Encrypt.encrypt(((_time + _username) + _tajnaRec)); trace("Veliki kod enkriptovan od strane Flash-a:", _local9); trace("Ulazni bezbednosni kod:", _sekuritatea); if ((((_local9 == _sekuritatea)) && ((_local3 == 1)))){ pleaseWaitMessage.inft.appendText("Ulazni podaci su u redu \n"); trace("Ulazni podaci su u redu \n"); trace("Korisnik je:", _username); if (_username != "unknown_mnbvcxz"){ privacyCheck = true; trace("Igrac je ulogovan"); exitVar = 2; } else { trace("Igrac je neulogovan"); exitVar = 1; }; brojKlubova = _arg1.target.data["cant_clubs"]; pleaseWaitMessage.inft.appendText((("Broj klubova:" + brojKlubova) + "\n")); pleaseWaitMessage.inft.appendText((_arg1.target.data[("club_" + 0)] + "\n")); pleaseWaitMessage.inft.appendText((_arg1.target.data[("clubID_" + 0)] + "\n")); pleaseWaitMessage.inft.appendText((_arg1.target.data[("club_" + 1)] + "\n")); pleaseWaitMessage.inft.appendText((_arg1.target.data[("club_" + 100)] + "\n")); pleaseWaitMessage.inft.appendText((_arg1.target.data[("club_" + 356)] + "\n")); _local15 = 0; while (_local15 < brojKlubova) { clubObject = new Object(); clubObject.ind = _local15; clubObject.clubID = _arg1.target.data[("clubID_" + _local15)]; _local10 = _arg1.target.data[("club_" + _local15)]; _local10 = _local10.replace("--", "&"); clubObject.teamName = _local10; clubObject.teamColour = _arg1.target.data[("colours_" + _local15)]; clubObject.altColour = _arg1.target.data[("away_colours_" + _local15)]; clubObject.strikerLooks = _arg1.target.data[("striker_looks_" + _local15)]; clubObject.lastPosition = _arg1.target.data[("lastweek_pos_" + _local15)]; clubObject.teamCountry = _arg1.target.data[("country_" + _local15)]; clubObject.teamLeague = _arg1.target.data[("league_" + _local15)]; _local11 = 1; _local14 = 12; _local13 = _local14; while (clubObject.lastPosition > _local13) { _local11++; _local14 = (_local14 * 2); _local13 = (_local13 + _local14); }; clubObject.teamClass = _local11; clubObject.goalsScored = "-"; clubObject.penaltyGoalsScored = "-"; clubObjectArray.push(clubObject); _local15++; }; } else { trace("Pogresni ulazni podaci!"); exitVar = 0; pleaseWaitMessage.inft.text = "data checking error"; }; dispatchEvent(new myCustomEvent(exitVar)); }; pleaseWaitMessage.inft.text = ""; request_1 = new URLRequest((FrameWorkStates.URL_PREFIX + "startingData.php")); request_1.method = URLRequestMethod.POST; myLoader = new URLLoader(); myLoader.dataFormat = URLLoaderDataFormat.VARIABLES; nowFlash = new Date(); nowHour = nowFlash.getHours(); nowMinutes = nowFlash.getMinutes(); FlashTimeCode = ((nowHour * 60) + nowMinutes); trace("TajmKod:", FlashTimeCode); variables = new URLVariables(); variables.nFlashTimeCode = FlashTimeCode; enc = new sha1Encrypt(true); sekuritatea = sha1Encrypt.encrypt((FlashTimeCode + _tajnaRec)); variables.nFlashTimeCodeHash = sekuritatea; trace("TajmKod Hash:", sekuritatea); request_1.data = variables; myLoader.load(request_1); myLoader.addEventListener(Event.COMPLETE, onDataLoad); myLoader.addEventListener(IOErrorEvent.IO_ERROR, onIOError); myLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError); myLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, onHTTPStatus); } function onHTTPStatus(_arg1:HTTPStatusEvent){ trace(("HTTPStatus: " + _arg1.status)); return ("Pogresni ulazni podaci"); } function onIOError(_arg1:IOErrorEvent){ trace(("IOError: " + _arg1.text)); trace("Problem`"); dispatchEvent(new myCustomEvent(0)); } } }//package com
Section 26
//BaseButton (fl.controls.BaseButton) package fl.controls { import flash.display.*; import fl.core.*; import flash.events.*; import flash.utils.*; import fl.events.*; public class BaseButton extends UIComponent { protected var _selected:Boolean;// = false private var unlockedMouseState:String; protected var pressTimer:Timer; protected var mouseState:String; protected var background:DisplayObject; private var _mouseStateLocked:Boolean;// = false protected var _autoRepeat:Boolean;// = false private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35}; public function BaseButton(){ _selected = false; _autoRepeat = false; _mouseStateLocked = false; super(); buttonMode = true; mouseChildren = false; useHandCursor = false; setupMouseEvents(); setMouseState("up"); pressTimer = new Timer(1, 0); pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true); } protected function endPress():void{ pressTimer.reset(); } public function set mouseStateLocked(_arg1:Boolean):void{ _mouseStateLocked = _arg1; if (_arg1 == false){ setMouseState(unlockedMouseState); } else { unlockedMouseState = mouseState; }; } public function get autoRepeat():Boolean{ return (_autoRepeat); } public function set autoRepeat(_arg1:Boolean):void{ _autoRepeat = _arg1; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; mouseEnabled = _arg1; } public function get selected():Boolean{ return (_selected); } protected function mouseEventHandler(_arg1:MouseEvent):void{ if (_arg1.type == MouseEvent.MOUSE_DOWN){ setMouseState("down"); startPress(); } else { if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){ setMouseState("over"); endPress(); } else { if (_arg1.type == MouseEvent.ROLL_OUT){ setMouseState("up"); endPress(); }; }; }; } public function setMouseState(_arg1:String):void{ if (_mouseStateLocked){ unlockedMouseState = _arg1; return; }; if (mouseState == _arg1){ return; }; mouseState = _arg1; invalidate(InvalidationType.STATE); } protected function startPress():void{ if (_autoRepeat){ pressTimer.delay = Number(getStyleValue("repeatDelay")); pressTimer.start(); }; dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true)); } protected function buttonDown(_arg1:TimerEvent):void{ if (!_autoRepeat){ endPress(); return; }; if (pressTimer.currentCount == 1){ pressTimer.delay = Number(getStyleValue("repeatInterval")); }; dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true)); } public function set selected(_arg1:Boolean):void{ if (_selected == _arg1){ return; }; _selected = _arg1; invalidate(InvalidationType.STATE); } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawBackground(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; super.draw(); } protected function setupMouseEvents():void{ addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true); } protected function drawLayout():void{ background.width = width; background.height = height; } protected function drawBackground():void{ var _local1:String; var _local2:DisplayObject; _local1 = (enabled) ? mouseState : "disabled"; if (selected){ _local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1)); }; _local1 = (_local1 + "Skin"); _local2 = background; background = getDisplayObjectInstance(getStyleValue(_local1)); addChildAt(background, 0); if (((!((_local2 == null))) && (!((_local2 == background))))){ removeChild(_local2); }; } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 27
//Button (fl.controls.Button) package fl.controls { import flash.display.*; import fl.core.*; import fl.managers.*; public class Button extends LabelButton implements IFocusManagerComponent { protected var emphasizedBorder:DisplayObject; protected var _emphasized:Boolean;// = false private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2}; public static var createAccessibilityImplementation:Function; public function Button(){ _emphasized = false; super(); } override public function drawFocus(_arg1:Boolean):void{ var _local2:Number; var _local3:*; super.drawFocus(_arg1); if (_arg1){ _local2 = Number(getStyleValue("emphasizedPadding")); if ((((_local2 < 0)) || (!(_emphasized)))){ _local2 = 0; }; _local3 = getStyleValue("focusRectPadding"); _local3 = ((_local3)==null) ? 2 : _local3; _local3 = (_local3 + _local2); uiFocusRect.x = -(_local3); uiFocusRect.y = -(_local3); uiFocusRect.width = (width + (_local3 * 2)); uiFocusRect.height = (height + (_local3 * 2)); }; } public function set emphasized(_arg1:Boolean):void{ _emphasized = _arg1; invalidate(InvalidationType.STYLES); } override protected function draw():void{ if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){ drawEmphasized(); }; super.draw(); if (emphasizedBorder != null){ setChildIndex(emphasizedBorder, (numChildren - 1)); }; } public function get emphasized():Boolean{ return (_emphasized); } override protected function initializeAccessibility():void{ if (Button.createAccessibilityImplementation != null){ Button.createAccessibilityImplementation(this); }; } protected function drawEmphasized():void{ var _local1:Object; var _local2:Number; if (emphasizedBorder != null){ removeChild(emphasizedBorder); }; emphasizedBorder = null; if (!_emphasized){ return; }; _local1 = getStyleValue("emphasizedSkin"); if (_local1 != null){ emphasizedBorder = getDisplayObjectInstance(_local1); }; if (emphasizedBorder != null){ addChildAt(emphasizedBorder, 0); _local2 = Number(getStyleValue("emphasizedPadding")); emphasizedBorder.x = (emphasizedBorder.y = -(_local2)); emphasizedBorder.width = (width + (_local2 * 2)); emphasizedBorder.height = (height + (_local2 * 2)); }; } public static function getStyleDefinition():Object{ return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles)); } } }//package fl.controls
Section 28
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement) package fl.controls { public class ButtonLabelPlacement { public static const TOP:String = "top"; public static const LEFT:String = "left"; public static const BOTTOM:String = "bottom"; public static const RIGHT:String = "right"; } }//package fl.controls
Section 29
//LabelButton (fl.controls.LabelButton) package fl.controls { import flash.display.*; import fl.core.*; import flash.events.*; import fl.managers.*; import flash.text.*; import fl.events.*; import flash.ui.*; public class LabelButton extends BaseButton implements IFocusManagerComponent { protected var _labelPlacement:String;// = "right" protected var _toggle:Boolean;// = false protected var icon:DisplayObject; protected var oldMouseState:String; protected var mode:String;// = "center" public var textField:TextField; protected var _label:String;// = "Label" private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false}; public static var createAccessibilityImplementation:Function; public function LabelButton(){ _labelPlacement = ButtonLabelPlacement.RIGHT; _toggle = false; _label = "Label"; mode = "center"; super(); } protected function toggleSelected(_arg1:MouseEvent):void{ selected = !(selected); dispatchEvent(new Event(Event.CHANGE, true)); } public function get labelPlacement():String{ return (_labelPlacement); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ if (oldMouseState == null){ oldMouseState = mouseState; }; setMouseState("down"); startPress(); }; } protected function setEmbedFont(){ var _local1:Object; _local1 = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ setMouseState(oldMouseState); oldMouseState = null; endPress(); dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; } override public function get selected():Boolean{ return ((_toggle) ? _selected : false); } public function set labelPlacement(_arg1:String):void{ _labelPlacement = _arg1; invalidate(InvalidationType.SIZE); } public function set toggle(_arg1:Boolean):void{ if (((!(_arg1)) && (super.selected))){ selected = false; }; _toggle = _arg1; if (_toggle){ addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true); } else { removeEventListener(MouseEvent.CLICK, toggleSelected); }; invalidate(InvalidationType.STATE); } public function get label():String{ return (_label); } override public function set selected(_arg1:Boolean):void{ _selected = _arg1; if (_toggle){ invalidate(InvalidationType.STATE); }; } override protected function draw():void{ if (textField.text != _label){ label = _label; }; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawBackground(); drawIcon(); drawTextFormat(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){ if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; }; validate(); } public function get toggle():Boolean{ return (_toggle); } override protected function configUI():void{ super.configUI(); textField = new TextField(); textField.type = TextFieldType.DYNAMIC; textField.selectable = false; addChild(textField); } override protected function drawLayout():void{ var _local1:Number; var _local2:String; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local1 = Number(getStyleValue("textPadding")); _local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement; textField.height = (textField.textHeight + 4); _local3 = (textField.textWidth + 4); _local4 = (textField.textHeight + 4); _local5 = ((icon)==null) ? 0 : (icon.width + _local1); _local6 = ((icon)==null) ? 0 : (icon.height + _local1); textField.visible = (label.length > 0); if (icon != null){ icon.x = Math.round(((width - icon.width) / 2)); icon.y = Math.round(((height - icon.height) / 2)); }; if (textField.visible == false){ textField.width = 0; textField.height = 0; } else { if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){ _local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1)))); if ((height - 2) > _local4){ _local8 = _local4; } else { _local8 = (height - 2); }; _local3 = _local7; textField.width = _local3; _local4 = _local8; textField.height = _local4; textField.x = Math.round(((width - _local3) / 2)); textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0)); if (icon != null){ icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1)); }; } else { _local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1)))); _local3 = _local7; textField.width = _local3; textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0)); textField.y = Math.round(((height - textField.height) / 2)); if (icon != null){ icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1)); }; }; }; super.drawLayout(); } override protected function initializeAccessibility():void{ if (LabelButton.createAccessibilityImplementation != null){ LabelButton.createAccessibilityImplementation(this); }; } protected function drawIcon():void{ var _local1:DisplayObject; var _local2:String; var _local3:Object; _local1 = icon; _local2 = (enabled) ? mouseState : "disabled"; if (selected){ _local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1)); }; _local2 = (_local2 + "Icon"); _local3 = getStyleValue(_local2); if (_local3 == null){ _local3 = getStyleValue("icon"); }; if (_local3 != null){ icon = getDisplayObjectInstance(_local3); }; if (icon != null){ addChildAt(icon, 1); }; if (((!((_local1 == null))) && (!((_local1 == icon))))){ removeChild(_local1); }; } public function set label(_arg1:String):void{ _label = _arg1; if (textField.text != _label){ textField.text = _label; dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE)); }; invalidate(InvalidationType.SIZE); invalidate(InvalidationType.STYLES); } protected function drawTextFormat():void{ var _local1:Object; var _local2:TextFormat; var _local3:TextFormat; _local1 = UIComponent.getStyleDefinition(); _local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat); textField.setTextFormat(_local2); _local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local3 != null){ textField.setTextFormat(_local3); } else { _local3 = _local2; }; textField.defaultTextFormat = _local3; setEmbedFont(); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition())); } } }//package fl.controls
Section 30
//ComponentShim (fl.core.ComponentShim) package fl.core { import flash.display.*; public dynamic class ComponentShim extends MovieClip { } }//package fl.core
Section 31
//InvalidationType (fl.core.InvalidationType) package fl.core { public class InvalidationType { public static const SIZE:String = "size"; public static const ALL:String = "all"; public static const DATA:String = "data"; public static const SCROLL:String = "scroll"; public static const STATE:String = "state"; public static const STYLES:String = "styles"; public static const SELECTED:String = "selected"; public static const RENDERER_STYLES:String = "rendererStyles"; } }//package fl.core
Section 32
//UIComponent (fl.core.UIComponent) package fl.core { import flash.display.*; import flash.events.*; import flash.utils.*; import fl.managers.*; import flash.text.*; import fl.events.*; import flash.system.*; public class UIComponent extends Sprite { protected var _enabled:Boolean;// = true private var _mouseFocusEnabled:Boolean;// = true protected var startHeight:Number; protected var _height:Number; protected var _oldIMEMode:String;// = null protected var startWidth:Number; public var focusTarget:IFocusManagerComponent; protected var errorCaught:Boolean;// = false protected var uiFocusRect:DisplayObject; protected var _width:Number; public var version:String;// = "3.0.0.15" protected var isFocused:Boolean;// = false protected var callLaterMethods:Dictionary; private var _focusEnabled:Boolean;// = true private var tempText:TextField; protected var invalidateFlag:Boolean;// = false protected var _inspector:Boolean;// = false protected var sharedStyles:Object; protected var invalidHash:Object; protected var isLivePreview:Boolean;// = false protected var _imeMode:String;// = null protected var instanceStyles:Object; protected var _x:Number; protected var _y:Number; public static var inCallLaterPhase:Boolean = false; private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)}; public static var createAccessibilityImplementation:Function; private static var focusManagers:Dictionary = new Dictionary(false); public function UIComponent(){ version = "3.0.0.15"; isLivePreview = false; invalidateFlag = false; _enabled = true; isFocused = false; _focusEnabled = true; _mouseFocusEnabled = true; _imeMode = null; _oldIMEMode = null; errorCaught = false; _inspector = false; super(); instanceStyles = {}; sharedStyles = {}; invalidHash = {}; callLaterMethods = new Dictionary(); StyleManager.registerInstance(this); configUI(); invalidate(InvalidationType.ALL); tabEnabled = (this is IFocusManagerComponent); focusRect = false; if (tabEnabled){ addEventListener(FocusEvent.FOCUS_IN, focusInHandler); addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler); addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); addEventListener(KeyboardEvent.KEY_UP, keyUpHandler); }; initializeFocusManager(); addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true); } public function drawFocus(_arg1:Boolean):void{ var _local2:Number; isFocused = _arg1; if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){ removeChild(uiFocusRect); uiFocusRect = null; }; if (_arg1){ uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite); if (uiFocusRect == null){ return; }; _local2 = Number(getStyleValue("focusRectPadding")); uiFocusRect.x = -(_local2); uiFocusRect.y = -(_local2); uiFocusRect.width = (width + (_local2 * 2)); uiFocusRect.height = (height + (_local2 * 2)); addChildAt(uiFocusRect, 0); }; } private function callLaterDispatcher(_arg1:Event):void{ var _local2:Dictionary; var _local3:Object; if (_arg1.type == Event.ADDED_TO_STAGE){ removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher); stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true); stage.invalidate(); return; }; _arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher); if (stage == null){ addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true); return; }; inCallLaterPhase = true; _local2 = callLaterMethods; for (_local3 in _local2) { _local3(); delete _local2[_local3]; }; inCallLaterPhase = false; } private function addedHandler(_arg1:Event):void{ removeEventListener("addedToStage", addedHandler); initializeFocusManager(); } protected function getStyleValue(_arg1:String):Object{ return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]); } protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((_arg1 == this)); } override public function get scaleX():Number{ return ((width / startWidth)); } override public function get scaleY():Number{ return ((height / startHeight)); } override public function set height(_arg1:Number):void{ if (_height == _arg1){ return; }; setSize(width, _arg1); } protected function keyDownHandler(_arg1:KeyboardEvent):void{ } protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; if (isOurFocus((_arg1.target as DisplayObject))){ _local2 = focusManager; if (((_local2) && (_local2.showFocusIndicator))){ drawFocus(true); isFocused = true; }; }; } public function setStyle(_arg1:String, _arg2:Object):void{ if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; instanceStyles[_arg1] = _arg2; invalidate(InvalidationType.STYLES); } override public function get visible():Boolean{ return (super.visible); } public function get componentInspectorSetting():Boolean{ return (_inspector); } override public function get x():Number{ return ((isNaN(_x)) ? super.x : _x); } override public function get y():Number{ return ((isNaN(_y)) ? super.y : _y); } protected function setIMEMode(_arg1:Boolean){ var enabled = _arg1; if (_imeMode != null){ if (enabled){ IME.enabled = true; _oldIMEMode = IME.conversionMode; try { if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _imeMode; }; errorCaught = false; } catch(e:Error) { errorCaught = true; throw (new Error(("IME mode not supported: " + _imeMode))); }; } else { if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _oldIMEMode; }; IME.enabled = false; }; }; } public function set enabled(_arg1:Boolean):void{ if (_arg1 == _enabled){ return; }; _enabled = _arg1; invalidate(InvalidationType.STATE); } public function setSharedStyle(_arg1:String, _arg2:Object):void{ if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; sharedStyles[_arg1] = _arg2; if (instanceStyles[_arg1] == null){ invalidate(InvalidationType.STYLES); }; } protected function keyUpHandler(_arg1:KeyboardEvent):void{ } public function set focusEnabled(_arg1:Boolean):void{ _focusEnabled = _arg1; } override public function set scaleX(_arg1:Number):void{ setSize((startWidth * _arg1), height); } public function get mouseFocusEnabled():Boolean{ return (_mouseFocusEnabled); } override public function set scaleY(_arg1:Number):void{ setSize(width, (startHeight * _arg1)); } protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{ var classDef:Object; var skin = _arg1; classDef = null; if ((skin is Class)){ return ((new (skin) as DisplayObject)); }; if ((skin is DisplayObject)){ (skin as DisplayObject).x = 0; (skin as DisplayObject).y = 0; return ((skin as DisplayObject)); }; try { classDef = getDefinitionByName(skin.toString()); } catch(e:Error) { try { classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object); } catch(e:Error) { }; }; if (classDef == null){ return (null); }; return ((new (classDef) as DisplayObject)); } protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{ var _local3:String; for (_local3 in _arg2) { _arg1.setStyle(_local3, getStyleValue(_arg2[_local3])); }; } protected function beforeComponentParameters():void{ } protected function callLater(_arg1:Function):void{ if (inCallLaterPhase){ return; }; callLaterMethods[_arg1] = true; if (stage != null){ stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true); stage.invalidate(); } else { addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true); }; } protected function createFocusManager():void{ if (focusManagers[stage] == null){ focusManagers[stage] = new FocusManager(stage); }; } override public function set visible(_arg1:Boolean):void{ var _local2:String; if (super.visible == _arg1){ return; }; super.visible = _arg1; _local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE; dispatchEvent(new ComponentEvent(_local2, true)); } protected function hookAccessibility(_arg1:Event):void{ removeEventListener(Event.ENTER_FRAME, hookAccessibility); initializeAccessibility(); } public function set componentInspectorSetting(_arg1:Boolean):void{ _inspector = _arg1; if (_inspector){ beforeComponentParameters(); } else { afterComponentParameters(); }; } override public function set x(_arg1:Number):void{ move(_arg1, _y); } public function drawNow():void{ draw(); } override public function set y(_arg1:Number):void{ move(_x, _arg1); } protected function checkLivePreview():Boolean{ var className:String; if (parent == null){ return (false); }; try { className = getQualifiedClassName(parent); } catch(e:Error) { }; return ((className == "fl.livepreview::LivePreviewParent")); } protected function focusOutHandler(_arg1:FocusEvent):void{ if (isOurFocus((_arg1.target as DisplayObject))){ drawFocus(false); isFocused = false; }; } public function set mouseFocusEnabled(_arg1:Boolean):void{ _mouseFocusEnabled = _arg1; } public function getFocus():InteractiveObject{ if (stage){ return (stage.focus); }; return (null); } protected function validate():void{ invalidHash = {}; } override public function get height():Number{ return (_height); } public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{ invalidHash[_arg1] = true; if (_arg2){ this.callLater(draw); }; } public function get enabled():Boolean{ return (_enabled); } protected function getScaleX():Number{ return (super.scaleX); } protected function getScaleY():Number{ return (super.scaleY); } public function get focusEnabled():Boolean{ return (_focusEnabled); } protected function afterComponentParameters():void{ } protected function draw():void{ if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){ if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; }; validate(); } protected function configUI():void{ var _local1:Number; var _local2:Number; var _local3:Number; isLivePreview = checkLivePreview(); _local1 = rotation; rotation = 0; _local2 = super.width; _local3 = super.height; var _local4 = 1; super.scaleY = _local4; super.scaleX = _local4; setSize(_local2, _local3); move(super.x, super.y); rotation = _local1; startWidth = _local2; startHeight = _local3; if (numChildren > 0){ removeChildAt(0); }; } protected function setScaleX(_arg1:Number):void{ super.scaleX = _arg1; } protected function setScaleY(_arg1:Number):void{ super.scaleY = _arg1; } private function initializeFocusManager():void{ if (stage == null){ addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true); } else { createFocusManager(); }; } public function set focusManager(_arg1:IFocusManager):void{ UIComponent.focusManagers[this] = _arg1; } public function clearStyle(_arg1:String):void{ setStyle(_arg1, null); } protected function isInvalid(_arg1:String, ... _args):Boolean{ if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){ return (true); }; while (_args.length > 0) { if (invalidHash[_args.pop()]){ return (true); }; }; return (false); } public function setSize(_arg1:Number, _arg2:Number):void{ _width = _arg1; _height = _arg2; invalidate(InvalidationType.SIZE); dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false)); } override public function set width(_arg1:Number):void{ if (_width == _arg1){ return; }; setSize(_arg1, height); } public function setFocus():void{ if (stage){ stage.focus = this; }; } protected function initializeAccessibility():void{ if (UIComponent.createAccessibilityImplementation != null){ UIComponent.createAccessibilityImplementation(this); }; } public function get focusManager():IFocusManager{ var _local1:DisplayObject; _local1 = this; while (_local1) { if (UIComponent.focusManagers[_local1] != null){ return (IFocusManager(UIComponent.focusManagers[_local1])); }; _local1 = _local1.parent; }; return (null); } override public function get width():Number{ return (_width); } public function move(_arg1:Number, _arg2:Number):void{ _x = _arg1; _y = _arg2; super.x = Math.round(_arg1); super.y = Math.round(_arg2); dispatchEvent(new ComponentEvent(ComponentEvent.MOVE)); } public function validateNow():void{ invalidate(InvalidationType.ALL, false); draw(); } public function getStyle(_arg1:String):Object{ return (instanceStyles[_arg1]); } public static function getStyleDefinition():Object{ return (defaultStyles); } public static function mergeStyles(... _args):Object{ var _local2:Object; var _local3:uint; var _local4:uint; var _local5:Object; var _local6:String; _local2 = {}; _local3 = _args.length; _local4 = 0; while (_local4 < _local3) { _local5 = _args[_local4]; for (_local6 in _local5) { if (_local2[_local6] != null){ } else { _local2[_local6] = _args[_local4][_local6]; }; }; _local4++; }; return (_local2); } } }//package fl.core
Section 33
//ComponentEvent (fl.events.ComponentEvent) package fl.events { import flash.events.*; public class ComponentEvent extends Event { public static const HIDE:String = "hide"; public static const BUTTON_DOWN:String = "buttonDown"; public static const MOVE:String = "move"; public static const RESIZE:String = "resize"; public static const ENTER:String = "enter"; public static const LABEL_CHANGE:String = "labelChange"; public static const SHOW:String = "show"; public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function toString():String{ return (formatToString("ComponentEvent", "type", "bubbles", "cancelable")); } override public function clone():Event{ return (new ComponentEvent(type, bubbles, cancelable)); } } }//package fl.events
Section 34
//FocusManager (fl.managers.FocusManager) package fl.managers { import fl.controls.*; import flash.display.*; import fl.core.*; import flash.events.*; import flash.utils.*; import flash.text.*; import flash.ui.*; public class FocusManager implements IFocusManager { private var focusableObjects:Dictionary; private var _showFocusIndicator:Boolean;// = true private var defButton:Button; private var focusableCandidates:Array; private var _form:DisplayObjectContainer; private var _defaultButtonEnabled:Boolean;// = true private var activated:Boolean;// = false private var _defaultButton:Button; private var calculateCandidates:Boolean;// = true private var lastFocus:InteractiveObject; private var lastAction:String; public function FocusManager(_arg1:DisplayObjectContainer){ activated = false; calculateCandidates = true; _showFocusIndicator = true; _defaultButtonEnabled = true; super(); focusableObjects = new Dictionary(true); if (_arg1 != null){ _form = _arg1; addFocusables(DisplayObject(_arg1)); _arg1.addEventListener(Event.ADDED, addedHandler); _arg1.addEventListener(Event.REMOVED, removedHandler); activate(); }; } public function get showFocusIndicator():Boolean{ return (_showFocusIndicator); } private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{ var _local5:int; var _local6:int; var _local7:DisplayObject; var _local8:IFocusManagerGroup; var _local9:int; var _local10:DisplayObject; var _local11:IFocusManagerGroup; _local5 = focusableCandidates.length; _local6 = _arg1; while (true) { if (_arg2){ _arg1--; } else { _arg1++; }; if (_arg3){ if (((_arg2) && ((_arg1 < 0)))){ break; }; if (((!(_arg2)) && ((_arg1 == _local5)))){ break; }; } else { _arg1 = ((_arg1 + _local5) % _local5); if (_local6 == _arg1){ break; }; }; if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){ _local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1])); if ((_local7 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local7); _local9 = 0; while (_local9 < focusableCandidates.length) { _local10 = focusableCandidates[_local9]; if ((_local10 is IFocusManagerGroup)){ _local11 = IFocusManagerGroup(_local10); if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){ _arg1 = _local9; break; }; }; _local9++; }; }; return (_arg1); }; }; return (_arg1); } public function set form(_arg1:DisplayObjectContainer):void{ _form = _arg1; } private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{ var focusable:IFocusManagerComponent; var io:InteractiveObject; var doc:DisplayObjectContainer; var i:int; var child:DisplayObject; var o = _arg1; var skipTopLevel = _arg2; if (!skipTopLevel){ if ((o is IFocusManagerComponent)){ focusable = IFocusManagerComponent(o); if (focusable.focusEnabled){ if (((focusable.tabEnabled) && (isTabVisible(o)))){ focusableObjects[o] = true; calculateCandidates = true; }; o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; } else { if ((o is InteractiveObject)){ io = (o as InteractiveObject); if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){ focusableObjects[io] = true; calculateCandidates = true; }; io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; }; }; if ((o is DisplayObjectContainer)){ doc = DisplayObjectContainer(o); o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){ i = 0; while (i < doc.numChildren) { try { child = doc.getChildAt(i); if (child != null){ addFocusables(doc.getChildAt(i)); }; } catch(error:SecurityError) { }; i = (i + 1); }; }; }; } private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{ return (_arg1.getChildIndex(_arg2)); } private function mouseFocusChangeHandler(_arg1:FocusEvent):void{ if ((_arg1.relatedObject is TextField)){ return; }; _arg1.preventDefault(); } private function focusOutHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject; _local2 = (_arg1.target as InteractiveObject); } private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{ var _local3:IFocusManagerGroup; if (!isEnabledAndVisible(_arg1)){ return (false); }; if ((_arg1 is IFocusManagerGroup)){ _local3 = IFocusManagerGroup(_arg1); if (_arg2 == _local3.groupName){ return (false); }; }; return (true); } public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{ var _local2:InteractiveObject; _local2 = _arg1; while (_arg1) { if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){ return (_arg1); }; _arg1 = _arg1.parent; }; return (_local2); } private function sortFocusableObjectsTabIndex():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){ focusableCandidates.push(_local2); }; }; focusableCandidates.sort(sortByTabIndex); } private function removeFocusables(_arg1:DisplayObject):void{ var _local2:Object; var _local3:DisplayObject; if ((_arg1 is DisplayObjectContainer)){ _arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); _arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); for (_local2 in focusableObjects) { _local3 = DisplayObject(_local2); if (DisplayObjectContainer(_arg1).contains(_local3)){ if (_local3 == lastFocus){ lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local2]; calculateCandidates = true; }; }; }; } private function addedHandler(_arg1:Event):void{ var _local2:DisplayObject; _local2 = DisplayObject(_arg1.target); if (_local2.stage){ addFocusables(DisplayObject(_arg1.target)); }; } private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{ while (_arg1 != InteractiveObject(form)) { if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){ return (_arg1); }; _arg1 = _arg1.parent; if (_arg1 == null){ break; }; }; return (null); } private function tabChildrenChangeHandler(_arg1:Event):void{ var _local2:DisplayObjectContainer; if (_arg1.target != _arg1.currentTarget){ return; }; calculateCandidates = true; _local2 = DisplayObjectContainer(_arg1.target); if (_local2.tabChildren){ addFocusables(_local2, true); } else { removeFocusables(_local2); }; } public function sendDefaultButtonEvent():void{ defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); } public function getFocus():InteractiveObject{ var _local1:InteractiveObject; _local1 = form.stage.focus; return (findFocusManagerComponent(_local1)); } private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer; var _local3:TextField; var _local4:SimpleButton; _local2 = DisplayObject(form).parent; while (_arg1 != _local2) { if ((_arg1 is UIComponent)){ if (!UIComponent(_arg1).enabled){ return (false); }; } else { if ((_arg1 is TextField)){ _local3 = TextField(_arg1); if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){ return (false); }; } else { if ((_arg1 is SimpleButton)){ _local4 = SimpleButton(_arg1); if (!_local4.enabled){ return (false); }; }; }; }; if (!_arg1.visible){ return (false); }; _arg1 = _arg1.parent; }; return (true); } public function set defaultButton(_arg1:Button):void{ var _local2:Button; _local2 = (_arg1) ? Button(_arg1) : null; if (_local2 != _defaultButton){ if (_defaultButton){ _defaultButton.emphasized = false; }; if (defButton){ defButton.emphasized = false; }; _defaultButton = _local2; defButton = _local2; if (_local2){ _local2.emphasized = true; }; }; } private function deactivateHandler(_arg1:Event):void{ var _local2:InteractiveObject; _local2 = InteractiveObject(_arg1.target); } public function setFocus(_arg1:InteractiveObject):void{ if ((_arg1 is IFocusManagerComponent)){ IFocusManagerComponent(_arg1).setFocus(); } else { form.stage.focus = _arg1; }; } private function setFocusToNextObject(_arg1:FocusEvent):void{ var _local2:InteractiveObject; if (!hasFocusableObjects()){ return; }; _local2 = getNextFocusManagerComponent(_arg1.shiftKey); if (_local2){ setFocus(_local2); }; } private function hasFocusableObjects():Boolean{ var _local1:Object; for (_local1 in focusableObjects) { return (true); }; return (false); } private function tabIndexChangeHandler(_arg1:Event):void{ calculateCandidates = true; } private function sortFocusableObjects():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){ sortFocusableObjectsTabIndex(); return; }; focusableCandidates.push(_local2); }; focusableCandidates.sort(sortByDepth); } private function keyFocusChangeHandler(_arg1:FocusEvent):void{ showFocusIndicator = true; if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){ setFocusToNextObject(_arg1); _arg1.preventDefault(); }; } private function getIndexOfFocusedObject(_arg1:DisplayObject):int{ var _local2:int; var _local3:int; _local2 = focusableCandidates.length; _local3 = 0; _local3 = 0; while (_local3 < _local2) { if (focusableCandidates[_local3] == _arg1){ return (_local3); }; _local3++; }; return (-1); } public function hideFocus():void{ } private function removedHandler(_arg1:Event):void{ var _local2:int; var _local3:DisplayObject; var _local4:InteractiveObject; _local3 = DisplayObject(_arg1.target); if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){ if (_local3 == lastFocus){ IFocusManagerComponent(lastFocus).drawFocus(false); lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local3]; calculateCandidates = true; } else { if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){ _local4 = (_local3 as InteractiveObject); if (_local4){ if (_local4 == lastFocus){ lastFocus = null; }; delete focusableObjects[_local4]; calculateCandidates = true; }; _local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); }; }; removeFocusables(_local3); } private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{ var _local3:String; var _local4:String; var _local5:int; var _local6:String; var _local7:String; var _local8:String; var _local9:DisplayObject; var _local10:DisplayObject; _local3 = ""; _local4 = ""; _local8 = "0000"; _local9 = DisplayObject(_arg1); _local10 = DisplayObject(_arg2); while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) { _local5 = getChildIndex(_local9.parent, _local9); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local3 = (_local7 + _local3); _local9 = _local9.parent; }; while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) { _local5 = getChildIndex(_local10.parent, _local10); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local4 = (_local7 + _local4); _local10 = _local10.parent; }; return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0); } public function get defaultButton():Button{ return (_defaultButton); } private function activateHandler(_arg1:Event):void{ var _local2:InteractiveObject; _local2 = InteractiveObject(_arg1.target); if (lastFocus){ if ((lastFocus is IFocusManagerComponent)){ IFocusManagerComponent(lastFocus).setFocus(); } else { form.stage.focus = lastFocus; }; }; lastAction = "ACTIVATE"; } public function showFocus():void{ } public function set defaultButtonEnabled(_arg1:Boolean):void{ _defaultButtonEnabled = _arg1; } public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{ var _local2:DisplayObject; var _local3:String; var _local4:int; var _local5:Boolean; var _local6:int; var _local7:int; var _local8:IFocusManagerGroup; if (!hasFocusableObjects()){ return (null); }; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; _local2 = form.stage.focus; _local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2))); _local3 = ""; if ((_local2 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local2); _local3 = _local8.groupName; }; _local4 = getIndexOfFocusedObject(_local2); _local5 = false; _local6 = _local4; if (_local4 == -1){ if (_arg1){ _local4 = focusableCandidates.length; }; _local5 = true; }; _local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3); return (findFocusManagerComponent(focusableCandidates[_local7])); } private function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:InteractiveObject; if (_arg1.isDefaultPrevented()){ return; }; _local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target)); if (!_local2){ return; }; showFocusIndicator = false; if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){ setFocus(_local2); }; lastAction = "MOUSEDOWN"; } private function isTabVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer; _local2 = _arg1.parent; while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) { if (!_local2.tabChildren){ return (false); }; _local2 = _local2.parent; }; return (true); } public function get nextTabIndex():int{ return (0); } private function keyDownHandler(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.TAB){ lastAction = "KEY"; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; }; if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){ sendDefaultButtonEvent(); }; } private function focusInHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject; var _local3:Button; _local2 = InteractiveObject(_arg1.target); if (form.contains(_local2)){ lastFocus = findFocusManagerComponent(InteractiveObject(_local2)); if ((lastFocus is Button)){ _local3 = Button(lastFocus); if (defButton){ defButton.emphasized = false; defButton = _local3; _local3.emphasized = true; }; } else { if (((defButton) && (!((defButton == _defaultButton))))){ defButton.emphasized = false; defButton = _defaultButton; _defaultButton.emphasized = true; }; }; }; } private function tabEnabledChangeHandler(_arg1:Event):void{ var _local2:InteractiveObject; var _local3:Boolean; calculateCandidates = true; _local2 = InteractiveObject(_arg1.target); _local3 = (focusableObjects[_local2] == true); if (_local2.tabEnabled){ if (((!(_local3)) && (isTabVisible(_local2)))){ if (!(_local2 is IFocusManagerComponent)){ _local2.focusRect = false; }; focusableObjects[_local2] = true; }; } else { if (_local3){ delete focusableObjects[_local2]; }; }; } public function set showFocusIndicator(_arg1:Boolean):void{ _showFocusIndicator = _arg1; } public function get form():DisplayObjectContainer{ return (_form); } private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{ return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2)); } public function activate():void{ if (activated){ return; }; form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true); form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true); form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true); form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true); form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = true; if (lastFocus){ setFocus(lastFocus); }; } public function deactivate():void{ form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler); form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler); form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.removeEventListener(Event.ACTIVATE, activateHandler); form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler); form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = false; } public function get defaultButtonEnabled():Boolean{ return (_defaultButtonEnabled); } } }//package fl.managers
Section 35
//IFocusManager (fl.managers.IFocusManager) package fl.managers { import fl.controls.*; import flash.display.*; public interface IFocusManager { function getFocus():InteractiveObject; function deactivate():void; function set defaultButton(_arg1:Button):void; function set showFocusIndicator(_arg1:Boolean):void; function get defaultButtonEnabled():Boolean; function get nextTabIndex():int; function get defaultButton():Button; function get showFocusIndicator():Boolean; function setFocus(_arg1:InteractiveObject):void; function activate():void; function showFocus():void; function set defaultButtonEnabled(_arg1:Boolean):void; function hideFocus():void; function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject; function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject; } }//package fl.managers
Section 36
//IFocusManagerComponent (fl.managers.IFocusManagerComponent) package fl.managers { public interface IFocusManagerComponent { function set focusEnabled(_arg1:Boolean):void; function drawFocus(_arg1:Boolean):void; function setFocus():void; function get focusEnabled():Boolean; function get tabEnabled():Boolean; function get tabIndex():int; function get mouseFocusEnabled():Boolean; } }//package fl.managers
Section 37
//IFocusManagerGroup (fl.managers.IFocusManagerGroup) package fl.managers { public interface IFocusManagerGroup { function set groupName(_arg1:String):void; function set selected(_arg1:Boolean):void; function get groupName():String; function get selected():Boolean; } }//package fl.managers
Section 38
//StyleManager (fl.managers.StyleManager) package fl.managers { import fl.core.*; import flash.utils.*; import flash.text.*; public class StyleManager { private var globalStyles:Object; private var classToDefaultStylesDict:Dictionary; private var styleToClassesHash:Object; private var classToStylesDict:Dictionary; private var classToInstancesDict:Dictionary; private static var _instance:StyleManager; public function StyleManager(){ styleToClassesHash = {}; classToInstancesDict = new Dictionary(true); classToStylesDict = new Dictionary(true); classToDefaultStylesDict = new Dictionary(true); globalStyles = UIComponent.getStyleDefinition(); } public static function clearComponentStyle(_arg1:Object, _arg2:String):void{ var _local3:Class; var _local4:Object; _local3 = getClassDef(_arg1); _local4 = getInstance().classToStylesDict[_local3]; if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){ delete _local4[_arg2]; invalidateComponentStyle(_local3, _arg2); }; } private static function getClassDef(_arg1:Object):Class{ var component = _arg1; if ((component is Class)){ return ((component as Class)); }; try { return ((getDefinitionByName(getQualifiedClassName(component)) as Class)); } catch(e:Error) { if ((component is UIComponent)){ try { return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class)); } catch(e:Error) { }; }; }; return (null); } public static function clearStyle(_arg1:String):void{ setStyle(_arg1, null); } public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Class; var _local5:Object; _local4 = getClassDef(_arg1); _local5 = getInstance().classToStylesDict[_local4]; if (_local5 == null){ _local5 = (getInstance().classToStylesDict[_local4] = {}); }; if (_local5 == _arg3){ return; }; _local5[_arg2] = _arg3; invalidateComponentStyle(_local4, _arg2); } private static function setSharedStyles(_arg1:UIComponent):void{ var _local2:StyleManager; var _local3:Class; var _local4:Object; var _local5:String; _local2 = getInstance(); _local3 = getClassDef(_arg1); _local4 = _local2.classToDefaultStylesDict[_local3]; for (_local5 in _local4) { _arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5)); }; } public static function getComponentStyle(_arg1:Object, _arg2:String):Object{ var _local3:Class; var _local4:Object; _local3 = getClassDef(_arg1); _local4 = getInstance().classToStylesDict[_local3]; return (((_local4)==null) ? null : _local4[_arg2]); } private static function getInstance(){ if (_instance == null){ _instance = new (StyleManager); }; return (_instance); } private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{ var _local3:Dictionary; var _local4:Object; var _local5:UIComponent; _local3 = getInstance().classToInstancesDict[_arg1]; if (_local3 == null){ return; }; for (_local4 in _local3) { _local5 = (_local4 as UIComponent); if (_local5 == null){ } else { _local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2)); }; }; } private static function invalidateStyle(_arg1:String):void{ var _local2:Dictionary; var _local3:Object; _local2 = getInstance().styleToClassesHash[_arg1]; if (_local2 == null){ return; }; for (_local3 in _local2) { invalidateComponentStyle(Class(_local3), _arg1); }; } public static function registerInstance(_arg1:UIComponent):void{ var inst:StyleManager; var classDef:Class; var target:Class; var defaultStyles:Object; var styleToClasses:Object; var n:String; var instance = _arg1; inst = getInstance(); classDef = getClassDef(instance); if (classDef == null){ return; }; if (inst.classToInstancesDict[classDef] == null){ inst.classToInstancesDict[classDef] = new Dictionary(true); target = classDef; while (defaultStyles == null) { if (target["getStyleDefinition"] != null){ defaultStyles = target["getStyleDefinition"](); break; }; try { target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class); } catch(err:Error) { try { target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class); } catch(e:Error) { defaultStyles = UIComponent.getStyleDefinition(); break; }; }; }; styleToClasses = inst.styleToClassesHash; for (n in defaultStyles) { if (styleToClasses[n] == null){ styleToClasses[n] = new Dictionary(true); }; styleToClasses[n][classDef] = true; }; inst.classToDefaultStylesDict[classDef] = defaultStyles; inst.classToStylesDict[classDef] = {}; }; inst.classToInstancesDict[classDef][instance] = true; setSharedStyles(instance); } public static function getStyle(_arg1:String):Object{ return (getInstance().globalStyles[_arg1]); } private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{ var _local3:Class; var _local4:StyleManager; var _local5:Object; _local3 = getClassDef(_arg1); _local4 = getInstance(); _local5 = _local4.classToStylesDict[_local3][_arg2]; if (_local5 != null){ return (_local5); }; _local5 = _local4.globalStyles[_arg2]; if (_local5 != null){ return (_local5); }; return (_local4.classToDefaultStylesDict[_local3][_arg2]); } public static function setStyle(_arg1:String, _arg2:Object):void{ var _local3:Object; _local3 = getInstance().globalStyles; if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; _local3[_arg1] = _arg2; invalidateStyle(_arg1); } } }//package fl.managers
Section 39
//actionHolder_35 (he_fla.actionHolder_35) package he_fla { import flash.display.*; public dynamic class actionHolder_35 extends MovieClip { public function actionHolder_35(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package he_fla
Section 40
//assetHolder_1 (he_fla.assetHolder_1) package he_fla { import flash.display.*; public dynamic class assetHolder_1 extends MovieClip { public function assetHolder_1(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package he_fla
Section 41
//zadnja_mreza_60 (he_fla.zadnja_mreza_60) package he_fla { import flash.display.*; public dynamic class zadnja_mreza_60 extends MovieClip { public function zadnja_mreza_60(){ addFrameScript(27, frame28); } function frame28(){ stop(); } } }//package he_fla
Section 42
//MochiAd (mochi.as3.MochiAd) package mochi.as3 { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class MochiAd { public static function getVersion():String{ return (MochiServices.getVersion()); } 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 options = _arg1; DEFAULTS = {ad_timeout:5500, 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); }; 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]; if (Security.sandboxType == "application"){ return (_local2); }; 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:5500, 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 (!(clip is DisplayObject)){ trace("Warning: Object passed as container clip not a descendant of the DisplayObject type"); return (null); }; if (MovieClip(clip).stage == null){ trace("Warning: Container clip for ad is not attached to the stage"); return (null); }; 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; } else { trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal"); }; 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(); mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; 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.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{ trace("[MochiAds] Blocked URL"); }); if (!options.skip){ 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.right - _local3.left); _local5 = (_local3.top - _local3.bottom); }; 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_w:Number; 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 progress:Number; var f:Function; var sendHostProgress:Boolean; var fn:Function; var r:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:5500, 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{ }, progress_override:function (_arg1:Object):Number{ return (NaN); }, bar_offset:0}; 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; if (options.skip){ ad_timeout = 0; }; 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 + options.bar_offset); bar.y = (h - 20); }; bar_w = ((w - bar.x) - 10); 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(bar_w, 0); backing.lineTo(bar_w, 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(bar_w, 0); inside.lineTo(bar_w, 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(bar_w, 0); outline.lineTo(bar_w, 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; progress = Math.min(1, options.progress_override(clip)); f = function (_arg1:Event):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); complete = true; if (unloaded){ MochiAd.unload(clip); }; }; if (!isNaN(progress)){ complete = (progress == 1); } else { if (clip.loaderInfo.bytesLoaded == clip.loaderInfo.bytesTotal){ complete = true; } else { if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; } else { clip.loaderInfo.addEventListener(Event.COMPLETE, f); }; } else { clip.loaderInfo.addEventListener(Event.COMPLETE, f); }; }; }; 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); }; 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:Number; var _local10:Object; var _local11:Number; var _local12: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; _local7 = Math.min(1, options.progress_override(_local1)); if (_local7 == 1){ complete = true; }; if (complete){ _local6 = Math.max(1, _local6); _local5 = _local6; }; _local8 = ((100 * _local6) / _local5); if (!isNaN(_local7)){ _local8 = (100 * _local7); }; _local9 = ((100 * _local3) / chk.ad_msec); _local10 = this._mochiad_bar._inside; _local11 = Math.min(100, Math.min(((_local8) || (0)), _local9)); _local11 = Math.max(this.last_pcnt, _local11); this.last_pcnt = _local11; _local10.scaleX = (_local11 * 0.01); options.ad_progress(_local11); if (sendHostProgress){ clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local8}); if (_local8 >= 100){ sendHostProgress = false; }; }; if (!chk.showing){ _local12 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local12 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if ((((_local3 > chk.ad_timeout)) && ((_local8 == 100)))){ options.ad_failed(); _local4 = true; }; }; }; if (_local3 > chk.ad_msec){ _local4 = true; }; if (((complete) && (_local4))){ if (unloaded){ MochiAd.unload(_local1); } else { 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 mochi.as3
Section 43
//MochiCoins (mochi.as3.MochiCoins) package mochi.as3 { public class MochiCoins { public static const STORE_HIDE:String = "StoreHide"; public static const NO_USER:String = "NoUser"; public static const IO_ERROR:String = "IOError"; public static const ITEM_NEW:String = "ItemNew"; public static const ITEM_OWNED:String = "ItemOwned"; public static const STORE_ITEMS:String = "StoreItems"; public static const ERROR:String = "Error"; public static const STORE_SHOW:String = "StoreShow"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public static var _inventory:MochiInventory; public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } public static function getStoreItems():void{ MochiServices.send("coins_getStoreItems"); } public static function get inventory():MochiInventory{ return (_inventory); } public static function showStore(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("coins_showStore", {options:_arg1}, null, null); } public static function requestFunding(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_requestFunding", _arg1); } public static function showItem(_arg1:Object=null):void{ if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){ trace("ERROR: showItem call must pass an Object with an item key"); return; }; MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("coins_showItem", {options:_arg1}, null, null); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function showVideo(_arg1:Object=null):void{ if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){ trace("ERROR: showVideo call must pass an Object with an item key"); return; }; MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("coins_showVideo", {options:_arg1}, null, null); } addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{ _inventory = new MochiInventory(); }); addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{ _inventory = null; }); } }//package mochi.as3
Section 44
//MochiDigits (mochi.as3.MochiDigits) package mochi.as3 { public final class MochiDigits { private var Sibling:MochiDigits; private var Fragment:Number; private var Encoder:Number; public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{ Encoder = 0; setValue(_arg1, _arg2); } public function set value(_arg1:Number):void{ setValue(_arg1); } public function reencode():void{ var _local1:uint; _local1 = int((2147483647 * Math.random())); Fragment = (Fragment ^ (_local1 ^ Encoder)); Encoder = _local1; } public function toString():String{ var _local1:String; _local1 = String.fromCharCode((Fragment ^ Encoder)); if (Sibling != null){ _local1 = (_local1 + Sibling.toString()); }; return (_local1); } public function get value():Number{ return (Number(this.toString())); } public function setValue(_arg1:Number=0, _arg2:uint=0):void{ var _local3:String; _local3 = _arg1.toString(); var _temp1 = _arg2; _arg2 = (_arg2 + 1); Fragment = (_local3.charCodeAt(_temp1) ^ Encoder); if (_arg2 < _local3.length){ Sibling = new MochiDigits(_arg1, _arg2); } else { Sibling = null; }; reencode(); } public function addValue(_arg1:Number):void{ value = (value + _arg1); } } }//package mochi.as3
Section 45
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher) package mochi.as3 { public class MochiEventDispatcher { private var eventTable:Object; public function MochiEventDispatcher():void{ eventTable = {}; } public function triggerEvent(_arg1:String, _arg2:Object):void{ var _local3:Object; if (eventTable[_arg1] == undefined){ return; }; for (_local3 in eventTable[_arg1]) { var _local6 = eventTable[_arg1]; _local6[_local3](_arg2); }; } public function removeEventListener(_arg1:String, _arg2:Function):void{ var _local3:Object; if (eventTable[_arg1] == undefined){ eventTable[_arg1] = []; return; }; for (_local3 in eventTable[_arg1]) { if (eventTable[_arg1][_local3] != _arg2){ } else { eventTable[_arg1].splice(Number(_local3), 1); }; }; } public function addEventListener(_arg1:String, _arg2:Function):void{ removeEventListener(_arg1, _arg2); eventTable[_arg1].push(_arg2); } } }//package mochi.as3
Section 46
//MochiEvents (mochi.as3.MochiEvents) package mochi.as3 { import flash.display.*; public class MochiEvents { public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL"; public static const FORMAT_LONG:String = "LongForm"; public static const ALIGN_BOTTOM:String = "ALIGN_B"; public static const ACHIEVEMENT_RECEIVED:String = "AchievementReceived"; public static const FORMAT_SHORT:String = "ShortForm"; public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR"; public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR"; public static const ALIGN_TOP:String = "ALIGN_T"; public static const ALIGN_LEFT:String = "ALIGN_L"; public static const ALIGN_RIGHT:String = "ALIGN_R"; public static const ALIGN_TOP_LEFT:String = "ALIGN_TL"; public static const ALIGN_CENTER:String = "ALIGN_C"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); private static var gameStart:Number; private static var levelStart:Number; public static function endPlay():void{ MochiServices.send("events_clearRoundID", null, null, null); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } public static function trackEvent(_arg1:String, _arg2=null):void{ MochiServices.send("events_trackEvent", {tag:_arg1, value:_arg2}, null, null); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function startSession(_arg1:String):void{ MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null); } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function setNotifications(_arg1:MovieClip, _arg2:Object):void{ var _local3:Object; var _local4:Object; _local3 = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; _local3.clip = _arg1; MochiServices.send("events_setNotifications", _local3, null, null); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function startPlay(_arg1:String="gameplay"):void{ MochiServices.send("events_setRoundID", {tag:String(_arg1)}, null, null); } } }//package mochi.as3
Section 47
//MochiInventory (mochi.as3.MochiInventory) package mochi.as3 { import flash.events.*; import flash.utils.*; public dynamic class MochiInventory extends Proxy { private var _timer:Timer; private var _names:Array; private var _consumableProperties:Object; private var _syncID:Number; private var _storeSync:Object; private var _outstandingID:Number; private var _syncPending:Boolean; public static const READY:String = "InvReady"; public static const ERROR:String = "Error"; public static const IO_ERROR:String = "IoError"; private static const KEY_SALT:String = " syncMaint"; public static const WRITTEN:String = "InvWritten"; public static const NOT_READY:String = "InvNotReady"; public static const VALUE_ERROR:String = "InvValueError"; private static const CONSUMER_KEY:String = "MochiConsumables"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public function MochiInventory():void{ MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned); MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems); MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut); _storeSync = new Object(); _syncPending = false; _outstandingID = 0; _syncID = 0; _timer = new Timer(1000); _timer.addEventListener(TimerEvent.TIMER, sync); _timer.start(); if (MochiSocial.loggedIn){ loggedIn(); } else { loggedOut(); }; } private function newItems(_arg1:Object):void{ if (!this[(_arg1.id + KEY_SALT)]){ this[(_arg1.id + KEY_SALT)] = 0; }; if (!this[_arg1.id]){ this[_arg1.id] = 0; }; this[(_arg1.id + KEY_SALT)] = (this[(_arg1.id + KEY_SALT)] + _arg1.count); this[_arg1.id] = (this[_arg1.id] + _arg1.count); if (((_arg1.privateProperties) && (_arg1.privateProperties.consumable))){ if (!this[_arg1.privateProperties.tag]){ this[_arg1.privateProperties.tag] = 0; }; this[_arg1.privateProperties.tag] = (this[_arg1.privateProperties.tag] + (_arg1.privateProperties.inc * _arg1.count)); }; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return (-1); }; if (_consumableProperties[_arg1]){ return (MochiDigits(_consumableProperties[_arg1]).value); }; return (undefined); } public function release():void{ MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems); MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn); MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{ if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return (false); }; if (_consumableProperties[_arg1] == undefined){ return (false); }; return (true); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{ return (((_arg1)>=_names.length) ? 0 : (_arg1 + 1)); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{ var _local3:MochiDigits; if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return; }; if (!(_arg2 is Number)){ triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:_arg2}); return; }; if (_consumableProperties[_arg1]){ _local3 = MochiDigits(_consumableProperties[_arg1]); if (_local3.value == _arg2){ return; }; _local3.value = _arg2; } else { _names.push(_arg1); _consumableProperties[_arg1] = new MochiDigits(_arg2); }; _syncID++; } private function sync(_arg1:Event=null):void{ var _local2:Object; var _local3:String; if (((_syncPending) || ((_syncID == _outstandingID)))){ return; }; _outstandingID = _syncID; _local2 = {}; for (_local3 in _consumableProperties) { _local2[_local3] = MochiDigits(_consumableProperties[_local3]).value; }; MochiUserData.put(CONSUMER_KEY, _local2, putConsumableBag); _syncPending = true; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{ return (_names[(_arg1 - 1)]); } private function loggedIn(_arg1:Object=null):void{ MochiUserData.get(CONSUMER_KEY, getConsumableBag); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{ if (!_consumableProperties[_arg1]){ return (false); }; _names.splice(_names.indexOf(_arg1), 1); delete _consumableProperties[_arg1]; return (true); } private function itemOwned(_arg1:Object):void{ _storeSync[_arg1.id] = {properties:_arg1.properties, count:_arg1.count}; } private function putConsumableBag(_arg1:MochiUserData):void{ _syncPending = false; if (_arg1.error){ triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error}); _outstandingID = -1; }; triggerEvent(WRITTEN, {}); } private function getConsumableBag(_arg1:MochiUserData):void{ var _local2:String; var _local3:Number; if (_arg1.error){ triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error}); return; }; _consumableProperties = {}; _names = new Array(); if (_arg1.data){ for (_local2 in _arg1.data) { _names.push(_local2); _consumableProperties[_local2] = new MochiDigits(_arg1.data[_local2]); }; }; for (_local2 in _storeSync) { _local3 = _storeSync[_local2].count; if (_consumableProperties[(_local2 + KEY_SALT)]){ _local3 = (_local3 - _consumableProperties[(_local2 + KEY_SALT)].value); }; if (_local3 == 0){ } else { newItems({id:_local2, count:_local3, properties:_storeSync[_local2].properties}); }; }; triggerEvent(READY, {}); } private function loggedOut(_arg1:Object=null):void{ _consumableProperties = null; } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } } }//package mochi.as3
Section 48
//MochiServices (mochi.as3.MochiServices) package mochi.as3 { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.geom.*; import flash.net.*; import flash.system.*; public class MochiServices { public static const CONNECTED:String = "onConnected"; private static var _container:Object; private static var _connected:Boolean = false; private static var _queue:Array; private static var _swfVersion:String; private static var _preserved:Object; public static var netupAttempted:Boolean = false; private static var _sendChannel:LocalConnection; private static var _nextCallbackID:Number; private static var _clip:MovieClip; private static var _loader:Loader; private static var _id:String; private static var _services:String = "services.swf"; private static var _servURL:String = "http://www.mochiads.com/static/lib/services/"; public static var widget:Boolean = false; private static var _timer:Timer; private static var _sendChannelName:String; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); private static var _callbacks:Object; private static var _connecting:Boolean = false; private static var _mochiLocalConnection:MovieClip; private static var _listenChannelName:String = "__ms_"; public static var onError:Object; public static var netup:Boolean = true; private static var _mochiLC:String = "MochiLC.swf"; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function get connected():Boolean{ return (_connected); } private static function onReceive(_arg1:Object):void{ var cb:String; var cblst:Object; var method:*; var methodName:String; var obj:Object; var pkg = _arg1; cb = pkg.callbackID; cblst = _callbacks[cb]; if (!cblst){ return; }; method = cblst.callbackMethod; methodName = ""; obj = cblst.callbackObject; if (((obj) && ((typeof(method) == "string")))){ methodName = method; if (obj[method] != null){ method = obj[method]; } else { trace((("Error: Method " + method) + " does not exist.")); }; }; if (method != undefined){ try { method.apply(obj, pkg.args); } catch(error:Error) { trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString())); }; } else { if (obj != null){ try { obj(pkg.args); } catch(error:Error) { trace(("Error invoking method on object: " + error.toString())); }; }; }; delete _callbacks[cb]; } public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ if (_connected){ _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_nextCallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1)); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _queue.push({methodName:_arg1, args:_arg2, callbackID:_nextCallbackID}); }; if (_clip != null){ if (_callbacks != null){ _callbacks[_nextCallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _nextCallbackID++; }; }; } private static function init(_arg1:String, _arg2:Object):void{ _id = _arg1; if (_arg2 != null){ _container = _arg2; loadCommunicator(_arg1, _container); }; } private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{ var _local3:Array; var _local4:int; var _local5:Array; var _local6:Array; var _local7:MovieClip; var _local8:LocalConnection; var _local9:String; var _local10:ByteArray; var _local11:ByteArray; var _local12:uint; var _local13:uint; var _local14:Loader; _local3 = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23]; _local5 = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3]; _local6 = [0, 64, 0, 0, 0]; _local7 = new MovieClip(); _local8 = new LocalConnection(); _local9 = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().time)); _local8 = new LocalConnection(); _local7.lc = _local8; _local7.click = _arg2; _local8.client = _local7; _local8.connect(_local9); _local10 = new ByteArray(); _local11 = new ByteArray(); _local11.endian = Endian.LITTLE_ENDIAN; _local11.writeShort(1); _local11.writeUTFBytes(((_arg1 + " ") + _local9)); _local11.writeByte(0); _local12 = ((_local3.length + _local11.length) + 4); _local13 = (_local12 + 35); _local10.endian = Endian.LITTLE_ENDIAN; _local10.writeUTFBytes("FWS"); _local10.writeByte(8); _local10.writeUnsignedInt(_local13); for each (_local4 in _local5) { _local10.writeByte(_local4); }; _local10.writeUnsignedInt(_local12); _local10.writeByte(136); _local10.writeShort(_local11.length); _local10.writeBytes(_local11); for each (_local4 in _local3) { _local10.writeByte(_local4); }; for each (_local4 in _local6) { _local10.writeByte(_local4); }; _local14 = new Loader(); _local14.loadBytes(_local10); _local7.addChild(_local14); return (_local7); } private static function detach(_arg1:Event):void{ var _local2:LoaderInfo; _local2 = LoaderInfo(_arg1.target); _local2.removeEventListener(Event.COMPLETE, detach); _local2.removeEventListener(IOErrorEvent.IO_ERROR, detach); _local2.removeEventListener(Event.COMPLETE, loadLCBridgeComplete); _local2.removeEventListener(IOErrorEvent.IO_ERROR, loadError); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } private static function loadLCBridgeComplete(_arg1:Event):void{ var _local2:Loader; _local2 = LoaderInfo(_arg1.target).loader; _mochiLocalConnection = MovieClip(_local2.content); listen(); } public static function disconnect():void{ if (((_connected) || (_connecting))){ if (_clip != null){ if (_clip.parent != null){ if ((_clip.parent is Sprite)){ Sprite(_clip.parent).removeChild(_clip); _clip = null; }; }; }; _connecting = (_connected = false); flush(true); try { _mochiLocalConnection.close(); } catch(error:Error) { }; }; if (_timer != null){ try { _timer.stop(); _timer.removeEventListener(TimerEvent.TIMER, connectWait); _timer = null; } catch(error:Error) { }; }; } public static function allowDomains(_arg1:String):String{ var _local2:String; if (Security.sandboxType != "application"){ Security.allowDomain("*"); Security.allowInsecureDomain("*"); }; if (_arg1.indexOf("http://") != -1){ _local2 = _arg1.split("/")[2].split(":")[0]; if (Security.sandboxType != "application"){ Security.allowDomain(_local2); Security.allowInsecureDomain(_local2); }; }; return (_local2); } public static function getVersion():String{ return ("3.9.2 as3"); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); } public static function warnID(_arg1:String, _arg2:Boolean):void{ var _local3:Number; _arg1 = _arg1.toLowerCase(); if (_arg1.length != 16){ trace((("WARNING: " + (_arg2) ? "board" : "game") + " ID is not the appropriate length")); return; } else { if (_arg1 == "1e113c7239048b3f"){ if (_arg2){ trace("WARNING: Using testing board ID"); } else { trace("WARNING: Using testing board ID as game ID"); }; return; } else { if (_arg1 == "84993a1de4031cd8"){ if (_arg2){ trace("WARNING: Using testing game ID as board ID"); } else { trace("WARNING: Using testing game ID"); }; return; }; }; }; _local3 = 0; while (_local3 < _arg1.length) { switch (_arg1.charAt(_local3)){ case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": case "a": case "b": case "c": case "d": case "e": case "f": break; default: trace(("WARNING: Board ID contains illegal characters: " + _arg1)); return; }; _local3++; }; } private static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (((_clip) && (_queue))){ while (_queue.length > 0) { _local2 = _queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _callbacks[_local2.callbackID]; }; delete _callbacks[_local2.callbackID]; if (((_arg1) && (!((_local3 == null))))){ handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod); }; }; }; }; } public static function get id():String{ return (_id); } private static function onEvent(_arg1:Object):void{ var _local2:String; var _local3:String; _local2 = _arg1.target; _local3 = _arg1.event; switch (_local2){ case "services": MochiServices.triggerEvent(_arg1.event, _arg1.args); break; case "events": MochiEvents.triggerEvent(_arg1.event, _arg1.args); break; case "coins": MochiCoins.triggerEvent(_arg1.event, _arg1.args); break; case "social": MochiSocial.triggerEvent(_arg1.event, _arg1.args); break; }; } private static function urlOptions(_arg1:Object):Object{ var _local2:Object; var _local3:String; var _local4:Array; var _local5:Number; var _local6:Array; _local2 = {}; if (_arg1.stage){ _local3 = _arg1.stage.loaderInfo.parameters.mochiad_options; } else { _local3 = _arg1.loaderInfo.parameters.mochiad_options; }; if (_local3){ _local4 = _local3.split("&"); _local5 = 0; while (_local5 < _local4.length) { _local6 = _local4[_local5].split("="); _local2[unescape(_local6[0])] = unescape(_local6[1]); _local5++; }; }; return (_local2); } public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{ var vars:Object; var avm1Click:DisplayObject; var s:String; var i:Number; var x:String; var req:URLRequest; var loader:Loader; var setURL:Function; var err:Function; var complete:Function; var url = _arg1; var burl = _arg2; var btn = _arg3; var onClick = _arg4; vars = new Object(); vars["mav"] = getVersion(); vars["swfv"] = "9"; vars["swfurl"] = btn.loaderInfo.loaderURL; vars["fv"] = Capabilities.version; vars["os"] = Capabilities.os; vars["lang"] = Capabilities.language; vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY); s = "?"; i = 0; for (x in vars) { if (i != 0){ s = (s + "&"); }; i = (i + 1); s = (((s + x) + "=") + escape(vars[x])); }; req = new URLRequest("http://link.mochiads.com/linkping.swf"); loader = new Loader(); setURL = function (_arg1:String):void{ var _local2:Rectangle; if (avm1Click){ btn.removeChild(avm1Click); }; avm1Click = clickMovie(_arg1, onClick); _local2 = btn.getBounds(btn); btn.addChild(avm1Click); avm1Click.x = _local2.x; avm1Click.y = _local2.y; avm1Click.scaleX = (0.01 * _local2.width); avm1Click.scaleY = (0.01 * _local2.height); }; err = function (_arg1:Object):void{ netup = false; _arg1.target.removeEventListener(_arg1.type, arguments.callee); setURL(burl); }; complete = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; if (netup){ setURL((url + s)); } else { setURL(burl); }; if (!((netupAttempted) || (_connected))){ netupAttempted = true; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.load(req); }; } public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{ if (_clip.parent){ _clip.parent.removeChild(_clip); }; if (_arg1 != null){ if ((_arg1 is DisplayObjectContainer)){ _container = _arg1; }; }; if (_arg2){ if ((_container is DisplayObjectContainer)){ DisplayObjectContainer(_container).addChild(_clip); }; }; } private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{ var args = _arg1; var callbackObject = _arg2; var callbackMethod = _arg3; if (args != null){ if (args.onError != null){ args.onError.apply(null, ["NotConnected"]); }; if (((!((args.options == null))) && (!((args.options.onError == null))))){ args.options.onError.apply(null, ["NotConnected"]); }; }; if (callbackMethod != null){ args = {}; args.error = true; args.errorCode = "NotConnected"; if (((!((callbackObject == null))) && ((callbackMethod is String)))){ try { var _local5 = callbackObject; _local5[callbackMethod](args); } catch(error:Error) { }; } else { if (callbackMethod != null){ try { callbackMethod.apply(args); } catch(error:Error) { }; }; }; }; } private static function loadError(_arg1:Object):void{ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); } public static function get childClip():Object{ return (_clip); } private static function initComChannels():void{ if (!_connected){ trace("[SERVICES_API] connected!"); _connecting = false; _connected = true; _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _clip.onReceive = onReceive; _clip.onEvent = onEvent; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; while (_queue.length > 0) { _mochiLocalConnection.send(_sendChannelName, "onReceive", _queue.shift()); }; }; } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } private static function listen():void{ _mochiLocalConnection.connect(_listenChannelName); _clip.handshake = function (_arg1:Object):void{ MochiServices.comChannelName = _arg1.newChannel; }; trace("Waiting for MochiAds services to connect..."); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } private static function loadLCBridge(_arg1:Object):void{ var _local2:Loader; var _local3:String; var _local4:URLRequest; _local2 = new Loader(); _local3 = (_servURL + _mochiLC); _local4 = new URLRequest(_local3); _local2.contentLoaderInfo.addEventListener(Event.COMPLETE, detach); _local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach); _local2.contentLoaderInfo.addEventListener(Event.COMPLETE, loadLCBridgeComplete); _local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); _local2.load(_local4); _arg1.addChild(_local2); } public static function set comChannelName(_arg1:String):void{ if (_arg1 != null){ if (_arg1.length > 3){ _sendChannelName = (_arg1 + "_fromgame"); initComChannels(); }; }; } private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{ var _local3:String; var _local4:URLRequest; var _local5:URLVariables; if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; if (urlOptions(_arg2).servURL){ _servURL = urlOptions(_arg2).servURL; }; _local3 = (_servURL + _services); if (urlOptions(_arg2).servicesURL){ _local3 = urlOptions(_arg2).servicesURL; }; _listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999)))); MochiServices.allowDomains(_local3); _clip = new MovieClip(); loadLCBridge(_clip); _loader = new Loader(); _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, detach); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); _local4 = new URLRequest(_local3); _local5 = new URLVariables(); _local5.listenLC = _listenChannelName; _local5.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options; _local5.api_version = getVersion(); if (widget){ _local5.widget = true; }; _local4.data = _local5; _loader.load(_local4); _clip.addChild(_loader); _sendChannel = new LocalConnection(); _queue = []; _nextCallbackID = 0; _callbacks = {}; _timer = new Timer(10000, 1); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); return (_clip); } public static function get clip():Object{ return (_container); } public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{ var id = _arg1; var clip = _arg2; var onError = _arg3; warnID(id, false); if ((clip is DisplayObject)){ if (clip.stage == null){ trace("MochiServices connect requires the containing clip be attached to the stage"); }; if (((!(_connected)) && ((_clip == null)))){ trace("MochiServices Connecting..."); _connecting = true; init(id, clip); }; } else { trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage."); }; if (onError != null){ MochiServices.onError = onError; } else { if (MochiServices.onError == null){ MochiServices.onError = function (_arg1:String):void{ trace(_arg1); }; }; }; } public static function bringToTop(_arg1:Event=null):void{ var e = _arg1; if (((!((MochiServices.clip == null))) && (!((MochiServices.childClip == null))))){ try { if (MochiServices.clip.numChildren > 1){ MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1)); }; } catch(errorObject:Error) { trace("Warning: Depth sort error."); _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); }; }; } public static function connectWait(_arg1:TimerEvent):void{ if (!_connected){ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load. (timeout)"); MochiServices.disconnect(); MochiServices.onError("IOError"); } else { _timer.stop(); _timer.removeEventListener(TimerEvent.TIMER, connectWait); _timer = null; }; } } }//package mochi.as3
Section 49
//MochiSocial (mochi.as3.MochiSocial) package mochi.as3 { public class MochiSocial { public static const LOGGED_IN:String = "LoggedIn"; public static const ACTION_CANCELED:String = "onCancel"; public static const PROPERTIES_SIZE:String = "PropertiesSize"; public static const IO_ERROR:String = "IOError"; public static const NO_USER:String = "NoUser"; public static const FRIEND_LIST:String = "FriendsList"; public static const PROFILE_DATA:String = "ProfileData"; public static const GAMEPLAY_DATA:String = "GameplayData"; public static const ACTION_COMPLETE:String = "onComplete"; public static const LOGIN_SHOW:String = "LoginShow"; public static const PROFILE_HIDE:String = "ProfileHide"; public static const USER_INFO:String = "UserInfo"; public static const PROPERTIES_SAVED:String = "PropertySaved"; public static const WIDGET_LOADED:String = "WidgetLoaded"; public static const ERROR:String = "Error"; public static const LOGGED_OUT:String = "LoggedOut"; public static const PROFILE_SHOW:String = "ProfileShow"; public static const LOGIN_HIDE:String = "LoginHide"; public static const LOGIN_SHOWN:String = "LoginShown"; public static var _user_info:Object = null; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public static function requestFan(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_requestFan", _arg1); } public static function postToStream(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_postToStream", _arg1); } public static function getFriendsList(_arg1:Object=null):void{ MochiServices.send("social_getFriendsList", _arg1); } public static function requestLogin(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_requestLogin", _arg1); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function saveUserProperties(_arg1:Object):void{ MochiServices.send("social_saveUserProperties", _arg1); } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function inviteFriends(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_inviteFriends", _arg1); } public static function get loggedIn():Boolean{ return (!((_user_info == null))); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } public static function showLoginWidget(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_showLoginWidget", {options:_arg1}); } public static function getAPIURL():String{ if (!_user_info){ return (null); }; return (_user_info.api_url); } public static function hideLoginWidget():void{ MochiServices.send("social_hideLoginWidget"); } public static function getAPIToken():String{ if (!_user_info){ return (null); }; return (_user_info.api_token); } MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{ _user_info = _arg1; }); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{ _user_info = null; }); } }//package mochi.as3
Section 50
//MochiUserData (mochi.as3.MochiUserData) package mochi.as3 { import flash.events.*; import flash.utils.*; import flash.net.*; public class MochiUserData extends EventDispatcher { public var callback:Function;// = null public var error:Event;// = null public var key:String;// = null public var operation:String;// = null public var data;// = null public var _loader:URLLoader; public function MochiUserData(_arg1:String="", _arg2:Function=null){ key = null; data = null; error = null; operation = null; callback = null; super(); this.key = _arg1; this.callback = _arg2; } public function securityErrorHandler(_arg1:SecurityErrorEvent):void{ errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _arg1.toString()))); } public function putEvent(_arg1):void{ request("put", serialize(_arg1)); } public function request(_arg1:String, _arg2:ByteArray):void{ var api_url:String; var api_token:String; var args:URLVariables; var req:URLRequest; var _operation = _arg1; var _data = _arg2; operation = _operation; api_url = MochiSocial.getAPIURL(); api_token = MochiSocial.getAPIToken(); if ((((api_url == null)) || ((api_token == null)))){ errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in")); return; }; _loader = new URLLoader(); args = new URLVariables(); args.op = _operation; args.key = key; req = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString())); req.method = URLRequestMethod.POST; req.contentType = "application/x-mochi-userdata"; req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)]; req.data = _data; _loader.dataFormat = URLLoaderDataFormat.BINARY; _loader.addEventListener(Event.COMPLETE, completeHandler); _loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); try { _loader.load(req); } catch(e:SecurityError) { errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + e.toString()))); }; } public function completeHandler(_arg1:Event):void{ var event = _arg1; try { if (_loader.data.length){ data = deserialize(_loader.data); } else { data = null; }; } catch(e:Error) { errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + e.toString()))); return; }; if (callback != null){ performCallback(); } else { dispatchEvent(event); }; close(); } public function performCallback():void{ try { callback(this); } catch(e:Error) { trace(("[MochiUserData] exception during callback: " + e)); }; } public function serialize(_arg1):ByteArray{ var _local2:ByteArray; _local2 = new ByteArray(); _local2.objectEncoding = ObjectEncoding.AMF3; _local2.writeObject(_arg1); _local2.compress(); return (_local2); } public function errorHandler(_arg1:IOErrorEvent):void{ data = null; error = _arg1; if (callback != null){ performCallback(); } else { dispatchEvent(_arg1); }; close(); } public function getEvent():void{ request("get", serialize(null)); } override public function toString():String{ return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]")); } public function close():void{ if (_loader){ _loader.removeEventListener(Event.COMPLETE, completeHandler); _loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); _loader.close(); _loader = null; }; error = null; callback = null; } public function deserialize(_arg1:ByteArray){ _arg1.objectEncoding = ObjectEncoding.AMF3; _arg1.uncompress(); return (_arg1.readObject()); } public static function get(_arg1:String, _arg2:Function):void{ var _local3:MochiUserData; _local3 = new MochiUserData(_arg1, _arg2); _local3.getEvent(); } public static function put(_arg1:String, _arg2, _arg3:Function):void{ var _local4:MochiUserData; _local4 = new MochiUserData(_arg1, _arg3); _local4.putEvent(_arg2); } } }//package mochi.as3
Section 51
//ajax (ajax) package { import flash.display.*; public dynamic class ajax extends BitmapData { public function ajax(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 52
//arsenal (arsenal) package { import flash.display.*; public dynamic class arsenal extends BitmapData { public function arsenal(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 53
//ball (ball) package { import flash.display.*; public dynamic class ball extends MovieClip { } }//package
Section 54
//ball_shadow (ball_shadow) package { import flash.display.*; public dynamic class ball_shadow extends MovieClip { } }//package
Section 55
//boka (boka) package { import flash.display.*; public dynamic class boka extends BitmapData { public function boka(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 56
//bump (bump) package { import flash.media.*; public dynamic class bump extends Sound { } }//package
Section 57
//Button_disabledSkin (Button_disabledSkin) package { import flash.display.*; public dynamic class Button_disabledSkin extends MovieClip { } }//package
Section 58
//Button_downSkin (Button_downSkin) package { import flash.display.*; public dynamic class Button_downSkin extends MovieClip { } }//package
Section 59
//Button_emphasizedSkin (Button_emphasizedSkin) package { import flash.display.*; public dynamic class Button_emphasizedSkin extends MovieClip { } }//package
Section 60
//Button_overSkin (Button_overSkin) package { import flash.display.*; public dynamic class Button_overSkin extends MovieClip { } }//package
Section 61
//Button_selectedDisabledSkin (Button_selectedDisabledSkin) package { import flash.display.*; public dynamic class Button_selectedDisabledSkin extends MovieClip { } }//package
Section 62
//Button_selectedDownSkin (Button_selectedDownSkin) package { import flash.display.*; public dynamic class Button_selectedDownSkin extends MovieClip { } }//package
Section 63
//Button_selectedOverSkin (Button_selectedOverSkin) package { import flash.display.*; public dynamic class Button_selectedOverSkin extends MovieClip { } }//package
Section 64
//Button_selectedUpSkin (Button_selectedUpSkin) package { import flash.display.*; public dynamic class Button_selectedUpSkin extends MovieClip { } }//package
Section 65
//Button_upSkin (Button_upSkin) package { import flash.display.*; public dynamic class Button_upSkin extends MovieClip { } }//package
Section 66
//buttonM (buttonM) package { import flash.display.*; import flash.text.*; public dynamic class buttonM extends MovieClip { public var label2:TextField; public var buttonBaza:SimpleButton; } }//package
Section 67
//buttonMulti (buttonMulti) package { import flash.display.*; import flash.text.*; public dynamic class buttonMulti extends MovieClip { public var buttonMultiBaza:SimpleButton; public var label2:TextField; } }//package
Section 68
//card (card) package { import flash.display.*; public dynamic class card extends MovieClip { } }//package
Section 69
//circles (circles) package { import flash.display.*; public dynamic class circles extends BitmapData { public function circles(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 70
//classesC (classesC) package { import flash.display.*; public dynamic class classesC extends MovieClip { } }//package
Section 71
//clubButtonM (clubButtonM) package { import flash.display.*; import flash.text.*; public dynamic class clubButtonM extends MovieClip { public var label2:TextField; public var buttonBaza:SimpleButton; } }//package
Section 72
//clubNamesMask (clubNamesMask) package { import flash.display.*; public dynamic class clubNamesMask extends MovieClip { } }//package
Section 73
//clubsInitializing (clubsInitializing) package { import flash.display.*; import flash.text.*; public dynamic class clubsInitializing extends MovieClip { public var inft:TextField; public var loading_txt:TextField; } }//package
Section 74
//Controls (Controls) package { import flash.display.*; public dynamic class Controls extends MovieClip { } }//package
Section 75
//correctArrow (correctArrow) package { import flash.display.*; public dynamic class correctArrow extends MovieClip { } }//package
Section 76
//correctOrWrong (correctOrWrong) package { import flash.display.*; public dynamic class correctOrWrong extends MovieClip { } }//package
Section 77
//DOOP (DOOP) package { import flash.media.*; public dynamic class DOOP extends Sound { } }//package
Section 78
//enegryC (enegryC) package { import flash.display.*; public dynamic class enegryC extends MovieClip { public var energy_mask:MovieClip; } }//package
Section 79
//error (error) package { import flash.display.*; public dynamic class error extends MovieClip { } }//package
Section 80
//field (field) package { import flash.display.*; public dynamic class field extends MovieClip { public var goalArea:gol_area_ground; public var goalBars:goal_bars; public var _netArea:netArea; public var _energy:enegryC; } }//package
Section 81
//focusRectSkin (focusRectSkin) package { import flash.display.*; public dynamic class focusRectSkin extends MovieClip { } }//package
Section 82
//gameOver (gameOver) package { import flash.media.*; public dynamic class gameOver extends Sound { } }//package
Section 83
//goal_bars (goal_bars) package { import flash.display.*; public dynamic class goal_bars extends MovieClip { } }//package
Section 84
//goal_net (goal_net) package { import flash.display.*; public dynamic class goal_net extends MovieClip { } }//package
Section 85
//goalkeeper (goalkeeper) package { import flash.display.*; public dynamic class goalkeeper extends MovieClip { } }//package
Section 86
//goalkeeperSheet (goalkeeperSheet) package { import flash.display.*; public dynamic class goalkeeperSheet extends BitmapData { public function goalkeeperSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 87
//goalkeeperSprites (goalkeeperSprites) package { import flash.display.*; public dynamic class goalkeeperSprites extends MovieClip { } }//package
Section 88
//goClip (goClip) package { import flash.display.*; public dynamic class goClip extends MovieClip { } }//package
Section 89
//gol_area_ground (gol_area_ground) package { import flash.display.*; public dynamic class gol_area_ground extends MovieClip { } }//package
Section 90
//gooaalClip (gooaalClip) package { import flash.display.*; public dynamic class gooaalClip extends MovieClip { } }//package
Section 91
//gool (gool) package { import flash.media.*; public dynamic class gool extends Sound { } }//package
Section 92
//indikator_cilja (indikator_cilja) package { import flash.display.*; public dynamic class indikator_cilja extends MovieClip { } }//package
Section 93
//instructionsMC (instructionsMC) package { import flash.display.*; import flash.text.*; public dynamic class instructionsMC extends MovieClip { public var _obavestenje:TextField; public var startButton:SimpleButton; public var _myTeam:TextField; public var _obavestenjeSenka:TextField; public var _hisTeam:TextField; public var akciona_poruka:TextField; } }//package
Section 94
//instructionsMC_pokretni (instructionsMC_pokretni) package { import flash.display.*; public dynamic class instructionsMC_pokretni extends MovieClip { public var instr_baza:instructionsMC; public function instructionsMC_pokretni(){ addFrameScript(19, frame20); } function frame20(){ stop(); } } }//package
Section 95
//littleInfo (littleInfo) package { import flash.display.*; import flash.text.*; public dynamic class littleInfo extends MovieClip { public var littleText:TextField; } }//package
Section 96
//LoadingBox (LoadingBox) package { import flash.display.*; import flash.text.*; public dynamic class LoadingBox extends MovieClip { public var loading_txt_shadow:TextField; public var loading_txt:TextField; } }//package
Section 97
//mainSoundTrack (mainSoundTrack) package { import flash.media.*; public dynamic class mainSoundTrack extends Sound { } }//package
Section 98
//maskField (maskField) package { import flash.display.*; public dynamic class maskField extends MovieClip { } }//package
Section 99
//menu2Screen (menu2Screen) package { import flash.display.*; import flash.text.*; public dynamic class menu2Screen extends MovieClip { public var menu_info:TextField; public var textBase:MovieClip; public var menu_info_red_shadow:TextField; } }//package
Section 100
//miss (miss) package { import flash.media.*; public dynamic class miss extends Sound { } }//package
Section 101
//missClip (missClip) package { import flash.display.*; public dynamic class missClip extends MovieClip { } }//package
Section 102
//mrezaMC (mrezaMC) package { import flash.display.*; public dynamic class mrezaMC extends MovieClip { public var _zadnja_mreza:MovieClip; } }//package
Section 103
//netArea (netArea) package { import flash.display.*; public dynamic class netArea extends MovieClip { } }//package
Section 104
//nextShotAnnouncement (nextShotAnnouncement) package { import flash.display.*; import flash.text.*; public dynamic class nextShotAnnouncement extends MovieClip { public var _obavestenje:TextField; public var _obavestenjeSenka:TextField; public var nextShotDugme:SimpleButton; } }//package
Section 105
//numbers_final (numbers_final) package { import flash.display.*; public dynamic class numbers_final extends BitmapData { public function numbers_final(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 106
//OCRAStd (OCRAStd) package { import flash.text.*; public dynamic class OCRAStd extends Font { } }//package
Section 107
//odbitak (odbitak) package { import flash.media.*; public dynamic class odbitak extends Sound { } }//package
Section 108
//odskok (odskok) package { import flash.media.*; public dynamic class odskok extends Sound { } }//package
Section 109
//opponent (opponent) package { import flash.display.*; public dynamic class opponent extends MovieClip { } }//package
Section 110
//path_mark (path_mark) package { import flash.display.*; public dynamic class path_mark extends MovieClip { } }//package
Section 111
//ping4 (ping4) package { import flash.media.*; public dynamic class ping4 extends Sound { } }//package
Section 112
//player (player) package { import flash.display.*; public dynamic class player extends MovieClip { } }//package
Section 113
//playerSheet (playerSheet) package { import flash.display.*; public dynamic class playerSheet extends BitmapData { public function playerSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 114
//playerSprites (playerSprites) package { import flash.display.*; public dynamic class playerSprites extends MovieClip { } }//package
Section 115
//podloga_za_tajmer (podloga_za_tajmer) package { import flash.display.*; public dynamic class podloga_za_tajmer extends MovieClip { } }//package
Section 116
//podloge (podloge) package { import flash.display.*; public dynamic class podloge extends MovieClip { } }//package
Section 117
//pola_pola_dijagon (pola_pola_dijagon) package { import flash.display.*; public dynamic class pola_pola_dijagon extends BitmapData { public function pola_pola_dijagon(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 118
//pola_pola_uzduz (pola_pola_uzduz) package { import flash.display.*; public dynamic class pola_pola_uzduz extends BitmapData { public function pola_pola_uzduz(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 119
//poprecne (poprecne) package { import flash.display.*; public dynamic class poprecne extends BitmapData { public function poprecne(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 120
//prazan (prazan) package { import flash.display.*; public dynamic class prazan extends BitmapData { public function prazan(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 121
//qualifiedT (qualifiedT) package { import flash.display.*; public dynamic class qualifiedT extends MovieClip { } }//package
Section 122
//reklame (reklame) package { import flash.display.*; public dynamic class reklame extends MovieClip { } }//package
Section 123
//river (river) package { import flash.display.*; public dynamic class river extends BitmapData { public function river(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 124
//round_label (round_label) package { import flash.display.*; import flash.text.*; public dynamic class round_label extends MovieClip { public var colBox:SimpleButton; public var roundD:TextField; public var textD:TextField; public var unvisible:SimpleButton; } }//package
Section 125
//semafor (semafor) package { import flash.display.*; import flash.text.*; public dynamic class semafor extends MovieClip { public var _podloga:podloge; public var _statistikeSenka:TextField; public var _statistike:TextField; } }//package
Section 126
//shirtGraphics (shirtGraphics) package { import flash.display.*; public dynamic class shirtGraphics extends MovieClip { public var shirtButton:SimpleButton; public var shirtBase:MovieClip; public var shirtStripes:MovieClip; } }//package
Section 127
//shot (shot) package { import flash.media.*; public dynamic class shot extends Sound { } }//package
Section 128
//shut (shut) package { import flash.media.*; public dynamic class shut extends Sound { } }//package
Section 129
//swoosh2 (swoosh2) package { import flash.media.*; public dynamic class swoosh2 extends Sound { } }//package
Section 130
//target (target) package { import flash.display.*; public dynamic class target extends MovieClip { } }//package
Section 131
//titleScreen (titleScreen) package { import flash.display.*; import flash.text.*; public dynamic class titleScreen extends MovieClip { public var menu_info_red_shadow2:TextField; public var menu_info_highlight:TextField; public var menu_info_red:TextField; public var menu_info:TextField; public var textBase:MovieClip; public var menu_info_red_shadow:TextField; } }//package
Section 132
//trianButton (trianButton) package { import flash.display.*; public dynamic class trianButton extends SimpleButton { } }//package
Section 133
//triangleButton (triangleButton) package { import flash.display.*; public dynamic class triangleButton extends MovieClip { } }//package
Section 134
//upper_net (upper_net) package { import flash.display.*; public dynamic class upper_net extends MovieClip { } }//package
Section 135
//uzduzne_pruge (uzduzne_pruge) package { import flash.display.*; public dynamic class uzduzne_pruge extends BitmapData { public function uzduzne_pruge(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 136
//zvizdukSudija (zvizdukSudija) package { import flash.media.*; public dynamic class zvizdukSudija extends Sound { } }//package

Library Items

Symbol 1 Font {OCRAStd}
Symbol 2 Sound {shut}
Symbol 3 BitmapUsed by:4 14 30 85 96
Symbol 4 GraphicUses:3Used by:13
Symbol 5 FontUsed by:6 9 33 34 71 72 130 131 132 133
Symbol 6 EditableTextUses:5Used by:13
Symbol 7 FontUsed by:8 10 35 124 139 140 142
Symbol 8 EditableTextUses:7Used by:13
Symbol 9 EditableTextUses:5Used by:13
Symbol 10 EditableTextUses:7Used by:13
Symbol 11 BitmapUsed by:12
Symbol 12 GraphicUses:11Used by:13 152
Symbol 13 MovieClip {LoadingBox}Uses:4 6 8 9 10 12
Symbol 14 GraphicUses:3Used by:20
Symbol 15 GraphicUsed by:16
Symbol 16 MovieClipUses:15Used by:20 82 95 98 143
Symbol 17 FontUsed by:18 19 88 89 90 91 92 136
Symbol 18 EditableTextUses:17Used by:20
Symbol 19 EditableTextUses:17Used by:20
Symbol 20 MovieClip {menu2Screen}Uses:14 16 18 19
Symbol 21 Bitmap {numbers_final}Used by:325
Symbol 22 GraphicUsed by:23
Symbol 23 MovieClip {target}Uses:22Used by:293 325
Symbol 24 GraphicUsed by:25
Symbol 25 MovieClip {path_mark}Uses:24Used by:325
Symbol 26 Bitmap {circles}Used by:325
Symbol 27 GraphicUsed by:152
Symbol 28 FontUsed by:29
Symbol 29 TextUses:28Used by:152
Symbol 30 GraphicUses:3Used by:36
Symbol 31 FontUsed by:32 76 80 93 94 97 101 102 103 104 114 116 117 118 183 236 275 284 287 288 289 290 291 292 303 304 305 306 311 312 315 316 319
Symbol 32 EditableTextUses:31Used by:36
Symbol 33 EditableTextUses:5Used by:36
Symbol 34 EditableTextUses:5Used by:36
Symbol 35 EditableTextUses:7Used by:36
Symbol 36 MovieClip {clubsInitializing}Uses:30 32 33 34 35Used by:152
Symbol 37 BitmapUsed by:38
Symbol 38 GraphicUses:37Used by:39 144
Symbol 39 MovieClip {correctArrow}Uses:38Used by:152
Symbol 40 BitmapUsed by:41
Symbol 41 GraphicUses:40Used by:44
Symbol 42 BitmapUsed by:43
Symbol 43 GraphicUses:42Used by:44
Symbol 44 MovieClip {correctOrWrong}Uses:41 43Used by:152
Symbol 45 GraphicUsed by:48
Symbol 46 GraphicUsed by:48
Symbol 47 GraphicUsed by:48
Symbol 48 ButtonUses:45 46 47Used by:69
Symbol 49 GraphicUsed by:50
Symbol 50 MovieClipUses:49Used by:69
Symbol 51 GraphicUsed by:65
Symbol 52 GraphicUsed by:65
Symbol 53 GraphicUsed by:65
Symbol 54 GraphicUsed by:65
Symbol 55 GraphicUsed by:65
Symbol 56 GraphicUsed by:65
Symbol 57 GraphicUsed by:65
Symbol 58 GraphicUsed by:65
Symbol 59 GraphicUsed by:65
Symbol 60 GraphicUsed by:65
Symbol 61 GraphicUsed by:65
Symbol 62 GraphicUsed by:65
Symbol 63 GraphicUsed by:65
Symbol 64 GraphicUsed by:65
Symbol 65 MovieClipUses:51 52 53 54 55 56 57 58 59 60 61 62 63 64Used by:69
Symbol 66 BitmapUsed by:68
Symbol 67 BitmapUsed by:68
Symbol 68 GraphicUses:66 67Used by:69
Symbol 69 MovieClip {shirtGraphics}Uses:48 50 65 68Used by:152
Symbol 70 GraphicUsed by:73
Symbol 71 EditableTextUses:5Used by:73
Symbol 72 EditableTextUses:5Used by:73
Symbol 73 MovieClip {error}Uses:70 71 72Used by:152
Symbol 74 GraphicUsed by:82 98 105
Symbol 75 GraphicUsed by:82 98 105 135 143
Symbol 76 EditableTextUses:31Used by:82
Symbol 77 BitmapUsed by:78 96
Symbol 78 GraphicUses:77Used by:79
Symbol 79 ButtonUses:78Used by:81
Symbol 80 EditableTextUses:31Used by:81
Symbol 81 MovieClip {buttonM}Uses:79 80Used by:82 105 135 143
Symbol 82 MovieClip {com.areYouSure}Uses:16 74 75 76 81Used by:152
Symbol 83 FontUsed by:84
Symbol 84 EditableTextUses:83Used by:152
Symbol 85 GraphicUses:3Used by:152
Symbol 86 BitmapUsed by:87
Symbol 87 GraphicUses:86Used by:95
Symbol 88 EditableTextUses:17Used by:95
Symbol 89 EditableTextUses:17Used by:95
Symbol 90 EditableTextUses:17Used by:95
Symbol 91 EditableTextUses:17Used by:95
Symbol 92 EditableTextUses:17Used by:95
Symbol 93 TextUses:31Used by:95
Symbol 94 EditableTextUses:31Used by:95
Symbol 95 MovieClip {titleScreen}Uses:87 16 88 89 90 91 92 93 94Used by:152
Symbol 96 GraphicUses:3 77Used by:152
Symbol 97 EditableTextUses:31Used by:98
Symbol 98 MovieClip {com.pointsRecordingBigCup}Uses:16 74 75 97Used by:152
Symbol 99 GraphicUsed by:100
Symbol 100 MovieClip {card}Uses:99Used by:105 152
Symbol 101 EditableTextUses:31Used by:105
Symbol 102 EditableTextUses:31Used by:105
Symbol 103 TextUses:31Used by:105
Symbol 104 TextUses:31Used by:105
Symbol 105 MovieClip {com.highScoresShow}Uses:74 81 75 100 101 102 103 104Used by:152
Symbol 106 GraphicUsed by:107
Symbol 107 MovieClip {maskField}Uses:106Used by:152
Symbol 108 GraphicUsed by:109
Symbol 109 MovieClip {triangleButton}Uses:108Used by:152
Symbol 110 MovieClip {Controls}Used by:152
Symbol 111 BitmapUsed by:112
Symbol 112 GraphicUses:111Used by:113
Symbol 113 ButtonUses:112Used by:115 152
Symbol 114 EditableTextUses:31Used by:115
Symbol 115 MovieClip {buttonMulti}Uses:113 114Used by:152
Symbol 116 EditableTextUses:31Used by:119
Symbol 117 EditableTextUses:31Used by:119
Symbol 118 EditableTextUses:31Used by:119
Symbol 119 MovieClip {classesC}Uses:116 117 118Used by:152
Symbol 120 GraphicUsed by:121 123 138 141 152
Symbol 121 ButtonUses:120Used by:125 152
Symbol 122 GraphicUsed by:125
Symbol 123 ButtonUses:120Used by:125 141
Symbol 124 EditableTextUses:7Used by:125
Symbol 125 MovieClip {clubButtonM}Uses:121 122 123 124Used by:152
Symbol 126 GraphicUsed by:127
Symbol 127 MovieClip {clubNamesMask}Uses:126Used by:152
Symbol 128 BitmapUsed by:129
Symbol 129 GraphicUses:128Used by:152
Symbol 130 EditableTextUses:5Used by:134
Symbol 131 EditableTextUses:5Used by:134
Symbol 132 EditableTextUses:5Used by:134
Symbol 133 EditableTextUses:5Used by:134
Symbol 134 MovieClipUses:130 131 132 133Used by:135
Symbol 135 MovieClip {com.instructions}Uses:75 134 81Used by:152
Symbol 136 EditableTextUses:17Used by:137
Symbol 137 MovieClip {littleInfo}Uses:136Used by:152
Symbol 138 ButtonUses:120Used by:141
Symbol 139 EditableTextUses:7Used by:141
Symbol 140 EditableTextUses:7Used by:141
Symbol 141 MovieClip {round_label}Uses:120 138 123 139 140Used by:152
Symbol 142 EditableTextUses:7Used by:143
Symbol 143 MovieClip {com.showPairs}Uses:16 75 81 142Used by:152
Symbol 144 Button {trianButton}Uses:38Used by:152
Symbol 145 Sound {swoosh2}Used by:152
Symbol 146 Sound {shot}Used by:152
Symbol 147 Sound {ping4}Used by:152
Symbol 148 Sound {odskok}Used by:152
Symbol 149 Sound {gameOver}Used by:152
Symbol 150 Sound {bump}Used by:152
Symbol 151 Sound {mainSoundTrack}Used by:152
Symbol 152 MovieClip {he_fla.assetHolder_1}Uses:27 29 36 39 44 69 73 82 84 85 95 96 98 100 105 107 109 110 113 115 119 121 120 125 127 12 129 135 137 141 143 144 145 146 147 148 149 150 151Used by:Timeline
Symbol 153 GraphicUsed by:154
Symbol 154 MovieClipUses:153Used by:176
Symbol 155 MovieClip {fl.core.ComponentShim}Used by:176
Symbol 156 GraphicUsed by:157
Symbol 157 MovieClip {Button_disabledSkin}Uses:156Used by:176
Symbol 158 GraphicUsed by:159
Symbol 159 MovieClip {Button_downSkin}Uses:158Used by:176
Symbol 160 GraphicUsed by:161
Symbol 161 MovieClip {Button_emphasizedSkin}Uses:160Used by:176
Symbol 162 GraphicUsed by:163
Symbol 163 MovieClip {Button_overSkin}Uses:162Used by:176
Symbol 164 GraphicUsed by:165
Symbol 165 MovieClip {Button_selectedDisabledSkin}Uses:164Used by:176
Symbol 166 GraphicUsed by:167
Symbol 167 MovieClip {Button_selectedDownSkin}Uses:166Used by:176
Symbol 168 GraphicUsed by:169
Symbol 169 MovieClip {Button_selectedOverSkin}Uses:168Used by:176
Symbol 170 GraphicUsed by:171
Symbol 171 MovieClip {Button_selectedUpSkin}Uses:170Used by:176
Symbol 172 GraphicUsed by:173
Symbol 173 MovieClip {Button_upSkin}Uses:172Used by:176
Symbol 174 GraphicUsed by:175
Symbol 175 MovieClip {focusRectSkin}Uses:174Used by:176
Symbol 176 MovieClip {fl.controls.Button}Uses:154 155 157 159 161 163 165 167 169 171 173 175Used by:325
Symbol 177 GraphicUsed by:178
Symbol 178 MovieClip {ball}Uses:177Used by:325
Symbol 179 GraphicUsed by:180
Symbol 180 MovieClip {ball_shadow}Uses:179Used by:325
Symbol 181 GraphicUsed by:182
Symbol 182 MovieClipUses:181Used by:184 325
Symbol 183 TextUses:31Used by:184
Symbol 184 MovieClip {enegryC}Uses:182 183Used by:200 325
Symbol 185 BitmapUsed by:186
Symbol 186 GraphicUses:185Used by:200
Symbol 187 GraphicUsed by:191
Symbol 188 BitmapUsed by:189
Symbol 189 GraphicUses:188Used by:190
Symbol 190 MovieClipUses:189Used by:191
Symbol 191 MovieClip {reklame}Uses:187 190Used by:200
Symbol 192 GraphicUsed by:200
Symbol 193 GraphicUsed by:194
Symbol 194 MovieClip {gol_area_ground}Uses:193Used by:200
Symbol 195 GraphicUsed by:196
Symbol 196 MovieClip {netArea}Uses:195Used by:200
Symbol 197 BitmapUsed by:198 237
Symbol 198 GraphicUses:197Used by:199
Symbol 199 MovieClip {goal_bars}Uses:198Used by:200
Symbol 200 MovieClip {field}Uses:186 191 184 192 194 196 199Used by:325
Symbol 201 GraphicUsed by:231
Symbol 202 BitmapUsed by:203 235
Symbol 203 GraphicUses:202Used by:230
Symbol 204 BitmapUsed by:205 235
Symbol 205 GraphicUses:204Used by:230
Symbol 206 BitmapUsed by:207 235
Symbol 207 GraphicUses:206Used by:230
Symbol 208 BitmapUsed by:209 235
Symbol 209 GraphicUses:208Used by:230
Symbol 210 BitmapUsed by:211 235
Symbol 211 GraphicUses:210Used by:230
Symbol 212 BitmapUsed by:213 235
Symbol 213 GraphicUses:212Used by:230
Symbol 214 BitmapUsed by:215 235
Symbol 215 GraphicUses:214Used by:230
Symbol 216 BitmapUsed by:217 235
Symbol 217 GraphicUses:216Used by:230
Symbol 218 BitmapUsed by:219 235
Symbol 219 GraphicUses:218Used by:230
Symbol 220 BitmapUsed by:221 235
Symbol 221 GraphicUses:220Used by:230
Symbol 222 BitmapUsed by:223 235
Symbol 223 GraphicUses:222Used by:230
Symbol 224 BitmapUsed by:225 235
Symbol 225 GraphicUses:224Used by:230
Symbol 226 BitmapUsed by:227 235
Symbol 227 GraphicUses:226Used by:230
Symbol 228 BitmapUsed by:229 235
Symbol 229 GraphicUses:228Used by:230
Symbol 230 MovieClip {he_fla.zadnja_mreza_60}Uses:203 205 207 209 211 213 215 217 219 221 223 225 227 229Used by:231
Symbol 231 MovieClip {mrezaMC}Uses:201 230Used by:234
Symbol 232 GraphicUsed by:233
Symbol 233 MovieClip {upper_net}Uses:232Used by:234
Symbol 234 MovieClip {goal_net}Uses:231 233Used by:325
Symbol 235 GraphicUses:228 226 224 222 220 218 216 214 212 210 208 206 204 202Used by:325
Symbol 236 TextUses:31Used by:325
Symbol 237 GraphicUses:197Used by:325
Symbol 238 GraphicUsed by:239
Symbol 239 MovieClip {goalkeeper}Uses:238Used by:325
Symbol 240 Bitmap {goalkeeperSheet}Used by:325
Symbol 241 GraphicUsed by:246 325
Symbol 242 GraphicUsed by:243
Symbol 243 MovieClip {indikator_cilja}Uses:242Used by:325
Symbol 244 GraphicUsed by:246
Symbol 245 GraphicUsed by:246
Symbol 246 MovieClip {goalkeeperSprites}Uses:244 241 245Used by:325
Symbol 247 Bitmap {ajax}Used by:325
Symbol 248 Bitmap {arsenal}Used by:325
Symbol 249 Bitmap {boka}Used by:325
Symbol 250 Bitmap {playerSheet}Used by:325
Symbol 251 Bitmap {pola_pola_dijagon}Used by:325
Symbol 252 Bitmap {pola_pola_uzduz}Used by:325
Symbol 253 Bitmap {poprecne}Used by:325
Symbol 254 Bitmap {prazan}Used by:325
Symbol 255 Bitmap {river}Used by:325
Symbol 256 Bitmap {uzduzne_pruge}Used by:325
Symbol 257 GraphicUsed by:268 325
Symbol 258 GraphicUsed by:268 325
Symbol 259 GraphicUsed by:268 325
Symbol 260 GraphicUsed by:268 325
Symbol 261 GraphicUsed by:268 325
Symbol 262 GraphicUsed by:263
Symbol 263 MovieClip {opponent}Uses:262Used by:325
Symbol 264 GraphicUsed by:265
Symbol 265 MovieClip {player}Uses:264Used by:325
Symbol 266 GraphicUsed by:268
Symbol 267 GraphicUsed by:268
Symbol 268 MovieClip {playerSprites}Uses:266 261 260 259 257 258 267Used by:325
Symbol 269 BitmapUsed by:270 271
Symbol 270 GraphicUses:269Used by:325
Symbol 271 GraphicUses:269Used by:272
Symbol 272 MovieClip {goClip}Uses:271Used by:325
Symbol 273 GraphicUsed by:274 276 283 285
Symbol 274 MovieClipUses:273Used by:276
Symbol 275 EditableTextUses:31Used by:276
Symbol 276 ButtonUses:274 275 273Used by:308 325
Symbol 277 BitmapUsed by:278 279
Symbol 278 GraphicUses:277Used by:325
Symbol 279 GraphicUses:277Used by:280
Symbol 280 MovieClip {gooaalClip}Uses:279Used by:325
Symbol 281 BitmapUsed by:282 314
Symbol 282 GraphicUses:281Used by:325
Symbol 283 MovieClipUses:273Used by:285
Symbol 284 EditableTextUses:31Used by:285
Symbol 285 ButtonUses:283 284 273Used by:293 325
Symbol 286 GraphicUsed by:293
Symbol 287 TextUses:31Used by:293
Symbol 288 EditableTextUses:31Used by:293
Symbol 289 EditableTextUses:31Used by:293
Symbol 290 EditableTextUses:31Used by:293
Symbol 291 EditableTextUses:31Used by:293
Symbol 292 EditableTextUses:31Used by:293
Symbol 293 MovieClip {instructionsMC}Uses:286 23 287 288 289 285 290 291 292Used by:294 325
Symbol 294 MovieClip {instructionsMC_pokretni}Uses:293Used by:325
Symbol 295 BitmapUsed by:296 297
Symbol 296 GraphicUses:295Used by:325
Symbol 297 GraphicUses:295Used by:298
Symbol 298 MovieClip {missClip}Uses:297Used by:325
Symbol 299 BitmapUsed by:300 307 314
Symbol 300 GraphicUses:299Used by:325
Symbol 301 GraphicUsed by:302
Symbol 302 MovieClip {podloge}Uses:301Used by:308 313
Symbol 303 EditableTextUses:31Used by:308
Symbol 304 EditableTextUses:31Used by:308
Symbol 305 EditableTextUses:31Used by:308
Symbol 306 EditableTextUses:31Used by:308
Symbol 307 GraphicUses:299Used by:308
Symbol 308 MovieClip {nextShotAnnouncement}Uses:302 303 304 305 306 276 307Used by:325
Symbol 309 GraphicUsed by:310
Symbol 310 MovieClip {podloga_za_tajmer}Uses:309Used by:317 325
Symbol 311 EditableTextUses:31Used by:313
Symbol 312 EditableTextUses:31Used by:313
Symbol 313 MovieClip {semafor}Uses:302 311 312Used by:325
Symbol 314 GraphicUses:299 281Used by:325
Symbol 315 EditableTextUses:31Used by:317
Symbol 316 EditableTextUses:31Used by:317
Symbol 317 MovieClip {qualifiedT}Uses:310 315 316Used by:325
Symbol 318 GraphicUsed by:325
Symbol 319 EditableTextUses:31Used by:325
Symbol 320 Sound {DOOP}Used by:325
Symbol 321 Sound {zvizdukSudija}Used by:325
Symbol 322 Sound {miss}Used by:325
Symbol 323 Sound {odbitak}Used by:325
Symbol 324 Sound {gool}Used by:325
Symbol 325 MovieClip {he_fla.actionHolder_35}Uses:176 178 180 182 184 200 234 235 236 237 239 240 241 243 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 263 265 268 26 25 23 270 272 276 278 280 282 285 293 294 296 298 300 308 21 310 313 314 317 318 319 320 321 322 323 324Used by:Timeline

Instance Names

"loading_txt_shadow"Symbol 13 MovieClip {LoadingBox} Frame 1Symbol 8 EditableText
"loading_txt"Symbol 13 MovieClip {LoadingBox} Frame 1Symbol 10 EditableText
"textBase"Symbol 20 MovieClip {menu2Screen} Frame 1Symbol 16 MovieClip
"menu_info_red_shadow"Symbol 20 MovieClip {menu2Screen} Frame 1Symbol 18 EditableText
"menu_info"Symbol 20 MovieClip {menu2Screen} Frame 1Symbol 19 EditableText
"inft"Symbol 36 MovieClip {clubsInitializing} Frame 1Symbol 32 EditableText
"loading_txt"Symbol 36 MovieClip {clubsInitializing} Frame 1Symbol 35 EditableText
"shirtButton"Symbol 69 MovieClip {shirtGraphics} Frame 1Symbol 48 Button
"shirtBase"Symbol 69 MovieClip {shirtGraphics} Frame 1Symbol 50 MovieClip
"shirtStripes"Symbol 69 MovieClip {shirtGraphics} Frame 1Symbol 65 MovieClip
"buttonBaza"Symbol 81 MovieClip {buttonM} Frame 1Symbol 79 Button
"label2"Symbol 81 MovieClip {buttonM} Frame 1Symbol 80 EditableText
"info"Symbol 82 MovieClip {com.areYouSure} Frame 1Symbol 76 EditableText
"cancelButton"Symbol 82 MovieClip {com.areYouSure} Frame 1Symbol 81 MovieClip {buttonM}
"confirmButton"Symbol 82 MovieClip {com.areYouSure} Frame 1Symbol 81 MovieClip {buttonM}
"textBase"Symbol 95 MovieClip {titleScreen} Frame 1Symbol 16 MovieClip
"menu_info_red_shadow"Symbol 95 MovieClip {titleScreen} Frame 1Symbol 88 EditableText
"menu_info_red_shadow2"Symbol 95 MovieClip {titleScreen} Frame 1Symbol 89 EditableText
"menu_info_red"Symbol 95 MovieClip {titleScreen} Frame 1Symbol 90 EditableText
"menu_info"Symbol 95 MovieClip {titleScreen} Frame 1Symbol 91 EditableText
"menu_info_highlight"Symbol 95 MovieClip {titleScreen} Frame 1Symbol 92 EditableText
"infoText"Symbol 98 MovieClip {com.pointsRecordingBigCup} Frame 1Symbol 97 EditableText
"_closeButton"Symbol 105 MovieClip {com.highScoresShow} Frame 1Symbol 81 MovieClip {buttonM}
"cardShape"Symbol 105 MovieClip {com.highScoresShow} Frame 1Symbol 100 MovieClip {card}
"_closeButton"Symbol 105 MovieClip {com.highScoresShow} Frame 1Symbol 81 MovieClip {buttonM}
"whatsThis"Symbol 105 MovieClip {com.highScoresShow} Frame 1Symbol 101 EditableText
"buttonMultiBaza"Symbol 115 MovieClip {buttonMulti} Frame 1Symbol 113 Button
"label2"Symbol 115 MovieClip {buttonMulti} Frame 1Symbol 114 EditableText
"buttonBaza"Symbol 125 MovieClip {clubButtonM} Frame 1Symbol 121 Button
"label2"Symbol 125 MovieClip {clubButtonM} Frame 1Symbol 124 EditableText
"instrText"Symbol 135 MovieClip {com.instructions} Frame 1Symbol 134 MovieClip
"_closeButton"Symbol 135 MovieClip {com.instructions} Frame 1Symbol 81 MovieClip {buttonM}
"_nextButton"Symbol 135 MovieClip {com.instructions} Frame 1Symbol 81 MovieClip {buttonM}
"_prevButton"Symbol 135 MovieClip {com.instructions} Frame 1Symbol 81 MovieClip {buttonM}
"littleText"Symbol 137 MovieClip {littleInfo} Frame 1Symbol 136 EditableText
"colBox"Symbol 141 MovieClip {round_label} Frame 1Symbol 138 Button
"unvisible"Symbol 141 MovieClip {round_label} Frame 1Symbol 123 Button
"textD"Symbol 141 MovieClip {round_label} Frame 1Symbol 139 EditableText
"roundD"Symbol 141 MovieClip {round_label} Frame 1Symbol 140 EditableText
"_closeButton"Symbol 143 MovieClip {com.showPairs} Frame 1Symbol 81 MovieClip {buttonM}
"_infoText"Symbol 143 MovieClip {com.showPairs} Frame 1Symbol 142 EditableText
"energy_mask"Symbol 184 MovieClip {enegryC} Frame 1Symbol 182 MovieClip
"_energy"Symbol 200 MovieClip {field} Frame 1Symbol 184 MovieClip {enegryC}
"goalArea"Symbol 200 MovieClip {field} Frame 1Symbol 194 MovieClip {gol_area_ground}
"_netArea"Symbol 200 MovieClip {field} Frame 1Symbol 196 MovieClip {netArea}
"goalBars"Symbol 200 MovieClip {field} Frame 1Symbol 199 MovieClip {goal_bars}
"_zadnja_mreza"Symbol 231 MovieClip {mrezaMC} Frame 1Symbol 230 MovieClip {he_fla.zadnja_mreza_60}
"_obavestenjeSenka"Symbol 293 MovieClip {instructionsMC} Frame 1Symbol 288 EditableText
"_obavestenje"Symbol 293 MovieClip {instructionsMC} Frame 1Symbol 289 EditableText
"startButton"Symbol 293 MovieClip {instructionsMC} Frame 1Symbol 285 Button
"akciona_poruka"Symbol 293 MovieClip {instructionsMC} Frame 1Symbol 290 EditableText
"_myTeam"Symbol 293 MovieClip {instructionsMC} Frame 1Symbol 291 EditableText
"_hisTeam"Symbol 293 MovieClip {instructionsMC} Frame 1Symbol 292 EditableText
"instr_baza"Symbol 294 MovieClip {instructionsMC_pokretni} Frame 1Symbol 293 MovieClip {instructionsMC}
"_obavestenjeSenka"Symbol 308 MovieClip {nextShotAnnouncement} Frame 1Symbol 303 EditableText
"_obavestenje"Symbol 308 MovieClip {nextShotAnnouncement} Frame 1Symbol 304 EditableText
"nextShotDugme"Symbol 308 MovieClip {nextShotAnnouncement} Frame 1Symbol 276 Button
"_podloga"Symbol 313 MovieClip {semafor} Frame 1Symbol 302 MovieClip {podloge}
"_statistikeSenka"Symbol 313 MovieClip {semafor} Frame 1Symbol 311 EditableText
"_statistike"Symbol 313 MovieClip {semafor} Frame 1Symbol 312 EditableText

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata not present, AS3.

Labels

"please_wait"Symbol 105 MovieClip {com.highScoresShow} Frame 1
"forbidden"Symbol 105 MovieClip {com.highScoresShow} Frame 2
"error"Symbol 105 MovieClip {com.highScoresShow} Frame 3
"tables"Symbol 105 MovieClip {com.highScoresShow} Frame 4




http://swfchan.com/44/216277/info.shtml
Created: 11/1 -2019 04:46:33 Last modified: 11/1 -2019 04:46:33 Server time: 22/12 -2024 02:16:33