Section 1
//Debug (com.midasplayer.debug.Debug)
package com.midasplayer.debug {
public class Debug {
private static var s_assertHandler:IAssertHandler = null;
public static function setAssertHandler(_arg1:IAssertHandler):void{
s_assertHandler = _arg1;
}
public static function assert(_arg1:Boolean, _arg2:String):void{
var condition = _arg1;
var message = _arg2;
if (condition){
return;
};
if (s_assertHandler != null){
s_assertHandler.assert(message);
return;
};
try {
throw (new Error("StackTrace"));
} catch(e:Error) {
trace(((("Assertion failed: " + message) + "\n") + e.getStackTrace()));
};
}
}
}//package com.midasplayer.debug
Section 2
//IAssertHandler (com.midasplayer.debug.IAssertHandler)
package com.midasplayer.debug {
public interface IAssertHandler {
function assert(_arg1:String):void;
}
}//package com.midasplayer.debug
Section 3
//PerformanceInfo (com.midasplayer.debug.PerformanceInfo)
package com.midasplayer.debug {
public class PerformanceInfo {
private var _name:String;
private var _startTime:int;// = 0
private var _totalTime:int;// = 0
private var _calls:int;// = 0
private var _maxTime:int;// = 0
public function PerformanceInfo(_arg1:String){
_name = _arg1;
}
public function set stopTime(_arg1:int):void{
var _local2:int = (_arg1 - _startTime);
_calls++;
_totalTime = (_totalTime + _local2);
_maxTime = Math.max(_maxTime, _local2);
}
public function get name():String{
return (_name);
}
public function toString():String{
return ((((((((name + "\t\tAverageTime: ") + average) + "\tCalls: ") + calls) + "\tMaxTime: ") + maxTime) + "\n"));
}
public function reset():void{
_calls = 0;
_totalTime = 0;
_maxTime = 0;
_startTime = 0;
}
public function get totalTime():uint{
return (_totalTime);
}
public function get calls():uint{
return (_calls);
}
public function get maxTime():uint{
return (_maxTime);
}
public function get average():Number{
return ((_totalTime / _calls));
}
public function set startTime(_arg1:int):void{
_startTime = _arg1;
}
}
}//package com.midasplayer.debug
Section 4
//PerformanceTimer (com.midasplayer.debug.PerformanceTimer)
package com.midasplayer.debug {
import com.midasplayer.time.*;
public class PerformanceTimer {
private var _timer:ITimer;
private var _resetInterval:int;// = -1
private var _startTime:int;// = 0
private var _nameToInfo:Object;
public function PerformanceTimer(_arg1:int=-1, _arg2:ITimer=null){
_nameToInfo = new Object();
super();
_timer = ((_arg2 == null)) ? new SystemTimer() : _arg2;
_resetInterval = _arg1;
_startTime = _timer.getTime();
}
public function start(_arg1:String):void{
if (_nameToInfo[_arg1] == null){
_nameToInfo[_arg1] = new PerformanceInfo(_arg1);
};
(_nameToInfo[_arg1] as PerformanceInfo).startTime = _timer.getTime();
}
public function getInfo(_arg1:String):PerformanceInfo{
var _local2:PerformanceInfo = _nameToInfo[_arg1];
Debug.assert(!((_local2 == null)), ("Trying to getan unstarted performance timer by the name " + _arg1));
return (_local2);
}
public function stop(_arg1:String):void{
var _local2:PerformanceInfo = _nameToInfo[_arg1];
Debug.assert(!((_local2 == null)), ("Stopping an unstarted performance info by the name " + _arg1));
_local2.stopTime = _timer.getTime();
}
public function update():void{
var _local1:PerformanceInfo;
if (_resetInterval == -1){
return;
};
if ((_timer.getTime() - _startTime) < _resetInterval){
return;
};
for each (_local1 in _nameToInfo) {
_local1.reset();
};
_startTime = _timer.getTime();
}
public function toString():String{
var _local2:PerformanceInfo;
var _local1:String = new String();
for each (_local2 in _nameToInfo) {
_local1 = (_local1 + _local2.toString());
};
return (_local1);
}
}
}//package com.midasplayer.debug
Section 5
//CommandConstants (com.midasplayer.djinn.verify.CommandConstants)
package com.midasplayer.djinn.verify {
public class CommandConstants {
public static const Assert:int = 0;
public static const SelectAnswer:int = 2;
public static const LastTick:int = 3;
public static const SelectCard:int = 1;
}
}//package com.midasplayer.djinn.verify
Section 6
//LastTickPlayData (com.midasplayer.djinn.verify.LastTickPlayData)
package com.midasplayer.djinn.verify {
import com.midasplayer.game.comm.*;
import com.midasplayer.djinn.*;
public class LastTickPlayData implements IPlayData {
private var _userQuit:Boolean;// = false
private var _musicOn:Boolean;// = true
private var _totalScore:uint;
private var _soundOn:Boolean;// = true
private var _gameController:GameController;
private var _tick:uint;
public function LastTickPlayData(_arg1:GameController, _arg2:uint, _arg3:uint, _arg4:Boolean, _arg5:Boolean, _arg6:Boolean){
_gameController = _arg1;
_tick = _arg2;
_totalScore = _arg3;
_userQuit = _arg4;
_musicOn = _arg5;
_soundOn = _arg6;
}
public function execute():void{
_gameController.setQuit(_userQuit);
}
public function toPlayData():String{
return (((((((((((CommandConstants.LastTick + ",") + _tick) + ",") + _totalScore) + ",") + int(_userQuit)) + ",") + int(_musicOn)) + ",") + int(_soundOn)));
}
public function getTick():int{
return (_tick);
}
}
}//package com.midasplayer.djinn.verify
Section 7
//Recorder (com.midasplayer.djinn.verify.Recorder)
package com.midasplayer.djinn.verify {
import com.midasplayer.game.comm.*;
import com.midasplayer.djinn.*;
import com.midasplayer.game.engine.*;
public class Recorder extends PlayDataRecorder {
private var _gameController:GameController;
public function Recorder(_arg1:IGameComm, _arg2:GameController){
super(_arg1);
_gameController = _arg2;
}
public function selectAnswer(_arg1:int, _arg2:int):void{
super.add(new SelectAnswerPlayData(_gameController, _arg1, _arg2));
}
public function selectCard(_arg1:int, _arg2:int, _arg3:int):void{
super.add(new SelectCardPlayData(_gameController, _arg1, _arg2, _arg3));
}
public function addLastTick(_arg1:int, _arg2:int, _arg3:Boolean, _arg4:Boolean, _arg5:Boolean):void{
super.add(new LastTickPlayData(_gameController, _arg1, _arg2, _arg3, _arg4, _arg5));
}
}
}//package com.midasplayer.djinn.verify
Section 8
//RemoteAssertHandler (com.midasplayer.djinn.verify.RemoteAssertHandler)
package com.midasplayer.djinn.verify {
import com.midasplayer.game.comm.*;
import com.midasplayer.debug.*;
public class RemoteAssertHandler implements IAssertHandler {
private const _maxAsserts:uint = 100;
private var _communicator:IGameComm;// = null
private var _sentAsserts:uint;// = 0
public function RemoteAssertHandler(_arg1:IGameComm){
_communicator = _arg1;
}
public function assert(_arg1:String):void{
if (_sentAsserts > _maxAsserts){
return;
};
_sentAsserts++;
_arg1 = _arg1.replace(",", "_");
_communicator.addPlayData(((CommandConstants.Assert + ",0,") + _arg1));
}
}
}//package com.midasplayer.djinn.verify
Section 9
//SelectAnswerPlayData (com.midasplayer.djinn.verify.SelectAnswerPlayData)
package com.midasplayer.djinn.verify {
import com.midasplayer.game.comm.*;
import com.midasplayer.djinn.*;
public class SelectAnswerPlayData implements IPlayData {
private var _gameController:GameController;
private var _tick:int;// = -1
private var _answer:int;// = -1
public function SelectAnswerPlayData(_arg1:GameController, _arg2:int, _arg3:int){
_gameController = _arg1;
_tick = _arg2;
_answer = _arg3;
}
public function toPlayData():String{
return (((((CommandConstants.SelectAnswer + ",") + _tick) + ",") + _answer));
}
public function getTick():int{
return (_tick);
}
public function execute():void{
_gameController.setAnswer(_answer);
}
}
}//package com.midasplayer.djinn.verify
Section 10
//SelectCardPlayData (com.midasplayer.djinn.verify.SelectCardPlayData)
package com.midasplayer.djinn.verify {
import com.midasplayer.game.comm.*;
import com.midasplayer.djinn.*;
public class SelectCardPlayData implements IPlayData {
private var _layoutId:int;// = -1
private var _cardId:int;// = -1
private var _gameController:GameController;
private var _tick:int;// = -1
public function SelectCardPlayData(_arg1:GameController, _arg2:int, _arg3:int, _arg4:int){
_gameController = _arg1;
_tick = _arg2;
_layoutId = _arg3;
_cardId = _arg4;
}
public function toPlayData():String{
return (((((((CommandConstants.SelectCard + ",") + _tick) + ",") + _layoutId) + ",") + _cardId));
}
public function getTick():int{
return (_tick);
}
public function execute():void{
_gameController.setSelectCard(_layoutId, _cardId);
}
}
}//package com.midasplayer.djinn.verify
Section 11
//Card (com.midasplayer.djinn.Card)
package com.midasplayer.djinn {
import flash.events.*;
import com.midasplayer.math.*;
import com.midasplayer.game.timer.*;
import com.midasplayer.debug.*;
import flash.display.*;
import com.midasplayer.game.anim.*;
import com.midasplayer.game.text.*;
public class Card extends Sprite {
private var _col:int;
private var _question:Question;
private var _hoverTimeout:Timeout;
private var _vars:Vars;
private var _scaleIn:Boolean;// = false
private var _layer:int;
private var _moveTimeout:Timeout;
private var _wantedY:int;// = 0
private var _row:int;
private var _startDelay:Timeout;
private var _locked:Boolean;// = false
private var _wantedX:int;// = 0
private var _scaleTimeout:Timeout;
private static const HistoryPop:Class = Card_HistoryPop;
private static const EntertainmentPop:Class = Card_EntertainmentPop;
private static const NaturePop:Class = Card_NaturePop;
private static const SciencePop:Class = Card_SciencePop;
private static const GeographyPop:Class = Card_GeographyPop;
private static const SportPop:Class = Card_SportPop;
public function Card(_arg1:Question, _arg2:Vars, _arg3:int, _arg4:int, _arg5:int){
_question = _arg1;
_vars = _arg2;
_col = _arg3;
_row = _arg4;
_layer = _arg5;
_startDelay = new Timeout(0, ((3 * _arg3) + (_arg4 * 6)));
}
public function stop():void{
removeEventListener(MouseEvent.MOUSE_OVER, _onMouseOver);
}
public function unlock():void{
_locked = false;
_scaleIn = true;
_scaleTimeout = null;
}
public function getCol():int{
return (_col);
}
public function getId():int{
return (_question.getId());
}
public function isLocked():Boolean{
return (_locked);
}
public function isCovering(_arg1:Card):Boolean{
if (this._layer <= _arg1._layer){
return (false);
};
return ((((Math.abs((_col - _arg1._col)) <= 1)) && ((Math.abs((_row - _arg1._row)) <= 1))));
}
public function getScorePop(_arg1:int):TickedAnimation{
var _local2:MovieClip;
var _local4:Sprite;
if (_question.getCategory() == Category.Entertainment){
_local2 = new EntertainmentPop();
} else {
if (_question.getCategory() == Category.Geography){
_local2 = new GeographyPop();
} else {
if (_question.getCategory() == Category.History){
_local2 = new HistoryPop();
} else {
if (_question.getCategory() == Category.Nature){
_local2 = new NaturePop();
} else {
if (_question.getCategory() == Category.Science){
_local2 = new SciencePop();
} else {
if (_question.getCategory() == Category.Sport){
_local2 = new SportPop();
} else {
Debug.assert(false, "Unkown category when creating a score pop.");
};
};
};
};
};
};
_local2.stop();
_local2.mouseEnabled = false;
_local2.mouseChildren = false;
if (_question.getDifficulty() != 3){
_local4 = ((_local2.getChildAt(0) as Sprite).getChildByName("crown") as Sprite);
_local4.visible = false;
};
var _local3:TextFields = new TextFields((_local2.getChildAt(0) as Sprite));
_local3.setText("score", _arg1.toString());
return (new TickedAnimation(35, _vars.tickInterval, _local2, _local2.totalFrames));
}
public function render(_arg1:int, _arg2:Number):void{
var _local4:Sprite;
var _local5:Number;
var _local6:Number;
if (_scaleTimeout == null){
_scaleTimeout = new Timeout((_arg1 + _arg2), 10);
};
if (!_scaleIn){
this.alpha = Math.min(1, _scaleTimeout.alpha((_arg1 + _arg2)));
} else {
this.scaleX = (this.scaleY = Math.min(1, _scaleTimeout.alpha((_arg1 + _arg2))));
};
if (!_startDelay.isDone((_arg1 + _arg2))){
return;
};
var _local3:Vec2 = new Vec2((_wantedX - this.x), (_wantedY - this.y));
if (_local3.length <= 1){
_moveTimeout = null;
this.x = _wantedX;
this.y = _wantedY;
if (_scaleIn){
if (_hoverTimeout == null){
_hoverTimeout = new Timeout((_arg1 + _arg2), 10);
};
_local4 = (getChildAt(0) as Sprite);
_local5 = _hoverTimeout.alpha((_arg1 + _arg2));
_local4.y = ((-1.7 * Math.max(0, (3 - _local5))) * Math.abs(Math.sin((_local5 * Math.PI))));
if (_local5 > (7 + (Math.random() * 10))){
_hoverTimeout = null;
};
};
} else {
if (_moveTimeout == null){
_moveTimeout = new Timeout((_arg1 + _arg2), _vars.cardMoveTicks);
};
_local6 = Math.min(1, _moveTimeout.alpha((_arg1 + _arg2)));
_local3.scaleSelf(_local6);
this.x = (this.x + _local3.x);
this.y = (this.y + _local3.y);
};
}
public function start():void{
addEventListener(MouseEvent.MOUSE_OVER, _onMouseOver);
}
public function getQuestion():Question{
return (_question);
}
public function getRow():int{
return (_row);
}
public function getLayer():int{
return (_layer);
}
public function lock():void{
_locked = true;
}
public function setWanted(_arg1:int, _arg2:int):void{
_wantedX = _arg1;
_wantedY = _arg2;
}
private function _onMouseOver(_arg1:Event):void{
}
}
}//package com.midasplayer.djinn
Section 12
//Card_EntertainmentPop (com.midasplayer.djinn.Card_EntertainmentPop)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Card_EntertainmentPop extends MovieClipAsset {
public var highlight4:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var _totalScoreText:DisplayObject;
public var progress:DisplayObject;
public var bestText:DisplayObject;
public var answer2:DisplayObject;
public var answer3:DisplayObject;
public var answer4:DisplayObject;
public var answer1:DisplayObject;
public var text:DisplayObject;
public var timer:DisplayObject;
public var _totalScore:DisplayObject;
public var timeBonus:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var science:DisplayObject;
public var _scoreText:DisplayObject;
public var correctAnswer1:DisplayObject;
public var correctAnswer3:DisplayObject;
public var correctAnswer2:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var answers:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
public var correctAnswer4:DisplayObject;
public var entertainment:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var score:DisplayObject;
public var history:DisplayObject;
public var crowns:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var answerMask2:DisplayObject;
public var answerMask3:DisplayObject;
public var answerMask4:DisplayObject;
public var totalScore:DisplayObject;
public var answerMask1:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var wrongAnswer1:DisplayObject;
public var wrongAnswer2:DisplayObject;
public var wrongAnswer4:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var wrongAnswer3:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var question:DisplayObject;
public var totalScoreText:DisplayObject;
public var highlight1:DisplayObject;
public var highlight2:DisplayObject;
public var highlight3:DisplayObject;
}
}//package com.midasplayer.djinn
Section 13
//Card_GeographyPop (com.midasplayer.djinn.Card_GeographyPop)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Card_GeographyPop extends MovieClipAsset {
public var highlight4:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var _totalScoreText:DisplayObject;
public var progress:DisplayObject;
public var bestText:DisplayObject;
public var answer2:DisplayObject;
public var answer3:DisplayObject;
public var answer4:DisplayObject;
public var answer1:DisplayObject;
public var text:DisplayObject;
public var timer:DisplayObject;
public var _totalScore:DisplayObject;
public var timeBonus:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var science:DisplayObject;
public var _scoreText:DisplayObject;
public var correctAnswer1:DisplayObject;
public var correctAnswer3:DisplayObject;
public var correctAnswer2:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var answers:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
public var correctAnswer4:DisplayObject;
public var entertainment:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var score:DisplayObject;
public var history:DisplayObject;
public var crowns:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var answerMask2:DisplayObject;
public var answerMask3:DisplayObject;
public var answerMask4:DisplayObject;
public var totalScore:DisplayObject;
public var answerMask1:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var wrongAnswer1:DisplayObject;
public var wrongAnswer2:DisplayObject;
public var wrongAnswer4:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var wrongAnswer3:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var question:DisplayObject;
public var totalScoreText:DisplayObject;
public var highlight1:DisplayObject;
public var highlight2:DisplayObject;
public var highlight3:DisplayObject;
}
}//package com.midasplayer.djinn
Section 14
//Card_HistoryPop (com.midasplayer.djinn.Card_HistoryPop)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Card_HistoryPop extends MovieClipAsset {
public var highlight4:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var _totalScoreText:DisplayObject;
public var progress:DisplayObject;
public var bestText:DisplayObject;
public var answer2:DisplayObject;
public var answer3:DisplayObject;
public var answer4:DisplayObject;
public var answer1:DisplayObject;
public var text:DisplayObject;
public var timer:DisplayObject;
public var _totalScore:DisplayObject;
public var timeBonus:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var science:DisplayObject;
public var _scoreText:DisplayObject;
public var correctAnswer1:DisplayObject;
public var correctAnswer3:DisplayObject;
public var correctAnswer2:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var answers:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
public var correctAnswer4:DisplayObject;
public var entertainment:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var score:DisplayObject;
public var history:DisplayObject;
public var crowns:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var answerMask2:DisplayObject;
public var answerMask3:DisplayObject;
public var answerMask4:DisplayObject;
public var totalScore:DisplayObject;
public var answerMask1:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var wrongAnswer1:DisplayObject;
public var wrongAnswer2:DisplayObject;
public var wrongAnswer4:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var wrongAnswer3:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var question:DisplayObject;
public var totalScoreText:DisplayObject;
public var highlight1:DisplayObject;
public var highlight2:DisplayObject;
public var highlight3:DisplayObject;
}
}//package com.midasplayer.djinn
Section 15
//Card_NaturePop (com.midasplayer.djinn.Card_NaturePop)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Card_NaturePop extends MovieClipAsset {
public var highlight4:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var _totalScoreText:DisplayObject;
public var progress:DisplayObject;
public var bestText:DisplayObject;
public var answer2:DisplayObject;
public var answer3:DisplayObject;
public var answer4:DisplayObject;
public var answer1:DisplayObject;
public var text:DisplayObject;
public var timer:DisplayObject;
public var _totalScore:DisplayObject;
public var timeBonus:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var science:DisplayObject;
public var _scoreText:DisplayObject;
public var correctAnswer1:DisplayObject;
public var correctAnswer3:DisplayObject;
public var correctAnswer2:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var answers:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
public var correctAnswer4:DisplayObject;
public var entertainment:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var score:DisplayObject;
public var history:DisplayObject;
public var crowns:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var answerMask2:DisplayObject;
public var answerMask3:DisplayObject;
public var answerMask4:DisplayObject;
public var totalScore:DisplayObject;
public var answerMask1:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var wrongAnswer1:DisplayObject;
public var wrongAnswer2:DisplayObject;
public var wrongAnswer4:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var wrongAnswer3:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var question:DisplayObject;
public var totalScoreText:DisplayObject;
public var highlight1:DisplayObject;
public var highlight2:DisplayObject;
public var highlight3:DisplayObject;
}
}//package com.midasplayer.djinn
Section 16
//Card_SciencePop (com.midasplayer.djinn.Card_SciencePop)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Card_SciencePop extends MovieClipAsset {
public var highlight4:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var _totalScoreText:DisplayObject;
public var progress:DisplayObject;
public var bestText:DisplayObject;
public var answer2:DisplayObject;
public var answer3:DisplayObject;
public var answer4:DisplayObject;
public var answer1:DisplayObject;
public var text:DisplayObject;
public var timer:DisplayObject;
public var _totalScore:DisplayObject;
public var timeBonus:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var science:DisplayObject;
public var _scoreText:DisplayObject;
public var correctAnswer1:DisplayObject;
public var correctAnswer3:DisplayObject;
public var correctAnswer2:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var answers:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
public var correctAnswer4:DisplayObject;
public var entertainment:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var score:DisplayObject;
public var history:DisplayObject;
public var crowns:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var answerMask2:DisplayObject;
public var answerMask3:DisplayObject;
public var answerMask4:DisplayObject;
public var totalScore:DisplayObject;
public var answerMask1:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var wrongAnswer1:DisplayObject;
public var wrongAnswer2:DisplayObject;
public var wrongAnswer4:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var wrongAnswer3:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var question:DisplayObject;
public var totalScoreText:DisplayObject;
public var highlight1:DisplayObject;
public var highlight2:DisplayObject;
public var highlight3:DisplayObject;
}
}//package com.midasplayer.djinn
Section 17
//Card_SportPop (com.midasplayer.djinn.Card_SportPop)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Card_SportPop extends MovieClipAsset {
public var highlight4:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var _totalScoreText:DisplayObject;
public var progress:DisplayObject;
public var bestText:DisplayObject;
public var answer2:DisplayObject;
public var answer3:DisplayObject;
public var answer4:DisplayObject;
public var answer1:DisplayObject;
public var text:DisplayObject;
public var timer:DisplayObject;
public var _totalScore:DisplayObject;
public var timeBonus:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var science:DisplayObject;
public var _scoreText:DisplayObject;
public var correctAnswer1:DisplayObject;
public var correctAnswer3:DisplayObject;
public var correctAnswer2:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var answers:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
public var correctAnswer4:DisplayObject;
public var entertainment:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var score:DisplayObject;
public var history:DisplayObject;
public var crowns:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var answerMask2:DisplayObject;
public var answerMask3:DisplayObject;
public var answerMask4:DisplayObject;
public var totalScore:DisplayObject;
public var answerMask1:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var wrongAnswer1:DisplayObject;
public var wrongAnswer2:DisplayObject;
public var wrongAnswer4:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var wrongAnswer3:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var question:DisplayObject;
public var totalScoreText:DisplayObject;
public var highlight1:DisplayObject;
public var highlight2:DisplayObject;
public var highlight3:DisplayObject;
}
}//package com.midasplayer.djinn
Section 18
//Category (com.midasplayer.djinn.Category)
package com.midasplayer.djinn {
public class Category {
public static const Science:int = 4;
public static const Nature:int = 3;
public static const MaxCategories:int = 6;
public static const Entertainment:int = 0;
public static const Sport:int = 5;
public static const History:int = 2;
public static const Geography:int = 1;
}
}//package com.midasplayer.djinn
Section 19
//DjinnEngine (com.midasplayer.djinn.DjinnEngine)
package com.midasplayer.djinn {
import flash.events.*;
import com.midasplayer.game.engine.*;
import com.midasplayer.game.timer.*;
import com.midasplayer.time.*;
import flash.display.*;
public class DjinnEngine extends Engine {
private const _quitButton:MovieClip;
private const _soundButton:MovieClip;
private const _pause:Pause;
private const _musicButton:MovieClip;
private var _gameOver:GameOver;
private var _vars:Vars;
private var _game:Game;
private var _intro:Intro;
private var _gameTimerFactory:GameTimerFactory;
private static const QuitButton:Class = DjinnEngine_QuitButton;
private static const MusicButton:Class = DjinnEngine_MusicButton;
private static const SoundButton:Class = DjinnEngine_SoundButton;
public function DjinnEngine(_arg1:ITimer, _arg2:Vars){
_quitButton = new QuitButton();
_soundButton = new SoundButton();
_musicButton = new MusicButton();
_pause = new Pause();
_vars = _arg2;
_intro = new Intro(_arg2);
_game = new Game(_arg2);
_gameOver = new GameOver(_vars);
_gameTimerFactory = new GameTimerFactory(_arg1, _arg2.tickInterval, 50);
super(_intro, _game, _pause, _gameOver, _gameTimerFactory, _vars.communicator);
_soundButton.stop();
_musicButton.stop();
_quitButton.stop();
_soundButton.x = 100;
_soundButton.y = 580;
_musicButton.x = 65;
_musicButton.y = 580;
_quitButton.x = 31;
_quitButton.y = 580;
var _local3:Sprite = new Sprite();
_local3.graphics.beginFill(0);
_local3.graphics.drawRect(0, 0, 755, 600);
_local3.graphics.endFill();
addChildAt(_local3, 0);
}
private function _onMusicClick(_arg1:Event):void{
_vars.musicOn = !(_vars.musicOn);
if (_vars.musicOn){
_vars.musicManager.fadeTo(1, 200);
_musicButton.gotoAndStop(1);
} else {
_vars.musicManager.fadeTo(0, 200);
_musicButton.gotoAndStop(5);
};
}
override protected function onStopGameOver():void{
removeChild(_gameOver);
removeChild(_musicButton);
removeChild(_soundButton);
}
override protected function onStartGameOver():void{
_gameOver.init(_game.getScore(), _game.getBonus());
addChild(_gameOver);
setChildIndex(_musicButton, (numChildren - 1));
setChildIndex(_soundButton, (numChildren - 1));
removeChild(_quitButton);
}
override protected function onRunEngine():void{
_vars.musicManager.update();
_vars.soundManager.update();
}
private function _initButtons():void{
if (_vars.musicOn){
_vars.musicManager.setVolume(1);
_musicButton.gotoAndStop(1);
} else {
_vars.musicManager.setVolume(0);
_musicButton.gotoAndStop(5);
};
if (_vars.soundOn){
_vars.soundManager.setVolume(1);
_soundButton.gotoAndStop(1);
} else {
_vars.soundManager.setVolume(0);
_soundButton.gotoAndStop(5);
};
}
override protected function onStopGame():void{
removeChild(_game);
}
override protected function onStartGame():void{
addChild(_game);
addChild(_quitButton);
setChildIndex(_musicButton, (numChildren - 1));
setChildIndex(_soundButton, (numChildren - 1));
_quitButton.addEventListener(MouseEvent.CLICK, _onQuitClick);
}
private function _onMusicOut(_arg1:Event):void{
_musicButton.gotoAndStop((_vars.musicOn) ? 1 : 5);
}
private function _onSoundClick(_arg1:Event):void{
_vars.soundOn = !(_vars.soundOn);
if (_vars.soundOn){
_vars.soundManager.fadeTo(1, 200);
_soundButton.gotoAndStop(1);
} else {
_vars.soundManager.fadeTo(0, 200);
_soundButton.gotoAndStop(5);
};
}
private function _onQuitClick(_arg1:Event):void{
if (_vars.gameController.hasQuit()){
return;
};
_vars.gameController.setQuit(true);
}
private function _onSoundOut(_arg1:Event):void{
_soundButton.gotoAndStop((_vars.soundOn) ? 1 : 5);
}
private function _onSoundOver(_arg1:Event):void{
_soundButton.gotoAndStop(2);
}
public function getGame():Game{
return (_game);
}
override protected function onStartIntro():void{
addChild(_intro);
addChild(_musicButton);
addChild(_soundButton);
_soundButton.addEventListener(MouseEvent.CLICK, _onSoundClick);
_musicButton.addEventListener(MouseEvent.CLICK, _onMusicClick);
_initButtons();
}
override protected function onStopIntro():void{
removeChild(_intro);
}
private function _onMusicOver(_arg1:Event):void{
_musicButton.gotoAndStop(2);
}
}
}//package com.midasplayer.djinn
Section 20
//DjinnEngine_MusicButton (com.midasplayer.djinn.DjinnEngine_MusicButton)
package com.midasplayer.djinn {
import mx.core.*;
public class DjinnEngine_MusicButton extends MovieClipAsset {
}
}//package com.midasplayer.djinn
Section 21
//DjinnEngine_QuitButton (com.midasplayer.djinn.DjinnEngine_QuitButton)
package com.midasplayer.djinn {
import mx.core.*;
public class DjinnEngine_QuitButton extends MovieClipAsset {
}
}//package com.midasplayer.djinn
Section 22
//DjinnEngine_SoundButton (com.midasplayer.djinn.DjinnEngine_SoundButton)
package com.midasplayer.djinn {
import mx.core.*;
public class DjinnEngine_SoundButton extends MovieClipAsset {
}
}//package com.midasplayer.djinn
Section 23
//Encryption (com.midasplayer.djinn.Encryption)
package com.midasplayer.djinn {
import com.midasplayer.math.*;
import com.midasplayer.debug.*;
public class Encryption {
private var _key:int;
public function Encryption(_arg1:int){
_key = _arg1;
}
private function _encode(_arg1:int, _arg2:int, _arg3:Boolean):int{
var _local4:int = String("a").charCodeAt(0);
var _local5:int = String("z").charCodeAt(0);
var _local6:int = String("A").charCodeAt(0);
var _local7:int = String("Z").charCodeAt(0);
if (_arg3){
if ((((_arg1 >= _local4)) && ((_arg1 <= _local5)))){
return (_constraint(_arg1, _local4, _local5, _arg2));
};
if ((((_arg1 >= _local6)) && ((_arg1 <= _local7)))){
return (_constraint(_arg1, _local6, _local7, _arg2));
};
} else {
if ((((_arg1 >= _local4)) && ((_arg1 <= _local5)))){
return (_constraint(_arg1, _local4, _local5, -(_arg2)));
};
if ((((_arg1 >= _local6)) && ((_arg1 <= _local7)))){
return (_constraint(_arg1, _local6, _local7, -(_arg2)));
};
};
return (_arg1);
}
public function encrypt(_arg1:String):String{
return (_encrypt(_arg1, true));
}
public function _encrypt(_arg1:String, _arg2:Boolean):String{
var _local6:int;
var _local3:MtRandom = new MtRandom();
_local3.setSeed(_key);
var _local4 = "";
var _local5:int;
while (_local5 < _arg1.length) {
_local6 = _arg1.charCodeAt(_local5);
_local4 = (_local4 + String.fromCharCode(_encode(_local6, _local3.nextInt(15), _arg2)));
_local5++;
};
return (_local4);
}
private function _constraint(_arg1:int, _arg2:int, _arg3:int, _arg4:int):int{
var _local5:int = (_arg3 - _arg2);
Debug.assert((((_arg4 >= -(_local5))) && ((_arg4 <= _local5))), "Modifier out of range.");
var _local6:int = ((_arg1 - _arg2) + _arg4);
if (_local6 < 0){
return (((_arg3 + 1) + _local6));
};
return ((_arg2 + (_local6 % (_local5 + 1))));
}
public function decrypt(_arg1:String):String{
return (_encrypt(_arg1, false));
}
}
}//package com.midasplayer.djinn
Section 24
//Fire (com.midasplayer.djinn.Fire)
package com.midasplayer.djinn {
import flash.display.*;
public class Fire extends Sprite {
private const _height:int = 40;
private const _width:int = 20;
private const _solver:FluidSolver;
private const _spacingX:int = 1;
private const _spacingY:int = 2;
private const _palette:Array;
private var _omy:int;// = 0
private var _omx:int;// = 0
public function Fire(){
_palette = new Array(0x0100);
_solver = new FluidSolver(_width, _height, 5, 0.006, 1);
super();
var _local1:int;
while (_local1 < 64) {
_setPalette(_palette, _local1, ((_local1 << 2) - 1), 0, 0);
_setPalette(_palette, (_local1 + 64), 0xFF, ((_local1 << 2) - 1), 0);
_setPalette(_palette, (_local1 + 128), 0xFF, 0xFF, ((_local1 << 2) - 1));
_setPalette(_palette, (_local1 + 192), 0xFF, 0xFF, 0xFF);
_local1++;
};
}
public function update():void{
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:uint;
_solver.addDensity((_width / 2), (_height - 9), (100 + (Math.random() * 450)));
_solver.addDensity(((_width / 2) - 1), (_height - 10), (100 + (Math.random() * 450)));
_solver.addDensity(((_width / 2) + 1), (_height - 10), (100 + (Math.random() * 450)));
var _local1:int;
while (_local1 < _height) {
_local5 = 0;
while (_local5 < _width) {
_solver.addVelocity(_local5, _local1, (2 * (Math.random() - 0.5)), (-0.3 * Math.random()));
_local5++;
};
_local1++;
};
var _local2:Number = (mouseX / _spacingX);
var _local3:Number = (mouseY / _spacingY);
if ((((((((_local2 >= 1)) && ((_local2 <= _width)))) && ((_local3 >= 1)))) && ((_local3 <= _height)))){
_solver.addVelocity(_local2, _local3, (10 * (mouseX - _omx)), (10 * (mouseY - _omy)));
};
_omx = mouseX;
_omy = mouseY;
_solver.update(0.1);
graphics.clear();
var _local4:Array = _solver.getDensities();
_local1 = 1;
while (_local1 <= _height) {
_local6 = (_local1 * _spacingY);
_local5 = 1;
while (_local5 <= _width) {
_local7 = Math.min(250, (5 * _local4[(_local5 + (_local1 * (_width + 2)))]));
if (_local7 < 40){
} else {
_local8 = _palette[_local7];
graphics.beginFill(_local8);
graphics.drawRect((_local5 * _spacingX), (_local1 * _spacingY), _spacingX, _spacingY);
graphics.endFill();
};
_local5++;
};
_local1++;
};
}
private function _setPalette(_arg1:Array, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{
_arg3 = Math.max(0, _arg3);
_arg4 = Math.max(0, _arg4);
_arg5 = Math.max(0, _arg5);
_arg1[_arg2] = (((_arg3 << 16) + (_arg4 << 8)) + _arg5);
}
}
}//package com.midasplayer.djinn
Section 25
//FluidSolver (com.midasplayer.djinn.FluidSolver)
package com.midasplayer.djinn {
import com.midasplayer.debug.*;
public class FluidSolver {
private const _timer:PerformanceTimer;
private var _rowAdder:int;// = 0
private var _height:int;// = 0
private var _solveIterations:int;
private var _v0:Array;
private var _oldMouseX:int;// = 0
private var _oldMouseY:int;// = 0
private var _width:int;// = 0
private var _size:int;
private var _visc:Number;// = 0
private var _diff:Number;// = 0
private var _d:Array;
private var _n2:int;
private var _d0:Array;
private var _v:Array;
private var _u0:Array;
private var _u:Array;
public static const SpacingX:Number = 5;
public static const SpacingY:Number = 5;
public function FluidSolver(_arg1:int, _arg2:int, _arg3:int, _arg4:Number, _arg5:Number){
_timer = new PerformanceTimer();
super();
_width = _arg1;
_height = _arg2;
_solveIterations = _arg3;
_diff = _arg4;
_visc = _arg5;
_n2 = (_width * _height);
_size = ((_width + 2) * (_height + 2));
_d = _createArr();
_d0 = _createArr();
_u = _createArr();
_v = _createArr();
_u0 = _createArr();
_v0 = _createArr();
_rowAdder = (_width + 2);
}
private function _createArr():Array{
var _local1:Array = new Array(_size);
var _local2:int;
while (_local2 < _size) {
_local1[_local2] = 0;
_local2++;
};
return (_local1);
}
public function addDensity(_arg1:int, _arg2:int, _arg3:Number):void{
_d0[_index(_arg1, _arg2)] = (_d0[_index(_arg1, _arg2)] + _arg3);
}
public function update(_arg1:Number):void{
_timer.start("addSource");
_addSource(_u, _u0, _arg1);
_timer.stop("addSource");
_addSource(_v, _v0, _arg1);
_timer.start("diffuse");
_diffuse(1, _u0, _u, _visc, _arg1);
_timer.stop("diffuse");
_diffuse(2, _v0, _v, _visc, _arg1);
_timer.start("project");
_project(_u0, _v0, _u, _v);
_timer.stop("project");
_timer.start("advect");
_advect(1, _u, _u0, _u0, _v0, _arg1);
_timer.stop("advect");
_advect(2, _v, _v0, _u0, _v0, _arg1);
_project(_u, _v, _u0, _v0);
_addSource(_d, _d0, _arg1);
_diffuse(0, _d0, _d, _diff, _arg1);
_advect(0, _d, _d0, _u, _v, _arg1);
var _local2:int;
while (_local2 < _size) {
_d0[_local2] = (_u0[_local2] = (_v0[_local2] = 0));
_local2++;
};
}
public function getDensities():Array{
return (_d);
}
private function _index(_arg1:int, _arg2:int):int{
return ((_arg1 + (_arg2 * _rowAdder)));
}
private function _project(_arg1:Array, _arg2:Array, _arg3:Array, _arg4:Array):void{
var _local6:int;
var _local7:int;
var _local5 = 1;
while (_local5 <= _height) {
_local6 = (_local5 * _rowAdder);
_local7 = 1;
while (_local7 <= _width) {
_local6++;
_arg4[_local6] = ((-0.5 * (((_arg1[(_local6 + 1)] - _arg1[(_local6 - 1)]) + _arg2[(_local6 + _rowAdder)]) - _arg2[(_local6 - _rowAdder)])) / _width);
_arg3[_local6] = 0;
_local7++;
};
_local5++;
};
_setBnd(0, _arg4);
_setBnd(0, _arg3);
_linearlySolve(_arg3, _arg4, 1, 0, 4);
_local5 = 1;
while (_local5 <= _height) {
_local6 = (_local5 * _rowAdder);
_local7 = 1;
while (_local7 <= _width) {
_local6++;
_arg1[_local6] = (_arg1[_local6] - ((0.5 * _width) * (_arg3[(_local6 + 1)] - _arg3[(_local6 - 1)])));
_arg2[_local6] = (_arg2[_local6] - ((0.5 * _height) * (_arg3[(_local6 + _rowAdder)] - _arg3[(_local6 - _rowAdder)])));
_local7++;
};
_local5++;
};
_setBnd(1, _arg1);
_setBnd(2, _arg2);
}
private function _addSource(_arg1:Array, _arg2:Array, _arg3:Number):void{
Debug.assert((_arg1.length == _arg2.length), "Sources is of different size than densities.");
var _local4:int;
while (_local4 < _size) {
_arg1[_local4] = (_arg1[_local4] + (_arg3 * (_arg2[_local4] as Number)));
_local4++;
};
}
public function addVelocity(_arg1:int, _arg2:int, _arg3:Number, _arg4:Number):void{
var _local5:int = _index(_arg1, _arg2);
_u0[_local5] = (_u0[_local5] + _arg3);
_v0[_local5] = (_v0[_local5] + _arg4);
}
private function _diffuse(_arg1:int, _arg2:Array, _arg3:Array, _arg4:Number, _arg5:Number):void{
Debug.assert((_arg2.length == _arg3.length), "Previous density is of different size than densities.");
var _local6:Number = ((_arg5 * _arg4) * _n2);
_linearlySolve(_arg2, _arg3, _local6, _arg1, (1 + (4 * _local6)));
}
private function _advect(_arg1:Number, _arg2:Array, _arg3:Array, _arg4:Array, _arg5:Array, _arg6:Number):void{
var _local9:int;
var _local10:int;
var _local11:Number;
var _local12:Number;
var _local13:int;
var _local14:int;
var _local15:int;
var _local16:int;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local7:Number = (_arg6 * _width);
var _local8 = 1;
while (_local8 <= _height) {
_local9 = (_local8 * _rowAdder);
_local10 = 1;
while (_local10 <= _width) {
_local9++;
_local11 = Math.min(Math.max((_local10 - (_local7 * _arg4[_local9])), 0.5), (_width + 0.5));
_local12 = Math.min(Math.max((_local8 - (_local7 * _arg5[_local9])), 0.5), (_height + 0.5));
_local13 = int(_local11);
_local14 = (_local13 + 1);
_local15 = int(_local12);
_local16 = (_local15 + 1);
_local17 = (_local11 - _local13);
_local18 = (1 - _local17);
_local19 = (_local12 - _local15);
_local20 = (1 - _local19);
_arg2[_local9] = ((_local18 * ((_local20 * _arg3[_index(_local13, _local15)]) + (_local19 * _arg3[_index(_local13, _local16)]))) + (_local17 * ((_local20 * _arg3[_index(_local14, _local15)]) + (_local19 * _arg3[_index(_local14, _local16)]))));
_local10++;
};
_local8++;
};
_setBnd(_arg1, _arg2);
}
private function _linearlySolve(_arg1:Array, _arg2:Array, _arg3:Number, _arg4:Number, _arg5:Number):void{
var _local7:int;
var _local8:int;
var _local9:int;
var _local6:int;
while (_local6 < _solveIterations) {
_local7 = 1;
while (_local7 <= _height) {
_local8 = (_local7 * _rowAdder);
_local9 = 1;
while (_local9 <= _width) {
_local8++;
_arg1[_local8] = ((_arg2[_local8] + (_arg3 * (((_arg1[(_local8 - 1)] + _arg1[(_local8 + 1)]) + _arg1[(_local8 - _rowAdder)]) + _arg1[(_local8 + _rowAdder)]))) / _arg5);
_local9++;
};
_local7++;
};
_setBnd(_arg4, _arg1);
_local6++;
};
}
private function _setBnd(_arg1:int, _arg2:Array):void{
var _local3 = 1;
while (_local3 <= _height) {
_arg2[_index(0, _local3)] = ((_arg1 == 1)) ? -(_arg2[_index(1, _local3)]) : _arg2[_index(1, _local3)];
_arg2[_index((_width + 1), _local3)] = ((_arg1 == 1)) ? -(_arg2[_index(_width, _local3)]) : _arg2[_index(_width, _local3)];
_local3++;
};
_local3 = 0;
while (_local3 <= _width) {
_arg2[_index(_local3, 0)] = ((_arg1 == 2)) ? -(_arg2[_index(_local3, 1)]) : _arg2[_index(_local3, 1)];
_arg2[_index(_local3, (_height + 1))] = ((_arg1 == 2)) ? -(_arg2[_index(_local3, _height)]) : _arg2[_index(_local3, _height)];
_local3++;
};
_arg2[_index(0, 0)] = (0.5 * (_arg2[_index(1, 0)] + _arg2[_index(0, 1)]));
_arg2[_index(0, (_height + 1))] = (0.5 * (_arg2[_index(1, (_height + 1))] + _arg2[_index(0, _height)]));
_arg2[_index((_width + 1), 0)] = (0.5 * (_arg2[_index(_width, 0)] + _arg2[_index((_width + 1), 1)]));
_arg2[_index((_width + 1), (_height + 1))] = (0.5 * (_arg2[_index(_width, (_height + 1))] + _arg2[_index((_width + 1), _height)]));
}
}
}//package com.midasplayer.djinn
Section 26
//Game (com.midasplayer.djinn.Game)
package com.midasplayer.djinn {
import com.midasplayer.game.engine.*;
import com.midasplayer.game.timer.*;
import com.midasplayer.debug.*;
import flash.display.*;
import com.midasplayer.game.anim.*;
import com.midasplayer.game.text.*;
import com.midasplayer.text.*;
import flash.utils.*;
public class Game extends Sprite implements IGame {
private const _layouts:Array;
private const _gameBg:Sprite;
private var _lifeBonus:int;// = 0
private var _firstPlayRed:Boolean;// = true
private var _vars:Vars;
private var _kingCardAttentionCrown:TickedAnimation;
private var _sabre:TickedAnimation;
private var _state:int;// = 0
private var _preDoneTimeout:Timeout;
private var _kingCardAttention:Sprite;
private var _showQuestionTimeout:Timeout;
private var _kingCardAttentionScaler:Timeout;
private var _questionSheet:QuestionSheet;
private var _timeout:Timeout;
private var _lastScore:int;// = 0
private var _hasAnswerTimeout:Timeout;
private var _score:int;// = 0
private var _hideQuestionTimeout:Timeout;
private var _noAnswerTimeout:Timeout;
private var _loopMixes:Array;
private var _kingCard:Card;
private var _kingCardAttentionAnim:TickedAnimation;
private var _lampTimer:LampTimer;
private var _sign:GameOverSign;
private var _lastLoopMixTime:int;// = 0
private var _timeBonus:int;// = 0
private var _done:Boolean;// = false
private var _textFields:TextFields;
private var _nextLoopMixTime:int;
private var _waitForAnswerTimeout:Timeout;
private var _swingTimeout:Timeout;
private var _scorePops:Array;
private var _showCardsTimeout:Timeout;
private var _completedTimeout:Timeout;
private var _lifes:TickedAnimation;
private static const Loop2:Class = Game_Loop2;
private static const GameTimeout:Class = Game_GameTimeout;
private static const RedPop:Class = Game_RedPop;
public static const ShowQuestion:int = 4;
public static const WaitForCard:int = 3;
public static const PreDone:int = 9;
private static const CorrectPopSound:Class = Game_CorrectPopSound;
public static const Done:int = 10;
private static const GameOverSound:Class = Game_GameOverSound;
public static const Completed:int = 11;
private static const GameMusic:Class = Game_GameMusic;
public static const CorrectAnswer:int = 6;
public static const WrongAnswer:int = 7;
private static const ClearAllSound:Class = Game_ClearAllSound;
private static const LoseLifeSound:Class = Game_LoseLifeSound;
public static const ShowCards:int = 1;
public static const WaitForAnswer:int = 5;
public static const StartGame:int = 0;
private static const QuestionTimeoutSound:Class = Game_QuestionTimeoutSound;
private static const Lifes:Class = Game_Lifes;
private static const IncorrectPopSound:Class = Game_IncorrectPopSound;
private static const ClickCardSound:Class = Game_ClickCardSound;
private static const Sabre:Class = Game_Sabre;
private static const KingCardSound:Class = Game_KingCardSound;
private static const Loop3:Class = Game_Loop3;
private static const Loop4:Class = Game_Loop4;
private static const Loop5:Class = Game_Loop5;
private static const Loop1:Class = Game_Loop1;
public static const NewRound:int = 2;
private static const KingCardAttention:Class = Game_KingCardAttention;
private static const GameBg:Class = Game_GameBg;
public static const NoAnswer:int = 8;
public function Game(_arg1:Vars){
_gameBg = new GameBg();
_textFields = new TextFields(_gameBg);
_layouts = new Array();
_scorePops = new Array();
_nextLoopMixTime = ((30 * 1000) + ((1000 * 10) * Math.random()));
_loopMixes = [Loop1, Loop2, Loop3, Loop4, Loop5];
super();
_vars = _arg1;
addChild(_gameBg);
_lampTimer = new LampTimer(_vars);
_lampTimer.x = 90;
_lampTimer.y = 212;
addChild(_lampTimer);
var _local2:MovieClip = new Lifes();
_local2.x = 680;
_local2.y = 0;
_local2.stop();
addChild(_local2);
_lifes = new TickedAnimation(15, _vars.tickInterval, _local2);
_lifes.FirstFrame = 20;
_lifes.StopAtFrame = 35;
var _local3:MovieClip = new Sabre();
_local3.stop();
_local3.x = 35;
_local3.y = -20;
addChild(_local3);
_sabre = new TickedAnimation(33, _vars.tickInterval, _local3, _local3.totalFrames);
_local3.visible = false;
_kingCardAttention = new KingCardAttention();
var _local4:MovieClip = (_kingCardAttention.getChildAt(1) as MovieClip);
_local4.stop();
_kingCardAttentionAnim = new TickedAnimation(25, _vars.tickInterval, _local4);
_kingCardAttention.visible = false;
_kingCardAttention.cacheAsBitmap = true;
var _local5:MovieClip = (_kingCardAttention.getChildAt(2) as MovieClip);
_kingCardAttentionCrown = new TickedAnimation(25, _vars.tickInterval, _local5);
_local5.stop();
cacheAsBitmap = true;
}
private function _isCompleted():Boolean{
var _local1:Layout;
for each (_local1 in _layouts) {
if (!_local1.isEmpty()){
return (false);
};
};
return (true);
}
public function autoPlay(_arg1:Boolean):void{
var _local2:int;
var _local3:int;
var _local4:Layout;
var _local5:Card;
var _local6:Card;
if (_state == WaitForCard){
_local2 = -1;
_local3 = -1;
for each (_local4 in _layouts) {
for each (_local5 in _local4.getCards()) {
if (_local4.isCovered(_local5)){
} else {
_local3 = _local5.getId();
_local2 = _local4.getId();
break;
};
};
if (_local2 != -1){
break;
};
};
if (_local3 != -1){
_vars.gameController.setSelectCard(_local2, _local3);
};
} else {
if (_state == WaitForAnswer){
_local6 = _getSelectedCard();
if (_arg1){
_vars.gameController.setAnswer((((_local6.getQuestion().getCorrect() + 1) % 3) + 1));
} else {
_vars.gameController.setAnswer(_local6.getQuestion().getCorrect());
};
};
};
}
public function isPaused():Boolean{
return (false);
}
private function _getSelectedCard():Card{
var _local1:GameController;
var _local2:Layout;
_local1 = _vars.gameController;
_local2 = _getSelectedLayout();
var _local3:Card = _local2.getCardFromId(_local1.getSelectCardId());
Debug.assert(!((_local3 == null)), "Getting a card that doesn't exist.");
return (_local3);
}
private function _createRedPop(_arg1:int, _arg2:int, _arg3:int):void{
var _local4:MovieClip;
_local4 = new RedPop();
_local4.x = _arg2;
_local4.y = _arg3;
_local4.stop();
var _local5:TextFields = new TextFields((_local4.getChildAt(0) as Sprite));
_local5.setText("score", _arg1.toString());
var _local6:TickedAnimation = new TickedAnimation(15, _vars.tickInterval, _local4, _local4.totalFrames);
_local6.start();
_scorePops.push(_local6);
addChild(_local4);
}
public function stop():void{
_vars.musicManager.getFromClass(GameMusic).fadeToAndStop(0, 50);
}
private function _getSelectedLayout():Layout{
var _local1:GameController;
_local1 = _vars.gameController;
Debug.assert(_local1.hasSelectCard(), "No selected card.");
var _local2:Layout = _getLayout(_local1.getSelectCardLayoutId());
Debug.assert(!((_local2 == null)), "Getting a layout that doesn't exist.");
return (_local2);
}
public function tick(_arg1:int):void{
var _local3:Card;
var _local4:int;
var _local5:Card;
var _local6:Question;
var _local7:int;
var _local8:int;
var _local9:Layout;
var _local10:Card;
var _local11:TickedAnimation;
var _local12:Layout;
var _local13:Card;
var _local14:Card;
var _local2:GameController = _vars.gameController;
if (_local2.hasQuit()){
if (_questionSheet){
_questionSheet.stop();
};
_state = Done;
};
if (((((((!((_state == PreDone))) && (!((_state == Done))))) && (_timeout))) && (_timeout.isDone(_arg1)))){
_vars.soundManager.getFromClass(GameTimeout).play();
_addSign(_vars.gameData.getText("game_timesUp"), false);
_state = PreDone;
} else {
if (_state == StartGame){
_initCards(_arg1);
_showCardsTimeout = new Timeout(_arg1, 30);
_state = ShowCards;
} else {
if (_state == ShowCards){
if (!_showCardsTimeout.isDone(_arg1)){
return;
};
render(_arg1, 0);
_state = WaitForCard;
} else {
if (_state == NewRound){
_local2.clearAnswer();
_local2.clearSelectCard();
_state = WaitForCard;
} else {
if (_state == WaitForCard){
if (!_local2.hasSelectCard()){
return;
};
_local3 = _getSelectedCard();
if (((_vars.isShortGame) && ((_local3.getQuestion().getDifficulty() > 0)))){
_addSign("will be overridden", false);
_state = PreDone;
return;
};
_vars.soundManager.getFromClass(ClickCardSound).play();
_vars.recorder.selectCard(_arg1, _local2.getSelectCardLayoutId(), _local2.getSelectCardId());
_questionSheet = new QuestionSheet(_vars, _local3.getQuestion());
_questionSheet.start();
addChild(_questionSheet);
_showQuestionTimeout = new Timeout(_arg1, 2);
_getSelectedLayout().removeChild(_local3);
_state = ShowQuestion;
} else {
if (_state == ShowQuestion){
if (!_showQuestionTimeout.isDone(_arg1)){
return;
};
render(_arg1, 0);
_waitForAnswerTimeout = new Timeout(_arg1, ((_vars.answerTime * 1000) / _vars.tickInterval));
_state = WaitForAnswer;
} else {
if (_state == WaitForAnswer){
if (_waitForAnswerTimeout.isDone(_arg1)){
_vars.soundManager.getFromClass(QuestionTimeoutSound).play();
_state = NoAnswer;
} else {
if (_local2.hasAnswer()){
_local4 = _local2.getAnswer();
_local5 = _getSelectedCard();
_local6 = _local5.getQuestion();
_vars.recorder.selectAnswer(_arg1, _local2.getAnswer());
if (_local4 == _local6.getCorrect()){
_local7 = _local6.getScore();
_score = (_score + _local7);
_local8 = ((_local7 / 4) * (1 - _waitForAnswerTimeout.alpha(_arg1)));
_score = (_score + _local8);
_lastScore = (_local7 + _local8);
_state = CorrectAnswer;
} else {
_state = WrongAnswer;
};
};
};
if (_state != WaitForAnswer){
_hideQuestionTimeout = new Timeout(_arg1, 15);
_noAnswerTimeout = (_hasAnswerTimeout = new Timeout(_arg1, 15));
_questionSheet.stop();
};
} else {
if (_state == CorrectAnswer){
if (!_hideQuestionTimeout.isDone(_arg1)){
return;
};
removeChild(_questionSheet);
_questionSheet = null;
_local9 = _getSelectedLayout();
_local10 = _getSelectedCard();
if (_local10 == _kingCard){
_kingCardAttention.visible = false;
};
_local9.removeCard(_local10.getCol(), _local10.getRow());
if (_local9.isEmpty()){
if (!_kingCardAttentionAnim.isPlaying()){
_vars.soundManager.getFromClass(KingCardSound).play(0.5);
_kingCard.unlock();
_kingCard.visible = true;
_kingCardAttention.visible = true;
_kingCardAttentionAnim.start();
_kingCardAttentionScaler = new Timeout(_arg1, 10);
_kingCardAttentionCrown.start();
};
};
_vars.soundManager.getFromClass(CorrectPopSound).play();
_local11 = _local10.getScorePop(_lastScore);
_lastScore = 0;
_local11.getMovieClip().x = ((_local9.x + _local10.x) - 10);
_local11.getMovieClip().y = ((_local9.y + _local10.y) - 40);
_local11.start();
addChild(_local11.getMovieClip());
_scorePops.push(_local11);
if (_isCompleted()){
_timeBonus = Math.max(0, (_vars.maxTimeBonus * (1 - _timeout.alpha(_arg1))));
_lifeBonus = (_vars.lives * 1000);
_completedTimeout = new Timeout(_arg1, 30);
_createRedPop(_timeBonus, 80, 100);
_createRedPop(_lifeBonus, 675, 80);
_vars.soundManager.getFromClass(CorrectPopSound).play();
_state = Completed;
} else {
_state = NewRound;
};
} else {
if ((((_state == WrongAnswer)) || ((_state == NoAnswer)))){
if (!_hideQuestionTimeout.isDone(_arg1)){
return;
};
removeChild(_questionSheet);
_questionSheet = null;
_local12 = _getSelectedLayout();
_local13 = _getSelectedCard();
_vars.lives = (_vars.lives - 1);
if (_vars.lives > 0){
_local14 = _local12.replaceCard(_local13.getCol(), _local13.getRow());
if (_local13 == _kingCard){
_kingCard = _local14;
};
};
_vars.soundManager.getFromClass(LoseLifeSound).play();
_state = NewRound;
if (_vars.lives == 1){
_lifes.FirstFrame = 53;
_lifes.StopAtFrame = 70;
} else {
if (_vars.lives == 0){
_lifes.FirstFrame = 93;
_lifes.StopAtFrame = 115;
_addSign(_vars.gameData.getText("game_gameOver"), false);
_vars.soundManager.getFromClass(GameOverSound).play();
_state = PreDone;
};
};
if (_lifes.isPlaying()){
_lifes.stop();
};
_lifes.start();
_swingTimeout = new Timeout(_arg1, 20);
if (_sabre.isPlaying()){
_sabre.stop();
};
_sabre.getMovieClip().visible = true;
_sabre.start();
} else {
if (_state == Completed){
if (!_completedTimeout.isDone(_arg1)){
return;
};
_vars.soundManager.getFromClass(ClearAllSound).play();
_addSign(_vars.gameData.getText("game_allCleared"), true);
_state = PreDone;
} else {
if (_state == PreDone){
if (_preDoneTimeout == null){
_preDoneTimeout = new Timeout(_arg1, 55);
_vars.musicManager.getFromClass(GameMusic).fadeToAndStop(0, 150);
};
if (_preDoneTimeout.isDone(_arg1)){
_state = Done;
};
} else {
if ((((_state == Done)) && (!(_done)))){
_vars.recorder.addLastTick(_arg1, getFinalScore(), _vars.gameController.getUserQuit(), _vars.musicOn, _vars.soundOn);
_done = true;
};
};
};
};
};
};
};
};
};
};
};
};
}
public function render(_arg1:int, _arg2:Number):void{
var _local6:Layout;
var _local8:TickedAnimation;
var _local9:Number;
var _local10:int;
var _local11:Number;
var _local3:Number = _timeout.alpha((_arg1 + _arg2));
var _local4:Number = (_vars.gameTime * (1 - _local3));
var _local5:String = Numbers.asTime((_local4 * 1000), false, true);
_textFields.setText("score", _score.toString());
if (_state == ShowCards){
} else {
if (_state == ShowQuestion){
_questionSheet.alpha = _showQuestionTimeout.alpha((_arg1 + _arg2));
} else {
if (_state == WaitForAnswer){
_local3 = _waitForAnswerTimeout.alpha((_arg1 + _arg2));
_local4 = (_vars.answerTime * (1 - _local3));
_local5 = Numbers.asTime((_local4 * 1000), false, true);
_questionSheet.render(_arg1, _arg2);
} else {
if ((((((_state == NoAnswer)) || ((_state == CorrectAnswer)))) || ((_state == WrongAnswer)))){
_questionSheet.render(_arg1, _arg2);
if ((((_state == CorrectAnswer)) || ((_state == WrongAnswer)))){
_questionSheet.reveal(_vars.gameController.getAnswer(), (_state == CorrectAnswer));
};
_local9 = _hideQuestionTimeout.alpha((_arg1 + _arg2));
if (_local9 > 0.8){
_questionSheet.alpha = (1 - ((_local9 - 0.8) / 0.2));
};
};
};
};
};
for each (_local6 in _layouts) {
_local6.render(_arg1, _arg2);
if ((((_state == PreDone)) && (!((_preDoneTimeout == null))))){
_local6.alpha = (1 - _preDoneTimeout.alpha(_arg1));
};
};
if ((((_state == PreDone)) && (!((_preDoneTimeout == null))))){
_lampTimer.alpha = (1 - _preDoneTimeout.alpha(_arg1));
_gameBg.alpha = (1 - _preDoneTimeout.alpha(_arg1));
_lifes.getMovieClip().alpha = (1 - _preDoneTimeout.alpha(_arg1));
_kingCardAttention.alpha = (1 - _preDoneTimeout.alpha(_arg1));
if (_questionSheet != null){
_questionSheet.alpha = (1 - _preDoneTimeout.alpha(_arg1));
};
};
var _local7:Array = new Array();
for each (_local8 in _scorePops) {
if (!_local8.isPlaying()){
removeChild(_local8.getMovieClip());
} else {
_local8.render(_arg1, _arg2);
_local7.push(_local8);
};
};
_scorePops = _local7;
_lampTimer.render(_arg1, _arg2);
if (_lifes.isPlaying()){
_lifes.render(_arg1, _arg2);
};
if (((((!((_swingTimeout == null))) && ((_swingTimeout.alpha((_arg1 + _arg2)) < 3)))) && ((_swingTimeout.alpha((_arg1 + _arg2)) > 0.3)))){
_lifes.getMovieClip().rotation = ((3 - _swingTimeout.alpha((_arg1 + _arg2))) * Math.sin((_swingTimeout.alpha((_arg1 + _arg2)) * Math.PI)));
};
if (_sabre.isPlaying()){
_sabre.render(_arg1, _arg2);
};
if (_kingCardAttentionAnim.isPlaying()){
_kingCardAttentionAnim.render(_arg1, _arg2);
};
if (_kingCardAttentionCrown.isPlaying()){
_kingCardAttentionCrown.render(_arg1, _arg2);
};
if (_sign != null){
_sign.render(_arg1, _arg2);
};
if ((getTimer() - _lastLoopMixTime) > _nextLoopMixTime){
_lastLoopMixTime = getTimer();
_nextLoopMixTime = ((1000 * 20) + (Math.random() * 20));
_local10 = (Math.random() * _loopMixes.length);
_local11 = _vars.loopVolume;
_vars.musicManager.getFromClass(_loopMixes[_local10]).play(_local11);
};
}
private function _getLayout(_arg1:int):Layout{
var _local2:Layout;
for each (_local2 in _layouts) {
if (_local2.getId() == _arg1){
return (_local2);
};
};
return (null);
}
public function getFinalScore():int{
return (((_score + _timeBonus) + _lifeBonus));
}
private function _initCards(_arg1:int):void{
var _local2:LayoutParser;
var _local4:Layout;
_kingCardAttention.visible = false;
_kingCardAttention.x = 371;
_kingCardAttention.y = 225;
addChild(_kingCardAttention);
_local2 = new LayoutParser(_vars);
var _local3:Array = _local2.getLayouts();
for each (_local4 in _local3) {
_local4.start();
addChild(_local4);
_layouts.push(_local4);
if (_local4.getCards().length == 1){
_kingCard = _local4.getCards()[0];
_kingCard.lock();
_kingCard.visible = false;
};
};
}
private function _addSign(_arg1:String, _arg2:Boolean):void{
if (_vars.isShortGame){
_arg1 = _vars.gameData.getText("game_register");
};
_sign = new GameOverSign(_vars, _arg1, _arg2);
_sign.x = (_gameBg.width * 0.5);
_sign.y = 300;
addChild(_sign);
}
public function isDone():Boolean{
return (_done);
}
public function getState():int{
return (_state);
}
public function getScore():int{
return (_score);
}
public function start():void{
_timeout = new Timeout(0, ((_vars.gameTime * 1000) / _vars.tickInterval));
_vars.musicManager.getFromClass(GameMusic).loop(0);
_vars.musicManager.getFromClass(GameMusic).fadeTo(_vars.musicVolume, 500);
}
public function getBonus():int{
return ((_timeBonus + _lifeBonus));
}
}
}//package com.midasplayer.djinn
Section 27
//Game_ClearAllSound (com.midasplayer.djinn.Game_ClearAllSound)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_ClearAllSound extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 28
//Game_ClickCardSound (com.midasplayer.djinn.Game_ClickCardSound)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_ClickCardSound extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 29
//Game_CorrectPopSound (com.midasplayer.djinn.Game_CorrectPopSound)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_CorrectPopSound extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 30
//Game_GameBg (com.midasplayer.djinn.Game_GameBg)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_GameBg extends SpriteAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 31
//Game_GameMusic (com.midasplayer.djinn.Game_GameMusic)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_GameMusic extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 32
//Game_GameOverSound (com.midasplayer.djinn.Game_GameOverSound)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_GameOverSound extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 33
//Game_GameTimeout (com.midasplayer.djinn.Game_GameTimeout)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_GameTimeout extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 34
//Game_IncorrectPopSound (com.midasplayer.djinn.Game_IncorrectPopSound)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_IncorrectPopSound extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 35
//Game_KingCardAttention (com.midasplayer.djinn.Game_KingCardAttention)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_KingCardAttention extends MovieClipAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 36
//Game_KingCardSound (com.midasplayer.djinn.Game_KingCardSound)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_KingCardSound extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 37
//Game_Lifes (com.midasplayer.djinn.Game_Lifes)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_Lifes extends MovieClipAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 38
//Game_Loop1 (com.midasplayer.djinn.Game_Loop1)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_Loop1 extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 39
//Game_Loop2 (com.midasplayer.djinn.Game_Loop2)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_Loop2 extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 40
//Game_Loop3 (com.midasplayer.djinn.Game_Loop3)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_Loop3 extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 41
//Game_Loop4 (com.midasplayer.djinn.Game_Loop4)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_Loop4 extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 42
//Game_Loop5 (com.midasplayer.djinn.Game_Loop5)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_Loop5 extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 43
//Game_LoseLifeSound (com.midasplayer.djinn.Game_LoseLifeSound)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_LoseLifeSound extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 44
//Game_QuestionTimeoutSound (com.midasplayer.djinn.Game_QuestionTimeoutSound)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_QuestionTimeoutSound extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 45
//Game_RedPop (com.midasplayer.djinn.Game_RedPop)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_RedPop extends MovieClipAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 46
//Game_Sabre (com.midasplayer.djinn.Game_Sabre)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Game_Sabre extends MovieClipAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 47
//GameController (com.midasplayer.djinn.GameController)
package com.midasplayer.djinn {
import com.midasplayer.debug.*;
public class GameController {
private var _layoutId:int;// = -1
private var _hasQuit:Boolean;// = false
private var _answer:int;// = -1
private var _userQuit:Boolean;// = false
private var _cardId:int;// = -1
private var _hasSelectCard:Boolean;// = false
private var _hasAnswer:Boolean;// = false
public function setAnswer(_arg1:int):void{
Debug.assert((((_arg1 >= 1)) && ((_arg1 <= 4))), "Trying to set undefined answer.");
_answer = _arg1;
_hasAnswer = true;
}
public function hasQuit():Boolean{
return (_hasQuit);
}
public function setQuit(_arg1:Boolean):void{
_hasQuit = true;
_userQuit = _arg1;
}
public function clearSelectCard():void{
_hasSelectCard = false;
}
public function getSelectCardId():int{
Debug.assert(_hasSelectCard, "Trying to get a question id for a card that has not been selected.");
return (_cardId);
}
public function hasSelectCard():Boolean{
return (_hasSelectCard);
}
public function getSelectCardLayoutId():int{
Debug.assert(_hasSelectCard, "Trying to get a layout id for a card that has not been selected.");
return (_layoutId);
}
public function clearAnswer():void{
_hasAnswer = false;
}
public function setSelectCard(_arg1:int, _arg2:int):void{
_layoutId = _arg1;
_cardId = _arg2;
_hasSelectCard = true;
}
public function getUserQuit():Boolean{
return (_userQuit);
}
public function getAnswer():int{
Debug.assert(_hasAnswer, "Trying to get an answer that has not been given yet.");
return (_answer);
}
public function hasAnswer():Boolean{
return (_hasAnswer);
}
}
}//package com.midasplayer.djinn
Section 48
//GameOver (com.midasplayer.djinn.GameOver)
package com.midasplayer.djinn {
import flash.events.*;
import com.midasplayer.game.engine.*;
import com.midasplayer.game.timer.*;
import flash.display.*;
import com.midasplayer.game.anim.*;
import com.midasplayer.game.text.*;
import com.midasplayer.text.*;
public class GameOver extends Sprite implements IRunnable {
private const _gameOverMc:MovieClip;
private var _total:int;// = 0
private var _doneAllowed:Timeout;
private var _vars:Vars;
private var _bestScore:String;
private var _gameOver:TickedAnimation;
private var _bonus:int;// = 0
private var _done:Boolean;
private var _textFields:TextFields;
private var _timeout:Timeout;
private var _score:int;// = 0
private var _allowDone:Boolean;// = false
private static const GameOverBg:Class = GameOver_GameOverBg;
private static const GameOverMusic:Class = GameOver_GameOverMusic;
public function GameOver(_arg1:Vars){
_gameOverMc = new GameOverBg();
super();
_vars = _arg1;
_timeout = new Timeout(0, ((_vars.gameOverTime * 1000) / _vars.tickInterval));
addChild(_gameOverMc);
_gameOverMc.x = (_gameOverMc.width * 0.5);
_gameOverMc.y = (_gameOverMc.height * 0.5);
_doneAllowed = new Timeout(0, (2000 / _vars.tickInterval));
_gameOverMc.stop();
}
public function stop():void{
removeEventListener(MouseEvent.MOUSE_UP, _onClick);
_vars.musicManager.getFromClass(GameOverMusic).fadeToAndStop(0, 1000);
}
public function init(_arg1:int, _arg2:int):void{
_score = _arg1;
_bonus = _arg2;
_total = (_arg1 + _arg2);
var _local3:int = (_arg1 + _arg2);
_bestScore = Math.max(_local3, _vars.gameData.getElementTextAsInt("bestScore")).toString();
_textFields = new TextFields(_gameOverMc);
_gameOver = new TickedAnimation(25, _vars.tickInterval, _gameOverMc, _gameOverMc.totalFrames);
_gameOver.start();
}
public function isDone():Boolean{
return ((_vars.isShortGame) ? true : _done);
}
public function render(_arg1:int, _arg2:Number):void{
if (_gameOver.isPlaying()){
_gameOver.render(_arg1, _arg2);
};
if ((((_gameOverMc.getChildByName("scoreText") == null)) || ((_gameOverMc.getChildByName("_scoreText") == null)))){
return;
};
_textFields.setText("title", _vars.gameData.getText("gameover_title"));
_textFields.setText("_title", _vars.gameData.getText("gameover_title"));
_textFields.setText("scoreText", _vars.gameData.getText("gameover_score"));
_textFields.setText("_scoreText", _vars.gameData.getText("gameover_score"));
_textFields.setText("score", _score.toString());
_textFields.setText("_score", _score.toString());
_textFields.setText("timeBonusText", _vars.gameData.getText("gameover_bonus"));
_textFields.setText("_timeBonusText", _vars.gameData.getText("gameover_bonus"));
_textFields.setText("timeBonus", _bonus.toString());
_textFields.setText("_timeBonus", _bonus.toString());
_textFields.setText("totalScoreText", _vars.gameData.getText("gameover_totalScore"));
_textFields.setText("_totalScoreText", _vars.gameData.getText("gameover_totalScore"));
_textFields.setText("totalScore", _total.toString());
_textFields.setText("_totalScore", _total.toString());
_textFields.setText("bestText", _vars.gameData.getText("gameover_bestText"));
_textFields.setText("_bestText", _vars.gameData.getText("gameover_bestText"));
_textFields.setText("bestScore", _bestScore);
_textFields.setText("_best", _bestScore);
var _local3:String = Numbers.asTime((((1 - _timeout.alpha((_arg1 + _arg2))) * _vars.gameOverTime) * 1000), false, false);
_textFields.setText("timeLeft", _vars.gameData.getText("gameover_gameStopsIn"));
_textFields.setText("time", _local3.toString());
}
public function start():void{
addEventListener(MouseEvent.MOUSE_UP, _onClick);
_vars.musicManager.getFromClass(GameOverMusic).play(0);
_vars.musicManager.getFromClass(GameOverMusic).fadeTo(0.4, 300);
}
public function tick(_arg1:int):void{
if (_doneAllowed.isDone(_arg1)){
_allowDone = true;
};
if (_timeout.isDone(_arg1)){
_done = true;
};
}
private function _onClick(_arg1:MouseEvent):void{
if (_allowDone){
_done = true;
};
}
}
}//package com.midasplayer.djinn
Section 49
//GameOver_GameOverBg (com.midasplayer.djinn.GameOver_GameOverBg)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class GameOver_GameOverBg extends MovieClipAsset {
public var totalScoreText:DisplayObject;
public var _best:DisplayObject;
public var _totalScore:DisplayObject;
public var bestScore:DisplayObject;
public var _bestText:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var time:DisplayObject;
public var title:DisplayObject;
public var timeBonus:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _scoreText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var timeLeft:DisplayObject;
public var _title:DisplayObject;
}
}//package com.midasplayer.djinn
Section 50
//GameOver_GameOverMusic (com.midasplayer.djinn.GameOver_GameOverMusic)
package com.midasplayer.djinn {
import mx.core.*;
public class GameOver_GameOverMusic extends SoundAsset {
}
}//package com.midasplayer.djinn
Section 51
//GameOverSign (com.midasplayer.djinn.GameOverSign)
package com.midasplayer.djinn {
import flash.display.*;
import com.midasplayer.game.anim.*;
import com.midasplayer.game.text.*;
public class GameOverSign extends Sprite {
private var _textFields:TextFields;
private var _crown:TickedAnimation;
private var _vars:Vars;
private var _text:String;
private var _anim:TickedAnimation;
private var _sign:MovieClip;
private static const Sign:Class = GameOverSign_Sign;
public function GameOverSign(_arg1:Vars, _arg2:String, _arg3:Boolean){
_sign = new Sign();
super();
_vars = _arg1;
_text = _arg2;
_textFields = new TextFields(_sign);
_sign.stop();
_anim = new TickedAnimation(25, _arg1.tickInterval, _sign, _sign.totalFrames);
_anim.start();
addChild(_sign);
var _local4:MovieClip = (_sign.getChildByName("crown") as MovieClip);
_local4.stop();
if (!_arg3){
_local4.visible = false;
return;
};
_crown = new TickedAnimation(25, _vars.tickInterval, _local4);
_crown.start();
}
public function render(_arg1:int, _arg2:Number):void{
if (_textFields.exists("text")){
_textFields.setText("text", _text);
};
_anim.render(_arg1, _arg2);
if (_crown != null){
_crown.render(_arg1, _arg2);
};
}
}
}//package com.midasplayer.djinn
Section 52
//GameOverSign_Sign (com.midasplayer.djinn.GameOverSign_Sign)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class GameOverSign_Sign extends MovieClipAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var history:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 53
//Intro (com.midasplayer.djinn.Intro)
package com.midasplayer.djinn {
import flash.events.*;
import com.midasplayer.game.engine.*;
import com.midasplayer.game.timer.*;
import flash.display.*;
import com.midasplayer.game.anim.*;
import com.midasplayer.game.text.*;
import com.midasplayer.text.*;
public class Intro extends Sprite implements IRunnable {
private const _introBg:MovieClip;
private var _done:Boolean;
private var _vars:Vars;
private var _timeout:Timeout;
private var _categoryAnim:TickedAnimation;
private static const IntroMusic:Class = Intro_IntroMusic;
private static const IntroAll:Class = Intro_IntroAll;
public function Intro(_arg1:Vars){
_introBg = new IntroAll();
super();
_vars = _arg1;
_timeout = new Timeout(0, ((_vars.introTime * 1000) / _vars.tickInterval));
addChild(_introBg);
_introBg.x = (_introBg.width * 0.5);
_introBg.y = (_introBg.height * 0.5);
cacheAsBitmap = true;
}
public function stop():void{
removeEventListener(MouseEvent.MOUSE_UP, _onClick);
_vars.musicManager.getFromClass(IntroMusic).fadeToAndStop(0, 1000);
}
public function start():void{
addEventListener(MouseEvent.MOUSE_UP, _onClick);
_vars.musicManager.getFromClass(IntroMusic).play(_vars.musicVolume);
}
private function _onClick(_arg1:MouseEvent):void{
_done = true;
}
public function render(_arg1:int, _arg2:Number):void{
var _local6:String;
var _local3:TextFields = new TextFields(_introBg);
if (_local3.exists("title")){
_local3.setText("title", _vars.gameData.getText("intro_title"));
};
if (_local3.exists("_title")){
_local3.setText("_title", _vars.gameData.getText("intro_title"));
};
if (_local3.exists("text")){
_local3.setText("text", _vars.gameData.getText("intro_instructions"));
};
if (_local3.exists("timeLeft")){
_local6 = Numbers.asTime((((1 - _timeout.alpha((_arg1 + _arg2))) * _vars.introTime) * 1000), false, false);
_local3.setText("timeLeft", _vars.gameData.getText("intro_gameStartsIn"));
_local3.setText("time", _local6.toString());
};
var _local4:MovieClip = (_introBg.getChildByName("categoryPop") as MovieClip);
if (_local4 == null){
return;
};
if (!_categoryAnim){
_local4.stop();
_categoryAnim = new TickedAnimation(50, _vars.tickInterval, _local4, _local4.totalFrames);
_categoryAnim.start();
};
_categoryAnim.render(_arg1, _arg2);
var _local5:TextFields = new TextFields(_local4);
if (_local5.exists("entertainment")){
_local5.setText("entertainment", _vars.gameData.getText("entertainment"));
};
if (_local5.exists("geography")){
_local5.setText("geography", _vars.gameData.getText("geography"));
};
if (_local5.exists("sport")){
_local5.setText("sport", _vars.gameData.getText("sports"));
};
if (_local5.exists("nature")){
_local5.setText("nature", _vars.gameData.getText("nature"));
};
if (_local5.exists("history")){
_local5.setText("history", _vars.gameData.getText("history"));
};
if (_local5.exists("science")){
_local5.setText("science", _vars.gameData.getText("science"));
};
}
public function isDone():Boolean{
return (_done);
}
public function tick(_arg1:int):void{
if (_timeout.isDone(_arg1)){
_done = true;
};
}
}
}//package com.midasplayer.djinn
Section 54
//Intro_IntroAll (com.midasplayer.djinn.Intro_IntroAll)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Intro_IntroAll extends MovieClipAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 55
//Intro_IntroMusic (com.midasplayer.djinn.Intro_IntroMusic)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class Intro_IntroMusic extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 56
//LampTimer (com.midasplayer.djinn.LampTimer)
package com.midasplayer.djinn {
import com.midasplayer.game.timer.*;
import flash.display.*;
import com.midasplayer.game.anim.*;
public class LampTimer extends Sprite {
private const _lampTimer:MovieClip;
private const _flame:Fire;
private var _fluid:MovieClip;
private var _timeAlarm:TickedAnimation;
private var _gameTimeout:Timeout;
private var _warnCount:int;// = 0
private var _vars:Vars;
private static const Lampy:Class = LampTimer_Lampy;
private static const TimeAlarm:Class = LampTimer_TimeAlarm;
private static const GlobalTimeWarning:Class = LampTimer_GlobalTimeWarning;
public function LampTimer(_arg1:Vars){
_lampTimer = new Lampy();
_flame = new Fire();
super();
addChild(_lampTimer);
_lampTimer.stop();
_flame.x = 35;
_flame.y = -128;
addChild(_flame);
_vars = _arg1;
_gameTimeout = new Timeout(0, ((_vars.gameTime * 1000) / _vars.tickInterval));
var _local2:MovieClip = new TimeAlarm();
_local2.stop();
_local2.visible = false;
_timeAlarm = new TickedAnimation(5, _vars.tickInterval, _local2);
addChild(_local2);
}
public function render(_arg1:int, _arg2:Number):void{
var _local3:Number;
_flame.update();
_local3 = _gameTimeout.alpha((_arg1 + _arg2));
var _local4:int = (_local3 * _lampTimer.totalFrames);
_lampTimer.gotoAndStop(_local4);
var _local5:Number = (_vars.gameTime * _local3);
if ((_vars.gameTime * (1 - _local3)) < 4.7){
if (!_timeAlarm.isPlaying()){
_timeAlarm.start();
_timeAlarm.getMovieClip().visible = true;
};
if (((!(_vars.soundManager.getFromClass(GlobalTimeWarning).isPlaying())) && ((_warnCount < 4)))){
_vars.soundManager.getFromClass(GlobalTimeWarning).play();
_warnCount++;
};
_timeAlarm.render(_arg1, _arg2);
};
}
}
}//package com.midasplayer.djinn
Section 57
//LampTimer_GlobalTimeWarning (com.midasplayer.djinn.LampTimer_GlobalTimeWarning)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class LampTimer_GlobalTimeWarning extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var history:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 58
//LampTimer_Lampy (com.midasplayer.djinn.LampTimer_Lampy)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class LampTimer_Lampy extends MovieClipAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var history:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 59
//LampTimer_TimeAlarm (com.midasplayer.djinn.LampTimer_TimeAlarm)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class LampTimer_TimeAlarm extends MovieClipAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var history:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var _best:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 60
//Layout (com.midasplayer.djinn.Layout)
package com.midasplayer.djinn {
import flash.events.*;
import com.midasplayer.debug.*;
import com.midasplayer.timing.*;
import flash.display.*;
import flash.geom.*;
public class Layout extends Sprite implements ITickable, IRenderable {
private const _cardBody:Array;
private var _width:int;// = 0
private var _height:int;// = 0
private var _vars:Vars;
private var _cards:Array;
private var _id:int;// = -1
public function Layout(_arg1:Vars, _arg2:int, _arg3:Array, _arg4:Array, _arg5:int, _arg6:int){
var _local14:Array;
var _local15:int;
var _local16:int;
var _local17:int;
var _local18:int;
var _local19:int;
var _local20:Question;
_cards = new Array();
_cardBody = [[0, 0], [1, 0], [0, 1], [1, 1]];
super();
Debug.assert((_arg3.length == _arg4.length), "The layer array is of other size than the difficulty array.");
_vars = _arg1;
_id = _arg2;
var _local7:QuestionParser = _vars.questionParser;
_width = _arg5;
_height = _arg6;
var _local8:int;
var _local9:Array = new Array(Category.MaxCategories);
var _local10:int = (_arg1.gameData.randomSeed % Category.MaxCategories);
var _local11:int;
while (_local11 < Category.MaxCategories) {
_local9[_local11] = ((_local11 + _local10) % Category.MaxCategories);
_local11++;
};
var _local12:Boolean;
var _local13:int = _arg1.random.nextInt(3);
for each (_local14 in _arg3) {
_local15 = _arg4[_local8];
Debug.assert((((_local15 >= 0)) && ((_local15 <= 3))), "Difficulty out of range when generating layup.");
_local16 = 0;
while (_local16 < _height) {
_local17 = 0;
while (_local17 < _width) {
_local18 = _local14[(_local17 + (_local16 * _width))];
if ((((_local18 == 0)) || ((_local18 == 3)))){
} else {
Debug.assert((_local14[((_local17 + 1) + (_local16 * _width))] == _local18), "Each card in the layup has to be 2x2.");
Debug.assert((_local14[(_local17 + ((_local16 + 1) * _width))] == _local18), "Each card in the layup has to be 2x2.");
Debug.assert((_local14[((_local17 + 1) + ((_local16 + 1) * _width))] == _local18), "Each card in the layup has to be 2x2.");
if (_cards.length >= 4){
_local13 = ((_local13 + 1) % 3);
} else {
_local13 = _arg1.random.nextInt(3);
};
_local19 = ((_id == 0)) ? _local9[_local13] : _local9[(_local13 + 3)];
_local20 = _vars.questionParser.getNextQuestion(_local15, _local19);
_addCard(_local20, _local17, _local16, _local8);
_local14[((_local17 + 1) + (_local16 * _width))] = 3;
_local14[(_local17 + ((_local16 + 1) * _width))] = 3;
_local14[((_local17 + 1) + ((_local16 + 1) * _width))] = 3;
};
_local17++;
};
_local16++;
};
_local8++;
};
}
public function stop():void{
var _local1:Card;
for each (_local1 in _cards) {
_local1.stop();
};
removeEventListener(MouseEvent.MOUSE_UP, _onMouseUp);
}
public function isEmpty():Boolean{
return ((_cards.length == 0));
}
public function getCard(_arg1:int, _arg2:int):Card{
var _local3:Card;
for each (_local3 in _cards) {
if ((((_local3.getCol() == _arg1)) && ((_local3.getRow() == _arg2)))){
return (_local3);
};
};
return (null);
}
private function _onMouseUp(_arg1:MouseEvent):void{
var _local3:Card;
var _local4:Point;
var _local2:Card;
for each (_local3 in _cards) {
_local4 = localToGlobal(new Point(mouseX, mouseY));
if (((_local3.hitTestPoint(_local4.x, _local4.y)) && ((((_local2 == null)) || ((_local3.getLayer() > _local2.getLayer())))))){
_local2 = _local3;
};
};
if ((((_local2 == null)) || (isCovered(_local2)))){
return;
};
_vars.gameController.setSelectCard(_id, _local2.getId());
}
public function getCardFromId(_arg1:int):Card{
var _local2:Card;
for each (_local2 in _cards) {
if (_local2.getId() == _arg1){
return (_local2);
};
};
return (null);
}
public function isCovered(_arg1:Card):Boolean{
var _local2:Card;
if (_arg1.isLocked()){
return (true);
};
for each (_local2 in _cards) {
if (((!((_local2 == _arg1))) && (_local2.isCovering(_arg1)))){
return (true);
};
};
return (false);
}
public function getId():int{
return (_id);
}
private function _addCard(_arg1:Question, _arg2:int, _arg3:int, _arg4:int):Card{
var _local5:Card = new NormalCard(_arg1, _vars, _arg2, _arg3, _arg4);
_local5.setWanted(((_arg2 * _vars.cardWidthSpacing) + (_local5.width * 0.5)), ((_arg3 * _vars.cardHeightSpacing) + (_local5.height * 0.5)));
_local5.x = (((3 * _vars.cardWidthSpacing) * 0.5) + (_local5.width * 0.5));
_local5.y = 610;
addChild(_local5);
_cards.push(_local5);
return (_local5);
}
public function render(_arg1:int, _arg2:Number):void{
var _local3:Card;
var _local4:Sprite;
for each (_local3 in _cards) {
_local4 = ((_local3.getChildAt(0) as Sprite).getChildByName("overlay") as Sprite);
if (_local4 == null){
_local4 = ((_local3.getChildAt(1) as Sprite).getChildByName("overlay") as Sprite);
};
_local4.visible = isCovered(_local3);
_local3.render(_arg1, _arg2);
};
}
public function start():void{
var _local1:Card;
for each (_local1 in _cards) {
_local1.start();
};
addEventListener(MouseEvent.MOUSE_UP, _onMouseUp);
}
public function replaceCard(_arg1:int, _arg2:int):Card{
var _local3:Card;
var _local4:Question;
_local3 = getCard(_arg1, _arg2);
Debug.assert(!((_local3 == null)), "There is no card to replace.");
_local4 = _local3.getQuestion();
removeCard(_arg1, _arg2);
var _local5:Question = _vars.questionParser.getNextQuestion(_local4.getDifficulty(), _local3.getQuestion().getCategory());
var _local6 = 2;
return (_addCard(_local5, _arg1, _arg2, _local3.getLayer()));
}
public function getCards():Array{
return (_cards);
}
public function removeCard(_arg1:int, _arg2:int):void{
var _local5:Card;
var _local3:Card = getCard(_arg1, _arg2);
Debug.assert(!((_local3 == null)), "Trying to remove an unexisting card.");
var _local4:Array = new Array();
for each (_local5 in _cards) {
if (_local5 != _local3){
_local4.push(_local5);
};
};
_cards = _local4;
}
public function tick(_arg1:int):void{
}
}
}//package com.midasplayer.djinn
Section 61
//LayoutParser (com.midasplayer.djinn.LayoutParser)
package com.midasplayer.djinn {
import com.midasplayer.debug.*;
public class LayoutParser {
private const _layouts:Array;
public function LayoutParser(_arg1:Vars):void{
var _local2:String;
var _local3:String;
var _local4:String;
var _local5:Array;
var _local6:Array;
var _local7:Array;
var _local8:Array;
var _local9:Array;
var _local10:Array;
var _local11:Array;
var _local12:Array;
var _local13:Array;
var _local14:Array;
var _local15:Array;
var _local16:Array;
_layouts = new Array();
super();
_local2 = ((((("0,0,0,0,0,0," + "0,0,1,1,0,0,") + "0,0,1,1,0,0,") + "0,0,0,0,0,0,") + "0,0,0,0,0,0,") + "0,0,0,0,0,0");
_local3 = ((((("0,0,0,0,0,0," + "0,0,0,0,0,0,") + "0,2,2,2,2,0,") + "0,2,2,2,2,0,") + "0,0,0,0,0,0,") + "0,0,0,0,0,0");
_local4 = ((((("0,0,0,0,0,0," + "0,0,0,0,0,0,") + "0,0,0,0,0,0,") + "2,2,2,2,2,2,") + "2,2,2,2,2,2,") + "0,0,0,0,0,0");
_local5 = _buildLayer(_local2);
_local6 = _buildLayer(_local3);
_local7 = _buildLayer(_local4);
_local8 = [_local5, _local6, _local7];
_local9 = [2, 1, 0];
_local10 = _buildLayer(_local2);
_local11 = _buildLayer(_local3);
_local12 = _buildLayer(_local4);
_local13 = [_local10, _local11, _local12];
_local14 = [2, 1, 0];
_local15 = new Array();
_local15.push(_buildLayer(_local2));
_local16 = [3];
var _local17:Layout = new Layout(_arg1, 0, _local8, _local9, 6, 6);
var _local18:Layout = new Layout(_arg1, 1, _local13, _local14, 6, 6);
var _local19:Layout = new Layout(_arg1, 2, _local15, _local16, 6, 6);
_layouts.push(_local17);
_layouts.push(_local18);
_layouts.push(_local19);
_local17.x = 120;
_local17.y = 220;
_local18.x = 425;
_local18.y = 220;
_local19.x = 275;
_local19.y = 150;
}
private function _buildLayer(_arg1:String):Array{
var _local4:String;
var _local2:Array = _arg1.split(",");
Debug.assert((_local2.length == 36), "Bad size on layer.");
var _local3:Array = new Array();
for each (_local4 in _local2) {
_local3.push(parseInt(_local4));
};
return (_local3);
}
public function getLayouts():Array{
return (_layouts);
}
}
}//package com.midasplayer.djinn
Section 62
//Main (com.midasplayer.djinn.Main)
package com.midasplayer.djinn {
import flash.events.*;
import com.midasplayer.time.*;
import flash.display.*;
public class Main extends Sprite {
private var _engine:DjinnEngine;
private var _initialized:Boolean;// = false
private var _timer:ITimer;
private var _vars:Vars;
public function Main(){
_timer = new SystemTimer();
super();
addEventListener(Event.ENTER_FRAME, _onEnterFrame);
}
private function _onEnterFrame(_arg1:Event):void{
if (!_initialized){
_initialize();
};
_engine.update();
}
private function _initialize():void{
_vars = new Vars((Math.random() * 10000));
_engine = new DjinnEngine(_timer, _vars);
stage.addChild(_engine);
_initialized = true;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
}
}
}//package com.midasplayer.djinn
Section 63
//NormalCard (com.midasplayer.djinn.NormalCard)
package com.midasplayer.djinn {
import com.midasplayer.debug.*;
import flash.display.*;
public class NormalCard extends Card {
private static const SportCard:Class = NormalCard_SportCard;
private static const HistoryCard:Class = NormalCard_HistoryCard;
private static const GeographyCard:Class = NormalCard_GeographyCard;
private static const ScienceCard:Class = NormalCard_ScienceCard;
private static const NatureCard:Class = NormalCard_NatureCard;
private static const EntertainmentCard:Class = NormalCard_EntertainmentCard;
public function NormalCard(_arg1:Question, _arg2:Vars, _arg3:int, _arg4:int, _arg5:int){
var _local6:Sprite;
super(_arg1, _arg2, _arg3, _arg4, _arg5);
var _local7:int = _arg1.getCategory();
if (_local7 == Category.Entertainment){
_local6 = new EntertainmentCard();
} else {
if (_local7 == Category.Geography){
_local6 = new GeographyCard();
} else {
if (_local7 == Category.History){
_local6 = new HistoryCard();
} else {
if (_local7 == Category.Nature){
_local6 = new NatureCard();
} else {
if (_local7 == Category.Science){
_local6 = new ScienceCard();
} else {
if (_local7 == Category.Sport){
_local6 = new SportCard();
} else {
Debug.assert(false, "Undefined category.");
};
};
};
};
};
};
var _local8:MovieClip = (_local6.getChildByName("difficulty") as MovieClip);
_local8.gotoAndStop((_arg1.getDifficulty() + 1));
addChild(_local6);
cacheAsBitmap = true;
}
}
}//package com.midasplayer.djinn
Section 64
//NormalCard_EntertainmentCard (com.midasplayer.djinn.NormalCard_EntertainmentCard)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class NormalCard_EntertainmentCard extends SpriteAsset {
public var highlight4:DisplayObject;
public var highlight2:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var _totalScoreText:DisplayObject;
public var progress:DisplayObject;
public var bestText:DisplayObject;
public var text:DisplayObject;
public var answer3:DisplayObject;
public var answer4:DisplayObject;
public var answer1:DisplayObject;
public var answer2:DisplayObject;
public var timer:DisplayObject;
public var _totalScore:DisplayObject;
public var overlay:DisplayObject;
public var timeBonus:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var science:DisplayObject;
public var _scoreText:DisplayObject;
public var correctAnswer1:DisplayObject;
public var correctAnswer3:DisplayObject;
public var correctAnswer2:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var answers:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
public var correctAnswer4:DisplayObject;
public var entertainment:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var score:DisplayObject;
public var history:DisplayObject;
public var crowns:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var answerMask2:DisplayObject;
public var answerMask3:DisplayObject;
public var answerMask4:DisplayObject;
public var totalScore:DisplayObject;
public var answerMask1:DisplayObject;
public var crown:DisplayObject;
public var difficulty:DisplayObject;
public var _best:DisplayObject;
public var wrongAnswer1:DisplayObject;
public var wrongAnswer2:DisplayObject;
public var wrongAnswer4:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var wrongAnswer3:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var question:DisplayObject;
public var totalScoreText:DisplayObject;
public var highlight1:DisplayObject;
public var highlight3:DisplayObject;
}
}//package com.midasplayer.djinn
Section 65
//NormalCard_GeographyCard (com.midasplayer.djinn.NormalCard_GeographyCard)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class NormalCard_GeographyCard extends SpriteAsset {
public var highlight4:DisplayObject;
public var highlight2:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var _totalScoreText:DisplayObject;
public var progress:DisplayObject;
public var bestText:DisplayObject;
public var text:DisplayObject;
public var answer3:DisplayObject;
public var answer4:DisplayObject;
public var answer1:DisplayObject;
public var answer2:DisplayObject;
public var timer:DisplayObject;
public var _totalScore:DisplayObject;
public var overlay:DisplayObject;
public var timeBonus:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var science:DisplayObject;
public var _scoreText:DisplayObject;
public var correctAnswer1:DisplayObject;
public var correctAnswer3:DisplayObject;
public var correctAnswer2:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var answers:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
public var correctAnswer4:DisplayObject;
public var entertainment:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var score:DisplayObject;
public var history:DisplayObject;
public var crowns:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var answerMask2:DisplayObject;
public var answerMask3:DisplayObject;
public var answerMask4:DisplayObject;
public var totalScore:DisplayObject;
public var answerMask1:DisplayObject;
public var crown:DisplayObject;
public var difficulty:DisplayObject;
public var _best:DisplayObject;
public var wrongAnswer1:DisplayObject;
public var wrongAnswer2:DisplayObject;
public var wrongAnswer4:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var wrongAnswer3:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var question:DisplayObject;
public var totalScoreText:DisplayObject;
public var highlight1:DisplayObject;
public var highlight3:DisplayObject;
}
}//package com.midasplayer.djinn
Section 66
//NormalCard_HistoryCard (com.midasplayer.djinn.NormalCard_HistoryCard)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class NormalCard_HistoryCard extends SpriteAsset {
public var highlight4:DisplayObject;
public var highlight2:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var _totalScoreText:DisplayObject;
public var progress:DisplayObject;
public var bestText:DisplayObject;
public var text:DisplayObject;
public var answer3:DisplayObject;
public var answer4:DisplayObject;
public var answer1:DisplayObject;
public var answer2:DisplayObject;
public var timer:DisplayObject;
public var _totalScore:DisplayObject;
public var overlay:DisplayObject;
public var timeBonus:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var science:DisplayObject;
public var _scoreText:DisplayObject;
public var correctAnswer1:DisplayObject;
public var correctAnswer3:DisplayObject;
public var correctAnswer2:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var answers:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
public var correctAnswer4:DisplayObject;
public var entertainment:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var score:DisplayObject;
public var history:DisplayObject;
public var crowns:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var answerMask2:DisplayObject;
public var answerMask3:DisplayObject;
public var answerMask4:DisplayObject;
public var totalScore:DisplayObject;
public var answerMask1:DisplayObject;
public var crown:DisplayObject;
public var difficulty:DisplayObject;
public var _best:DisplayObject;
public var wrongAnswer1:DisplayObject;
public var wrongAnswer2:DisplayObject;
public var wrongAnswer4:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var wrongAnswer3:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var question:DisplayObject;
public var totalScoreText:DisplayObject;
public var highlight1:DisplayObject;
public var highlight3:DisplayObject;
}
}//package com.midasplayer.djinn
Section 67
//NormalCard_NatureCard (com.midasplayer.djinn.NormalCard_NatureCard)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class NormalCard_NatureCard extends SpriteAsset {
public var highlight4:DisplayObject;
public var highlight2:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var _totalScoreText:DisplayObject;
public var progress:DisplayObject;
public var bestText:DisplayObject;
public var text:DisplayObject;
public var answer3:DisplayObject;
public var answer4:DisplayObject;
public var answer1:DisplayObject;
public var answer2:DisplayObject;
public var timer:DisplayObject;
public var _totalScore:DisplayObject;
public var overlay:DisplayObject;
public var timeBonus:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var science:DisplayObject;
public var _scoreText:DisplayObject;
public var correctAnswer1:DisplayObject;
public var correctAnswer3:DisplayObject;
public var correctAnswer2:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var answers:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
public var correctAnswer4:DisplayObject;
public var entertainment:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var score:DisplayObject;
public var history:DisplayObject;
public var crowns:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var answerMask2:DisplayObject;
public var answerMask3:DisplayObject;
public var answerMask4:DisplayObject;
public var totalScore:DisplayObject;
public var answerMask1:DisplayObject;
public var crown:DisplayObject;
public var difficulty:DisplayObject;
public var _best:DisplayObject;
public var wrongAnswer1:DisplayObject;
public var wrongAnswer2:DisplayObject;
public var wrongAnswer4:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var wrongAnswer3:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var question:DisplayObject;
public var totalScoreText:DisplayObject;
public var highlight1:DisplayObject;
public var highlight3:DisplayObject;
}
}//package com.midasplayer.djinn
Section 68
//NormalCard_ScienceCard (com.midasplayer.djinn.NormalCard_ScienceCard)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class NormalCard_ScienceCard extends SpriteAsset {
public var highlight4:DisplayObject;
public var highlight2:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var _totalScoreText:DisplayObject;
public var progress:DisplayObject;
public var bestText:DisplayObject;
public var text:DisplayObject;
public var answer3:DisplayObject;
public var answer4:DisplayObject;
public var answer1:DisplayObject;
public var answer2:DisplayObject;
public var timer:DisplayObject;
public var _totalScore:DisplayObject;
public var overlay:DisplayObject;
public var timeBonus:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var science:DisplayObject;
public var _scoreText:DisplayObject;
public var correctAnswer1:DisplayObject;
public var correctAnswer3:DisplayObject;
public var correctAnswer2:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var answers:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
public var correctAnswer4:DisplayObject;
public var entertainment:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var score:DisplayObject;
public var history:DisplayObject;
public var crowns:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var answerMask2:DisplayObject;
public var answerMask3:DisplayObject;
public var answerMask4:DisplayObject;
public var totalScore:DisplayObject;
public var answerMask1:DisplayObject;
public var crown:DisplayObject;
public var difficulty:DisplayObject;
public var _best:DisplayObject;
public var wrongAnswer1:DisplayObject;
public var wrongAnswer2:DisplayObject;
public var wrongAnswer4:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var wrongAnswer3:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var question:DisplayObject;
public var totalScoreText:DisplayObject;
public var highlight1:DisplayObject;
public var highlight3:DisplayObject;
}
}//package com.midasplayer.djinn
Section 69
//NormalCard_SportCard (com.midasplayer.djinn.NormalCard_SportCard)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class NormalCard_SportCard extends SpriteAsset {
public var highlight4:DisplayObject;
public var highlight2:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var _totalScoreText:DisplayObject;
public var progress:DisplayObject;
public var bestText:DisplayObject;
public var text:DisplayObject;
public var answer3:DisplayObject;
public var answer4:DisplayObject;
public var answer1:DisplayObject;
public var answer2:DisplayObject;
public var timer:DisplayObject;
public var _totalScore:DisplayObject;
public var overlay:DisplayObject;
public var timeBonus:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var science:DisplayObject;
public var _scoreText:DisplayObject;
public var correctAnswer1:DisplayObject;
public var correctAnswer3:DisplayObject;
public var correctAnswer2:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var answers:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
public var correctAnswer4:DisplayObject;
public var entertainment:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var score:DisplayObject;
public var history:DisplayObject;
public var crowns:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var answerMask2:DisplayObject;
public var answerMask3:DisplayObject;
public var answerMask4:DisplayObject;
public var totalScore:DisplayObject;
public var answerMask1:DisplayObject;
public var crown:DisplayObject;
public var difficulty:DisplayObject;
public var _best:DisplayObject;
public var wrongAnswer1:DisplayObject;
public var wrongAnswer2:DisplayObject;
public var wrongAnswer4:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var wrongAnswer3:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var question:DisplayObject;
public var totalScoreText:DisplayObject;
public var highlight1:DisplayObject;
public var highlight3:DisplayObject;
}
}//package com.midasplayer.djinn
Section 70
//Pause (com.midasplayer.djinn.Pause)
package com.midasplayer.djinn {
import com.midasplayer.game.engine.*;
import flash.display.*;
public class Pause extends Sprite implements IRunnable {
public function stop():void{
}
public function start():void{
}
public function tick(_arg1:int):void{
}
public function render(_arg1:int, _arg2:Number):void{
}
public function isDone():Boolean{
return (false);
}
}
}//package com.midasplayer.djinn
Section 71
//Question (com.midasplayer.djinn.Question)
package com.midasplayer.djinn {
import com.midasplayer.debug.*;
public class Question {
private var _id:int;
private var _question:String;
private var _vars:Vars;
private var _a1:String;
private var _a2:String;
private var _a3:String;
private var _a4:String;
private var _difficulty:int;// = 0
private var _enc:Encryption;
private var _category:int;
private var _correct:int;// = 0
public function Question(_arg1:Vars, _arg2:int, _arg3:int, _arg4:String, _arg5:String, _arg6:String, _arg7:String, _arg8:String, _arg9:int, _arg10:int){
_vars = _arg1;
_id = _arg2;
_category = _arg3;
_enc = new Encryption(_id);
_question = _enc.decrypt(_arg4);
_a1 = _enc.decrypt(_arg5);
_a2 = _enc.decrypt(_arg6);
_a3 = _enc.decrypt(_arg7);
_a4 = _enc.decrypt(_arg8);
_correct = _arg9;
_difficulty = _arg10;
Debug.assert((((_difficulty >= 0)) && ((_difficulty <= 3))), "A question difficulty is out of range");
}
public function getAnswer4():String{
return (_a4);
}
public function getCorrect():int{
return (_correct);
}
public function getId():int{
return (_id);
}
public function getScore():int{
if (_difficulty == 0){
return (_vars.score0);
};
if (_difficulty == 1){
return (_vars.score1);
};
if (_difficulty == 2){
return (_vars.score2);
};
return (_vars.score3);
}
public function getQuestion():String{
return (_question);
}
public function toXml():String{
return ((((((((((((((((((((((((("<question id=\"" + _id) + "\" diff=\"") + _difficulty) + "\" cat=\"") + _category) + "\" correct=\"") + _correct) + "\">") + "<q><![CDATA[") + _enc.encrypt(_question)) + "]]></q>") + "<a1><![CDATA[") + _enc.encrypt(_a1)) + "]]></a1>") + "<a2><![CDATA[") + _enc.encrypt(_a2)) + "]]></a2>") + "<a3><![CDATA[") + _enc.encrypt(_a3)) + "]]></a3>") + "<a4><![CDATA[") + _enc.encrypt(_a4)) + "]]></a4>") + "</question>"));
}
public function getDifficulty():int{
return (_difficulty);
}
public function getCategory():int{
return (_category);
}
public function getAnswer1():String{
return (_a1);
}
public function getAnswer2():String{
return (_a2);
}
public function getAnswer3():String{
return (_a3);
}
}
}//package com.midasplayer.djinn
Section 72
//QuestionParser (com.midasplayer.djinn.QuestionParser)
package com.midasplayer.djinn {
import com.midasplayer.math.*;
import com.midasplayer.debug.*;
import flash.external.*;
public class QuestionParser {
private var _indices:Array;
private var _vars:Vars;
private var _questions:Array;
private var _id:int;// = 1000
public function QuestionParser(_arg1:Vars, _arg2:String){
var _local5:XML;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:XMLList;
var _local12:String;
var _local13:Array;
var _local14:XMLList;
var _local15:XMLList;
var _local16:XMLList;
var _local17:XMLList;
var _local18:Array;
var _local19:Array;
super();
_questions = new Array();
_indices = new Array();
var _local3:int;
while (_local3 < Category.MaxCategories) {
_questions.push(new Array());
_indices.push(new Array());
_local6 = 0;
while (_local6 < 4) {
_questions[_local3].push(new Array());
_indices[_local3].push(0);
_local6++;
};
_local3++;
};
_vars = _arg1;
var _local4:XML = new XML(_arg2);
Debug.assert((_local4.length() == 1), "The game data XML should only have 1 root child.");
for each (_local5 in _local4.questions.question) {
_local7 = _local5.attribute("id");
_local8 = _local5.attribute("cat");
Debug.assert((_local8 < Category.MaxCategories), "A category is out of range.");
_local9 = _local5.attribute("diff");
Debug.assert((_local9 < 4), "A difficulty is out of range.");
_local10 = _local5.attribute("correct");
Debug.assert((((_local10 >= 1)) && ((_local10 <= 4))), "A correct attribute is out of range.");
_local11 = _local5.child("q");
Debug.assert((_local11.length() == 1), "More or less than one question is embedded in a question.");
_local12 = _local11.text();
_local13 = new Array();
_local14 = _local5.child("a1");
Debug.assert((_local14.length() == 1), "Answer 1 is not of length 1.");
_local13.push(_local14.text());
_local15 = _local5.child("a2");
Debug.assert((_local15.length() == 1), "Answer 2 is not of length 1.");
_local13.push(_local15.text());
_local16 = _local5.child("a3");
Debug.assert((_local16.length() == 1), "Answer 3 is not of length 1.");
_local13.push(_local16.text());
_local17 = _local5.child("a4");
Debug.assert((_local17.length() == 1), "Answer 4 is not of length 1.");
_local13.push(_local17.text());
if (ExternalInterface.available){
_local10 = _shuffleCorrect(_local7, _local10);
};
_local10 = _shuffle(_local13, _local10);
Debug.assert((((_local10 >= 1)) && ((_local10 <= 4))), "A question has a bad correct answer.");
_local18 = _questions[_local8];
_local19 = _local18[_local9];
_local19.push(new Question(_vars, _local7, _local8, _local12, _local13[0], _local13[1], _local13[2], _local13[3], _local10, _local9));
};
}
public function _shuffle(_arg1:Array, _arg2:int):int{
var _local5:int;
var _local6:String;
var _local3:int = _arg2;
var _local4:int = _arg1.length;
while (_local4 > 1) {
_local5 = _vars.random.nextInt(_local4);
_local6 = _arg1[_local5];
_arg1[_local5] = _arg1[(_local4 - 1)];
_arg1[(_local4 - 1)] = _local6;
if ((_local5 + 1) == _local3){
_local3 = _local4;
} else {
if (_local4 == _local3){
_local3 = (_local5 + 1);
};
};
_local4--;
};
return (_local3);
}
public function getNextQuestion(_arg1:int, _arg2:int):Question{
var _local3:int = _indices[_arg2][_arg1];
Debug.assert((_local3 < _questions[_arg2][_arg1].length), ("A question index is out of range: " + _local3));
var _local4:Question = _questions[_arg2][_arg1][_local3];
Debug.assert(!((_local4 == null)), "A question should never be null.");
var _local5 = _indices[_arg2];
var _local6 = _arg1;
var _local7 = (_local5[_local6] + 1);
_local5[_local6] = _local7;
return (_local4);
}
public function _shuffleCorrect(_arg1:int, _arg2:int):int{
var _local6:int;
var _local3:MtRandom = new MtRandom();
_local3.setSeed(_arg1);
var _local4:int = _arg2;
var _local5 = 4;
while (_local5 > 1) {
_local6 = _local3.nextInt(_local5);
if ((_local6 + 1) == _local4){
_local4 = _local5;
} else {
if (_local5 == _local4){
_local4 = (_local6 + 1);
};
};
_local5--;
};
return (_local4);
}
public function reset():void{
var _local1:int;
while (_local1 < _indices.length) {
_indices[_local1] = 0;
_local1++;
};
}
}
}//package com.midasplayer.djinn
Section 73
//QuestionSheet (com.midasplayer.djinn.QuestionSheet)
package com.midasplayer.djinn {
import flash.events.*;
import com.midasplayer.game.timer.*;
import com.midasplayer.debug.*;
import com.midasplayer.timing.*;
import flash.display.*;
import flash.text.*;
import com.midasplayer.game.anim.*;
import com.midasplayer.math.pennertween.*;
import com.midasplayer.game.text.*;
import flash.filters.*;
public class QuestionSheet extends Sprite implements IRenderable {
private const _qTf:TextFields;
private const _highlightFilter:GlowFilter;
private const _questionSheet:Sprite;
private var _vars:Vars;
private var _clockTimeout:Timeout;
private var _timerProgress:MovieClip;
private var _hoveringAnswer:int;// = 0
private var _hoverTimeout:Timeout;
private var _hasRevealed:Boolean;// = false
private var _timeout:Timeout;
private var _answerTextField:TextFields;
private var _playingAlarm:Boolean;// = false
private var _correctCheck:TickedAnimation;
private var _answers:MovieClip;
private var _wrongCheck:TickedAnimation;
private static const SportBg:Class = QuestionSheet_SportBg;
private static const GeographyBg:Class = QuestionSheet_GeographyBg;
private static const WrongSound:Class = QuestionSheet_WrongSound;
private static const EntertainmentBg:Class = QuestionSheet_EntertainmentBg;
private static const HistoryBg:Class = QuestionSheet_HistoryBg;
private static const AlarmSound:Class = QuestionSheet_AlarmSound;
private static const CorrectSound:Class = QuestionSheet_CorrectSound;
private static const ScienceBg:Class = QuestionSheet_ScienceBg;
private static const NatureBg:Class = QuestionSheet_NatureBg;
private static const CorrectCheck:Class = QuestionSheet_CorrectCheck;
private static const ShowSheetSound:Class = QuestionSheet_ShowSheetSound;
private static const QuestionSheet:Class = QuestionSheet_QuestionSheet;
private static const WrongCheck:Class = QuestionSheet_WrongCheck;
public function QuestionSheet(_arg1:Vars, _arg2:Question){
var _local8:MovieClip;
_questionSheet = new QuestionSheet();
_qTf = new TextFields(_questionSheet);
_highlightFilter = new GlowFilter(0xFFFFFF, 1, 5, 5, 655, 1);
_hoverTimeout = new Timeout(0, 20);
super();
_vars = _arg1;
var _local3 = 0xFFFFFF;
var _local4:int = _arg2.getCategory();
if (_local4 == Category.Entertainment){
addChild(new EntertainmentBg());
} else {
if (_local4 == Category.Geography){
addChild(new GeographyBg());
} else {
if (_local4 == Category.History){
addChild(new HistoryBg());
_local3 = 0;
} else {
if (_local4 == Category.Nature){
addChild(new NatureBg());
} else {
if (_local4 == Category.Science){
addChild(new ScienceBg());
} else {
if (_local4 == Category.Sport){
addChild(new SportBg());
} else {
Debug.assert(false, "Couldn't create background for a category.");
};
};
};
};
};
};
addChild(_questionSheet);
_answers = (_questionSheet.getChildByName("answers") as MovieClip);
_qTf.setText("question", _arg2.getQuestion());
_qTf.setColor(_local3);
_answerTextField = new TextFields(_answers);
_answerTextField.setText("answer1", _arg2.getAnswer1());
_answerTextField.setText("answer2", _arg2.getAnswer2());
_answerTextField.setText("answer3", _arg2.getAnswer3());
_answerTextField.setText("answer4", _arg2.getAnswer4());
_answerTextField.setColor(_local3);
var _local5:MovieClip = new WrongCheck();
_local5.stop();
_wrongCheck = new TickedAnimation(55, _vars.tickInterval, _local5, _local5.totalFrames);
var _local6:MovieClip = new CorrectCheck();
_local6.stop();
_correctCheck = new TickedAnimation(55, _vars.tickInterval, _local6, _local6.totalFrames);
var _local7:DisplayObjectContainer = (_answers.getChildByName("timer") as DisplayObjectContainer);
_local7.mouseEnabled = false;
_timerProgress = (_local7.getChildByName("progress") as MovieClip);
_timerProgress.stop();
if (_arg2.getDifficulty() != 3){
_local8 = (_questionSheet.getChildByName("crowns") as MovieClip);
_local8.visible = false;
};
_answers.visible = false;
cacheAsBitmap = true;
}
public function stop():void{
removeEventListener(MouseEvent.MOUSE_UP, _onClick);
removeEventListener(MouseEvent.MOUSE_OVER, _onOver);
_vars.soundManager.getFromClass(AlarmSound).stop();
_playingAlarm = true;
}
public function reveal(_arg1:int, _arg2:Boolean):void{
var _local5:Sprite;
if (_hasRevealed){
return;
};
var _local3:Sprite = (_questionSheet.getChildByName(("correctAnswer" + _arg1)) as Sprite);
if (_arg2){
_local3.alpha = 1;
_correctCheck.getMovieClip().x = (_local3.x + (_local3.width * 0.5));
_correctCheck.getMovieClip().y = (_local3.y + (_local3.height * 0.5));
addChild(_correctCheck.getMovieClip());
_correctCheck.start();
_vars.soundManager.getFromClass(CorrectSound).play(0.7);
} else {
_local5 = (_questionSheet.getChildByName(("wrongAnswer" + _arg1)) as Sprite);
_local5.alpha = 1;
_wrongCheck.getMovieClip().x = (_local3.x + (_local3.width * 0.5));
_wrongCheck.getMovieClip().y = ((_local3.y + (_local3.height * 0.5)) + 5);
addChild(_wrongCheck.getMovieClip());
_wrongCheck.start();
_vars.soundManager.getFromClass(WrongSound).play(0.7);
};
_hasRevealed = true;
var _local4:TextField = _answerTextField.get(("answer" + _arg1));
PennerTween.doTween(_local4, 400, PennerEase.easeOutBack, {alpha:0});
}
public function render(_arg1:int, _arg2:Number):void{
var _local4:Sprite;
var _local5:Number;
var _local6:int;
var _local3 = 1;
while (_local3 < 5) {
_local4 = (_answers.getChildByName(("highlight" + _local3)) as Sprite);
if (_local3 == _hoveringAnswer){
_local5 = _hoverTimeout.alpha((_arg1 + _arg2));
_local4.alpha = (0.7 + (0.3 * Math.cos(((_local5 * 2) * Math.PI))));
} else {
_local4.alpha = 0;
};
_local3++;
};
if (_timeout == null){
_timeout = new Timeout((_arg1 + _arg2), (_vars.answerTime / (_vars.tickInterval / 1000)));
};
if ((((((1 - _timeout.alpha((_arg1 + _arg2))) * _vars.answerTime) < 9.3)) && (!(_playingAlarm)))){
_answers.visible = true;
_clockTimeout = new Timeout((_arg1 + _arg2), _timeout.left((_arg1 + _arg2)));
_vars.soundManager.getFromClass(AlarmSound).play(0.6);
_playingAlarm = true;
};
if (((((((!(_wrongCheck.isPlaying())) && (!(_correctCheck.isPlaying())))) && (_playingAlarm))) && (!((_clockTimeout == null))))){
_local6 = (_timerProgress.totalFrames * _clockTimeout.alpha((_arg1 + _arg2)));
_timerProgress.gotoAndStop(_local6);
};
if (_wrongCheck.isPlaying()){
_wrongCheck.render(_arg1, _arg2);
};
if (_correctCheck.isPlaying()){
_correctCheck.render(_arg1, _arg2);
};
}
public function start():void{
addEventListener(MouseEvent.MOUSE_UP, _onClick);
addEventListener(MouseEvent.MOUSE_OVER, _onOver);
_vars.soundManager.getFromClass(ShowSheetSound).play(0.3);
}
private function _getTargetAnswer(_arg1:Object):int{
if (_arg1 == _answers.getChildByName("answerMask1")){
return (1);
};
if (_arg1 == _answers.getChildByName("answerMask2")){
return (2);
};
if (_arg1 == _answers.getChildByName("answerMask3")){
return (3);
};
if (_arg1 == _answers.getChildByName("answerMask4")){
return (4);
};
return (0);
}
private function _onClick(_arg1:MouseEvent):void{
var _local2:int = _getTargetAnswer(_arg1.target);
if (_local2 == 0){
return;
};
_vars.gameController.setAnswer(_local2);
}
private function _onOver(_arg1:MouseEvent):void{
_hoveringAnswer = _getTargetAnswer(_arg1.target);
}
}
}//package com.midasplayer.djinn
Section 74
//QuestionSheet_AlarmSound (com.midasplayer.djinn.QuestionSheet_AlarmSound)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class QuestionSheet_AlarmSound extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var history:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 75
//QuestionSheet_CorrectCheck (com.midasplayer.djinn.QuestionSheet_CorrectCheck)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class QuestionSheet_CorrectCheck extends MovieClipAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var history:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 76
//QuestionSheet_CorrectSound (com.midasplayer.djinn.QuestionSheet_CorrectSound)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class QuestionSheet_CorrectSound extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var history:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 77
//QuestionSheet_EntertainmentBg (com.midasplayer.djinn.QuestionSheet_EntertainmentBg)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class QuestionSheet_EntertainmentBg extends SpriteAsset {
public var highlight4:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var _totalScoreText:DisplayObject;
public var progress:DisplayObject;
public var bestText:DisplayObject;
public var answer2:DisplayObject;
public var answer3:DisplayObject;
public var answer4:DisplayObject;
public var answer1:DisplayObject;
public var text:DisplayObject;
public var timer:DisplayObject;
public var _totalScore:DisplayObject;
public var timeBonus:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var science:DisplayObject;
public var _scoreText:DisplayObject;
public var correctAnswer1:DisplayObject;
public var correctAnswer3:DisplayObject;
public var correctAnswer2:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var answers:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
public var correctAnswer4:DisplayObject;
public var entertainment:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var score:DisplayObject;
public var history:DisplayObject;
public var crowns:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var answerMask2:DisplayObject;
public var answerMask3:DisplayObject;
public var answerMask4:DisplayObject;
public var totalScore:DisplayObject;
public var answerMask1:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var wrongAnswer1:DisplayObject;
public var wrongAnswer2:DisplayObject;
public var wrongAnswer4:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var wrongAnswer3:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var question:DisplayObject;
public var totalScoreText:DisplayObject;
public var highlight1:DisplayObject;
public var highlight2:DisplayObject;
public var highlight3:DisplayObject;
}
}//package com.midasplayer.djinn
Section 78
//QuestionSheet_GeographyBg (com.midasplayer.djinn.QuestionSheet_GeographyBg)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class QuestionSheet_GeographyBg extends SpriteAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var history:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 79
//QuestionSheet_HistoryBg (com.midasplayer.djinn.QuestionSheet_HistoryBg)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class QuestionSheet_HistoryBg extends SpriteAsset {
public var highlight4:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var _totalScoreText:DisplayObject;
public var progress:DisplayObject;
public var bestText:DisplayObject;
public var answer2:DisplayObject;
public var answer3:DisplayObject;
public var answer4:DisplayObject;
public var answer1:DisplayObject;
public var text:DisplayObject;
public var timer:DisplayObject;
public var _totalScore:DisplayObject;
public var timeBonus:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var science:DisplayObject;
public var _scoreText:DisplayObject;
public var correctAnswer1:DisplayObject;
public var correctAnswer3:DisplayObject;
public var correctAnswer2:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var answers:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
public var correctAnswer4:DisplayObject;
public var entertainment:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var score:DisplayObject;
public var history:DisplayObject;
public var crowns:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var answerMask2:DisplayObject;
public var answerMask3:DisplayObject;
public var answerMask4:DisplayObject;
public var totalScore:DisplayObject;
public var answerMask1:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var wrongAnswer1:DisplayObject;
public var wrongAnswer2:DisplayObject;
public var wrongAnswer4:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var wrongAnswer3:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var question:DisplayObject;
public var totalScoreText:DisplayObject;
public var highlight1:DisplayObject;
public var highlight2:DisplayObject;
public var highlight3:DisplayObject;
}
}//package com.midasplayer.djinn
Section 80
//QuestionSheet_NatureBg (com.midasplayer.djinn.QuestionSheet_NatureBg)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class QuestionSheet_NatureBg extends SpriteAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var history:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 81
//QuestionSheet_QuestionSheet (com.midasplayer.djinn.QuestionSheet_QuestionSheet)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class QuestionSheet_QuestionSheet extends SpriteAsset {
public var highlight4:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var _totalScoreText:DisplayObject;
public var progress:DisplayObject;
public var bestText:DisplayObject;
public var answer2:DisplayObject;
public var answer3:DisplayObject;
public var answer4:DisplayObject;
public var answer1:DisplayObject;
public var text:DisplayObject;
public var timer:DisplayObject;
public var _totalScore:DisplayObject;
public var timeBonus:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var science:DisplayObject;
public var _scoreText:DisplayObject;
public var correctAnswer1:DisplayObject;
public var correctAnswer3:DisplayObject;
public var correctAnswer2:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var answers:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
public var correctAnswer4:DisplayObject;
public var entertainment:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var score:DisplayObject;
public var history:DisplayObject;
public var crowns:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var answerMask2:DisplayObject;
public var answerMask3:DisplayObject;
public var answerMask4:DisplayObject;
public var totalScore:DisplayObject;
public var answerMask1:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var wrongAnswer1:DisplayObject;
public var wrongAnswer2:DisplayObject;
public var wrongAnswer4:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var wrongAnswer3:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var question:DisplayObject;
public var totalScoreText:DisplayObject;
public var highlight1:DisplayObject;
public var highlight2:DisplayObject;
public var highlight3:DisplayObject;
}
}//package com.midasplayer.djinn
Section 82
//QuestionSheet_ScienceBg (com.midasplayer.djinn.QuestionSheet_ScienceBg)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class QuestionSheet_ScienceBg extends SpriteAsset {
public var highlight4:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var _totalScoreText:DisplayObject;
public var progress:DisplayObject;
public var bestText:DisplayObject;
public var answer2:DisplayObject;
public var answer3:DisplayObject;
public var answer4:DisplayObject;
public var answer1:DisplayObject;
public var text:DisplayObject;
public var timer:DisplayObject;
public var _totalScore:DisplayObject;
public var timeBonus:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var science:DisplayObject;
public var _scoreText:DisplayObject;
public var correctAnswer1:DisplayObject;
public var correctAnswer3:DisplayObject;
public var correctAnswer2:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var answers:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
public var correctAnswer4:DisplayObject;
public var entertainment:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var score:DisplayObject;
public var history:DisplayObject;
public var crowns:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var answerMask2:DisplayObject;
public var answerMask3:DisplayObject;
public var answerMask4:DisplayObject;
public var totalScore:DisplayObject;
public var answerMask1:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var wrongAnswer1:DisplayObject;
public var wrongAnswer2:DisplayObject;
public var wrongAnswer4:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var wrongAnswer3:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var question:DisplayObject;
public var totalScoreText:DisplayObject;
public var highlight1:DisplayObject;
public var highlight2:DisplayObject;
public var highlight3:DisplayObject;
}
}//package com.midasplayer.djinn
Section 83
//QuestionSheet_ShowSheetSound (com.midasplayer.djinn.QuestionSheet_ShowSheetSound)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class QuestionSheet_ShowSheetSound extends SoundAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var history:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 84
//QuestionSheet_SportBg (com.midasplayer.djinn.QuestionSheet_SportBg)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class QuestionSheet_SportBg extends SpriteAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var history:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 85
//QuestionSheet_WrongCheck (com.midasplayer.djinn.QuestionSheet_WrongCheck)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class QuestionSheet_WrongCheck extends MovieClipAsset {
public var totalScoreText:DisplayObject;
public var entertainment:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var score:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var _totalScoreText:DisplayObject;
public var history:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var text:DisplayObject;
public var totalScore:DisplayObject;
public var bestText:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var timeBonus:DisplayObject;
public var _timeBonus:DisplayObject;
public var _totalScore:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var scoreText:DisplayObject;
public var _scoreText:DisplayObject;
public var science:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
}
}//package com.midasplayer.djinn
Section 86
//QuestionSheet_WrongSound (com.midasplayer.djinn.QuestionSheet_WrongSound)
package com.midasplayer.djinn {
import flash.display.*;
import mx.core.*;
public class QuestionSheet_WrongSound extends SoundAsset {
public var highlight4:DisplayObject;
public var bestScore:DisplayObject;
public var anim:DisplayObject;
public var _totalScoreText:DisplayObject;
public var progress:DisplayObject;
public var bestText:DisplayObject;
public var answer2:DisplayObject;
public var answer3:DisplayObject;
public var answer4:DisplayObject;
public var answer1:DisplayObject;
public var text:DisplayObject;
public var timer:DisplayObject;
public var _totalScore:DisplayObject;
public var timeBonus:DisplayObject;
public var title:DisplayObject;
public var _title:DisplayObject;
public var science:DisplayObject;
public var _scoreText:DisplayObject;
public var correctAnswer1:DisplayObject;
public var correctAnswer3:DisplayObject;
public var correctAnswer2:DisplayObject;
public var categoryPop:DisplayObject;
public var timeLeft:DisplayObject;
public var answers:DisplayObject;
public var sport:DisplayObject;
public var geography:DisplayObject;
public var correctAnswer4:DisplayObject;
public var entertainment:DisplayObject;
public var _score:DisplayObject;
public var _bestText:DisplayObject;
public var score:DisplayObject;
public var history:DisplayObject;
public var crowns:DisplayObject;
public var timeBonusText:DisplayObject;
public var _timeBonusText:DisplayObject;
public var nature:DisplayObject;
public var answerMask2:DisplayObject;
public var answerMask3:DisplayObject;
public var answerMask4:DisplayObject;
public var totalScore:DisplayObject;
public var answerMask1:DisplayObject;
public var crown:DisplayObject;
public var _best:DisplayObject;
public var wrongAnswer1:DisplayObject;
public var wrongAnswer2:DisplayObject;
public var wrongAnswer4:DisplayObject;
public var fluid:DisplayObject;
public var time:DisplayObject;
public var wrongAnswer3:DisplayObject;
public var _timeBonus:DisplayObject;
public var scoreText:DisplayObject;
public var question:DisplayObject;
public var totalScoreText:DisplayObject;
public var highlight1:DisplayObject;
public var highlight2:DisplayObject;
public var highlight3:DisplayObject;
}
}//package com.midasplayer.djinn
Section 87
//Vars (com.midasplayer.djinn.Vars)
package com.midasplayer.djinn {
import com.midasplayer.game.comm.*;
import com.midasplayer.djinn.verify.*;
import com.midasplayer.math.*;
import com.midasplayer.sound.*;
import com.midasplayer.debug.*;
public class Vars {
private const _gameController:GameController;
private const _soundManager:SoundManager;
private const _musicManager:SoundManager;
private var _gameDataXml:String;
private var _lives:int;// = 3
private var _soundOn:Boolean;// = true
private var _gameData:GameDataParser;
private var _recorder:Recorder;
private var _score3:int;// = 5000
private var _assertHandler:IAssertHandler;// = null
private var _cardWidthSpacing:int;// = 32
private var _maxTimeBonus:int;// = 2500
private var _communicator:IGameComm;
private var _gameTime:int;// = 180
private var _answerTime:Number;// = 10.6
private var _tickInterval:int;
private var _cardHeightSpacing:int;// = 59
private var _loopVolume:Number;// = 0.3
private var _levelId:int;// = 0
private var _clientTickInterval:int;// = 50
private var _musicOn:Boolean;// = true
private var _gameOverTime:int;// = 11
private var _isShortGame:Boolean;// = false
private var _introTime:int;// = 17
private var _questionParser:QuestionParser;
private var _random:MtRandom;
private var _musicVolume:Number;// = 0.3
private var _cardMoveTicks:int;// = 10
private var _score0:int;// = 1000
private var _score1:int;// = 1500
private var _score2:int;// = 2000
public function Vars(_arg1:int){
_tickInterval = _clientTickInterval;
_gameController = new GameController();
_soundManager = new SoundManager();
_musicManager = new SoundManager();
_gameDataXml = ((((((((((((((((((((((((("<gamedata randomseed=\"4711\" version=\"1\">" + " <text id=\"intro_gameStartsIn\">Game starts in </text>") + " <text id=\"intro_title\">INSTRUCTIONS</text>") + " <text id=\"intro_instructions\">These are the instructions...</text>") + " <text id=\"entertainment\">Entertainment</text>") + " <text id=\"geography\">Geography</text>") + " <text id=\"sports\">Sports</text>") + " <text id=\"nature\">Nature</text>") + " <text id=\"history\">History</text>") + " <text id=\"science\">Science</text>") + "\t<text id=\"game_gameOver\">Game Over</text>") + "\t<text id=\"game_allCleared\">You are the Quiz King!</text>") + "\t<text id=\"game_timesUp\">Time is up!</text>") + "\t<text id=\"game_register\">Please register!</text>") + " <text id=\"gameover_title\">Game over</text>") + " <text id=\"gameover_gameStopsIn\">Game stops in </text>") + " <text id=\"gameover_score\">Score </text>") + " <text id=\"gameover_bonus\">Bonus </text>") + " <text id=\"gameover_totalScore\">Total score </text>") + " <text id=\"gameover_bestText\">Personal best </text>") + " <isShortGame>false</isShortGame>") + " <bestScore>1234</bestScore>") + " <musicOn>true</musicOn>") + " <soundOn>true</soundOn>") + "<questions><question id=\"10036\" diff=\"0\" cat=\"0\" correct=\"3\"><q><![CDATA[Costume designed Ruth Myers worked on which 1991 film about a bizarre family?]]></q><a1><![CDATA[The Spooky Family]]></a1><a2><![CDATA[The Ghost Family]]></a2><a3><![CDATA[The Addams Family]]></a3><a4><![CDATA[The Dead Family]]></a4></question><question id=\"10050\" diff=\"0\" cat=\"0\" correct=\"2\"><q><![CDATA[What was the name of the Spanish waiter in the TV series Fawlty Towers?]]></q><a1><![CDATA[Luigi]]></a1><a2><![CDATA[Manuel]]></a2><a3><![CDATA[Paulo]]></a3><a4><![CDATA[Jose]]></a4></question><question id=\"10197\" diff=\"0\" cat=\"0\" correct=\"2\"><q><![CDATA[In childrens TV, The Perils of Penelope ... who was a spin-off from the Wacky Races?]]></q><a1><![CDATA[Perfect]]></a1><a2><![CDATA[Pitstop]]></a2><a3><![CDATA[Partygoer]]></a3><a4><![CDATA[Pumping]]></a4></question><question id=\"10376\" diff=\"1\" cat=\"0\" correct=\"3\"><q><![CDATA[Who is the mother of Eddie Munster?]]></q><a1><![CDATA[Daisy Munster]]></a1><a2><![CDATA[Iris Munster]]></a2><a3><![CDATA[Lily Munster]]></a3><a4><![CDATA[Poppy Munster]]></a4></question><question id=\"10390\" diff=\"1\" cat=\"0\" correct=\"1\"><q><![CDATA[What was the name of Bullwinkle Mooses jet-packed squirrel partner in the 1960s childrens cartoon?]]></q><a1><![CDATA[Rocky]]></a1><a2><![CDATA[Cobra]]></a2><a3><![CDATA[Dredd]]></a3><a4><![CDATA[Sonja]]></a4></question><question id=\"10537\" diff=\"1\" cat=\"0\" correct=\"2\"><q><![CDATA[In pop music, complete the U2 song title Hold Me Thrill Me Kiss Me what?]]></q><a1><![CDATA[Run From Me]]></a1><a2><![CDATA[Kill Me]]></a2><a3><![CDATA[Leave Me]]></a3><a4><![CDATA[Die For Me]]></a4></question><question id=\"10584\" diff=\"1\" cat=\"0\" correct=\"3\"><q><![CDATA[In which 1997 movie did Cameron Diaz play Kimberley Wallace?]]></q><a1><![CDATA[Very Bad Things]]></a1><a2><![CDATA[Head Above Water]]></a2><a3><![CDATA[My Best Friends Wedding]]></a3><a4><![CDATA[Any Given Sunday]]></a4></question><question id=\"10646\" diff=\"2\" cat=\"0\" correct=\"2\"><q><![CDATA[Which TV show won the Best Drama Series award at the Television BAFTAs in 2002?]]></q><a1><![CDATA[The Bill]]></a1><a2><![CDATA[Cold Feet]]></a2><a3><![CDATA[Night And Day]]></a3><a4><![CDATA[Hollyoaks]]></a4></question><question id=\"10660\" diff=\"2\" cat=\"0\" correct=\"3\"><q><![CDATA[Who played The Bride in Quentin Tarantinos Kill Bill: Vol 1?]]></q><a1><![CDATA[Daryl Hannah]]></a1><a2><![CDATA[Lucy Lui]]></a2><a3><![CDATA[Uma Thurman]]></a3><a4><![CDATA[Vivica A. Fox]]></a4></question><question id=\"10739\" diff=\"2\" cat=\"0\" correct=\"4\"><q><![CDATA[Who played Blofeld in You Only Live Twice?]]></q><a1><![CDATA[Charles Gray]]></a1><a2><![CDATA[Eric Pohlman]]></a2><a3><![CDATA[Telly Savalas]]></a3><a4><![CDATA[Donald Pleasance]]></a4></question><question id=\"10816\" diff=\"3\" cat=\"0\" correct=\"3\"><q><![CDATA[In which city did Richard Gere meet Julia Roberts in Pretty Woman?]]></q><a1><![CDATA[New York]]></a1><a2><![CDATA[San Francisco]]></a2><a3><![CDATA[Los Angeles]]></a3><a4><![CDATA[Chicago]]></a4></question><question id=\"10830\" diff=\"3\" cat=\"0\" correct=\"3\"><q><![CDATA[For which film was Paul Greengrass Best Director Oscar nominated in 2007?]]></q><a1><![CDATA[Letters From Iwo Jima]]></a1><a2><![CDATA[The Queen]]></a2><a3><![CDATA[United 93]]></a3><a4><![CDATA[Babel]]></a4></question><question id=\"10819\" diff=\"3\" cat=\"0\" correct=\"1\"><q><![CDATA[The sousaphone, designed to be used in marching bands, is a variant of which orchestral brass instrument?]]></q><a1><![CDATA[Tuba]]></a1><a2><![CDATA[Drum]]></a2><a3><![CDATA[Guitar]]></a3><a4><![CDATA[Saxophone]]></a4></question><question id=\"14394\" diff=\"0\" cat=\"1\" correct=\"4\"><q><![CDATA[Which countrys famous exports include Guinness and Daniel ODonnell?]]></q><a1><![CDATA[Poland]]></a1><a2><![CDATA[Sweden]]></a2><a3><![CDATA[Germany]]></a3><a4><![CDATA[Republic Of Ireland]]></a4></question><question id=\"14408\" diff=\"0\" cat=\"1\" correct=\"4\"><q><![CDATA[What city was originally called San Cristobal de la Habana?]]></q><a1><![CDATA[Harwich]]></a1><a2><![CDATA[Helsinki]]></a2><a3><![CDATA[Oslo]]></a3><a4><![CDATA[Havana]]></a4></question><question id=\"14555\" diff=\"0\" cat=\"1\" correct=\"2\"><q><![CDATA[In which American state would you find the city of Chicago?]]></q><a1><![CDATA[New Jersey]]></a1><a2><![CDATA[Illinois]]></a2><a3><![CDATA[Florida]]></a3><a4><![CDATA[California]]></a4></question><question id=\"14734\" diff=\"1\" cat=\"1\" correct=\"1\"><q><![CDATA[Which famous Sydney landmark is located at Bennelong Point?]]></q><a1><![CDATA[Sydney Opera House]]></a1><a2><![CDATA[Sydney Harbour Bridge]]></a2><a3><![CDATA[Centrepoint Tower]]></a3><a4><![CDATA[Blues Point Tower]]></a4></question><question id=\"14748\" diff=\"1\" cat=\"1\" correct=\"4\"><q><![CDATA[JFK and La Guardia are 2 of New Yorks major international airports. Name the other.]]></q><a1><![CDATA[Queens]]></a1><a2><![CDATA[Manhattan]]></a2><a3><![CDATA[Bronx]]></a3><a4><![CDATA[Newark]]></a4></question><question id=\"14895\" diff=\"1\" cat=\"1\" correct=\"1\"><q><![CDATA[In the U.S.A., which island was the portal for over 12,000,000 immigrants to enter the United States between 1892 to 1954?]]></q><a1><![CDATA[Ellis]]></a1><a2><![CDATA[Staten]]></a2><a3><![CDATA[Liberty]]></a3><a4><![CDATA[Queens]]></a4></question><question id=\"14942\" diff=\"1\" cat=\"1\" correct=\"2\"><q><![CDATA[In what country would you find the river Volga?]]></q><a1><![CDATA[Poland]]></a1><a2><![CDATA[Russia]]></a2><a3><![CDATA[Germany]]></a3><a4><![CDATA[Mongolia]]></a4></question><question id=\"15004\" diff=\"2\" cat=\"1\" correct=\"3\"><q><![CDATA[Which war took place from 1861 to 1865?]]></q><a1><![CDATA[Zulu]]></a1><a2><![CDATA[Opium]]></a2><a3><![CDATA[American Civil]]></a3><a4><![CDATA[Boer]]></a4></question><question id=\"15018\" diff=\"2\" cat=\"1\" correct=\"1\"><q><![CDATA[On which of the Japanese islands would you find Mount Fuji?]]></q><a1><![CDATA[Honshu]]></a1><a2><![CDATA[Hokkaido]]></a2><a3><![CDATA[Kyushu]]></a3><a4><![CDATA[Shikoku]]></a4></question><question id=\"15097\" diff=\"2\" cat=\"1\" correct=\"1\"><q><![CDATA[On which famous New York street is the Empire State Building located?]]></q><a1><![CDATA[Fifth Avenue]]></a1><a2><![CDATA[Park Avenue]]></a2><a3><![CDATA[Madison Avenue]]></a3><a4><![CDATA[42nd Street]]></a4></question><question id=\"15174\" diff=\"3\" cat=\"1\" correct=\"1\"><q><![CDATA[What is the international registration code for cars from Belarus travelling in a foreign country?]]></q><a1><![CDATA[BY]]></a1><a2><![CDATA[B]]></a2><a3><![CDATA[BOL]]></a3><a4><![CDATA[BZ]]></a4></question><question id=\"15188\" diff=\"3\" cat=\"1\" correct=\"3\"><q><![CDATA[Colombia has land borders with how many countries?]]></q><a1><![CDATA[4]]></a1><a2><![CDATA[3]]></a2><a3><![CDATA[5]]></a3><a4><![CDATA[6]]></a4></question><question id=\"15177\" diff=\"3\" cat=\"1\" correct=\"3\"><q><![CDATA[In which body of water would you find the islands of Emira, Tench and Tabalo?]]></q><a1><![CDATA[Mediterranean Sea]]></a1><a2><![CDATA[Bay of Bengal]]></a2><a3><![CDATA[Pacific Ocean]]></a3><a4><![CDATA[Indian Ocean]]></a4></question><question id=\"10901\" diff=\"0\" cat=\"2\" correct=\"3\"><q><![CDATA[What was the name of the American Indian princess that saved the life of Captain John Smith and later became the subject of a Walt Disney cartoon?]]></q><a1><![CDATA[Winona]]></a1><a2><![CDATA[Cheyenne]]></a2><a3><![CDATA[Pocahontas]]></a3><a4><![CDATA[Tallulah]]></a4></question><question id=\"10915\" diff=\"0\" cat=\"2\" correct=\"2\"><q><![CDATA[What name was given to the great epidemic of bubonic plague which ravaged Europe in the 14th century?]]></q><a1><![CDATA[Scarlet Fever]]></a1><a2><![CDATA[Black Death]]></a2><a3><![CDATA[Red Plague]]></a3><a4><![CDATA[Consumption]]></a4></question><question id=\"11062\" diff=\"0\" cat=\"2\" correct=\"3\"><q><![CDATA[Three brass balls are the traditional symbol of what type of business?]]></q><a1><![CDATA[Lawyers]]></a1><a2><![CDATA[Ironmongers]]></a2><a3><![CDATA[Pawnbrokers]]></a3><a4><![CDATA[Bakers]]></a4></question><question id=\"11241\" diff=\"1\" cat=\"2\" correct=\"1\"><q><![CDATA[Who was the Greek King of the Gods?]]></q><a1><![CDATA[Zeus]]></a1><a2><![CDATA[Hermes]]></a2><a3><![CDATA[Apollo]]></a3><a4><![CDATA[Perseus]]></a4></question><question id=\"11255\" diff=\"1\" cat=\"2\" correct=\"4\"><q><![CDATA[Which spiritual leader was awarded the 1989 Nobel Peace Prize in recognition of his campaign to end the Chinese domination of Tibet?]]></q><a1><![CDATA[Nelson Mandela]]></a1><a2><![CDATA[Mother Theresa]]></a2><a3><![CDATA[The Pope]]></a3><a4><![CDATA[Dalai Lama]]></a4></question><question id=\"11402\" diff=\"1\" cat=\"2\" correct=\"1\"><q><![CDATA[Which newspaper appeared in Britain in October 1996?]]></q><a1><![CDATA[Independent]]></a1><a2><![CDATA[Daily Star]]></a2><a3><![CDATA[Telegraph]]></a3><a4><![CDATA[Mirror]]></a4></question><question id=\"11449\" diff=\"1\" cat=\"2\" correct=\"3\"><q><![CDATA[At which Olympics were 11 Israeli athletes murdered?]]></q><a1><![CDATA[Montreal - 1976]]></a1><a2><![CDATA[Mexico City - 1968]]></a2><a3><![CDATA[Munich - 1972]]></a3><a4><![CDATA[Moscow - 1980]]></a4></question><question id=\"11511\" diff=\"2\" cat=\"2\" correct=\"1\"><q><![CDATA[In Biblical history on which mountain did Noahs Ark come to rest after the flood?]]></q><a1><![CDATA[Mount Ararat]]></a1><a2><![CDATA[Mount Sinai]]></a2><a3><![CDATA[Mount Of Olives]]></a3><a4><![CDATA[Mount Everest]]></a4></question><question id=\"11525\" diff=\"2\" cat=\"2\" correct=\"4\"><q><![CDATA[The rules of which sport were drafted by the London Swimming Association on 12th May 1870?]]></q><a1><![CDATA[Rowing]]></a1><a2><![CDATA[Diving]]></a2><a3><![CDATA[Water Skiing]]></a3><a4><![CDATA[Water Polo]]></a4></question><question id=\"11604\" diff=\"2\" cat=\"2\" correct=\"3\"><q><![CDATA[During which war was The Battle Of Bunker Hill fought?]]></q><a1><![CDATA[Korean]]></a1><a2><![CDATA[Civil]]></a2><a3><![CDATA[American Independence]]></a3><a4><![CDATA[Vietnam]]></a4></question><question id=\"11681\" diff=\"3\" cat=\"2\" correct=\"1\"><q><![CDATA[In what decade did Jaguar begin production of the XJS car?]]></q><a1><![CDATA[1970s]]></a1><a2><![CDATA[1960s]]></a2><a3><![CDATA[1980s]]></a3><a4><![CDATA[1990s]]></a4></question><question id=\"11695\" diff=\"3\" cat=\"2\" correct=\"4\"><q><![CDATA[Of which country is Benito Juarez the national hero?]]></q><a1><![CDATA[Nicaragua]]></a1><a2><![CDATA[Spain]]></a2><a3><![CDATA[Cuba]]></a3><a4><![CDATA[Mexico]]></a4></question><question id=\"11684\" diff=\"3\" cat=\"2\" correct=\"4\"><q><![CDATA[In which century were astronomers Isaac Newton and Galileo Galilei both alive?]]></q><a1><![CDATA[15th]]></a1><a2><![CDATA[16th]]></a2><a3><![CDATA[18th]]></a3><a4><![CDATA[17th]]></a4></question><question id=\"11766\" diff=\"0\" cat=\"3\" correct=\"2\"><q><![CDATA[To which family of trees does the coconut belong?]]></q><a1><![CDATA[Poplar]]></a1><a2><![CDATA[Palm]]></a2><a3><![CDATA[Willow]]></a3><a4><![CDATA[Maple]]></a4></question><question id=\"11780\" diff=\"0\" cat=\"3\" correct=\"4\"><q><![CDATA[In which environment does an octopus naturally live?]]></q><a1><![CDATA[Semi-detached Bungalow]]></a1><a2><![CDATA[Treetop]]></a2><a3><![CDATA[Chester Canal]]></a3><a4><![CDATA[Sea]]></a4></question><question id=\"11927\" diff=\"0\" cat=\"3\" correct=\"2\"><q><![CDATA[What C is the common name for a tropical evergreen tree whose kidney shaped nuts are only edible after roasting?]]></q><a1><![CDATA[Clove]]></a1><a2><![CDATA[Cashew]]></a2><a3><![CDATA[Cherry]]></a3><a4><![CDATA[Conifer]]></a4></question><question id=\"12105\" diff=\"1\" cat=\"3\" correct=\"1\"><q><![CDATA[What H is the more common name for the scented climbing plant Lonicera?]]></q><a1><![CDATA[Honeysuckle]]></a1><a2><![CDATA[Hemp]]></a2><a3><![CDATA[Hares foot]]></a3><a4><![CDATA[Hyacinth]]></a4></question><question id=\"12119\" diff=\"1\" cat=\"3\" correct=\"3\"><q><![CDATA[What is a sacred bird in Peru?]]></q><a1><![CDATA[Parrot]]></a1><a2><![CDATA[Mountain Owl]]></a2><a3><![CDATA[The Condor]]></a3><a4><![CDATA[Bald Eagle]]></a4></question><question id=\"12266\" diff=\"1\" cat=\"3\" correct=\"2\"><q><![CDATA[From which country does half the worlds supply of cork come?]]></q><a1><![CDATA[Jamaica]]></a1><a2><![CDATA[Portugal]]></a2><a3><![CDATA[Italy]]></a3><a4><![CDATA[Cuba]]></a4></question><question id=\"12313\" diff=\"1\" cat=\"3\" correct=\"3\"><q><![CDATA[Where did the dodo once live?]]></q><a1><![CDATA[Honduras]]></a1><a2><![CDATA[Belize]]></a2><a3><![CDATA[Mauritius]]></a3><a4><![CDATA[Guatemala]]></a4></question><question id=\"12368\" diff=\"2\" cat=\"3\" correct=\"1\"><q><![CDATA[What is the largest species of rodent?]]></q><a1><![CDATA[Capybara]]></a1><a2><![CDATA[Water Rat]]></a2><a3><![CDATA[Giant Mouse]]></a3><a4><![CDATA[Hamster]]></a4></question><question id=\"12382\" diff=\"2\" cat=\"3\" correct=\"2\"><q><![CDATA[From which plant is the flavouring Saffron obtained?]]></q><a1><![CDATA[Sunflower]]></a1><a2><![CDATA[Crocus]]></a2><a3><![CDATA[Orchid]]></a3><a4><![CDATA[Violet]]></a4></question><question id=\"12461\" diff=\"2\" cat=\"3\" correct=\"3\"><q><![CDATA[Which nut-bearing tree has species called Persian, Japanese, buttermilk and black?]]></q><a1><![CDATA[Cashew]]></a1><a2><![CDATA[Beech]]></a2><a3><![CDATA[Walnut]]></a3><a4><![CDATA[Almond]]></a4></question><question id=\"12548\" diff=\"3\" cat=\"3\" correct=\"4\"><q><![CDATA[A member of the cat family, the puma is native to which continent?]]></q><a1><![CDATA[Africa]]></a1><a2><![CDATA[South America]]></a2><a3><![CDATA[Asia]]></a3><a4><![CDATA[North America]]></a4></question><question id=\"12562\" diff=\"3\" cat=\"3\" correct=\"3\"><q><![CDATA[Which bird can be described as Philomelian?]]></q><a1><![CDATA[Parrot]]></a1><a2><![CDATA[Bullfinch]]></a2><a3><![CDATA[Nightingale]]></a3><a4><![CDATA[Cardinal]]></a4></question><question id=\"12599\" diff=\"3\" cat=\"3\" correct=\"1\"><q><![CDATA[Which herb is Salvia Officinalis?]]></q><a1><![CDATA[Sage]]></a1><a2><![CDATA[Thyme]]></a2><a3><![CDATA[Rosemary]]></a3><a4><![CDATA[Parsley]]></a4></question><question id=\"12638\" diff=\"0\" cat=\"4\" correct=\"1\"><q><![CDATA[How many hours does it take the Earth to complete one revolution around its axis?]]></q><a1><![CDATA[24]]></a1><a2><![CDATA[12]]></a2><a3><![CDATA[6]]></a3><a4><![CDATA[4]]></a4></question><question id=\"12652\" diff=\"0\" cat=\"4\" correct=\"1\"><q><![CDATA[Name the type of organism which lives in or on other living things and feeds off them.]]></q><a1><![CDATA[Parasite]]></a1><a2><![CDATA[Pinasite]]></a2><a3><![CDATA[Plurasite]]></a3><a4><![CDATA[Pelasite]]></a4></question><question id=\"12799\" diff=\"0\" cat=\"4\" correct=\"1\"><q><![CDATA[Complete the following: In a laboratory, long hair should be what?]]></q><a1><![CDATA[Tied Back]]></a1><a2><![CDATA[Cut Short]]></a2><a3><![CDATA[Washed Clean]]></a3><a4><![CDATA[Kept Away From Water]]></a4></question><question id=\"12978\" diff=\"1\" cat=\"4\" correct=\"1\"><q><![CDATA[What is both the name of Mickey Mouses dog and also a dwarf planet?]]></q><a1><![CDATA[Pluto]]></a1><a2><![CDATA[Neptune]]></a2><a3><![CDATA[Rover]]></a3><a4><![CDATA[Venus]]></a4></question><question id=\"12992\" diff=\"1\" cat=\"4\" correct=\"3\"><q><![CDATA[What are the only objects in space to be named after their discoverers?]]></q><a1><![CDATA[Planets]]></a1><a2><![CDATA[Constellations]]></a2><a3><![CDATA[Comets]]></a3><a4><![CDATA[Galaxies]]></a4></question><question id=\"13139\" diff=\"1\" cat=\"4\" correct=\"3\"><q><![CDATA[In astronomy, if Ursa Major means Great Bear, what does Canis Major mean?]]></q><a1><![CDATA[Sea Dog]]></a1><a2><![CDATA[Hunting Dog]]></a2><a3><![CDATA[Great Dog]]></a3><a4><![CDATA[Lesser Dog]]></a4></question><question id=\"13186\" diff=\"1\" cat=\"4\" correct=\"2\"><q><![CDATA[What did Christopher Cockerell invent?]]></q><a1><![CDATA[Aeroplane]]></a1><a2><![CDATA[Hovercraft]]></a2><a3><![CDATA[Telescope]]></a3><a4><![CDATA[Printing Press]]></a4></question><question id=\"13248\" diff=\"2\" cat=\"4\" correct=\"3\"><q><![CDATA[Which of these planets was the latest to be discovered?]]></q><a1><![CDATA[Saturn]]></a1><a2><![CDATA[Neptune]]></a2><a3><![CDATA[Pluto]]></a3><a4><![CDATA[Jupiter]]></a4></question><question id=\"13262\" diff=\"2\" cat=\"4\" correct=\"3\"><q><![CDATA[Approximately how long does it take for the moon to orbit the Earth?]]></q><a1><![CDATA[A day]]></a1><a2><![CDATA[A week]]></a2><a3><![CDATA[A month]]></a3><a4><![CDATA[A year]]></a4></question><question id=\"13394\" diff=\"2\" cat=\"4\" correct=\"3\"><q><![CDATA[How many natural planetary satellites orbit the planet Venus?]]></q><a1><![CDATA[2]]></a1><a2><![CDATA[1]]></a2><a3><![CDATA[0]]></a3><a4><![CDATA[3]]></a4></question><question id=\"13441\" diff=\"3\" cat=\"4\" correct=\"4\"><q><![CDATA[What planet has Moons named Phobos and Deimos?]]></q><a1><![CDATA[Uranus]]></a1><a2><![CDATA[Jupiter]]></a2><a3><![CDATA[Saturn]]></a3><a4><![CDATA[Mars]]></a4></question><question id=\"13455\" diff=\"3\" cat=\"4\" correct=\"4\"><q><![CDATA[What travels at three hundred and forty-three metres per second?]]></q><a1><![CDATA[Light]]></a1><a2><![CDATA[The Fastest Train]]></a2><a3><![CDATA[Electricity]]></a3><a4><![CDATA[Sound]]></a4></question><question id=\"13492\" diff=\"3\" cat=\"4\" correct=\"2\"><q><![CDATA[A base is a chemical substance which reacts with an acid, to form which two general compounds]]></q><a1><![CDATA[Salt and Gas]]></a1><a2><![CDATA[Salt and Water]]></a2><a3><![CDATA[Oxide and Water]]></a3><a4><![CDATA[Carbon and Water]]></a4></question><question id=\"13529\" diff=\"0\" cat=\"5\" correct=\"1\"><q><![CDATA[Which of these would you find on a mans bicycle?]]></q><a1><![CDATA[Crossbar]]></a1><a2><![CDATA[Annoyedbar]]></a2><a3><![CDATA[Angrybar]]></a3><a4><![CDATA[Furiousbar]]></a4></question><question id=\"13543\" diff=\"0\" cat=\"5\" correct=\"1\"><q><![CDATA[What did John McEnroe say about Andy Murray in February 2007: \"Its not going to be easy for him on\" what?]]></q><a1><![CDATA[The Clay]]></a1><a2><![CDATA[The Hay]]></a2><a3><![CDATA[The Grey]]></a3><a4><![CDATA[The Bay]]></a4></question><question id=\"13690\" diff=\"0\" cat=\"5\" correct=\"2\"><q><![CDATA[Which country did the oarsman and sculler Steve Redgrave represent at the Olympics?]]></q><a1><![CDATA[America]]></a1><a2><![CDATA[Great Britain]]></a2><a3><![CDATA[Canada]]></a3><a4><![CDATA[France]]></a4></question><question id=\"13869\" diff=\"1\" cat=\"5\" correct=\"2\"><q><![CDATA[Which golfer is nicknamed The Big Easy?]]></q><a1><![CDATA[David Duval]]></a1><a2><![CDATA[Ernie Els]]></a2><a3><![CDATA[John Daly]]></a3><a4><![CDATA[Nick Price]]></a4></question><question id=\"13883\" diff=\"1\" cat=\"5\" correct=\"1\"><q><![CDATA[In the first five Rugby World Cups, of the Six Nations teams which is the only one that has never made the second round?]]></q><a1><![CDATA[Italy]]></a1><a2><![CDATA[France]]></a2><a3><![CDATA[Scotland]]></a3><a4><![CDATA[Ireland]]></a4></question><question id=\"14030\" diff=\"1\" cat=\"5\" correct=\"3\"><q><![CDATA[On a dartboard, what number is immediately to the right of 13?]]></q><a1><![CDATA[15]]></a1><a2><![CDATA[2]]></a2><a3><![CDATA[6]]></a3><a4><![CDATA[10]]></a4></question><question id=\"14077\" diff=\"1\" cat=\"5\" correct=\"1\"><q><![CDATA[Which sport took place for the first time in Britain at Belle Vue in Manchester in 1926?]]></q><a1><![CDATA[Greyhound Racing]]></a1><a2><![CDATA[Speedway]]></a2><a3><![CDATA[Archery]]></a3><a4><![CDATA[Basketball]]></a4></question><question id=\"14139\" diff=\"2\" cat=\"5\" correct=\"1\"><q><![CDATA[On 17 June 2007, David Beckham played his last match for La Liga premiers Real Madrid. What number did he wear for the club?]]></q><a1><![CDATA[23]]></a1><a2><![CDATA[7]]></a2><a3><![CDATA[21]]></a3><a4><![CDATA[17]]></a4></question><question id=\"14153\" diff=\"2\" cat=\"5\" correct=\"1\"><q><![CDATA[Who was the last Russian to win the mens 100 metres Olympic gold medal?]]></q><a1><![CDATA[Valery Borzov]]></a1><a2><![CDATA[Victor Khamenev]]></a2><a3><![CDATA[Josef Andropov]]></a3><a4><![CDATA[Mikael Rashnikov]]></a4></question><question id=\"14232\" diff=\"2\" cat=\"5\" correct=\"3\"><q><![CDATA[In what year did the British Ryder Cup team become \"Great Britain and Ireland\"?]]></q><a1><![CDATA[1985]]></a1><a2><![CDATA[1967]]></a2><a3><![CDATA[1973]]></a3><a4><![CDATA[1993]]></a4></question><question id=\"14309\" diff=\"3\" cat=\"5\" correct=\"2\"><q><![CDATA[Which trophy was described as Hardakers Horror during the 1960s?]]></q><a1><![CDATA[The Fairs Cup]]></a1><a2><![CDATA[The League Cup]]></a2><a3><![CDATA[The F.A. Cup]]></a3><a4><![CDATA[The Cup-Winners Cup]]></a4></question><question id=\"14323\" diff=\"3\" cat=\"5\" correct=\"1\"><q><![CDATA[Numbered between one and ten, Jan Stephenson holds the Number Two L.P.G.A. record with how many holes-in-one?]]></q><a1><![CDATA[Eight]]></a1><a2><![CDATA[Seven]]></a2><a3><![CDATA[Nine]]></a3><a4><![CDATA[Ten]]></a4></question><question id=\"14312\" diff=\"3\" cat=\"5\" correct=\"2\"><q><![CDATA[What nickname did Joe Montana earn with his attitude to the game?]]></q><a1><![CDATA[Joe King]]></a1><a2><![CDATA[Joe Cool]]></a2><a3><![CDATA[Joe 90]]></a3><a4><![CDATA[Joe Dee Foster]]></a4></question></questions>") + "</gamedata>");
super();
_random = new MtRandom(_arg1);
if (GameComm.isAvailable()){
_communicator = new GameComm();
_assertHandler = new RemoteAssertHandler(_communicator);
Debug.setAssertHandler(_assertHandler);
} else {
_gameDataXml = _gameDataXml.replace("4711", _arg1.toString());
_communicator = new DebugGameComm(_gameDataXml);
Debug.setAssertHandler(null);
};
var _local2:String = _communicator.getGameData();
_gameData = new GameDataParser(_local2);
random.setSeed(_gameData.randomSeed);
_questionParser = new QuestionParser(this, _local2);
_recorder = new Recorder(_communicator, _gameController);
if (_gameData.getElementTextAsBool("isShortGame")){
_isShortGame = true;
gameTime = (1 * 60);
};
musicOn = _gameData.getElementTextAsBool("musicOn");
soundOn = _gameData.getElementTextAsBool("soundOn");
}
public function set tickInterval(_arg1:int):void{
_tickInterval = _arg1;
}
public function get lives():int{
return (_lives);
}
public function set lives(_arg1:int):void{
_lives = _arg1;
}
public function get gameController():GameController{
return (_gameController);
}
public function set musicVolume(_arg1:Number):void{
_musicVolume = _arg1;
}
public function get maxTimeBonus():int{
return (_maxTimeBonus);
}
public function get soundOn():Boolean{
return (_soundOn);
}
public function set answerTime(_arg1:Number):void{
_answerTime = _arg1;
}
public function get introTime():int{
return (_introTime);
}
public function get communicator():IGameComm{
return (_communicator);
}
public function set levelId(_arg1:int):void{
_levelId = _arg1;
}
public function get tickInterval():int{
return (_tickInterval);
}
public function get isShortGame():Boolean{
return (_isShortGame);
}
public function set cardWidthSpacing(_arg1:int):void{
_cardWidthSpacing = _arg1;
}
public function set maxTimeBonus(_arg1:int):void{
_maxTimeBonus = _arg1;
}
public function get soundManager():SoundManager{
return (_soundManager);
}
public function get musicVolume():Number{
return (_musicVolume);
}
public function set soundOn(_arg1:Boolean):void{
_soundOn = _arg1;
}
public function get questionParser():QuestionParser{
return (_questionParser);
}
public function set gameOverTime(_arg1:int):void{
_gameOverTime = _arg1;
}
public function get answerTime():Number{
return (_answerTime);
}
public function set introTime(_arg1:int):void{
_introTime = _arg1;
}
public function get gameDataXml():String{
return (_gameDataXml);
}
public function get gameData():GameDataParser{
return (_gameData);
}
public function set gameTime(_arg1:int):void{
_gameTime = _arg1;
}
public function get levelId():int{
return (_levelId);
}
public function set score2(_arg1:int):void{
_score2 = _arg1;
}
public function set score3(_arg1:int):void{
_score3 = _arg1;
}
public function get random():MtRandom{
return (_random);
}
public function get recorder():Recorder{
return (_recorder);
}
public function set musicOn(_arg1:Boolean):void{
_musicOn = _arg1;
}
public function set loopVolume(_arg1:Number):void{
_loopVolume = _arg1;
}
public function get cardWidthSpacing():int{
return (_cardWidthSpacing);
}
public function get musicManager():SoundManager{
return (_musicManager);
}
public function get gameOverTime():int{
return (_gameOverTime);
}
public function set score0(_arg1:int):void{
_score0 = _arg1;
}
public function set score1(_arg1:int):void{
_score1 = _arg1;
}
public function set cardHeightSpacing(_arg1:int):void{
_cardHeightSpacing = _arg1;
}
public function get loopVolume():Number{
return (_loopVolume);
}
public function get score1():int{
return (_score1);
}
public function get score2():int{
return (_score2);
}
public function get score3():int{
return (_score3);
}
public function get musicOn():Boolean{
return (_musicOn);
}
public function get score0():int{
return (_score0);
}
public function get gameTime():int{
return (_gameTime);
}
public function set cardMoveTicks(_arg1:int):void{
_cardMoveTicks = _arg1;
}
public function get cardHeightSpacing():int{
return (_cardHeightSpacing);
}
public function get clientTickInterval():int{
return (_clientTickInterval);
}
public function get cardMoveTicks():int{
return (_cardMoveTicks);
}
}
}//package com.midasplayer.djinn
Section 88
//Animation (com.midasplayer.game.anim.Animation)
package com.midasplayer.game.anim {
import com.midasplayer.debug.*;
import flash.display.*;
public class Animation {
private var _firstFrame:uint;// = 0
private var _deferStopUntilLastFrame:Boolean;// = false
private var _lastFrame:uint;// = 0
private var _deferStop:Boolean;// = false
private var _onLink:Function;// = null
private var _stopAtFrame:int;// = -1
private var _movieClip:MovieClip;
private var _isPlaying:Boolean;// = false
private var _frame:uint;// = 1
private var _repeatCount:uint;// = 0
private static var s_started:uint = 0;
public function Animation(_arg1:MovieClip, _arg2:int=-1, _arg3:Boolean=false){
if (_arg1 == null){
Debug.assert(!((_arg1 == null)), "Trying to create an animation with a null movie clip.");
};
_movieClip = _arg1;
_stopAtFrame = _arg2;
_firstFrame = 1;
_lastFrame = _movieClip.totalFrames;
_deferStopUntilLastFrame = _arg3;
}
public function set FirstFrame(_arg1:uint):void{
if ((((_arg1 < 0)) || ((_arg1 > _movieClip.totalFrames)))){
Debug.assert(false, ((("First frame should be between 1 and " + _movieClip.totalFrames.toString()) + " but is: ") + _arg1));
};
_firstFrame = _arg1;
CurrentFrame = _arg1;
}
public function stop():void{
Debug.assert(isPlaying(), "Tried to stop an animation that is not playing.");
if (_deferStopUntilLastFrame){
_deferStop = true;
} else {
_stop();
};
}
public function continuePlaying():void{
Debug.assert(isDeferStop(), "Trying to continue an animation that hasn't been deffered stopped.");
_deferStop = false;
}
public function isDeferStop():Boolean{
return (_deferStop);
}
public function get CurrentFrame():uint{
return (_frame);
}
public function get LastFrame():uint{
return (_lastFrame);
}
public function start():void{
Debug.assert(!(isPlaying()), "Tried to start an animation that is already playing.");
_isPlaying = true;
s_started++;
}
public function isPlaying():Boolean{
return (_isPlaying);
}
public function set CurrentFrame(_arg1:uint):void{
if ((((_arg1 < 0)) || ((_arg1 > _movieClip.totalFrames)))){
Debug.assert(false, ((("Current frame should be between 1 and " + _movieClip.totalFrames.toString()) + " but is: ") + _arg1));
};
_frame = _arg1;
}
public function getMovieClip():MovieClip{
return (_movieClip);
}
public function set LastFrame(_arg1:uint):void{
if ((((_arg1 < 0)) || ((_arg1 > _movieClip.totalFrames)))){
Debug.assert(false, ((("Last frame should be between 1 and " + _movieClip.totalFrames.toString()) + " but is: ") + _arg1));
};
_lastFrame = _arg1;
}
public function set StopAtFrame(_arg1:int):void{
_stopAtFrame = _arg1;
}
public function set OnLink(_arg1:Function):void{
_onLink = _arg1;
}
public function hasLink():Boolean{
return (!((_onLink == null)));
}
public function get StopAtFrame():int{
return (_stopAtFrame);
}
protected function _stop():void{
s_started--;
_isPlaying = false;
_deferStop = false;
}
public function nextFrame():void{
Debug.assert((_frame > 0), "The current frame should be greater than 0.");
Debug.assert((_firstFrame <= _lastFrame), "The first frame should be equal or less the last frame.");
Debug.assert((_frame <= _lastFrame), "The current frame should always be less than the last frame.");
Debug.assert(_isPlaying, "Trying to play next frame when an animation has stopped.");
Debug.assert((_stopAtFrame <= _lastFrame), "Stop at frame should be less or equal last frame.");
_movieClip.gotoAndStop(_frame);
_frame++;
if (_stopAtFrame != -1){
if (_frame == (_stopAtFrame + 1)){
_stopOrLink();
};
} else {
if (((_deferStop) && ((_frame == (_lastFrame + 1))))){
_stop();
};
};
if (_frame == (_lastFrame + 1)){
_frame = _firstFrame;
};
}
public function get FirstFrame():uint{
return (_firstFrame);
}
private function _stopOrLink():void{
if (_onLink == null){
_stop();
} else {
_onLink();
};
}
}
}//package com.midasplayer.game.anim
Section 89
//TickedAnimation (com.midasplayer.game.anim.TickedAnimation)
package com.midasplayer.game.anim {
import com.midasplayer.debug.*;
import com.midasplayer.timing.*;
import flash.display.*;
public class TickedAnimation extends Animation implements IRenderable {
private var _tickInterval:Number;// = 0
private var _framesAdvanced:Number;// = 0
private var _fps:Number;// = 0
private var _lastRender:Number;// = 0
private var _frameTickInterval:Number;// = 0
private var _startTime:Number;// = -1
public function TickedAnimation(_arg1:uint, _arg2:uint, _arg3:MovieClip, _arg4:int=-1, _arg5:Boolean=false){
_fps = _arg1;
_tickInterval = _arg2;
_reset();
super(_arg3, _arg4, _arg5);
}
override public function start():void{
_reset();
super.start();
}
public function get FPS():uint{
return (_fps);
}
private function _reset():void{
_frameTickInterval = ((1000 / _tickInterval) / _fps);
_startTime = -1;
_framesAdvanced = 0;
}
public function set FPS(_arg1:uint):void{
_fps = _arg1;
_reset();
_startTime = _lastRender;
}
public function render(_arg1:int, _arg2:Number):void{
var _local3:Number = (_arg1 + _arg2);
if (_startTime == -1){
_startTime = _local3;
};
Debug.assert((_local3 >= _startTime), "Now is greater than the start time in a ticked animation.");
var _local4:Number = ((_local3 - _startTime) / _frameTickInterval);
Debug.assert((_framesAdvanced <= _local4), "A ticked animation has advanced more than expected.");
var _local5:int = (_local4 - _framesAdvanced);
_framesAdvanced = (_framesAdvanced + _local5);
if ((((_local5 > 0)) && (isPlaying()))){
_lastRender = _local3;
};
while ((((_local5-- > 0)) && (isPlaying()))) {
nextFrame();
};
}
}
}//package com.midasplayer.game.anim
Section 90
//DebugGameComm (com.midasplayer.game.comm.DebugGameComm)
package com.midasplayer.game.comm {
import com.midasplayer.debug.*;
public class DebugGameComm implements IGameComm {
private var _responseCallback:IResponseCallback;// = null
private var _state:int;// = 0
private var _gameData:String;
private var _playDatas:Array;
private var _requestCallback:IRequestCallback;// = null
public static const Started:int = 1;
public static const Quited:int = 3;
public static const Ended:int = 2;
public static const NotStarted:int = 0;
public function DebugGameComm(_arg1:String){
_playDatas = new Array();
super();
_gameData = _arg1;
}
public function getGameData():String{
return (_gameData);
}
public function addPlayData(_arg1:String):void{
Debug.assert(!((_state == NotStarted)), "Trying to add playdata before the game has been started.");
Debug.assert(!((_arg1 == null)), "Trying to add a playdata that is null.");
_playDatas.push(_arg1);
}
public function gameStart():void{
Debug.assert((_state == NotStarted), "Trying to start the game when it's already started.");
_state = Started;
}
public function get state():int{
return (_state);
}
public function gameEnd(_arg1:uint):void{
Debug.assert((_state == Started), "Trying to end a game that is not in the started state.");
_state = Ended;
}
public function sendRequest(_arg1:String):void{
Debug.assert(!((_requestCallback == null)), "You need to set a request handler before sending a request.");
var _local2:String = _requestCallback.onRequest(_arg1);
if (_responseCallback != null){
_responseCallback.onResponse(_local2);
};
}
public function addResponseCallback(_arg1:IResponseCallback):void{
Debug.assert((_responseCallback == null), "Trying to set a response callback that has already been set.");
_responseCallback = _arg1;
}
public function gameQuit():void{
Debug.assert((_state == Ended), "Trying to quit the game before it has been ended.");
_state = Quited;
}
public function setRequestCallback(_arg1:IRequestCallback):void{
Debug.assert((_requestCallback == null), "Trying to set a request callback that has already been set.");
_requestCallback = _arg1;
}
public function get playDatas():Array{
return (_playDatas);
}
}
}//package com.midasplayer.game.comm
Section 91
//GameComm (com.midasplayer.game.comm.GameComm)
package com.midasplayer.game.comm {
import com.midasplayer.debug.*;
import flash.utils.*;
import flash.external.*;
import flash.system.*;
public class GameComm implements IGameComm {
private var _responseCallback:IResponseCallback;
private var _state:int;// = 0
private static const _Quitted:int = 3;
private static const _Started:int = 1;
private static const _Ended:int = 2;
private static const _NotStarted:int = 0;
public function gameQuit():void{
Debug.assert((_state == _Ended), "Quitting the game before it has been ended.");
setTimeout(_quit, 2000);
_state = _Quitted;
}
public function addResponseCallback(_arg1:IResponseCallback):void{
Debug.assert((_responseCallback == null), "Trying to set a response callback that has already been set.");
_responseCallback = _arg1;
ExternalInterface.addCallback("onProxyResponse", _onResponse);
}
private function _onResponse(_arg1:String):void{
_responseCallback.onResponse(_arg1);
}
public function gameStart():void{
Debug.assert((_state == _NotStarted), "Trying to start the game when it's already started.");
fscommand("gameStart", "");
_state = _Started;
}
private function _quit():void{
fscommand("gameQuit", "");
}
public function sendRequest(_arg1:String):void{
fscommand("request", _arg1);
}
public function gameEnd(_arg1:uint):void{
Debug.assert((_state == _Started), "Trying to end a game that is not in the started state.");
fscommand("gameEnd", ("" + _arg1));
_state = _Ended;
}
public function getGameData():String{
var _local1:Object = ExternalInterface.call("getGameData");
if (_local1 == null){
throw (new Error("The getGameData external interface call returned null."));
};
if (_local1.success == false){
throw (new Error("The getGameData returned object is not success."));
};
if (_local1.message == null){
throw (new Error("The GameData returned object has a null message."));
};
return (_local1.message);
}
public function addPlayData(_arg1:String):void{
Debug.assert(!((_state == _NotStarted)), "Trying to add playdata before the game has been started.");
ExternalInterface.call("playData", _arg1);
}
public static function isAvailable():Boolean{
return (ExternalInterface.available);
}
}
}//package com.midasplayer.game.comm
Section 92
//GameDataParser (com.midasplayer.game.comm.GameDataParser)
package com.midasplayer.game.comm {
import com.midasplayer.debug.*;
public class GameDataParser {
private var _seed:int;// = 0
private var _textElements:XMLList;
private var _gameData:XML;
public function GameDataParser(_arg1:String){
Debug.assert(!((_arg1 == null)), "Could not parse the game data, the xml parameter is null.");
_gameData = new XML(_arg1);
Debug.assert((_gameData.length() == 1), "The game data XML should only have 1 root child.");
_seed = parseInt(_gameData.attribute("randomseed"));
Debug.assert(!((_seed == 0)), "The game data randomseed attribute is 0, this may result in complete randomness.");
_textElements = _gameData.child("text");
}
public function getText(_arg1:String):String{
var texts:XMLList;
var id = _arg1;
texts = _textElements.(@id == id);
Debug.assert((texts.length() == 1), (("Could not find the text element (or found more than 1) with attribute id '" + id) + "' in the game data."));
return (texts.text());
}
public function getElementTextAsInt(_arg1:String):int{
var _local2:XMLList;
_local2 = _getOneElement(_arg1);
var _local3:Number = parseInt(_local2.text());
Debug.assert(!(isNaN(_local3)), ((("Could not parse a game data property as int '" + _arg1) + "' value: ") + _local2.text()));
return (int(_local3));
}
private function _getOneElement(_arg1:String):XMLList{
var _local2:XMLList = _gameData.child(_arg1);
Debug.assert((_local2.length() == 1), (("Could not find the element (or found more than 1) with the name '" + _arg1) + "' in the game data."));
return (_local2);
}
public function getElementTextAsBool(_arg1:String):Boolean{
var _local2:String = getElementTextAsString(_arg1).toLowerCase();
Debug.assert((((((((_local2 == "0")) || ((_local2 == "1")))) || ((_local2 == "false")))) || ((_local2 == "true"))), ((("Could not parse a boolean, the value should be 'true', 'false', '0' or '1'. Element: " + _arg1) + ", value: ") + _local2));
return ((((_local2 == "true")) || ((_local2 == "1"))));
}
public function get randomSeed():int{
return (_seed);
}
public function getElementTextAsString(_arg1:String):String{
return (_getOneElement(_arg1).text());
}
}
}//package com.midasplayer.game.comm
Section 93
//IGameComm (com.midasplayer.game.comm.IGameComm)
package com.midasplayer.game.comm {
public interface IGameComm {
function gameStart():void;
function gameQuit():void;
function getGameData():String;
function addResponseCallback(_arg1:IResponseCallback):void;
function gameEnd(_arg1:uint):void;
function sendRequest(_arg1:String):void;
function addPlayData(_arg1:String):void;
}
}//package com.midasplayer.game.comm
Section 94
//IPlayData (com.midasplayer.game.comm.IPlayData)
package com.midasplayer.game.comm {
public interface IPlayData {
function toPlayData():String;
function getTick():int;
function execute():void;
}
}//package com.midasplayer.game.comm
Section 95
//IRequestCallback (com.midasplayer.game.comm.IRequestCallback)
package com.midasplayer.game.comm {
public interface IRequestCallback {
function onRequest(_arg1:String):String;
}
}//package com.midasplayer.game.comm
Section 96
//IResponseCallback (com.midasplayer.game.comm.IResponseCallback)
package com.midasplayer.game.comm {
public interface IResponseCallback {
function onResponse(_arg1:String):void;
}
}//package com.midasplayer.game.comm
Section 97
//Engine (com.midasplayer.game.engine.Engine)
package com.midasplayer.game.engine {
import com.midasplayer.game.comm.*;
import com.midasplayer.game.timer.*;
import com.midasplayer.debug.*;
import com.midasplayer.timing.*;
import flash.display.*;
public class Engine extends Sprite implements ITickable, IRenderable {
private var _gameOverTimer:IGameTimer;
private var _pauseGame:IRunnable;
private var _pauseTimer:IGameTimer;
private var _state:int;// = 0
private var _gameDataParser:GameDataParser;
private var _gameOver:IRunnable;
private var _gameCommunicator:IGameComm;
private var _game:IGame;
private var _introTimer:IGameTimer;
private var _engineTimer:IGameTimer;
private var _intro:IRunnable;
private var _timerFactory:IGameTimerFactory;
private var _gameTimer:IGameTimer;
public static const RunIntro:int = 3;
public static const StopEngine:int = 1;
public static const StopPauseGame:int = 9;
public static const StartIntro:int = 2;
public static const StopGameStartGameOver:int = 6;
public static const RunPauseGame:int = 8;
public static const StartEngine:int = 0;
public static const StartPauseGame:int = 7;
private static const _MaxStates:int = 13;
public static const StopGameOver:int = 11;
public static const StopIntroStartGame:int = 4;
public static const RunGameOver:int = 10;
public static const Done:int = 12;
public static const RunGame:int = 5;
public function Engine(_arg1:IRunnable, _arg2:IGame, _arg3:IRunnable, _arg4:IRunnable, _arg5:IGameTimerFactory, _arg6:IGameComm):void{
Debug.assert(!((_arg1 == null)), "The intro is null.");
Debug.assert(!((_arg2 == null)), "The game is null.");
Debug.assert(!((_arg3 == null)), "The pause is null.");
Debug.assert(!((_arg4 == null)), "The game over is null.");
Debug.assert(!((_arg5 == null)), "The timer factory is null.");
Debug.assert(!((_arg6 == null)), "The game communicator is null.");
_intro = _arg1;
_game = _arg2;
_pauseGame = _arg3;
_gameOver = _arg4;
_gameCommunicator = _arg6;
_timerFactory = _arg5;
}
private function _onStopEngine():void{
onStopEngine();
_gameCommunicator.gameQuit();
}
protected function onStartPauseGame():void{
}
protected function onStopPauseGame():void{
}
private function _onStartGameOver():void{
_gameOverTimer = _timerFactory.create();
onStartGameOver();
_gameOver.start();
}
protected function onRunEngine():void{
}
protected function onStopGame():void{
}
private function _onStartGame():void{
_gameCommunicator.gameStart();
_gameTimer = _timerFactory.create();
onStartGame();
_game.start();
}
protected function onStopGameOver():void{
}
protected function onRunIntro():void{
}
protected function onStopEngine():void{
}
public function tick(_arg1:int):void{
}
public function render(_arg1:int, _arg2:Number):void{
}
private function _onStopGameOver():void{
onStopGameOver();
_gameOver.stop();
}
private function _onStopIntro():void{
onStopIntro();
_intro.stop();
}
private function _onStopGame():void{
onStopGame();
_game.stop();
_gameCommunicator.gameEnd(_game.getFinalScore());
}
protected function onRunGameOver():void{
}
private function _onRunGameOver():void{
onRunGameOver();
_gameOverTimer.step(_gameOver, _gameOver);
}
protected function onRunPauseGame():void{
}
protected function onRunGame():void{
}
private function _onRunIntro():void{
onRunIntro();
_introTimer.step(_intro, _intro);
}
private function _onRunGame():void{
onRunGame();
_gameTimer.step(_game, _game);
}
public function update():void{
if (((((!((_state == StartEngine))) && (!((_state == StopEngine))))) && (!((_state == Done))))){
_onRunEngine();
};
if (_state == StartEngine){
_onStartEngine();
_state = StartIntro;
} else {
if (_state == StartIntro){
_onStartIntro();
_state = RunIntro;
} else {
if (_state == RunIntro){
if (_intro.isDone()){
_state = StopIntroStartGame;
} else {
_onRunIntro();
};
} else {
if (_state == StopIntroStartGame){
_onStopIntro();
_onStartGame();
_state = RunGame;
} else {
if (_state == RunGame){
if (_game.isDone()){
_state = StopGameStartGameOver;
} else {
if (_game.isPaused()){
_state = StartPauseGame;
} else {
_onRunGame();
};
};
} else {
if (_state == StopGameStartGameOver){
_onStopGame();
_onStartGameOver();
_state = RunGameOver;
} else {
if (_state == StartPauseGame){
_onStartPauseGame();
_state = RunPauseGame;
} else {
if (_state == RunPauseGame){
if (_pauseGame.isDone()){
_state = StopPauseGame;
} else {
_onRunPauseGame();
};
} else {
if (_state == StopPauseGame){
_onStopPauseGame();
_state = RunGame;
} else {
if (_state == RunGameOver){
if (_gameOver.isDone()){
_state = StopGameOver;
} else {
_onRunGameOver();
};
} else {
if (_state == StopGameOver){
_onStopGameOver();
_state = StopEngine;
} else {
if (_state == StopEngine){
_onStopEngine();
_state = Done;
} else {
if (_state == Done){
} else {
Debug.assert(false, ("Encountered an unknown game state: " + _state));
};
};
};
};
};
};
};
};
};
};
};
};
};
}
private function _onStopPauseGame():void{
onStopPauseGame();
_pauseGame.stop();
}
protected function onStartGameOver():void{
}
protected function onStartGame():void{
}
private function _onRunEngine():void{
onRunEngine();
_engineTimer.step(this, this);
}
private function _onStartIntro():void{
_introTimer = _timerFactory.create();
onStartIntro();
_intro.start();
}
private function _onRunPauseGame():void{
onRunPauseGame();
_pauseTimer.step(_pauseGame, _pauseGame);
}
public function getState():int{
return (_state);
}
private function _onStartPauseGame():void{
_pauseTimer = _timerFactory.create();
onStartPauseGame();
_pauseGame.start();
}
protected function onStartEngine():void{
}
private function _onStartEngine():void{
_engineTimer = _timerFactory.create();
_gameDataParser = new GameDataParser(_gameCommunicator.getGameData());
onStartEngine();
}
protected function onStartIntro():void{
}
protected function getGameDataParser():GameDataParser{
return (_gameDataParser);
}
protected function onStopIntro():void{
}
}
}//package com.midasplayer.game.engine
Section 98
//IGame (com.midasplayer.game.engine.IGame)
package com.midasplayer.game.engine {
public interface IGame extends IRunnable {
function isPaused():Boolean;
function getFinalScore():int;
}
}//package com.midasplayer.game.engine
Section 99
//IPlayDataRecorder (com.midasplayer.game.engine.IPlayDataRecorder)
package com.midasplayer.game.engine {
import com.midasplayer.game.comm.*;
public interface IPlayDataRecorder {
function add(_arg1:IPlayData):void;
function toPlayDataXml():String;
}
}//package com.midasplayer.game.engine
Section 100
//IRunnable (com.midasplayer.game.engine.IRunnable)
package com.midasplayer.game.engine {
import com.midasplayer.timing.*;
public interface IRunnable extends ITickable, IRenderable {
function stop():void;
function start():void;
function isDone():Boolean;
}
}//package com.midasplayer.game.engine
Section 101
//PlayDataRecorder (com.midasplayer.game.engine.PlayDataRecorder)
package com.midasplayer.game.engine {
import com.midasplayer.game.comm.*;
import com.midasplayer.debug.*;
public class PlayDataRecorder implements IPlayDataRecorder {
private var _communicator:IGameComm;
private var _playDatas:Array;
public function PlayDataRecorder(_arg1:IGameComm){
_playDatas = new Array();
super();
_communicator = _arg1;
}
public function toPlayDataXml():String{
var _local3:IPlayData;
var _local1 = (((("<client action=\"gameover\" slotId=\"57788732\" playId=\"0\" request=\"3\" magic=\"813666108\">\n" + "<gameover time=\"2009-05-29 11:40:16\" lastplaydataid=\"") + _playDatas.length) + "\">\n") + "<result><![CDATA[100845]]></result>\n");
var _local2 = 1;
for each (_local3 in _playDatas) {
_local1 = (_local1 + ((((" <entry id=\"" + _local2) + "\" time=\"2009-05-24 01:34:00\"><![CDATA[") + _local3.toPlayData()) + "]]></entry>\n"));
_local2++;
};
_local1 = (_local1 + ((((((("</gameover>\n" + "<process total=\"1\" method=\"1\">\n") + " <p time=\"2009-05-29 11:36:03\" action=\"error\" code=\"107\" pid=\"0\" />\n") + "</process>\n") + "<focus total=\"1\">\n") + " <switch time=\"2009-05-29 11:36:03\" pid=\"5768\" title=\"King.com (jk.dev.midasplayer.com) - Microsoft Internet Explorer\" process=\"C:\Program\Internet Explorer\iexplore.exe\" />\n") + "</focus>\n") + "</client>\n"));
return (_local1);
}
public function add(_arg1:IPlayData):void{
Debug.assert(!((_arg1 == null)), "Trying to add a null play data.");
_playDatas.push(_arg1);
_communicator.addPlayData((_arg1.toPlayData() + "\n"));
}
}
}//package com.midasplayer.game.engine
Section 102
//TextFields (com.midasplayer.game.text.TextFields)
package com.midasplayer.game.text {
import com.midasplayer.debug.*;
import flash.display.*;
import flash.text.*;
public class TextFields {
private var _fields:Sprite;
public function TextFields(_arg1:Sprite){
_fields = _arg1;
}
public function setColor(_arg1:int):void{
var _local3:TextField;
var _local4:TextFormat;
var _local2:int;
while (_local2 < _fields.numChildren) {
_local3 = (_fields.getChildAt(_local2) as TextField);
if (_local3 == null){
} else {
_local4 = _local3.getTextFormat();
_local4.color = _arg1;
_local3.setTextFormat(_local4);
};
_local2++;
};
}
public function get(_arg1:String):TextField{
var _local2:TextField = (_fields.getChildByName(_arg1) as TextField);
Debug.assert(!((_local2 == null)), (("Could not extract the text field '" + _arg1) + "'."));
return (_local2);
}
public function exists(_arg1:String):Boolean{
return (!((_fields.getChildByName(_arg1) == null)));
}
public function setText(_arg1:String, _arg2:String):void{
get(_arg1).text = _arg2;
}
}
}//package com.midasplayer.game.text
Section 103
//GameTimer (com.midasplayer.game.timer.GameTimer)
package com.midasplayer.game.timer {
import com.midasplayer.time.*;
import com.midasplayer.debug.*;
import com.midasplayer.timing.*;
public class GameTimer implements IGameTimer {
private var _tickInterval:uint;// = 0
private var _timer:ITimer;// = null
private var _maxTicks:uint;// = 0
private var _internalTick:uint;// = 0
private var _tick:uint;// = 0
public function GameTimer(_arg1:ITimer, _arg2:uint, _arg3:uint){
_timer = _arg1;
_tickInterval = _arg2;
_maxTicks = _arg3;
}
public function step(_arg1:ITickable, _arg2:IRenderable):void{
var _local5:uint;
var _local3:uint = _timer.getTime();
if (_local3 < (_internalTick * _tickInterval)){
Debug.assert(false, ((("The time has decreased since last step call: " + _local3) + " < ") + (_internalTick * _tickInterval)));
};
var _local4:uint = (_local3 - (_internalTick * _tickInterval));
if (_local4 >= _tickInterval){
_local5 = (_tick + _maxTicks);
while ((((_local4 >= _tickInterval)) && ((_tick < _local5)))) {
_arg1.tick(++_tick);
_local4 = (_local4 - _tickInterval);
_internalTick++;
};
};
_arg2.render(_tick, Math.min((_local4 / _tickInterval), 1));
}
public function reset():void{
var _local1:uint = _timer.getTime();
if (_local1 < _tickInterval){
return;
};
_internalTick = ((_local1 / _tickInterval) - 1);
}
public function getTick():uint{
return (_tick);
}
public function setTick(_arg1:uint):void{
_tick = _arg1;
}
}
}//package com.midasplayer.game.timer
Section 104
//GameTimerFactory (com.midasplayer.game.timer.GameTimerFactory)
package com.midasplayer.game.timer {
import com.midasplayer.time.*;
public class GameTimerFactory implements IGameTimerFactory {
private var _tickInterval:int;// = 0
private var _timer:ITimer;
private var _maxTicks:int;// = 0
public function GameTimerFactory(_arg1:ITimer, _arg2:int, _arg3:int){
_timer = _arg1;
_tickInterval = _arg2;
_maxTicks = _arg3;
}
public function create():IGameTimer{
var _local1:IGameTimer = new GameTimer(_timer, _tickInterval, _maxTicks);
_local1.reset();
return (_local1);
}
}
}//package com.midasplayer.game.timer
Section 105
//IGameTimer (com.midasplayer.game.timer.IGameTimer)
package com.midasplayer.game.timer {
import com.midasplayer.timing.*;
public interface IGameTimer {
function step(_arg1:ITickable, _arg2:IRenderable):void;
function reset():void;
}
}//package com.midasplayer.game.timer
Section 106
//IGameTimerFactory (com.midasplayer.game.timer.IGameTimerFactory)
package com.midasplayer.game.timer {
public interface IGameTimerFactory {
function create():IGameTimer;
}
}//package com.midasplayer.game.timer
Section 107
//Timeout (com.midasplayer.game.timer.Timeout)
package com.midasplayer.game.timer {
public class Timeout {
private var _startTime:Number;// = -1
private var _interval:Number;// = 0
public function Timeout(_arg1:Number, _arg2:Number){
_startTime = _arg1;
_interval = _arg2;
}
public function setInterval(_arg1:Number):void{
_interval = _arg1;
}
public function left(_arg1:Number):Number{
return ((Math.max(0, (1 - alpha(_arg1))) * _interval));
}
public function isDone(_arg1:Number):Boolean{
return ((alpha(_arg1) >= 1));
}
public function alpha(_arg1:Number):Number{
return (((_arg1 - _startTime) / _interval));
}
}
}//package com.midasplayer.game.timer
Section 108
//PennerEase (com.midasplayer.math.pennertween.PennerEase)
package com.midasplayer.math.pennertween {
public class PennerEase {
public static function easeInOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * (0.3 * 1.5)) : _arg5.period;
var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2));
};
--_arg1;
return ((((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) * 0.5) + _arg3) + _arg2));
}
public static function easeInOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
public static function easeInOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeInBounce((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOutBounce(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
public static function easeInOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_local6 = (_local6 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_local6 + 1) * _arg1) - _local6))) + _arg2));
};
_arg1 = (_arg1 - 2);
_local6 = (_local6 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 2)) + _arg2));
}
public static function easeOutInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCubic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInCubic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 1)) + _arg2));
}
public static function easeInOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((-(_arg3) / 2) * (Math.cos(((Math.PI * _arg1) / _arg4)) - 1)) + _arg2));
}
public static function easeInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_local6 + 1) * _arg1) - _local6)) + _arg2));
}
public static function easeInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeOutInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuint((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuint(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBounce((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInBounce(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutElastic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInElastic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg1)==_arg4) ? (_arg2 + _arg3) : (((_arg3 * 1.001) * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2));
}
public static function easeOutInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBack((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInBack(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg1)==0) ? _arg2 : (((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2) - (_arg3 * 0.001)));
}
public static function easeInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((-(_arg3) / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) + 1)) + _arg2));
}
public static function easeInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg3 - easeOutBounce((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeOutInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutExpo((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInExpo(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((-(_arg3) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 1)) + _arg2));
}
public static function easeInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg3) + _arg2));
}
public static function easeInOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 2)) + _arg2));
}
public static function easeOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
--_arg1;
return ((-(((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2));
}
public static function easeOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuad((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuad(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2));
}
public static function easeInOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((-(_arg3) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
}
public static function easeOutInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutSine((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInSine(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 == 0){
return (_arg2);
};
if (_arg1 == _arg4){
return ((_arg2 + _arg3));
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2) - (_arg3 * 0.0005)));
};
--_arg1;
return (((((_arg3 / 2) * 1.0005) * (-(Math.pow(2, (-10 * _arg1))) + 2)) + _arg2));
}
public static function easeOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
return (((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) + _arg3) + _arg2));
}
public static function easeOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * Math.sqrt((1 - (_arg1 * _arg1)))) + _arg2));
}
public static function easeOutInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuart((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuart(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCirc((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInCirc(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
}
}//package com.midasplayer.math.pennertween
Section 109
//PennerTween (com.midasplayer.math.pennertween.PennerTween)
package com.midasplayer.math.pennertween {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class PennerTween {
private var _onUpdateParams:Array;
private var _startTime:int;
private var _onComplete:Object;
private var _tweenProps:Object;
private var _time:Number;
private var _propsList:Array;
private var _target:Object;
private var _props:Object;
private var _onUpdate:Object;
private var _easeFunc:Function;
private var _id:int;
private var _onCompleteParams:Array;
public static var frameController:Sprite = new Sprite();
private static var _idIncr:int = 0;
private static var _debugChildren:Array;
private static var _debugSprite:Sprite;
private static var _instances:Array;
public function PennerTween(_arg1:Object, _arg2:Number, _arg3:Function, _arg4:Object, _arg5:Boolean){
var _local7:Array;
var _local8:String;
super();
_target = _arg1;
_time = _arg2;
_easeFunc = _arg3;
_props = _arg4;
_id = ++_idIncr;
_propsList = [];
var _local6:int;
for (_local8 in _props) {
if (_local8 == "onComplete"){
_onComplete = _props[_local8];
} else {
if (_local8 == "onUpdate"){
_onUpdate = _props[_local8];
} else {
if (_local8 == "onUpdateParams"){
_onUpdateParams = _props[_local8];
} else {
if (_local8 == "onCompleteParams"){
_onCompleteParams = _props[_local8];
} else {
_propsList[_local6] = new TweenProp(_local8, _target[_local8], _props[_local8]);
_local6++;
};
};
};
};
};
_start();
}
private function _stop():void{
frameController.removeEventListener(Event.ENTER_FRAME, onFrameUpdate);
_removeTween(this);
if (_onComplete){
if (_onCompleteParams){
_onComplete(_onCompleteParams);
} else {
_onComplete();
};
};
}
private function _start():void{
_abortRunningTween(this);
_startTime = getTimer();
frameController.addEventListener(Event.ENTER_FRAME, onFrameUpdate, false, 0, true);
}
private function _updatePoints():void{
var _local3:TweenProp;
var _local4:TweenProp;
var _local1:int = getTimer();
var _local2:Number = ((_local1 - _startTime) / _time);
for each (_local3 in _propsList) {
_target[_local3.property] = _easeFunc((_local1 - _startTime), _local3.startValue, (_local3.endValue - _local3.startValue), _time);
};
if (_onUpdate){
if (_onUpdateParams){
_onUpdate(_onUpdateParams);
} else {
_onUpdate();
};
};
if ((_local1 - _startTime) >= _time){
for each (_local4 in _propsList) {
_target[_local4.property] = _local4.endValue;
};
_stop();
};
}
private function onFrameUpdate(_arg1:Event):void{
_updatePoints();
}
public static function doTween(_arg1:Object, _arg2:Number, _arg3:Function, _arg4:Object, _arg5:Boolean=false):void{
if (!_instances){
_instances = [];
};
var _local6:PennerTween = new PennerTween(_arg1, _arg2, _arg3, _arg4, _arg5);
_instances[_instances.length] = _local6;
}
public static function removeTween(_arg1:Object):void{
var _local2:PennerTween;
for each (_local2 in _instances) {
if (((_local2) && ((_arg1 == _local2._target)))){
_local2._stop();
return;
};
};
}
private static function _removeTween(_arg1:PennerTween):void{
var _local2:int;
while (_local2 < _instances.length) {
if (((_instances[_local2]) && ((_arg1._id == _instances[_local2]._id)))){
_instances.splice(_local2, 1);
return;
};
_local2++;
};
}
public static function setDebugSprite(_arg1:Sprite):void{
_debugSprite = _arg1;
}
private static function _abortRunningTween(_arg1:PennerTween):void{
var _local2:PennerTween;
var _local3:TweenProp;
var _local4:TweenProp;
for each (_local2 in _instances) {
if (((_local2) && ((_arg1._target == _local2._target)))){
for each (_local3 in _local2._propsList) {
for each (_local4 in _arg1._propsList) {
if (_local3.property == _local4.property){
_local2._stop();
return;
};
};
};
};
};
}
}
}//package com.midasplayer.math.pennertween
Section 110
//TweenProp (com.midasplayer.math.pennertween.TweenProp)
package com.midasplayer.math.pennertween {
public class TweenProp {
public var property:String;
public var endValue:Number;
public var startValue:Number;
public function TweenProp(_arg1:String, _arg2:Number, _arg3:Number){
this.property = _arg1;
this.startValue = _arg2;
this.endValue = _arg3;
}
}
}//package com.midasplayer.math.pennertween
Section 111
//MtRandom (com.midasplayer.math.MtRandom)
package com.midasplayer.math {
import flash.utils.*;
public class MtRandom {
private var mti:uint;
private var mt:Array;
public static var MATRIX_A:uint = 2567483615;
public static var UPPER_MASK:uint = 2147483648;
public static var LOWER_MASK:uint = 2147483647;
public static var M:int = 397;
public static var N:int = 624;
private static var mag01:Array = [uint(0), uint(MATRIX_A)];
public function MtRandom(_arg1:uint=0){
mti = (N + 1);
super();
if (_arg1 == 0){
_arg1 = getTimer();
};
mt = new Array(N);
init_genrand(_arg1);
}
private function genrand_int32():uint{
var _local1:Number;
var _local2:uint;
if (mti >= N){
if (mti == (N + 1)){
init_genrand(5489);
};
_local2 = 0;
while (_local2 < (N - M)) {
_local1 = ((mt[_local2] & UPPER_MASK) | (mt[(_local2 + 1)] & LOWER_MASK));
mt[_local2] = ((mt[(_local2 + M)] ^ (_local1 >>> 1)) ^ mag01[uint((_local1 & 1))]);
_local2++;
};
while (_local2 < (N - 1)) {
_local1 = ((mt[_local2] & UPPER_MASK) | (mt[(_local2 + 1)] & LOWER_MASK));
mt[_local2] = ((mt[(_local2 + (M - N))] ^ (_local1 >>> 1)) ^ mag01[uint((_local1 & 1))]);
_local2++;
};
_local1 = ((mt[(N - 1)] & UPPER_MASK) | (mt[0] & LOWER_MASK));
mt[(N - 1)] = ((mt[(M - 1)] ^ (_local1 >>> 1)) ^ mag01[uint((_local1 & 1))]);
mti = 0;
};
_local1 = mt[mti++];
_local1 = (_local1 ^ (_local1 >>> 11));
_local1 = (_local1 ^ ((_local1 << 7) & 2636928640));
_local1 = (_local1 ^ ((_local1 << 15) & 4022730752));
_local1 = (_local1 ^ (_local1 >>> 18));
return (uint(_local1));
}
private function next(_arg1:uint):uint{
return ((genrand_int32() & ((uint(1) << _arg1) - uint(1))));
}
private function init_genrand(_arg1:uint):void{
var _local2:uint;
var _local3:uint;
mt[0] = uint(_arg1);
mti = 1;
while (mti < N) {
_local2 = (mt[(mti - 1)] ^ (mt[(mti - 1)] >>> 30));
_local3 = uint((_local2 * 1289));
_local3 = uint((_local3 * 1406077));
_local3 = uint((_local3 + mti));
mt[mti] = _local3;
mti++;
};
}
public function nextFloat():Number{
return ((next(24) / 16777216));
}
public function setSeed(_arg1:uint):void{
init_genrand(_arg1);
}
public function nextDouble():Number{
return ((next(24) / 16777216));
}
public function nextInt(_arg1:uint):uint{
return (((genrand_int32() & 2147483647) % _arg1));
}
}
}//package com.midasplayer.math
Section 112
//Vec2 (com.midasplayer.math.Vec2)
package com.midasplayer.math {
public class Vec2 {
private var _y:Number;// = 0
private var _x:Number;// = 0
public function Vec2(_arg1:Number=0, _arg2:Number=0){
_x = _arg1;
_y = _arg2;
}
public function sub(_arg1:Vec2):Vec2{
return (new Vec2((_x - _arg1._x), (_y - _arg1._y)));
}
public function mul(_arg1:Vec2):Vec2{
return (new Vec2((_x * _arg1._x), (_y * _arg1._y)));
}
public function get y():Number{
return (_y);
}
public function dot(_arg1:Vec2):Number{
return (((_x * _arg1._x) + (_y * _arg1._y)));
}
public function scale(_arg1:Number):Vec2{
return (new Vec2((_x * _arg1), (_y * _arg1)));
}
public function reflect(_arg1:Vec2):Vec2{
var _local2:Vec2;
_local2 = _arg1.normalize();
var _local3:Number = dot(_local2);
return (_local2.scale((2 * _local3)).sub(this));
}
public function addSelf(_arg1:Vec2):void{
_x = (_x + _arg1._x);
_y = (_y + _arg1._y);
}
public function get lengthSqr():Number{
return (((_x * _x) + (_y * _y)));
}
public function div(_arg1:Vec2):Vec2{
return (new Vec2((_x / _arg1._x), (_y / _arg1._y)));
}
public function normalize():Vec2{
return (scale((1 / length)));
}
public function normalLeft():Vec2{
return (new Vec2(_y, -(_x)));
}
public function rotate(_arg1:Number):Vec2{
var _local2:Number = XPMath.cos(-(_arg1));
var _local3:Number = XPMath.sin(-(_arg1));
return (new Vec2(((_local2 * _x) - (_local3 * _y)), ((_local3 * _x) + (_local2 * _y))));
}
public function clone():Vec2{
return (new Vec2(_x, _y));
}
public function add(_arg1:Vec2):Vec2{
return (new Vec2((_x + _arg1._x), (_y + _arg1._y)));
}
public function set(_arg1:Number, _arg2:Number):void{
_x = _arg1;
_y = _arg2;
}
public function get length():Number{
return (Math.sqrt(((_x * _x) + (_y * _y))));
}
public function subSelf(_arg1:Vec2):void{
_x = (_x - _arg1._x);
_y = (_y - _arg1._y);
}
public function set x(_arg1:Number):void{
_x = _arg1;
}
public function set y(_arg1:Number):void{
_y = _arg1;
}
public function copy(_arg1:Vec2):void{
_x = _arg1._x;
_y = _arg1._y;
}
public function scaleSelf(_arg1:Number):void{
_x = (_x * _arg1);
_y = (_y * _arg1);
}
public function mulSelf(_arg1:Vec2):void{
_x = (_x * _arg1._x);
_y = (_y * _arg1._y);
}
public function get x():Number{
return (_x);
}
public function normalizeSelf():void{
var _local1:Number = (1 / length);
_x = (_x * _local1);
_y = (_y * _local1);
}
public function crossDet(_arg1:Vec2):Number{
return (((_x * _arg1._y) - (_arg1._x * _y)));
}
public function toString():String{
return ((((("(" + _x) + ", ") + _y) + ")"));
}
public function normalRight():Vec2{
return (new Vec2(-(_y), _x));
}
public function divSelf(_arg1:Vec2):void{
_x = (_x / _arg1._x);
_y = (_y / _arg1._y);
}
public function lerp(_arg1:Vec2, _arg2:Number):Vec2{
return (new Vec2((_x + ((_arg1._x - _x) * _arg2)), (_y + ((_arg1._y - _y) * _arg2))));
}
public function equals(_arg1:Vec2):Boolean{
return ((((_x == _arg1._x)) && ((_y == _arg1._y))));
}
}
}//package com.midasplayer.math
Section 113
//XPMath (com.midasplayer.math.XPMath)
package com.midasplayer.math {
public class XPMath {
public static function sin(_arg1:Number):Number{
_arg1 = (_arg1 - 1.5707963267949);
var _local2:int;
var _local3:Number = ((_arg1 > 0)) ? _arg1 : -(_arg1);
if (_local3 >= (12.5663706143592 + 1.5707963267949)){
_local2 = int((_local3 * 0.636619772367581));
if ((_local2 & 1) != 0){
_local2++;
};
_local3 = (_local3 - (_local2 * 1.5707963267949));
} else {
if (_local3 < 1.5707963267949){
} else {
if (_local3 < (1.5707963267949 + 3.14159265358979)){
_local3 = (_local3 - 3.14159265358979);
_local2 = 2;
} else {
if (_local3 < (6.28318530717959 + 1.5707963267949)){
_local3 = (_local3 - 6.28318530717959);
} else {
if (_local3 < (9.42477796076938 + 1.5707963267949)){
_local3 = (_local3 - 9.42477796076938);
_local2 = 2;
} else {
_local3 = (_local3 - 12.5663706143592);
};
};
};
};
};
var _local4:Number = (_local3 * _local3);
var _local5:Number = (0.999999953027512 + (_local4 * (-0.499999047777921 + (_local4 * (0.041663573160188 + (_local4 * (-0.0013853629536173 + (_local4 * 2.31524166599385E-5))))))));
return ((((_local2 & 2))!=0) ? -(_local5) : _local5);
}
public static function atan2(_arg1:Number, _arg2:Number):Number{
var _local5:Number;
var _local3:Number = 3.14159265358979;
var _local4:Number = 1.5707963267949;
if (_arg2 == 0){
if (_arg1 > 0){
return (_local4);
};
if (_arg1 == 0){
return (0);
};
return (-(_local4));
};
var _local6:Number = (_arg1 / _arg2);
if (Math.abs(_local6) < 1){
_local5 = (_local6 / (1 + ((0.28 * _local6) * _local6)));
if (_arg2 < 0){
if (_arg1 < 0){
return ((_local5 - _local3));
};
return ((_local5 + _local3));
};
} else {
_local5 = (_local4 - (_local6 / ((_local6 * _local6) + 0.28)));
if (_arg1 < 0){
return ((_local5 - _local3));
};
};
return (_local5);
}
public static function cos(_arg1:Number):Number{
var _local2:int;
var _local3:Number = ((_arg1 > 0)) ? _arg1 : -(_arg1);
var _local4:Number = 1.5707963267949;
if (_local3 >= (12.5663706143592 + _local4)){
_local2 = int((_local3 * 0.636619772367581));
if ((_local2 & 1) != 0){
_local2++;
};
_local3 = (_local3 - (_local2 * _local4));
} else {
if (_local3 < _local4){
} else {
if (_local3 < (_local4 + 3.14159265358979)){
_local3 = (_local3 - 3.14159265358979);
_local2 = 2;
} else {
if (_local3 < (6.28318530717959 + _local4)){
_local3 = (_local3 - 6.28318530717959);
} else {
if (_local3 < (9.42477796076938 + _local4)){
_local3 = (_local3 - 9.42477796076938);
_local2 = 2;
} else {
_local3 = (_local3 - 12.5663706143592);
};
};
};
};
};
var _local5:Number = (_local3 * _local3);
var _local6:Number = (0.999999953027512 + (_local5 * (-0.499999047777921 + (_local5 * (0.041663573160188 + (_local5 * (-0.0013853629536173 + (_local5 * 2.31524166599385E-5))))))));
return ((((_local2 & 2))!=0) ? -(_local6) : _local6);
}
}
}//package com.midasplayer.math
Section 114
//ManagedSound (com.midasplayer.sound.ManagedSound)
package com.midasplayer.sound {
import flash.media.*;
public class ManagedSound {
public var activeSounds:Array;
private var manager:SoundManager;
private var ClassReference:Class;
public function ManagedSound(_arg1:SoundManager, _arg2:Class){
activeSounds = new Array();
super();
this.manager = _arg1;
this.ClassReference = _arg2;
}
public function stop():void{
var _local1:int;
while (_local1 < activeSounds.length) {
activeSounds[_local1].stop();
_local1++;
};
}
public function play(_arg1:Number=1, _arg2:Number=0):ManagedSoundChannel{
var _local3:SoundChannel = new ClassReference().play(0, 0, new SoundTransform(_arg1, _arg2));
return (new ManagedSoundChannel(manager, this, _local3));
}
public function loop(_arg1:Number=1, _arg2:Number=0, _arg3:Number=999999999):ManagedSoundChannel{
var _local4:SoundChannel = new ClassReference().play(0, _arg3, new SoundTransform(_arg1, _arg2));
return (new ManagedSoundChannel(manager, this, _local4));
}
public function fadeToAndStop(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].fadeToAndStop(_arg1, _arg2);
_local3++;
};
}
public function isPlaying():Boolean{
return ((activeSounds.length > 0));
}
public function update():void{
var _local1:int;
while (_local1 < activeSounds.length) {
activeSounds[_local1].update();
_local1++;
};
}
public function fadeTo(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].fadeTo(_arg1, _arg2);
_local3++;
};
}
public function panTo(_arg1:Number, _arg2:Number):void{
var _local3:int;
while (_local3 < activeSounds.length) {
activeSounds[_local3].panTo(_arg1, _arg2);
_local3++;
};
}
public function setPan(_arg1:Number):void{
var _local2:int;
while (_local2 < activeSounds.length) {
activeSounds[_local2].setPan(_arg1);
_local2++;
};
}
public function setVolume(_arg1:Number):void{
var _local2:int;
while (_local2 < activeSounds.length) {
activeSounds[_local2].setVolume(_arg1);
_local2++;
};
}
}
}//package com.midasplayer.sound
Section 115
//ManagedSoundChannel (com.midasplayer.sound.ManagedSoundChannel)
package com.midasplayer.sound {
import flash.events.*;
import flash.media.*;
import flash.utils.*;
public class ManagedSoundChannel {
private var fadeStartVolume:Number;// = -1
private var channel:SoundChannel;
private var fadeEndVolume:Number;// = -1
private var targetVolume:Number;
private var targetPan:Number;
private var sound:ManagedSound;
private var stopAfterFade:Boolean;// = false
private var panEndTime:Number;// = -1
private var fadeEndTime:Number;// = -1
private var manager:SoundManager;
private var playing:Boolean;// = true
private var panStartTime:Number;// = -1
private var fadeStartTime:Number;// = -1
private var panEndVolume:Number;// = -1
private var panStartVolume:Number;// = -1
public function ManagedSoundChannel(_arg1:SoundManager, _arg2:ManagedSound, _arg3:SoundChannel){
this.manager = _arg1;
this.sound = _arg2;
this.channel = _arg3;
_arg2.activeSounds.push(this);
if (_arg3 == null){
soundComplete(null);
return;
};
_arg3.addEventListener(Event.SOUND_COMPLETE, soundComplete);
targetVolume = _arg3.soundTransform.volume;
targetPan = _arg3.soundTransform.pan;
update();
}
public function stop():void{
if (!playing){
return;
};
if (channel == null){
return;
};
channel.stop();
soundComplete(null);
}
public function update():void{
var _local1:Number;
if (!playing){
return;
};
if (fadeStartTime >= 0){
_local1 = ((getTimer() - fadeStartTime) / (fadeEndTime - fadeStartTime));
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > 1){
_local1 = 1;
};
targetVolume = (fadeStartVolume + ((fadeEndVolume - fadeStartVolume) * _local1));
targetVolume = (targetVolume * targetVolume);
if (_local1 == 1){
fadeStartTime = -1;
};
if ((((_local1 == 1)) && (stopAfterFade))){
stop();
};
};
if (panStartTime >= 0){
_local1 = ((getTimer() - panStartTime) / (panEndTime - panStartTime));
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > 1){
_local1 = 1;
};
targetPan = (panStartVolume + ((panEndVolume - panStartVolume) * _local1));
if (_local1 == 1){
panStartTime = -1;
};
};
var _local2:Number = (targetVolume * manager.volume);
var _local3:Number = targetPan;
if (channel == null){
return;
};
if (((!((_local2 == channel.soundTransform.volume))) || (!((_local3 == channel.soundTransform.pan))))){
channel.soundTransform = new SoundTransform(_local2, _local3);
};
}
public function panTo(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
panStartVolume = targetPan;
panEndVolume = _arg1;
panStartTime = getTimer();
panEndTime = (getTimer() + _arg2);
}
public function fadeTo(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
fadeStartVolume = Math.sqrt(targetVolume);
fadeEndVolume = Math.sqrt(_arg1);
fadeStartTime = getTimer();
fadeEndTime = (getTimer() + _arg2);
stopAfterFade = false;
}
public function setPan(_arg1:Number):void{
if (!playing){
return;
};
if (channel == null){
return;
};
channel.soundTransform.pan = _arg1;
panStartTime = -1;
update();
}
public function fadeToAndStop(_arg1:Number, _arg2:Number):void{
if (!playing){
return;
};
fadeTo(_arg1, _arg2);
stopAfterFade = true;
}
public function setVolume(_arg1:Number):void{
if (!playing){
return;
};
stopAfterFade = false;
this.targetVolume = _arg1;
fadeStartTime = -1;
update();
}
public function soundComplete(_arg1:Event):void{
if (!playing){
return;
};
sound.activeSounds.splice(sound.activeSounds.indexOf(this), 1);
playing = false;
}
public function isPlaying():Boolean{
return (playing);
}
}
}//package com.midasplayer.sound
Section 116
//SoundManager (com.midasplayer.sound.SoundManager)
package com.midasplayer.sound {
import flash.utils.*;
public class SoundManager {
private var fadeStartVolume:Number;// = -1
private var lastTime:Number;// = -1
private var managedSounds:Array;
private var fadeEndTime:Number;// = -1
private var fadeStartTime:Number;// = -1
private var fadeEndVolume:Number;// = -1
public var volume:Number;// = 1
private var managedSoundMap:Object;
public function SoundManager(){
managedSoundMap = new Object();
managedSounds = new Array();
super();
}
public function update():void{
var _local3:Number;
var _local1:Number = getTimer();
if (lastTime < 0){
lastTime = _local1;
};
if (fadeStartTime >= 0){
_local3 = ((getTimer() - fadeStartTime) / (fadeEndTime - fadeStartTime));
if (_local3 < 0){
_local3 = 0;
};
if (_local3 > 1){
_local3 = 1;
};
volume = (fadeStartVolume + ((fadeEndVolume - fadeStartVolume) * _local3));
volume = (volume * volume);
if (_local3 == 1){
fadeStartTime = -1;
};
};
var _local2:int;
while (_local2 < managedSounds.length) {
managedSounds[_local2].update();
_local2++;
};
}
public function stopAll():void{
var _local1:int;
while (_local1 < managedSounds.length) {
managedSounds[_local1].stop();
_local1++;
};
}
public function getFromClass(_arg1:Class):ManagedSound{
var _local2:String = getQualifiedClassName(_arg1);
if (managedSoundMap[_local2] == null){
managedSoundMap[_local2] = new ManagedSound(this, _arg1);
managedSounds.push(managedSoundMap[_local2]);
};
return (managedSoundMap[_local2]);
}
public function get(_arg1:String):ManagedSound{
var _local2:Class;
if (managedSoundMap[_arg1] == null){
_local2 = (getDefinitionByName(_arg1) as Class);
if (_local2 == null){
_local2 = (getDefinitionByName(("sound." + _arg1)) as Class);
};
if (_local2 == null){
_local2 = (getDefinitionByName(("snd." + _arg1)) as Class);
};
if (_local2 == null){
throw (new Error(("Failed to find sound " + _arg1)));
};
managedSoundMap[_arg1] = new ManagedSound(this, _local2);
managedSounds.push(managedSoundMap[_arg1]);
};
return (managedSoundMap[_arg1]);
}
public function fadeTo(_arg1:Number, _arg2:Number):void{
fadeStartVolume = Math.sqrt(volume);
fadeEndVolume = Math.sqrt(_arg1);
fadeStartTime = getTimer();
fadeEndTime = (getTimer() + _arg2);
}
public function setVolume(_arg1:Number):void{
this.volume = _arg1;
fadeStartTime = -1;
}
}
}//package com.midasplayer.sound
Section 117
//Numbers (com.midasplayer.text.Numbers)
package com.midasplayer.text {
public class Numbers {
public static function dec2hex(_arg1:Number, _arg2:Boolean):String{
var _local3 = "";
while (_arg1 != 0) {
_local3 = ("0123456789abcdef".charAt((_arg1 & 15)) + _local3);
_arg1 = (_arg1 >>> 4);
};
if (_arg2){
if (_local3.length == 0){
_local3 = "00";
};
if (_local3.length < 2){
_local3 = ("0" + _local3);
};
} else {
if (_local3.length == 0){
_local3 = "0";
};
};
return (_local3);
}
public static function itoa(_arg1:Number, _arg2:Number):String{
var _local4:Number;
var _local3:String = ("" + _arg1);
if (_arg2){
_local4 = (_arg2 - 1);
while (_local4 > 0) {
if (_arg1 < Math.pow(10, _local4)){
_local3 = ("0" + _local3);
};
_local4--;
};
};
return (_local3);
}
public static function asTime(_arg1:Number, _arg2:Boolean, _arg3:Boolean):String{
if (_arg2){
_arg3 = true;
};
if (_arg1 < 0){
_arg1 = 0;
};
_arg1 = (_arg1 / 1000);
_arg1 = Math.floor(_arg1);
var _local4:Number = Math.floor((_arg1 / 3600));
var _local5:Number = (Math.floor((_arg1 / 60)) % 60);
var _local6:Number = (_arg1 % 60);
var _local7 = "";
if (((_arg2) || ((_local4 > 0)))){
_local7 = (_local7 + itoa(_local4, 2));
};
if (((_arg2) || ((_local7.length > 0)))){
_local7 = (_local7 + ":");
};
var _local8:Number = _local7.length;
if (((((_arg3) || ((_local5 > 0)))) || ((_local4 > 0)))){
_local7 = (_local7 + itoa(_local5, 2));
};
if (((_arg3) || (!((_local7.length == _local8))))){
_local7 = (_local7 + ":");
};
return ((_local7 + itoa(_local6, 2)));
}
}
}//package com.midasplayer.text
Section 118
//ITimer (com.midasplayer.time.ITimer)
package com.midasplayer.time {
public interface ITimer {
function getTime():int;
}
}//package com.midasplayer.time
Section 119
//SystemTimer (com.midasplayer.time.SystemTimer)
package com.midasplayer.time {
import flash.utils.*;
public class SystemTimer implements ITimer {
private const _startTime:int;
public function SystemTimer(){
_startTime = getTimer();
super();
}
public function getTime():int{
return ((getTimer() - _startTime));
}
}
}//package com.midasplayer.time
Section 120
//IRenderable (com.midasplayer.timing.IRenderable)
package com.midasplayer.timing {
public interface IRenderable {
function render(_arg1:int, _arg2:Number):void;
}
}//package com.midasplayer.timing
Section 121
//ITickable (com.midasplayer.timing.ITickable)
package com.midasplayer.timing {
public interface ITickable {
function tick(_arg1:int):void;
}
}//package com.midasplayer.timing
Section 122
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var top:Number;
public var left:Number;
public var bottom:Number;
public var right:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.left = _arg1;
this.top = _arg2;
this.right = _arg3;
this.bottom = _arg4;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 123
//FlexMovieClip (mx.core.FlexMovieClip)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexMovieClip extends MovieClip {
mx_internal static const VERSION:String = "3.2.0.3958";
public function FlexMovieClip(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 124
//FlexSprite (mx.core.FlexSprite)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexSprite extends Sprite {
mx_internal static const VERSION:String = "3.2.0.3958";
public function FlexSprite(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 125
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 126
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 127
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get visible():Boolean;
function get rotation():Number;
function localToGlobal(_arg1:Point):Point;
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(_arg1:String):void;
function set scaleX(_arg1:Number):void;
function set scaleY(_arg1:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(_arg1:Point):Point;
function get height():Number;
function set blendMode(_arg1:String):void;
function get parent():DisplayObjectContainer;
function getBounds(_arg1:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(_arg1:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(_arg1:Number):void;
function set accessibilityProperties(_arg1:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scaleX():Number;
function get scaleY():Number;
function get scrollRect():Rectangle;
function get mouseX():Number;
function get mouseY():Number;
function set height(_arg1:Number):void;
function set mask(_arg1:DisplayObject):void;
function getRect(_arg1:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(_arg1:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(_arg1:DisplayObject):Boolean;
function set opaqueBackground(_arg1:Object):void;
function set visible(_arg1:Boolean):void;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function get transform():Transform;
function set filters(_arg1:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(_arg1:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 128
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 129
//MovieClipAsset (mx.core.MovieClipAsset)
package mx.core {
public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
public function MovieClipAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 130
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 131
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "3.2.0.3958";
}
}//package mx.core
Section 132
//SpriteAsset (mx.core.SpriteAsset)
package mx.core {
public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
public function SpriteAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 133
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var result:String;
var o:DisplayObject;
var s:String;
var indices:Array;
var displayObject = _arg1;
try {
o = displayObject;
while (o != null) {
if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){
break;
};
s = o.name;
if ((o is IRepeaterClient)){
indices = IRepeaterClient(o).instanceIndices;
if (indices){
s = (s + (("[" + indices.join("][")) + "]"));
};
};
result = ((result == null)) ? s : ((s + ".") + result);
o = o.parent;
};
} catch(e:SecurityError) {
};
return (result);
}
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 134
//DjinnMain (DjinnMain)
package {
import com.midasplayer.djinn.*;
import flash.display.*;
public class DjinnMain extends Sprite {
public function DjinnMain(){
var _local1:Main = new Main();
stage.addChild(_local1);
}
}
}//package