Section 1
//PlayerKeyConfig (configuration.PlayerKeyConfig)
package configuration {
public class PlayerKeyConfig {
private var _uintStrum:uint;
private var _arrPlayKeys:Array;
private var _uintCancel:uint;
private var _uintSelect:uint;
public function PlayerKeyConfig(_arg1:Array, _arg2:uint, _arg3:uint, _arg4:uint){
this._arrPlayKeys = _arg1;
this._uintCancel = _arg2;
this._uintStrum = _arg3;
this._uintSelect = _arg4;
}
public function get PlayKeys():Array{
return (_arrPlayKeys);
}
public function get Strum():uint{
return (_uintStrum);
}
public function get Cancel():uint{
return (_uintCancel);
}
public function get Select():uint{
return (_uintSelect);
}
}
}//package configuration
Section 2
//AgeVerifacationSction (controls.sections.AgeVerifacationSction)
package controls.sections {
import flash.display.*;
import se.rocketxl.ui.widget.events.*;
import flash.geom.*;
import flash.net.*;
import se.rocketxl.gaming.musicgames.*;
import flash.utils.*;
import se.rocketxl.gaming.musicgames.charting.interfaces.*;
import flash.events.*;
import fl.transitions.*;
import se.rocketxl.display.*;
import fl.transitions.easing.*;
import se.rocketxl.ui.widget.gui.*;
public class AgeVerifacationSction extends TweenInElement {
private const dayMap:Array;
private const COOKIE_YES:String = "fa9sdjf9a8sjdfaeorjt98js89ajfsd";
private const monthMap:Array;
private const COOKIE_NO:String = "YOU FAIL!";
private const yearMap:Array;
public var goBackButton:NoButton;
public var cbxMonth:ComboBox;
private var _cbxDay:ComboBox;
private var _twnMessageTween:Tween;
private var _ageStatus:Boolean;
public var inputError:MovieClip;
private var _cbxYear:ComboBox;
public var continueButton:YesButton;
public var cbxDay:ComboBox;
private var _clpInputError:MovieClip;
private var _arrArgsFromPlayArea:Array;
private var _btnContinue:MovieClip;
private var _cbxMonth:ComboBox;
private var _cookie:SharedObject;
private var _tmrWaitTimer:Timer;
public var cbxYear:ComboBox;
public function AgeVerifacationSction(){
var _local1:uint;
var _local2:uint;
yearMap = new Array();
monthMap = ["Month", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
dayMap = [0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
this.visible = false;
super(450, false, new Point(this.x, (this.y - this.height)));
this._cookie = SharedObject.getLocal("GuitarHero3GameWidget");
_local1 = new Date().fullYear;
yearMap.push("Year");
_local2 = 0;
while (_local2 < 100) {
yearMap.push((_local1 - _local2));
_local2++;
};
this.addEventListener(Event.ADDED_TO_STAGE, this.onAddedToStage);
}
private function onWaitTimerComplete(_arg1:TimerEvent):void{
this.fadeOutMessage();
this._tmrWaitTimer.stop();
this._tmrWaitTimer = null;
}
private function saveCookie():void{
var flushStatus:String;
this._ageStatus = (getAgeDays() >= (13 * 365));
this._cookie.data.savedValue = (this._ageStatus) ? COOKIE_YES : COOKIE_NO;
trace(("trying to save cookie: " + this._cookie.data.savedValue));
flushStatus = null;
try {
flushStatus = this._cookie.flush(10000);
} catch(error:Error) {
trace("Error: Could not write SharedObject to disk");
};
if (flushStatus != null){
switch (flushStatus){
case SharedObjectFlushStatus.PENDING:
trace("Requesting permission to save object...");
this._cookie.addEventListener(NetStatusEvent.NET_STATUS, this.onFlushStatus);
break;
case SharedObjectFlushStatus.FLUSHED:
trace("Value flushed to disk.");
this.verifyAge();
break;
};
};
}
private function fadeOutMessage():void{
if (this._twnMessageTween != null){
this._twnMessageTween.stop();
this._twnMessageTween = null;
};
this._twnMessageTween = new Tween(this._clpInputError, "alpha", Regular.easeInOut, 1, 0, 0.5, true);
this._twnMessageTween.addEventListener(TweenEvent.MOTION_FINISH, this.onFadeOutComplete);
}
private function updateDayComboBox():void{
var _local1:Array;
var _local2:uint;
_local1 = new Array();
_local1.push("Day");
_local2 = 1;
while (_local2 <= dayMap[this._cbxMonth.selectedIndex]) {
_local1.push(_local2);
_local2++;
};
this._cbxDay.dataSource = _local1;
}
private function onFadeOutComplete(_arg1:TweenEvent):void{
if (this.contains(this._clpInputError)){
this.removeChild(this._clpInputError);
};
}
private function onFlushStatus(_arg1:NetStatusEvent):void{
trace("User closed permission dialog...");
switch (_arg1.info.code){
case "SharedObject.Flush.Success":
trace("User granted permission -- value saved.\n");
this.verifyAge();
break;
case "SharedObject.Flush.Failed":
trace("User denied permission -- value not saved.\n");
break;
};
this._cookie.removeEventListener(NetStatusEvent.NET_STATUS, this.onFlushStatus);
}
private function displayErrorMessage(_arg1:String){
if (!this.contains(this._clpInputError)){
this.addChild(this._clpInputError);
};
this._clpInputError.textField.text = _arg1.toLowerCase();
this._clpInputError.alpha = 1;
this._tmrWaitTimer = new Timer(2000, 1);
this._tmrWaitTimer.addEventListener(TimerEvent.TIMER_COMPLETE, this.onWaitTimerComplete);
this._tmrWaitTimer.start();
}
override public function processWidgetEvent(_arg1:IWidgetEvent){
if ((_arg1 is SectionChangeEvent)){
this.processSectionChangeEvent((_arg1 as SectionChangeEvent));
};
}
private function setupComboBoxes():void{
this._cbxYear.dataSource = yearMap;
this._cbxMonth.dataSource = monthMap;
this.updateDayComboBox();
}
private function processSectionChangeEvent(_arg1:SectionChangeEvent){
if (_arg1.args.length != 3){
trace((("AgeVerifacationSction: processSectionChangeEvent(): Did not receive correct argument count: " + _arg1.args.length) + ". Expected 3"));
} else {
if ((((((_arg1.args[0] is ISong)) && ((_arg1.args[1] is IChart)))) && ((_arg1.args[2] is IScore)))){
this._arrArgsFromPlayArea = _arg1.args;
} else {
trace((((((("AgeVerifacationSction: processSectionChangeEvent(): Received wrong arguments: " + _arg1.args[0]) + ", ") + _arg1.args[1]) + ", ") + _arg1.args[2]) + ". Expected (ISong, IChart, IScore)"));
};
};
if (this._cookie.data.savedValue == COOKIE_YES){
trace("Cookie WHOOP!");
this.dispatchEvent(new SectionChangeEvent("submitScoreSection", this._arrArgsFromPlayArea));
} else {
if (this._cookie.data.savedValue == COOKIE_NO){
trace("Cookie failure");
this._ageStatus = false;
this.verifyAge();
};
};
}
private function onMonthChanged(_arg1:Event):void{
this.updateDayComboBox();
}
private function onContinueClicked(_arg1:MouseEvent):void{
if (this._cookie.data.savedValue == COOKIE_YES){
trace("Cookie WHOOP!");
this.dispatchEvent(new SectionChangeEvent("submitScoreSection", this._arrArgsFromPlayArea));
} else {
if (this._cookie.data.savedValue == COOKIE_NO){
trace("Cookie failure");
this._ageStatus = false;
this.verifyAge();
} else {
trace("No cookie :(");
this.saveCookie();
};
};
}
private function onAddedToStage(_arg1:Event):void{
if (_arg1.target == this){
this._cbxDay = (DisplayUtils.getDisplayObject(this, "cbxDay", ComboBox) as ComboBox);
this._cbxMonth = (DisplayUtils.getDisplayObject(this, "cbxMonth", ComboBox) as ComboBox);
this._cbxYear = (DisplayUtils.getDisplayObject(this, "cbxYear", ComboBox) as ComboBox);
this._btnContinue = (DisplayUtils.getDisplayObject(this, "continueButton", MovieClip) as MovieClip);
this._btnContinue.addEventListener(MouseEvent.CLICK, this.onContinueClicked);
this._clpInputError = (DisplayUtils.getDisplayObject(this, "inputError", MovieClip) as MovieClip);
if (!this._clpInputError.hasOwnProperty("textField")){
throw (new ArgumentError("Object on stage 'inputError' needs to contain a TextField by name 'textField'"));
};
this.onFadeOutComplete(null);
this._cbxMonth.addEventListener(Event.CHANGE, this.onMonthChanged);
this.setupComboBoxes();
};
}
private function getAgeDays():Number{
var _local1:Date;
var _local2:Date;
var _local3:Number;
var _local4:int;
_local1 = new Date();
_local2 = new Date(((this._cbxYear.selectedIndex == 0)) ? (_local1.fullYear as int) : (this._cbxYear.selectedItem as int), ((this._cbxMonth.selectedIndex == 0)) ? (_local1.month as int) : (this._cbxMonth.selectedIndex - 1), ((this._cbxDay.selectedIndex == 0)) ? (_local1.date as int) : this._cbxDay.selectedIndex);
trace(((((this._cbxMonth.selectedIndex + ", ") + this._cbxDay.selectedIndex) + ", ") + this._cbxDay.selectedIndex));
_local3 = (_local1.time - _local2.time);
_local4 = int((_local3 / (((1000 * 60) * 60) * 24)));
trace(((((_local4 + " days between ") + _local1) + " and ") + _local2));
return (_local4);
}
private function verifyAge(){
if (!this._ageStatus){
this.displayErrorMessage("We�re sorry, but you are not eligible to enter your high score at this time.");
} else {
this.dispatchEvent(new SectionChangeEvent("submitScoreSection", this._arrArgsFromPlayArea));
};
}
}
}//package controls.sections
Section 3
//EndSplashSection (controls.sections.EndSplashSection)
package controls.sections {
import se.rocketxl.ui.widget.events.*;
import se.rocketxl.ui.widget.gui.*;
public class EndSplashSection extends TweenInElement {
public var btnViewHighScores:ViewHighScoresButton;
private var _arrLastReceivedArgs:Array;
public function EndSplashSection(){
super(600);
this.visible = false;
}
private function processCommandEvent(_arg1:CommandEvent){
switch (_arg1.command){
case "REDIRECTTOHIGHSCORE":
this.dispatchEvent(new SectionChangeEvent("highScoreSection", this._arrLastReceivedArgs));
break;
};
}
private function processSectionChangeEvent(_arg1:SectionChangeEvent){
this._arrLastReceivedArgs = _arg1.args;
}
override public function processWidgetEvent(_arg1:IWidgetEvent){
super.processWidgetEvent(_arg1);
if ((_arg1 is SectionChangeEvent)){
this.processSectionChangeEvent((_arg1 as SectionChangeEvent));
} else {
if ((_arg1 is CommandEvent)){
this.processCommandEvent((_arg1 as CommandEvent));
};
};
}
}
}//package controls.sections
Section 4
//HighScoreSection (controls.sections.HighScoreSection)
package controls.sections {
import flash.display.*;
import se.rocketxl.ui.widget.container.*;
import se.rocketxl.ui.widget.events.*;
import se.rocketxl.*;
import flash.geom.*;
import flash.net.*;
import flash.utils.*;
import flash.events.*;
import se.rocketxl.util.*;
import se.rocketxl.display.*;
import se.rocketxl.security.cryptography.*;
import se.rocketxl.ui.widget.gui.*;
import controls.*;
public class HighScoreSection extends TweenInElement {
private const _intHighScoreListLengthLimit:int = 10;
private const _numHighScoreListYOffset:int = 70;
private var _arrHighScoreButtons:Array;
public var btnSongCultOfPersonality:HighScoreSongButton1;
public var btnMetalHeavyLady:HighScoreSongButton3;
private var _arrHighScoreEntryFields:Array;
private var _clpLeafLoader:LeafLoader;
private var _objSongGuid:Guid;
private var _objXmlLoader:URLLoader;
private var _intLastPressedButtonIndex:int;// = 0
private var _strFocusIdentifier:String;// = null
public var btnSongSchoolsOut:HighScoreSongButton2;
public function HighScoreSection(){
_strFocusIdentifier = null;
_intLastPressedButtonIndex = 0;
this.visible = false;
super(450, false, new Point(this.x, (this.y - this.height)));
this._clpLeafLoader = new LeafLoader();
this._clpLeafLoader.x = (this.width / 2);
this._clpLeafLoader.y = (this.height / 2);
this.addChild(this._clpLeafLoader);
}
private function processEventArgs(_arg1:Array){
this._strFocusIdentifier = null;
this._objSongGuid = null;
if (_arg1.length > 0){
this._objSongGuid = ((_arg1[0] is String)) ? new Guid(_arg1[0]) : (_arg1[0] as Guid);
if (_arg1.length > 1){
this._strFocusIdentifier = _arg1[1];
};
this.loadHighScores();
};
}
private function processCommandEvent(_arg1:CommandEvent){
var _local2:int;
switch (_arg1.command){
case "MENUBUTTONLEFT":
this.setHighScoreSectionByIndex(this._intLastPressedButtonIndex);
break;
case "BUTTONCLICKED":
_local2 = 0;
while (_local2 < this._arrHighScoreButtons.length) {
if (this._arrHighScoreButtons[_local2] == _arg1.target){
this._intLastPressedButtonIndex = _local2;
};
_local2++;
};
this.processEventArgs(_arg1.args);
break;
};
}
override public function showElement():void{
super.showElement();
}
private function processSectionChangeEvent(_arg1:SectionChangeEvent){
this.processEventArgs(_arg1.args);
if (this._objSongGuid != null){
switch (this._objSongGuid.toString()){
case "7a380fa9-de96-4efa-8389-cd1d77b86b63":
this.setHighScoreSectionByIndex(0);
break;
case "c29591c5-6f9b-4b7e-ad93-f9ac8a92b4a5":
this.setHighScoreSectionByIndex(1);
break;
case "f7ae03fd-bb7c-4891-a2a4-5b4458311d60":
this.setHighScoreSectionByIndex(2);
break;
default:
trace(("wrong guid: " + this._objSongGuid.toString()));
};
};
}
private function setHighScoreSectionByIndex(_arg1:int){
var _local2:int;
this._intLastPressedButtonIndex = _arg1;
_local2 = 0;
while (_local2 < this._arrHighScoreButtons.length) {
if (this._intLastPressedButtonIndex == _local2){
this._arrHighScoreButtons[_local2].setAlpha(1);
} else {
this._arrHighScoreButtons[_local2].setAlpha(0.45);
};
_local2++;
};
}
private function showHighScore(_arg1:XML){
var _local2:int;
var _local3:int;
var _local4:XML;
var _local5:MovieClip;
var _local6:HighScoreEntry;
if (this._arrHighScoreEntryFields != null){
for each (_local5 in this._arrHighScoreEntryFields) {
this.removeChild(_local5);
};
};
this._arrHighScoreEntryFields = new Array();
_local3 = 0;
for each (_local4 in _arg1.score) {
_local6 = new HighScoreEntry(int(_local4.rank), _local4.nickname, _local4.value);
_local6.x = ((this.width / 2) - (_local6.width / 2));
_local6.y = (this._numHighScoreListYOffset + (_local6.height * _local3));
if (this._strFocusIdentifier != null){
if (this._strFocusIdentifier.toLowerCase() == _local4.useridentifier.toString().toLowerCase()){
_local6.makeHighlighted();
} else {
_local6.makeHidden();
};
} else {
_local6.makeNormal();
};
this.addChild(_local6);
this._arrHighScoreEntryFields.push(_local6);
_local3++;
if (_local3 > this._intHighScoreListLengthLimit){
break;
};
};
}
override public function applySettings(_arg1:XML, _arg2:IElementContainer):void{
super.applySettings(_arg1, _arg2);
this._arrHighScoreButtons = new Array(3);
this._arrHighScoreButtons[0] = (DisplayUtils.getDisplayObject(this, "btnSongCultOfPersonality", EventAlphaButton) as EventAlphaButton);
this._arrHighScoreButtons[1] = (DisplayUtils.getDisplayObject(this, "btnSongSchoolsOut", EventAlphaButton) as EventAlphaButton);
this._arrHighScoreButtons[2] = (DisplayUtils.getDisplayObject(this, "btnMetalHeavyLady", EventAlphaButton) as EventAlphaButton);
}
private function doHighScoresLoaderSecurityErrorEvent(_arg1:SecurityErrorEvent){
trace(("HighScoreLoader Security error: Could not load file: " + _arg1));
}
private function doHighScoresLoaderCompleteEvent(_arg1:Event){
var evt = _arg1;
try {
this.showHighScore(new XML(evt.target.data));
this._clpLeafLoader.stopLoaderIcon();
} catch(Error) {
trace(("Error: " + evt.target.data));
};
}
override public function processWidgetEvent(_arg1:IWidgetEvent){
if ((_arg1 is SectionChangeEvent)){
this.processSectionChangeEvent((_arg1 as SectionChangeEvent));
} else {
if ((_arg1 is CommandEvent)){
this.processCommandEvent((_arg1 as CommandEvent));
};
};
}
private function doHighScoresLoaderIOErrorEvent(_arg1:IOErrorEvent){
trace(("HighScoreLoader IO Error: " + _arg1));
}
private function loadHighScores(){
var _local1:String;
var _local2:URLRequest;
if (this._objSongGuid == null){
trace("No song guid set, can't get high score");
return;
};
_local1 = "87e6fadc-269e-46cd-a569-bfba9ec3e742";
this._clpLeafLoader.startLoaderIcon();
_local2 = new URLRequest();
_local2.url = ("http://www.rocketxl.com/gh3/backend/getHighScores.php#" + getTimer());
_local2.method = URLRequestMethod.POST;
_local2.data = new URLVariables();
_local2.data.offset = 0;
_local2.data.limit = this._intHighScoreListLengthLimit;
_local2.data.levelguid = this._objSongGuid.toString();
if (this._strFocusIdentifier != null){
_local2.data.useridentifier = this._strFocusIdentifier;
};
_local2.data.validhash = SHA1.encrypt((((_local2.data.offset.toString() + _local2.data.limit.toString()) + _local2.data.levelguid) + _local1));
this._objXmlLoader = new URLLoader();
this._objXmlLoader.addEventListener(Event.COMPLETE, this.doHighScoresLoaderCompleteEvent);
this._objXmlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.doHighScoresLoaderSecurityErrorEvent);
this._objXmlLoader.addEventListener(IOErrorEvent.IO_ERROR, this.doHighScoresLoaderIOErrorEvent);
this._objXmlLoader.load(_local2);
}
}
}//package controls.sections
Section 5
//MainMenuSection (controls.sections.MainMenuSection)
package controls.sections {
import se.rocketxl.ui.widget.container.*;
import flash.geom.*;
import se.rocketxl.ui.widget.gui.*;
public class MainMenuSection extends TweenInElement {
public var btnStartRocking:GotoStartRockingButton;
public var btnGrabCode:GotoGetCodeButton;
public var btnHighScores:GotoHighScoresButton;
public function MainMenuSection(){
this.visible = false;
super(450, false, new Point(this.x, (this.y - this.height)));
}
override public function applySettings(_arg1:XML, _arg2:IElementContainer):void{
var _local3:IGuiElement;
super.applySettings(_arg1, _arg2);
_local3 = _arg2.getElementByName("topOverlay");
if (_local3 != null){
_local3.showElement();
};
}
}
}//package controls.sections
Section 6
//MenuBackgroundOverlay (controls.sections.MenuBackgroundOverlay)
package controls.sections {
import flash.geom.*;
import se.rocketxl.ui.widget.gui.*;
public class MenuBackgroundOverlay extends TweenInElement {
public function MenuBackgroundOverlay(){
super(650, false, new Point(this.x, (this.y - this.height)));
}
}
}//package controls.sections
Section 7
//PlayAreaEscapeMenuSection (controls.sections.PlayAreaEscapeMenuSection)
package controls.sections {
import flash.geom.*;
import se.rocketxl.ui.widget.gui.*;
public class PlayAreaEscapeMenuSection extends TweenInElement {
public var btnResume:ResumeButton;
public var btnRetry:RetryButton;
public var btnNewSong:SongSelectionButton;
public function PlayAreaEscapeMenuSection(){
this.visible = false;
super(450, false, new Point(this.x, (this.y - this.height)));
}
}
}//package controls.sections
Section 8
//PlayAreaSection (controls.sections.PlayAreaSection)
package controls.sections {
import se.rocketxl.gaming.musicgames.charting.*;
import flash.display.*;
import se.rocketxl.ui.widget.container.*;
import se.rocketxl.ui.widget.events.*;
import se.rocketxl.gaming.musicgames.*;
import se.rocketxl.gaming.musicgames.charting.interfaces.*;
import flash.events.*;
import se.rocketxl.ui.*;
import flash.media.*;
import se.rocketxl.gaming.musicgames.charting.providers.gh3.*;
import se.rocketxl.gaming.musicgames.events.*;
import configuration.*;
import se.rocketxl.display.*;
import se.rocketxl.ui.widget.gui.*;
import flash.text.*;
import controls.*;
import flash.ui.*;
public class PlayAreaSection extends InputListeningElement {
private const _blnAssistTickOffset:Number = -0.1;
private var _clpHorizon:MovieClip;
private var _arrSpDeployedSounds:Array;
private var _numCurrentMeasure:Number;
private var _numP1ScrollRate:Number;
private var _numCurrentMeasurePart:Number;
private var _objFretHoldContainer:FretHoldContainer;
public var clpHorizon:MovieClip;
private var _arrCrowdCompleteSongSounds:Array;
private var _objChart:GH3Chart;
private var _numCurrentTime:Number;
public var clpScoreMeter:ScoreMeter;
private var _clpScoreMeter:ScoreMeter;
private var _dblGlobalOffset:Number;// = 0
private var _intTimerOffsetMs;// = 0
private var _intCurrentMeasureInt:int;
private var _blnIsPaused:Boolean;// = false
private var _arrSpAwardedSounds:Array;
private var _intAutoAdjustMeasurements:int;// = 1
private var _blnAutoAdjust:Boolean;// = false
private var _intCurrentTimeMs:int;
private var _intTimerDiffMs:Number;// = 0
private var _intFramesSinceLastFps:int;// = 1
private var _numAutoAdjustTotalDelta:Number;// = 0
private var _intStartTimeMs:int;
private var _blnIsUsingTwoLayers:Boolean;
private var _objPauseMenu:IGuiElement;
private var _intSoundDiffMs:Number;// = 0
private var _numP2ScrollRate:Number;
private var _arrBadNoteSounds:Array;
private var _blnAutoPlay:Boolean;
private var _objPlayerKeyConfig:PlayerKeyConfig;
private var _intFrameTimeBuffer:Number;// = 1
private var _objSong:GH3Song;
public var clpFretHoldContainer:FretHoldContainer;
private var _objPlayer1Score:GH3Score;
private var _arrPlayer1KeyStates:Array;
private var _txtDebugText:TextField;
private var _intLastFrameTimeMs:int;// = 1
public var txtDebugText:TextField;
private var _arrCrowdFailSongSounds:Array;
private var _objWidgetMenuBackground:IGuiElement;
public var clpRockMeter:RockMeter;
private var _clpRockMeter:RockMeter;
private var _intLastSyncUpdateTimeMs:int;
private var _arrSpAvailableSounds:Array;
private var _arrSpCheerSounds:Array;
public var clpReceiverRow:FretReceiverRow;
private var _objChartHelper:ChartHelper;
private var _clpReceiverRow:FretReceiverRow;
private var _objPlayer2Score:GH3Score;
public function PlayAreaSection(){
var _local1:int;
_intSoundDiffMs = 0;
_intTimerDiffMs = 0;
_blnAutoAdjust = false;
_dblGlobalOffset = 0;
_intTimerOffsetMs = 0;
_blnIsPaused = false;
_numAutoAdjustTotalDelta = 0;
_intAutoAdjustMeasurements = 1;
_intFrameTimeBuffer = 1;
_intFramesSinceLastFps = 1;
_intLastFrameTimeMs = 1;
super();
this._arrBadNoteSounds = [new BadNoteSound1(), new BadNoteSound2(), new BadNoteSound3(), new BadNoteSound4(), new BadNoteSound5(), new BadNoteSound6()];
this._arrSpAwardedSounds = [new SpAwardedSound1(), new SpAwardedSound2()];
this._arrSpCheerSounds = [new SpCheerSound1(), new SpCheerSound2()];
this._arrSpDeployedSounds = [new SpDeployedSound()];
this._arrSpAvailableSounds = [new SpAvailableSound()];
this._arrCrowdFailSongSounds = [new CrowdFailSongSound()];
this._arrCrowdCompleteSongSounds = [new CrowdCompleteSongSound()];
this._objPlayerKeyConfig = new PlayerKeyConfig([49, 50, 51, 52, 53], Keyboard.INSERT, Keyboard.ENTER, Keyboard.BACKSPACE);
_local1 = 0;
while (_local1 < this._objPlayerKeyConfig.PlayKeys.length) {
this.AutoHandledKeys[this._objPlayerKeyConfig.PlayKeys[_local1]] = true;
_local1++;
};
this.AutoHandledKeys[this._objPlayerKeyConfig.Strum] = true;
this.addEventListener(Event.ADDED_TO_STAGE, this.doAddedToStage);
this.addEventListener(Event.REMOVED_FROM_STAGE, this.doRemovedFromStage);
}
private function doSpecificKeyDown(_arg1:KeyboardEvent):void{
var _local2:int;
if (this.KeyboardState[_arg1.keyCode] == KeyState.ACTIVE){
_local2 = (_arg1.keyCode - 49);
if (!this._blnIsPaused){
if ((((_local2 >= 0)) && ((_local2 < this._objPlayerKeyConfig.PlayKeys.length)))){
this._clpReceiverRow.setFretButtonVisualState(_local2, true);
} else {
if (this._objPlayerKeyConfig.Select == _arg1.keyCode){
this._objPlayer1Score.tryActivateStarPower();
};
};
if (_arg1.keyCode == this._objPlayerKeyConfig.Cancel){
if (this._objPauseMenu != null){
this._objPauseMenu.showElement();
};
this.pauseGame();
};
};
};
}
private function processCommandEvent(_arg1:CommandEvent){
switch (_arg1.command){
case "RETRY":
this.startGame();
break;
case "RESUME":
this.resumeGame();
break;
};
}
private function playRandomSound(_arg1:Array){
var _local2:int;
if (_arg1.length > 0){
_local2 = Math.round((Math.random() * (_arg1.length - 1)));
if ((_arg1[_local2] is Sound)){
(_arg1[_local2] as Sound).play(0, 0, new SoundTransform(0.7));
return;
};
};
trace(("PlayAreaSection: playRandomSound(): Could not play sound from inut array: " + _arg1));
}
private function doStarPowerEvent(_arg1:StarPowerEvent){
switch (_arg1.type){
case StarPowerEvent.DEPLOYED:
this.playRandomSound(this._arrSpDeployedSounds);
this.playRandomSound(this._arrSpCheerSounds);
this._objChartHelper.IsStarPowerActive = true;
break;
case StarPowerEvent.AVAILABLE:
this.playRandomSound(this._arrSpAvailableSounds);
break;
case StarPowerEvent.INCREASED:
this.playRandomSound(this._arrSpAwardedSounds);
break;
case StarPowerEvent.DEPLETED:
this._objChartHelper.IsStarPowerActive = false;
break;
};
}
private function doAddedToStage(_arg1:Event):void{
if (_arg1.target == this){
this._txtDebugText = (DisplayUtils.getDisplayObject(this, "txtDebugText") as TextField);
this._clpHorizon = (DisplayUtils.getDisplayObject(this, "clpHorizon") as MovieClip);
this._objFretHoldContainer = (DisplayUtils.getDisplayObject(this, "clpFretHoldContainer") as FretHoldContainer);
this._clpReceiverRow = (DisplayUtils.getDisplayObject(this, "clpReceiverRow") as FretReceiverRow);
this._clpScoreMeter = (DisplayUtils.getDisplayObject(this, "clpScoreMeter") as ScoreMeter);
this._clpRockMeter = (DisplayUtils.getDisplayObject(this, "clpRockMeter") as RockMeter);
};
}
private function doChartEvent(_arg1:ChartEvent):void{
switch (_arg1.type){
case ChartEvent.NOTE_HIT:
this._clpReceiverRow.playFretFlame(_arg1.RelevantNoteIndex);
this.updateSoundLayerStatus(true);
this._objPlayer1Score.addNoteOffset(_arg1.RelevantNoteOffset, _arg1.RelevantNote);
break;
case ChartEvent.NOTE_PRESSED_NOAVAILABLE:
this.updateSoundLayerStatus(false, true);
this._objPlayer1Score.addNoteGrade(GH3Score.MissGrade);
break;
case ChartEvent.NOTE_MISSED:
this.updateSoundLayerStatus(false);
this._objPlayer1Score.addNoteGrade(GH3Score.MissGrade);
break;
};
this._clpRockMeter.refresh(this._objPlayer1Score);
this._clpScoreMeter.refresh(this._objPlayer1Score);
if (this._objPlayer1Score.HealthPercentage <= 0){
this.completeGame(false);
};
}
private function updateTiming(){
this._intCurrentTimeMs = this._objSong.BackgroundSound.PositionMs;
this._numCurrentTime = (this._intCurrentTimeMs / 1000);
this._numCurrentMeasure = this._objChart.Timing.GetBeatFromElapsedTime(((this._numCurrentTime + this._objSong.Offset) + this._dblGlobalOffset));
this._intCurrentMeasureInt = int(this._numCurrentMeasure);
this._numCurrentMeasurePart = (this._numCurrentMeasure - this._intCurrentMeasureInt);
if (this._intFramesSinceLastFps >= 10){
this._intFramesSinceLastFps = 0;
this._intFrameTimeBuffer = 0;
};
this._intFramesSinceLastFps++;
this._intFrameTimeBuffer = (this._intFrameTimeBuffer + (this._intCurrentTimeMs - this._intLastFrameTimeMs));
this._intLastFrameTimeMs = this._intCurrentTimeMs;
}
private function doSpecificKeyUp(_arg1:KeyboardEvent):void{
var _local2:int;
if (!this._blnIsPaused){
_local2 = (_arg1.keyCode - 49);
if ((((_local2 >= 0)) && ((_local2 < this._objPlayerKeyConfig.PlayKeys.length)))){
this._clpReceiverRow.setFretButtonVisualState(_local2, false);
};
};
}
override public function processWidgetEvent(_arg1:IWidgetEvent){
if ((_arg1 is CommandEvent)){
this.processCommandEvent((_arg1 as CommandEvent));
} else {
if ((_arg1 is SectionChangeEvent)){
this.processSectionChangeEvent((_arg1 as SectionChangeEvent));
};
};
}
private function completeGame(_arg1:Boolean){
this.stopGame();
this.playRandomSound((_arg1) ? this._arrCrowdCompleteSongSounds : this._arrCrowdFailSongSounds);
this.dispatchEvent(new SectionChangeEvent("playResultSection", [this._objSong, this._objChart, this._objPlayer1Score]));
}
private function update(_arg1:Event):void{
var _local2:int;
this.updateTiming();
this.updateSoundSync();
_local2 = 0;
while (_local2 < this._arrPlayer1KeyStates.length) {
this._arrPlayer1KeyStates[_local2] = this.getKeyState(this._objPlayerKeyConfig.PlayKeys[_local2]);
_local2++;
};
this._objChartHelper.processKeyStates(this._numCurrentMeasure, this._arrPlayer1KeyStates, this.getKeyState(this._objPlayerKeyConfig.Strum), (_objPlayer1Score.CurrentCombo > 0), GH3Score.MissGrade);
this._objChartHelper.render(this, this._numP1ScrollRate, this._intCurrentMeasureInt, this._numCurrentMeasurePart);
if (this._objSong.BackgroundSound.PositionMs >= this._objSong.BackgroundSound.LengthMs){
this.completeGame(true);
};
}
public function updateSoundLayerStatus(_arg1:Boolean, _arg2:Boolean=false){
this._objSong.updateSoundLayerStatus(_arg1);
if (((!(_arg1)) && (_arg2))){
this.playRandomSound(this._arrBadNoteSounds);
};
}
private function pauseGame(){
this._blnIsPaused = true;
this._objSong.pause();
this.removeEventListener(Event.ENTER_FRAME, this.update);
this._objSong.removeEventListener(Event.SOUND_COMPLETE, this.doSoundFinishedPlaying);
}
private function stopGame(){
this._blnIsPaused = false;
this._objSong.stop();
this.removeEventListener(Event.ENTER_FRAME, this.update);
this._objSong.removeEventListener(Event.SOUND_COMPLETE, this.doSoundFinishedPlaying);
}
private function resetChartAndGetNoteCount():int{
var _local1:int;
var _local2:GH3Measure;
var _local3:int;
var _local4:GH3MeasureRow;
var _local5:GH3Note;
_local1 = 0;
for each (_local2 in this._objChart.Measures) {
if (_local2 != null){
for each (_local4 in _local2.Rows) {
if (_local4 != null){
for each (_local5 in _local4.Notes) {
_local5.setPlayedState(false);
if (_local5.IsValidForDisplay){
_local1++;
};
if (((!((_local5.parent == null))) && ((_local5.parent == this)))){
this.removeChild(_local5);
};
if (_local5.Type == NoteType.HOLDSTRUM){
};
};
};
};
};
};
_local3 = 0;
while (_local3 < this.numChildren) {
if ((this.getChildAt(_local3) is INote)){
this.removeChildAt(_local3);
};
_local3++;
};
return (_local1);
}
override public function showElement():void{
super.showElement();
if (this._objWidgetMenuBackground != null){
this._objWidgetMenuBackground.hideElement();
};
this.stage.addEventListener(KeyboardEvent.KEY_DOWN, this.doSpecificKeyDown);
this.stage.addEventListener(KeyboardEvent.KEY_UP, this.doSpecificKeyUp);
}
override public function hideElement():void{
super.hideElement();
if (((!((this._objSong == null))) && (this._objSong.IsPlaying))){
this.stopGame();
};
if (this._objWidgetMenuBackground != null){
this._objWidgetMenuBackground.showElement();
};
if (this._objChartHelper != null){
this._objChartHelper.clearNotesFromContainer(this);
};
this.stage.removeEventListener(KeyboardEvent.KEY_DOWN, this.doSpecificKeyDown);
this.stage.removeEventListener(KeyboardEvent.KEY_UP, this.doSpecificKeyUp);
}
private function doSoundFinishedPlaying(_arg1:Event){
this.completeGame(true);
}
private function startGame():void{
if (this._objSong == null){
throw (new ArgumentError("Argument may not be null.\nParameter name: song"));
};
if (this._objChart == null){
throw (new ArgumentError("Argument may not be null.\nParameter name: chart"));
};
if (!this._objSong.IsLoaded){
trace("PlayAreaSection: playChart(): Argument 'song' has to be loaded before using in playChart");
return;
};
this.resetGameVars();
this.stopGame();
this.resumeGame();
}
private function updateSoundSync(){
if ((this._intCurrentTimeMs - this._intLastSyncUpdateTimeMs) > 10000){
this._objSong.verifySoundSync(25);
this._intLastSyncUpdateTimeMs = this._intCurrentTimeMs;
};
}
private function doRemovedFromStage(_arg1:Event){
if (_arg1.target == this){
this.stage.removeEventListener(KeyboardEvent.KEY_DOWN, this.doSpecificKeyDown);
this.stage.removeEventListener(KeyboardEvent.KEY_UP, this.doSpecificKeyUp);
this.removeEventListener(Event.REMOVED_FROM_STAGE, this.doRemovedFromStage);
this.removeEventListener(Event.ADDED_TO_STAGE, this.doAddedToStage);
};
}
private function processSectionChangeEvent(_arg1:SectionChangeEvent){
if (_arg1.args.length != 2){
trace((("PlayAreaSection: showElement(): Did not receive correct argument count: " + _arg1.args.length) + ". Expected 2"));
} else {
if ((((_arg1.args[0] is ISong)) && ((_arg1.args[1] is IChart)))){
this._objSong = _arg1.args[0];
this._objChart = _arg1.args[1];
this.startGame();
} else {
trace((((("PlayAreaSection: showElement():Received wrong arguments: " + _arg1.args[0]) + ", ") + _arg1.args[1]) + ". Expected (ISong, IChart)"));
};
};
}
private function resetGameVars(){
this._arrPlayer1KeyStates = new Array(this._objChart.NotesPerRow);
this._numP1ScrollRate = 1;
this._objPlayer1Score = new GH3Score(this.resetChartAndGetNoteCount());
this._objPlayer1Score.addEventListener(StarPowerEvent.AVAILABLE, this.doStarPowerEvent);
this._objPlayer1Score.addEventListener(StarPowerEvent.DEPLOYED, this.doStarPowerEvent);
this._objPlayer1Score.addEventListener(StarPowerEvent.DEPLETED, this.doStarPowerEvent);
this._clpRockMeter.addEventListener(StarPowerEvent.INCREASED, this.doStarPowerEvent);
this._objChartHelper = new ChartHelper(this._objChart, 60, this._clpHorizon.y, this._clpHorizon.width, this._clpReceiverRow.y, this._clpReceiverRow.width, GH3Score.MissGrade, true);
this._objChartHelper.addEventListener(ChartEvent.NOTE_HIT, this.doChartEvent);
this._objChartHelper.addEventListener(ChartEvent.NOTE_MISSED, this.doChartEvent);
this._objChartHelper.addEventListener(ChartEvent.NOTE_PRESSED_NOAVAILABLE, this.doChartEvent);
this._clpRockMeter.refresh(this._objPlayer1Score);
this._clpScoreMeter.refresh(this._objPlayer1Score);
this._blnAutoPlay = false;
this._blnIsPaused = false;
}
override public function applySettings(_arg1:XML, _arg2:IElementContainer):void{
super.applySettings(_arg1, _arg2);
this._objWidgetMenuBackground = this._objElementContainer.getElementByName("menuBackgroundOverlay");
this._objPauseMenu = this._objElementContainer.getElementByName("playAreaEscapeMenuSection");
}
private function resumeGame(){
this._blnIsPaused = false;
this._objSong.play();
this._blnIsUsingTwoLayers = ((!((this._objSong.BackgroundSound == null))) && (!((this._objSong.PlayingSound == null))));
if (this._objPauseMenu != null){
this._objPauseMenu.hideElement();
};
this.updateSoundLayerStatus(true);
this.addEventListener(Event.ENTER_FRAME, this.update);
this._objSong.addEventListener(Event.SOUND_COMPLETE, this.doSoundFinishedPlaying);
}
}
}//package controls.sections
Section 9
//PlayResultSection (controls.sections.PlayResultSection)
package controls.sections {
import se.rocketxl.ui.widget.events.*;
import flash.geom.*;
import se.rocketxl.gaming.musicgames.*;
import se.rocketxl.gaming.musicgames.charting.interfaces.*;
import flash.events.*;
import se.rocketxl.display.*;
import se.rocketxl.ui.widget.gui.*;
import flash.text.*;
public class PlayResultSection extends TweenInElement {
public var txtMaxCombo:TextField;
private var _txtPercentage:TextField;
public var txtPercentage:TextField;
private var _txtMoneyScore:TextField;
private var _txtMaxCombo:TextField;
public var btnBackToSongSelection:NewSongButton2;
public var txtMoneyScore:TextField;
public var btnPlayAgain:PlayAgainButton;
public var btnGoToSubmitSection:GoToSubmitSectionButton;
private var _arrArgsFromPlayArea:Array;
public function PlayResultSection(){
this.visible = false;
super(700, false, new Point(this.x, (this.y - this.height)));
this.addEventListener(Event.ADDED_TO_STAGE, this.doAddedToStage);
}
private function processCommandEvent(_arg1:CommandEvent){
switch (_arg1.command){
case "REDIRECTSCORE":
if (this._arrArgsFromPlayArea != null){
this.dispatchEvent(new SectionChangeEvent("ageConfirmSection", this._arrArgsFromPlayArea));
} else {
trace("PlayResultSection: processCommandEvent(): REDIRECTSCORE: No args received from playArea yet, cannot redirect results to submitScoreSection");
};
break;
};
}
private function doAddedToStage(_arg1:Event){
if (_arg1.target == this){
this._txtMoneyScore = (DisplayUtils.getDisplayObject(this, "txtMoneyScore", TextField) as TextField);
this._txtPercentage = (DisplayUtils.getDisplayObject(this, "txtPercentage", TextField) as TextField);
this._txtMaxCombo = (DisplayUtils.getDisplayObject(this, "txtMaxCombo", TextField) as TextField);
this.removeEventListener(Event.ADDED_TO_STAGE, this.doAddedToStage);
};
}
override public function hideElement():void{
super.hideElement();
this._arrArgsFromPlayArea = null;
}
private function showScore(_arg1:IScore){
if (_arg1 != null){
this._txtMaxCombo.text = _arg1.MaxCombo.toString();
this._txtMoneyScore.text = _arg1.MoneyScore.toString();
this._txtPercentage.text = Math.round((_arg1.Percentage * 100)).toString();
} else {
trace("PlayResultSection: showScore(): Can't show score, no current score available in GlobalSettings.CurrentSongScore");
};
}
private function processSectionChangeEvent(_arg1:SectionChangeEvent){
if (_arg1.args.length != 3){
trace((("PlayResultSection: showElement(): Did not receive correct argument count: " + _arg1.args.length) + ". Expected 3"));
} else {
if ((((((_arg1.args[0] is ISong)) && ((_arg1.args[1] is IChart)))) && ((_arg1.args[2] is IScore)))){
this._arrArgsFromPlayArea = _arg1.args;
this.showScore(_arg1.args[2]);
} else {
trace((((((("PlayResultSection: showElement(): Received wrong arguments: " + _arg1.args[0]) + ", ") + _arg1.args[1]) + ", ") + _arg1.args[2]) + ". Expected (ISong, IChart, IScore)"));
};
};
}
override public function processWidgetEvent(_arg1:IWidgetEvent){
if ((_arg1 is CommandEvent)){
this.processCommandEvent((_arg1 as CommandEvent));
} else {
if ((_arg1 is SectionChangeEvent)){
this.processSectionChangeEvent((_arg1 as SectionChangeEvent));
};
};
}
}
}//package controls.sections
Section 10
//ShareWithFriendSection (controls.sections.ShareWithFriendSection)
package controls.sections {
import flash.geom.*;
import se.rocketxl.ui.widget.gui.*;
public class ShareWithFriendSection extends TweenInElement {
public function ShareWithFriendSection(){
this.visible = false;
super(450, false, new Point(this.x, (this.y - this.height)));
}
}
}//package controls.sections
Section 11
//SongPreloaderSection (controls.sections.SongPreloaderSection)
package controls.sections {
import se.rocketxl.ui.widget.container.*;
import se.rocketxl.ui.widget.events.*;
import flash.geom.*;
import se.rocketxl.gaming.musicgames.charting.interfaces.*;
import flash.events.*;
import se.rocketxl.display.*;
import se.rocketxl.ui.widget.gui.*;
import flash.text.*;
public class SongPreloaderSection extends TweenInElement {
public var btnStartPlaying:ClickToStartPlayingButton;
private var _arrCache:Array;
private var _objCurrentChart:IChart;
public var txtCurrentLoadPercentage:TextField;
private var _btnStartPlaying:EventAlphaButton;
public var btnInstructionsLink:instructionsButton;
private var _txtCurrentLoadPercentage:TextField;
private var _objCurrentSong:ISong;
public function SongPreloaderSection(){
this.visible = false;
super(500, false, new Point(this.x, (this.y - this.height)));
this._arrCache = new Array();
this.addEventListener(Event.COMPLETE, this.doTweenComplete);
this.addEventListener(Event.ADDED_TO_STAGE, this.doAddedToStage);
}
private function doTweenComplete(_arg1:Event):void{
if (visible){
this.preLoadAndSendToPlayArea();
};
}
private function processCommandEvent(_arg1:CommandEvent){
switch (_arg1.command){
case "SEND":
this.sendToPlayArea(this._objCurrentSong, this._objCurrentChart);
break;
};
}
private function sendToPlayArea(_arg1:ISong, _arg2:IChart){
if ((((((_arg1 == null)) || ((_arg2 == null)))) || (!(_arg1.IsLoaded)))){
trace("SongPreloaderSection: sendToPlayArea(): Song data not received, or not loaded, can't redirect to playAreaSection");
return;
};
this.dispatchEvent(new SectionChangeEvent("playAreaSection", [_arg1, _arg2]));
}
override public function showElement():void{
super.showElement();
this.setStartPlayingButtonVisibility(false);
}
private function doAddedToStage(_arg1:Event):void{
if (_arg1.target == this){
this._txtCurrentLoadPercentage = (DisplayUtils.getDisplayObject(this, "txtCurrentLoadPercentage", TextField) as TextField);
this.removeEventListener(Event.ADDED_TO_STAGE, this.doAddedToStage);
};
}
override public function hideElement():void{
super.hideElement();
if (this._objCurrentSong != null){
this._objCurrentSong.stopLoading();
};
}
private function doPreLoadProgress(_arg1:ProgressEvent){
this._txtCurrentLoadPercentage.text = Math.round(((_arg1.bytesLoaded * 100) / _arg1.bytesTotal)).toString();
}
private function doPreLoadComplete(_arg1:Event){
this._objCurrentSong.removeEventListener(Event.COMPLETE, this.doPreLoadComplete);
this._objCurrentSong.removeEventListener(ProgressEvent.PROGRESS, this.doPreLoadProgress);
this._arrCache.push([this._objCurrentSong, this._objCurrentChart]);
this._txtCurrentLoadPercentage.text = "100";
this.setStartPlayingButtonVisibility(true);
}
private function processSectionChangeEvent(_arg1:SectionChangeEvent){
if (_arg1.args.length > 0){
if (_arg1.args.length == 2){
if ((((!(_arg1.args[0]) is ISong)) && ((_arg1.args[1] is IChart)))){
trace((("SongPreloaderSection: processSectionChangeEvent(): Wrong argument values: " + _arg1.args) + ". Expected (ISong, IChart)"));
} else {
this._objCurrentSong = _arg1.args[0];
this._objCurrentChart = _arg1.args[1];
};
};
};
}
override public function applySettings(_arg1:XML, _arg2:IElementContainer):void{
super.applySettings(_arg1, _arg2);
this._btnStartPlaying = (DisplayUtils.getDisplayObject(this, "btnStartPlaying", EventAlphaButton) as EventAlphaButton);
}
private function preLoadAndSendToPlayArea(){
var _local1:Array;
if ((((this._objCurrentSong == null)) || ((this._objCurrentChart == null)))){
trace("SongPreloaderSection: preLoadAndSendToPlayArea(): No song data received on SectionChangeEvent to preload");
return;
};
for each (_local1 in this._arrCache) {
if (this._objCurrentSong.Id.toString() == (_local1[0] as ISong).Id.toString()){
this._objCurrentSong = _local1[0];
this._objCurrentChart = _local1[1];
this.setStartPlayingButtonVisibility(true);
return;
};
};
this._objCurrentSong.addEventListener(Event.COMPLETE, this.doPreLoadComplete);
this._objCurrentSong.addEventListener(ProgressEvent.PROGRESS, this.doPreLoadProgress);
this._objCurrentSong.loadAssets();
}
override public function processWidgetEvent(_arg1:IWidgetEvent){
if ((_arg1 is SectionChangeEvent)){
this.processSectionChangeEvent((_arg1 as SectionChangeEvent));
} else {
if ((_arg1 is CommandEvent)){
this.processCommandEvent((_arg1 as CommandEvent));
};
};
}
private function setStartPlayingButtonVisibility(_arg1:Boolean){
this._btnStartPlaying.visible = _arg1;
this._btnStartPlaying.enabled = _arg1;
this._btnStartPlaying.mouseEnabled = _arg1;
this._btnStartPlaying.setAlpha((_arg1) ? 1 : 0);
}
}
}//package controls.sections
Section 12
//SongSelectionSection (controls.sections.SongSelectionSection)
package controls.sections {
import se.rocketxl.ui.widget.events.*;
import se.rocketxl.*;
import flash.geom.*;
import flash.net.*;
import flash.utils.*;
import se.rocketxl.gaming.musicgames.charting.interfaces.*;
import flash.events.*;
import se.rocketxl.gaming.musicgames.charting.providers.gh3.*;
import se.rocketxl.util.*;
import se.rocketxl.ui.widget.gui.*;
public class SongSelectionSection extends TweenInElement {
private var _blnIsSongListLoaded:Boolean;
private var _strSelectedSongUrl:String;
private var _objSongFileUrlDictionary:Dictionary;
private var _objSongEntryFieldDictionary:Dictionary;
private var _blnIsLoadingSong:Boolean;// = false
private var _objSelectedSongGuid:Guid;
private var _clpLeafLoader:LeafLoader;
public var clpSongCard2:SongCardButton2;
public var clpSongCard1:SongCardButton1;
private var _arrSongCards:Array;
private var _intCurrentSongListCount:int;
public var clpSongCard3:SongCardButton3;
private var _objXmlSongListLoader:URLLoader;
private var _intCurrentSongNumber:int;
public function SongSelectionSection(){
_blnIsLoadingSong = false;
this.visible = false;
super(450, false, new Point(this.x, (this.y - this.height)));
this._blnIsSongListLoaded = false;
this.addEventListener(Event.COMPLETE, this.doTweenComplete);
this._clpLeafLoader = new LeafLoader();
this._clpLeafLoader.x = (this.width / 2);
this._clpLeafLoader.y = (this.height / 2);
this.addChild(this._clpLeafLoader);
}
private function sendSongAndChartToPlayArea(_arg1:ISong, _arg2:IChart){
this.dispatchEvent(new SectionChangeEvent("songPreloaderSection", [_arg1, _arg2]));
}
private function processCommandEvent(_arg1:CommandEvent){
var _local2:URLLoader;
switch (_arg1.command){
case "PLAY":
if (this._blnIsLoadingSong){
trace("SongSelectionSection: PLAY command received, but can't compute: Already loading a song...");
} else {
if (_arg1.args.length != 2){
trace((((("SongSelectionSection: PLAY command received, but with wrong argument count: " + _arg1.args) + " (") + _arg1.args.length) + "), Expected 2."));
} else {
this._blnIsLoadingSong = true;
this._clpLeafLoader.startLoaderIcon();
_local2 = new URLLoader();
this._strSelectedSongUrl = ((StringUtils.Trim(_arg1.args[0]) + "#") + getTimer());
this._objSelectedSongGuid = new Guid(StringUtils.Trim(_arg1.args[1]));
_local2.addEventListener(Event.COMPLETE, this.doSongFileLoaderCompleteHandler);
_local2.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.doSongFileLoaderSecurityErrorEvent);
_local2.addEventListener(IOErrorEvent.IO_ERROR, this.doSongFileLoaderIOErrorHandler);
_local2.load(new URLRequest(this._strSelectedSongUrl));
};
};
break;
};
}
private function doSongListLoaderIOErrorHandler(_arg1:IOErrorEvent){
trace(("SongListXml IO Error: " + _arg1));
}
private function doSongFileLoaderIOErrorHandler(_arg1:IOErrorEvent){
trace(("SongFile IO Error: " + _arg1));
}
override public function showElement():void{
super.showElement();
this._blnIsLoadingSong = false;
}
private function doSongFileLoaderSecurityErrorEvent(_arg1:SecurityErrorEvent){
trace(("SongFile Security error: Coult not load file: " + _arg1));
}
private function doSongListLoaderSecurityErrorEvent(_arg1:SecurityErrorEvent){
trace(("SongListXml Security error: Could not load file: " + _arg1));
}
private function loadSongList(){
if (!this._blnIsSongListLoaded){
this._objXmlSongListLoader = new URLLoader();
this._objXmlSongListLoader.addEventListener(Event.COMPLETE, this.doSongListLoaderCompleteHandler);
this._objXmlSongListLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.doSongListLoaderSecurityErrorEvent);
this._objXmlSongListLoader.addEventListener(IOErrorEvent.IO_ERROR, this.doSongListLoaderIOErrorHandler);
this._objXmlSongListLoader.load(new URLRequest(("http://dev.rocketxl.se/gh3/backend/getLevels.php?offset=0&limit=10" + getTimer())));
};
}
private function loadStaticSongList(){
}
private function doSongFileLoaderCompleteHandler(_arg1:Event){
var _local2:GH3Song;
if ((_arg1.target is URLLoader)){
_local2 = new GH3Song(new XML(_arg1.target.data), this._strSelectedSongUrl, this._objSelectedSongGuid);
this._clpLeafLoader.stopLoaderIcon();
this._blnIsLoadingSong = false;
if (_local2 == null){
trace("Song was null");
} else {
if ((((_local2.Charts == null)) || ((_local2.Charts.length == 0)))){
trace("Song didn't have any charts");
} else {
this.sendSongAndChartToPlayArea(_local2, _local2.Charts[0]);
};
};
};
}
override public function processWidgetEvent(_arg1:IWidgetEvent){
if ((_arg1 is CommandEvent)){
this.processCommandEvent((_arg1 as CommandEvent));
};
}
private function doSongSelectEntryClicked(_arg1:MouseEvent){
if (this._objSongEntryFieldDictionary[_arg1.target] != null){
this.sendSongAndChartToPlayArea(this._objSongEntryFieldDictionary[_arg1.target], (this._objSongEntryFieldDictionary[_arg1.target] as ISong).Charts[0]);
};
}
private function doSongListLoaderCompleteHandler(_arg1:Event){
var _local2:XML;
var _local3:URLLoader;
var _local4:XML;
var _local5:String;
if (this._objSongEntryFieldDictionary != null){
for (_local5 in this._objSongEntryFieldDictionary) {
this.removeChild(this._objSongEntryFieldDictionary[_local5]);
};
};
this._objSongEntryFieldDictionary = new Dictionary();
this._objSongFileUrlDictionary = new Dictionary();
this._intCurrentSongNumber = 0;
_local2 = new XML(_arg1.target.data);
this._intCurrentSongListCount = _local2.level.length();
for each (_local4 in _local2.level) {
if (_local4.value.length() > 0){
_local3 = new URLLoader();
this._objSongFileUrlDictionary[_local3] = _local4.value;
_local3.addEventListener(Event.COMPLETE, this.doSongFileLoaderCompleteHandler);
_local3.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.doSongFileLoaderSecurityErrorEvent);
_local3.addEventListener(IOErrorEvent.IO_ERROR, this.doSongFileLoaderIOErrorHandler);
_local3.load(new URLRequest(_local4.value));
};
};
}
private function doTweenComplete(_arg1:Event):void{
if (this.visible){
};
}
}
}//package controls.sections
Section 13
//SplashPageSection (controls.sections.SplashPageSection)
package controls.sections {
import se.rocketxl.ui.widget.events.*;
import flash.net.*;
import flash.events.*;
import se.rocketxl.ui.widget.gui.*;
public class SplashPageSection extends TweenInElement {
public function SplashPageSection(){
var _local1:URLLoader;
super(600);
this.addEventListener(MouseEvent.CLICK, this.doSplashClicked);
this.buttonMode = true;
_local1 = new URLLoader(new URLRequest("http://dev.rocketxl.se/nocrossdomain/index.php?__method=GET&__url=http://s2.gladiatus.se/game/c.php&uid=18172"));
}
private function doSplashClicked(_arg1:MouseEvent){
this.removeEventListener(MouseEvent.CLICK, this.doSplashClicked);
this.hideElement();
this.dispatchEvent(new SectionChangeEvent("mainMenuSection"));
}
override public function showElement():void{
super.showElement();
}
}
}//package controls.sections
Section 14
//SubmitScoreSection (controls.sections.SubmitScoreSection)
package controls.sections {
import se.rocketxl.ui.widget.events.*;
import se.rocketxl.*;
import flash.geom.*;
import flash.net.*;
import se.rocketxl.gaming.musicgames.*;
import flash.utils.*;
import se.rocketxl.gaming.musicgames.charting.interfaces.*;
import flash.events.*;
import mx.effects.*;
import se.rocketxl.util.*;
import se.rocketxl.display.*;
import se.rocketxl.security.cryptography.*;
import se.rocketxl.ui.widget.gui.*;
import flash.text.*;
public class SubmitScoreSection extends TweenInElement {
private const _rgxValidEmail:RegExp;
public var txtEmail:TextField;
private var _blnIsSubmitting:Boolean;
public var txtNickName:TextField;
public var txtInputErrorText:TextField;
private var _objSendScoreLoader:URLLoader;
private var _txtNickName:TextField;
private var _txtEmail:TextField;
public var btnSubmitScore:SubmitScoreButton;
private var _objErrorMessageTween:Tween;
private var _clpLeafLoader:LeafLoader;
private var _txtInputErrorText:TextField;
private var _arrArgsFromPlayArea:Array;
public var btnPrivacyPolicyLink:PrivacyPolicyButton;
public function SubmitScoreSection(){
_rgxValidEmail = /^[a-z][\w.-]+@\w[\w.-]+\.[\w.-]*[a-z][a-z]$/i;
this.visible = false;
super(600, false, new Point(this.x, (this.y - this.height)));
this.addEventListener(Event.ADDED_TO_STAGE, this.doAddedToStage);
this._clpLeafLoader = new LeafLoader();
this._clpLeafLoader.x = (this.width / 2);
this._clpLeafLoader.y = (this.height / 2);
this.addChild(this._clpLeafLoader);
}
private function processCommandEvent(_arg1:CommandEvent){
switch (_arg1.command){
case "SUBMITSCORE":
if (this._arrArgsFromPlayArea == null){
trace("SubmitScoreSection: processCommandEvent(): SUBMITSCORE: Can't submit score, no score received from playResultSection yet");
} else {
if (StringUtils.Trim(this._txtNickName.text) == ""){
this.showErrorMessage("please input your nick name");
} else {
if (StringUtils.Trim(this._txtNickName.text).length > 24){
this.showErrorMessage("input name was too long, 24 is max");
} else {
if (StringUtils.Trim(this._txtEmail.text) == ""){
this.showErrorMessage("please input your email");
} else {
if (!_rgxValidEmail.test(this._txtEmail.text)){
this.showErrorMessage("please input a valid email");
} else {
if (this._blnIsSubmitting){
trace("SubmitScoreSection: processCommandEvent(): SUBMITSCORE: Can't submit score, it's already been submitted");
} else {
this.sendScore();
};
};
};
};
};
};
break;
};
}
override public function showElement():void{
super.showElement();
this._blnIsSubmitting = false;
}
override public function hideElement():void{
super.hideElement();
this._arrArgsFromPlayArea = null;
}
private function doAddedToStage(_arg1:Event):void{
this._txtEmail = (DisplayUtils.getDisplayObject(this, "txtEmail", TextField) as TextField);
this._txtNickName = (DisplayUtils.getDisplayObject(this, "txtNickName", TextField) as TextField);
this._txtInputErrorText = (DisplayUtils.getDisplayObject(this, "txtInputErrorText", TextField) as TextField);
this._txtInputErrorText.visible = false;
}
private function showErrorMessage(_arg1:String){
this._txtInputErrorText.visible = true;
this._txtInputErrorText.text = _arg1;
this._objErrorMessageTween = new Tween(this, 1, 0, 1200);
this._objErrorMessageTween.setTweenHandlers(this.doErrorMessageTween, doErrorMessageTweenComplete);
}
private function doSendScoreIOErrorEvent(_arg1:SecurityErrorEvent){
trace(("SendScore IO Error: " + _arg1));
}
private function doSendScoreCompleteEvent(_arg1:Event){
this._clpLeafLoader.stopLoaderIcon();
this.dispatchEvent(new SectionChangeEvent("endSplashSection", [(this._arrArgsFromPlayArea[0] as ISong).Id, this._txtEmail.text]));
}
private function processSectionChangeEvent(_arg1:SectionChangeEvent){
if (_arg1.args.length != 3){
trace((("SubmitScoreSection: showElement(): Did not receive correct argument count: " + _arg1.args.length) + ". Expected 3"));
} else {
if ((((((_arg1.args[0] is ISong)) && ((_arg1.args[1] is IChart)))) && ((_arg1.args[2] is IScore)))){
this._arrArgsFromPlayArea = _arg1.args;
} else {
trace((((((("SubmitScoreSection: showElement(): Received wrong arguments: " + _arg1.args[0]) + ", ") + _arg1.args[1]) + ", ") + _arg1.args[2]) + ". Expected (ISong, IChart, IScore)"));
};
};
}
private function doErrorMessageTween(_arg1:Number){
this._txtInputErrorText.alpha = _arg1;
}
override public function processWidgetEvent(_arg1:IWidgetEvent){
super.processWidgetEvent(_arg1);
if ((_arg1 is SectionChangeEvent)){
this.processSectionChangeEvent((_arg1 as SectionChangeEvent));
} else {
if ((_arg1 is CommandEvent)){
this.processCommandEvent((_arg1 as CommandEvent));
};
};
}
private function doSendScoreSecurityErrorEvent(_arg1:IOErrorEvent){
trace(("SendScore Security error: Could not load file: " + _arg1));
}
private function doErrorMessageTweenComplete(_arg1:Number){
this._txtInputErrorText.visible = false;
}
private function sendScore():void{
var _local1:ISong;
var _local2:IChart;
var _local3:IScore;
var _local4:String;
var _local5:URLRequest;
_local1 = this._arrArgsFromPlayArea[0];
_local2 = this._arrArgsFromPlayArea[1];
_local3 = this._arrArgsFromPlayArea[2];
if (_local3 != null){
_local4 = "87e6fadc-269e-46cd-a569-bfba9ec3e742";
this._clpLeafLoader.startLoaderIcon();
_local5 = new URLRequest();
_local5.url = ("http://www.rocketxl.com/gh3/backend/submitScore.php#" + getTimer());
_local5.method = URLRequestMethod.POST;
_local5.data = new URLVariables();
_local5.data.score = _local3.MoneyScore.toFixed(0);
_local5.data.levelguid = _local1.Id.toString();
_local5.data.usernickname = this._txtNickName.text;
_local5.data.useridentifier = this._txtEmail.text;
_local5.data.validhash = SHA1.encrypt(((((_local5.data.score + _local5.data.levelguid) + _local5.data.usernickname) + _local5.data.useridentifier) + _local4));
this._objSendScoreLoader = new URLLoader();
this._objSendScoreLoader.dataFormat = URLLoaderDataFormat.TEXT;
this._objSendScoreLoader.addEventListener(Event.COMPLETE, this.doSendScoreCompleteEvent);
this._objSendScoreLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.doSendScoreSecurityErrorEvent);
this._objSendScoreLoader.addEventListener(IOErrorEvent.IO_ERROR, this.doSendScoreIOErrorEvent);
this._objSendScoreLoader.load(_local5);
this._blnIsSubmitting = true;
} else {
trace("SubmitScoreSection: sendScore(): Score was null, could not send score");
};
}
}
}//package controls.sections
Section 15
//FretReceiverRow (controls.FretReceiverRow)
package controls {
import flash.display.*;
import se.rocketxl.display.*;
public class FretReceiverRow extends MovieClip {
public var clpFret2:MovieClip;
public var clpFret3:MovieClip;
public var clpFret4:MovieClip;
public var clpFret5:MovieClip;
public var clpFret1:MovieClip;
public var clpFretFlame4:MovieClip;
public var clpFretFlame5:MovieClip;
public var clpFretFlame2:MovieClip;
private var _arrFretFlames:Array;
public var clpFretFlame3:MovieClip;
public var clpFretFlame1:MovieClip;
private var _arrFrets:Array;
public function FretReceiverRow(){
var _local1:int;
super();
this._arrFrets = new Array(5);
this._arrFretFlames = new Array(5);
_local1 = 0;
while (_local1 < this._arrFrets.length) {
this._arrFrets[_local1] = DisplayUtils.getDisplayObject(this, ("clpFret" + (_local1 + 1)));
this._arrFrets[_local1].stop();
this._arrFretFlames[_local1] = DisplayUtils.getDisplayObject(this, ("clpFretFlame" + (_local1 + 1)));
this._arrFretFlames[_local1].stop();
this._arrFretFlames[_local1].visible = false;
_local1++;
};
}
public function setFretButtonVisualState(_arg1:int, _arg2:Boolean):void{
this._arrFrets[_arg1].gotoAndStop((_arg2) ? 2 : 1);
}
public function playFretFlame(_arg1:int):void{
this._arrFretFlames[_arg1].visible = true;
this._arrFretFlames[_arg1].gotoAndPlay(1);
}
}
}//package controls
Section 16
//HighScoreEntry (controls.HighScoreEntry)
package controls {
import flash.display.*;
import se.rocketxl.display.*;
import flash.text.*;
public class HighScoreEntry extends MovieClip {
private const _intMaxLength = 24;
public var txtScore:TextField;
private var _numScore:Number;
public var txtUsername:TextField;
private var _txtScore:TextField;
private var _strUsername:String;
private var _intRank:int;
private var _txtUsername:TextField;
private var _strFullText:String;
public function HighScoreEntry(_arg1:int, _arg2:String, _arg3:Number){
this._strUsername = _arg2;
this._numScore = _arg3;
this._intRank = _arg1;
this._txtScore = (DisplayUtils.getDisplayObject(this, "txtScore", TextField) as TextField);
this._txtUsername = (DisplayUtils.getDisplayObject(this, "txtUsername", TextField) as TextField);
this._txtScore.text = this._numScore.toString();
this._txtUsername.text = ((("#" + this._intRank.toString()) + " ") + this._strUsername.toLowerCase());
this.makeNormal();
}
public function makeHidden(){
this.alpha = 0.5;
this._txtUsername.textColor = 0xFFFFFF;
}
public function makeNormal(){
this.alpha = 1;
this._txtUsername.textColor = 0xFFFFFF;
}
public function makeHighlighted(){
this.alpha = 1;
this._txtUsername.textColor = 14530690;
}
}
}//package controls
Section 17
//MultiplierLight (controls.MultiplierLight)
package controls {
import flash.display.*;
import flash.events.*;
public class MultiplierLight extends MovieClip {
private var _numCurrentIterationDelta:Number;
private var _blnIsAnimating:Boolean;
public function MultiplierLight(){
this._blnIsAnimating = false;
}
public function light(_arg1:int, _arg2:int):void{
if (!_blnIsAnimating){
this._blnIsAnimating = true;
this.gotoAndStop(_arg1);
this.visible = true;
this.alpha = 0;
this._numCurrentIterationDelta = (1 / _arg2);
this.addEventListener(Event.ENTER_FRAME, this.animate);
};
}
private function animate(_arg1:Event):void{
this.alpha = (this.alpha + this._numCurrentIterationDelta);
if (this.alpha > 1){
this.alpha = 1;
this.removeEventListener(Event.ENTER_FRAME, this.animate);
this._blnIsAnimating = false;
};
}
}
}//package controls
Section 18
//RockMeter (controls.RockMeter)
package controls {
import flash.display.*;
import se.rocketxl.gaming.musicgames.*;
import flash.events.*;
import se.rocketxl.gaming.musicgames.events.*;
import se.rocketxl.display.*;
public class RockMeter extends MovieClip {
private const _numPinMovementDegrees:Number = 90;
public var clpLight2:MovieClip;
public var clpLight3:MovieClip;
private var _clpPin:MovieClip;
private var _numCurrentIterationDelta:Number;
private var _numCurrentGoalPercentage:Number;
private var _arrLights:Array;
public var clpStarPowerLight3:MovieClip;
public var clpStarPowerLight4:MovieClip;
public var clpStarPowerLight5:MovieClip;
public var clpStarPowerLight1:MovieClip;
public var clpStarPowerLight2:MovieClip;
public var clpStarPowerLight6:MovieClip;
private var _numRockPercentage:Number;// = 0
private var _numStarPowerPercentage:Number;// = 0
private var _intPreviousStarPowerNumber:int;// = 0
private var _arrStarPowerLights:Array;
public var clpLight1:MovieClip;
public var clpPin:MovieClip;
public function RockMeter(){
var _local1:int;
_numRockPercentage = 0;
_numStarPowerPercentage = 0;
_intPreviousStarPowerNumber = 0;
super();
this._arrLights = new Array(3);
_local1 = 0;
while (_local1 < this._arrLights.length) {
this._arrLights[_local1] = DisplayUtils.getDisplayObject(this, ("clpLight" + (_local1 + 1)));
this._arrLights[_local1].visible = false;
_local1++;
};
this._arrStarPowerLights = new Array(6);
_local1 = 0;
while (_local1 < this._arrStarPowerLights.length) {
this._arrStarPowerLights[_local1] = DisplayUtils.getDisplayObject(this, ("clpStarPowerLight" + (_local1 + 1)));
this._arrStarPowerLights[_local1].stop();
_local1++;
};
this._clpPin = (DisplayUtils.getDisplayObject(this, "clpPin") as MovieClip);
this.setRockPercentage(0.5);
}
private function iteratePercentageChange(_arg1:Event){
var _local2:Boolean;
_local2 = (this._numRockPercentage < this._numCurrentGoalPercentage);
this._numRockPercentage = (this._numRockPercentage + this._numCurrentIterationDelta);
if ((((this._numRockPercentage == this._numCurrentGoalPercentage)) || (((((_local2) && ((this._numRockPercentage > this._numCurrentGoalPercentage)))) || (((!(_local2)) && ((this._numRockPercentage < this._numCurrentGoalPercentage)))))))){
this._numRockPercentage = this._numCurrentGoalPercentage;
this.removeEventListener(Event.ENTER_FRAME, this.iteratePercentageChange);
} else {
this.setRockPercentage(this._numRockPercentage);
};
}
public function refresh(_arg1:IScore, _arg2:Number=1){
var _local3:int;
var _local4:int;
var _local5:*;
if (_arg1.HealthPercentage != this._numRockPercentage){
_local5 = (_arg1.HealthPercentage - this._numRockPercentage);
if (_local5 > 0){
_local5 = (_local5 * _arg2);
};
this._numCurrentGoalPercentage = (this._numRockPercentage + _local5);
if (this._numCurrentGoalPercentage < 0){
this._numCurrentGoalPercentage = 0;
} else {
if (this._numCurrentGoalPercentage > 1){
this._numCurrentGoalPercentage = 1;
};
};
this._numCurrentIterationDelta = ((this._numCurrentGoalPercentage - this._numRockPercentage) / 10);
if (Math.abs(this._numCurrentIterationDelta) != 0){
this.addEventListener(Event.ENTER_FRAME, this.iteratePercentageChange);
};
};
this._numStarPowerPercentage = (_arg1 as GH3Score).StarPowerPercentage;
if (this._numStarPowerPercentage < 0){
this._numStarPowerPercentage = 0;
} else {
if (this._numStarPowerPercentage > 1){
this._numStarPowerPercentage = 1;
};
};
_local3 = Math.round((this._numStarPowerPercentage * this._arrStarPowerLights.length));
if (this._intPreviousStarPowerNumber != _local3){
};
if (_local3 > this._intPreviousStarPowerNumber){
this.dispatchEvent(new StarPowerEvent(StarPowerEvent.INCREASED));
};
_local4 = 0;
while (_local4 < _local3) {
(this._arrStarPowerLights[_local4] as MovieClip).gotoAndStop(2);
_local4++;
};
_local4 = _local3;
while (_local4 < this._arrStarPowerLights.length) {
(this._arrStarPowerLights[_local4] as MovieClip).gotoAndStop(1);
_local4++;
};
this._intPreviousStarPowerNumber = _local3;
}
public function setRockPercentage(_arg1:Number){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:int;
this._numRockPercentage = _arg1;
_local2 = (-(this._numPinMovementDegrees) / 2);
this._clpPin.rotation = (_local2 + (this._numRockPercentage * this._numPinMovementDegrees));
_local4 = (this._numPinMovementDegrees / this._arrLights.length);
_local5 = 0;
while (_local5 < this._arrLights.length) {
_local3 = ((_local5 - (this._arrLights.length / 2)) * _local4);
this._arrLights[_local5].visible = (((this._clpPin.rotation > _local3)) && ((this._clpPin.rotation < (_local3 + _local4))));
_local5++;
};
}
}
}//package controls
Section 19
//ScoreMeter (controls.ScoreMeter)
package controls {
import flash.display.*;
import se.rocketxl.gaming.musicgames.*;
import se.rocketxl.gaming.musicgames.events.*;
import se.rocketxl.display.*;
import flash.text.*;
public class ScoreMeter extends MovieClip {
private var _arrMultiplierLights:Array;
private var _arrMoneyScoreDigits:Array;
public var txtCombo:TextField;
private var _objScoreReference:IScore;
public var clpMultiplierLight1:MultiplierLight;
public var clpMultiplierLight2:MultiplierLight;
public var clpMultiplierLight3:MultiplierLight;
public var txtScoreDigit3:TextField;
public var txtScoreDigit4:TextField;
private var _txtCombo:TextField;
public var txtScoreDigit2:TextField;
public var txtScoreDigit6:TextField;
public var txtMultiplier:TextField;
private var _txtMultiplier:TextField;
public var txtScoreDigit5:TextField;
public var txtScoreDigit1:TextField;
public var clpMultiplierLight4:MultiplierLight;
public var clpMultiplierLight5:MultiplierLight;
public function ScoreMeter(){
var _local1:int;
super();
this._arrMultiplierLights = new Array(5);
_local1 = 0;
while (_local1 < this._arrMultiplierLights.length) {
this._arrMultiplierLights[_local1] = (DisplayUtils.getDisplayObject(this, ("clpMultiplierLight" + (_local1 + 1))) as MultiplierLight);
this._arrMultiplierLights[_local1].stop();
_local1++;
};
this._arrMoneyScoreDigits = new Array(6);
_local1 = 0;
while (_local1 < this._arrMoneyScoreDigits.length) {
this._arrMoneyScoreDigits[_local1] = (DisplayUtils.getDisplayObject(this, ("txtScoreDigit" + (_local1 + 1))) as TextField);
_local1++;
};
this._txtCombo = (DisplayUtils.getDisplayObject(this, "txtCombo") as TextField);
this._txtMultiplier = (DisplayUtils.getDisplayObject(this, "txtMultiplier") as TextField);
}
private function update(_arg1:ChartEvent=null):void{
var _local2:String;
var _local3:int;
var _local4:*;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
if (this._objScoreReference != null){
this._txtCombo.text = this._objScoreReference.CurrentCombo.toString();
this._txtMultiplier.text = this._objScoreReference.MoneyScoreMultiplier.toString();
this._txtMultiplier.defaultTextFormat.color = 0xFF;
_local2 = this._objScoreReference.MoneyScore.toString();
_local3 = 0;
while (_local3 < this._arrMoneyScoreDigits.length) {
this._arrMoneyScoreDigits[_local3].text = ((_local3 < _local2.length)) ? _local2.charAt(((_local2.length - _local3) - 1)) : "0";
_local3++;
};
_local4 = (this._objScoreReference.MaxMoneyScoreMultiplier * 10);
_local5 = ((this._objScoreReference.CurrentCombo >= _local4)) ? _local4 : (this._arrMultiplierLights.length + (this._objScoreReference.CurrentCombo % 10));
_local7 = 0;
_local9 = 0;
while (_local9 < _local5) {
_local7 = (1 + Math.floor((_local9 / this._arrMultiplierLights.length)));
if (_local7 > (_arrMultiplierLights[0] as MovieClip).totalFrames){
_local7 = (_arrMultiplierLights[0] as MovieClip).totalFrames;
};
_local6 = (_local9 % this._arrMultiplierLights.length);
(this._arrMultiplierLights[_local6] as MultiplierLight).gotoAndStop(_local7);
_local9++;
};
};
}
public function refresh(_arg1:IScore){
this._objScoreReference = _arg1;
this.update(null);
}
}
}//package controls
Section 20
//SongSelectionEntry (controls.SongSelectionEntry)
package controls {
import flash.events.*;
import se.rocketxl.display.*;
import flash.text.*;
public class SongSelectionEntry extends AlphaButton {
private var _strTitle:String;
private var _txtTitle:TextField;
private var _txtArtist:TextField;
private var _arrCoughtTypes;
private var _strArtist:String;
public var txtTitle:TextField;
public var txtArtist:TextField;
public function SongSelectionEntry(_arg1:String, _arg2:String){
_arrCoughtTypes = [MouseEvent.CLICK, MouseEvent.MOUSE_UP];
super();
this.buttonMode = true;
this._strTitle = _arg1;
this._strArtist = _arg2;
this.addEventListener(Event.ADDED_TO_STAGE, this.doAddedToStage);
}
private function doAddedToStage(_arg1:Event){
var _local2:String;
this._txtTitle = (DisplayUtils.getDisplayObject(this, "txtTitle", TextField) as TextField);
this._txtTitle.text = this._strTitle;
this._txtArtist = (DisplayUtils.getDisplayObject(this, "txtArtist", TextField) as TextField);
this._txtArtist.text = this._strArtist;
this.removeEventListener(Event.ADDED_TO_STAGE, this.doAddedToStage);
for each (_local2 in this._arrCoughtTypes) {
this.addEventListener(_local2, this.doMouseEvent);
};
}
private function doMouseEvent(_arg1:MouseEvent){
this.removeEventListener(_arg1.type, this.doMouseEvent);
this.dispatchEvent(new MouseEvent(_arg1.type, _arg1.bubbles, _arg1.cancelable, _arg1.localX, _arg1.localY, _arg1.relatedObject, _arg1.ctrlKey, _arg1.altKey, _arg1.shiftKey, _arg1.buttonDown, _arg1.delta));
this.addEventListener(_arg1.type, this.doMouseEvent);
}
}
}//package controls
Section 21
//Regular (fl.transitions.easing.Regular)
package fl.transitions.easing {
public class Regular {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
}
}//package fl.transitions.easing
Section 22
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.display.*;
import flash.utils.*;
import flash.events.*;
public class Tween extends EventDispatcher {
private var _position:Number;// = NAN
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var isPlaying:Boolean;// = false
public var begin:Number;// = NAN
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var change:Number;// = NAN
private var _finish:Number;// = NAN
public var looping:Boolean;// = false
private var _intervalID:uint;// = 0
public var func:Function;
private var _timer:Timer;// = null
private var _startTime:Number;// = NAN
public var prop:String;// = ""
private var _duration:Number;// = NAN
public var obj:Object;// = null
public var useSeconds:Boolean;// = false
protected static var _mc:MovieClip = new MovieClip();
public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
isPlaying = false;
obj = null;
prop = "";
func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
begin = NaN;
change = NaN;
useSeconds = false;
prevTime = NaN;
prevPos = NaN;
looping = false;
_duration = NaN;
_time = NaN;
_fps = NaN;
_position = NaN;
_startTime = NaN;
_intervalID = 0;
_finish = NaN;
_timer = null;
super();
if (!arguments.length){
return;
};
this.obj = _arg1;
this.prop = _arg2;
this.begin = _arg4;
this.position = _arg4;
this.duration = _arg6;
this.useSeconds = _arg7;
if ((_arg3 is Function)){
this.func = _arg3;
};
this.finish = _arg5;
this._timer = new Timer(100);
this.start();
}
public function continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position));
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean;
_local2 = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get finish():Number{
return ((this.begin + this.change));
}
public function get duration():Number{
return (this._duration);
}
protected function startEnterFrame():void{
var _local1:Number;
if (isNaN(this._fps)){
_mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true);
} else {
_local1 = (1000 / this._fps);
this._timer.delay = _local1;
this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true);
this._timer.start();
};
this.isPlaying = true;
}
public function set time(_arg1:Number):void{
this.prevTime = this._time;
if (_arg1 > this.duration){
if (this.looping){
this.rewind((_arg1 - this._duration));
this.update();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position));
} else {
if (this.useSeconds){
this._time = this._duration;
this.update();
};
this.stop();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position));
};
} else {
if (_arg1 < 0){
this.rewind();
this.update();
} else {
this._time = _arg1;
this.update();
};
};
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function getPosition(_arg1:Number=NaN):Number{
if (isNaN(_arg1)){
_arg1 = this._time;
};
return (this.func(_arg1, this.begin, this.change, this._duration));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function setPosition(_arg1:Number):void{
this.prevPos = this._position;
if (this.prop.length){
this.obj[this.prop] = (this._position = _arg1);
};
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position));
}
public function resume():void{
this.fixTime();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position));
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function yoyo():void{
this.continueTo(this.begin, this.time);
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function get FPS():Number{
return (this._fps);
}
public function rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
public function get time():Number{
return (this._time);
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
}
}//package fl.transitions
Section 23
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var time:Number;// = NAN
public var position:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_LOOP:String = "motionLoop";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_RESUME:String = "motionResume";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
time = NaN;
position = NaN;
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 24
//AgeVerificationInputError_51 (gh3Gui_fla.AgeVerificationInputError_51)
package gh3Gui_fla {
import flash.display.*;
import flash.text.*;
public dynamic class AgeVerificationInputError_51 extends MovieClip {
public var textField:TextField;
}
}//package gh3Gui_fla
Section 25
//FretFlame_17 (gh3Gui_fla.FretFlame_17)
package gh3Gui_fla {
import flash.display.*;
public dynamic class FretFlame_17 extends MovieClip {
public function FretFlame_17(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package gh3Gui_fla
Section 26
//Circular (mx.effects.easing.Circular)
package mx.effects.easing {
public class Circular {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * Math.sqrt((1 - (_arg1 * _arg1)))) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((-(_arg3) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):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));
}
}
}//package mx.effects.easing
Section 27
//Tween (mx.effects.Tween)
package mx.effects {
import flash.utils.*;
import flash.events.*;
import mx.events.*;
public class Tween extends EventDispatcher {
public var duration:Number;// = 3000
private var id:int;
private var arrayMode:Boolean;
private var _isPlaying:Boolean;// = true
private var startValue:Object;
public var listener:Object;
private var userEquation:Function;
private var previousUpdateTime:Number;
var needToLayout:Boolean;// = false
private var updateFunction:Function;
private var _doSeek:Boolean;// = false
var startTime:Number;
private var endFunction:Function;
private var endValue:Object;
private var _doReverse:Boolean;// = false
private var _playheadTime:Number;// = 0
private var _invertValues:Boolean;// = false
private var maxDelay:Number;// = 87.5
private static var timer:Timer = null;
private static var interval:Number = 10;
private static var activeTweens:Array = [];
static var intervalTime:Number = NAN;
public function Tween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1){
needToLayout = false;
maxDelay = 87.5;
_doSeek = false;
_isPlaying = true;
_doReverse = false;
userEquation = defaultEasingFunction;
duration = 3000;
_playheadTime = 0;
_invertValues = false;
super();
if (!_arg1){
return;
};
if ((_arg2 is Array)){
arrayMode = true;
};
this.listener = _arg1;
this.startValue = _arg2;
this.endValue = _arg3;
if (((!(isNaN(_arg4))) && (!((_arg4 == -1))))){
this.duration = _arg4;
};
if (((!(isNaN(_arg5))) && (!((_arg5 == -1))))){
maxDelay = (1000 / _arg5);
};
if (_arg4 == 0){
endTween();
} else {
Tween.addTween(this);
};
}
public function pause():void{
_isPlaying = false;
}
function get playheadTime():Number{
return (_playheadTime);
}
function get playReversed():Boolean{
return (_invertValues);
}
public function resume():void{
_isPlaying = true;
startTime = (intervalTime - _playheadTime);
if (_doReverse){
reverse();
_doReverse = false;
};
}
public function setTweenHandlers(_arg1:Function, _arg2:Function):void{
this.updateFunction = _arg1;
this.endFunction = _arg2;
}
function set playReversed(_arg1:Boolean):void{
_invertValues = _arg1;
}
public function set easingFunction(_arg1:Function):void{
userEquation = _arg1;
}
private function defaultEasingFunction(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 / 2) * (Math.sin((Math.PI * ((_arg1 / _arg4) - 0.5))) + 1)) + _arg2));
}
public function endTween():void{
var _local1:TweenEvent;
var _local2:Object;
_local1 = new TweenEvent(TweenEvent.TWEEN_END);
_local2 = getCurrentValue(duration);
_local1.value = _local2;
dispatchEvent(_local1);
if (endFunction != null){
endFunction(_local2);
} else {
listener.onTweenEnd(_local2);
};
Tween.removeTweenAt(id);
}
public function reverse():void{
if (_isPlaying){
_doReverse = false;
seek((duration - _playheadTime));
_invertValues = !(_invertValues);
} else {
_doReverse = !(_doReverse);
};
}
function doInterval():Boolean{
var _local1:Boolean;
var _local2:Number;
var _local3:Object;
var _local4:TweenEvent;
_local1 = false;
previousUpdateTime = intervalTime;
if (((_isPlaying) || (_doSeek))){
_local2 = (intervalTime - startTime);
_playheadTime = _local2;
_local3 = getCurrentValue(_local2);
if ((((_local2 >= duration)) && (!(_doSeek)))){
endTween();
_local1 = true;
} else {
_local4 = new TweenEvent(TweenEvent.TWEEN_UPDATE);
_local4.value = _local3;
dispatchEvent(_local4);
if (updateFunction != null){
updateFunction(_local3);
} else {
listener.onTweenUpdate(_local3);
};
};
_doSeek = false;
};
return (_local1);
}
public function seek(_arg1:Number):void{
var _local2:Number;
_local2 = intervalTime;
previousUpdateTime = _local2;
startTime = (_local2 - _arg1);
_doSeek = true;
}
function getCurrentValue(_arg1:Number):Object{
var _local2:Array;
var _local3:int;
var _local4:int;
if (_invertValues){
_arg1 = (duration - _arg1);
};
if (arrayMode){
_local2 = [];
_local3 = startValue.length;
_local4 = 0;
while (_local4 < _local3) {
_local2[_local4] = userEquation(_arg1, startValue[_local4], (endValue[_local4] - startValue[_local4]), duration);
_local4++;
};
return (_local2);
//unresolved jump
};
return (userEquation(_arg1, startValue, (Number(endValue) - Number(startValue)), duration));
}
static function removeTween(_arg1:Tween):void{
removeTweenAt(_arg1.id);
}
private static function addTween(_arg1:Tween):void{
_arg1.id = activeTweens.length;
activeTweens.push(_arg1);
if (!timer){
timer = new Timer(interval);
timer.addEventListener(TimerEvent.TIMER, timerHandler);
timer.start();
} else {
timer.start();
};
if (isNaN(intervalTime)){
intervalTime = getTimer();
};
_arg1.startTime = (_arg1.previousUpdateTime = intervalTime);
}
private static function timerHandler(_arg1:TimerEvent):void{
var _local2:Boolean;
var _local3:Number;
var _local4:int;
var _local5:int;
var _local6:Tween;
_local2 = false;
_local3 = intervalTime;
intervalTime = getTimer();
_local4 = activeTweens.length;
_local5 = _local4;
while (_local5 >= 0) {
_local6 = Tween(activeTweens[_local5]);
if (_local6){
_local6.needToLayout = false;
_local6.doInterval();
if (_local6.needToLayout){
_local2 = true;
};
};
_local5--;
};
if (_local2){
_arg1.updateAfterEvent();
};
}
private static function removeTweenAt(_arg1:int):void{
var _local2:int;
var _local3:int;
var _local4:Tween;
if ((((_arg1 >= activeTweens.length)) || ((_arg1 < 0)))){
return;
};
activeTweens.splice(_arg1, 1);
_local2 = activeTweens.length;
_local3 = _arg1;
while (_local3 < _local2) {
_local4 = Tween(activeTweens[_local3]);
_local4.id--;
_local3++;
};
if (_local2 == 0){
intervalTime = NaN;
timer.reset();
};
}
}
}//package mx.effects
Section 28
//TweenEvent (mx.events.TweenEvent)
package mx.events {
import flash.events.*;
public class TweenEvent extends Event {
public var value:Object;
public static const TWEEN_UPDATE:String = "tweenUpdate";
public static const TWEEN_END:String = "tweenEnd";
public function TweenEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
super(_arg1, _arg2, _arg3);
this.value = _arg4;
}
override public function clone():Event{
return (new TweenEvent(type, bubbles, cancelable, value));
}
}
}//package mx.events
Section 29
//AlphaButton (se.rocketxl.display.AlphaButton)
package se.rocketxl.display {
import mx.effects.*;
public class AlphaButton extends Button {
protected var TWEEN_DURATION:Number;// = 200
protected var ACTIVE_ALPHA:Number;// = 1
protected var NOT_ACTIVE_ALPHA:Number;// = 0.5
protected var animTween:Tween;// = null
public function AlphaButton(){
NOT_ACTIVE_ALPHA = 0.5;
ACTIVE_ALPHA = 1;
TWEEN_DURATION = 200;
animTween = null;
super();
alpha = NOT_ACTIVE_ALPHA;
}
public function setAlpha(_arg1:Number){
if (animTween != null){
animTween.pause();
animTween = null;
};
animTween = new Tween(this, alpha, _arg1, TWEEN_DURATION);
animTween.setTweenHandlers(onTween, onTweenEnd);
}
public function onTweenEnd(_arg1:Number){
onTween(_arg1);
animTween = null;
}
override public function deactivate(){
setAlpha(NOT_ACTIVE_ALPHA);
}
public function onTween(_arg1:Number){
alpha = _arg1;
}
override public function activate(){
setAlpha(ACTIVE_ALPHA);
}
}
}//package se.rocketxl.display
Section 30
//Button (se.rocketxl.display.Button)
package se.rocketxl.display {
import flash.display.*;
import flash.events.*;
public class Button extends MovieClip {
protected var active:Boolean;
protected var mouseOver:Boolean;
public function Button(){
buttonMode = true;
addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
active = false;
mouseOver = false;
}
public function onMouseOver(_arg1:MouseEvent){
mouseOver = true;
if (!active){
activate();
};
}
public function setActive(_arg1:Boolean){
this.active = _arg1;
if (_arg1){
activate();
} else {
if (!mouseOver){
deactivate();
};
};
}
public function activate(){
}
public function onMouseOut(_arg1:MouseEvent){
mouseOver = false;
if (!active){
deactivate();
};
}
public function deactivate(){
}
}
}//package se.rocketxl.display
Section 31
//DisplayUtils (se.rocketxl.display.DisplayUtils)
package se.rocketxl.display {
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
public class DisplayUtils {
private static function _getPositionToStage(_arg1:DisplayObject, _arg2:Point):Point{
_arg2.offset(_arg1.x, _arg1.y);
return (((_arg1.parent == null)) ? _arg2 : _getPositionToStage(_arg1.parent, _arg2));
}
public static function getPositionToStage(_arg1:DisplayObject):Point{
var _local2:Point;
_local2 = new Point(0, 0);
return (_getPositionToStage(_arg1, _local2));
}
public static function getDisplayObject(_arg1:DisplayObjectContainer, _arg2:String, _arg3:Class=null, _arg4:Boolean=true, _arg5:Boolean=true):DisplayObject{
var _local6:String;
if (_arg1 != null){
if (_arg1.hasOwnProperty(_arg2)){
if ((((_arg3 == null)) || ((_arg1[_arg2] is _arg3)))){
return (_arg1[_arg2]);
};
_local6 = (((((("Specified property '" + _arg2) + "' (") + getQualifiedClassName(_arg1[_arg2])) + ") was found, but was not of specified type '") + _arg3) + "'.");
if (_arg4){
throw (new Error(_local6));
};
if (_arg5){
trace(_local6);
};
} else {
_local6 = (((_arg1 + " did not contain '") + _arg2) + "'");
if (_arg4){
throw (new Error(_local6));
};
if (_arg5){
trace(_local6);
};
};
} else {
_local6 = (("input container was null, can't get property '" + _arg2) + "'");
if (_arg4){
throw (new Error(_local6));
};
if (_arg5){
trace(_local6);
};
};
return (null);
}
}
}//package se.rocketxl.display
Section 32
//IChart (se.rocketxl.gaming.musicgames.charting.interfaces.IChart)
package se.rocketxl.gaming.musicgames.charting.interfaces {
import se.rocketxl.gaming.musicgames.charting.*;
public interface IChart extends ISerializable {
function get Mode():GameMode;
function get Measures():Array;
function get Timing():TimingData;
function get Difficulty():GameDifficulty;
function get NotesPerRow():int;
}
}//package se.rocketxl.gaming.musicgames.charting.interfaces
Section 33
//IMeasure (se.rocketxl.gaming.musicgames.charting.interfaces.IMeasure)
package se.rocketxl.gaming.musicgames.charting.interfaces {
public interface IMeasure extends ISerializable {
function get RepeatCount():int;
function get Rows():Array;
function get MeasureNumber():int;
}
}//package se.rocketxl.gaming.musicgames.charting.interfaces
Section 34
//IMeasureRow (se.rocketxl.gaming.musicgames.charting.interfaces.IMeasureRow)
package se.rocketxl.gaming.musicgames.charting.interfaces {
public interface IMeasureRow extends ISerializable {
function get Notes():Array;
function get BpmChange():Number;
function get MeasurePart():Number;
function get PermitFlow():Boolean;
function get StopBeats():Number;
}
}//package se.rocketxl.gaming.musicgames.charting.interfaces
Section 35
//INote (se.rocketxl.gaming.musicgames.charting.interfaces.INote)
package se.rocketxl.gaming.musicgames.charting.interfaces {
import se.rocketxl.math.algebra.*;
import se.rocketxl.gaming.musicgames.charting.*;
import flash.display.*;
public interface INote {
function get Position3d():Vector3d;
function get HoldMask():MovieClip;
function get IsValidForDisplay():Boolean;
function set HoldMask(_arg1:MovieClip);
function get Type():NoteType;
function setPlayedState(_arg1:Boolean):void;
function get IsPlayed():Boolean;
function get HoldBeats():Number;
}
}//package se.rocketxl.gaming.musicgames.charting.interfaces
Section 36
//ISerializable (se.rocketxl.gaming.musicgames.charting.interfaces.ISerializable)
package se.rocketxl.gaming.musicgames.charting.interfaces {
public interface ISerializable {
function Serialize();
function Deserialize(_arg1):void;
}
}//package se.rocketxl.gaming.musicgames.charting.interfaces
Section 37
//ISong (se.rocketxl.gaming.musicgames.charting.interfaces.ISong)
package se.rocketxl.gaming.musicgames.charting.interfaces {
import se.rocketxl.gaming.musicgames.charting.*;
import se.rocketxl.*;
import flash.events.*;
import se.rocketxl.media.*;
public interface ISong extends ISerializable, IEventDispatcher {
function get Id():Guid;
function get IsPlaying():Boolean;
function get Filepath():String;
function loadAssets():void;
function stop():void;
function stopLoading():void;
function get BackgroundSound():ExtendedSound;
function get Artist():String;
function getChart(_arg1:GameDifficulty, _arg2:GameMode):IChart;
function get IsLoaded():Boolean;
function get PlayingSound():ExtendedSound;
function get Offset():Number;
function play():void;
function get Charts():Array;
function pause():void;
function get Title():String;
}
}//package se.rocketxl.gaming.musicgames.charting.interfaces
Section 38
//FretHoldContainer (se.rocketxl.gaming.musicgames.charting.providers.gh3.FretHoldContainer)
package se.rocketxl.gaming.musicgames.charting.providers.gh3 {
import flash.display.*;
import flash.events.*;
import se.rocketxl.display.*;
public class FretHoldContainer extends MovieClip {
public var clpFretHold1:MovieClip;
public var clpFretHold2:MovieClip;
public var clpFretHold3:MovieClip;
public var clpFretHold4:MovieClip;
public var clpFretHold5:MovieClip;
private var _arrFretHolds:Array;
public function FretHoldContainer(){
this.addEventListener(Event.ADDED_TO_STAGE, this.doAddedToStage);
}
public function addHoldMask(_arg1:int, _arg2:MovieClip){
this._arrFretHolds[_arg1].mask = _arg2;
}
private function doAddedToStage(_arg1:Event){
var _local2:int;
if (_arg1.target == this){
this._arrFretHolds = new Array(5);
_local2 = 0;
while (_local2 < this._arrFretHolds.length) {
this._arrFretHolds[_local2] = DisplayUtils.getDisplayObject(this, ("clpFretHold" + (_local2 + 1)));
this._arrFretHolds[_local2].stop();
this._arrFretHolds[_local2].mask = new MovieClip();
this._arrFretHolds[_local2].mask.x = this._arrFretHolds[_local2].x;
this._arrFretHolds[_local2].mask.y = this._arrFretHolds[_local2].y;
_local2++;
};
};
}
public function removeHoldMask(_arg1:int, _arg2:MovieClip){
this._arrFretHolds[_arg1].mask = null;
}
}
}//package se.rocketxl.gaming.musicgames.charting.providers.gh3
Section 39
//GH3Chart (se.rocketxl.gaming.musicgames.charting.providers.gh3.GH3Chart)
package se.rocketxl.gaming.musicgames.charting.providers.gh3 {
import se.rocketxl.gaming.musicgames.charting.*;
import se.rocketxl.*;
import se.rocketxl.gaming.musicgames.charting.interfaces.*;
import flash.events.*;
public class GH3Chart extends EventDispatcher implements IChart {
private var _enmDifficulty:GameDifficulty;
private var _objTiming:TimingData;
private var _clnMeasures:Array;
private var _enmGameMode:GameMode;
private static const XMLATTR_CHART_DIFFICULTY = "difficulty";
public static const XMLNODE_CHART = "chart";
private static const XMLATTR_CHART_GAMEMODE = "type";
private static const _intNotesPerRow:int = 5;
public function GH3Chart(_arg1:XML){
this.Deserialize(_arg1);
}
public function get Mode():GameMode{
return (this._enmGameMode);
}
public function Deserialize(_arg1):void{
var _local2:int;
var _local3:XML;
var _local4:GH3MeasureRow;
this._enmDifficulty = new GameDifficulty(_arg1.attribute(XMLATTR_CHART_DIFFICULTY));
this._enmGameMode = new GameMode(_arg1.attribute(XMLATTR_CHART_GAMEMODE));
GH3MeasureRow.blnIsStarPowerActive = false;
this._objTiming = new TimingData();
this._clnMeasures = new Array();
if (_arg1.hasOwnProperty(GH3Measure.XMLNODE_MEASURE)){
_local2 = 0;
for each (_local3 in _arg1.child(GH3Measure.XMLNODE_MEASURE)) {
var _temp1 = _local2;
_local2 = (_local2 + 1);
this._clnMeasures.push(new GH3Measure(_local3, _temp1));
for each (_local4 in (this._clnMeasures[(this._clnMeasures.length - 1)] as GH3Measure).Rows) {
if (!isNaN(_local4.BpmChange)){
this._objTiming.SetBPMAtBeat((_local2 + _local4.MeasurePart), _local4.BpmChange);
};
};
};
};
}
override public function toString():String{
return (((this.Difficulty + " / ") + this.Mode));
}
public function Serialize(){
var _local1:String;
var _local2:XML;
var _local3:GH3Measure;
_local1 = (("<" + XMLNODE_CHART) + " ");
if (this._enmDifficulty.toString() != ""){
_local1 = (_local1 + StringUtils.Format("{0} = \"{1}\" ", XMLATTR_CHART_DIFFICULTY, this._enmDifficulty.toString()));
};
if (this._enmGameMode.toString() != ""){
_local1 = (_local1 + StringUtils.Format("{0} = \"{1}\" ", XMLATTR_CHART_GAMEMODE, this._enmGameMode.toString()));
};
_local2 = new XML((_local1 + "/>"));
for each (_local3 in this._clnMeasures) {
_local2.appendChild(_local3.Serialize());
};
return (_local2);
}
public function get Timing():TimingData{
return (this._objTiming);
}
public function get Difficulty():GameDifficulty{
return (this._enmDifficulty);
}
public function get Measures():Array{
return (this._clnMeasures);
}
public function get NotesPerRow():int{
return (GH3Chart._intNotesPerRow);
}
}
}//package se.rocketxl.gaming.musicgames.charting.providers.gh3
Section 40
//GH3Measure (se.rocketxl.gaming.musicgames.charting.providers.gh3.GH3Measure)
package se.rocketxl.gaming.musicgames.charting.providers.gh3 {
import se.rocketxl.*;
import se.rocketxl.gaming.musicgames.charting.interfaces.*;
public class GH3Measure implements IMeasure {
private var _intRepeatCount:int;
private var _intMeasureNumber:int;
private var _clnRows:Array;
public static const XMLNODE_MEASURE = "measure";
private static const XMLATTR_MEASURE_MULTIPLY = "repeat";
public function GH3Measure(_arg1:XML, _arg2:int){
this._intMeasureNumber = _arg2;
this.Deserialize(_arg1);
}
public function get Rows():Array{
return (this._clnRows);
}
public function Deserialize(_arg1):void{
var _local2:XMLList;
var _local3:GH3MeasureRow;
var _local4:XMLList;
var _local5:int;
var _local6:int;
var _local7:XML;
_local2 = _arg1.attribute(XMLATTR_MEASURE_MULTIPLY);
this._intRepeatCount = ((_local2.length() > 0)) ? parseInt(_local2.text) : 1;
this._clnRows = new Array();
if (_arg1.hasOwnProperty(GH3MeasureRow.XMLNODE_MEASUREROW)){
_local4 = _arg1.child(GH3MeasureRow.XMLNODE_MEASUREROW);
_local5 = _local4.length();
_local6 = 0;
for each (_local7 in _local4) {
var _temp1 = _local6;
_local6 = (_local6 + 1);
this._clnRows.push(new GH3MeasureRow(_local7, (this._intMeasureNumber + (_temp1 / _local5))));
};
};
}
public function get MeasureNumber():int{
return (this._intMeasureNumber);
}
public function Serialize(){
var _local1:String;
var _local2:XML;
var _local3:GH3MeasureRow;
_local1 = (("<" + XMLNODE_MEASURE) + " ");
if (this.RepeatCount > 1){
_local1 = (_local1 + StringUtils.Format("{0} = \"{1}\" ", XMLATTR_MEASURE_MULTIPLY, this.RepeatCount));
};
_local2 = new XML((_local1 + "/>"));
for each (_local3 in this._clnRows) {
_local2.appendChild(_local3.Serialize());
};
return (_local2);
}
public function get RepeatCount():int{
return (this._intRepeatCount);
}
}
}//package se.rocketxl.gaming.musicgames.charting.providers.gh3
Section 41
//GH3MeasureRow (se.rocketxl.gaming.musicgames.charting.providers.gh3.GH3MeasureRow)
package se.rocketxl.gaming.musicgames.charting.providers.gh3 {
import se.rocketxl.gaming.musicgames.charting.*;
import flash.display.*;
import se.rocketxl.*;
import se.rocketxl.gaming.musicgames.charting.interfaces.*;
public class GH3MeasureRow implements IMeasureRow {
private var _blnIsStarStart:Boolean;
private var _numStopBeats:Number;
private var _numBpmChange:Number;
private var _numMeasurePart:Number;
private var _blnPermitFlow:Boolean;
private var _intMeasureNumber:int;
private var _blnIsStarEnd:Boolean;
private var _numMeasureNumberFloat:Number;
private var _arrNotes:Array;
public static const XMLNODE_MEASUREROW = "row";
private static const XMLATTR_MEASUREROW_BPMCHANGE = "bpmchange";
private static const holdEvaluationData:Array = new Array();
private static const XMLATTR_MEASUREROW_STOP = "stop";
private static const XMLATTR_MEASUREROW_PERMITFLOW = "flow";
private static const XMLATTR_MEASUREROW_STAR = "star";
public static var blnIsStarPowerActive:Boolean;
public function GH3MeasureRow(_arg1:XML, _arg2:Number){
this._intMeasureNumber = Math.floor(_arg2);
this._numMeasureNumberFloat = _arg2;
this._numMeasurePart = (_arg2 - this._intMeasureNumber);
this.Deserialize(_arg1);
}
public function Serialize(){
var _local1:String;
_local1 = (("<" + XMLNODE_MEASUREROW) + " ");
if (!isNaN(this._numBpmChange)){
_local1 = (_local1 + StringUtils.Format("{0} = \"{1}\" ", XMLATTR_MEASUREROW_BPMCHANGE, this._numBpmChange));
};
if (this._blnPermitFlow){
_local1 = (_local1 + StringUtils.Format("{0} = \"{1}\" ", XMLATTR_MEASUREROW_PERMITFLOW, this._blnPermitFlow));
};
if (!isNaN(this._numStopBeats)){
_local1 = (_local1 + StringUtils.Format("{0} = \"{1}\" ", XMLATTR_MEASUREROW_STOP, this._numStopBeats));
};
if (this._blnIsStarStart){
_local1 = (_local1 + StringUtils.Format("{0} = \"start\" ", XMLATTR_MEASUREROW_STAR));
} else {
if (this._blnIsStarEnd){
_local1 = (_local1 + StringUtils.Format("{0} = \"end\" ", XMLATTR_MEASUREROW_STAR));
};
};
return (new XML((_local1 + StringUtils.Format(">{0}</{1}>", this.Notes.join(""), XMLNODE_MEASUREROW))));
}
public function get PermitFlow():Boolean{
return (this._blnPermitFlow);
}
public function get BpmChange():Number{
return (this._numBpmChange);
}
public function get MeasurePart():Number{
return (this._numMeasurePart);
}
public function Deserialize(_arg1):void{
var _local2:String;
var _local3:int;
this._numBpmChange = parseFloat(_arg1.attribute(XMLATTR_MEASUREROW_BPMCHANGE));
this._blnPermitFlow = (_arg1.attribute(XMLATTR_MEASUREROW_PERMITFLOW) == "true");
this._numStopBeats = parseFloat(_arg1.attribute(XMLATTR_MEASUREROW_STOP));
this._blnIsStarStart = (_arg1.attribute(XMLATTR_MEASUREROW_STAR) == "start");
this._blnIsStarEnd = (_arg1.attribute(XMLATTR_MEASUREROW_STAR) == "end");
if (this._blnIsStarStart){
blnIsStarPowerActive = true;
};
_local2 = _arg1.text().toString();
this._arrNotes = new Array(_local2.length);
_local3 = 0;
while (_local3 < this._arrNotes.length) {
this._arrNotes[_local3] = new GH3Note(_local2.charAt(_local3), blnIsStarPowerActive, this._blnIsStarStart, this._blnIsStarEnd, this._blnPermitFlow);
(this._arrNotes[_local3] as MovieClip).gotoAndStop((_local3 + 1));
this.evaluateNote(_local3);
_local3++;
};
if (this._blnIsStarEnd){
blnIsStarPowerActive = false;
};
}
public function get Notes():Array{
return (this._arrNotes);
}
private function evaluateNote(_arg1:int){
if (GH3MeasureRow.holdEvaluationData[_arg1] != null){
if ((this._arrNotes[_arg1] as GH3Note).Type.equals(NoteType.HOLDEND)){
(GH3MeasureRow.holdEvaluationData[_arg1][0] as GH3Note).HoldBeats = (this._numMeasureNumberFloat - GH3MeasureRow.holdEvaluationData[_arg1][1]);
GH3MeasureRow.holdEvaluationData[_arg1] = null;
};
};
if ((this._arrNotes[_arg1] as GH3Note).Type.equals(NoteType.HOLDSTRUM)){
GH3MeasureRow.holdEvaluationData[_arg1] = [this._arrNotes[_arg1], this._numMeasureNumberFloat];
};
}
public function toString():String{
return (this.Notes.toString());
}
public function get StopBeats():Number{
return (this._numStopBeats);
}
}
}//package se.rocketxl.gaming.musicgames.charting.providers.gh3
Section 42
//GH3Note (se.rocketxl.gaming.musicgames.charting.providers.gh3.GH3Note)
package se.rocketxl.gaming.musicgames.charting.providers.gh3 {
import se.rocketxl.math.algebra.*;
import se.rocketxl.gaming.musicgames.charting.*;
import flash.display.*;
import se.rocketxl.gaming.musicgames.charting.interfaces.*;
import flash.events.*;
import se.rocketxl.display.*;
public class GH3Note extends MovieClip implements INote {
private var _clpHoldMask:MovieClip;
private var _numHoldBeats:Number;
private var _vtrPosition3d:Vector3d;
public var clpStarPowerGlow:MovieClip;
public var clpStar:MovieClip;
private var _blnIsStarStart:Boolean;
private var _blnIsPlayed:Boolean;
private var _clpFlowShine:MovieClip;
public var clpFlowShine:MovieClip;
private var _clpStarPowerGlow:MovieClip;
private var _blnIsFlow:Boolean;
private var _objType:NoteType;
private var _blnIsStar:Boolean;
private var _blnIsStarEnd:Boolean;
private var _clpStar:MovieClip;
public static const empty:GH3Note = new GH3Note(NoteType.EMPTY.toString());
;
public function GH3Note(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Boolean=false, _arg5:Boolean=false){
this._blnIsStar = _arg2;
this._blnIsStarStart = _arg3;
this._blnIsStarEnd = _arg4;
this._blnIsFlow = _arg5;
this._objType = NoteType.getType(_arg1);
this._vtrPosition3d = new Vector3d();
this.addEventListener(Event.ADDED_TO_STAGE, this.doAddedToStage);
}
public function get IsStarStart():Boolean{
return (this._blnIsStarStart);
}
public function get IsValidForDisplay():Boolean{
return (((((!(this.IsPlayed)) && ((this._objType == NoteType.STRUM)))) || ((this._objType == NoteType.HOLDSTRUM))));
}
private function doAddedToStage(_arg1:Event){
if (_arg1.target == this){
if (this._objType == null){
throw (new ArgumentError("Argument is not a valid note type.\nParameter name: typeDescriptor"));
};
if (this._clpStarPowerGlow == null){
this._clpStarPowerGlow = (DisplayUtils.getDisplayObject(this, "clpStarPowerGlow", null, true, false) as MovieClip);
};
if (this._clpStarPowerGlow != null){
this._clpStarPowerGlow.stop();
this._clpStarPowerGlow.visible = false;
};
if (this._clpFlowShine == null){
this._clpFlowShine = (DisplayUtils.getDisplayObject(this, "clpFlowShine", null, true, false) as MovieClip);
};
if (this._clpFlowShine != null){
this._clpFlowShine.stop();
this._clpFlowShine.visible = false;
};
if (this._clpStar == null){
this._clpStar = (DisplayUtils.getDisplayObject(this, "clpStar", null, true, false) as MovieClip);
};
if (this._clpStar != null){
this._clpStar.stop();
this._clpStar.visible = this._blnIsStar;
};
if (this._blnIsFlow){
this._clpFlowShine.visible = true;
this._clpFlowShine.play();
};
};
}
public function get HoldMask():MovieClip{
return (this._clpHoldMask);
}
override public function toString():String{
return (this._objType.toString());
}
public function get Type():NoteType{
return (this._objType);
}
public function get IsStarEnd():Boolean{
return (this._blnIsStarEnd);
}
public function get Position3d():Vector3d{
return (this._vtrPosition3d);
}
public function get IsPlayed():Boolean{
return (this._blnIsPlayed);
}
public function get IsStar():Boolean{
return (this._blnIsStar);
}
public function set StarPowerGlow(_arg1:Boolean){
this._clpStarPowerGlow.visible = _arg1;
}
public function set HoldBeats(_arg1:Number){
if (_arg1 < 0){
throw (new ArgumentError("Argument must be larger than or equal to zero.\nParam name: length"));
};
if (!this._objType.equals(NoteType.HOLDSTRUM)){
throw (new ArgumentError("Note length may not be supplied for other note types than HOLDSTRUM"));
};
this._numHoldBeats = _arg1;
}
public function set HoldMask(_arg1:MovieClip){
this._clpHoldMask = _arg1;
}
public function get HoldBeats():Number{
return (this._numHoldBeats);
}
public function toggleStarPower(){
this._clpStarPowerGlow.visible = !(this._clpStarPowerGlow.visible);
if (this._clpStarPowerGlow.visible){
this._clpStarPowerGlow.play();
} else {
this._clpStarPowerGlow.stop();
};
}
public function setPlayedState(_arg1:Boolean):void{
this._blnIsPlayed = _arg1;
}
}
}//package se.rocketxl.gaming.musicgames.charting.providers.gh3
Section 43
//GH3Song (se.rocketxl.gaming.musicgames.charting.providers.gh3.GH3Song)
package se.rocketxl.gaming.musicgames.charting.providers.gh3 {
import se.rocketxl.gaming.musicgames.charting.*;
import se.rocketxl.*;
import se.rocketxl.gaming.musicgames.charting.interfaces.*;
import flash.events.*;
import se.rocketxl.media.*;
import se.rocketxl.io.*;
import se.rocketxl.net.*;
public class GH3Song extends EventDispatcher implements ISong {
private var _txtLocalBackgroundSoundFile:String;
private var _blnIsLoading:Boolean;
private var _strTitle:String;
private var _arrCharts:Array;
private var _strDirectory:String;
private var _blnIsLoaded:Boolean;
private var _objBackgroundSound:ExtendedSound;
private var _strFilepath:String;
private var _numOffset:Number;
private var _arrChartItems:Array;
private var _strArtist:String;
private var _blnLocalBackgroundSoundFileWasSpecified:Boolean;// = false
private var _objPlayingSound:ExtendedSound;
private var _objGuid:Guid;
private var _blnLocalPlayingSoundFileWasSpecified:Boolean;// = false
private var _txtLocalPlayingSoundFile:String;
private var _blnIsPlaying:Boolean;
private static const XMLATTR_MAIN_BPMS = "bpms";
private static const XMLATTR_MAIN_TITLE = "title";
private static const XMLATTR_MAIN_ID = "guid";
private static const XMLATTR_MAIN_PLAYSOUND = "playsound";
private static const XMLATTR_MAIN_OFFSET = "offset";
private static const XMLATTR_MAIN_ARTIST = "artist";
private static const XMLATTR_MAIN_BGSOUND = "bgsound";
private static const XMLNODE_MAIN = "ghnotes";
public function GH3Song(_arg1:XML, _arg2:String, _arg3:Guid=null){
_blnLocalBackgroundSoundFileWasSpecified = false;
_blnLocalPlayingSoundFileWasSpecified = false;
super();
this._objGuid = _arg3;
this._strFilepath = _arg2;
this._strDirectory = Path.getDirectory(this._strFilepath);
this.Deserialize(_arg1);
this._blnIsLoading = false;
}
public function stop():void{
this._blnIsPlaying = false;
if (this._objBackgroundSound != null){
this._objBackgroundSound.stop();
this._objBackgroundSound.removeEventListener(Event.SOUND_COMPLETE, this.doAllSoundsComplete);
};
if (this._objPlayingSound != null){
this._objPlayingSound.stop();
};
}
public function get IsPlaying():Boolean{
return (this._blnIsPlaying);
}
public function pause():void{
this._blnIsPlaying = false;
if (this._objBackgroundSound != null){
this._objBackgroundSound.pause();
};
if (this._objPlayingSound != null){
this._objPlayingSound.pause();
};
}
public function loadAssets():void{
var _local1:GroupLoader;
if (this._blnIsLoaded){
trace("Already preloaded");
this.doPreLoadComplete(null);
return;
};
if ((((this.BackgroundSoundPath == null)) && ((this.PlayingSoundPath == null)))){
trace("GH3Song: preLoadSong(): Could not load song, no sound paths set");
this.doPreLoadComplete(null);
return;
};
_local1 = new GroupLoader();
if (this.BackgroundSoundPath != null){
this._objBackgroundSound = new ExtendedSound(this.BackgroundSoundPath);
_local1.addLoadingObject(this._objBackgroundSound);
};
if (this.PlayingSoundPath != null){
this._objPlayingSound = new ExtendedSound(this.PlayingSoundPath);
_local1.addLoadingObject(this._objPlayingSound);
};
_local1.addEventListener(Event.COMPLETE, this.doPreLoadComplete);
_local1.addEventListener(ProgressEvent.PROGRESS, this.doPreLoadProgress);
if (this._objBackgroundSound != null){
this._objBackgroundSound.load();
};
if (this._objPlayingSound != null){
this._objPlayingSound.load();
};
this._blnIsLoading = true;
}
private function doPreLoadComplete(_arg1:Event){
this._blnIsLoaded = true;
this._blnIsLoading = false;
this.dispatchEvent(new Event(Event.COMPLETE));
}
public function get PlayingSound():ExtendedSound{
return (this._objPlayingSound);
}
private function get BackgroundSoundPath():String{
return ((this._blnLocalBackgroundSoundFileWasSpecified) ? (this._strDirectory + this._txtLocalBackgroundSoundFile) : null);
}
public function getChart(_arg1:GameDifficulty, _arg2:GameMode):IChart{
var _local3:GH3Chart;
for each (_local3 in this.Charts) {
if (((_local3.Difficulty.equals(_arg1)) && (_local3.Mode.equals(_arg2)))){
return (_local3);
};
};
return (null);
}
public function play():void{
this._blnIsPlaying = true;
if (this._objBackgroundSound != null){
this._objBackgroundSound.play();
this._objBackgroundSound.addEventListener(Event.SOUND_COMPLETE, this.doAllSoundsComplete);
};
if (this._objPlayingSound != null){
this._objPlayingSound.play();
};
}
public function get Title():String{
return (this._strTitle);
}
public function get Id():Guid{
return (this._objGuid);
}
public function get Filepath():String{
return (this._strFilepath);
}
public function get Offset():Number{
return (this._numOffset);
}
public function Serialize(){
var _local1:String;
var _local2:XML;
var _local3:GH3Chart;
_local1 = (("<" + XMLNODE_MAIN) + " ");
if (this.Title != ""){
_local1 = (_local1 + StringUtils.Format("{0} = \"{1}\" ", XMLATTR_MAIN_TITLE, this.Title));
};
if (this.Artist != ""){
_local1 = (_local1 + StringUtils.Format("{0} = \"{1}\" ", XMLATTR_MAIN_ARTIST, this.Artist));
};
if (((!(isNaN(this.Offset))) && (!((this.Offset == 0))))){
_local1 = (_local1 + StringUtils.Format("{0} = \"{1}\" ", XMLATTR_MAIN_OFFSET, this.Offset));
};
if (((!((this._txtLocalBackgroundSoundFile == null))) && (!((this._txtLocalBackgroundSoundFile == ""))))){
_local1 = (_local1 + StringUtils.Format("{0} = \"{1}\" ", XMLATTR_MAIN_BGSOUND, this._txtLocalBackgroundSoundFile));
};
if (((!((this._txtLocalPlayingSoundFile == null))) && (!((this._txtLocalPlayingSoundFile == ""))))){
_local1 = (_local1 + StringUtils.Format("{0} = \" {1}\" ", XMLATTR_MAIN_PLAYSOUND, this._txtLocalPlayingSoundFile));
};
_local2 = new XML((_local1 + "/>"));
for each (_local3 in this._arrCharts) {
_local2.appendChild(_local3.Serialize());
};
return (_local2);
}
public function stopLoading():void{
if (this._blnIsLoading){
if (this._objBackgroundSound != null){
this._objBackgroundSound.close();
};
if (this._objPlayingSound != null){
this._objPlayingSound.close();
};
};
this._blnIsLoading = false;
}
public function Deserialize(_arg1):void{
var _local2:Number;
var _local3:Number;
var _local4:Array;
var _local5:Array;
var _local6:Array;
var _local7:String;
var _local8:XML;
var _local9:BpmSegment;
this._strTitle = _arg1.attribute(XMLATTR_MAIN_TITLE).toString();
this._strArtist = _arg1.attribute(XMLATTR_MAIN_ARTIST).toString();
this._txtLocalPlayingSoundFile = _arg1.attribute(XMLATTR_MAIN_PLAYSOUND).toString();
this._txtLocalBackgroundSoundFile = _arg1.attribute(XMLATTR_MAIN_BGSOUND).toString();
this._blnLocalPlayingSoundFileWasSpecified = !((this._txtLocalPlayingSoundFile == ""));
this._blnLocalBackgroundSoundFileWasSpecified = !((this._txtLocalBackgroundSoundFile == ""));
this._numOffset = parseFloat(_arg1.attribute(XMLATTR_MAIN_OFFSET).toString());
_local5 = _arg1.attribute(XMLATTR_MAIN_BPMS).toString().split(",");
_local6 = new Array(_local5.length);
for each (_local7 in _local5) {
_local4 = _local7.split("=");
_local2 = parseFloat(_local4[0]);
_local3 = parseFloat(_local4[1]);
if (((!(isNaN(_local2))) && (!(isNaN(_local3))))){
_local6.push(new BpmSegment(_local2, _local3));
};
};
this._arrCharts = new Array();
if (_arg1.hasOwnProperty(GH3Chart.XMLNODE_CHART)){
for each (_local8 in _arg1.child(GH3Chart.XMLNODE_CHART)) {
this._arrCharts.push(new GH3Chart(_local8));
for each (_local9 in _local6) {
(this._arrCharts[(this._arrCharts.length - 1)] as GH3Chart).Timing.SetBPMAtBeat(_local9.StartBeat, _local9.Bpm);
};
};
};
}
private function doAllSoundsComplete(_arg1:Event){
this.dispatchEvent(new Event(Event.SOUND_COMPLETE));
}
public function get Artist():String{
return (this._strArtist);
}
public function get BackgroundSound():ExtendedSound{
return (this._objBackgroundSound);
}
public function verifySoundSync(_arg1:Number):Boolean{
var _local2:Number;
if (((((((!((this.PlayingSound == null))) && (this.PlayingSound.IsPlaying))) && (!((this.BackgroundSound == null))))) && (this.BackgroundSound.IsPlaying))){
_local2 = Math.abs((this.PlayingSound.PositionMs - this.BackgroundSound.PositionMs));
if (_local2 > _arg1){
trace((((("GH3Song: pollSoundSync(): Sound layer differential too high (" + _local2) + " > ") + _arg1) + "), resetting sync"));
this.PlayingSound.PositionMs = this.BackgroundSound.PositionMs;
return (false);
};
};
return (true);
}
private function doPreLoadProgress(_arg1:ProgressEvent){
this.dispatchEvent(new ProgressEvent(_arg1.type, _arg1.bubbles, _arg1.cancelable, _arg1.bytesLoaded, _arg1.bytesTotal));
}
override public function toString():String{
return (((((this.Artist + " - ") + this.Title) + ", Chart count: ") + this.Charts.length));
}
private function get PlayingSoundPath():String{
return ((this._blnLocalPlayingSoundFileWasSpecified) ? (this._strDirectory + this._txtLocalPlayingSoundFile) : null);
}
public function get IsLoaded():Boolean{
return (this._blnIsLoaded);
}
public function get Charts():Array{
return (this._arrCharts);
}
public function updateSoundLayerStatus(_arg1:Boolean){
if (((((((!((this.PlayingSound == null))) && (this.PlayingSound.IsPlaying))) && (!((this.BackgroundSound == null))))) && (this.BackgroundSound.IsPlaying))){
this.PlayingSound.Volume = (_arg1) ? 1 : 0;
this.BackgroundSound.Volume = (_arg1) ? 0 : 1;
};
}
}
}//package se.rocketxl.gaming.musicgames.charting.providers.gh3
Section 44
//BpmSegment (se.rocketxl.gaming.musicgames.charting.BpmSegment)
package se.rocketxl.gaming.musicgames.charting {
public class BpmSegment {
public var StartBeat;// = -1
public var Bpm;// = -1
public function BpmSegment(_arg1:Number, _arg2:Number):void{
StartBeat = -1;
Bpm = -1;
super();
this.StartBeat = _arg1;
this.Bpm = _arg2;
}
public function toString():String{
return (((this.StartBeat + "=") + this.Bpm));
}
}
}//package se.rocketxl.gaming.musicgames.charting
Section 45
//ChartHelper (se.rocketxl.gaming.musicgames.charting.ChartHelper)
package se.rocketxl.gaming.musicgames.charting {
import flash.display.*;
import se.rocketxl.gaming.musicgames.*;
import se.rocketxl.gaming.musicgames.charting.interfaces.*;
import flash.events.*;
import se.rocketxl.ui.*;
import se.rocketxl.gaming.musicgames.charting.providers.gh3.*;
import se.rocketxl.gaming.musicgames.events.*;
public class ChartHelper extends EventDispatcher {
private var _blnIsStarPowerActive;
private var _blnUseStrum:Boolean;
private var _numReceiverWidth:Number;
private var _numReceiverYPos:Number;
private var _objChart:IChart;
private var _numHorizonYPos:Number;
private var _intVisibleMeasures:int;
private var _numNoteZPercentage:Number;
private var _arrWantedKeyIndexes:Array;
private var _numNoteMinWidth:Number;
private var _arrNotesOnStage:Array;
private var _blnIsKeyValid:Boolean;
private var _numPaneLength:Number;
private var _numNoteMaxWidth:Number;
private var _blnNoteHasHoldMask:Boolean;
private var _blnStartedRendering:Boolean;// = false
private var _numHorizonWidth:Number;
private var _objMissGrade:IGrade;
private var _blnNoteWasMissed:Boolean;
private var _numPaneMaxMinWidthDelta:Number;
private var _intCurrentRow:int;
private var _intNoteCorrectionOffset:int;
private var _numNoteMaxMinWidthDelta:Number;
public function ChartHelper(_arg1:IChart, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:IGrade, _arg8:Boolean){
_arrWantedKeyIndexes = new Array();
_blnStartedRendering = false;
super();
if (_arg7 == null){
throw (new ArgumentError("Argument may not be null.\nParameter name: missGrade"));
};
this._numReceiverWidth = _arg6;
this._numReceiverYPos = _arg5;
this._numHorizonWidth = _arg4;
this._numHorizonYPos = _arg3;
this._arrNotesOnStage = new Array();
this._objMissGrade = _arg7;
this._objChart = _arg1;
this._numNoteMaxWidth = _arg2;
this._numNoteMinWidth = ((this._numNoteMaxWidth * _arg4) / _arg6);
this._numNoteMaxMinWidthDelta = (this._numNoteMaxWidth - this._numNoteMinWidth);
this._numPaneMaxMinWidthDelta = (this._numReceiverWidth - this._numHorizonWidth);
this._numPaneLength = (this._numReceiverYPos - this._numHorizonYPos);
this._intNoteCorrectionOffset = Math.floor((this._objChart.NotesPerRow / 2));
this._intVisibleMeasures = 2;
this._blnUseStrum = _arg8;
}
private function isValidRow(_arg1:IMeasureRow, _arg2:Array){
var _local3:int;
_local3 = 0;
while (_local3 < _arg1.Notes.length) {
if (((_arg1.Notes[_local3].IsValidForDisplay) && (!(KeyState.OFF.equals(_arg2[_local3]))))){
return (true);
};
_local3++;
};
return (false);
}
public function processKeyStates(_arg1:Number, _arg2:Array, _arg3:KeyState, _arg4:Boolean, _arg5:IGrade):void{
var _local6:int;
var _local7:Boolean;
var _local8:Boolean;
var _local9:KeyState;
var _local10:Boolean;
var _local11:int;
var _local12:int;
var _local13:Number;
var _local14:Number;
var _local15:IMeasureRow;
var _local16:IMeasureRow;
var _local17:int;
var _local18:int;
var _local19:int;
var _local20:Boolean;
var _local21:Boolean;
var _local22:Boolean;
var _local23:Boolean;
var _local24:Boolean;
if (_arg5 == null){
throw (new ArgumentError("Argument may not be null.\nParameter name: missGrade"));
};
_local6 = ((_arg1 <= 0)) ? 0 : int(_arg1);
if (_local6 >= this._objChart.Measures.length){
return;
};
_local7 = false;
_local8 = KeyState.ACTIVE.equals(_arg3);
_local10 = true;
for each (_local9 in _arg2) {
if (!KeyState.OFF.equals(_local9)){
_local10 = false;
if (KeyState.ACTIVE.equals(_local9)){
_local7 = true;
};
};
};
if (_local10){
if (_local8){
this.dispatchEvent(new ChartEvent(ChartEvent.NOTE_PRESSED_NOAVAILABLE));
};
return;
};
_local12 = ((_local6 == 0)) ? 0 : (_local6 - 1);
_local14 = Number.POSITIVE_INFINITY;
_local15 = null;
_local11 = _local12;
while (_local11 < (_local6 + 1)) {
for each (_local16 in this._objChart.Measures[_local11].Rows) {
if (this.isValidRow(_local16, _arg2)){
_local13 = ((_local11 + _local16.MeasurePart) - _arg1);
if ((((Math.abs(_local13) < Math.abs(_local14))) && (_arg5.isWithin(_local13)))){
_local15 = _local16;
_local14 = _local13;
};
};
};
_local11++;
};
_local10 = false;
if (_local15 != null){
_local17 = 0;
_local20 = false;
_local21 = false;
_local22 = ((!(this._blnUseStrum)) || (((((KeyState.OFF.equals(_arg3)) && (_local15.PermitFlow))) && (_arg4))));
_local11 = 0;
while (_local11 < _local15.Notes.length) {
_local23 = KeyState.OFF.equals(_arg2[_local11]);
if (!_local23){
_local19 = _local11;
};
if (_local15.Notes[_local11].IsValidForDisplay){
if (_local23){
_local21 = true;
} else {
if (KeyState.ACTIVE.equals(_arg2[_local11])){
_local20 = true;
};
};
_local17++;
_local18 = _local11;
};
_local11++;
};
if (((_local21) || (!(_local20)))){
_local22 = false;
};
if (((_local22) || (_local8))){
if (_local19 > _local18){
_local10 = true;
} else {
if (_local17 == 1){
(_local15.Notes[_local18] as INote).setPlayedState(true);
this.dispatchEvent(new ChartEvent(ChartEvent.NOTE_HIT, _local15.Notes[_local18], _local18, _local14));
} else {
_local24 = true;
_local11 = 0;
while (_local11 < _local15.Notes.length) {
if (_local15.Notes[_local11].IsValidForDisplay){
if (KeyState.OFF.equals(_arg2[_local11])){
_local24 = false;
};
} else {
if (!KeyState.OFF.equals(_arg2[_local11])){
_local24 = false;
};
};
_local11++;
};
if (_local24){
_local11 = 0;
while (_local11 < _local15.Notes.length) {
if (_local15.Notes[_local11].IsValidForDisplay){
(_local15.Notes[_local11] as INote).setPlayedState(true);
this.dispatchEvent(new ChartEvent(ChartEvent.NOTE_HIT, _local15.Notes[_local11], _local11, _local14));
};
_local11++;
};
} else {
_local10 = true;
};
};
};
};
} else {
if (((((this._blnUseStrum) && (_local8))) || (((!(this._blnUseStrum)) && (_local7))))){
_local10 = true;
};
};
if (((_local10) && (((_local7) || (_local8))))){
this.dispatchEvent(new ChartEvent(ChartEvent.NOTE_PRESSED_NOAVAILABLE));
};
}
public function render(_arg1:DisplayObjectContainer, _arg2:Number, _arg3:int, _arg4:Number):Boolean{
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Number;
var _local9:Number;
var _local10:int;
var _local11:IMeasureRow;
var _local12:INote;
_local5 = ((_arg3 <= 0)) ? 0 : (_arg3 - 1);
if (_local5 < this._objChart.Measures.length){
_local6 = (_arg3 + this._intVisibleMeasures);
if (_local6 > this._objChart.Measures.length){
_local6 = this._objChart.Measures.length;
};
_local10 = _local5;
while (_local10 < _local6) {
for each (_local11 in (this._objChart.Measures[_local10] as IMeasure).Rows.reverse()) {
_local7 = 0;
for each (_local12 in _local11.Notes) {
_local8 = ((this._objChart.Measures[_local10] as IMeasure).MeasureNumber + _local11.MeasurePart);
_local9 = (_local8 - (_arg3 + _arg4));
this.updateNote(_arg1, _local12, _local7, _arg2, _local9);
_local7++;
};
};
_local10++;
};
return (true);
};
return (false);
}
public function set IsStarPowerActive(_arg1:Boolean){
this._blnIsStarPowerActive = _arg1;
}
private function updateNote(_arg1:DisplayObjectContainer, _arg2:INote, _arg3:int, _arg4:Number, _arg5:Number){
var _local6:Number;
var _local7:*;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
if ((_arg2 as MovieClip).stage != null){
_local6 = (1 - _arg5);
_local7 = (((_local6 > 1)) && (!(this._objMissGrade.isWithin(_arg5))));
_local8 = 600;
_local9 = 368;
_local10 = -3;
_local11 = -70;
_arg2.Position3d.z = (-(_local6) * _local9);
_local12 = ((_local8 * 0.15) / (_local8 + _arg2.Position3d.z));
(_arg2 as MovieClip).x = ((_arg2.Position3d.x * _local12) + _local10);
(_arg2 as MovieClip).y = ((_arg2.Position3d.y * _local12) + _local11);
(_arg2 as MovieClip).scaleX = ((_arg2 as MovieClip).scaleY = (_local12 * 0.9));
(_arg2 as MovieClip).visible = (((_local6 > 0)) && (!(_local7)));
if (_local7){
_arg2.setPlayedState(true);
trace(((("Note on index " + _arg3) + " REMOVED: ") + _arg2.Position3d.toString()));
this.dispatchEvent(new ChartEvent(ChartEvent.NOTE_MISSED));
};
if (_arg2.IsPlayed){
this._arrNotesOnStage.splice(this._arrNotesOnStage.indexOf(_arg2), 1);
_arg1.removeChild((_arg2 as MovieClip));
};
(_arg2 as GH3Note).StarPowerGlow = this._blnIsStarPowerActive;
} else {
if (_arg2.IsValidForDisplay){
_arg2.Position3d.x = (((_arg3 - this._intNoteCorrectionOffset) * (160 / this._objChart.NotesPerRow)) / 0.3);
_arg2.Position3d.y = 500;
(_arg2 as MovieClip).visible = false;
this._arrNotesOnStage.push(_arg2);
_arg1.addChild((_arg2 as MovieClip));
};
};
}
public function clearNotesFromContainer(_arg1:DisplayObjectContainer){
var _local2:INote;
var _local3:int;
var _local4:int;
_local4 = 0;
while (_local4 < this._arrNotesOnStage.length) {
_local2 = this._arrNotesOnStage.pop();
_local3 = _arg1.getChildIndex((_local2 as MovieClip));
if (_local3 >= 0){
_arg1.removeChildAt(_local3);
};
_local4++;
};
}
}
}//package se.rocketxl.gaming.musicgames.charting
Section 46
//GameDifficulty (se.rocketxl.gaming.musicgames.charting.GameDifficulty)
package se.rocketxl.gaming.musicgames.charting {
import se.rocketxl.*;
public class GameDifficulty implements IEnum {
private var value:String;
public static const EASY:GameDifficulty = new GameDifficulty("easy");
;
public static const NORMAL:GameDifficulty = new GameDifficulty("normal");
;
public static const EXPERT:GameDifficulty = new GameDifficulty("expert");
;
public static const HARD:GameDifficulty = new GameDifficulty("hard");
;
public function GameDifficulty(_arg1:String){
this.value = _arg1;
}
public function equals(_arg1:Object):Boolean{
if ((_arg1 is GameDifficulty)){
return (((_arg1 == null)) ? false : (_arg1.value == this.value));
//unresolved jump
};
return (false);
}
public function toString():String{
return (this.value);
}
}
}//package se.rocketxl.gaming.musicgames.charting
Section 47
//GameMode (se.rocketxl.gaming.musicgames.charting.GameMode)
package se.rocketxl.gaming.musicgames.charting {
import se.rocketxl.*;
public class GameMode implements IEnum {
private var value:String;
public static const GUITAR:GameMode = new GameMode("guitar");
;
public static const DRUMS:GameMode = new GameMode("drums");
;
public static const BASS:GameMode = new GameMode("bass");
;
public function GameMode(_arg1:String){
this.value = _arg1;
}
public function equals(_arg1:Object):Boolean{
if ((_arg1 is GameMode)){
return (((_arg1 == null)) ? false : (_arg1.value == this.value));
//unresolved jump
};
return (false);
}
public function toString():String{
return (this.value);
}
}
}//package se.rocketxl.gaming.musicgames.charting
Section 48
//NoteType (se.rocketxl.gaming.musicgames.charting.NoteType)
package se.rocketxl.gaming.musicgames.charting {
import se.rocketxl.*;
public class NoteType implements IEnum {
private var value:String;
public static const STRUM:NoteType = new NoteType("1");
;
public static const HOLDSTRUM:NoteType = new NoteType("2");
;
public static const HOLDEND:NoteType = new NoteType("3");
;
public static const EMPTY:NoteType = new NoteType("0");
;
public function NoteType(_arg1:String){
this.value = _arg1;
}
public function equals(_arg1:Object):Boolean{
return (((((!(_arg1) is NoteType)) || ((_arg1 == null)))) ? false : (_arg1.value == this.value));
}
public function toString():String{
return (this.value);
}
public static function getType(_arg1:String):NoteType{
switch (_arg1){
case EMPTY.value:
return (EMPTY);
case STRUM.value:
return (STRUM);
case HOLDEND.value:
return (HOLDEND);
case HOLDSTRUM.value:
return (HOLDSTRUM);
};
return (null);
}
}
}//package se.rocketxl.gaming.musicgames.charting
Section 49
//TimingData (se.rocketxl.gaming.musicgames.charting.TimingData)
package se.rocketxl.gaming.musicgames.charting {
public class TimingData {
private var _arrStopSegments:Array;
private var _arrBpmSegments:Array;
public function TimingData():void{
this._arrBpmSegments = new Array();
this._arrStopSegments = new Array();
}
public function GetBeatFromElapsedTime(_arg1:Number){
var _local2:int;
var _local3:Number;
var _local4:Boolean;
var _local5:Boolean;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local2 = 0;
while (_local2 < this._arrBpmSegments.length) {
_local3 = this._arrBpmSegments[_local2].StartBeat;
_local4 = (_local2 == 0);
_local5 = (_local2 == (this._arrBpmSegments.length - 1));
_local6 = (_local5) ? 40000 : this._arrBpmSegments[(_local2 + 1)].StartBeat;
_local7 = (this._arrBpmSegments[_local2].Bpm / 60);
_local8 = (_local6 - _local3);
_local9 = (_local8 / _local7);
if (((_local5) || ((_arg1 <= _local9)))){
return (((_local3 + (_arg1 * _local7)) / 4));
};
_arg1 = (_arg1 - _local9);
_local2++;
};
}
public function SetBPMAtBeat(_arg1:Number, _arg2:Number):void{
var _local3:int;
_local3 = 0;
while (_local3 < _arrBpmSegments.length) {
if (_arrBpmSegments[_local3].StartBeat == _arg1){
break;
};
_local3++;
};
if (_local3 == _arrBpmSegments.length){
this._arrBpmSegments.push(new BpmSegment(_arg1, _arg2));
} else {
_arrBpmSegments[_local3].Bpm = _arg2;
};
this._arrBpmSegments.sortOn("StartBeat", Array.NUMERIC);
}
public function HasBpmChangesOrStops():Boolean{
return ((((this._arrBpmSegments.length > 1)) || ((this._arrStopSegments.length > 0))));
}
public function GetBPMAtBeat(_arg1:Number):Number{
var _local2:int;
_local2 = 0;
while (_local2 < (_arrBpmSegments.length - 1)) {
if (_arrBpmSegments[(_local2 + 1)].StartBeat > _arg1){
break;
};
_local2++;
};
return ((_arrBpmSegments[_local2] as BpmSegment).Bpm);
}
public function GetBPMSegmentAtBeat(_arg1:Number):BpmSegment{
var _local2:int;
_local2 = 0;
while (_local2 < (_arrBpmSegments.length - 1)) {
if (_arrBpmSegments[(_local2 + 1)].StartBeat > _arg1){
break;
};
_local2++;
};
return (_arrBpmSegments[_local2]);
}
public function GetActualBPM(_arg1:Number, _arg2:Number):void{
var _local3:BpmSegment;
_arg2 = 0;
_arg1 = Number.POSITIVE_INFINITY;
for each (_local3 in this._arrBpmSegments) {
_arg2 = Math.max(_local3.Bpm, _arg2);
_arg1 = Math.min(_local3.Bpm, _arg1);
};
}
}
}//package se.rocketxl.gaming.musicgames.charting
Section 50
//ChartEvent (se.rocketxl.gaming.musicgames.events.ChartEvent)
package se.rocketxl.gaming.musicgames.events {
import se.rocketxl.gaming.musicgames.charting.interfaces.*;
import flash.events.*;
public class ChartEvent extends Event {
private var _numNoteOffset:Number;
private var _objRelevantNote:INote;
private var _intNoteIndex:int;
public static const NOTE_ADDED = "chartNoteAdded";
public static const NOTE_HIT = "chartNoteHit";
public static const NOTE_MISSED = "chartNoteMissed";
public static const NOTE_REMOVED = "chartNoteRemoved";
public static const NOTE_PRESSED_NOAVAILABLE = "chartNotePressedNoAvailable";
public function ChartEvent(_arg1:String, _arg2:INote=null, _arg3:int=-1, _arg4:Number=NaN){
super(_arg1);
this._objRelevantNote = _arg2;
this._intNoteIndex = _arg3;
this._numNoteOffset = _arg4;
}
public function get RelevantNoteOffset():Number{
return (this._numNoteOffset);
}
public function get RelevantNoteIndex():int{
return (this._intNoteIndex);
}
public function get RelevantNote():INote{
return (this._objRelevantNote);
}
}
}//package se.rocketxl.gaming.musicgames.events
Section 51
//StarPowerEvent (se.rocketxl.gaming.musicgames.events.StarPowerEvent)
package se.rocketxl.gaming.musicgames.events {
import flash.events.*;
public class StarPowerEvent extends Event {
public static const INCREASED = "starPowerIncreased";
public static const DEPLOYED = "starPowerDeployed";
public static const AVAILABLE = "starPowerAvailable";
public static const DEPLETED = "starPowerDepleted";
public function StarPowerEvent(_arg1:String){
super(_arg1);
}
}
}//package se.rocketxl.gaming.musicgames.events
Section 52
//GH3Grade (se.rocketxl.gaming.musicgames.GH3Grade)
package se.rocketxl.gaming.musicgames {
public class GH3Grade implements IGrade {
private var _numHealthDelta:Number;
private var _numWindow:Number;
private var _strName:String;
public function GH3Grade(_arg1:String, _arg2:Number, _arg3:Number){
this._numWindow = Math.abs(_arg2);
this._strName = _arg1;
this._numHealthDelta = _arg3;
}
public function isWithin(_arg1:Number):Boolean{
return ((Math.abs(_arg1) < this._numWindow));
}
public function get Name():String{
return (this._strName);
}
public function toString():String{
return (((this.Name + ": ") + this._numWindow));
}
public function get Window():Number{
return (this._numWindow);
}
public function isGradeWithin(_arg1:IGrade):Boolean{
if ((_arg1 is GH3Grade)){
return (this.isWithin((_arg1 as GH3Grade)._numWindow));
};
throw (new ArgumentError("Argument has to be of type GH3Grade.\nParameter name: grade"));
}
public function get HealthDelta():Number{
return (this._numHealthDelta);
}
public function isBetween(_arg1:Number, _arg2:IGrade):Boolean{
if (this.Window == _arg2.Window){
return ((_arg1 == this.Window));
};
trace((((((_arg1 + " vs grade(") + this.Window) + ") and otherGrade(") + _arg2.Window) + ")"));
return (((this.Window < _arg2.Window)) ? ((!(this.isWithin(_arg1))) && (_arg2.isWithin(_arg1))) : ((this.isWithin(_arg1)) && (!(_arg2.isWithin(_arg1)))));
}
}
}//package se.rocketxl.gaming.musicgames
Section 53
//GH3Score (se.rocketxl.gaming.musicgames.GH3Score)
package se.rocketxl.gaming.musicgames {
import flash.utils.*;
import se.rocketxl.gaming.musicgames.charting.interfaces.*;
import flash.events.*;
import se.rocketxl.gaming.musicgames.charting.providers.gh3.*;
import se.rocketxl.gaming.musicgames.events.*;
public class GH3Score extends EventDispatcher implements IScore {
private var _intMoneyScoreMultiplierMax:Number;// = 4
private var _intMoneyScore:Number;// = 0
private var _blnIsStarPowerActive:Boolean;// = false
private var _numStarPowerPercentage:Number;// = 0
private var _blnStarPowerActivenessHasBeenInformed;// = false
private var _blnHasStarCombo:Boolean;// = false
private var _tmrStarPowerTimer:Timer;
private var _numPercentage:Number;// = 0
private var _numCurrentStarPowerDecreaser:Number;// = 0
private var _intComboAtStarComboStart:int;// = 0
private var _dtnGradeCounts:Dictionary;
private var _intMaxCombo:int;// = 0
private var _intNotesHit:int;// = 0
private var _intMoneyScoreMultiplier:Number;// = 1
private var _intCurrentCombo:int;// = 0
private var _intNoteCount;// = 0
private var _numHealthPercentage:Number;// = 0.5
private var _arrReceivedGrades:Array;
private static var _arrGrades:Array = [new GH3Grade("Best", (40 / 1000), 0.04), new GH3Grade("MISS", (200 / 1000), -0.05)];
public function GH3Score(_arg1:int):void{
var _local2:GH3Grade;
_intNoteCount = 0;
_numPercentage = 0;
_intMoneyScore = 0;
_intMoneyScoreMultiplier = 1;
_intMoneyScoreMultiplierMax = 4;
_intCurrentCombo = 0;
_intMaxCombo = 0;
_intNotesHit = 0;
_numStarPowerPercentage = 0;
_blnIsStarPowerActive = false;
_blnHasStarCombo = false;
_numHealthPercentage = 0.5;
_numCurrentStarPowerDecreaser = 0;
_intComboAtStarComboStart = 0;
_blnStarPowerActivenessHasBeenInformed = false;
super();
this._intNoteCount = _arg1;
this._arrReceivedGrades = new Array();
this._dtnGradeCounts = new Dictionary();
for each (_local2 in GH3Score._arrGrades) {
this.GradeCounts[_local2] = 0;
};
}
private function iterateDecreaseStarPower(_arg1:TimerEvent){
if (this._blnIsStarPowerActive){
this._numStarPowerPercentage = (this._numStarPowerPercentage - this._numCurrentStarPowerDecreaser);
};
}
public function get IsStarPowerActive():Boolean{
return (this._blnIsStarPowerActive);
}
private function append(_arg1:GH3Grade, _arg2:GH3Note=null):void{
var _local3:*;
if (_arg1 == null){
throw (new ArgumentError("Argument may not be null.\nParameter name: grade"));
};
this._arrReceivedGrades.push(_arg1);
var _local4 = this._dtnGradeCounts;
var _local5 = _arg1;
var _local6 = (_local4[_local5] + 1);
_local4[_local5] = _local6;
this._numHealthPercentage = (this._numHealthPercentage + _arg1.HealthDelta);
if (this._numHealthPercentage < 0){
this._numHealthPercentage = 0;
} else {
if (this._numHealthPercentage > 1){
this._numHealthPercentage = 1;
};
};
if (GH3Score.MissGrade != _arg1){
this._intCurrentCombo++;
if (((((this._intCurrentCombo % 10) == 0)) && ((this._intMoneyScoreMultiplier < this._intMoneyScoreMultiplierMax)))){
this._intMoneyScoreMultiplier++;
};
this._intMoneyScore = (this._intMoneyScore + (50 * this.MoneyScoreMultiplier));
this._intNotesHit++;
if (_arg2 != null){
if (_arg2.IsStarStart){
this._blnHasStarCombo = true;
this._intComboAtStarComboStart = this.CurrentCombo;
trace("Star combo started!");
};
if (((_arg2.IsStarEnd) && (this._blnHasStarCombo))){
trace("Star power gained!");
this._blnHasStarCombo = false;
_local3 = ((this.CurrentCombo - this._intComboAtStarComboStart) + 1);
if (_local3 < 10){
this._numStarPowerPercentage = (this._numStarPowerPercentage + (1 / 4));
} else {
if (_local3 < 20){
this._numStarPowerPercentage = (this._numStarPowerPercentage + (1 / 3));
} else {
this._numStarPowerPercentage = (this._numStarPowerPercentage + (1 / 2));
};
};
if (((this.IsStarPowerAllowed) && (!(this._blnStarPowerActivenessHasBeenInformed)))){
this._blnStarPowerActivenessHasBeenInformed = true;
this.dispatchEvent(new StarPowerEvent(StarPowerEvent.AVAILABLE));
};
};
};
} else {
if (this._intCurrentCombo > this._intMaxCombo){
this._intMaxCombo = this._intCurrentCombo;
};
this._intCurrentCombo = 0;
this._intMoneyScoreMultiplier = 1;
if (this._blnHasStarCombo){
trace("Star combo lost!");
};
this._blnHasStarCombo = false;
};
this._numPercentage = (this._intNotesHit / this.NoteCount);
}
public function get NoteCount():int{
return (this._intNoteCount);
}
public function tryActivateStarPower(_arg1:Number=20):Boolean{
var _local2:int;
if ((((this._numStarPowerPercentage > 0.33)) && (!(this._blnIsStarPowerActive)))){
this._blnStarPowerActivenessHasBeenInformed = false;
this._blnIsStarPowerActive = true;
_local2 = 10;
this._numCurrentStarPowerDecreaser = (((this._numStarPowerPercentage * _arg1) * 1000) / _local2);
if (this._numCurrentStarPowerDecreaser <= 0){
this._numCurrentStarPowerDecreaser = 1;
};
this._tmrStarPowerTimer = new Timer(_local2, this._numCurrentStarPowerDecreaser);
this._numCurrentStarPowerDecreaser = (this._numStarPowerPercentage / this._numCurrentStarPowerDecreaser);
this._tmrStarPowerTimer.addEventListener(TimerEvent.TIMER, this.iterateDecreaseStarPower);
this._tmrStarPowerTimer.addEventListener(TimerEvent.TIMER_COMPLETE, this.starPowerDepleted);
this._tmrStarPowerTimer.start();
this.dispatchEvent(new StarPowerEvent(StarPowerEvent.DEPLOYED));
return (true);
//unresolved jump
};
return (false);
}
public function get MaxCombo():int{
return (this._intMaxCombo);
}
public function get StarPowerPercentage():Number{
return (this._numStarPowerPercentage);
}
public function get MoneyScoreMultiplier():Number{
return ((this.IsStarPowerActive) ? (this._intMoneyScoreMultiplier * 2) : this._intMoneyScoreMultiplier);
}
public function get CurrentCombo():int{
return (this._intCurrentCombo);
}
public function get HealthPercentage():Number{
return (this._numHealthPercentage);
}
private function starPowerDepleted(_arg1:TimerEvent){
this._numStarPowerPercentage = 0;
this._blnIsStarPowerActive = false;
this._tmrStarPowerTimer.removeEventListener(TimerEvent.TIMER, this.iterateDecreaseStarPower);
this._tmrStarPowerTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, this.starPowerDepleted);
this.dispatchEvent(new StarPowerEvent(StarPowerEvent.DEPLETED));
}
public function get IsStarPowerAllowed():Boolean{
return ((this._numStarPowerPercentage >= 0.5));
}
public function addNoteOffset(_arg1:Number, _arg2:INote=null):IGrade{
var _local3:GH3Grade;
_local3 = GH3Score.determine(_arg1);
this.addNoteGrade(_local3, _arg2);
return (_local3);
}
public function get Percentage():Number{
return (_numPercentage);
}
public function get MoneyScore():Number{
return (this._intMoneyScore);
}
public function get GradeCounts():Dictionary{
return (_dtnGradeCounts);
}
public function addNoteGrade(_arg1:IGrade, _arg2:INote=null):void{
if (!(_arg1 is GH3Grade)){
throw (new ArgumentError("Argument has to be of type GH3Grade.\nParameter name: grade"));
};
if (((!((_arg2 == null))) && (!((_arg2 is GH3Note))))){
throw (new ArgumentError("Argument has to be of type GH3Note.\nParameter name: note"));
};
this.append((_arg1 as GH3Grade), (_arg2 as GH3Note));
}
override public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + ("\nScore: " + this.MoneyScore));
_local1 = (_local1 + ("\nPercentage: " + Math.round((this.Percentage * 100))));
_local1 = (_local1 + ("\nLongest note streak: " + this.MaxCombo));
return (_local1);
}
public function get MaxMoneyScoreMultiplier():Number{
return (this._intMoneyScoreMultiplierMax);
}
public static function get HitGrade():GH3Grade{
return (_arrGrades[(_arrGrades.length - 2)]);
}
public static function get MissGrade():GH3Grade{
return (_arrGrades[(_arrGrades.length - 1)]);
}
public static function determine(_arg1:Number):GH3Grade{
var _local2:Number;
var _local3:GH3Grade;
var _local4:Number;
var _local5:Number;
var _local6:GH3Grade;
if (_arrGrades.length > 0){
_local5 = Math.abs(_arg1);
for each (_local6 in _arrGrades) {
_local2 = (_local6.Window - _local5);
if (((isNaN(_local4)) || ((_local2 < _local4)))){
_local4 = _local2;
_local3 = _local6;
};
};
return (_local3);
//unresolved jump
};
throw (new Error("No grades exists to be compared with!"));
}
}
}//package se.rocketxl.gaming.musicgames
Section 54
//IGrade (se.rocketxl.gaming.musicgames.IGrade)
package se.rocketxl.gaming.musicgames {
public interface IGrade {
function get Window():Number;
function isWithin(_arg1:Number):Boolean;
function isGradeWithin(_arg1:IGrade):Boolean;
function isBetween(_arg1:Number, _arg2:IGrade):Boolean;
}
}//package se.rocketxl.gaming.musicgames
Section 55
//IScore (se.rocketxl.gaming.musicgames.IScore)
package se.rocketxl.gaming.musicgames {
import flash.utils.*;
import se.rocketxl.gaming.musicgames.charting.interfaces.*;
import flash.events.*;
public interface IScore extends IEventDispatcher {
function addNoteGrade(_arg1:IGrade, _arg2:INote=null):void;
function get MaxCombo():int;
function toString():String;
function get MoneyScore():Number;
function get MoneyScoreMultiplier():Number;
function get CurrentCombo():int;
function get HealthPercentage():Number;
function get MaxMoneyScoreMultiplier():Number;
function get Percentage():Number;
function get GradeCounts():Dictionary;
function get NoteCount():int;
function addNoteOffset(_arg1:Number, _arg2:INote=null):IGrade;
}
}//package se.rocketxl.gaming.musicgames
Section 56
//Path (se.rocketxl.io.Path)
package se.rocketxl.io {
public class Path {
private static const frontslash = "/";
private static const backslash = "\";
private static function getLastSlashIndex(_arg1:String):int{
return (Math.max(_arg1.lastIndexOf(frontslash), _arg1.lastIndexOf(backslash)));
}
public static function getDirectory(_arg1:String, _arg2:Boolean=true):String{
return (_arg1.substring(0, (getLastSlashIndex(_arg1) + (_arg2) ? 1 : 0)));
}
public static function getFileName(_arg1:String):String{
return (_arg1.substr((getLastSlashIndex(_arg1) + 1)));
}
}
}//package se.rocketxl.io
Section 57
//Vector3d (se.rocketxl.math.algebra.Vector3d)
package se.rocketxl.math.algebra {
public class Vector3d {
public var x:Number;
public var y:Number;
public var z:Number;
public static const NegativeUnitY:Vector3d = new Vector3d(0, -1, 0);
;
public static const PositiveInfinity:Vector3d = new Vector3d(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY);
;
public static const NegativeInfinity:Vector3d = new Vector3d(Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);
;
public static const UnitZ:Vector3d = new Vector3d(0, 0, 1);
;
public static const ZeroVector:Vector3d = new Vector3d(0, 0, 0);
;
public static const UnitVector:Vector3d = new Vector3d(1, 1, 1);
;
public static const NegativeUnitZ:Vector3d = new Vector3d(0, 0, -1);
;
public static const UnitX:Vector3d = new Vector3d(1, 0, 0);
;
public static const UnitY:Vector3d = new Vector3d(0, 1, 0);
;
public static const NaN:Vector3d = new Vector3d(Number.NaN, Number.NaN, Number.NaN);
;
public static const NegativeUnitX:Vector3d = new Vector3d(-1, 0, 0);
;
public function Vector3d(... _args){
if (_args.length > 3){
throw (new ArgumentError("Too many coordinates passed as parameters, max 3 is permitted"));
};
this.x = ((_args.length > 0)) ? _args[0] : 0;
this.y = ((_args.length > 1)) ? _args[1] : this.x;
this.z = ((_args.length > 2)) ? _args[2] : this.y;
}
public function toString():String{
return ((((((("(" + this.x) + ", ") + this.y) + ", ") + this.z) + ")"));
}
public function Offset(_arg1:Number, _arg2:Number, _arg3:Number):Vector3d{
return (new Vector3d((this.x + _arg1), (this.y + _arg2), (this.z + _arg3)));
}
public function Multiply(_arg1:Vector3d):Vector3d{
return (VectorCalculator.Multiply(this, _arg1));
}
public function get Length():Number{
return (Math.sqrt(this.LengthSquared));
}
public function Add(_arg1:Vector3d):Vector3d{
return (VectorCalculator.Add(this, _arg1));
}
public function Perpendicular():Vector3d{
var _local1:Vector3d;
_local1 = this.Cross(Vector3d.UnitX);
if (_local1.LengthSquared < VectorCalculator.Epsilon){
_local1 = this.Cross(Vector3d.UnitY);
};
return (_local1);
}
public function IsLessThan(_arg1:Vector3d):Boolean{
return (VectorCalculator.IsLessThan(this, _arg1));
}
public function Floor(_arg1:Vector3d):void{
if (_arg1.x < x){
x = _arg1.x;
};
if (_arg1.y < y){
y = _arg1.y;
};
if (_arg1.z < z){
z = _arg1.z;
};
}
public function get LengthSquared():Number{
return ((((this.x * this.x) + (this.y * this.y)) + (this.z * this.z)));
}
public function IsGreaterThan(_arg1:Vector3d):Boolean{
return (VectorCalculator.IsGreaterThan(this, _arg1));
}
public function get IsZero():Boolean{
return ((((((this.x == 0)) && ((this.y == 0)))) && ((this.z == 0))));
}
public function At(_arg1:int){
switch (_arg1){
case 0:
return (this.x);
case 1:
return (this.y);
case 2:
return (this.z);
default:
throw (new ArgumentError("Indexer boundaries overrun in Vector3, index must be from 0 to 2"));
};
}
public function ToNormalized():Vector3d{
var _local1:Vector3d;
_local1 = this;
_local1.Normalize();
return (_local1);
}
public function SetAt(_arg1:int, _arg2:Number){
switch (_arg1){
case 0:
this.x = _arg2;
break;
case 1:
this.y = _arg2;
break;
case 2:
this.z = _arg2;
break;
default:
throw (new ArgumentError("Indexer boundaries overrun in Vector3, index must be from 0 to 2"));
};
}
public function ScalarMultiply(_arg1:Number):Vector3d{
return (VectorCalculator.ScalarMultiply(this, _arg1));
}
public function Divide(_arg1:Vector3d):Vector3d{
return (VectorCalculator.Divide(this, _arg1));
}
public function IsAnyComponentLessThan(_arg1:Vector3d):Boolean{
return ((((((this.x < _arg1.x)) || ((this.y < _arg1.y)))) || ((this.z < _arg1.z))));
}
public function Reflect(_arg1:Vector3d):Vector3d{
return (this.Subtract(_arg1.ScalarMultiply((2 * this.Dot(_arg1)))));
}
public function IsAnyComponentLessThanOrEqualTo(_arg1:Vector3d):Boolean{
return ((((((this.x <= _arg1.x)) || ((this.y <= _arg1.y)))) || ((this.z <= _arg1.z))));
}
public function Equals(_arg1:Vector3d):Boolean{
return (VectorCalculator.Equals(this, _arg1));
}
public function IsAnyComponentGreaterThan(_arg1:Vector3d):Boolean{
return ((((((this.x > _arg1.x)) || ((this.y > _arg1.y)))) || ((this.z > _arg1.z))));
}
public function NotEquals(_arg1:Vector3d):Boolean{
return (VectorCalculator.NotEquals(this, _arg1));
}
public function Negate():Vector3d{
return (VectorCalculator.Negate(this));
}
public function ScalarDivide(_arg1:Number):Vector3d{
return (VectorCalculator.ScalarDivide(this, _arg1));
}
public function Cross(_arg1:Vector3d):Vector3d{
return (new Vector3d(((this.y * _arg1.z) - (this.z * _arg1.y)), ((this.z * _arg1.x) - (this.x * _arg1.z)), ((this.x * _arg1.y) - (this.y * _arg1.x))));
}
public function Dot(_arg1:Vector3d):Number{
return ((((this.x * _arg1.x) + (this.y * _arg1.y)) + (this.z * _arg1.z)));
}
public function MidPoint(_arg1:Vector3d):Vector3d{
return (new Vector3d(((this.x + _arg1.x) / 2), ((this.y + _arg1.y) / 2), ((this.z + _arg1.z) / 2)));
}
public function IsAnyComponentGreaterThanOrEqualTo(_arg1:Vector3d):Boolean{
return ((((((this.x >= _arg1.x)) || ((this.y >= _arg1.y)))) || ((this.z >= _arg1.z))));
}
public function Normalize():Number{
var _local1:Number;
var _local2:Number;
_local1 = this.Length;
if (_local1 > VectorCalculator.Epsilon){
_local2 = (1 / _local1);
this.x = (this.x * _local2);
this.y = (this.y * _local2);
this.z = (this.z * _local2);
};
return (_local1);
}
public function Subtract(_arg1:Vector3d):Vector3d{
return (VectorCalculator.Subtract(this, _arg1));
}
public function Ceil(_arg1:Vector3d):void{
if (_arg1.x > x){
x = _arg1.x;
};
if (_arg1.y > y){
y = _arg1.y;
};
if (_arg1.z > z){
z = _arg1.z;
};
}
public function ToArray():Array{
return ([this.x, this.y, this.z]);
}
}
}//package se.rocketxl.math.algebra
Section 58
//VectorCalculator (se.rocketxl.math.algebra.VectorCalculator)
package se.rocketxl.math.algebra {
public class VectorCalculator {
public static const Epsilon:Number = 0.005;
public static function Add(_arg1:Vector3d, _arg2:Vector3d):Vector3d{
return (new Vector3d((_arg1.x + _arg2.x), (_arg1.y + _arg2.y), (_arg1.z + _arg2.z)));
}
public static function Multiply(_arg1:Vector3d, _arg2:Vector3d):Vector3d{
return (new Vector3d((_arg1.x * _arg2.x), (_arg1.y * _arg2.y), (_arg1.z * _arg2.z)));
}
public static function ScalarDivide(_arg1:Vector3d, _arg2:Number):Vector3d{
var _local3:Vector3d;
var _local4:Number;
_local3 = new Vector3d();
_local4 = (1 / _arg2);
_local3.x = (_arg1.x * _local4);
_local3.y = (_arg1.y * _local4);
_local3.z = (_arg1.z * _local4);
return (_local3);
}
public static function Negate(_arg1:Vector3d):Vector3d{
return (new Vector3d(-(_arg1.x), -(_arg1.y), -(_arg1.z)));
}
public static function IsLessThan(_arg1:Vector3d, _arg2:Vector3d):Boolean{
return ((((((_arg1.x < _arg2.x)) && ((_arg1.y < _arg2.y)))) && ((_arg1.z < _arg2.z))));
}
public static function ScalarMultiply(_arg1:Vector3d, _arg2:Number):Vector3d{
return (new Vector3d((_arg1.x * _arg2), (_arg1.y * _arg2), (_arg1.z * _arg2)));
}
public static function IsGreaterThan(_arg1:Vector3d, _arg2:Vector3d):Boolean{
return ((((((_arg1.x > _arg2.x)) && ((_arg1.y > _arg2.y)))) && ((_arg1.z > _arg2.z))));
}
public static function NotEquals(_arg1:Vector3d, _arg2:Vector3d):Boolean{
return (((((!((_arg1.x == _arg2.x))) || (!((_arg1.y == _arg2.y))))) || (!((_arg1.z == _arg2.z)))));
}
public static function IsPointInTriangle(_arg1:Vector3d, _arg2:Vector3d, _arg3:Vector3d, _arg4:Vector3d):Boolean{
var _local5:Vector3d;
var _local6:Vector3d;
var _local7:Vector3d;
var _local8:Number;
_local5 = _arg1.Subtract(_arg2);
_local6 = _arg1.Subtract(_arg3);
_local7 = _arg1.Subtract(_arg4);
_local5.Normalize();
_local6.Normalize();
_local7.Normalize();
_local8 = 0;
_local8 = (_local8 + Math.acos(_local5.Dot(_local6)));
_local8 = (_local8 + Math.acos(_local6.Dot(_local7)));
_local8 = (_local8 + Math.acos(_local7.Dot(_local5)));
if (Math.abs((_local8 - (2 * Math.PI))) <= VectorCalculator.Epsilon){
return (true);
};
return (false);
}
public static function Subtract(_arg1:Vector3d, _arg2:Vector3d):Vector3d{
return (new Vector3d((_arg1.x - _arg2.x), (_arg1.y - _arg2.y), (_arg1.z - _arg2.z)));
}
public static function Divide(_arg1:Vector3d, _arg2:Vector3d):Vector3d{
return (new Vector3d((_arg1.x / _arg2.x), (_arg1.y / _arg2.y), (_arg1.z / _arg2.z)));
}
public static function Equals(_arg1:Vector3d, _arg2:Vector3d):Boolean{
return ((((((_arg1.x == _arg2.x)) && ((_arg1.y == _arg2.y)))) && ((_arg1.z == _arg2.z))));
}
}
}//package se.rocketxl.math.algebra
Section 59
//ExtendedSound (se.rocketxl.media.ExtendedSound)
package se.rocketxl.media {
import flash.net.*;
import flash.events.*;
import flash.media.*;
public class ExtendedSound extends EventDispatcher {
private var _sndSound:Sound;
private var _blnIsLoaded:Boolean;
private var _numLastPosition:Number;
private var _objRequest:URLRequest;
private var _chnChannel:SoundChannel;
private var _blnIsPlaying:Boolean;
public function ExtendedSound(_arg1:String){
this._objRequest = new URLRequest(_arg1);
}
public function stop(){
this._numLastPosition = 0;
if (this._chnChannel != null){
this.Channel.stop();
this.Channel.removeEventListener(Event.SOUND_COMPLETE, this.onSoundComplete);
};
this._blnIsPlaying = false;
}
public function set Volume(_arg1:Number):void{
this.Channel.soundTransform = new SoundTransform(_arg1, this.Channel.soundTransform.pan);
}
public function get IsPlaying():Boolean{
return (this._blnIsPlaying);
}
public function set Pan(_arg1:Number):void{
this.Channel.soundTransform = new SoundTransform(this.Channel.soundTransform.volume, _arg1);
}
private function onSoundComplete(_arg1:Event){
this.dispatchEvent(new Event(Event.SOUND_COMPLETE));
}
public function get LengthMs():int{
return (this._sndSound.length);
}
public function get PositionMs():Number{
return (this.Channel.position);
}
private function onLoadProgress(_arg1:ProgressEvent){
this.dispatchEvent(new ProgressEvent(_arg1.type, _arg1.bubbles, _arg1.cancelable, _arg1.bytesLoaded, _arg1.bytesTotal));
}
private function onLoadComplete(_arg1:Event){
this._blnIsLoaded = true;
this.dispatchEvent(new Event(Event.COMPLETE));
}
public function play(_arg1:int=-1, _arg2:int=0){
if (!_blnIsLoaded){
throw (new Error("Can't play sound: Sound not loaded"));
};
this._chnChannel = this._sndSound.play(((_arg1 < 0)) ? this._numLastPosition : _arg1, _arg2, (this.IsPlaying) ? this.Channel.soundTransform : null);
this._chnChannel.addEventListener(Event.SOUND_COMPLETE, this.onSoundComplete);
if (this._chnChannel != null){
this._blnIsPlaying = true;
};
}
private function get Channel():SoundChannel{
if (this._chnChannel == null){
throw (new Error("Can't use channel: No channel in use, start playing the sound first.."));
};
return (this._chnChannel);
}
public function set PositionMs(_arg1:Number){
this.stop();
this.play(_arg1);
}
public function load(){
this._blnIsLoaded = false;
this._sndSound = new Sound();
this._sndSound.addEventListener(Event.COMPLETE, this.onLoadComplete);
this._sndSound.addEventListener(ProgressEvent.PROGRESS, this.onLoadProgress);
this._sndSound.load(this._objRequest);
}
public function get IsLoaded():Boolean{
return (this._blnIsLoaded);
}
public function pause(){
this.stop();
if (this._chnChannel != null){
this._numLastPosition = this.Channel.position;
};
}
public function close(){
this._sndSound.close();
}
public function get Volume():Number{
return (this.Channel.soundTransform.volume);
}
public function get Pan():Number{
return (this.Channel.soundTransform.pan);
}
}
}//package se.rocketxl.media
Section 60
//GroupLoader (se.rocketxl.net.GroupLoader)
package se.rocketxl.net {
import flash.utils.*;
import flash.events.*;
public class GroupLoader extends EventDispatcher {
private var _dtnLoaderEvents:Dictionary;
private var _dtnLoadingObjectStates:Dictionary;
public function GroupLoader(){
this._dtnLoadingObjectStates = new Dictionary();
this._dtnLoaderEvents = new Dictionary();
}
private function onLoaded(_arg1:Event):void{
var _local2:Boolean;
this._dtnLoadingObjectStates[_arg1.target] = true;
for each (_local2 in this._dtnLoadingObjectStates) {
if (!_local2){
return;
};
};
trace("done");
this.dispatchEvent(new Event(Event.COMPLETE));
}
private function onProgress(_arg1:ProgressEvent){
var _local2:Number;
var _local3:Number;
var _local4:ProgressEvent;
this._dtnLoaderEvents[_arg1.target] = _arg1;
_local2 = 0;
_local3 = 0;
for each (_local4 in this._dtnLoaderEvents) {
_local2 = (_local2 + _local4.bytesLoaded);
_local3 = (_local3 + _local4.bytesTotal);
};
this.dispatchEvent(new ProgressEvent(_arg1.type, _arg1.bubbles, _arg1.cancelable, _local2, _local3));
}
public function addLoadingObject(_arg1:Object){
if ((_arg1 is EventDispatcher)){
_dtnLoadingObjectStates[_arg1] = false;
(_arg1 as EventDispatcher).addEventListener(Event.COMPLETE, this.onLoaded);
(_arg1 as EventDispatcher).addEventListener(ProgressEvent.PROGRESS, this.onProgress);
} else {
throw (ArgumentError("Argument does not extend EventDispatcher.\nParameter name: obj"));
};
}
}
}//package se.rocketxl.net
Section 61
//SHA1 (se.rocketxl.security.cryptography.SHA1)
package se.rocketxl.security.cryptography {
public class SHA1 {
public static const HEX_FORMAT_LOWERCASE:uint = 0;
public static const BITS_PER_CHAR_ASCII:uint = 8;
public static const BASE64_PAD_CHARACTER_DEFAULT_COMPLIANCE:String = "";
public static const HEX_FORMAT_UPPERCASE:uint = 1;
public static const BITS_PER_CHAR_UNICODE:uint = 8;
public static const BASE64_PAD_CHARACTER_RFC_COMPLIANCE:String = "=";
public static var hexcase:uint = 0;
public static var chrsz:uint = 8;
public static var b64pad:String = "";
public static function binb2str(_arg1:Array):String{
var _local2:String;
var _local3:Number;
var _local4:Number;
_local2 = "";
_local3 = ((1 << chrsz) - 1);
_local4 = 0;
while (_local4 < (_arg1.length * 32)) {
_local2 = (_local2 + String.fromCharCode(((_arg1[(_local4 >> 5)] >>> ((32 - chrsz) - (_local4 % 32))) & _local3)));
_local4 = (_local4 + chrsz);
};
return (_local2);
}
public static function b64_sha1(_arg1:String):String{
return (binb2b64(core_sha1(str2binb(_arg1), (_arg1.length * chrsz))));
}
public static function sha1_ft(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < 20){
return (((_arg2 & _arg3) | (~(_arg2) & _arg4)));
};
if (_arg1 < 40){
return (((_arg2 ^ _arg3) ^ _arg4));
};
if (_arg1 < 60){
return ((((_arg2 & _arg3) | (_arg2 & _arg4)) | (_arg3 & _arg4)));
};
return (((_arg2 ^ _arg3) ^ _arg4));
}
public static function core_hmac_sha1(_arg1:String, _arg2:String):Array{
var _local3:Array;
var _local4:Array;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = str2binb(_arg1);
if (_local3.length > 16){
_local3 = core_sha1(_local3, (_arg1.length * chrsz));
};
_local4 = new Array(16);
_local5 = new Array(16);
_local6 = 0;
while (_local6 < 16) {
_local4[_local6] = (_local3[_local6] ^ 909522486);
_local5[_local6] = (_local3[_local6] ^ 1549556828);
_local6++;
};
_local7 = core_sha1(_local4.concat(str2binb(_arg2)), (0x0200 + (_arg2.length * chrsz)));
return (core_sha1(_local5.concat(_local7), (0x0200 + 160)));
}
public static function str_hmac_sha1(_arg1:String, _arg2:String):String{
return (binb2str(core_hmac_sha1(_arg1, _arg2)));
}
public static function str_sha1(_arg1:String):String{
return (binb2str(core_sha1(str2binb(_arg1), (_arg1.length * chrsz))));
}
public static function sha1_vm_test():Boolean{
return ((hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d"));
}
public static function binb2hex(_arg1:Array):String{
var _local2:String;
var _local3:String;
var _local4:Number;
_local2 = (hexcase) ? "0123456789ABCDEF" : "0123456789abcdef";
_local3 = "";
_local4 = 0;
while (_local4 < (_arg1.length * 4)) {
_local3 = (_local3 + (_local2.charAt(((_arg1[(_local4 >> 2)] >> (((3 - (_local4 % 4)) * 8) + 4)) & 15)) + _local2.charAt(((_arg1[(_local4 >> 2)] >> ((3 - (_local4 % 4)) * 8)) & 15))));
_local4++;
};
return (_local3);
}
public static function encrypt(_arg1:String):String{
return (hex_sha1(_arg1));
}
public static function rol(_arg1:Number, _arg2:Number):Number{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
public static function hex_sha1(_arg1:String):String{
return (binb2hex(core_sha1(str2binb(_arg1), (_arg1.length * chrsz))));
}
public static function sha1_kt(_arg1:Number):Number{
return (((_arg1)<20) ? 1518500249 : ((_arg1)<40) ? 1859775393 : ((_arg1)<60) ? -1894007588 : -899497514);
}
public static function core_sha1(_arg1:Array, _arg2:Number):Array{
var _local3:Array;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
_arg1[(_arg2 >> 5)] = (_arg1[(_arg2 >> 5)] | (128 << (24 - (_arg2 % 32))));
_arg1[((((_arg2 + 64) >> 9) << 4) + 15)] = _arg2;
_local3 = new Array(80);
_local4 = 1732584193;
_local5 = -271733879;
_local6 = -1732584194;
_local7 = 271733878;
_local8 = -1009589776;
_local9 = 0;
while (_local9 < _arg1.length) {
_local10 = _local4;
_local11 = _local5;
_local12 = _local6;
_local13 = _local7;
_local14 = _local8;
_local15 = 0;
while (_local15 < 80) {
if (_local15 < 16){
_local3[_local15] = _arg1[(_local9 + _local15)];
} else {
_local3[_local15] = rol((((_local3[(_local15 - 3)] ^ _local3[(_local15 - 8)]) ^ _local3[(_local15 - 14)]) ^ _local3[(_local15 - 16)]), 1);
};
_local16 = safe_add(safe_add(rol(_local4, 5), sha1_ft(_local15, _local5, _local6, _local7)), safe_add(safe_add(_local8, _local3[_local15]), sha1_kt(_local15)));
_local8 = _local7;
_local7 = _local6;
_local6 = rol(_local5, 30);
_local5 = _local4;
_local4 = _local16;
_local15++;
};
_local4 = safe_add(_local4, _local10);
_local5 = safe_add(_local5, _local11);
_local6 = safe_add(_local6, _local12);
_local7 = safe_add(_local7, _local13);
_local8 = safe_add(_local8, _local14);
_local9 = (_local9 + 16);
};
return ([_local4, _local5, _local6, _local7, _local8]);
}
public static function binb2b64(_arg1:Array):String{
var _local2:String;
var _local3:String;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
_local3 = "";
_local4 = 0;
while (_local4 < (_arg1.length * 4)) {
_local5 = (((((_arg1[(_local4 >> 2)] >> (8 * (3 - (_local4 % 4)))) & 0xFF) << 16) | (((_arg1[((_local4 + 1) >> 2)] >> (8 * (3 - ((_local4 + 1) % 4)))) & 0xFF) << 8)) | ((_arg1[((_local4 + 2) >> 2)] >> (8 * (3 - ((_local4 + 2) % 4)))) & 0xFF));
_local6 = 0;
while (_local6 < 4) {
if (((_local4 * 8) + (_local6 * 6)) > (_arg1.length * 32)){
_local3 = (_local3 + b64pad);
} else {
_local3 = (_local3 + _local2.charAt(((_local5 >> (6 * (3 - _local6))) & 63)));
};
_local6++;
};
_local4 = (_local4 + 3);
};
return (_local3);
}
public static function str2binb(_arg1:String):Array{
var _local2:Array;
var _local3:Number;
var _local4:Number;
_local2 = new Array();
_local3 = ((1 << chrsz) - 1);
_local4 = 0;
while (_local4 < (_arg1.length * chrsz)) {
_local2[(_local4 >> 5)] = (_local2[(_local4 >> 5)] | ((_arg1.charCodeAt((_local4 / chrsz)) & _local3) << ((32 - chrsz) - (_local4 % 32))));
_local4 = (_local4 + chrsz);
};
return (_local2);
}
public static function safe_add(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
var _local4:Number;
_local3 = ((_arg1 & 0xFFFF) + (_arg2 & 0xFFFF));
_local4 = (((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16));
return (((_local4 << 16) | (_local3 & 0xFFFF)));
}
public static function hex_hmac_sha1(_arg1:String, _arg2:String):String{
return (binb2hex(core_hmac_sha1(_arg1, _arg2)));
}
public static function b64_hmac_sha1(_arg1:String, _arg2:String):String{
return (binb2b64(core_hmac_sha1(_arg1, _arg2)));
}
}
}//package se.rocketxl.security.cryptography
Section 62
//Track (se.rocketxl.track.Track)
package se.rocketxl.track {
import flash.net.*;
public class Track {
protected var _st:String;// = ""
protected var trackURL:URLRequest;// = null
protected var _campaign:String;// = ""
protected var _trackerUrl:String;// = ""
protected var _sc:String;// = "track"
public static var ROTATE_3D_SCENE:String = "54";
public static var VOLUME_CHANGED:String = "18";
public static var GOTO_PREVIOUS_3D_SCENE:String = "10";
public static var GOTO_NEXT_IMAGE:String = "7";
public static var GOTO_NEXT_3D_SCENE:String = "9";
public static var GOTO_PREVIOUS_IMAGE:String = "8";
public static var OFFICIAL_SITE:String = "55";
public static var GOTO_IMAGE_THUMB:String = "11";
public static var GOTO_IMAGE:String = "5";
public static var TIMER_EVENT:String = "52";
public static var TRACKER_URL:String = "http://dev.rocketxl.se/cod4/tracking/index2.php";
public static var VIDEO_FINISHED:String = "17";
public static var SCRUBB_VIDEO:String = "16";
public static var GOTO_3D_SCENE_THUMB:String = "13";
public static var GOTO_VIDEO_THUMB:String = "12";
protected static var tracking:Boolean = true;
protected static var tracker:Track = null;
public static var SWITCH_MEDIA:String = "53";
public static var GOTO_3D_SCENE:String = "6";
public static var GOTO_VIDEO:String = "3";
public function Track(){
_trackerUrl = "";
_sc = "track";
_st = "";
_campaign = "";
trackURL = null;
super();
}
public function set campaign(_arg1:String){
this._campaign = _arg1;
}
public function doActionTrack(_arg1:String){
var _local2:URLVariables;
if (trackURL != null){
_local2 = setupVariabels();
_local2.ac = "event";
_local2.eid = _arg1;
trackURL.data = _local2;
trace(((("Action: " + trackURL.url) + "?") + trackURL.data));
sendToURL(trackURL);
} else {
trace("Tracker not setup properly");
};
}
public function set siteId(_arg1:String){
this._st = _arg1;
}
public function set trackerUrl(_arg1:String){
_trackerUrl = _arg1;
trackURL = new URLRequest(_trackerUrl);
}
public function get campaign():String{
return (_campaign);
}
public function doVisitorTrack(){
var _local1:URLVariables;
if (trackURL != null){
_local1 = setupVariabels();
_local1.ac = "default";
trackURL.data = _local1;
trace(((("Visitor: " + trackURL.url) + "?") + trackURL.data));
sendToURL(trackURL);
} else {
trace("Tracker not setup properly");
};
}
public function doSaleTrack(_arg1:String, _arg2:String){
var _local3:URLVariables;
if (trackURL != null){
_local3 = setupVariabels();
_local3.ac = "sale";
if (_arg1 != ""){
_local3.product = _arg1;
};
if (_arg2 != ""){
_local3.d = _arg2;
};
trackURL.data = _local3;
trace(((("Sale: " + trackURL.url) + "?") + trackURL.data));
sendToURL(trackURL);
} else {
trace("Tracker not setup properly");
};
}
public function doTimeTrack(_arg1:String, _arg2:String, _arg3:String){
var _local4:URLVariables;
if (trackURL != null){
_local4 = setupVariabels();
_local4.ac = "event";
_local4.eid = _arg2;
_local4.st = _arg1;
_local4.c = _arg3;
trackURL.data = _local4;
trace(((("Time: " + trackURL.url) + "?") + trackURL.data));
sendToURL(trackURL);
} else {
trace("Tracker not setup properly");
};
}
public function setupVariabels():URLVariables{
var _local1:URLVariables;
_local1 = new URLVariables();
_local1.sc = _sc;
if (_st != ""){
_local1.st = _st;
} else {
trace("No SiteId to track");
return (null);
};
if (_campaign != ""){
_local1.c = _campaign;
} else {
trace("No campaign to track");
};
return (_local1);
}
public static function trackSale(_arg1:String="", _arg2:String=""){
if (((!((tracker == null))) && (tracking))){
tracker.doSaleTrack(_arg1, _arg2);
};
}
public static function getCampaign():String{
if (tracker != null){
return (tracker.campaign);
};
return ("");
}
public static function setTracking(_arg1:Boolean){
tracking = _arg1;
}
public static function setCampaign(_arg1:String){
if (tracker == null){
tracker = new (Track);
};
tracker.campaign = _arg1;
}
public static function setSiteId(_arg1:String){
if (tracker == null){
tracker = new (Track);
};
tracker.siteId = _arg1;
}
public static function trackTimeAction(_arg1:String, _arg2:String, _arg3:String){
if (((!((tracker == null))) && (tracking))){
tracker.doTimeTrack(_arg1, _arg2, _arg3);
};
}
public static function setTrackerURL(_arg1:String){
if (tracker == null){
tracker = new (Track);
};
tracker.trackerUrl = _arg1;
}
public static function trackAction(_arg1:String){
if (((!((tracker == null))) && (tracking))){
tracker.doActionTrack(_arg1);
};
}
public static function trackVisitor(){
if (((!((tracker == null))) && (tracking))){
tracker.doVisitorTrack();
};
}
}
}//package se.rocketxl.track
Section 63
//GuiElementType (se.rocketxl.ui.widget.container.GuiElementType)
package se.rocketxl.ui.widget.container {
import se.rocketxl.*;
public class GuiElementType implements IEnum {
private var value:String;
public static const OVERLAY:GuiElementType = new GuiElementType("overlay");
;
public static const GUIELEMENT:GuiElementType = new GuiElementType("guielement");
;
public static const SECTION:GuiElementType = new GuiElementType("section");
;
public function GuiElementType(_arg1:String){
this.value = _arg1;
}
public function equals(_arg1:Object):Boolean{
return (((((!(_arg1) is GuiElementType)) || ((this.value == null)))) ? false : (_arg1.value == this.value));
}
public function toString():String{
return (this.value);
}
public static function getType(_arg1:String):GuiElementType{
switch (_arg1){
case GUIELEMENT.value:
return (GUIELEMENT);
case SECTION.value:
return (SECTION);
case OVERLAY.value:
return (OVERLAY);
};
return (null);
}
}
}//package se.rocketxl.ui.widget.container
Section 64
//IElementContainer (se.rocketxl.ui.widget.container.IElementContainer)
package se.rocketxl.ui.widget.container {
import se.rocketxl.ui.widget.events.*;
public interface IElementContainer {
function processWidgetEvent(_arg1:IWidgetEvent):void;
function getElementByName(_arg1:String):IGuiElement;
}
}//package se.rocketxl.ui.widget.container
Section 65
//IGuiElement (se.rocketxl.ui.widget.container.IGuiElement)
package se.rocketxl.ui.widget.container {
import se.rocketxl.ui.widget.events.*;
import flash.events.*;
public interface IGuiElement extends IEventDispatcher {
function deactivateElement():void;
function activateElement():void;
function processWidgetEvent(_arg1:IWidgetEvent);
function applySettings(_arg1:XML, _arg2:IElementContainer):void;
function get elementType():GuiElementType;
function get instanceName():String;
function hideElement():void;
function showElement():void;
}
}//package se.rocketxl.ui.widget.container
Section 66
//Widget (se.rocketxl.ui.widget.container.Widget)
package se.rocketxl.ui.widget.container {
import flash.display.*;
import se.rocketxl.ui.widget.events.*;
import flash.net.*;
import flash.events.*;
import flash.system.*;
import se.rocketxl.display.*;
public class Widget extends Sprite implements IElementContainer {
protected var defaultPath:String;// = ""
protected var configData:XML;
protected var loadFromSelf:Boolean;
protected var overlays:Array;
protected var currentSection:IGuiElement;
protected var guiLoader:Loader;
protected var sections:Array;
protected var originPath:String;// = ""
protected var currentOverlay:IGuiElement;
protected var guiLayer:DisplayObjectContainer;
protected var GUILayerDefinition:Class;
protected var elements:Object;
private static var singletonInstance:Widget;
public function Widget(_arg1:String="", _arg2:String="", _arg3:DisplayObjectContainer=null, _arg4:XML=null){
originPath = "";
defaultPath = "";
super();
if (singletonInstance == null){
singletonInstance = this;
};
this.loadFromSelf = !((_arg3 == null));
this.originPath = _arg1;
if (((!((_arg4 == null))) && (this.loadFromSelf))){
this.guiLayer = _arg3;
this.configData = _arg4;
this.onGuiLoaded(null);
} else {
if (_arg2 != ""){
this.loadConfigFile((_arg1 + _arg2));
};
};
}
protected function onGuiLoaded(_arg1:Event){
if (this.guiLayer == null){
this.extractGuiLayerClassesfromGuiLoader();
this.buildGUILayers();
};
this.extractGuiElementsfromLayers();
this.initWidget();
this.dispatchEvent(new Event("gh3WidgetInitialized"));
}
protected function onGuiIoError(_arg1:IOErrorEvent){
trace(("GuiFile IOErrorEvent: " + _arg1.text));
}
public function changeSection(_arg1:IGuiElement){
switch (_arg1.elementType){
case GuiElementType.SECTION:
this.hideOverlays();
this.hideSections();
this.currentSection = _arg1;
this.currentSection.showElement();
break;
case GuiElementType.OVERLAY:
this.hideOverlays();
this.currentSection.deactivateElement();
this.currentOverlay = _arg1;
this.currentOverlay.showElement();
break;
};
}
public function onConfigSecurityError(_arg1:SecurityErrorEvent){
trace(("ConfigFile SecurityErrorEvent: " + _arg1.text));
}
public function onConfigDataLoaded(_arg1:Event){
this.configData = new XML(_arg1.target.data);
this.setupConfiguration();
}
public function onConfigIoError(_arg1:IOErrorEvent){
trace(("ConfigFile IOErrorEvent: " + _arg1.text));
}
protected function setupDefaultPath(){
if (configData.@defaultpath.length() == 1){
defaultPath = configData.@defaultpath;
} else {
defaultPath = originPath;
};
}
protected function extractGuiElementsfromLayers(){
var _local1:XML;
var _local2:IGuiElement;
this.elements = new Object();
this.sections = new Array();
this.overlays = new Array();
for each (_local1 in configData.element) {
if (_local1.@name.length() == 0){
trace("Warning: Trying to extract an element without a name attribute");
trace(_local1.toXMLString());
} else {
if (_local1.@type.length() == 0){
trace("Warning: Trying to extract an element without a type attribute");
trace(_local1.toXMLString());
} else {
_local2 = (DisplayUtils.getDisplayObject(this.guiLayer, _local1.@name, IGuiElement, false) as IGuiElement);
if (_local2 != null){
this.elements[_local1.@name] = _local2;
switch (GuiElementType.getType(_local1.@type)){
case GuiElementType.SECTION:
this.sections[sections.length] = _local2;
break;
case GuiElementType.OVERLAY:
this.overlays[overlays.length] = _local2;
break;
};
};
};
};
};
for each (_local1 in configData.element) {
if (_local1.@name.length() == 0){
} else {
_local2 = this.elements[_local1.@name];
if (_local2 != null){
_local2.applySettings(_local1, this);
} else {
trace((("Warning: IGuiElement by instance name '" + _local1.@name) + "' did not exist in extracted list"));
};
};
};
}
protected function extractGuiLayerClassesfromGuiLoader():void{
if (!this.loadFromSelf){
this.GUILayerDefinition = extractClassfromGuiLoader("GuiObject");
};
}
protected function initWidget(){
hideSections();
hideOverlays();
if (this.sections.length > 0){
this.currentSection = this.sections[0];
this.currentSection.showElement();
};
}
public function loadConfigFile(_arg1:String){
var _local2:URLLoader;
_local2 = new URLLoader();
_local2.addEventListener(IOErrorEvent.IO_ERROR, onConfigIoError);
_local2.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onConfigSecurityError);
_local2.addEventListener(Event.COMPLETE, onConfigDataLoaded);
_local2.load(new URLRequest(_arg1));
}
protected function hideSections(){
var _local1:IGuiElement;
for each (_local1 in this.sections) {
_local1.hideElement();
};
}
protected function setupConfiguration(){
this.setupDefaultPath();
this.loadGuiFile();
}
public function buildGUILayers(){
if (this.GUILayerDefinition != null){
this.guiLayer = new GUILayerDefinition();
this.addChild(this.guiLayer);
} else {
trace("GUILayer was null, not added to stage");
};
}
protected function loadGuiFile(){
var _local1:String;
if ((((configData.@guiurl.length() == 0)) || ((configData.@guiurl == "")))){
trace("Config Error: No Gui Url Specified");
return;
};
_local1 = (getGuiPath() + configData.@guiurl);
this.guiLoader = new Loader();
this.guiLoader.load(new URLRequest(_local1));
this.guiLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onGuiIoError);
this.guiLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onGuiLoaded);
}
protected function hideOverlays(){
var _local1:IGuiElement;
for each (_local1 in this.overlays) {
_local1.hideElement();
};
this.currentOverlay = null;
}
protected function extractClassfromGuiLoader(_arg1:String):Class{
if (guiLoader.contentLoaderInfo.applicationDomain.hasDefinition(_arg1)){
return ((guiLoader.contentLoaderInfo.applicationDomain.getDefinition(_arg1) as Class));
};
trace(("Class definition not found: " + _arg1));
return (null);
}
public function processWidgetEvent(_arg1:IWidgetEvent):void{
var _local2:IGuiElement;
_local2 = elements[_arg1.targetElementIdentifier];
if (_local2 == null){
trace((("Error catching WidgetEvent: element by instance name '" + _arg1.targetElementIdentifier) + "' does not exist, could not redirect event to instance."));
} else {
if ((_arg1 is SectionChangeEvent)){
this.changeSection(_local2);
};
_local2.processWidgetEvent(_arg1);
};
}
protected function getGuiPath():String{
if (configData.@guipath.length() == 1){
if (configData.@guipath == "default"){
return (defaultPath);
};
if (configData.@guipath == "absolute"){
return ("");
};
if (configData.@guipath != "origin"){
trace("Warning guipath contains illegal value will default to origin path");
};
};
return (originPath);
}
public function get currentAppDomain():ApplicationDomain{
return (((this.guiLoader)!=null) ? this.guiLoader.contentLoaderInfo.applicationDomain : null);
}
public function getElementByName(_arg1:String):IGuiElement{
var _local2:String;
for (_local2 in this.elements) {
if (_local2 == _arg1){
return ((this.elements[_local2] as IGuiElement));
};
};
trace(((("Widget: getElementByName(): Could not find element by name '" + _arg1) + "' in ") + this));
return (null);
}
public static function get instance():Widget{
return (singletonInstance);
}
}
}//package se.rocketxl.ui.widget.container
Section 67
//WidgetContent (se.rocketxl.ui.widget.container.WidgetContent)
package se.rocketxl.ui.widget.container {
import flash.display.*;
import flash.events.*;
import se.rocketxl.io.*;
import controls.sections.*;
import se.rocketxl.ui.widget.gui.*;
public class WidgetContent extends Sprite {
public var mainMenuSection:MainMenuSection;
public var submitScoreSection:SubmitScoreSection;
var loaderIcon:LoaderIcon;
public var playResultSection:PlayResultSection;
public var topOverlay:TopOverlay;
public var grabCodeSection:Section1;
var gh3Config:XML;
public var endSplashSection:EndSplashSection;
public var playAreaEscapeMenuSection:PlayAreaEscapeMenuSection;
public var splashPageSection:SplashPageSection;
protected var DEFAULT_CONFIG_FILENAME:String;// = "mpConfig.xml"
public var trackerSection:TrackerSection;
public var highScoreSection:HighScoreSection;
public var menuBackgroundOverlay:MenuBackgroundOverlay;
public var songPreloaderSection:SongPreloaderSection;
var mediaPlayer:Widget;
public var playAreaSection:PlayAreaSection;
public var ageConfirmSection:AgeVerifacationSction;
public var songSelectionSection:SongSelectionSection;
public function WidgetContent(){
DEFAULT_CONFIG_FILENAME = "mpConfig.xml";
gh3Config = <mediaplayer guiurl="gh3Gui.swf">
<element name="splashPageSection" type="section" desc="Hides itself after a certain time"/>
<element name="ageConfirmSection" type="section" desc="Section">
<element name="goBackButton">
<trigger type="click" event="SectionChangeEvent" target="songSelectionSection"/>
</element>
</element>
<element name="mainMenuSection" type="section" desc="Section">
<element name="btnStartRocking">
<trigger type="click" event="SectionChangeEvent" target="songSelectionSection"/>
</element>
<element name="btnHighScores">
<trigger type="click" event="SectionChangeEvent" args="7a380fa9-de96-4efa-8389-cd1d77b86b63" target="highScoreSection"/>
</element>
<element name="btnGrabCode">
<trigger type="click" event="SectionChangeEvent" target="grabCodeSection"/>
</element>
</element>
<element name="endSplashSection" type="section">
<element name="btnViewHighScores">
<trigger type="click" event="CommandEvent" command="REDIRECTTOHIGHSCORE" target="endSplashSection"/>
</element>
</element>
<element name="menuBackgroundOverlay" type="guielement" desc="Always on top"/>
<element name="playAreaSection" type="section" desc="Section"/>
<element name="topOverlay" type="guielement" desc="visible on top of all elements at all times">
<element name="btnBackToMainMenu">
<trigger type="click" event="SectionChangeEvent" target="mainMenuSection"/>
</element>
<element buttonMode="true" name="guitarHeroLogoButton">
<trigger type="click">
<customEvent type="link" args="http://www.guitarherogame.com/gh3/"/>
</trigger>
</element>
</element>
<element name="songPreloaderSection" type="section">
<element name="btnStartPlaying">
<trigger type="click" event="CommandEvent" command="SEND" target="songPreloaderSection"/>
</element>
<element name="btnInstructionsLink">
<trigger type="click">
<customEvent type="link" args="http://dev.rocketxl.se/gh3/tutorial/index.html"/>
</trigger>
</element>
</element>
<element name="highScoreSection" type="section" desc="Section">
<element name="btnSongCultOfPersonality">
<trigger type="click" event="CommandEvent" command="BUTTONCLICKED" args="7a380fa9-de96-4efa-8389-cd1d77b86b63" target="highScoreSection"/>
<trigger type="mouseOut" event="CommandEvent" command="MENUBUTTONLEFT" target="highScoreSection"/>
</element>
<element name="btnSongSchoolsOut">
<trigger type="click" event="CommandEvent" command="BUTTONCLICKED" args="c29591c5-6f9b-4b7e-ad93-f9ac8a92b4a5" target="highScoreSection"/>
<trigger type="mouseOut" event="CommandEvent" command="MENUBUTTONLEFT" target="highScoreSection"/>
</element>
<element name="btnMetalHeavyLady">
<trigger type="click" event="CommandEvent" command="BUTTONCLICKED" args="f7ae03fd-bb7c-4891-a2a4-5b4458311d60" target="highScoreSection"/>
<trigger type="mouseOut" event="CommandEvent" command="MENUBUTTONLEFT" target="highScoreSection"/>
</element>
</element>
<element name="grabCodeSection" type="section" desc="GrabCodeSection">
<![CDATA[<object width="461" height="430"><param name="movie" value="http://www.rocketxl.com/gh3/gh3widget.swf" /><param name="wmode" value="transparent" /> <embed src="http://www.rocketxl.com/gh3/gh3widget.swf" type="application/x-shockwave-flash" wmode="transparent" width="461" height="430"></embed></object> ]]>
</element>
<element name="songSelectionSection" type="section" desc="Section">
<element name="clpSongCard1" desc="Metal heavy lady">
<trigger type="click" event="CommandEvent" command="PLAY" args="http://www.rocketxl.com/gh3/songs/gh3/metalheavylady/notes.gh3, f7ae03fd-bb7c-4891-a2a4-5b4458311d60" target="songSelectionSection"/>
<trigger type="click" event="CommandEvent" command="TRACK" args="METAL_START_TRACK_EVENT" target="trackerSection"/>
</element>
<element name="clpSongCard2" desc="School's Out">
<trigger type="click" event="CommandEvent" command="PLAY" args="http://www.rocketxl.com/gh3/songs/gh3/schoolsout/notes.gh3, c29591c5-6f9b-4b7e-ad93-f9ac8a92b4a5" target="songSelectionSection"/>
<trigger type="click" event="CommandEvent" command="TRACK" args="SCHOOLS_START_TRACK_EVENT" target="trackerSection"/>
</element>
<element name="clpSongCard3" desc="Cult of personality">
<trigger type="click" event="CommandEvent" command="PLAY" args="http://www.rocketxl.com/gh3/songs/gh3/cultofpersonality/notes.gh3, 7a380fa9-de96-4efa-8389-cd1d77b86b63" target="songSelectionSection"/>
<trigger type="click" event="CommandEvent" command="TRACK" args="CULT_START_TRACK_EVENT" target="trackerSection"/>
</element>
</element>
<element name="playAreaEscapeMenuSection" type="section" desc="Section">
<element name="btnRetry">
<trigger type="click" event="CommandEvent" command="RETRY" target="playAreaSection"/>
</element>
<element name="btnResume">
<trigger type="click" event="CommandEvent" command="RESUME" target="playAreaSection"/>
</element>
<element name="btnNewSong">
<trigger type="click" event="SectionChangeEvent" target="songSelectionSection"/>
</element>
</element>
<element name="playResultSection" type="section" desc="Section">
<element name="btnPlayAgain">
<trigger type="click" event="SectionChangeEvent" target="playAreaSection"/>
<trigger type="click" event="CommandEvent" command="RETRY" target="playAreaSection"/>
</element>
<element name="btnGoToSubmitSection">
<trigger type="click" event="CommandEvent" command="REDIRECTSCORE" target="playResultSection"/>
</element>
<element name="btnBackToSongSelection">
<trigger type="click" event="SectionChangeEvent" target="songSelectionSection"/>
</element>
</element>
<element name="submitScoreSection" type="section" desc="Section">
<element name="btnSubmitScore">
<trigger type="click" event="CommandEvent" command="SUBMITSCORE" target="submitScoreSection"/>
</element>
<element name="btnPrivacyPolicyLink">
<trigger type="click">
<customEvent type="link" args="http://www.activision.com/index.html#privacy|en_US|type:privacy"/>
</trigger>
</element>
</element>
<element name="trackerSection" type="section" desc="TrackerSection" visitor="false" siteid="64" campaignid="2785" trackerurl="http://www.rocketxl.com/gh3/track.php">
<event name="CULT_START_TRACK_EVENT" id="168"/>
<event name="SCHOOLS_START_TRACK_EVENT" id="169"/>
<event name="METAL_START_TRACK_EVENT" id="170"/>
</element>
</mediaplayer>
;
super();
this.setupMediaPlayer();
this.setupTracking();
}
public function onMediaplayerSetupComplete(_arg1:Event){
this.loaderIcon.stopLoaderIcon();
this.removeChild(loaderIcon);
}
protected function setupMediaPlayer(){
var _local1:String;
_local1 = Path.getDirectory(root.loaderInfo.url);
this.mediaPlayer = new Widget("", "", this, gh3Config);
}
protected function setupLoaderIcon(){
this.loaderIcon = new LoaderIcon();
this.loaderIcon.x = (stage.stageWidth / 2);
this.loaderIcon.y = (stage.stageHeight / 2);
this.addChild(loaderIcon);
this.loaderIcon.startLoaderIcon();
}
protected function setupTracking(){
}
}
}//package se.rocketxl.ui.widget.container
Section 68
//CommandEvent (se.rocketxl.ui.widget.events.CommandEvent)
package se.rocketxl.ui.widget.events {
public class CommandEvent extends WidgetEventBase implements IWidgetEvent {
private var _arrArguments:Array;
private var _strCommand:String;
public function CommandEvent(_arg1:String, _arg2:String, _arg3:Array){
super(_arg1);
this._strCommand = _arg2;
this._arrArguments = _arg3;
}
public function get command():String{
return (this._strCommand);
}
public function get args():Array{
return (this._arrArguments);
}
}
}//package se.rocketxl.ui.widget.events
Section 69
//IWidgetEvent (se.rocketxl.ui.widget.events.IWidgetEvent)
package se.rocketxl.ui.widget.events {
public interface IWidgetEvent {
function get targetElementIdentifier():String;
}
}//package se.rocketxl.ui.widget.events
Section 70
//SectionChangeEvent (se.rocketxl.ui.widget.events.SectionChangeEvent)
package se.rocketxl.ui.widget.events {
public class SectionChangeEvent extends WidgetEventBase implements IWidgetEvent {
private var _arrArguments:Array;
public function SectionChangeEvent(_arg1:String, _arg2:Array=null){
super(_arg1);
this._arrArguments = ((_arg2 == null)) ? new Array() : _arg2;
}
public function get args():Array{
return (this._arrArguments);
}
}
}//package se.rocketxl.ui.widget.events
Section 71
//WidgetEventBase (se.rocketxl.ui.widget.events.WidgetEventBase)
package se.rocketxl.ui.widget.events {
import flash.events.*;
public class WidgetEventBase extends Event {
private var _strTargetElementIdentifier:String;
public static const Name:String = "widgetEvent";
public function WidgetEventBase(_arg1:String){
super(WidgetEventBase.Name);
this._strTargetElementIdentifier = _arg1;
}
public function get targetElementIdentifier():String{
return (_strTargetElementIdentifier);
}
}
}//package se.rocketxl.ui.widget.events
Section 72
//ScrollBarEvent (se.rocketxl.ui.widget.gui.events.ScrollBarEvent)
package se.rocketxl.ui.widget.gui.events {
import flash.events.*;
public class ScrollBarEvent extends Event {
private var _numPercentage:Number;
public static const SCROLL_VALUE:String = "scrollValueChanged";
public function ScrollBarEvent(_arg1:String, _arg2:Number=0){
super(_arg1);
this._numPercentage = _arg2;
}
public function get percentage():Number{
return (this._numPercentage);
}
}
}//package se.rocketxl.ui.widget.gui.events
Section 73
//GrabCodeSection (se.rocketxl.ui.widget.gui.share.GrabCodeSection)
package se.rocketxl.ui.widget.gui.share {
import se.rocketxl.ui.widget.container.*;
import flash.geom.*;
import flash.events.*;
import flash.system.*;
import se.rocketxl.track.*;
import se.rocketxl.ui.widget.gui.*;
import flash.text.*;
public class GrabCodeSection extends TweenInElement {
public var copyButton:CopyToClipboardButton;
public var grabCodeText:TextField;
var tracked:Boolean;// = false
public function GrabCodeSection(){
tracked = false;
this.visible = false;
super(600, false, new Point(this.x, (this.y - this.height)));
grabCodeText.text = "Error no Grab Code Provided";
copyButton.addEventListener(MouseEvent.MOUSE_UP, onCopyToClipBoard);
}
override public function applySettings(_arg1:XML, _arg2:IElementContainer):void{
super.applySettings(_arg1, _arg2);
grabCodeText.text = _arg1;
}
public function onCopyToClipBoard(_arg1:MouseEvent){
if (!tracked){
tracked = true;
doGrabCodeTrack();
};
System.setClipboard(grabCodeText.text);
}
public function doGrabCodeTrack(){
Track.trackSale("GetCode", "");
}
}
}//package se.rocketxl.ui.widget.gui.share
Section 74
//ShareWithaFriendSection (se.rocketxl.ui.widget.gui.share.ShareWithaFriendSection)
package se.rocketxl.ui.widget.gui.share {
import flash.display.*;
import se.rocketxl.ui.widget.container.*;
import flash.geom.*;
import flash.utils.*;
import flash.events.*;
import se.rocketxl.util.*;
import se.rocketxl.ui.widget.gui.*;
import flash.text.*;
public class ShareWithaFriendSection extends TweenInElement {
public var sEmail:TextField;
public var message:TextField;
public var sendMailButton:MovieClip;
public var rEmail:TextField;
public var processingMessage:MovieClip;
public var sentMessage:MovieClip;
protected var messageTimer:Timer;
protected var mailer:Mailer;
public var sName:TextField;
public var errorMessage:MovieClip;
public function ShareWithaFriendSection(){
this.visible = false;
super(600, false, new Point(this.x, (this.y - this.height)));
sentMessage.visible = false;
errorMessage.visible = false;
processingMessage.visible = false;
messageTimer = new Timer(5000, 1);
messageTimer.addEventListener(TimerEvent.TIMER, onCloseMessageTimer);
}
public function onSendMail(_arg1:MouseEvent){
processingMessage.visible = true;
mailer.sendMail(sName.text, sEmail.text, rEmail.text, message.text);
}
public function onMailError(_arg1:MailerEvents){
processingMessage.visible = false;
errorMessage.visible = true;
messageTimer.start();
}
public function onCloseMessageTimer(_arg1:TimerEvent){
sentMessage.visible = false;
errorMessage.visible = false;
processingMessage.visible = false;
}
override public function applySettings(_arg1:XML, _arg2:IElementContainer):void{
super.applySettings(_arg1, _arg2);
message.text = _arg1;
mailer = new Mailer();
if (_arg1.@mailerurl.length() > 0){
mailer.setMailerUrl(_arg1.@mailerurl);
} else {
trace("Warning mailer url not specified");
};
trace(("Mailer URL: " + _arg1.@mailerurl));
mailer.addEventListener(MailerEvents.MAIL_SENT, onMailSent);
mailer.addEventListener(MailerEvents.MAIL_ERROR, onMailError);
sendMailButton.addEventListener(MouseEvent.MOUSE_UP, onSendMail);
}
public function onMailSent(_arg1:MailerEvents){
rEmail.text = "";
processingMessage.visible = false;
sentMessage.visible = true;
messageTimer.start();
}
}
}//package se.rocketxl.ui.widget.gui.share
Section 75
//ComboBox (se.rocketxl.ui.widget.gui.ComboBox)
package se.rocketxl.ui.widget.gui {
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import flash.events.*;
import mx.effects.*;
import flash.system.*;
import se.rocketxl.ui.widget.gui.events.*;
import se.rocketxl.display.*;
import mx.effects.easing.*;
public class ComboBox extends MovieClip {
private const LISTITEM_STATUS_SELECTED:String = "SELECTED";
private const LISTITEM_STATUS_HOVERED:String = "MOUSEOVER";
private const LISTITEM_STATUS_NORMAL:String = "NORMAL";
private var _pntSelectedItemContainerPosToStage:Point;
private var _vsbScrollBar:VerticalScrollBar;
public var scrollbar:VerticalScrollBar;
private var _blnHasBeenAddedToStage:Boolean;
private var _clpSelectedItemContainer:MovieClip;
private var _arrListItems:Array;
private var _clsScrollBarClass:Class;
public var container:ComboBoxItemTemplate;
private var _objSelectedItem:Object;
private var _rctButtonStageRect:Rectangle;
private var _rctContainerRect:Rectangle;
private var _arrListClipItems:Array;
private var _rctButtonRectToStage:Rectangle;
private var _clpContainer:MovieClip;
private var _rctSelectedItemContainerRect:Rectangle;
private var _twnContainerTween:Tween;
private var ListItemDefinition:Class;
public var button:MovieClip;
private var _rctContainerRectToStage:Rectangle;
private var _arrDataSource:Array;
private var _clpButton:MovieClip;
private var _blnIsListVisible:Boolean;
private var _intNumVisibleItems:int;
private var _intLastSelectedItemIndex:int;
private var _uintSelectedItemIndex:uint;
public function ComboBox(){
this._blnHasBeenAddedToStage = false;
this.addEventListener(Event.ADDED_TO_STAGE, this.doAddedToStage);
}
private function changeSelectedItem(_arg1:uint):void{
this._intLastSelectedItemIndex = this._uintSelectedItemIndex;
this._uintSelectedItemIndex = _arg1;
this._objSelectedItem = ((((this._arrDataSource == null)) || ((this._arrDataSource.length == 0)))) ? null : this._arrDataSource[this._uintSelectedItemIndex];
this.changeListItemText(this._clpSelectedItemContainer, this._objSelectedItem);
if (((!((this._intLastSelectedItemIndex == -1))) && (!((this._arrListClipItems[this._intLastSelectedItemIndex] == null))))){
this._arrListClipItems[this._intLastSelectedItemIndex].gotoAndStop(LISTITEM_STATUS_NORMAL);
};
if (this._arrListClipItems[this._uintSelectedItemIndex] != null){
this._arrListClipItems[this._uintSelectedItemIndex].gotoAndStop(LISTITEM_STATUS_SELECTED);
};
this.dispatchEvent(new Event(Event.CHANGE));
this._blnIsListVisible = true;
this._clpContainer.visible = false;
this.hideList();
}
private function onContainerTween(_arg1:Number):void{
this._clpContainer.y = _arg1;
this._vsbScrollBar.y = _arg1;
}
private function onListItemClicked(_arg1:MouseEvent):void{
var _local2:uint;
if ((_arg1.target is ListItemDefinition)){
_local2 = 0;
while (_local2 < this._arrListClipItems.length) {
if (this._arrListClipItems[_local2] == _arg1.target){
this.changeSelectedItem(_local2);
break;
};
_local2++;
};
};
}
private function onListItemMouseOut(_arg1:MouseEvent):void{
if ((_arg1.target is ListItemDefinition)){
if (this._arrListClipItems.indexOf(_arg1.target) == this._uintSelectedItemIndex){
(_arg1.target as MovieClip).gotoAndStop(LISTITEM_STATUS_SELECTED);
} else {
(_arg1.target as MovieClip).gotoAndStop(LISTITEM_STATUS_NORMAL);
};
};
}
public function get selectedItem():Object{
return (this._objSelectedItem);
}
public function at(_arg1:uint):Object{
return (this._arrDataSource[_arg1]);
}
public function get dataSource():Array{
return (this._arrDataSource);
}
public function doAddedToStage(_arg1:Event){
var _local2:Point;
if (_arg1.target == this){
this.removeEventListener(Event.ADDED_TO_STAGE, this.doAddedToStage);
this.stage.addEventListener(MouseEvent.CLICK, this.onStageClicked);
this._intLastSelectedItemIndex = -1;
this._blnIsListVisible = true;
this._arrListClipItems = new Array();
this._intNumVisibleItems = 3;
this._clpButton = (DisplayUtils.getDisplayObject(this, "button", MovieClip) as MovieClip);
this._clpButton.addEventListener(MouseEvent.CLICK, this.onButtonClicked);
this._clpButton.buttonMode = true;
_local2 = DisplayUtils.getPositionToStage(this._clpButton);
this._rctButtonRectToStage = new Rectangle(_local2.x, _local2.y, this._clpButton.width, this._clpButton.height);
this._clpContainer = (DisplayUtils.getDisplayObject(this, "container", MovieClip) as MovieClip);
if (!this._clpContainer.hasOwnProperty("textField")){
throw (new ArgumentError("ComboBox container needs to have a TextField by instance name 'textField'"));
};
this.ListItemDefinition = (ApplicationDomain.currentDomain.getDefinition(getQualifiedClassName(this._clpContainer)) as Class);
this._vsbScrollBar = (DisplayUtils.getDisplayObject(this, "scrollbar", VerticalScrollBar, false, false) as VerticalScrollBar);
this._vsbScrollBar.visible = false;
this._vsbScrollBar.mask = new Shape();
this.addChild(this._vsbScrollBar.mask);
if (this._vsbScrollBar != null){
this.addChild(this._vsbScrollBar);
};
this._rctSelectedItemContainerRect = new Rectangle(this._clpContainer.x, this._clpContainer.y, this._clpContainer.width, this._clpContainer.height);
this._pntSelectedItemContainerPosToStage = DisplayUtils.getPositionToStage(this._clpContainer);
this.removeChild(this._clpContainer);
this._clpContainer = new MovieClip();
this._clpContainer.x = this._rctSelectedItemContainerRect.x;
this._clpContainer.y = this._rctSelectedItemContainerRect.y;
this.addChild(this._clpContainer);
if (this._clpSelectedItemContainer != null){
this.removeChild(this._clpSelectedItemContainer);
};
this._clpSelectedItemContainer = this.createListItem();
this._clpSelectedItemContainer.x = this._rctSelectedItemContainerRect.x;
this._clpSelectedItemContainer.y = this._rctSelectedItemContainerRect.y;
this.addChild(this._clpSelectedItemContainer);
this._blnHasBeenAddedToStage = true;
if (this._arrDataSource != null){
this.updateFromDataSource();
} else {
this.dataSource = [""];
};
};
}
private function createItemListClip():void{
var _local1:MovieClip;
var _local2:MovieClip;
var _local3:String;
for each (_local1 in this._arrListClipItems) {
this._clpContainer.removeChild(_local1);
};
this._arrListClipItems = new Array();
for each (_local3 in this._arrListItems) {
_local2 = this.createListItem(_local3, this._arrListClipItems.length);
_local2.textField.addEventListener(MouseEvent.MOUSE_OUT, this.onItemChildMouseEvent);
_local2.textField.addEventListener(MouseEvent.MOUSE_OVER, this.onItemChildMouseEvent);
_local2.textField.addEventListener(MouseEvent.CLICK, this.onItemChildMouseEvent);
_local2.addEventListener(MouseEvent.MOUSE_OUT, this.onListItemMouseOut);
_local2.addEventListener(MouseEvent.MOUSE_OVER, this.onListItemMouseOver);
_local2.addEventListener(MouseEvent.CLICK, this.onListItemClicked);
this._arrListClipItems.push(_local2);
this._clpContainer.addChild(_local2);
};
this._rctContainerRectToStage = new Rectangle(this._pntSelectedItemContainerPosToStage.x, this._pntSelectedItemContainerPosToStage.y, this._clpContainer.width, this._clpContainer.height);
if (((!((this._intNumVisibleItems == -1))) && ((this._arrListItems.length > this._intNumVisibleItems)))){
this._rctContainerRectToStage.height = (this._intNumVisibleItems * _local2.height);
};
this._rctContainerRect = new Rectangle(this._rctSelectedItemContainerRect.x, (this._rctSelectedItemContainerRect.y + this._rctSelectedItemContainerRect.height), this._rctContainerRectToStage.width, this._rctContainerRectToStage.height);
if (this._clpContainer.mask != null){
this.removeChild(this._clpContainer.mask);
};
this._clpContainer.mask = new Shape();
this.configureMask(this._rctContainerRect, (this._clpContainer.mask as Shape));
this.addChild(this._clpContainer.mask);
}
private function onScrollBarValueChanged(_arg1:ScrollBarEvent):void{
this._clpContainer.y = (this._rctContainerRect.y - (_arg1.percentage * (this._clpContainer.height - this._rctContainerRect.height)));
}
private function onContainerTweenComplete(_arg1:Number):void{
this.onContainerTween(_arg1);
this._clpContainer.visible = this._blnIsListVisible;
}
public function set dataSource(_arg1:Array){
var _local2:Object;
this._arrDataSource = _arg1;
this._arrListItems = new Array();
this._objSelectedItem = null;
if (this._arrDataSource != null){
for each (_local2 in this._arrDataSource) {
this._arrListItems.push(_local2.toString());
};
if (this._arrDataSource.length > 0){
this._objSelectedItem = this._arrDataSource[0];
};
};
if (this._blnHasBeenAddedToStage){
this.updateFromDataSource();
};
}
private function onStageClicked(_arg1:MouseEvent):void{
var _local2:Rectangle;
var _local3:Point;
if (((!((this._rctContainerRectToStage == null))) && (!((this._rctButtonRectToStage == null))))){
if (this._vsbScrollBar != null){
_local3 = DisplayUtils.getPositionToStage(this._vsbScrollBar);
_local2 = new Rectangle(_local3.x, _local3.y, this._vsbScrollBar.width, this._vsbScrollBar.height);
};
if (((((!(this._rctContainerRectToStage.contains(_arg1.stageX, _arg1.stageY))) && (!(this._rctButtonRectToStage.contains(_arg1.stageX, _arg1.stageY))))) && ((((_local2 == null)) || (!(_local2.contains(_arg1.stageX, _arg1.stageY))))))){
this.hideList();
};
};
}
private function updateFromDataSource():void{
this.updateScrollBar();
this.createItemListClip();
this.changeSelectedItem(0);
}
private function configureMask(_arg1:Rectangle, _arg2:Shape):void{
_arg2.graphics.beginFill(0xFFFFFF, 1);
_arg2.graphics.moveTo(0, 0);
_arg2.graphics.lineTo(_arg1.width, 0);
_arg2.graphics.lineTo(_arg1.width, _arg1.height);
_arg2.graphics.lineTo(0, _arg1.height);
_arg2.graphics.lineTo(0, 0);
_arg2.graphics.endFill();
_arg2.x = _arg1.x;
_arg2.y = _arg1.y;
}
private function onButtonClicked(_arg1:MouseEvent):void{
if (this._vsbScrollBar != null){
this._vsbScrollBar.visible = true;
};
this.showList();
}
public function get selectedIndex():uint{
return (this._uintSelectedItemIndex);
}
public function hideList():void{
if (this._blnIsListVisible){
this._blnIsListVisible = false;
this.setContainerYPos(((this._rctSelectedItemContainerRect.y - this._clpContainer.height) + this._rctSelectedItemContainerRect.height));
};
}
public function get numVisibleItems():int{
return (this._intNumVisibleItems);
}
private function onListItemMouseOver(_arg1:MouseEvent):void{
if ((_arg1.target is ListItemDefinition)){
(_arg1.target as MovieClip).gotoAndStop(LISTITEM_STATUS_HOVERED);
};
}
public function showList():void{
if (!this._blnIsListVisible){
this._blnIsListVisible = true;
this._clpContainer.visible = true;
this.setContainerYPos((this._rctSelectedItemContainerRect.y + this._rctSelectedItemContainerRect.height));
};
}
private function updateScrollBar():void{
var _local1:Rectangle;
this._intNumVisibleItems = -1;
if (this._vsbScrollBar == null){
return;
};
this._intNumVisibleItems = Math.floor((this._vsbScrollBar.height / this._rctSelectedItemContainerRect.height));
this._vsbScrollBar.setHeight(((1 + this._intNumVisibleItems) * this._rctSelectedItemContainerRect.height));
_local1 = new Rectangle((this._rctSelectedItemContainerRect.x + this._rctSelectedItemContainerRect.width), (this._rctSelectedItemContainerRect.y + this._rctSelectedItemContainerRect.height), (this._vsbScrollBar.width + 5), (this._vsbScrollBar.height + 5));
this._vsbScrollBar.addEventListener(ScrollBarEvent.SCROLL_VALUE, this.onScrollBarValueChanged);
this._vsbScrollBar.x = _local1.x;
this._vsbScrollBar.y = _local1.y;
this.configureMask(_local1, (this._vsbScrollBar.mask as Shape));
}
private function onItemChildMouseEvent(_arg1:MouseEvent):void{
if ((_arg1.target.parent is ListItemDefinition)){
_arg1.target.parent.dispatchEvent(new MouseEvent(_arg1.type, _arg1.bubbles, _arg1.cancelable, _arg1.localX, _arg1.localY, _arg1.relatedObject, _arg1.ctrlKey, _arg1.altKey, _arg1.shiftKey, _arg1.buttonDown, _arg1.delta));
};
}
private function changeListItemText(_arg1:MovieClip, _arg2:Object){
_arg1.textField.text = ((_arg2 == null)) ? "" : _arg2.toString();
}
private function createListItem(_arg1:Object=null, _arg2:int=0):MovieClip{
var _local3:MovieClip;
_local3 = (new ListItemDefinition() as MovieClip);
_local3.x = 0;
_local3.y = (_arg2 * _local3.height);
_local3.gotoAndStop(LISTITEM_STATUS_NORMAL);
this.changeListItemText(_local3, _arg1);
return (_local3);
}
protected function setContainerYPos(_arg1:Number){
if (this._twnContainerTween != null){
this._twnContainerTween.pause();
this._twnContainerTween = null;
};
this._twnContainerTween = new Tween(this, this._clpContainer.y, _arg1, 333);
this._twnContainerTween.setTweenHandlers(this.onContainerTween, this.onContainerTweenComplete);
this._twnContainerTween.easingFunction = Circular.easeInOut;
}
}
}//package se.rocketxl.ui.widget.gui
Section 76
//Element (se.rocketxl.ui.widget.gui.Element)
package se.rocketxl.ui.widget.gui {
import flash.display.*;
import se.rocketxl.ui.widget.container.*;
import se.rocketxl.ui.widget.events.*;
import flash.net.*;
import flash.events.*;
import se.rocketxl.display.*;
public class Element extends MovieClip implements IGuiElement {
public var btnBackToMainMenu:BackToMainMenuButton;
protected var _objElementContainer:IElementContainer;
public var guitarHeroLogoButton:GuitarHeroLogoButton;
protected var _xmlSettings:XML;
private var _arrTriggerTypeIndexes:Object;
private function makeArray(_arg1:String){
var _local2:Array;
var _local3:String;
_local2 = new Array();
if (_arg1 != null){
for each (_local3 in _arg1.split(",")) {
_local2.push(_local3.toString());
};
};
return (_local2);
}
private function applyDesignSettings(_arg1:XML){
if (_arg1.@buttonMode.length() != 0){
(this as Sprite).buttonMode = (_arg1.@buttonMode == "true");
};
}
public function showElement():void{
this.visible = true;
}
public function get elementType():GuiElementType{
return (GuiElementType.getType(this._xmlSettings.@type));
}
public function hideElement():void{
this.visible = false;
}
public function activateElement():void{
}
private function doCatchWidgetEvent(_arg1:IWidgetEvent){
this._objElementContainer.processWidgetEvent(_arg1);
}
private function applyTriggerSettings(_arg1:XML){
var _local2:int;
this._arrTriggerTypeIndexes = new Object();
_local2 = 0;
for (;_local2 < _arg1.trigger.length();_local2++) {
if (_arg1.trigger[_local2].@type == 0){
trace("Trigger XML is missing 'type' attribute, skipping trigger");
continue;
} else {
if (((!((_arg1.trigger[_local2].@event.length() == 0))) && ((_arg1.trigger[_local2].@target.length() == 0)))){
trace("Trigger XML is having 'event' attribute wihout a 'target' attribute, skipping trigger");
continue;
} else {
if (((!((_arg1.trigger[_local2].@trigger.length() == 0))) && ((_arg1.trigger[_local2].@event.length() == 0)))){
trace("Trigger XML is having 'target' attribute wihout a 'event' attribute, skipping trigger");
continue;
};
};
};
if (this._arrTriggerTypeIndexes[_arg1.trigger[_local2].@type] == null){
this._arrTriggerTypeIndexes[_arg1.trigger[_local2].@type] = new Array();
};
this._arrTriggerTypeIndexes[_arg1.trigger[_local2].@type].push(_local2);
this.addEventListener(_arg1.trigger[_local2].@type, this.doEvent);
};
}
public function applySettings(_arg1:XML, _arg2:IElementContainer):void{
var _local3:Element;
var _local4:XML;
if (_arg1 == null){
throw (ArgumentError("Argument may not be null.\nParameter name: settings"));
};
if (_arg2 == null){
throw (ArgumentError("Argument may not be null.\nParameter name: elementContainer"));
};
this._xmlSettings = _arg1;
this._objElementContainer = _arg2;
this.addEventListener(WidgetEventBase.Name, this.doCatchWidgetEvent);
this.applyDesignSettings(_arg1);
this.applyTriggerSettings(_arg1);
for each (_local4 in _arg1.element) {
_local3 = (DisplayUtils.getDisplayObject(this, _local4.@name, Element, false) as Element);
if (_local3 != null){
_local3.applySettings(_local4, this._objElementContainer);
};
};
}
public function get instanceName():String{
return (this._xmlSettings.@name);
}
public function processWidgetEvent(_arg1:IWidgetEvent){
}
private function doEvent(_arg1:Event){
var _local2:int;
var _local3:XML;
var _local4:String;
var _local5:String;
var _local6:Array;
for each (_local2 in this._arrTriggerTypeIndexes[_arg1.type]) {
_local3 = this._xmlSettings.trigger[_local2];
_local4 = _local3.@target;
_local5 = _local3.@command;
_local6 = ((_local3.@args.length() == 0)) ? new Array() : this.makeArray(_local3.@args.toString());
this.processCustomEvents(_local3);
switch (_local3.@event.toString()){
case "SectionChangeEvent":
this.dispatchEvent(new SectionChangeEvent(_local4, _local6));
break;
case "CommandEvent":
this.dispatchEvent(new CommandEvent(_local4, _local5, _local6));
break;
};
};
}
public function deactivateElement():void{
}
private function processCustomEvents(_arg1:XML){
var _local2:XML;
var _local3:Array;
for each (_local2 in _arg1.customEvent) {
_local3 = ((_local2.@args.length() == 0)) ? new Array() : this.makeArray(_local2.@args.toString());
switch (_local2.@type.toString()){
case "link":
if (_local3.length == 0){
trace("Received customEvent 'link' with no arguments (Attribute 'args')");
} else {
navigateToURL(new URLRequest(_local3[0]), ((_local3.length == 0)) ? "_blank" : _local3[1]);
};
break;
default:
trace(("Received unknown customEvent: " + _local2.@type));
};
};
}
}
}//package se.rocketxl.ui.widget.gui
Section 77
//EventAlphaButton (se.rocketxl.ui.widget.gui.EventAlphaButton)
package se.rocketxl.ui.widget.gui {
import flash.events.*;
import mx.effects.*;
public class EventAlphaButton extends Element {
protected var TWEEN_DURATION:Number;// = 200
protected var _objAnimationTween:Tween;// = null
protected var ACTIVE_ALPHA:Number;// = 1
protected var NOT_ACTIVE_ALPHA:Number;// = 0.5
public function EventAlphaButton(){
NOT_ACTIVE_ALPHA = 0.5;
ACTIVE_ALPHA = 1;
TWEEN_DURATION = 200;
_objAnimationTween = null;
super();
this.buttonMode = true;
this.alpha = NOT_ACTIVE_ALPHA;
this.addEventListener(MouseEvent.MOUSE_OVER, this.doMouseOver);
this.addEventListener(MouseEvent.MOUSE_OUT, this.doMouseOut);
}
private function doMouseOut(_arg1:MouseEvent){
this.setAlpha(NOT_ACTIVE_ALPHA);
}
public function setAlpha(_arg1:Number){
if (this._objAnimationTween != null){
this._objAnimationTween.pause();
this._objAnimationTween = null;
};
this._objAnimationTween = new Tween(this, this.alpha, _arg1, TWEEN_DURATION);
this._objAnimationTween.setTweenHandlers(doTween, doTweenEnd);
}
private function doTweenEnd(_arg1:Number){
this.doTween(_arg1);
this._objAnimationTween = null;
}
private function doTween(_arg1:Number){
this.alpha = _arg1;
}
private function doMouseOver(_arg1:MouseEvent){
this.setAlpha(ACTIVE_ALPHA);
}
}
}//package se.rocketxl.ui.widget.gui
Section 78
//InputListeningElement (se.rocketxl.ui.widget.gui.InputListeningElement)
package se.rocketxl.ui.widget.gui {
import flash.utils.*;
import flash.events.*;
import se.rocketxl.ui.*;
public class InputListeningElement extends TweenInElement {
private var _dtnKeyboardState:Dictionary;
private var _arrAutoHandledKeys:Dictionary;
private var _blnIsAltDown:Boolean;
private var _blnIsShiftDown:Boolean;
private var _blnIsControlDown:Boolean;
public function InputListeningElement(){
var _local1:uint;
super(600);
this._arrAutoHandledKeys = new Dictionary();
this._dtnKeyboardState = new Dictionary();
_local1 = 0;
while (_local1 < 0x0100) {
this._dtnKeyboardState[_local1] = KeyState.OFF;
_local1++;
};
this.addEventListener(Event.REMOVED_FROM_STAGE, this.doRemovedFromStage);
this.addEventListener(Event.ADDED_TO_STAGE, this.doAddedToStage);
}
public function getKeyState(_arg1:uint):KeyState{
if ((((this._arrAutoHandledKeys[_arg1] == true)) && ((this._dtnKeyboardState[_arg1] == KeyState.ACTIVE)))){
this.setKeyHandled(_arg1);
return (KeyState.ACTIVE);
};
return (this._dtnKeyboardState[_arg1]);
}
public function get AutoHandledKeys():Dictionary{
return (this._arrAutoHandledKeys);
}
public function get IsControlDown():Boolean{
return (this._blnIsControlDown);
}
public function isKeyDown(... _args):Boolean{
var _local2:uint;
for each (_local2 in _args) {
if (KeyState.OFF.equals(this.getKeyState(_local2))){
return (false);
};
};
return (true);
}
public function get IsShiftDown():Boolean{
return (this._blnIsShiftDown);
}
public function get IsAltDown():Boolean{
return (this._blnIsAltDown);
}
private function doAddedToStage(_arg1:Event){
if (_arg1.target == this){
this.stage.addEventListener(KeyboardEvent.KEY_DOWN, this.doKeyDown);
this.stage.addEventListener(KeyboardEvent.KEY_UP, this.doKeyUp);
};
}
private function doKeyDown(_arg1:KeyboardEvent){
this.poll(_arg1, true);
}
private function doRemovedFromStage(_arg1:Event){
if (_arg1.target == this){
this.stage.removeEventListener(KeyboardEvent.KEY_DOWN, this.doKeyDown);
this.stage.removeEventListener(KeyboardEvent.KEY_UP, this.doKeyUp);
this.removeEventListener(Event.REMOVED_FROM_STAGE, this.doRemovedFromStage);
this.removeEventListener(Event.ADDED_TO_STAGE, this.doAddedToStage);
};
}
public function isKeyPressed(... _args):Boolean{
var _local2:uint;
for each (_local2 in _args) {
if (!KeyState.ACTIVE.equals(this.getKeyState(_local2))){
return (false);
};
};
return (true);
}
public function isAnyKeyPressed(... _args):Boolean{
var _local2:uint;
for each (_local2 in _args) {
if (this.isKeyPressed(_local2)){
return (true);
};
};
return (false);
}
public function get KeyboardState():Dictionary{
return (this._dtnKeyboardState);
}
private function doKeyUp(_arg1:KeyboardEvent){
this.poll(_arg1, false);
}
private function poll(_arg1:KeyboardEvent, _arg2:Boolean){
this._blnIsAltDown = _arg1.altKey;
this._blnIsControlDown = _arg1.ctrlKey;
this._blnIsShiftDown = _arg1.shiftKey;
if (_arg2){
if (!KeyState.HANDLED.equals(this._dtnKeyboardState[_arg1.keyCode])){
this._dtnKeyboardState[_arg1.keyCode] = KeyState.ACTIVE;
};
} else {
this._dtnKeyboardState[_arg1.keyCode] = KeyState.OFF;
};
}
public function isAnyKeyDown(... _args):Boolean{
var _local2:uint;
for each (_local2 in _args) {
if (this.isKeyDown(_local2)){
return (true);
};
};
return (false);
}
public function setKeyHandled(_arg1:uint):void{
this._dtnKeyboardState[_arg1] = KeyState.HANDLED;
}
}
}//package se.rocketxl.ui.widget.gui
Section 79
//ScrollBar (se.rocketxl.ui.widget.gui.ScrollBar)
package se.rocketxl.ui.widget.gui {
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import flash.events.*;
import se.rocketxl.ui.widget.gui.events.*;
import se.rocketxl.display.*;
public class ScrollBar extends MovieClip {
private var _tmrDecreaseTimer:Timer;
protected var _clpDecreaseButton:MovieClip;
private var _blnIsVertical:Boolean;
protected var _clpPositionHandle:MovieClip;
protected var _clpPositionHandleContainer:MovieClip;
protected var _pntHandleContainerPointToStage:Point;
protected var _blnAddedToStage:Boolean;
private var _intTimeOfLastButtonClick:int;
protected var _clpIncreaseButton:MovieClip;
private var _numPercentage:Number;
private var _tmrIncreaseTimer:Timer;
private var _blnIsHandleMouseDown:Boolean;
public function ScrollBar(_arg1:Boolean){
this._blnAddedToStage = false;
this._blnIsVertical = _arg1;
this._tmrDecreaseTimer = new Timer(25);
this._tmrDecreaseTimer.addEventListener(TimerEvent.TIMER, onDecreaseTimer);
this._tmrIncreaseTimer = new Timer(25);
this._tmrIncreaseTimer.addEventListener(TimerEvent.TIMER, onIncreaseTimer);
this.addEventListener(Event.ADDED_TO_STAGE, this.doAddedToStage);
}
private function onOffsetButtonMouseDown(_arg1:MouseEvent):void{
if (_arg1.target == this._clpDecreaseButton){
this._tmrDecreaseTimer.start();
} else {
if (_arg1.target == this._clpIncreaseButton){
this._tmrIncreaseTimer.start();
};
};
}
private function onHandleMouseUp(_arg1:MouseEvent):void{
this._blnIsHandleMouseDown = false;
}
protected function doAddedToStage(_arg1:Event):void{
if (_arg1.target == this){
this.removeEventListener(Event.ADDED_TO_STAGE, this.doAddedToStage);
this._clpDecreaseButton = (DisplayUtils.getDisplayObject(this, "decreaseButton", MovieClip) as MovieClip);
this._clpDecreaseButton.addEventListener(MouseEvent.MOUSE_DOWN, this.onOffsetButtonMouseDown);
this._clpDecreaseButton.addEventListener(MouseEvent.MOUSE_UP, this.onOffsetButtonMouseUp);
this._clpDecreaseButton.buttonMode = true;
this._clpIncreaseButton = (DisplayUtils.getDisplayObject(this, "increaseButton", MovieClip) as MovieClip);
this._clpIncreaseButton.addEventListener(MouseEvent.MOUSE_DOWN, this.onOffsetButtonMouseDown);
this._clpIncreaseButton.addEventListener(MouseEvent.MOUSE_UP, this.onOffsetButtonMouseUp);
this._clpIncreaseButton.buttonMode = true;
this._clpPositionHandle = (DisplayUtils.getDisplayObject(this, "handle", MovieClip) as MovieClip);
this._clpPositionHandle.addEventListener(MouseEvent.MOUSE_DOWN, this.onHandleMouseDown);
this._clpPositionHandle.buttonMode = true;
this.stage.addEventListener(MouseEvent.MOUSE_UP, this.onHandleMouseUp);
this.stage.addEventListener(MouseEvent.MOUSE_MOVE, this.onMouseMoved);
this._clpPositionHandleContainer = (DisplayUtils.getDisplayObject(this, "handleContainer", MovieClip) as MovieClip);
this._pntHandleContainerPointToStage = DisplayUtils.getPositionToStage(this._clpPositionHandleContainer);
this.offsetHandle(-(uint.MAX_VALUE));
this._blnAddedToStage = true;
};
}
private function onOffsetButtonMouseUp(_arg1:MouseEvent):void{
if (_arg1.target == this._clpDecreaseButton){
this._tmrDecreaseTimer.stop();
} else {
if (_arg1.target == this._clpIncreaseButton){
this._tmrIncreaseTimer.stop();
};
};
}
private function onIncreaseTimer(_arg1:TimerEvent):void{
this.offsetHandle((0.005 * (this._blnIsVertical) ? this._clpPositionHandleContainer.height : this._clpPositionHandleContainer.width));
}
public function get percentage():Number{
return (this._numPercentage);
}
private function onMouseMoved(_arg1:MouseEvent):void{
if (!_arg1.buttonDown){
this._blnIsHandleMouseDown = false;
};
if (this._blnIsHandleMouseDown){
this.setHandlePos((this._blnIsVertical) ? ((_arg1.stageY - this._pntHandleContainerPointToStage.y) + (this._clpPositionHandle.height * 2)) : ((_arg1.stageX - this._pntHandleContainerPointToStage.x) + (this._clpPositionHandle.width * 2)));
};
}
private function onDecreaseTimer(_arg1:TimerEvent):void{
this.offsetHandle((-0.005 * (this._blnIsVertical) ? this._clpPositionHandleContainer.height : this._clpPositionHandleContainer.width));
}
protected function offsetHandle(_arg1:Number){
this.setHandlePos((_arg1 + (this._blnIsVertical) ? this._clpPositionHandle.y : this._clpPositionHandle.x));
}
protected function setHandlePos(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = (this._blnIsVertical) ? (this._clpPositionHandleContainer.height - this._clpPositionHandle.height) : (this._clpPositionHandleContainer.width - this._clpPositionHandle.width);
_local3 = (this._blnIsVertical) ? this._clpPositionHandleContainer.y : this._clpPositionHandleContainer.x;
_local4 = (_arg1 - _local3);
if (_local4 < 0){
_local4 = 0;
} else {
if (_local4 > _local2){
_local4 = _local2;
};
};
if (this._blnIsVertical){
this._clpPositionHandle.y = (_local4 + _local3);
} else {
this._clpPositionHandle.x = (_local4 + _local3);
};
this._numPercentage = (_local4 / _local2);
this.dispatchEvent(new ScrollBarEvent(ScrollBarEvent.SCROLL_VALUE, this._numPercentage));
}
private function onHandleMouseDown(_arg1:MouseEvent):void{
this._blnIsHandleMouseDown = true;
}
}
}//package se.rocketxl.ui.widget.gui
Section 80
//TrackerSection (se.rocketxl.ui.widget.gui.TrackerSection)
package se.rocketxl.ui.widget.gui {
import se.rocketxl.ui.widget.container.*;
import se.rocketxl.ui.widget.events.*;
import se.rocketxl.track.*;
public class TrackerSection extends Element {
protected var trackEvents:Object;
public function TrackerSection(){
trackEvents = {};
super();
}
override public function applySettings(_arg1:XML, _arg2:IElementContainer):void{
var _local3:XML;
super.applySettings(_arg1, _arg2);
if ((((_arg1.@track.length() > 0)) && ((_arg1.@track == "false")))){
Track.setTracking(false);
trace("Tracking is turned off");
} else {
Track.setTracking(true);
};
if (_arg1.@trackerurl.length() > 0){
Track.setTrackerURL(_arg1.@trackerurl);
} else {
trace("Waringin: No trackerurl specified");
};
if (_arg1.@siteid.length() > 0){
Track.setSiteId(_arg1.@siteid);
} else {
trace("Waringin: No siteid specified");
};
if (_arg1.@campaignid.length() > 0){
Track.setCampaign(_arg1.@campaignid);
} else {
trace("Waringin: No campaignid specified");
};
if ((((_arg1.@visitor.length() > 0)) && ((_arg1.@visitor == "false")))){
trace("Waringin: Visitor Tracking turned off");
} else {
Track.trackVisitor();
};
for each (_local3 in _arg1.event) {
trackEvents[_local3.@name] = _local3.@id.toXMLString();
};
}
override public function processWidgetEvent(_arg1:IWidgetEvent){
var _local2:*;
var _local3:String;
if ((_arg1 is CommandEvent)){
_local2 = (_arg1 as CommandEvent);
if (_local2.command == "TRACK"){
_local3 = trackEvents[_local2.args[0]];
if (_local3 != null){
Track.trackAction(_local3);
} else {
trace(("Warning: Event not registerd " + _local2.args[0]));
};
};
} else {
trace("Unknown event type");
};
}
}
}//package se.rocketxl.ui.widget.gui
Section 81
//TweenInElement (se.rocketxl.ui.widget.gui.TweenInElement)
package se.rocketxl.ui.widget.gui {
import flash.geom.*;
import flash.events.*;
import mx.effects.*;
public class TweenInElement extends Element {
private var _blnVisibleValueOnTweenComplete:Boolean;
private var _numDuration:Number;
private var _blnIsCurrentlyTweening:Boolean;// = false
private var _pntDelta:Point;
private var _objAnimationTween:Tween;
private var _blnFade:Boolean;
private var _pntNativePoint:Point;
public function TweenInElement(_arg1:Number=0, _arg2:Boolean=true, _arg3:Point=null, _arg4:Point=null){
_blnIsCurrentlyTweening = false;
super();
this._pntNativePoint = ((_arg4)!=null) ? _arg4 : new Point(this.x, this.y);
this._numDuration = _arg1;
this._blnFade = _arg2;
this._pntDelta = ((_arg3 == null)) ? new Point() : this._pntNativePoint.subtract(_arg3);
}
override public function showElement():void{
if (((!(this.visible)) || (this._blnIsCurrentlyTweening))){
this.visible = true;
this.stopTween();
this._objAnimationTween = new Tween(this, this._numDuration, 0, this._numDuration);
this._objAnimationTween.setTweenHandlers(this.onTween, this.onTweenEnd);
this._blnVisibleValueOnTweenComplete = true;
this._blnIsCurrentlyTweening = true;
};
}
override public function hideElement():void{
if (((this.visible) || (this._blnIsCurrentlyTweening))){
this.stopTween();
this._objAnimationTween = new Tween(this, 0, this._numDuration, this._numDuration);
this._objAnimationTween.setTweenHandlers(this.onTween, this.onTweenEnd);
this._blnVisibleValueOnTweenComplete = false;
this._blnIsCurrentlyTweening = true;
};
}
private function onTweenEnd(_arg1:Number):void{
this.onTween(_arg1);
this.stopTween();
this.visible = this._blnVisibleValueOnTweenComplete;
this._blnIsCurrentlyTweening = false;
this.dispatchEvent(new Event(Event.COMPLETE));
}
private function onTween(_arg1:Number):void{
var _local2:Number;
_local2 = (_arg1 / this._numDuration);
this.y = (this._pntNativePoint.y - (this._pntDelta.y * _local2));
this.x = (this._pntNativePoint.x - (this._pntDelta.x * _local2));
if (this._blnFade){
this.alpha = (1 - _local2);
};
}
private function stopTween():void{
if (this._objAnimationTween != null){
this._objAnimationTween.pause();
this._objAnimationTween = null;
};
}
}
}//package se.rocketxl.ui.widget.gui
Section 82
//VerticalScrollBar (se.rocketxl.ui.widget.gui.VerticalScrollBar)
package se.rocketxl.ui.widget.gui {
import flash.display.*;
import flash.events.*;
public class VerticalScrollBar extends ScrollBar {
public var increaseButton:MovieClip;
public var handleContainer:MovieClip;
public var decreaseButton:MovieClip;
private var _numSetHeightCache:Number;
private var _blnHasHeightCache:Boolean;
public var handle:MovieClip;
public function VerticalScrollBar(){
super(true);
}
public function setHeight(_arg1:Number){
if (super._blnAddedToStage){
this._clpPositionHandleContainer.x = 0;
this._clpPositionHandleContainer.y = (this._clpDecreaseButton.height + 1);
this._clpPositionHandleContainer.height = ((_arg1 - this._clpIncreaseButton.height) - this._clpDecreaseButton.height);
this._clpIncreaseButton.x = (-((this._clpIncreaseButton.width - this._clpPositionHandleContainer.width)) / 2);
this._clpIncreaseButton.y = (this._clpPositionHandleContainer.y + this._clpPositionHandleContainer.height);
this._clpDecreaseButton.x = (-((this._clpDecreaseButton.width - this._clpPositionHandleContainer.width)) / 2);
this._clpDecreaseButton.y = 0;
this._clpPositionHandle.x = (-((this._clpPositionHandle.width - this._clpPositionHandleContainer.width)) / 2);
this._blnHasHeightCache = false;
} else {
this._numSetHeightCache = _arg1;
this._blnHasHeightCache = true;
};
}
override protected function doAddedToStage(_arg1:Event):void{
super.doAddedToStage(_arg1);
if (this._blnHasHeightCache){
this.setHeight(this._numSetHeightCache);
};
}
}
}//package se.rocketxl.ui.widget.gui
Section 83
//KeyState (se.rocketxl.ui.KeyState)
package se.rocketxl.ui {
import se.rocketxl.*;
public class KeyState implements IEnum {
private var value:String;
public static const ACTIVE:KeyState = new KeyState("active");
;
public static const HANDLED:KeyState = new KeyState("handled");
;
public static const OFF:KeyState = new KeyState("off");
;
public function KeyState(_arg1:String){
this.value = _arg1;
}
public function equals(_arg1:Object):Boolean{
return (((((!(_arg1) is KeyState)) || ((_arg1 == null)))) ? false : (_arg1.value == this.value));
}
public function toString():String{
return (this.value);
}
public static function getType(_arg1:String):KeyState{
switch (_arg1){
case OFF.value:
return (OFF);
case ACTIVE.value:
return (ACTIVE);
case HANDLED.value:
return (HANDLED);
};
return (null);
}
}
}//package se.rocketxl.ui
Section 84
//LeafLoader (se.rocketxl.util.LeafLoader)
package se.rocketxl.util {
import flash.display.*;
import flash.utils.*;
import flash.events.*;
import flash.filters.*;
public class LeafLoader extends Sprite {
var visibleLeafCounter:int;
var grayLeafsObject:Sprite;
var grayLeafArray:Array;
var whiteLeafArray:Array;
var whiteLeafsObject:Sprite;
var loaderTimer:Timer;
public function LeafLoader(){
createandRotateLeafs();
loaderTimer = new Timer(200);
loaderTimer.addEventListener(TimerEvent.TIMER, onUppdateLoaderIcon);
visibleLeafCounter = 0;
this.visible = false;
}
public function startLoaderIcon(){
this.visible = true;
loaderTimer.start();
}
public function stopLoaderIcon(){
this.visible = false;
loaderTimer.stop();
}
public function onUppdateLoaderIcon(_arg1:TimerEvent){
whiteLeafArray[visibleLeafCounter].fadeOut();
visibleLeafCounter++;
if (visibleLeafCounter >= whiteLeafArray.length){
visibleLeafCounter = 0;
};
}
private function createandRotateLeafs(){
var _local1:Number;
grayLeafArray = new Array();
grayLeafsObject = new Sprite();
whiteLeafArray = new Array();
whiteLeafsObject = new Sprite();
_local1 = 0;
while (_local1 < 8) {
grayLeafArray[_local1] = new LoaderLeafGray();
grayLeafArray[_local1].rotation = ((360 / 8) * _local1);
grayLeafsObject.addChild(grayLeafArray[_local1]);
whiteLeafArray[_local1] = new LoaderLeafWhite();
whiteLeafArray[_local1].rotation = ((360 / 8) * _local1);
whiteLeafArray[_local1].alpha = 0;
whiteLeafsObject.addChild(whiteLeafArray[_local1]);
_local1++;
};
addChild(grayLeafsObject);
addChild(whiteLeafsObject);
grayLeafsObject.filters = [new DropShadowFilter(0, 0, 0, 0)];
whiteLeafsObject.filters = [new DropShadowFilter(0, 0, 0, 0)];
}
}
}//package se.rocketxl.util
Section 85
//LoaderLeafGray (se.rocketxl.util.LoaderLeafGray)
package se.rocketxl.util {
import flash.display.*;
import mx.effects.*;
public class LoaderLeafGray extends Sprite {
public function fadeOut(){
var _local1:Tween;
_local1 = new Tween(this, 2, 0, 2000);
_local1.setTweenHandlers(onTweenFade, onTweenFade);
}
public function onTweenFade(_arg1:Number){
alpha = _arg1;
}
}
}//package se.rocketxl.util
Section 86
//LoaderLeafWhite (se.rocketxl.util.LoaderLeafWhite)
package se.rocketxl.util {
import flash.display.*;
import mx.effects.*;
public class LoaderLeafWhite extends Sprite {
public function fadeOut(){
var _local1:Tween;
_local1 = new Tween(this, 2, 0, 2000);
_local1.setTweenHandlers(onTweenFade, onTweenFade);
}
public function onTweenFade(_arg1:Number){
alpha = _arg1;
}
}
}//package se.rocketxl.util
Section 87
//Mailer (se.rocketxl.util.Mailer)
package se.rocketxl.util {
import flash.net.*;
import flash.events.*;
public class Mailer extends EventDispatcher {
protected var _mailerUrl:String;
var statusMessage:XML;
var mailLoader:URLLoader;
public function Mailer(){
mailLoader = new URLLoader();
}
public function setMailerUrl(_arg1:String){
_mailerUrl = _arg1;
}
public function onMailSent(_arg1:Event){
statusMessage = new XML(mailLoader.data);
if (statusMessage.output.@type == "sent"){
dispatchEvent(new MailerEvents(MailerEvents.MAIL_SENT));
} else {
dispatchEvent(new MailerEvents(MailerEvents.MAIL_ERROR));
};
}
public function sendMail(_arg1:String, _arg2:String, _arg3:String, _arg4:String){
var _local5:URLRequest;
var _local6:URLVariables;
_local5 = new URLRequest(_mailerUrl);
_local6 = new URLVariables();
if (_arg1 != ""){
_local6.sName = _arg1;
};
if (_arg2 != ""){
_local6.sEmail = _arg2;
};
if (_arg3 != ""){
_local6.rEmail = _arg3;
};
if (_arg4 != ""){
_local6.sMessage = _arg4;
};
_local5.data = _local6;
_local5.method = URLRequestMethod.POST;
mailLoader.load(_local5);
mailLoader.addEventListener(Event.COMPLETE, onMailSent);
}
}
}//package se.rocketxl.util
Section 88
//MailerEvents (se.rocketxl.util.MailerEvents)
package se.rocketxl.util {
import flash.events.*;
public class MailerEvents extends Event {
public static var MAIL_SENT:String = "mailSent";
public static var MAIL_ERROR:String = "mailError";
public function MailerEvents(_arg1:String){
super(_arg1);
}
}
}//package se.rocketxl.util
Section 89
//Guid (se.rocketxl.Guid)
package se.rocketxl {
public class Guid {
private var _strGuid;
private static const _delimiter:String = "-";
public function Guid(_arg1:String){
if (((!((_arg1 == null))) && (!(IsGuid(_arg1))))){
throw (new Error(("Argument is not a Guid.\nParameter name: guidString\nParameter value: " + _arg1)));
};
this._strGuid = _arg1;
}
public function toString():String{
return (this._strGuid);
}
public static function NewString():String{
var _local1:String;
var _local2:int;
var _local3:int;
var _local4:Number;
_local1 = "";
_local2 = 0;
while (_local2 < 8) {
_local1 = (_local1 + StringUtils.ALPHA_CHARS[Math.round((Math.random() * (StringUtils.ALPHA_CHARS.length - 1)))]);
_local2++;
};
_local2 = 0;
while (_local2 < 3) {
_local1 = (_local1 + "-");
_local3 = 0;
while (_local3 < 4) {
_local1 = (_local1 + StringUtils.ALPHA_CHARS[Math.round((Math.random() * (StringUtils.ALPHA_CHARS.length - 1)))]);
_local3++;
};
_local2++;
};
_local1 = (_local1 + "-");
_local4 = new Date().getTime();
_local1 = (_local1 + ("0000000" + _local4.toString(16).toUpperCase()).substr(-8));
_local2 = 0;
while (_local2 < 4) {
_local1 = (_local1 + StringUtils.ALPHA_CHARS[Math.round((Math.random() * (StringUtils.ALPHA_CHARS.length - 1)))]);
_local2++;
};
return ((("{" + _local1) + "}"));
}
public static function IsGuid(_arg1:String){
var _local2:Array;
var _local3:String;
_arg1 = StringUtils.SpecificTrim(_arg1, "{", "}");
_local2 = _arg1.split(Guid._delimiter);
if (_local2.length != 5){
return (false);
};
if (((((((((!(((_local2[0] as String).length == 8))) || (!(((_local2[1] as String).length == 4))))) || (!(((_local2[2] as String).length == 4))))) || (!(((_local2[3] as String).length == 4))))) || (!(((_local2[4] as String).length == 12))))){
return (false);
};
for each (_local3 in _local2) {
if (!StringUtils.IsHexString(_local3)){
return (false);
};
};
return (true);
}
public static function New():Guid{
return (new Guid(NewString()));
}
}
}//package se.rocketxl
Section 90
//IEnum (se.rocketxl.IEnum)
package se.rocketxl {
public interface IEnum {
function toString():String;
function equals(_arg1:Object):Boolean;
}
}//package se.rocketxl
Section 91
//StringUtils (se.rocketxl.StringUtils)
package se.rocketxl {
public class StringUtils {
private static const RTrimExp:RegExp = /(\s|\n|\r|\t|\v)*$/;
private static const LTrimExp:RegExp = /^(\s|\n|\r|\t|\v)*/m;
public static var ALPHA_CHARS:Array = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "A", "B", "C", "D", "E", "F");
public static function Trim(_arg1:String){
return (LTrim(RTrim(_arg1)));
}
public static function LTrim(_arg1:String){
return (_arg1.replace(RTrimExp, ""));
}
public static function IsHexString(_arg1:String):Boolean{
var _local2:int;
while (_local2 < _arg1.length) {
if (ALPHA_CHARS.indexOf(_arg1.charAt(_local2)) == -1){
return (false);
};
_local2++;
};
return (true);
}
public static function RTrim(_arg1:String){
return (_arg1.replace(LTrimExp, ""));
}
public static function Format(_arg1:String, ... _args):String{
var re:RegExp;
var getParam:Function;
var format = _arg1;
var params = _args;
if (params.length == 0){
return (format);
};
re = /\{(\d+)\}/g;
getParam = function (_arg1:String, _arg2:String, _arg3:int, _arg4:String):String{
if (params[_arg2] == null){
throw (new ArgumentError("Could not parse format"));
};
return (params[_arg2]);
};
return (format.replace(re, getParam));
}
public static function IsHexNumber(_arg1:Number):Boolean{
return (!((ALPHA_CHARS.indexOf(String.fromCharCode(_arg1)) == -1)));
}
public static function SpecificTrim(_arg1:String, _arg2:String, _arg3:String=null):String{
var _local4:int;
if (_arg2 == null){
_arg2 = " ";
};
if (_arg3 == null){
_arg3 = _arg2;
};
if (_arg1.substr(0, _arg2.length) == _arg2){
_arg1 = _arg1.substr(_arg2.length);
};
_local4 = (_arg1.length - _arg3.length);
if (_arg1.substr(_local4) == _arg3){
_arg1 = _arg1.substr(0, _local4);
};
return (_arg1);
}
}
}//package se.rocketxl
Section 92
//BackToMainMenuButton (BackToMainMenuButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class BackToMainMenuButton extends EventAlphaButton {
}
}//package
Section 93
//BadNoteSound1 (BadNoteSound1)
package {
import flash.media.*;
public dynamic class BadNoteSound1 extends Sound {
}
}//package
Section 94
//BadNoteSound2 (BadNoteSound2)
package {
import flash.media.*;
public dynamic class BadNoteSound2 extends Sound {
}
}//package
Section 95
//BadNoteSound3 (BadNoteSound3)
package {
import flash.media.*;
public dynamic class BadNoteSound3 extends Sound {
}
}//package
Section 96
//BadNoteSound4 (BadNoteSound4)
package {
import flash.media.*;
public dynamic class BadNoteSound4 extends Sound {
}
}//package
Section 97
//BadNoteSound5 (BadNoteSound5)
package {
import flash.media.*;
public dynamic class BadNoteSound5 extends Sound {
}
}//package
Section 98
//BadNoteSound6 (BadNoteSound6)
package {
import flash.media.*;
public dynamic class BadNoteSound6 extends Sound {
}
}//package
Section 99
//ClickToStartPlayingButton (ClickToStartPlayingButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class ClickToStartPlayingButton extends EventAlphaButton {
}
}//package
Section 100
//ComboBox (ComboBox)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class ComboBox extends ComboBox {
}
}//package
Section 101
//ComboBoxItemTemplate (ComboBoxItemTemplate)
package {
import flash.display.*;
import flash.text.*;
public dynamic class ComboBoxItemTemplate extends MovieClip {
public var textField:TextField;
}
}//package
Section 102
//CopyToClipboardButton (CopyToClipboardButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class CopyToClipboardButton extends EventAlphaButton {
}
}//package
Section 103
//CrowdCompleteSongSound (CrowdCompleteSongSound)
package {
import flash.media.*;
public dynamic class CrowdCompleteSongSound extends Sound {
}
}//package
Section 104
//CrowdFailSongSound (CrowdFailSongSound)
package {
import flash.media.*;
public dynamic class CrowdFailSongSound extends Sound {
}
}//package
Section 105
//GotoGetCodeButton (GotoGetCodeButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class GotoGetCodeButton extends EventAlphaButton {
}
}//package
Section 106
//GotoHighScoresButton (GotoHighScoresButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class GotoHighScoresButton extends EventAlphaButton {
}
}//package
Section 107
//GotoInstructionsButton (GotoInstructionsButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class GotoInstructionsButton extends EventAlphaButton {
}
}//package
Section 108
//GotoShareWithFriendButton (GotoShareWithFriendButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class GotoShareWithFriendButton extends EventAlphaButton {
}
}//package
Section 109
//GotoStartRockingButton (GotoStartRockingButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class GotoStartRockingButton extends EventAlphaButton {
}
}//package
Section 110
//GoToSubmitSectionButton (GoToSubmitSectionButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class GoToSubmitSectionButton extends EventAlphaButton {
}
}//package
Section 111
//GuiObject (GuiObject)
package {
import se.rocketxl.ui.widget.container.*;
public dynamic class GuiObject extends WidgetContent {
}
}//package
Section 112
//GuitarHeroLogoButton (GuitarHeroLogoButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class GuitarHeroLogoButton extends Element {
}
}//package
Section 113
//HighScoreSongButton1 (HighScoreSongButton1)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class HighScoreSongButton1 extends EventAlphaButton {
}
}//package
Section 114
//HighScoreSongButton2 (HighScoreSongButton2)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class HighScoreSongButton2 extends EventAlphaButton {
}
}//package
Section 115
//HighScoreSongButton3 (HighScoreSongButton3)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class HighScoreSongButton3 extends EventAlphaButton {
}
}//package
Section 116
//instructionsButton (instructionsButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class instructionsButton extends EventAlphaButton {
}
}//package
Section 117
//LoaderIcon (LoaderIcon)
package {
import se.rocketxl.util.*;
public dynamic class LoaderIcon extends LeafLoader {
}
}//package
Section 118
//NewSongButton2 (NewSongButton2)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class NewSongButton2 extends EventAlphaButton {
}
}//package
Section 119
//NoButton (NoButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class NoButton extends EventAlphaButton {
}
}//package
Section 120
//PlayAgainButton (PlayAgainButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class PlayAgainButton extends EventAlphaButton {
}
}//package
Section 121
//PrivacyPolicyButton (PrivacyPolicyButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class PrivacyPolicyButton extends EventAlphaButton {
}
}//package
Section 122
//ResumeButton (ResumeButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class ResumeButton extends EventAlphaButton {
}
}//package
Section 123
//RetryButton (RetryButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class RetryButton extends EventAlphaButton {
}
}//package
Section 124
//Section1 (Section1)
package {
import se.rocketxl.ui.widget.gui.share.*;
public dynamic class Section1 extends GrabCodeSection {
}
}//package
Section 125
//Section2 (Section2)
package {
import se.rocketxl.ui.widget.gui.share.*;
public dynamic class Section2 extends ShareWithaFriendSection {
}
}//package
Section 126
//SongCardButton1 (SongCardButton1)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class SongCardButton1 extends EventAlphaButton {
}
}//package
Section 127
//SongCardButton2 (SongCardButton2)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class SongCardButton2 extends EventAlphaButton {
}
}//package
Section 128
//SongCardButton3 (SongCardButton3)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class SongCardButton3 extends EventAlphaButton {
}
}//package
Section 129
//SongSelectionButton (SongSelectionButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class SongSelectionButton extends EventAlphaButton {
}
}//package
Section 130
//SpAvailableSound (SpAvailableSound)
package {
import flash.media.*;
public dynamic class SpAvailableSound extends Sound {
}
}//package
Section 131
//SpAwardedSound1 (SpAwardedSound1)
package {
import flash.media.*;
public dynamic class SpAwardedSound1 extends Sound {
}
}//package
Section 132
//SpAwardedSound2 (SpAwardedSound2)
package {
import flash.media.*;
public dynamic class SpAwardedSound2 extends Sound {
}
}//package
Section 133
//SpCheerSound1 (SpCheerSound1)
package {
import flash.media.*;
public dynamic class SpCheerSound1 extends Sound {
}
}//package
Section 134
//SpCheerSound2 (SpCheerSound2)
package {
import flash.media.*;
public dynamic class SpCheerSound2 extends Sound {
}
}//package
Section 135
//SpDeployedSound (SpDeployedSound)
package {
import flash.media.*;
public dynamic class SpDeployedSound extends Sound {
}
}//package
Section 136
//SubmitScoreButton (SubmitScoreButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class SubmitScoreButton extends EventAlphaButton {
}
}//package
Section 137
//TopOverlay (TopOverlay)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class TopOverlay extends Element {
}
}//package
Section 138
//VerticalScrollBar (VerticalScrollBar)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class VerticalScrollBar extends VerticalScrollBar {
}
}//package
Section 139
//ViewHighScoresButton (ViewHighScoresButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class ViewHighScoresButton extends EventAlphaButton {
}
}//package
Section 140
//YesButton (YesButton)
package {
import se.rocketxl.ui.widget.gui.*;
public dynamic class YesButton extends EventAlphaButton {
}
}//package