Section 1
//KeyPoll (bigroom.input.KeyPoll)
package bigroom.input {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class KeyPoll {
private var states:ByteArray;
private var dispObj:DisplayObject;
public function KeyPoll(_arg1:DisplayObject){
states = new ByteArray();
states.writeUnsignedInt(0);
states.writeUnsignedInt(0);
states.writeUnsignedInt(0);
states.writeUnsignedInt(0);
states.writeUnsignedInt(0);
states.writeUnsignedInt(0);
states.writeUnsignedInt(0);
states.writeUnsignedInt(0);
dispObj = _arg1;
dispObj.addEventListener(KeyboardEvent.KEY_DOWN, keyDownListener, false, 0, true);
dispObj.addEventListener(KeyboardEvent.KEY_UP, keyUpListener, false, 0, true);
dispObj.addEventListener(Event.ACTIVATE, activateListener, false, 0, true);
dispObj.addEventListener(Event.DEACTIVATE, deactivateListener, false, 0, true);
}
private function activateListener(_arg1:Event):void{
var _local2:int;
while (_local2 < 8) {
states[_local2] = 0;
_local2++;
};
}
private function deactivateListener(_arg1:Event):void{
var _local2:int;
while (_local2 < 8) {
states[_local2] = 0;
_local2++;
};
}
public function isDown(_arg1:uint):Boolean{
return (!(((states[(_arg1 >>> 3)] & (1 << (_arg1 & 7))) == 0)));
}
private function keyDownListener(_arg1:KeyboardEvent):void{
states[(_arg1.keyCode >>> 3)] = (states[(_arg1.keyCode >>> 3)] | (1 << (_arg1.keyCode & 7)));
}
public function isUp(_arg1:uint):Boolean{
return (((states[(_arg1 >>> 3)] & (1 << (_arg1 & 7))) == 0));
}
private function keyUpListener(_arg1:KeyboardEvent):void{
states[(_arg1.keyCode >>> 3)] = (states[(_arg1.keyCode >>> 3)] & ~((1 << (_arg1.keyCode & 7))));
}
}
}//package bigroom.input
Section 2
//Audio (bigroom.tetris.Audio)
package bigroom.tetris {
import bigroom.tetris.*;
import flash.utils.*;
import flash.media.*;
class Audio {
private var _tetradMoved:Sound;// = null
private var _tetradLanded:Sound;// = null
private var _soundOn:Boolean;// = true
private var _removeLine:Sound;// = null
function Audio(_arg1:String=null, _arg2:String=null, _arg3:String=null){
var _local4:Class;
super();
if (_arg1 != null){
_local4 = (getDefinitionByName(_arg1) as Class);
_removeLine = new (_local4);
};
if (_arg2 != null){
_local4 = (getDefinitionByName(_arg2) as Class);
_tetradLanded = new (_local4);
};
if (_arg3 != null){
_local4 = (getDefinitionByName(_arg3) as Class);
_tetradMoved = new (_local4);
};
}
function onLinesRemoved(_arg1:TetrisEvent):void{
if (((!((_removeLine == null))) && (_soundOn))){
_removeLine.play(0, 1);
};
}
function onTetradMoved(_arg1:TetrisEvent):void{
if (((!((_tetradMoved == null))) && (_soundOn))){
_tetradMoved.play();
};
}
function get soundOn():Boolean{
return (_soundOn);
}
function onTetradLanded(_arg1:TetrisEvent):void{
if (((!((_tetradLanded == null))) && (_soundOn))){
_tetradLanded.play();
};
}
function set soundOn(_arg1:Boolean):void{
_soundOn = _arg1;
}
}
}//package bigroom.tetris
Section 3
//Cell (bigroom.tetris.Cell)
package bigroom.tetris {
class Cell {
var state:CellState;
var location:CellPos;
function Cell(_arg1:CellPos, _arg2:CellState){
location = _arg1;
state = _arg2;
}
}
}//package bigroom.tetris
Section 4
//CellPos (bigroom.tetris.CellPos)
package bigroom.tetris {
class CellPos {
var x:Number;
var y:Number;
function CellPos(_arg1:Number, _arg2:Number){
x = _arg1;
y = _arg2;
}
function rotateLeft():CellPos{
return (new CellPos(y, -(x)));
}
function rotateLeftOffset():CellPos{
return (new CellPos(y, (1 - x)));
}
function rotateRight():CellPos{
return (new CellPos(-(y), x));
}
function assign(_arg1:CellPos):CellPos{
if (this != _arg1){
x = _arg1.x;
y = _arg1.y;
};
return (this);
}
static function sum(_arg1:CellPos, _arg2:CellPos):CellPos{
return (new CellPos((_arg1.x + _arg2.x), (_arg1.y + _arg2.y)));
}
}
}//package bigroom.tetris
Section 5
//CellState (bigroom.tetris.CellState)
package bigroom.tetris {
class CellState {
var shape:Shape;
var number:uint;
var rotation:int;
function CellState(_arg1:Shape, _arg2:uint, _arg3:int){
shape = _arg1;
number = _arg2;
rotation = _arg3;
}
}
}//package bigroom.tetris
Section 6
//Config (bigroom.tetris.Config)
package bigroom.tetris {
public class Config {
public var acceleration:Number;// = 1
public var tetradS:String;// = null
public var tetradT:String;// = null
public var tetradF:String;// = null
public var startSpeed:Number;// = 400
public var keyLeft:uint;// = 0
public var keyRotRight:uint;// = 0
public var tetradZ:String;// = null
public var tetradL:String;// = null
public var keyRight:uint;// = 0
public var keyRotLeft:uint;// = 0
public var gameX:uint;// = 0
public var gameY:uint;// = 0
public var blockSize:uint;// = 0
public var scorePerLine:uint;// = 10
public var lvlupLines:int;// = 10
public var nextX:uint;// = 0
public var nextY:uint;// = 0
public var sndTetradMove:String;// = null
public var sndRemoveLine:String;// = null
public var sndTetradLand:String;// = null
public var keyDrop:uint;// = 0
public var playWidth:uint;// = 0
public var tetradI:String;// = null
public var playHeight:uint;// = 0
public var tetradO:String;// = null
}
}//package bigroom.tetris
Section 7
//Controller (bigroom.tetris.Controller)
package bigroom.tetris {
import flash.events.*;
import flash.display.*;
import bigroom.input.*;
import flash.utils.*;
public class Controller extends EventDispatcher {
private var _view:View;
private var _keyTimer:Timer;
private var _speed:Number;
private var level:int;
private var rootScene:Sprite;
private var _next:NextTetrad;
private var _score:uint;
private var _audio:Audio;
private var _key:KeyPoll;
private var _config:Config;
private var _clip:Sprite;
private var _playTimer:Timer;
private var _tetris:Tetris;
public var counter:int;// = 0
private var isSpeed:Boolean;// = false
private var lines:uint;
public function Controller(_arg1:Sprite, _arg2:Config){
rootScene = _arg1;
_config = _arg2;
var _local3:Object = {L:_arg2.tetradL, O:_arg2.tetradO, F:_arg2.tetradF, T:_arg2.tetradT, S:_arg2.tetradS, Z:_arg2.tetradZ, I:_arg2.tetradI};
_clip = new Sprite();
_arg1.addChild(_clip);
_clip.x = _config.gameX;
_clip.y = _config.gameY;
_view = new View(_clip, _config.playWidth, _config.playHeight, _config.blockSize, _local3);
_tetris = new Tetris(_config.playWidth, _config.playHeight);
_audio = new Audio(_config.sndRemoveLine, _config.sndTetradLand, _config.sndTetradMove);
var _local4:Sprite = new Sprite();
_arg1.addChild(_local4);
_local4.x = _config.nextX;
_local4.y = _config.nextY;
_next = new NextTetrad(_local4, _config.blockSize, _local3);
_tetris.addEventListener(TetrisEvent.LINES_REMOVED, onLinesRemoved, false, 0, true);
_tetris.addEventListener(TetrisEvent.GAME_OVER, onGameOver, false, 0, true);
_tetris.addEventListener(TetrisEvent.UPDATE_NEXT, onUpdateNext, false, 0, true);
_tetris.addEventListener(TetrisEvent.UPDATE_CELLS, _view.onUpdateCells, false, 0, true);
_tetris.addEventListener(TetrisEvent.TETRAD_LANDED, _audio.onTetradLanded, false, 0, true);
_tetris.addEventListener(TetrisEvent.LINES_REMOVED, _audio.onLinesRemoved, false, 0, true);
_tetris.addEventListener(TetrisEvent.TETRAD_MOVED, _audio.onTetradMoved, false, 0, true);
_tetris.addEventListener(TetrisEvent.UPDATE_NEXT, _next.onUpdateNext, false, 0, true);
_key = new KeyPoll(_arg1.stage);
_arg1.stage.focus = _arg1.stage;
_playTimer = new Timer(_config.startSpeed);
_playTimer.addEventListener(TimerEvent.TIMER, stepGame, false, 0, true);
_keyTimer = new Timer((_config.startSpeed * 20));
_keyTimer.addEventListener(TimerEvent.TIMER, testKeys, false, 0, true);
}
public function playGame():void{
_playTimer.delay = _speed;
if (!_playTimer.running){
_playTimer.start();
};
_keyTimer.delay = (_speed * 0.04);
if (!_keyTimer.running){
_keyTimer.start();
};
_clip.stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
_clip.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown, false, 0, true);
}
private function onKeyDown(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case _config.keyRotLeft:
_tetris.rotateLeft();
break;
case _config.keyRotRight:
_tetris.rotateRight();
break;
case _config.keyLeft:
_tetris.shiftLeft();
break;
case _config.keyRight:
_tetris.shiftRight();
break;
};
}
private function onLinesRemoved(_arg1:TetrisEvent):void{
lines = _arg1.lines;
var _local2:int = _arg1.lines;
counter = (counter + _arg1.lines);
_score = (_score + (Math.pow(_arg1.lines, 2) * _config.scorePerLine));
if (counter >= _config.lvlupLines){
isSpeed = true;
level++;
_speed = (_speed - 40);
changeSpeed();
counter = (counter - _config.lvlupLines);
} else {
isSpeed = false;
};
scoreChange();
dispatchEvent(_arg1);
}
public function get soundOn():Boolean{
return (_audio.soundOn);
}
public function get score():uint{
return (_score);
}
private function onUpdateNext(_arg1:TetrisEvent):void{
dispatchEvent(_arg1);
}
public function set soundOn(_arg1:Boolean):void{
_audio.soundOn = _arg1;
}
public function get speed1():Number{
return (_speed);
}
private function stepGame(_arg1:TimerEvent):void{
_tetris.stepGame();
}
public function clearnAll():void{
_clip.visible = false;
}
private function scoreChange():void{
var _local1:TetrisEvent = new TetrisEvent(TetrisEvent.SCORE_CHANGE);
_local1.score = _score;
_local1.speed1 = _speed;
_local1.lines = lines;
_local1.counter = counter;
_local1.isSpeed = isSpeed;
_local1.level = level;
dispatchEvent(_local1);
}
private function onGameOver(_arg1:TetrisEvent):void{
pauseGame();
dispatchEvent(_arg1);
}
private function testKeys(_arg1:TimerEvent):void{
if (_key.isDown(_config.keyDrop)){
_tetris.drop();
};
}
public function startGame():void{
_clip.visible = true;
level = 1;
lines = 0;
_score = 0;
_speed = 800;
scoreChange();
_view.clearCells();
_speed = _config.startSpeed;
_tetris.restart();
playGame();
}
public function pauseGame():void{
_playTimer.stop();
_keyTimer.stop();
_clip.stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
}
private function changeSpeed():void{
_playTimer.delay = _speed;
}
}
}//package bigroom.tetris
Section 8
//Controller_Sprint (bigroom.tetris.Controller_Sprint)
package bigroom.tetris {
import flash.events.*;
import flash.display.*;
import bigroom.input.*;
import flash.utils.*;
public class Controller_Sprint extends EventDispatcher {
private var _view:View;
private var _keyTimer:Timer;
private var _speed:Number;
private var _next:NextTetrad;
private var _score:uint;
private var _audio:Audio;
private var _key:KeyPoll;
private var _config:Config;
private var _clip:Sprite;
private var _playTimer:Timer;
private var _tetris:Tetris;
public var counter:uint;// = 0
private var isSpeed:Boolean;// = false
private var lines:uint;
public function Controller_Sprint(_arg1:Sprite, _arg2:Config){
_config = _arg2;
var _local3:Object = {L:_arg2.tetradL, O:_arg2.tetradO, F:_arg2.tetradF, T:_arg2.tetradT, S:_arg2.tetradS, Z:_arg2.tetradZ, I:_arg2.tetradI};
_clip = new Sprite();
_arg1.addChild(_clip);
_clip.x = _config.gameX;
_clip.y = _config.gameY;
_view = new View(_clip, _config.playWidth, _config.playHeight, _config.blockSize, _local3);
_tetris = new Tetris(_config.playWidth, _config.playHeight);
_audio = new Audio(_config.sndRemoveLine, _config.sndTetradLand, _config.sndTetradMove);
var _local4:Sprite = new Sprite();
_arg1.addChild(_local4);
_local4.x = _config.nextX;
_local4.y = _config.nextY;
_next = new NextTetrad(_local4, _config.blockSize, _local3);
_tetris.addEventListener(TetrisEvent.LINES_REMOVED, onLinesRemoved, false, 0, true);
_tetris.addEventListener(TetrisEvent.GAME_OVER, onGameOver, false, 0, true);
_tetris.addEventListener(TetrisEvent.UPDATE_NEXT, onUpdateNext, false, 0, true);
_tetris.addEventListener(TetrisEvent.UPDATE_CELLS, _view.onUpdateCells, false, 0, true);
_tetris.addEventListener(TetrisEvent.TETRAD_LANDED, _audio.onTetradLanded, false, 0, true);
_tetris.addEventListener(TetrisEvent.LINES_REMOVED, _audio.onLinesRemoved, false, 0, true);
_tetris.addEventListener(TetrisEvent.TETRAD_MOVED, _audio.onTetradMoved, false, 0, true);
_tetris.addEventListener(TetrisEvent.UPDATE_NEXT, _next.onUpdateNext, false, 0, true);
_key = new KeyPoll(_arg1.stage);
_arg1.stage.focus = _arg1.stage;
_playTimer = new Timer(10);
_playTimer.addEventListener(TimerEvent.TIMER, stepGame, false, 0, true);
_keyTimer = new Timer((_config.startSpeed * 0.2));
_keyTimer.addEventListener(TimerEvent.TIMER, testKeys, false, 0, true);
}
public function playGame():void{
_playTimer.delay = _speed;
_playTimer.start();
_keyTimer.delay = (_speed * 0.04);
_keyTimer.start();
_clip.stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
_clip.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown, false, 0, true);
}
private function onKeyDown(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case _config.keyRotLeft:
_tetris.rotateLeft();
break;
case _config.keyRotRight:
_tetris.rotateRight();
break;
case _config.keyLeft:
_tetris.shiftLeft();
break;
case _config.keyRight:
_tetris.shiftRight();
break;
};
}
private function onLinesRemoved(_arg1:TetrisEvent):void{
lines = _arg1.lines;
counter = (counter + _arg1.lines);
_score = (_score + (Math.pow(_arg1.lines, 2) * _config.scorePerLine));
if (counter >= _config.lvlupLines){
isSpeed = true;
_speed = (_speed - 40);
_playTimer.delay = _speed;
counter = (counter - _config.lvlupLines);
} else {
isSpeed = false;
};
scoreChange();
dispatchEvent(_arg1);
}
public function get soundOn():Boolean{
return (_audio.soundOn);
}
public function get speed1():Number{
return (_speed);
}
public function get score():uint{
return (_score);
}
private function onUpdateNext(_arg1:TetrisEvent):void{
dispatchEvent(_arg1);
}
public function set soundOn(_arg1:Boolean):void{
_audio.soundOn = _arg1;
}
private function scoreChange():void{
var _local1:TetrisEvent = new TetrisEvent(TetrisEvent.SCORE_CHANGE);
_local1.score = _score;
_local1.lines = lines;
_local1.isSpeed = isSpeed;
dispatchEvent(_local1);
}
private function stepGame(_arg1:TimerEvent):void{
_tetris.stepGame();
}
public function clearnAll():void{
_clip.visible = false;
}
public function pauseGame():void{
_playTimer.stop();
_keyTimer.stop();
_clip.stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
}
private function onGameOver(_arg1:TetrisEvent):void{
pauseGame();
dispatchEvent(_arg1);
}
private function testKeys(_arg1:TimerEvent):void{
if (_key.isDown(_config.keyDrop)){
_tetris.drop();
};
}
public function startGame():void{
lines = 0;
_clip.visible = true;
_score = 0;
_speed = 800;
scoreChange();
_view.clearCells();
_speed = _config.startSpeed;
_tetris.restart();
playGame();
}
}
}//package bigroom.tetris
Section 9
//NextTetrad (bigroom.tetris.NextTetrad)
package bigroom.tetris {
import flash.display.*;
import bigroom.tetris.*;
import flash.utils.*;
class NextTetrad {
private var _sprites:Object;
private var _blocksize:uint;
private var _clip:Sprite;
function NextTetrad(_arg1:Sprite, _arg2:uint, _arg3:Object):void{
_clip = _arg1;
_blocksize = _arg2;
_sprites = _arg3;
}
function onUpdateNext(_arg1:TetrisEvent):void{
var _local2:Class = (getDefinitionByName(_sprites[_arg1.shape.label]) as Class);
trace(("id:" + _local2));
var _local3:Sprite = new (_local2);
while (_clip.numChildren) {
_clip.removeChildAt(0);
};
_clip.addChild(_local3);
_local3.x = ((2 * _blocksize) - (_local3.width * 0.5));
_local3.y = (_blocksize - (_local3.height * 0.5));
}
}
}//package bigroom.tetris
Section 10
//Shape (bigroom.tetris.Shape)
package bigroom.tetris {
class Shape {
var label:String;
static var I:Shape = new Shape("I");
;
static var L:Shape = new Shape("L");
;
static var F:Shape = new Shape("F");
;
static var OUT:Shape = new Shape("OUT");
;
static var O:Shape = new Shape("O");
;
static var S:Shape = new Shape("S");
;
static var T:Shape = new Shape("T");
;
static var CURRENT:Shape = new Shape("CURRENT");
;
static var Z:Shape = new Shape("Z");
;
static var CLEAR:Shape = new Shape("CLEAR");
;
function Shape(_arg1:String){
label = _arg1;
}
}
}//package bigroom.tetris
Section 11
//Tetrad (bigroom.tetris.Tetrad)
package bigroom.tetris {
import bigroom.tetris.*;
class Tetrad {
private var _points:Array;
private var _shape:Shape;
private var _location:CellPos;
private var _tetris:Tetris;
private var _rotation:int;
function Tetrad(_arg1:Tetris, _arg2:Shape=null){
_tetris = _arg1;
_points = new Array();
reset(_arg2);
}
function shiftLeft():void{
moveTo(CellPos.sum(_location, new CellPos(-1, 0)), _points, _rotation);
}
function get shape():Shape{
return (_shape);
}
private function atBottom():void{
_tetris.tetradLanded();
}
private function getRandomShape():Shape{
return ([Shape.I, Shape.O, Shape.T, Shape.Z, Shape.S, Shape.L, Shape.F][Math.floor((7 * Math.random()))]);
}
private function moveTo(_arg1:CellPos, _arg2:Array, _arg3:int):Boolean{
if (!canMoveTo(_arg1, _arg2)){
return (false);
};
var _local4:Array = getCells();
var _local5:uint;
while (_local5 < 4) {
_local4[_local5].state.shape = Shape.CLEAR;
_local4[_local5].state.number = 0;
_local5++;
};
_location = _arg1;
_points = _arg2;
_rotation = _arg3;
_local4 = _local4.concat(getCells());
_tetris.tetradMoved(_local4);
return (true);
}
function rotateLeft():void{
var _local2:uint;
var _local1:Array = new Array();
if (_shape == Shape.O){
_local2 = 0;
while (_local2 < 4) {
_local1.push(_points[_local2].rotateLeftOffset());
_local2++;
};
} else {
_local2 = 0;
while (_local2 < 4) {
_local1.push(_points[_local2].rotateLeft());
_local2++;
};
};
moveTo(_location, _local1, (_rotation - 90));
}
function shiftRight():void{
moveTo(CellPos.sum(_location, new CellPos(1, 0)), _points, _rotation);
}
function reset(_arg1:Shape=null):void{
if (_arg1 == null){
_arg1 = getRandomShape();
};
_shape = _arg1;
_location = new CellPos(0, 0);
_rotation = 0;
_points.length = 0;
switch (_shape){
case Shape.I:
_points.push(new CellPos(-1, 0), new CellPos(0, 0), new CellPos(1, 0), new CellPos(2, 0));
break;
case Shape.O:
_points.push(new CellPos(0, 0), new CellPos(1, 0), new CellPos(0, 1), new CellPos(1, 1));
break;
case Shape.T:
_points.push(new CellPos(-1, 0), new CellPos(0, 0), new CellPos(1, 0), new CellPos(0, 1));
break;
case Shape.S:
_points.push(new CellPos(0, 0), new CellPos(1, 0), new CellPos(-1, 1), new CellPos(0, 1));
break;
case Shape.Z:
_points.push(new CellPos(-1, 0), new CellPos(0, 0), new CellPos(0, 1), new CellPos(1, 1));
break;
case Shape.L:
_points.push(new CellPos(-1, 0), new CellPos(0, 0), new CellPos(1, 0), new CellPos(-1, 1));
break;
case Shape.F:
_points.push(new CellPos(-1, 0), new CellPos(0, 0), new CellPos(1, 0), new CellPos(1, 1));
break;
};
}
function setLocation(_arg1:CellPos):Boolean{
if (!canMoveTo(_arg1, _points)){
return (false);
};
_location.assign(_arg1);
_tetris.tetradMoved(getCells());
return (true);
}
function rotateRight():void{
var _local1:Array = new Array();
var _local2:Number = 0;
while (_local2 < 4) {
_local1.push(_points[_local2].rotateRight());
_local2++;
};
moveTo(_location, _local1, (_rotation + 90));
}
function getCells():Array{
var _local1:Array = new Array();
var _local2:uint;
while (_local2 < 4) {
_local1.push(new Cell(CellPos.sum(_location, _points[_local2]), new CellState(Shape.CURRENT, _local2, _rotation)));
_local2++;
};
return (_local1);
}
private function canMoveTo(_arg1:CellPos, _arg2:Array):Boolean{
var _local3:uint;
while (_local3 < 4) {
if (!_tetris.isCellClear(CellPos.sum(_arg2[_local3], _arg1))){
return (false);
};
_local3++;
};
return (true);
}
function drop():void{
if (!moveTo(CellPos.sum(_location, new CellPos(0, 1)), _points, _rotation)){
atBottom();
};
}
}
}//package bigroom.tetris
Section 12
//Tetris (bigroom.tetris.Tetris)
package bigroom.tetris {
import flash.events.*;
import bigroom.tetris.*;
class Tetris extends EventDispatcher {
private var _nextTetrad:Tetrad;
private var _height:uint;
private var _width:uint;
private var _board:Array;
private var _nextTetrad1:Tetrad;
private var _tetrad:Tetrad;
private var _startx:uint;
private var linesToRemove:Array;
function Tetris(_arg1:uint, _arg2:uint){
var _local4:uint;
super();
_width = _arg1;
_height = _arg2;
_startx = Math.floor(((_width - 1) * 0.5));
_board = new Array();
var _local3:uint;
while (_local3 < _width) {
_board[_local3] = new Array();
_local4 = 0;
while (_local4 < _height) {
_board[_local3][_local4] = new CellState(Shape.CLEAR, 0, 0);
_local4++;
};
_local3++;
};
_tetrad = new Tetrad(this);
_nextTetrad = new Tetrad(this);
trace(("this" + this));
}
function rotateRight():void{
_tetrad.rotateRight();
}
function rotateLeft():void{
_tetrad.rotateLeft();
}
function tetradLanded():void{
var _local1:Array = _tetrad.getCells();
var _local2:Shape = _tetrad.shape;
var _local3:uint = _local1.length;
while (_local3--) {
_local1[_local3].state.shape = _local2;
_board[_local1[_local3].location.x][_local1[_local3].location.y] = _local1[_local3].state;
};
dispatchEvent(new TetrisEvent(TetrisEvent.TETRAD_LANDED));
removeLines();
newTetrad();
}
private function reset():void{
var _local3:Number;
var _local1:Number = 0;
while (_local1 < _width) {
_local3 = 0;
while (_local3 < _height) {
_board[_local1][_local3] = new CellState(Shape.CLEAR, 0, 0);
_local3++;
};
_local1++;
};
_tetrad.reset();
_nextTetrad.reset();
var _local2:TetrisEvent = new TetrisEvent(TetrisEvent.UPDATE_NEXT);
_local2.shape = _nextTetrad.shape;
dispatchEvent(_local2);
}
function isCellClear(_arg1:CellPos):Boolean{
var _local2:Shape = getCellShape(_arg1);
return ((((_local2 == Shape.CLEAR)) || ((_local2 == Shape.CURRENT))));
}
function newTetrad():void{
_tetrad.reset(_nextTetrad.shape);
_nextTetrad.reset();
var _local1:TetrisEvent = new TetrisEvent(TetrisEvent.UPDATE_NEXT);
_local1.shape = _nextTetrad.shape;
dispatchEvent(_local1);
moveTetradToStart();
}
function restart():void{
reset();
newTetrad();
}
private function updateCells(_arg1:Array):void{
var _local2:uint;
while (_local2 < _arg1.length) {
_board[_arg1[_local2].location.x][_arg1[_local2].location.y] = _arg1[_local2].state;
if (_arg1[_local2].state.shape == Shape.CURRENT){
_arg1[_local2].state = new CellState(_tetrad.shape, _arg1[_local2].state.number, _arg1[_local2].state.rotation);
};
_local2++;
};
var _local3:TetrisEvent = new TetrisEvent(TetrisEvent.UPDATE_CELLS);
_local3.cells = _arg1;
_local3.removeArray = linesToRemove;
linesToRemove = new Array();
dispatchEvent(_local3);
}
function tetradMoved(_arg1:Array):void{
updateCells(_arg1);
dispatchEvent(new TetrisEvent(TetrisEvent.TETRAD_MOVED));
}
private function removeLines():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local5:Boolean;
var _local6:Array;
var _local7:TetrisEvent;
var _local8:Number;
var _local9:Number;
linesToRemove = new Array();
_local2 = _height;
while (_local2--) {
_local5 = true;
_local1 = _width;
while (_local1--) {
if (isCellClear(new CellPos(_local1, _local2))){
_local5 = false;
break;
};
};
if (_local5){
linesToRemove.push(_local2);
};
};
var _local4:uint = linesToRemove.length;
if (_local4){
_local6 = new Array();
_local1 = 1;
while (_local1 <= _local4) {
_local8 = (linesToRemove[(_local1 - 1)] - 1);
_local9 = ((_local1 == _local4)) ? 0 : (linesToRemove[_local1] + 1);
_local2 = _local8;
while (_local2 >= _local9) {
_local3 = 0;
while (_local3 < _width) {
_local6.push(new Cell(new CellPos(_local3, (_local2 + _local1)), _board[_local3][_local2]));
_local3++;
};
_local2--;
};
_local1++;
};
_local2 = _local4;
while (_local2--) {
_local3 = 0;
while (_local3 < _width) {
if (_board[_local3][_local2] != Shape.CLEAR){
_local6.push(new Cell(new CellPos(_local3, _local2), new CellState(Shape.CLEAR, 0, 0)));
};
_local3++;
};
};
updateCells(_local6);
_local7 = new TetrisEvent(TetrisEvent.LINES_REMOVED);
_local7.lines = _local4;
_local7.removeArray = linesToRemove;
dispatchEvent(_local7);
};
}
function stepGame():void{
_tetrad.drop();
}
private function moveTetradToStart():void{
if (!_tetrad.setLocation(new CellPos(_startx, 0))){
dispatchEvent(new TetrisEvent(TetrisEvent.GAME_OVER));
};
}
function shiftLeft():void{
_tetrad.shiftLeft();
}
function drop():void{
_tetrad.drop();
}
private function getCellShape(_arg1:CellPos):Shape{
if ((((((((_arg1.x < 0)) || ((_arg1.x >= _width)))) || ((_arg1.y < 0)))) || ((_arg1.y >= _height)))){
return (Shape.OUT);
};
return (_board[_arg1.x][_arg1.y].shape);
}
function shiftRight():void{
_tetrad.shiftRight();
}
}
}//package bigroom.tetris
Section 13
//TetrisEvent (bigroom.tetris.TetrisEvent)
package bigroom.tetris {
import flash.events.*;
public class TetrisEvent extends Event {
public var shape:Shape;
public var level:int;
public var cells:Array;
public var score:uint;
public var removeArray:Array;
public var speed1:Number;
public var counter:int;
public var isSpeed:Boolean;
public var lines:uint;
public static const LINES_REMOVED:String = "linesRemoved";
public static const GAME_OVER:String = "gameOver";
public static const TETRAD_MOVED:String = "tetradMoved";
public static const UPDATE_NEXT:String = "updateNext";
public static const TETRAD_LANDED:String = "tetradLanded";
public static const UPDATE_CELLS:String = "updateCells";
public static const SCORE_CHANGE:String = "tetradMoved";
public function TetrisEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
removeArray = new Array();
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
var _local1:TetrisEvent = new TetrisEvent(type, bubbles, cancelable);
_local1.shape = shape;
_local1.lines = lines;
_local1.cells = cells;
_local1.score = score;
_local1.speed1 = speed1;
_local1.level = level;
return (_local1);
}
}
}//package bigroom.tetris
Section 14
//View (bigroom.tetris.View)
package bigroom.tetris {
import flash.events.*;
import flash.display.*;
import bigroom.tetris.*;
import flash.utils.*;
class View {
private var _size:uint;
private var _height:uint;
private var _width:uint;
private var f_Array:Array;
private var _sprites:Object;
private var _cells:Array;
private var _clip:Sprite;
function View(_arg1:Sprite, _arg2:uint, _arg3:uint, _arg4:uint, _arg5:Object){
var _local9:uint;
var _local10:Sprite;
var _local11:Sprite;
f_Array = new Array();
super();
_clip = _arg1;
_width = _arg2;
_height = _arg3;
_size = _arg4;
_sprites = _arg5;
var _local6:uint;
var _local7:Number = (_size * 0.5);
_cells = new Array();
var _local8:uint;
while (_local8 < _width) {
_cells[_local8] = new Array();
_local9 = 0;
while (_local9 < _height) {
_local10 = new Sprite();
_local10.x = ((_size * _local8) + _local7);
_local10.y = ((_size * _local9) + _local7);
_local11 = new Sprite();
_local11.graphics.beginFill(0);
_local11.graphics.drawRect(0, 0, _size, _size);
_local11.x = (_size * _local8);
_local11.y = (_size * _local9);
_local6++;
_clip.addChild(_local10);
_clip.addChild(_local11);
_local10.mask = _local11;
_cells[_local8][_local9] = _local10;
_local9++;
};
_local8++;
};
}
public function flame_handel(_arg1:Event):void{
var _local2:MovieClip = MovieClip(_arg1.currentTarget);
if (_local2.box.currentFrame == _local2.box.totalFrames){
_local2.removeEventListener(Event.ENTER_FRAME, flame_handel);
_clip.removeChild(_local2);
};
}
function onUpdateCells(_arg1:TetrisEvent):void{
var _local4:int;
var _local5:int;
var _local6:*;
var _local7:MovieClip;
var _local8:Cell;
var _local9:Class;
var _local10:Sprite;
if (_arg1.removeArray != null){
if (_arg1.removeArray.length > 0){
_local4 = 0;
while (_local4 < _arg1.removeArray.length) {
_local5 = (_local4 + 1);
_local6 = getDefinitionByName(("Frame" + _local5));
_local7 = new (_local6);
_local7.box.gotoAndPlay(1);
_local7.y = (_size * _arg1.removeArray[_local4]);
if ((((_local4 == 1)) || ((_local4 == 3)))){
_local7.x = (_size * _width);
};
_local7.height;
_local7.addEventListener(Event.ENTER_FRAME, flame_handel);
_clip.addChild(_local7);
_local4++;
};
};
};
var _local2:Number = (_size * 0.5);
var _local3:uint;
while (_local3 < _arg1.cells.length) {
_local8 = _arg1.cells[_local3];
if (_local8.state.shape == Shape.CLEAR){
clearCell(_cells[_local8.location.x][_local8.location.y]);
} else {
clearCell(_cells[_local8.location.x][_local8.location.y]);
_local9 = (getDefinitionByName(_sprites[_local8.state.shape.label]) as Class);
_local10 = new (_local9);
_cells[_local8.location.x][_local8.location.y].addChild(_local10);
switch (_local8.state.shape){
case Shape.I:
switch (_local8.state.number){
case 0:
_local10.x = -(_local2);
_local10.y = -(_local2);
break;
case 1:
_local10.x = (-(_size) - _local2);
_local10.y = -(_local2);
break;
case 2:
_local10.x = ((-2 * _size) - _local2);
_local10.y = -(_local2);
break;
case 3:
_local10.x = ((-3 * _size) - _local2);
_local10.y = -(_local2);
break;
};
break;
case Shape.O:
switch (_local8.state.number){
case 0:
_local10.x = -(_local2);
_local10.y = -(_local2);
break;
case 1:
_local10.x = (-(_size) - _local2);
_local10.y = -(_local2);
break;
case 2:
_local10.x = -(_local2);
_local10.y = (-(_size) - _local2);
break;
case 3:
_local10.x = (-(_size) - _local2);
_local10.y = (-(_size) - _local2);
break;
};
break;
case Shape.T:
switch (_local8.state.number){
case 0:
_local10.x = -(_local2);
_local10.y = -(_local2);
break;
case 1:
_local10.x = (-(_size) - _local2);
_local10.y = -(_local2);
break;
case 2:
_local10.x = ((-2 * _size) - _local2);
_local10.y = -(_local2);
break;
case 3:
_local10.x = (-(_size) - _local2);
_local10.y = (-(_size) - _local2);
break;
};
break;
case Shape.S:
switch (_local8.state.number){
case 0:
_local10.x = (-(_size) - _local2);
_local10.y = -(_local2);
break;
case 1:
_local10.x = ((-2 * _size) - _local2);
_local10.y = -(_local2);
break;
case 2:
_local10.x = -(_local2);
_local10.y = (-(_size) - _local2);
break;
case 3:
_local10.x = (-(_size) - _local2);
_local10.y = (-(_size) - _local2);
break;
};
break;
case Shape.Z:
switch (_local8.state.number){
case 0:
_local10.x = -(_local2);
_local10.y = -(_local2);
break;
case 1:
_local10.x = (-(_size) - _local2);
_local10.y = -(_local2);
break;
case 2:
_local10.x = (-(_size) - _local2);
_local10.y = (-(_size) - _local2);
break;
case 3:
_local10.x = ((-2 * _size) - _local2);
_local10.y = (-(_size) - _local2);
break;
};
break;
case Shape.L:
switch (_local8.state.number){
case 0:
_local10.x = -(_local2);
_local10.y = -(_local2);
break;
case 1:
_local10.x = (-(_size) - _local2);
_local10.y = -(_local2);
break;
case 2:
_local10.x = ((-2 * _size) - _local2);
_local10.y = -(_local2);
break;
case 3:
_local10.x = -(_local2);
_local10.y = (-(_size) - _local2);
break;
};
break;
case Shape.F:
switch (_local8.state.number){
case 0:
_local10.x = -(_local2);
_local10.y = -(_local2);
break;
case 1:
_local10.x = (-(_size) - _local2);
_local10.y = -(_local2);
break;
case 2:
_local10.x = ((-2 * _size) - _local2);
_local10.y = -(_local2);
break;
case 3:
_local10.x = ((-2 * _size) - _local2);
_local10.y = (-(_size) - _local2);
break;
};
break;
};
_cells[_local8.location.x][_local8.location.y].rotation = _local8.state.rotation;
};
_local3++;
};
}
function clearCells():void{
var _local2:uint;
var _local1:uint;
while (_local1 < _width) {
_local2 = 0;
while (_local2 < _height) {
clearCell(_cells[_local1][_local2]);
_local2++;
};
_local1++;
};
}
private function clearCell(_arg1:Sprite):void{
while (_arg1.numChildren) {
_arg1.removeChildAt(0);
};
}
}
}//package bigroom.tetris
Section 15
//BaseGame (Classes.bigroom.game.BaseGame)
package Classes.bigroom.game {
import flash.events.*;
import until.*;
import flash.display.*;
import fl.transitions.*;
import event.*;
import fl.transitions.easing.*;
import flash.media.*;
public class BaseGame extends MovieClip {
public var level:int;
public var pause_btn:MovieClip;
public var score:int;
public var back_Btn:SimpleButton;
public var max_level:int;// = 20
public var infowinodow:MovieClip;
public var parentClass;
public var controllerClass1;
public var controllerClass2;
public var GAME_AGAIN;// = "GAME_AGAIN"
public var sound_btn:MovieClip;
public var counter:int;
public static var EVENT_GAME_SATART:String = "EVENT_GAME_SATART";
public function BaseGame(){
score = 0;
level = 1;
pause_btn.gotoAndStop(1);
sound_btn.gotoAndStop(1);
sound_btn.addEventListener(MouseEvent.CLICK, sound_btn_handel);
pause_btn.addEventListener(MouseEvent.CLICK, pause_btn_handel);
back_Btn.addEventListener(MouseEvent.CLICK, back_Btn_handel);
}
private function close_btn_handel(_arg1:MouseEvent):void{
this.stage.focus = this.stage;
this.removeChild(infowinodow);
controllerClass1.startGame();
if (controllerClass2 != null){
controllerClass2.startGame();
};
}
public function setControllerClass(_arg1, _arg2=null):void{
this.controllerClass1 = _arg1;
this.controllerClass2 = _arg2;
}
private function pause_btn_handel(_arg1:MouseEvent):void{
trace("PAUSING");
if (pause_btn.currentFrame == 1){
pause_btn.gotoAndStop(2);
controllerClass1.pauseGame();
if (controllerClass2 != null){
controllerClass2.pauseGame();
};
} else {
controllerClass1.playGame();
if (controllerClass2 != null){
controllerClass2.playGame();
};
pause_btn.gotoAndStop(1);
};
}
private function sound_btn_handel(_arg1:MouseEvent):void{
if (sound_btn.currentFrame == 1){
sound_btn.gotoAndStop(2);
SoundMixer.soundTransform = new SoundTransform(0);
} else {
SoundMixer.soundTransform = new SoundTransform(1);
sound_btn.gotoAndStop(1);
};
}
private function back_Btn_handel(_arg1:MouseEvent):void{
controllerClass1.pauseGame();
if (controllerClass2 != null){
controllerClass2.pauseGame();
};
CommonEventDispatcher.getInstance().dispatchEvent(new Event(CommonEvent.GAME_AGAIN));
}
public function SaveHightScore(_arg1:int, _arg2:String):void{
infowinodow.info_bg.visible = false;
this.addChild(infowinodow);
TransitionManager.start(infowinodow.score_panel, {type:Zoom, direction:None.easeIn, duration:2, easing:Elastic.easeOut});
infowinodow.score_panel.visible = true;
infowinodow.content_box.visible = false;
infowinodow.score_panel.myScore.text = _arg1.toString();
if (_arg1 > SaveClass[_arg2]){
SaveClass[_arg2] = _arg1;
};
infowinodow.score_panel.bestscore.text = SaveClass[_arg2].toString();
SaveClass.getInstance().saveGameInfo();
}
public function initInfo(_arg1:String, _arg2:String):void{
infowinodow = new Infowindow();
this.addChild(infowinodow);
infowinodow.score_panel.visible = false;
infowinodow.score_panel.replay.addEventListener(MouseEvent.CLICK, close_replay_handel);
infowinodow.score_panel.back.addEventListener(MouseEvent.CLICK, close_back_handel);
infowinodow.content_box.t_text.text = "Instructions";
infowinodow.content_box.b_text.text = ((_arg1 + "\n") + _arg2);
infowinodow.content_box.c_btn.addEventListener(MouseEvent.CLICK, close_btn_handel);
}
private function close_replay_handel(_arg1:MouseEvent):void{
this.dispatchEvent(new Event(this.GAME_AGAIN));
this.stage.focus = this.stage;
this.removeChild(infowinodow);
}
private function close_back_handel(_arg1:MouseEvent):void{
CommonEventDispatcher.getInstance().dispatchEvent(new Event(CommonEvent.GAME_AGAIN));
}
}
}//package Classes.bigroom.game
Section 16
//MainTimeline (Droptris_fla.MainTimeline)
package Droptris_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.ui.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var FogAD;
public var stagewidth:Number;
public var FOGlock:Boolean;
public var fogHolder:MovieClip;
public var okToPlay:Boolean;
public var gameDura:int;
public var debug:Boolean;
public var redbox:MovieClip;
public var gameName:String;
public var ctxNotice;
public var ctxCopyright;
public var mcLogo:MovieClip;
public var urlToGame;
public var stageheight:Number;
public var Furl:String;
public var ctxMenu:ContextMenu;
public var pre1:MovieClip;
public var btnFoggy:SimpleButton;
public var myBlox;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
public function buttonClicked(_arg1:MouseEvent):void{
navigateToURL(new URLRequest(urlToGame), "_blank");
}
public function showProgress(_arg1:Event):void{
pre1.percentGame = Math.floor(((loaderInfo.bytesLoaded / loaderInfo.bytesTotal) * 100));
pre1.percentDura = Math.floor(((getTimer() / pre1.dura) * 100));
pre1.percent = Math.min(pre1.percentGame, pre1.percentDura);
pre1.procent.text = Math.round(pre1.percent);
pre1.preRedBar.width = (Math.round(pre1.percent) * 0.98);
if (pre1.percent > 99){
Furl = loaderInfo.url;
stage.removeEventListener(Event.ENTER_FRAME, showProgress);
play();
};
loadingBar(_arg1);
}
function frame4(){
stop();
myBlox = new Blox(root, stage);
stage.addChild(myBlox);
}
function frame1(){
stop();
gameName = "droptris";
gameDura = 3000;
FOGlock = false;
debug = false;
urlToGame = (("http://www.freeonlinegames.com/?utm_source=" + gameName) + "&utm_medium=game");
stagewidth = stage.stageWidth;
stageheight = stage.stageHeight;
btnFoggy.width = stagewidth;
btnFoggy.height = stageheight;
pre1.percent = 0;
pre1.dura = gameDura;
btnFoggy.addEventListener(MouseEvent.CLICK, buttonClicked);
ctxMenu = new ContextMenu();
ctxMenu.hideBuiltInItems();
ctxCopyright = new ContextMenuItem("Copyright @ Free Online Games");
ctxCopyright.enabled = false;
ctxCopyright.separatorBefore = true;
ctxNotice = new ContextMenuItem("Play More Games!");
ctxNotice.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, function (_arg1:ContextMenuEvent):void{
navigateToURL(new URLRequest(urlToGame));
});
ctxMenu.customItems.push(ctxNotice, ctxCopyright);
contextMenu = ctxMenu;
FogAD = new FogAdsAS3({clip:root, id:"8", res:"670x520"});
FogAD.options.adFinished = function ():void{
redbox.visible = false;
stage.addEventListener(Event.ENTER_FRAME, showProgress);
};
FogAD.showPreGameAd(FogAD);
}
function frame2(){
stop();
}
public function FOGFly(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
_local2.x = (_local2.x + (((_local2.targetX - _local2.x) / _local2.speed) * 0.5));
_local2.y = (_local2.y + (((_local2.targetY - _local2.y) / _local2.speed) * 0.5));
_local2.speed = (_local2.speed * 0.99);
_local2.scaleX = (_local2.scaleY = (_local2.scaleY + (_local2.grow * 2)));
if ((((_local2.alpha < 1)) && (!(_local2.fade)))){
_local2.alpha = (_local2.alpha + 0.02);
};
if ((((((((((_local2.x < -50)) || ((_local2.y < -50)))) || ((_local2.x > (stagewidth + 50))))) || ((_local2.y > (stageheight + 50))))) || ((_local2.scaleX > 2)))){
_local2.fade = true;
};
if (_local2.fade){
_local2.alpha = (_local2.alpha - 0.05);
if (_local2.alpha <= 0){
_local2.removeEventListener(Event.ENTER_FRAME, FOGFly);
_local2.parent.removeChild(_local2);
};
};
}
public function loadingBar(_arg1:Event):void{
var _local3:*;
var _local2:* = Math.random();
if (_local2 < ((loaderInfo.bytesLoaded / loaderInfo.bytesTotal) / 5)){
_local3 = new fog_1();
_local3.cacheAsBitmap = true;
_local3.x = (stagewidth / 2);
_local3.y = (stageheight / 2);
_local3.scaleX = (_local3.scaleY = 0);
_local3.gotoAndStop(((Math.random() * 10) + 1));
_local3.speed = 100;
_local3.alpha = 0;
_local3.grow = (Math.random() / 100);
_local3.fade = false;
_local3.targetX = (Math.random() * 10);
if (_local3.targetX < 5){
_local3.targetX = (Math.random() * 10);
if (_local3.targetX < 5){
_local3.targetX = -100;
} else {
_local3.targetX = (stagewidth + 100);
};
_local3.targetY = (Math.random() * stageheight);
} else {
_local3.targetY = (Math.random() * 10);
if (_local3.targetY < 5){
_local3.targetY = -100;
} else {
_local3.targetY = (stageheight + 100);
};
_local3.targetX = (Math.random() * stagewidth);
};
fogHolder.addChild(_local3);
_local3.addEventListener(Event.ENTER_FRAME, FOGFly);
};
}
function frame3(){
if (!okToPlay){
gotoAndStop(2);
btnFoggy.removeEventListener(MouseEvent.CLICK, buttonClicked);
};
}
}
}//package Droptris_fla
Section 17
//mcLogo_animation_8 (Droptris_fla.mcLogo_animation_8)
package Droptris_fla {
import flash.display.*;
import flash.media.*;
public dynamic class mcLogo_animation_8 extends MovieClip {
public var fogsound:fogaudio;
public var channel:SoundChannel;
public function mcLogo_animation_8(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
fogsound = new fogaudio();
channel = fogsound.play();
}
}
}//package Droptris_fla
Section 18
//mcLogo2_9 (Droptris_fla.mcLogo2_9)
package Droptris_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.ui.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class mcLogo2_9 extends MovieClip {
public var me;
public var mcNotice:MovieClip;
public function mcLogo2_9(){
addFrameScript(0, frame1, 119, frame120);
}
function frame120(){
stop();
me = parent.parent;
if ((((me.Furl.indexOf("freeonlinegames.com") == -1)) && (me.FOGlock))){
if (me.debug){
me.okToPlay = true;
me.play();
stop();
} else {
mcNotice.visible = true;
};
} else {
me.okToPlay = true;
me.play();
stop();
};
}
function frame1(){
mcNotice.visible = false;
}
}
}//package Droptris_fla
Section 19
//MCS_13 (Droptris_fla.MCS_13)
package Droptris_fla {
import flash.display.*;
public dynamic class MCS_13 extends MovieClip {
public function MCS_13(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Droptris_fla
Section 20
//mcSounds_12 (Droptris_fla.mcSounds_12)
package Droptris_fla {
import flash.display.*;
public dynamic class mcSounds_12 extends MovieClip {
public function mcSounds_12(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Droptris_fla
Section 21
//particular_87 (Droptris_fla.particular_87)
package Droptris_fla {
import flash.display.*;
public dynamic class particular_87 extends MovieClip {
public function particular_87(){
addFrameScript(28, frame29);
}
function frame29(){
stop();
}
}
}//package Droptris_fla
Section 22
//particular1_62 (Droptris_fla.particular1_62)
package Droptris_fla {
import flash.display.*;
public dynamic class particular1_62 extends MovieClip {
public function particular1_62(){
addFrameScript(0, frame1, 27, frame28);
}
function frame28(){
stop();
}
function frame1(){
stop();
}
}
}//package Droptris_fla
Section 23
//prelMCxcopy_ovidiu2_2 (Droptris_fla.prelMCxcopy_ovidiu2_2)
package Droptris_fla {
import flash.display.*;
import flash.text.*;
public dynamic class prelMCxcopy_ovidiu2_2 extends MovieClip {
public var procent:TextField;
public var preRedBar:SimpleButton;
public function prelMCxcopy_ovidiu2_2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Droptris_fla
Section 24
//scorepanel_95 (Droptris_fla.scorepanel_95)
package Droptris_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
public dynamic class scorepanel_95 extends MovieClip {
public var fgfyw:SimpleButton;
public var replay:SimpleButton;
public var pmg:SimpleButton;
public var myScore:TextField;
public var back:SimpleButton;
public var bestscore:TextField;
public function scorepanel_95(){
addFrameScript(0, frame1);
}
function frame1(){
pmg.addEventListener(MouseEvent.MOUSE_DOWN, pmg_F);
fgfyw.addEventListener(MouseEvent.MOUSE_DOWN, fgfyw_F);
}
public function pmg_F(_arg1:MouseEvent){
var _local2:URLRequest = new URLRequest("http://www.freeonlinegames.com/?utm_source=droptris&utm_medium=game");
navigateToURL(_local2, "_blank");
}
public function fgfyw_F(_arg1:MouseEvent){
var _local2:URLRequest = new URLRequest("http://www.freegamesforyourwebsite.com/?utm_source=droptris&utm_medium=game");
navigateToURL(_local2, "_blank");
}
}
}//package Droptris_fla
Section 25
//Timeline_27 (Droptris_fla.Timeline_27)
package Droptris_fla {
import flash.display.*;
public dynamic class Timeline_27 extends MovieClip {
public var mc_tower:MovieClip;
public var mini_logo:MovieClip;
public var mc_chooseMenu:MovieClip;
public function Timeline_27(){
addFrameScript(0, frame1, 49, frame50);
}
function frame1(){
stop();
}
function frame50(){
}
}
}//package Droptris_fla
Section 26
//Timeline_63 (Droptris_fla.Timeline_63)
package Droptris_fla {
import flash.display.*;
public dynamic class Timeline_63 extends MovieClip {
public var rewardTextRight:MovieClip;
public function Timeline_63(){
addFrameScript(0, frame1, 129, frame130);
}
function frame130(){
stop();
}
function frame1(){
stop();
}
}
}//package Droptris_fla
Section 27
//Timeline_64 (Droptris_fla.Timeline_64)
package Droptris_fla {
import flash.display.*;
public dynamic class Timeline_64 extends MovieClip {
public function Timeline_64(){
addFrameScript(0, frame1, 5, frame6, 6, frame7);
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
}
}//package Droptris_fla
Section 28
//Timeline_65 (Droptris_fla.Timeline_65)
package Droptris_fla {
import flash.display.*;
public dynamic class Timeline_65 extends MovieClip {
public var rewardTextLeft:MovieClip;
public function Timeline_65(){
addFrameScript(0, frame1, 129, frame130);
}
function frame130(){
stop();
}
function frame1(){
stop();
}
}
}//package Droptris_fla
Section 29
//Timeline_66 (Droptris_fla.Timeline_66)
package Droptris_fla {
import flash.display.*;
public dynamic class Timeline_66 extends MovieClip {
public function Timeline_66(){
addFrameScript(0, frame1, 5, frame6, 6, frame7);
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
}
}//package Droptris_fla
Section 30
//Timeline_69 (Droptris_fla.Timeline_69)
package Droptris_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class Timeline_69 extends MovieClip {
public var mini_logo:MovieClip;
public function Timeline_69(){
addFrameScript(0, frame1);
}
function frame1(){
mini_logo.addEventListener(MouseEvent.MOUSE_DOWN, miniF);
}
public function miniF(_arg1:MouseEvent){
var _local2:URLRequest = new URLRequest("http://www.freeonlinegames.com/?utm_source=droptris&utm_medium=game");
navigateToURL(_local2, "_blank");
}
}
}//package Droptris_fla
Section 31
//CommonEvent (event.CommonEvent)
package event {
import flash.events.*;
public class CommonEvent extends Event {
private var _object:Object;
public static var GAME_AGAIN:String = "GAME_AGAIN";
public function CommonEvent(_arg1:String, _arg2:Object, _arg3:Boolean=false, _arg4:Boolean=false){
this._object = _arg2;
super(_arg1, _arg3, _arg4);
}
public function get getobject():Object{
return (_object);
}
}
}//package event
Section 32
//CommonEventDispatcher (event.CommonEventDispatcher)
package event {
import flash.events.*;
public class CommonEventDispatcher extends EventDispatcher {
private static var _instance:CommonEventDispatcher;
public static function getInstance():CommonEventDispatcher{
if (_instance == null){
_instance = new (CommonEventDispatcher);
};
return (_instance);
}
}
}//package event
Section 33
//Elastic (fl.transitions.easing.Elastic)
package fl.transitions.easing {
public class Elastic {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) + _arg3) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
--_arg1;
return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * (0.3 * 1.5));
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
};
--_arg1;
return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) * 0.5) + _arg3) + _arg2));
}
}
}//package fl.transitions.easing
Section 34
//None (fl.transitions.easing.None)
package fl.transitions.easing {
public class None {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
}
}//package fl.transitions.easing
Section 35
//Transition (fl.transitions.Transition)
package fl.transitions {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class Transition extends EventDispatcher {
protected var _direction:uint;// = 0
protected var _height:Number;// = NAN
protected var _easing:Function;
protected var _twn:Tween;
protected var _width:Number;// = NAN
protected var _outerBounds:Rectangle;
protected var _progress:Number;
public var ID:int;
protected var _innerBounds:Rectangle;
protected var _manager:TransitionManager;
protected var _duration:Number;// = 2
protected var _content:MovieClip;
public static const IN:uint = 0;
public static const OUT:uint = 1;
public function Transition(_arg1:MovieClip, _arg2:Object, _arg3:TransitionManager){
this.content = _arg1;
this.direction = _arg2.direction;
this.duration = _arg2.duration;
this.easing = _arg2.easing;
this.manager = _arg3;
this._innerBounds = this.manager._innerBounds;
this._outerBounds = this.manager._outerBounds;
this._width = this.manager._width;
this._height = this.manager._height;
this._resetTween();
}
public function get type():Class{
return (Transition);
}
public function cleanUp():void{
this.removeEventListener("transitionInDone", this._manager.transitionInDone);
this.removeEventListener("transitionOutDone", this._manager.transitionOutDone);
this.stop();
}
public function stop():void{
this._twn.fforward();
this._twn.stop();
}
public function onMotionFinished(_arg1:Object):void{
if (this.direction == Transition.OUT){
this.dispatchEvent(new Event("transitionOutDone"));
} else {
this.dispatchEvent(new Event("transitionInDone"));
};
}
public function set easing(_arg1:Function):void{
this._easing = _arg1;
if (this._twn){
this._twn.func = _arg1;
};
}
public function set manager(_arg1:TransitionManager):void{
if (this._manager){
this.removeEventListener("transitionInDone", this._manager.transitionInDone);
this.removeEventListener("transitionOutDone", this._manager.transitionOutDone);
};
this._manager = _arg1;
this.addEventListener("transitionInDone", this._manager.transitionInDone);
this.addEventListener("transitionOutDone", this._manager.transitionOutDone);
}
private function _resetTween():void{
if (this._twn){
this._twn.stop();
this._twn.removeEventListener(TweenEvent.MOTION_FINISH, this.onMotionFinished);
};
this._twn = new Tween(this, "", this.easing, 0, 1, this.duration, true);
this._twn.stop();
this._twn.prop = "progress";
this._twn.addEventListener(TweenEvent.MOTION_FINISH, this.onMotionFinished, false, 0, true);
}
public function drawBox(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
_arg1.graphics.moveTo(_arg2, _arg3);
_arg1.graphics.lineTo((_arg2 + _arg4), _arg3);
_arg1.graphics.lineTo((_arg2 + _arg4), (_arg3 + _arg5));
_arg1.graphics.lineTo(_arg2, (_arg3 + _arg5));
_arg1.graphics.lineTo(_arg2, _arg3);
}
public function set progress(_arg1:Number):void{
if (this._progress == _arg1){
return;
};
this._progress = _arg1;
if (this._direction){
this._render((1 - _arg1));
} else {
this._render(_arg1);
};
this.dispatchEvent(new Event("transitionProgress"));
}
public function get duration():Number{
return (this._duration);
}
public function set duration(_arg1:Number):void{
if (_arg1){
this._duration = _arg1;
if (this._twn){
this._twn.duration = _arg1;
};
};
}
public function start():void{
this.content.visible = true;
this._twn.start();
}
public function get easing():Function{
return (this._easing);
}
public function get manager():TransitionManager{
return (this._manager);
}
public function set content(_arg1:MovieClip):void{
if (_arg1){
this._content = _arg1;
if (this._twn){
this._twn.obj = _arg1;
};
};
}
protected function _render(_arg1:Number):void{
}
public function get content():MovieClip{
return (this._content);
}
public function drawCircle(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number):void{
_arg1.graphics.moveTo((_arg2 + _arg4), _arg3);
_arg1.graphics.curveTo((_arg4 + _arg2), ((Math.tan((Math.PI / 8)) * _arg4) + _arg3), ((Math.sin((Math.PI / 4)) * _arg4) + _arg2), ((Math.sin((Math.PI / 4)) * _arg4) + _arg3));
_arg1.graphics.curveTo(((Math.tan((Math.PI / 8)) * _arg4) + _arg2), (_arg4 + _arg3), _arg2, (_arg4 + _arg3));
_arg1.graphics.curveTo(((-(Math.tan((Math.PI / 8))) * _arg4) + _arg2), (_arg4 + _arg3), ((-(Math.sin((Math.PI / 4))) * _arg4) + _arg2), ((Math.sin((Math.PI / 4)) * _arg4) + _arg3));
_arg1.graphics.curveTo((-(_arg4) + _arg2), ((Math.tan((Math.PI / 8)) * _arg4) + _arg3), (-(_arg4) + _arg2), _arg3);
_arg1.graphics.curveTo((-(_arg4) + _arg2), ((-(Math.tan((Math.PI / 8))) * _arg4) + _arg3), ((-(Math.sin((Math.PI / 4))) * _arg4) + _arg2), ((-(Math.sin((Math.PI / 4))) * _arg4) + _arg3));
_arg1.graphics.curveTo(((-(Math.tan((Math.PI / 8))) * _arg4) + _arg2), (-(_arg4) + _arg3), _arg2, (-(_arg4) + _arg3));
_arg1.graphics.curveTo(((Math.tan((Math.PI / 8)) * _arg4) + _arg2), (-(_arg4) + _arg3), ((Math.sin((Math.PI / 4)) * _arg4) + _arg2), ((-(Math.sin((Math.PI / 4))) * _arg4) + _arg3));
_arg1.graphics.curveTo((_arg4 + _arg2), ((-(Math.tan((Math.PI / 8))) * _arg4) + _arg3), (_arg4 + _arg2), _arg3);
}
public function get progress():Number{
return (this._progress);
}
private function _noEase(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public function set direction(_arg1:Number):void{
this._direction = (_arg1) ? 1 : 0;
}
public function get direction():Number{
return (this._direction);
}
}
}//package fl.transitions
Section 36
//TransitionManager (fl.transitions.TransitionManager)
package fl.transitions {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class TransitionManager extends EventDispatcher {
public var type:Object;
public var _width:Number;// = NAN
public var _height:Number;// = NAN
public var _outerBounds:Rectangle;
private var _visualPropList:Object;
private var _triggerEvent:String;
public var className:String;// = "TransitionManager"
public var _innerBounds:Rectangle;
private var _content:MovieClip;
private var _contentAppearance:Object;
private var _transitions:Object;
private static var IDCount:int = 0;
public function TransitionManager(_arg1:MovieClip){
this.type = TransitionManager;
this._visualPropList = {x:null, y:null, scaleX:null, scaleY:null, alpha:null, rotation:null};
super();
this.content = _arg1;
this._transitions = {};
}
public function removeTransition(_arg1:Transition):Boolean{
if (((((!(_arg1)) || (!(this._transitions)))) || (!(this._transitions[_arg1.ID])))){
return (false);
};
_arg1.cleanUp();
return (delete this._transitions[_arg1.ID]);
}
public function saveContentAppearance():void{
var _local2:Object;
var _local3:String;
var _local1:MovieClip = this._content;
if (!this._contentAppearance){
_local2 = (this._contentAppearance = {});
for (_local3 in this._visualPropList) {
_local2[_local3] = _local1[_local3];
};
_local2.colorTransform = _local1.transform.colorTransform;
};
this._innerBounds = _local1.getBounds(_local1);
this._outerBounds = _local1.getBounds(_local1.parent);
this._width = _local1.width;
this._height = _local1.height;
}
public function removeAllTransitions():void{
var _local1:Transition;
for each (_local1 in this._transitions) {
_local1.cleanUp();
this.removeTransition(_local1);
};
}
function transitionInDone(_arg1:Object):void{
var _local2:Boolean;
this.removeTransition(_arg1.target);
if (this.numInTransitions == 0){
_local2 = this._content.visible;
if ((((this._triggerEvent == "hide")) || ((this._triggerEvent == "hideChild")))){
this._content.visible = false;
};
if (_local2){
this.dispatchEvent(new Event("allTransitionsInDone"));
};
};
}
public function addTransition(_arg1:Transition):Transition{
_arg1.ID = ++TransitionManager.IDCount;
this._transitions[_arg1.ID] = _arg1;
return (_arg1);
}
public function startTransition(_arg1:Object):Transition{
this.removeTransition(this.findTransition(_arg1));
var _local2:Class = _arg1.type;
var _local3:Transition = new _local2(this._content, _arg1, this);
this.addTransition(_local3);
_local3.start();
return (_local3);
}
function transitionOutDone(_arg1:Object):void{
var _local2:Boolean;
this.removeTransition(_arg1.target);
if (this.numOutTransitions == 0){
this.restoreContentAppearance();
_local2 = this._content.visible;
if (((_local2) && ((((this._triggerEvent == "hide")) || ((this._triggerEvent == "hideChild")))))){
this._content.visible = false;
};
if (_local2){
this.dispatchEvent(new Event("allTransitionsOutDone"));
};
};
}
public function restoreContentAppearance():void{
var _local3:String;
var _local1:MovieClip = this._content;
var _local2:Object = this._contentAppearance;
for (_local3 in this._visualPropList) {
_local1[_local3] = _local2[_local3];
};
_local1.transform.colorTransform = _local2.colorTransform;
}
public function get numTransitions():Number{
var _local2:Transition;
var _local1:Number = 0;
for each (_local2 in this._transitions) {
_local1++;
};
return (_local1);
}
public function findTransition(_arg1:Object):Transition{
var _local2:Transition;
for each (_local2 in this._transitions) {
if (_local2.type == _arg1.type){
return (_local2);
};
};
return (null);
}
public function set content(_arg1:MovieClip):void{
this._content = _arg1;
this.saveContentAppearance();
}
public function get numInTransitions():Number{
var _local3:Transition;
var _local1:Number = 0;
var _local2:Object = this._transitions;
for each (_local3 in _local2) {
if (!_local3.direction){
_local1++;
};
};
return (_local1);
}
public function get numOutTransitions():Number{
var _local3:Transition;
var _local1:Number = 0;
var _local2:Object = this._transitions;
for each (_local3 in _local2) {
if (_local3.direction){
_local1++;
};
};
return (_local1);
}
public function get content():MovieClip{
return (this._content);
}
public function get transitionsList():Object{
return (this._transitions);
}
public function get contentAppearance():Object{
return (this._contentAppearance);
}
public static function start(_arg1:MovieClip, _arg2:Object):Transition{
if (!_arg1.__transitionManager){
_arg1.__transitionManager = new TransitionManager(_arg1);
};
if (_arg2.direction == 1){
_arg1.__transitionManager._triggerEvent = "hide";
} else {
_arg1.__transitionManager._triggerEvent = "reveal";
};
return (_arg1.__transitionManager.startTransition(_arg2));
}
}
}//package fl.transitions
Section 37
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
private var _position:Number;// = NAN
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var isPlaying:Boolean;// = false
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var begin:Number;// = NAN
private var _finish:Number;// = NAN
public var change:Number;// = NAN
public var looping:Boolean;// = false
private var _intervalID:uint;// = 0
public var func:Function;
private var _timer:Timer;// = null
private var _startTime:Number;// = NAN
public var prop:String;// = ""
private var _duration:Number;// = NAN
public var obj:Object;// = null
public var useSeconds:Boolean;// = false
protected static var _mc:MovieClip = new MovieClip();
public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
this.func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
super();
if (!arguments.length){
return;
};
this.obj = _arg1;
this.prop = _arg2;
this.begin = _arg4;
this.position = _arg4;
this.duration = _arg6;
this.useSeconds = _arg7;
if ((_arg3 is Function)){
this.func = _arg3;
};
this.finish = _arg5;
this._timer = new Timer(100);
this.start();
}
public function continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
protected function startEnterFrame():void{
var _local1:Number;
if (isNaN(this._fps)){
_mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true);
} else {
_local1 = (1000 / this._fps);
this._timer.delay = _local1;
this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true);
this._timer.start();
};
this.isPlaying = true;
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position));
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get finish():Number{
return ((this.begin + this.change));
}
public function get duration():Number{
return (this._duration);
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function set time(_arg1:Number):void{
this.prevTime = this._time;
if (_arg1 > this.duration){
if (this.looping){
this.rewind((_arg1 - this._duration));
this.update();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position));
} else {
if (this.useSeconds){
this._time = this._duration;
this.update();
};
this.stop();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position));
};
} else {
if (_arg1 < 0){
this.rewind();
this.update();
} else {
this._time = _arg1;
this.update();
};
};
}
public function getPosition(_arg1:Number=NaN):Number{
if (isNaN(_arg1)){
_arg1 = this._time;
};
return (this.func(_arg1, this.begin, this.change, this._duration));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function setPosition(_arg1:Number):void{
this.prevPos = this._position;
if (this.prop.length){
this.obj[this.prop] = (this._position = _arg1);
};
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position));
}
public function resume():void{
this.fixTime();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position));
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
public function yoyo():void{
this.continueTo(this.begin, this.time);
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function get FPS():Number{
return (this._fps);
}
public function rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
public function get time():Number{
return (this._time);
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
}
}//package fl.transitions
Section 38
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var position:Number;// = NAN
public var time:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_LOOP:String = "motionLoop";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_RESUME:String = "motionResume";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 39
//Zoom (fl.transitions.Zoom)
package fl.transitions {
import flash.display.*;
public class Zoom extends Transition {
protected var _scaleYFinal:Number;// = 1
protected var _scaleXFinal:Number;// = 1
public function Zoom(_arg1:MovieClip, _arg2:Object, _arg3:TransitionManager){
super(_arg1, _arg2, _arg3);
this._scaleXFinal = this.manager.contentAppearance.scaleX;
this._scaleYFinal = this.manager.contentAppearance.scaleY;
}
override protected function _render(_arg1:Number):void{
if (_arg1 < 0){
_arg1 = 0;
};
this._content.scaleX = (_arg1 * this._scaleXFinal);
this._content.scaleY = (_arg1 * this._scaleYFinal);
}
override public function get type():Class{
return (Zoom);
}
}
}//package fl.transitions
Section 40
//SaveClass (until.SaveClass)
package until {
import flash.net.*;
public class SaveClass {
private var gameInfo:SharedObject;
public static var dualSprint80_score:int = 0;
public static var singleSprint100_score:int = 0;
public static var dualMarathon_score:int = 0;
public static var multiMarathon_score:int = 0;
public static var singleSprint80_score:int = 0;
public static var dualSprint100_score:int = 0;
public static var singleMarathon_score:int = 0;
public static var multiSprint50_score:int = 0;
public static var multiSprint30_score:int = 0;
public static var dualSprint30_score:int = 0;
public static var dualSprint50_score:int = 0;
public static var singleSprint50_score:int = 0;
public static var multiSprint100_score:int = 0;
public static var singleSprint30_score:int = 0;
private static var _instance:SaveClass;
public static var multiSprint80_score:int = 0;
public function SaveClass(){
gameInfo = SharedObject.getLocal("blox_score");
}
public function getGmameInfo():Boolean{
var _local1:Boolean;
if (gameInfo.data.game_name != null){
singleMarathon_score = gameInfo.data.singleMarathon_score;
singleSprint30_score = gameInfo.data.singleSprint30_score;
singleSprint50_score = gameInfo.data.singleSprint50_score;
singleSprint80_score = gameInfo.data.singleSprint80_score;
singleSprint100_score = gameInfo.data.singleSprint100_score;
multiMarathon_score = gameInfo.data.multiMarathon_score;
multiSprint30_score = gameInfo.data.multiSprint30_score;
multiSprint50_score = gameInfo.data.multiSprint50_score;
multiSprint80_score = gameInfo.data.multiSprint80_score;
multiSprint100_score = gameInfo.data.multiSprint100_score;
dualMarathon_score = gameInfo.data.dualMarathon_score;
dualSprint30_score = gameInfo.data.dualSprint30_score;
dualSprint50_score = gameInfo.data.dualSprint50_score;
dualSprint80_score = gameInfo.data.dualSprint80_score;
dualSprint100_score = gameInfo.data.dualSprint100_score;
};
return (_local1);
}
public function saveGameInfo():void{
gameInfo.data.game_name = "blox_score";
gameInfo.data.singleMarathon_score = singleMarathon_score;
gameInfo.data.singleSprint30_score = singleSprint30_score;
gameInfo.data.singleSprint50_score = singleSprint50_score;
gameInfo.data.singleSprint80_score = singleSprint80_score;
gameInfo.data.singleSprint100_score = singleSprint100_score;
gameInfo.data.multiMarathon_score = multiMarathon_score;
gameInfo.data.multiSprint30_score = multiSprint30_score;
gameInfo.data.multiSprint50_score = multiSprint50_score;
gameInfo.data.multiSprint80_score = multiSprint80_score;
gameInfo.data.multiSprint100_score = multiSprint100_score;
gameInfo.data.dualMarathon_score = dualMarathon_score;
gameInfo.data.dualSprint30_score = dualSprint30_score;
gameInfo.data.dualSprint50_score = dualSprint50_score;
gameInfo.data.dualSprint80_score = dualSprint80_score;
gameInfo.data.dualSprint100_score = dualSprint100_score;
var flushStatus:String;
try {
flushStatus = gameInfo.flush();
} catch(error:Error) {
};
if (flushStatus != null){
switch (flushStatus){
case SharedObjectFlushStatus.PENDING:
break;
case SharedObjectFlushStatus.FLUSHED:
break;
};
};
}
public static function getInstance():SaveClass{
if (_instance == null){
_instance = new (SaveClass);
};
return (_instance);
}
}
}//package until
Section 41
//Blox (Blox)
package {
import flash.events.*;
import until.*;
import flash.display.*;
import bigroom.tetris.*;
import event.*;
import flash.net.*;
import flash.media.*;
import Classes.bigroom.game.*;
public class Blox extends Sprite {
private var spritgameDuelLef:Controller_Sprint;
private var sprintDuelRight:Controller_Sprint;
private var modetType:int;// = 0
private var gameMultiLeft:Controller;
private var gamemune:MovieClip;
private var gameDuelright:Controller;
private var sprintDuelLeft:Controller_Sprint;
private var spritgame:Controller_Sprint;
private var screen:Sprite;
private var gameDuelLeft:Controller;
private var game:Controller;
private var spritgameDuelRight:Controller_Sprint;
private var gameMultiRight:Controller;
public function Blox(_arg1, _arg2){
trace(SaveClass.getInstance().getGmameInfo());
addGameCover();
CommonEventDispatcher.getInstance().addEventListener(CommonEvent.GAME_AGAIN, game_again_handel);
}
public function backtoMainMenu(_arg1:MouseEvent):void{
removeChild(screen);
screen = new GameCover();
addChild(screen);
GameCover(screen).mc_menu.stop();
GameCover(screen).mc_menu.mc_tower.btn_singlePlayer.addEventListener(MouseEvent.CLICK, singleMode, false, 0, true);
GameCover(screen).mc_menu.mc_tower.btn_multiPlayer.addEventListener(MouseEvent.CLICK, multiMode, false, 0, true);
GameCover(screen).mc_menu.mc_tower.btn_duelScreen.addEventListener(MouseEvent.CLICK, duelMode, false, 0, true);
GameCover(screen).mc_menu.mc_tower.btn_moreGames.addEventListener(MouseEvent.CLICK, moreGames, false, 0, true);
GameCover(gamemune).mc_menu.mini_logo.addEventListener(MouseEvent.CLICK, moreGames, false, 0, true);
}
private function game_again_handel(_arg1:Event):void{
removeChild(screen);
addGameCover();
}
private function addGameCover():void{
SoundMixer.soundTransform = new SoundTransform(1);
gamemune = new GameCover();
gamemune.gotoAndStop(1);
addChild(gamemune);
GameCover(gamemune).mc_menu.mc_tower.btn_singlePlayer.addEventListener(MouseEvent.CLICK, singleMode, false, 0, true);
GameCover(gamemune).mc_menu.mc_tower.btn_multiPlayer.addEventListener(MouseEvent.CLICK, multiMode, false, 0, true);
GameCover(gamemune).mc_menu.mc_tower.btn_duelScreen.addEventListener(MouseEvent.CLICK, duelMode, false, 0, true);
GameCover(gamemune).mc_menu.mini_logo.addEventListener(MouseEvent.CLICK, moreGames, false, 0, true);
GameCover(gamemune).mc_menu.mc_tower.btn_moreGames.addEventListener(MouseEvent.CLICK, moreGames, false, 0, true);
GameCover(gamemune).mc_menu.mc_tower.btn_add.addEventListener(MouseEvent.CLICK, addtoyoursite, false, 0, true);
}
private function multiSprintPlay(_arg1:int):void{
var _local2:int = _arg1;
screen = new MultiSprint(_local2);
addChild(screen);
sprintDuelLeft = new Controller_Sprint(screen, new BloxConfig_Duel_left());
sprintDuelLeft.addEventListener(TetrisEvent.SCORE_CHANGE, MultiSprint(screen).DuelscoreChanged_left, false, 0, true);
sprintDuelLeft.addEventListener(TetrisEvent.GAME_OVER, MultiSprint(screen).gameOverleft);
sprintDuelRight = new Controller_Sprint(screen, new BloxConfig_Duel_right());
sprintDuelRight.addEventListener(TetrisEvent.SCORE_CHANGE, MultiSprint(screen).DuelscoreChanged_right, false, 0, true);
sprintDuelRight.addEventListener(TetrisEvent.GAME_OVER, MultiSprint(screen).gameOverright);
BaseGame(screen).setControllerClass(sprintDuelLeft, sprintDuelRight);
}
public function Sprint_handel(_arg1:MouseEvent):void{
var _local2:int;
removeChild(gamemune);
switch (_arg1.currentTarget.name){
case "btn_Sprint30":
_local2 = 30;
break;
case "btn_Sprint50":
_local2 = 50;
break;
case "btn_Sprint80":
_local2 = 80;
break;
case "btn_Sprint100":
_local2 = 100;
break;
};
switch (modetType){
case 1:
singleSprintPlay(_local2);
break;
case 2:
doubleSprintPlay(_local2);
break;
case 3:
multiSprintPlay(_local2);
break;
};
}
public function singleMode(_arg1:MouseEvent):void{
modetType = 1;
GameCover(gamemune).mc_menu.gotoAndPlay(2);
GameCover(gamemune).mc_menu.addFrameScript(24, getBtn);
}
public function addtoyoursite(_arg1:MouseEvent):void{
var _local2 = "http://www.freegamesforyourwebsite.com/?utm_source=droptris&utm_medium=game";
var _local3:URLRequest = new URLRequest(_local2);
navigateToURL(_local3);
}
public function multiMode(_arg1:MouseEvent):void{
modetType = 3;
GameCover(gamemune).mc_menu.gotoAndPlay(2);
GameCover(gamemune).mc_menu.addFrameScript(24, getBtn);
}
private function doubleSprintPlay(_arg1:int):void{
var _local2:int = _arg1;
screen = new DuelSprint(_local2);
addChild(screen);
spritgameDuelLef = new Controller_Sprint(screen, new BloxConfig_Duel_left());
spritgameDuelLef.addEventListener(TetrisEvent.SCORE_CHANGE, DuelSprint(screen).DuelscoreChanged_left, false, 0, true);
spritgameDuelLef.addEventListener(TetrisEvent.GAME_OVER, DuelSprint(screen).gameOver_left, false, 0, true);
spritgameDuelRight = new Controller_Sprint(screen, new BloxConfig_Duel_right());
spritgameDuelRight.addEventListener(TetrisEvent.SCORE_CHANGE, DuelSprint(screen).DuelscoreChanged_right, false, 0, true);
spritgameDuelRight.addEventListener(TetrisEvent.GAME_OVER, DuelSprint(screen).gameOver_right, false, 0, true);
BaseGame(screen).setControllerClass(spritgameDuelLef, spritgameDuelRight);
}
public function moreGames(_arg1:MouseEvent):void{
var _local2 = "http://www.freeonlinegames.com/?utm_source=droptris&utm_medium=game";
var _local3:URLRequest = new URLRequest(_local2);
navigateToURL(_local3);
}
private function getBtn():void{
GameCover(gamemune).mc_menu.gotoAndStop(25);
if (modetType == 1){
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Marathon.addEventListener(MouseEvent.CLICK, singlemarathonMode, false, 0, true);
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Sprint30.addEventListener(MouseEvent.CLICK, Sprint_handel, false, 0, true);
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Sprint50.addEventListener(MouseEvent.CLICK, Sprint_handel, false, 0, true);
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Sprint80.addEventListener(MouseEvent.CLICK, Sprint_handel, false, 0, true);
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Sprint100.addEventListener(MouseEvent.CLICK, Sprint_handel, false, 0, true);
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Back.addEventListener(MouseEvent.CLICK, previousMenu, false, 0, true);
} else {
if (modetType == 2){
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Marathon.addEventListener(MouseEvent.CLICK, douelmarathonMode, false, 0, true);
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Sprint30.addEventListener(MouseEvent.CLICK, Sprint_handel, false, 0, true);
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Sprint50.addEventListener(MouseEvent.CLICK, Sprint_handel, false, 0, true);
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Sprint80.addEventListener(MouseEvent.CLICK, Sprint_handel, false, 0, true);
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Sprint100.addEventListener(MouseEvent.CLICK, Sprint_handel, false, 0, true);
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Back.addEventListener(MouseEvent.CLICK, previousMenu, false, 0, true);
} else {
if (modetType == 3){
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Marathon.addEventListener(MouseEvent.CLICK, multimarathonMode, false, 0, true);
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Sprint30.addEventListener(MouseEvent.CLICK, Sprint_handel, false, 0, true);
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Sprint50.addEventListener(MouseEvent.CLICK, Sprint_handel, false, 0, true);
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Sprint80.addEventListener(MouseEvent.CLICK, Sprint_handel, false, 0, true);
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Sprint100.addEventListener(MouseEvent.CLICK, Sprint_handel, false, 0, true);
GameCover(gamemune).mc_menu.mc_chooseMenu.btn_Back.addEventListener(MouseEvent.CLICK, previousMenu, false, 0, true);
};
};
};
}
public function singlemarathonMode(_arg1:MouseEvent):void{
removeChild(gamemune);
screen = new SingleMarathon();
addChild(screen);
game = new Controller(screen, new BloxConfig());
game.addEventListener(TetrisEvent.SCORE_CHANGE, SingleMarathon(screen).scoreChanged, false, 0, true);
game.addEventListener(TetrisEvent.GAME_OVER, SingleMarathon(screen).gameOver_handel, false, 0, true);
BaseGame(screen).setControllerClass(game);
}
private function singleSprintPlay(_arg1:int):void{
var _local2:int = _arg1;
screen = new SingleSprint(_local2);
addChild(screen);
spritgame = new Controller_Sprint(screen, new BloxConfig());
spritgame.addEventListener(TetrisEvent.SCORE_CHANGE, SingleSprint(screen).scoreChanged, false, 0, true);
spritgame.addEventListener(TetrisEvent.GAME_OVER, SingleSprint(screen).gameOver, false, 0, true);
BaseGame(screen).setControllerClass(spritgame);
}
public function previousMenu(_arg1:MouseEvent):void{
GameCover(gamemune).mc_menu.play();
modetType = 0;
}
private function douelmarathonMode(_arg1:MouseEvent):void{
removeChild(gamemune);
screen = new DuelMarathon();
addChild(screen);
gameDuelLeft = new Controller(screen, new BloxConfig_Duel_left());
gameDuelLeft.addEventListener(TetrisEvent.SCORE_CHANGE, DuelMarathon(screen).DuelscoreChanged_left, false, 0, true);
gameDuelLeft.addEventListener(TetrisEvent.GAME_OVER, DuelMarathon(screen).gameOverLeft, false, 0, true);
gameDuelright = new Controller(screen, new BloxConfig_Duel_right());
gameDuelright.addEventListener(TetrisEvent.SCORE_CHANGE, DuelMarathon(screen).DuelscoreChanged_right, false, 0, true);
gameDuelright.addEventListener(TetrisEvent.GAME_OVER, DuelMarathon(screen).gameOverRight, false, 0, true);
BaseGame(screen).setControllerClass(gameDuelLeft, gameDuelright);
}
public function duelMode(_arg1:MouseEvent):void{
modetType = 2;
GameCover(gamemune).mc_menu.gotoAndPlay(2);
GameCover(gamemune).mc_menu.addFrameScript(24, getBtn);
}
private function multimarathonMode(_arg1:MouseEvent):void{
removeChild(gamemune);
screen = new MultiMarathon();
addChild(screen);
gameMultiLeft = new Controller(screen, new BloxConfig_Multi_left());
gameMultiLeft.addEventListener(TetrisEvent.SCORE_CHANGE, MultiMarathon(screen).MultiscoreChanged_left, false, 0, true);
gameMultiLeft.addEventListener(TetrisEvent.GAME_OVER, MultiMarathon(screen).gameOverLeft, false, 0, true);
gameMultiRight = new Controller(screen, new BloxConfig_Multi_right());
gameMultiRight.addEventListener(TetrisEvent.SCORE_CHANGE, MultiMarathon(screen).MultiscoreChanged_right, false, 0, true);
gameMultiRight.addEventListener(TetrisEvent.GAME_OVER, MultiMarathon(screen).gameOverRight, false, 0, true);
BaseGame(screen).setControllerClass(gameMultiLeft, gameMultiRight);
}
}
}//package
Section 42
//BloxConfig (BloxConfig)
package {
import bigroom.tetris.*;
import flash.ui.*;
public class BloxConfig extends Config {
public function BloxConfig(){
scorePerLine = 10;
lvlupLines = 10;
acceleration = 0.97;
startSpeed = 800;
keyLeft = Keyboard.LEFT;
keyRight = Keyboard.RIGHT;
keyRotLeft = Keyboard.UP;
keyRotRight = 0;
keyDrop = Keyboard.DOWN;
sndRemoveLine = "HitSound";
sndTetradLand = "PopSound";
sndTetradMove = null;
tetradL = "Tetrad_L";
tetradO = "Tetrad_O";
tetradF = "Tetrad_F";
tetradT = "Tetrad_T";
tetradS = "Tetrad_S";
tetradZ = "Tetrad_Z";
tetradI = "Tetrad_I";
playWidth = 10;
playHeight = 20;
blockSize = 15;
gameX = (192 + 64);
gameY = (21 + 126);
nextX = (222 + 192);
nextY = 219;
}
}
}//package
Section 43
//BloxConfig_Duel_left (BloxConfig_Duel_left)
package {
import bigroom.tetris.*;
public class BloxConfig_Duel_left extends Config {
public function BloxConfig_Duel_left(){
scorePerLine = 10;
lvlupLines = 10;
acceleration = 0.97;
startSpeed = 800;
keyLeft = 65;
keyRight = 68;
keyRotLeft = 87;
keyRotRight = 0;
keyDrop = 83;
sndRemoveLine = "HitSound";
sndTetradLand = "PopSound";
sndTetradMove = null;
tetradL = "Tetrad_L";
tetradO = "Tetrad_O";
tetradF = "Tetrad_F";
tetradT = "Tetrad_T";
tetradS = "Tetrad_S";
tetradZ = "Tetrad_Z";
tetradI = "Tetrad_I";
playWidth = 10;
playHeight = 20;
blockSize = 15;
gameX = 102;
gameY = 147;
nextX = 260;
nextY = 220;
}
}
}//package
Section 44
//BloxConfig_Duel_right (BloxConfig_Duel_right)
package {
import bigroom.tetris.*;
import flash.ui.*;
public class BloxConfig_Duel_right extends Config {
public function BloxConfig_Duel_right(){
scorePerLine = 10;
lvlupLines = 10;
acceleration = 0.97;
startSpeed = 800;
keyLeft = Keyboard.LEFT;
keyRight = Keyboard.RIGHT;
keyRotLeft = Keyboard.UP;
keyRotRight = 0;
keyDrop = Keyboard.DOWN;
sndRemoveLine = "HitSound";
sndTetradLand = "PopSound";
sndTetradMove = null;
tetradL = "Tetrad_L";
tetradO = "Tetrad_O";
tetradF = "Tetrad_F";
tetradT = "Tetrad_T";
tetradS = "Tetrad_S";
tetradZ = "Tetrad_Z";
tetradI = "Tetrad_I";
playWidth = 10;
playHeight = 20;
blockSize = 15;
gameX = 419;
gameY = 147;
nextX = 348;
nextY = 220;
}
}
}//package
Section 45
//BloxConfig_Multi_left (BloxConfig_Multi_left)
package {
import bigroom.tetris.*;
public class BloxConfig_Multi_left extends Config {
public function BloxConfig_Multi_left(){
scorePerLine = 10;
lvlupLines = 10;
acceleration = 0.97;
startSpeed = 800;
keyLeft = 65;
keyRight = 68;
keyRotLeft = 87;
keyRotRight = 0;
keyDrop = 83;
sndRemoveLine = "HitSound";
sndTetradLand = "PopSound";
sndTetradMove = null;
tetradL = "Tetrad_L";
tetradO = "Tetrad_O";
tetradF = "Tetrad_F";
tetradT = "Tetrad_T";
tetradS = "Tetrad_S";
tetradZ = "Tetrad_Z";
tetradI = "Tetrad_I";
playWidth = 10;
playHeight = 20;
blockSize = 15;
gameX = 103;
gameY = 147;
nextX = 260;
nextY = 220;
}
}
}//package
Section 46
//BloxConfig_Multi_right (BloxConfig_Multi_right)
package {
import bigroom.tetris.*;
import flash.ui.*;
public class BloxConfig_Multi_right extends Config {
public function BloxConfig_Multi_right(){
scorePerLine = 10;
lvlupLines = 10;
acceleration = 0.97;
startSpeed = 800;
keyLeft = Keyboard.LEFT;
keyRight = Keyboard.RIGHT;
keyRotLeft = Keyboard.UP;
keyRotRight = 0;
keyDrop = Keyboard.DOWN;
sndRemoveLine = "HitSound";
sndTetradLand = "PopSound";
sndTetradMove = null;
tetradL = "Tetrad_L";
tetradO = "Tetrad_O";
tetradF = "Tetrad_F";
tetradT = "Tetrad_T";
tetradS = "Tetrad_S";
tetradZ = "Tetrad_Z";
tetradI = "Tetrad_I";
playWidth = 10;
playHeight = 20;
blockSize = 15;
gameX = 419;
gameY = 147;
nextX = 348;
nextY = 220;
}
}
}//package
Section 47
//DuelMarathon (DuelMarathon)
package {
import flash.events.*;
import flash.display.*;
import bigroom.tetris.*;
import event.*;
import flash.text.*;
import Classes.bigroom.game.*;
public class DuelMarathon extends BaseGame {
public var rewardTextRight:MovieClip;
public var greenFlameRight:MovieClip;
private var ctext:String;// = "Normal mode too easy for you? Try your hand at controlling two games at once: Use the W.A.S.D keys to control the falling shapes on the left screen. Use the Arrow keys to Control the falling shapes on the right screen. Clear lines by creating a complete row of blocks."
public var close_right:MovieClip;
public var greenFlameLeft:MovieClip;
public var redFlameRigh:MovieClip;
public var DuelMarathon_lv:TextField;
public var close_lett:MovieClip;
private var right_level:int;
public var rewardTextLeft:MovieClip;
public var blueFlameLeft:MovieClip;
public var blueFlameRight:MovieClip;
private var right_score:int;
public var DuelMarathon_rewardRight:MovieClip;
public var gameAreaRight:MovieClip;
public var yellowFlameRight:MovieClip;
public var redFlameLeft:MovieClip;
private var line_num:int;
private var left_level:int;
public var yellowFlameLeft:MovieClip;
private var title:String;// = "Dual Screen:"
private var left_score:int;
public var gameAreaLeft:MovieClip;
public var DuelMarathon_score:TextField;
public var DuelMarathon_rewardLeft:MovieClip;
public function DuelMarathon(){
left_score = 0;
right_score = 0;
addScreoe();
this.DuelMarathon_rewardLeft.stop();
this.DuelMarathon_rewardRight.stop();
this.DuelMarathon_rewardRight.rewardTextRight.stop();
this.DuelMarathon_rewardLeft.rewardTextLeft.stop();
this.initInfo(title, ctext);
close_right.visible = false;
close_lett.visible = false;
var _local1:int;
while (_local1 < close_lett.numChildren) {
MovieClip(close_right.getChildAt(_local1)).gotoAndStop(1);
MovieClip(close_lett.getChildAt(_local1)).gotoAndStop(1);
_local1++;
};
this.addEventListener(this.GAME_AGAIN, replay_handel);
}
public function gameOverLeft(_arg1:TetrisEvent):void{
this.DuelMarathon_rewardRight.gotoAndPlay(2);
this.DuelMarathon_rewardRight.rewardTextRight.gotoAndStop(7);
this.DuelMarathon_rewardLeft.gotoAndPlay(2);
this.DuelMarathon_rewardLeft.rewardTextLeft.gotoAndStop(7);
gameOver();
}
private function addScreoe():void{
this.score = (left_score + right_score);
this.DuelMarathon_score.text = String(score);
}
private function replay_handel(_arg1:Event):void{
this.DuelMarathon_rewardLeft.gotoAndStop(1);
this.DuelMarathon_rewardRight.gotoAndStop(1);
controllerClass1.startGame();
controllerClass2.startGame();
}
private function gameIsOver():void{
var _local1 = "dualMarathon_score";
this.SaveHightScore(this.score, _local1);
}
private function back_handel(_arg1:MouseEvent):void{
CommonEventDispatcher.getInstance().dispatchEvent(new Event(CommonEvent.GAME_AGAIN));
}
public function DuelscoreChanged_left(_arg1:TetrisEvent):void{
left_score = _arg1.score;
addScreoe();
left_level = _arg1.level;
addLevel();
if (this.level >= this.max_level){
this.DuelMarathon_rewardLeft.gotoAndPlay(2);
this.DuelMarathon_rewardRight.gotoAndPlay(2);
this.DuelMarathon_rewardRight.rewardTextRight.gotoAndStop(6);
this.DuelMarathon_rewardLeft.rewardTextLeft.gotoAndStop(6);
gameOver();
} else {
if (_arg1.isSpeed){
this.DuelMarathon_rewardLeft.rewardTextLeft.gotoAndStop(5);
this.DuelMarathon_rewardLeft.play();
} else {
switch (_arg1.lines){
case 1:
this.DuelMarathon_rewardLeft.rewardTextLeft.gotoAndStop(2);
this.DuelMarathon_rewardLeft.gotoAndPlay(2);
break;
case 2:
this.DuelMarathon_rewardLeft.rewardTextLeft.gotoAndStop(2);
this.DuelMarathon_rewardLeft.gotoAndPlay(2);
break;
case 3:
this.DuelMarathon_rewardLeft.rewardTextLeft.gotoAndStop(3);
this.DuelMarathon_rewardLeft.gotoAndPlay(2);
break;
case 4:
this.DuelMarathon_rewardLeft.rewardTextLeft.gotoAndStop(4);
this.DuelMarathon_rewardLeft.gotoAndPlay(2);
break;
};
};
};
}
public function gameOverRight(_arg1:TetrisEvent):void{
this.DuelMarathon_rewardRight.gotoAndPlay(2);
this.DuelMarathon_rewardRight.rewardTextRight.gotoAndStop(7);
this.DuelMarathon_rewardLeft.gotoAndPlay(2);
this.DuelMarathon_rewardLeft.rewardTextLeft.gotoAndStop(7);
gameOver();
}
private function addLevel():void{
this.level = int((((left_level + right_level) + 1) / 2));
this.DuelMarathon_lv.text = this.level.toString();
}
private function gameOver():void{
close_right.visible = true;
close_lett.visible = true;
var _local1:int;
while (_local1 < close_right.numChildren) {
MovieClip(close_right.getChildAt(_local1)).gotoAndPlay(2);
MovieClip(close_lett.getChildAt(_local1)).gotoAndPlay(2);
MovieClip(close_lett.getChildAt(_local1)).addFrameScript(15, gameIsOver);
_local1++;
};
controllerClass1.clearnAll();
controllerClass2.clearnAll();
controllerClass1.pauseGame();
controllerClass2.pauseGame();
}
public function DuelscoreChanged_right(_arg1:TetrisEvent):void{
right_score = _arg1.score;
addScreoe();
right_level = _arg1.level;
addLevel();
if (this.level >= this.max_level){
this.DuelMarathon_rewardLeft.gotoAndPlay(2);
this.DuelMarathon_rewardRight.gotoAndPlay(2);
this.DuelMarathon_rewardRight.rewardTextRight.gotoAndStop(6);
this.DuelMarathon_rewardLeft.rewardTextLeft.gotoAndStop(6);
gameOver();
} else {
if (_arg1.isSpeed){
this.DuelMarathon_rewardRight.rewardTextRight.gotoAndStop(5);
this.DuelMarathon_rewardRight.gotoAndPlay(2);
} else {
switch (_arg1.lines){
case 1:
this.DuelMarathon_rewardRight.rewardTextRight.gotoAndStop(2);
this.DuelMarathon_rewardRight.gotoAndPlay(2);
break;
case 2:
this.DuelMarathon_rewardRight.rewardTextRight.gotoAndStop(2);
this.DuelMarathon_rewardRight.gotoAndPlay(2);
break;
case 3:
this.DuelMarathon_rewardRight.rewardTextRight.gotoAndStop(3);
this.DuelMarathon_rewardRight.gotoAndPlay(2);
break;
case 4:
this.DuelMarathon_rewardRight.rewardTextRight.gotoAndStop(4);
this.DuelMarathon_rewardRight.gotoAndPlay(2);
break;
};
};
};
}
}
}//package
Section 48
//DuelSprint (DuelSprint)
package {
import flash.events.*;
import flash.display.*;
import bigroom.tetris.*;
import event.*;
import flash.text.*;
import Classes.bigroom.game.*;
public class DuelSprint extends BaseGame {
public var rewardTextRight:MovieClip;
private var ctext:String;// = "Normal mode too easy for you? Try your hand at controlling two games at once: Use the W.A.S.D keys to control the falling shapes on the left screen. Use the Arrow keys to Control the falling shapes on the right screen. Clear lines by creating a complete row of blocks. "
public var leftSprint_goal:TextField;
private var score_left:int;
public var close_right:MovieClip;
public var yellowFlame:MovieClip;
public var close_lett:MovieClip;
public var redFlame:MovieClip;
public var rewardTextLeft:MovieClip;
private var floor_right:int;
private var score_right:int;
public var DuelSprint_reward:MovieClip;
public var gameAreaRight:MovieClip;
public var DuelSprint_rewardRight:MovieClip;
private var all_floors:int;
public var gameAreaLeft:MovieClip;
private var title:String;// = "Dual Screen:"
private var floor_left;
public var DuelSprint_goal:TextField;
public var DuelSprint_rewardLeft:MovieClip;
public var DuelSprint_score:TextField;
public var rightSprint_goal:TextField;
private var all_floor:int;
public var greenFlame:MovieClip;
public var blueFlame:MovieClip;
public function DuelSprint(_arg1:int){
this.floor_right = _arg1;
this.floor_left = _arg1;
this.all_floor = _arg1;
all_floors = _arg1;
score_right = 0;
score_left = 0;
this.DuelSprint_goal.text = all_floor.toString();
this.DuelSprint_score.text = score.toString();
this.DuelSprint_rewardLeft.stop();
this.DuelSprint_rewardLeft.rewardTextLeft.stop();
this.DuelSprint_rewardRight.stop();
this.DuelSprint_rewardRight.rewardTextRight.stop();
this.initInfo(title, ctext);
close_right.visible = false;
close_lett.visible = false;
var _local2:int;
while (_local2 < close_lett.numChildren) {
MovieClip(close_right.getChildAt(_local2)).gotoAndStop(1);
MovieClip(close_lett.getChildAt(_local2)).gotoAndStop(1);
_local2++;
};
this.addEventListener(this.GAME_AGAIN, replay_handel);
}
public function gameOver_right(_arg1:TetrisEvent):void{
this.DuelSprint_rewardRight.rewardTextRight.gotoAndStop(7);
this.DuelSprint_rewardRight.gotoAndPlay(2);
this.DuelSprint_rewardLeft.rewardTextLeft.gotoAndStop(7);
this.DuelSprint_rewardLeft.gotoAndPlay(2);
gameOver();
}
private function addAllFloor():void{
rightSprint_goal.text = floor_right.toString();
leftSprint_goal.text = floor_left.toString();
all_floor = (((floor_right + floor_left) + 1) / 2);
this.DuelSprint_goal.text = all_floor.toString();
if (all_floor == 0){
gameOver();
};
}
private function replay_handel(_arg1:Event):void{
floor_left = this.all_floors;
floor_right = this.all_floors;
this.DuelSprint_rewardLeft.gotoAndStop(1);
this.DuelSprint_rewardLeft.gotoAndStop(1);
controllerClass1.startGame();
controllerClass2.startGame();
}
private function back_handel(_arg1:MouseEvent):void{
CommonEventDispatcher.getInstance().dispatchEvent(new Event(CommonEvent.GAME_AGAIN));
}
private function gameIsOver():void{
var _local1 = (("dualSprint" + all_floors) + "_score");
this.SaveHightScore(this.score, _local1);
}
public function DuelscoreChanged_left(_arg1:TetrisEvent):void{
this.score_left = _arg1.score;
addScore();
this.floor_left = (this.floor_left - _arg1.lines);
if (floor_left <= 0){
this.DuelSprint_rewardLeft.rewardTextLeft.gotoAndStop(6);
this.DuelSprint_rewardLeft.gotoAndPlay(2);
controllerClass1.clearnAll();
controllerClass1.pauseGame();
floor_left = 0;
addAllFloor();
} else {
if (_arg1.isSpeed){
this.DuelSprint_rewardLeft.rewardTextLeft.gotoAndStop(5);
this.DuelSprint_rewardLeft.gotoAndPlay(2);
} else {
switch (_arg1.lines){
case 1:
this.DuelSprint_rewardLeft.rewardTextLeft.gotoAndStop(2);
this.DuelSprint_rewardLeft.gotoAndPlay(2);
break;
case 2:
this.DuelSprint_rewardLeft.rewardTextLeft.gotoAndStop(2);
this.DuelSprint_rewardLeft.gotoAndPlay(2);
break;
case 3:
this.DuelSprint_rewardLeft.rewardTextLeft.gotoAndStop(3);
this.DuelSprint_rewardLeft.gotoAndPlay(2);
break;
case 4:
this.DuelSprint_rewardLeft.rewardTextLeft.gotoAndStop(4);
this.DuelSprint_rewardLeft.gotoAndPlay(2);
break;
};
};
};
addAllFloor();
}
public function gameOver_left(_arg1:TetrisEvent):void{
this.DuelSprint_rewardRight.rewardTextRight.gotoAndStop(7);
this.DuelSprint_rewardRight.gotoAndPlay(2);
this.DuelSprint_rewardLeft.rewardTextLeft.gotoAndStop(7);
this.DuelSprint_rewardLeft.gotoAndPlay(2);
gameOver();
}
private function gameOver():void{
close_right.visible = true;
close_lett.visible = true;
var _local1:int;
while (_local1 < close_right.numChildren) {
MovieClip(close_right.getChildAt(_local1)).gotoAndPlay(2);
MovieClip(close_lett.getChildAt(_local1)).gotoAndPlay(2);
MovieClip(close_lett.getChildAt(_local1)).addFrameScript(15, gameIsOver);
_local1++;
};
controllerClass1.clearnAll();
controllerClass2.clearnAll();
controllerClass1.pauseGame();
controllerClass2.pauseGame();
}
private function addScore():void{
score = (score_right + score_left);
this.DuelSprint_score.text = score.toString();
}
public function DuelscoreChanged_right(_arg1:TetrisEvent):void{
this.score_right = _arg1.score;
addScore();
this.floor_right = (this.floor_right - _arg1.lines);
if (floor_right <= 0){
this.DuelSprint_rewardRight.rewardTextRight.gotoAndStop(6);
this.DuelSprint_rewardRight.gotoAndPlay(2);
controllerClass2.pauseGame();
controllerClass2.clearnAll();
floor_right = 0;
addAllFloor();
} else {
if (_arg1.isSpeed){
this.DuelSprint_rewardRight.rewardTextRight.gotoAndStop(5);
this.DuelSprint_rewardRight.gotoAndPlay(2);
} else {
switch (_arg1.lines){
case 1:
this.DuelSprint_rewardRight.rewardTextRight.gotoAndStop(2);
this.DuelSprint_rewardRight.gotoAndPlay(2);
break;
case 2:
this.DuelSprint_rewardRight.rewardTextRight.gotoAndStop(2);
this.DuelSprint_rewardRight.gotoAndPlay(2);
break;
case 3:
this.DuelSprint_rewardRight.rewardTextRight.gotoAndStop(3);
this.DuelSprint_rewardRight.gotoAndPlay(2);
break;
case 4:
this.DuelSprint_rewardRight.rewardTextRight.gotoAndStop(4);
this.DuelSprint_rewardRight.gotoAndPlay(2);
break;
};
};
};
addAllFloor();
}
}
}//package
Section 49
//Flame (Flame)
package {
import flash.display.*;
public dynamic class Flame extends MovieClip {
public function Flame(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package
Section 50
//fog_1 (fog_1)
package {
import flash.display.*;
public dynamic class fog_1 extends MovieClip {
public function fog_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 51
//FogAdsAS3 (FogAdsAS3)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import fl.transitions.easing.*;
import flash.utils.*;
import flash.system.*;
public class FogAdsAS3 {
var admc:MovieClip;
public var time_elapsed:Number;
public var time_started:Number;
public var clip:Object;
public var aLoader:Loader;
public var clip_total:Number;
public var mc:MovieClip;
public var enterFrameFunc;
public var clip_loaded:Number;
public var clip_percent:Number;
public var options:Object;
public var res:Array;
public var localMode:Boolean;
public var ad_msec:Number;
public var urlInfo:Object;
public var bkg:MovieClip;
public function FogAdsAS3(_arg1:Object){
var o = _arg1;
super();
Security.allowDomain("*");
var defaults:Object = {adStarted:function ():void{
clip.stop();
}, adFinished:function ():void{
clip.play();
}, showOnFog:false, crossdomain:"http://www.freeonlinegames.com/crossdomain.xml", adServer:"www.freeonlinegames.com/tracking", adLoader:"loader-as3.swf"};
options = parseOptions(o, defaults);
clip = options.clip;
urlInfo = getUrlInfo(clip.root.loaderInfo.url);
}
public function addToMovieClip(_arg1:Object, _arg2:String, _arg3:Object){
_arg1.addChild(_arg3);
_arg1[_arg2] = _arg3;
_arg3.name = _arg2;
return (_arg3);
}
public function trackClick(_arg1:String):void{
var _local2:URLRequest;
if (admc){
admc.trackClick(_arg1);
} else {
_local2 = new URLRequest("http://www.freeonlinegames.com/");
navigateToURL(_local2, "_blank");
};
}
public function getUrlInfo(_arg1:String):Object{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
localMode = new RegExp("file://").test(_arg1);
var _local2:* = "";
var _local3:* = "";
if (localMode){
_local2 = "local";
_local3 = "";
} else {
_local4 = (_arg1.indexOf("://") + 3);
_local5 = _arg1.indexOf("/", _local4);
_local2 = _arg1.substring(_local4, _local5);
_local6 = (_local2.lastIndexOf(".") - 1);
_local7 = (_local2.lastIndexOf(".", _local6) + 1);
_local3 = _arg1.substr(_local5);
};
return ({domain:_local2, uri:_local3});
}
public function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number=0){
var _local4:MovieClip = new MovieClip();
return (addToMovieClip(_arg1, _arg2, _local4));
}
private function getDims(_arg1:Object):Array{
var _local2:int;
var _local3:int;
var _local4:Array;
if (typeof(_arg1.res) != "undefined"){
_local4 = _arg1.res.split("x");
_local2 = parseFloat(_local4[0]);
_local3 = parseFloat(_local4[1]);
};
if ((((_local2 == 0)) || ((_local3 == 0)))){
_local2 = clip.stage.stageWidth;
_local3 = clip.stage.stageHeight;
};
return ([_local2, _local3]);
}
private function parseOptions(_arg1:Object, _arg2:Object):Object{
var _local4:String;
var _local3:Object = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
return (_local3);
}
public function cleanupClip(_arg1:Event=null):void{
var tm:*;
var e = _arg1;
mc.removeEventListener(Event.ENTER_FRAME, enterFrameFunc);
tm = setInterval(function (){
var _local1:*;
var _local2:*;
var _local3:*;
mc.alpha = (mc.alpha - 0.0125);
if (mc.alpha < 0){
mc.alpha = 0;
clearInterval(tm);
_local1 = DisplayObjectContainer(mc).numChildren;
_local2 = (_local1 - 1);
while (_local2 >= 0) {
DisplayObjectContainer(mc).removeChildAt(_local2);
_local2--;
};
for (_local3 in mc) {
delete mc[_local3];
};
options.adFinished();
};
}, 5);
}
public function showPreGameAd(_arg1:Object):void{
var RemoteHandle = _arg1;
if ((((urlInfo.domain.indexOf(".freeonlinegames.com") > -1)) && (!(options.showOnFog)))){
options.adFinished();
return;
};
options.adStarted();
mc = createEmptyMovieClip(clip, "_fogad", 1);
res = getDims(options);
mc.x = (res[0] * 0.5);
mc.y = (res[1] * 0.5);
enterFrameFunc = function ():void{
time_elapsed = (getTimer() - time_started);
var _local1:Boolean;
clip_total = clip.loaderInfo.bytesTotal;
clip_loaded = clip.loaderInfo.bytesLoaded;
clip_percent = ((100 * clip_loaded) / clip_total);
if (time_elapsed > ad_msec){
_local1 = true;
};
if (time_elapsed > (ad_msec / 2)){
admc.showSkipButton();
};
if (((_local1) && ((admc.AdStatus == "complete")))){
admc.adFinished();
};
};
Security.loadPolicyFile(options.crossdomain);
var mLoader:* = new Loader();
var mRequest:URLRequest = new URLRequest(((((("http://" + options.adServer) + "/") + options.adLoader) + "?c=") + Math.random()));
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, function (_arg1:Event):void{
admc = MovieClip(_arg1.target.content);
admc.showAd(RemoteHandle);
});
mLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, cleanupClip);
mLoader.load(mRequest);
}
}
}//package
Section 52
//fogaudio (fogaudio)
package {
import flash.media.*;
public dynamic class fogaudio extends Sound {
}
}//package
Section 53
//frame01 (frame01)
package {
import flash.display.*;
public dynamic class frame01 extends MovieClip {
public var box:Flame;
}
}//package
Section 54
//Frame1 (Frame1)
package {
import flash.display.*;
public dynamic class Frame1 extends MovieClip {
public var box:MovieClip;
}
}//package
Section 55
//Frame2 (Frame2)
package {
import flash.display.*;
public dynamic class Frame2 extends MovieClip {
public var box:MovieClip;
}
}//package
Section 56
//Frame3 (Frame3)
package {
import flash.display.*;
public dynamic class Frame3 extends MovieClip {
public var box:MovieClip;
}
}//package
Section 57
//Frame4 (Frame4)
package {
import flash.display.*;
public dynamic class Frame4 extends MovieClip {
public var box:MovieClip;
}
}//package
Section 58
//GameCover (GameCover)
package {
import flash.display.*;
public class GameCover extends MovieClip {
public var btn_duelScreen:SimpleButton;
public var btn_moreGames:SimpleButton;
public var btn_Back:SimpleButton;
public var btn_singlePlayer:SimpleButton;
public var btn_multiPlayer:SimpleButton;
public var btn_Sprint30:SimpleButton;
public var btn_Sprint100:SimpleButton;
public var btn_Sprint50:SimpleButton;
public var mc_tower:MovieClip;
public var mc_chooseMenu:MovieClip;
public var mc_menu:MovieClip;
public var btn_Sprint80:SimpleButton;
public var btn_Marathon:SimpleButton;
public var btn_add:SimpleButton;
public function GameCover(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 59
//HitSound (HitSound)
package {
import flash.media.*;
public dynamic class HitSound extends Sound {
}
}//package
Section 60
//Infowindow (Infowindow)
package {
import flash.display.*;
public dynamic class Infowindow extends MovieClip {
public var content_box:MovieClip;
public var info_bg:MovieClip;
public var score_panel:MovieClip;
}
}//package
Section 61
//MultiMarathon (MultiMarathon)
package {
import flash.events.*;
import flash.display.*;
import bigroom.tetris.*;
import event.*;
import flash.text.*;
import Classes.bigroom.game.*;
public class MultiMarathon extends BaseGame {
public var rewardTextRight:MovieClip;
private var num:int;// = 2
private var ctext:String;// = "Race against a friend to clear as many lines as possible. Player 1 uses the W.A.S.D keys to control the falling shapes. Player 2 uses the Arrow keys to control the falling shapes. Clear lines by creating a complete row of blocks. "
public var close_right:MovieClip;
public var greenFlameLeft:MovieClip;
public var MultiMarathon_scoreRight:TextField;
public var blueFlameLeft:MovieClip;
public var MultiMarathon_lvLeft:TextField;
public var rewardTextLeft:MovieClip;
public var greenFlameRight:MovieClip;
private var right_level:int;
public var redFlameRight:MovieClip;
public var blueFlameRight:MovieClip;
private var right_score:int;
public var close_lett:MovieClip;
public var MultiMarathon_rewardRight:MovieClip;
public var MultiMarathon_lvRight:TextField;
public var yellowFlameRight:MovieClip;
public var gameAreaLeft:MovieClip;
private var left_level:int;
public var MultiMarathon_rewardLeft:MovieClip;
public var MultiMarathon_scoreLeft:TextField;
private var title:String;// = "Marathon:"
private var left_score:int;
public var yellowFlameLeft:MovieClip;
public var gameAreaRight:MovieClip;
public var redFlameLeft:MovieClip;
public function MultiMarathon(){
left_score = 0;
left_level = 1;
num = 2;
MultiMarathon_scoreLeft.text = left_score.toString();
MultiMarathon_lvLeft.text = left_level.toString();
right_score = 0;
right_level = 1;
MultiMarathon_lvRight.text = right_level.toString();
MultiMarathon_scoreRight.text = right_score.toString();
this.MultiMarathon_rewardLeft.stop();
this.MultiMarathon_rewardLeft.rewardTextLeft.stop();
this.MultiMarathon_rewardRight.stop();
this.MultiMarathon_rewardRight.rewardTextRight.stop();
this.initInfo(title, ctext);
close_right.visible = false;
close_lett.visible = false;
var _local1:int;
while (_local1 < close_lett.numChildren) {
MovieClip(close_right.getChildAt(_local1)).gotoAndStop(1);
MovieClip(close_lett.getChildAt(_local1)).gotoAndStop(1);
_local1++;
};
this.addEventListener(this.GAME_AGAIN, replay_handel);
}
public function gameOverLeft(_arg1:TetrisEvent):void{
this.MultiMarathon_rewardRight.rewardTextRight.gotoAndStop(6);
this.MultiMarathon_rewardRight.gotoAndPlay(2);
this.MultiMarathon_rewardLeft.rewardTextLeft.gotoAndStop(7);
this.MultiMarathon_rewardLeft.gotoAndPlay(2);
gameOver();
}
private function replay_handel(_arg1:Event):void{
num = 2;
this.MultiMarathon_rewardLeft.gotoAndStop(1);
this.MultiMarathon_rewardRight.gotoAndStop(1);
controllerClass1.startGame();
controllerClass2.startGame();
}
private function gameIsOver():void{
var _local1 = "multiMarathon_score";
this.score = left_score;
if (this.score < right_score){
this.score = right_score;
};
this.SaveHightScore(this.score, _local1);
}
public function MultiscoreChanged_right(_arg1:TetrisEvent):void{
right_score = _arg1.score;
right_level = _arg1.level;
MultiMarathon_scoreRight.text = right_score.toString();
MultiMarathon_lvRight.text = right_level.toString();
if (right_level >= this.max_level){
this.MultiMarathon_rewardRight.rewardTextRight.gotoAndStop(6);
this.MultiMarathon_rewardRight.gotoAndPlay(2);
this.MultiMarathon_rewardLeft.rewardTextLeft.gotoAndStop(7);
this.MultiMarathon_rewardLeft.gotoAndPlay(2);
gameOver();
} else {
if (_arg1.isSpeed){
this.MultiMarathon_rewardRight.rewardTextRight.gotoAndStop(5);
this.MultiMarathon_rewardRight.gotoAndPlay(2);
} else {
switch (_arg1.lines){
case 1:
this.MultiMarathon_rewardRight.rewardTextRight.gotoAndStop(2);
this.MultiMarathon_rewardRight.gotoAndPlay(2);
break;
case 2:
this.MultiMarathon_rewardRight.rewardTextRight.gotoAndStop(2);
this.MultiMarathon_rewardRight.gotoAndPlay(2);
break;
case 3:
this.MultiMarathon_rewardRight.rewardTextRight.gotoAndStop(3);
this.MultiMarathon_rewardRight.gotoAndPlay(2);
break;
case 4:
this.MultiMarathon_rewardRight.rewardTextRight.gotoAndStop(4);
this.MultiMarathon_rewardRight.gotoAndPlay(2);
break;
};
};
};
}
public function gameOverRight(_arg1:TetrisEvent):void{
this.MultiMarathon_rewardRight.rewardTextRight.gotoAndStop(7);
this.MultiMarathon_rewardRight.gotoAndPlay(2);
this.MultiMarathon_rewardLeft.rewardTextLeft.gotoAndStop(6);
this.MultiMarathon_rewardLeft.gotoAndPlay(2);
gameOver();
}
private function back_handel(_arg1:MouseEvent):void{
CommonEventDispatcher.getInstance().dispatchEvent(new Event(CommonEvent.GAME_AGAIN));
}
private function gameOver():void{
close_right.visible = true;
close_lett.visible = true;
var _local1:int;
while (_local1 < close_right.numChildren) {
MovieClip(close_right.getChildAt(_local1)).gotoAndPlay(2);
MovieClip(close_lett.getChildAt(_local1)).gotoAndPlay(2);
MovieClip(close_lett.getChildAt(_local1)).addFrameScript(15, gameIsOver);
_local1++;
};
controllerClass1.clearnAll();
controllerClass2.clearnAll();
controllerClass1.pauseGame();
controllerClass2.pauseGame();
}
public function MultiscoreChanged_left(_arg1:TetrisEvent):void{
left_score = _arg1.score;
left_level = _arg1.level;
MultiMarathon_scoreLeft.text = left_score.toString();
MultiMarathon_lvLeft.text = left_level.toString();
if (left_level >= this.max_level){
this.MultiMarathon_rewardLeft.rewardTextLeft.gotoAndStop(6);
this.MultiMarathon_rewardLeft.gotoAndPlay(2);
this.MultiMarathon_rewardRight.rewardTextRight.gotoAndStop(7);
this.MultiMarathon_rewardRight.gotoAndPlay(2);
gameOver();
} else {
if (_arg1.isSpeed){
this.MultiMarathon_rewardLeft.rewardTextLeft.gotoAndStop(5);
this.MultiMarathon_rewardLeft.gotoAndPlay(2);
} else {
switch (_arg1.lines){
case 1:
this.MultiMarathon_rewardLeft.rewardTextLeft.gotoAndStop(2);
this.MultiMarathon_rewardLeft.gotoAndPlay(2);
break;
case 2:
this.MultiMarathon_rewardLeft.rewardTextLeft.gotoAndStop(2);
this.MultiMarathon_rewardLeft.gotoAndPlay(2);
break;
case 3:
this.MultiMarathon_rewardLeft.rewardTextLeft.gotoAndStop(3);
this.MultiMarathon_rewardLeft.gotoAndPlay(2);
break;
case 4:
this.MultiMarathon_rewardLeft.rewardTextLeft.gotoAndStop(4);
this.MultiMarathon_rewardLeft.gotoAndPlay(2);
break;
};
};
};
}
}
}//package
Section 62
//MultiSprint (MultiSprint)
package {
import flash.events.*;
import flash.display.*;
import bigroom.tetris.*;
import event.*;
import flash.text.*;
import Classes.bigroom.game.*;
public class MultiSprint extends BaseGame {
public var rewardTextRight:MovieClip;
public var MultiSprint_rewardRight:MovieClip;
public var MultiSprint_rewardLeft:MovieClip;
private var num:int;
public var MultiSprint_scoreLeft:TextField;
private var ctext:String;// = "Race against a friend to clear the specified number of lines as quickly as possible. Player 1 uses the W.A.S.D keys to control the falling shapes Player 2 uses the Arrow Keys to control the falling shapes.Clear lines by creating a complete row of blocks. "
private var score_left:int;
public var close_right:MovieClip;
public var greenFlameLeft:MovieClip;
public var greenFlameRight:MovieClip;
public var MultiSprint_goalRight:TextField;
public var blueFlameLeft:MovieClip;
public var redFlameRight:MovieClip;
public var rewardTextLeft:MovieClip;
private var floor_right:int;
public var blueFlameRight:MovieClip;
private var score_right:int;
public var close_lett:MovieClip;
public var yellowFlameRight:MovieClip;
public var gameAreaRight:MovieClip;
private var all_floors:int;
public var yellowFlameLeft:MovieClip;
public var redFlameLeft:MovieClip;
public var gameAreaLeft:MovieClip;
public var MultiSprint_scoreRight:TextField;
private var title:String;// = "Sprint:"
private var floor_left:int;
public var MultiSprint_goalLeft:TextField;
public function MultiSprint(_arg1:int){
this.floor_right = _arg1;
this.floor_left = _arg1;
all_floors = _arg1;
score_right = 0;
score_left = 0;
close_right.visible = false;
close_lett.visible = false;
var _local2:int;
while (_local2 < close_lett.numChildren) {
MovieClip(close_right.getChildAt(_local2)).gotoAndStop(1);
MovieClip(close_lett.getChildAt(_local2)).gotoAndStop(1);
_local2++;
};
num = 2;
this.MultiSprint_rewardLeft.stop();
this.MultiSprint_rewardRight.stop();
this.MultiSprint_rewardRight.rewardTextRight.stop();
this.MultiSprint_rewardLeft.rewardTextLeft.stop();
this.initInfo(title, ctext);
this.addEventListener(this.GAME_AGAIN, replay_handel);
}
private function replay_handel(_arg1:Event):void{
this.MultiSprint_rewardLeft.gotoAndStop(1);
this.MultiSprint_rewardRight.gotoAndStop(1);
num = 2;
this.floor_right = all_floors;
this.floor_left = all_floors;
controllerClass1.startGame();
controllerClass2.startGame();
}
private function gameIsOver():void{
var _local1 = (("multiSprint" + all_floors) + "_score");
this.score = score_left;
if (this.score < score_right){
this.score = score_right;
};
this.SaveHightScore(this.score, _local1);
}
private function showText():void{
MultiSprint_scoreLeft.text = score_left.toString();
MultiSprint_scoreRight.text = score_right.toString();
MultiSprint_goalRight.text = floor_right.toString();
MultiSprint_goalLeft.text = floor_left.toString();
}
private function back_handel(_arg1:MouseEvent):void{
CommonEventDispatcher.getInstance().dispatchEvent(new Event(CommonEvent.GAME_AGAIN));
}
public function DuelscoreChanged_left(_arg1:TetrisEvent):void{
this.score_left = _arg1.score;
this.floor_left = (this.floor_left - _arg1.lines);
if (floor_left <= 0){
gameover();
this.MultiSprint_rewardLeft.rewardTextLeft.gotoAndStop(6);
this.MultiSprint_rewardLeft.gotoAndPlay(2);
this.MultiSprint_rewardRight.rewardTextRight.gotoAndStop(7);
this.MultiSprint_rewardRight.gotoAndPlay(2);
floor_left = 0;
showText();
} else {
if (_arg1.isSpeed){
this.MultiSprint_rewardLeft.rewardTextLeft.gotoAndStop(5);
this.MultiSprint_rewardLeft.gotoAndPlay(2);
} else {
switch (_arg1.lines){
case 1:
this.MultiSprint_rewardLeft.rewardTextLeft.gotoAndStop(2);
this.MultiSprint_rewardLeft.gotoAndPlay(2);
break;
case 2:
this.MultiSprint_rewardLeft.rewardTextLeft.gotoAndStop(2);
this.MultiSprint_rewardLeft.gotoAndPlay(2);
break;
case 3:
this.MultiSprint_rewardLeft.rewardTextLeft.gotoAndStop(3);
this.MultiSprint_rewardLeft.gotoAndPlay(2);
break;
case 4:
this.MultiSprint_rewardLeft.rewardTextLeft.gotoAndStop(4);
this.MultiSprint_rewardLeft.gotoAndPlay(2);
break;
};
};
};
showText();
}
public function gameOverleft(_arg1:TetrisEvent):void{
this.MultiSprint_rewardRight.rewardTextRight.gotoAndStop(6);
this.MultiSprint_rewardRight.gotoAndPlay(2);
this.MultiSprint_rewardLeft.rewardTextLeft.gotoAndStop(7);
this.MultiSprint_rewardLeft.gotoAndPlay(2);
gameover();
}
private function gameover():void{
close_right.visible = true;
close_lett.visible = true;
var _local1:int;
while (_local1 < close_right.numChildren) {
MovieClip(close_right.getChildAt(_local1)).gotoAndPlay(2);
MovieClip(close_lett.getChildAt(_local1)).gotoAndPlay(2);
MovieClip(close_lett.getChildAt(_local1)).addFrameScript(15, gameIsOver);
_local1++;
};
controllerClass1.clearnAll();
controllerClass1.pauseGame();
controllerClass2.clearnAll();
controllerClass2.pauseGame();
}
public function gameOverright(_arg1:TetrisEvent):void{
num--;
this.MultiSprint_rewardRight.rewardTextRight.gotoAndStop(7);
this.MultiSprint_rewardRight.gotoAndPlay(2);
this.MultiSprint_rewardLeft.rewardTextLeft.gotoAndStop(6);
this.MultiSprint_rewardLeft.gotoAndPlay(2);
gameover();
}
public function DuelscoreChanged_right(_arg1:TetrisEvent):void{
this.score_right = _arg1.score;
this.floor_right = (this.floor_right - _arg1.lines);
if (floor_right <= 0){
this.MultiSprint_rewardRight.rewardTextRight.gotoAndStop(6);
this.MultiSprint_rewardRight.gotoAndPlay(2);
this.MultiSprint_rewardLeft.rewardTextLeft.gotoAndStop(7);
this.MultiSprint_rewardLeft.gotoAndPlay(2);
gameover();
this.floor_right = 0;
showText();
} else {
if (_arg1.isSpeed){
this.MultiSprint_rewardRight.rewardTextRight.gotoAndStop(5);
this.MultiSprint_rewardRight.gotoAndPlay(2);
} else {
switch (_arg1.lines){
case 1:
this.MultiSprint_rewardRight.rewardTextRight.gotoAndStop(2);
this.MultiSprint_rewardRight.gotoAndPlay(2);
break;
case 2:
this.MultiSprint_rewardRight.rewardTextRight.gotoAndStop(2);
this.MultiSprint_rewardRight.gotoAndPlay(2);
break;
case 3:
this.MultiSprint_rewardRight.rewardTextRight.gotoAndStop(3);
this.MultiSprint_rewardRight.gotoAndPlay(2);
break;
case 4:
this.MultiSprint_rewardRight.rewardTextRight.gotoAndStop(4);
this.MultiSprint_rewardRight.gotoAndPlay(2);
break;
};
};
};
showText();
}
}
}//package
Section 63
//PopSound (PopSound)
package {
import flash.media.*;
public dynamic class PopSound extends Sound {
}
}//package
Section 64
//SingleMarathon (SingleMarathon)
package {
import flash.events.*;
import flash.display.*;
import bigroom.tetris.*;
import flash.text.*;
import Classes.bigroom.game.*;
public class SingleMarathon extends BaseGame {
public var SingleMarathon_lv:TextField;
private var ctext:String;// = "Clear lines by creating a complete row of blocks. Use the arrow keys to move and rotate the falling shapes. A new level is achieved after every 10 lines are cleared."
private var title:String;// = "Marathon:"
public var yellowFlame:MovieClip;
public var rewardTextLeft:MovieClip;
public var gameArea:MovieClip;
public var redFlame:MovieClip;
public var SingleMarathon_score:TextField;
public var SingleMarathon_reward:MovieClip;
public var blueFlame:MovieClip;
public var close_mc:MovieClip;
public var greenFlame:MovieClip;
public function SingleMarathon(){
this.SingleMarathon_score.text = String(score);
this.SingleMarathon_reward.stop();
this.SingleMarathon_reward.rewardTextLeft.stop();
this.addEventListener(this.GAME_AGAIN, replay_handel);
close_mc.visible = false;
var _local1:int;
while (_local1 < close_mc.numChildren) {
MovieClip(close_mc.getChildAt(_local1)).gotoAndStop(1);
_local1++;
};
this.initInfo(title, ctext);
}
public function scoreChanged(_arg1:TetrisEvent):void{
score = _arg1.score;
counter = _arg1.counter;
this.SingleMarathon_score.text = score.toString();
this.level = _arg1.level;
this.SingleMarathon_lv.text = this.level.toString();
if (this.level >= this.max_level){
controllerClass1.clearnAll();
gameOver();
this.SingleMarathon_reward.rewardTextLeft.gotoAndStop(6);
this.SingleMarathon_reward.gotoAndPlay(2);
controllerClass1.pauseGame();
} else {
if (_arg1.isSpeed){
this.SingleMarathon_reward.rewardTextLeft.gotoAndStop(5);
this.SingleMarathon_reward.gotoAndPlay(2);
} else {
switch (_arg1.lines){
case 1:
this.SingleMarathon_reward.gotoAndPlay(2);
this.SingleMarathon_reward.rewardTextLeft.gotoAndStop(2);
break;
case 2:
this.SingleMarathon_reward.gotoAndPlay(2);
this.SingleMarathon_reward.rewardTextLeft.gotoAndStop(2);
break;
case 3:
this.SingleMarathon_reward.gotoAndPlay(2);
this.SingleMarathon_reward.rewardTextLeft.gotoAndStop(3);
break;
case 4:
this.SingleMarathon_reward.gotoAndPlay(2);
this.SingleMarathon_reward.rewardTextLeft.gotoAndStop(4);
break;
};
};
};
}
private function gameIsOver():void{
this.SingleMarathon_reward.play();
this.SaveHightScore(this.score, "singleMarathon_score");
}
public function gameOver_handel(_arg1:TetrisEvent){
this.SingleMarathon_reward.rewardTextLeft.gotoAndStop(7);
this.SingleMarathon_reward.gotoAndPlay(2);
gameOver();
}
private function gameOver():void{
controllerClass1.clearnAll();
close_mc.visible = true;
var _local1:int;
while (_local1 < close_mc.numChildren) {
MovieClip(close_mc.getChildAt(_local1)).gotoAndPlay(2);
MovieClip(close_mc.getChildAt(_local1)).addFrameScript(15, gameIsOver);
_local1++;
};
}
private function replay_handel(_arg1:Event):void{
this.SingleMarathon_reward.gotoAndStop(1);
controllerClass1.startGame();
}
private function back_handel(_arg1:Event):void{
}
}
}//package
Section 65
//SingleSprint (SingleSprint)
package {
import flash.events.*;
import flash.display.*;
import bigroom.tetris.*;
import event.*;
import flash.text.*;
import Classes.bigroom.game.*;
public class SingleSprint extends BaseGame {
private var allfloor:int;
public var SingleSprint_goal:TextField;
public var floor_num:int;
private var ctext:String;// = "Clear the specified number of rows in the shortest amount of time.Clear lines by creating a complete row of blocks.Use the arrow keys to move and rotate the falling shapes. "
private var title:String;// = "Sprint:"
public var yellowFlame:MovieClip;
public var redFlame:MovieClip;
public var rewardTextLeft:MovieClip;
public var SingleSprint_reward:MovieClip;
public var gameArea:MovieClip;
public var greenFlame:MovieClip;
public var SingleSprint_score:TextField;
public var blueFlame:MovieClip;
public var close_mc:MovieClip;
public function SingleSprint(_arg1:int){
this.floor_num = _arg1;
this.allfloor = _arg1;
this.SingleSprint_score.text = this.score.toString();
this.SingleSprint_goal.text = this.floor_num.toString();
this.SingleSprint_reward.stop();
this.SingleSprint_reward.rewardTextLeft.stop();
close_mc.visible = false;
var _local2:int;
while (_local2 < close_mc.numChildren) {
MovieClip(close_mc.getChildAt(_local2)).gotoAndStop(1);
_local2++;
};
this.addEventListener(this.GAME_AGAIN, replay_handel);
this.initInfo(title, ctext);
}
public function scoreChanged(_arg1:TetrisEvent):void{
this.score = _arg1.score;
this.SingleSprint_score.text = this.score.toString();
this.floor_num = (this.floor_num - _arg1.lines);
this.SingleSprint_goal.text = this.floor_num.toString();
if (floor_num == 0){
this.SingleSprint_reward.rewardTextLeft.gotoAndStop(6);
this.SingleSprint_reward.gotoAndPlay(2);
controllerClass1.clearnAll();
onegameOver();
} else {
if (_arg1.isSpeed){
this.SingleSprint_reward.rewardTextLeft.gotoAndStop(5);
this.SingleSprint_reward.gotoAndPlay(2);
} else {
switch (_arg1.lines){
case 1:
this.SingleSprint_reward.rewardTextLeft.gotoAndStop(2);
this.SingleSprint_reward.gotoAndPlay(2);
break;
case 2:
this.SingleSprint_reward.rewardTextLeft.gotoAndStop(2);
this.SingleSprint_reward.gotoAndPlay(2);
break;
case 3:
this.SingleSprint_reward.rewardTextLeft.gotoAndStop(3);
this.SingleSprint_reward.gotoAndPlay(2);
break;
case 4:
this.SingleSprint_reward.rewardTextLeft.gotoAndStop(4);
this.SingleSprint_reward.gotoAndPlay(2);
break;
};
};
};
}
private function onegameOver():void{
close_mc.visible = true;
controllerClass1.clearnAll();
var _local1:int;
while (_local1 < close_mc.numChildren) {
MovieClip(close_mc.getChildAt(_local1)).gotoAndPlay(2);
MovieClip(close_mc.getChildAt(_local1)).addFrameScript(15, gameIsOver);
_local1++;
};
}
private function replay_handel(_arg1:Event):void{
this.floor_num = this.allfloor;
this.SingleSprint_reward.gotoAndStop(1);
controllerClass1.startGame();
}
public function gameOver(_arg1:TetrisEvent):void{
this.SingleSprint_reward.rewardTextLeft.gotoAndStop(7);
this.SingleSprint_reward.gotoAndPlay(2);
onegameOver();
}
private function back_handel(_arg1:Event):void{
CommonEventDispatcher.getInstance().dispatchEvent(new Event(CommonEvent.GAME_AGAIN));
}
private function gameIsOver():void{
var _local1 = (("singleSprint" + allfloor) + "_score");
this.SaveHightScore(this.score, _local1);
controllerClass1.pauseGame();
}
}
}//package
Section 66
//Tetrad_F (Tetrad_F)
package {
import flash.display.*;
public dynamic class Tetrad_F extends MovieClip {
}
}//package
Section 67
//Tetrad_I (Tetrad_I)
package {
import flash.display.*;
public dynamic class Tetrad_I extends MovieClip {
}
}//package
Section 68
//Tetrad_L (Tetrad_L)
package {
import flash.display.*;
public dynamic class Tetrad_L extends MovieClip {
}
}//package
Section 69
//Tetrad_O (Tetrad_O)
package {
import flash.display.*;
public dynamic class Tetrad_O extends MovieClip {
}
}//package
Section 70
//Tetrad_S (Tetrad_S)
package {
import flash.display.*;
public dynamic class Tetrad_S extends MovieClip {
}
}//package
Section 71
//Tetrad_T (Tetrad_T)
package {
import flash.display.*;
public dynamic class Tetrad_T extends MovieClip {
}
}//package
Section 72
//Tetrad_Z (Tetrad_Z)
package {
import flash.display.*;
public dynamic class Tetrad_Z extends MovieClip {
}
}//package