Section 1
//alert_modal_window_mc_4 (AMG07_en_fla.alert_modal_window_mc_4)
package AMG07_en_fla {
import flash.display.*;
public dynamic class alert_modal_window_mc_4 extends MovieClip {
public var close_btn:MovieClip;
public var description_mc:MovieClip;
public var bg_mc:MovieClip;
public var title_mc:MovieClip;
}
}//package AMG07_en_fla
Section 2
//AMGlogo_25 (AMG07_en_fla.AMGlogo_25)
package AMG07_en_fla {
import flash.display.*;
public dynamic class AMGlogo_25 extends MovieClip {
public function AMGlogo_25(){
addFrameScript(99, frame100);
}
function frame100(){
stop();
}
}
}//package AMG07_en_fla
Section 3
//angle_mc_76 (AMG07_en_fla.angle_mc_76)
package AMG07_en_fla {
import flash.display.*;
public dynamic class angle_mc_76 extends MovieClip {
public var car_mc:MovieClip;
}
}//package AMG07_en_fla
Section 4
//arrow_base_fade_69 (AMG07_en_fla.arrow_base_fade_69)
package AMG07_en_fla {
import flash.display.*;
public dynamic class arrow_base_fade_69 extends MovieClip {
public function arrow_base_fade_69(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package AMG07_en_fla
Section 5
//background_mc_32 (AMG07_en_fla.background_mc_32)
package AMG07_en_fla {
import flash.display.*;
public dynamic class background_mc_32 extends MovieClip {
public var clouds_mc:MovieClip;
public var mountains_mc:MovieClip;
}
}//package AMG07_en_fla
Section 6
//black_copyanim_143 (AMG07_en_fla.black_copyanim_143)
package AMG07_en_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import flash.xml.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class black_copyanim_143 extends MovieClip {
public var btn_learn_more:MovieClip;
public var btn_visit_amg:MovieClip;
public function black_copyanim_143(){
addFrameScript(37, frame38);
}
public function navToLearnMore(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.mercedes-amg.com/drift/AMG_DrivingAcademy_en.pdf"));
}
function frame38(){
btn_learn_more.addEventListener(MouseEvent.CLICK, navToLearnMore);
btn_learn_more.addEventListener(MouseEvent.ROLL_OVER, btnRollover);
btn_learn_more.addEventListener(MouseEvent.ROLL_OUT, btnRollout);
btn_visit_amg.addEventListener(MouseEvent.CLICK, navToWebsite);
btn_visit_amg.addEventListener(MouseEvent.ROLL_OVER, btnRollover);
btn_visit_amg.addEventListener(MouseEvent.ROLL_OUT, btnRollout);
btn_learn_more.buttonMode = (btn_visit_amg.buttonMode = true);
this.stop();
}
public function btnRollover(_arg1:MouseEvent):void{
_arg1.target.gotoAndPlay("_rollover");
}
public function btnRollout(_arg1:MouseEvent):void{
_arg1.target.gotoAndStop(1);
}
public function navToWebsite(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.mercedes-amg.com/CLK_Black_Series"));
}
}
}//package AMG07_en_fla
Section 7
//black_series_MC_139 (AMG07_en_fla.black_series_MC_139)
package AMG07_en_fla {
import com.mercedesamg.gs.*;
import flash.display.*;
public dynamic class black_series_MC_139 extends MovieClip {
public var about_image_mc:MovieClip;
public function black_series_MC_139(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
TweenFilterLite.from(about_image_mc, 2, {type:"Color", colorize:3407871, amount:0.4, brightness:5, saturation:5, delay:0, onComplete:onFinishFrameTween});
TweenFilterLite.from(about_image_mc, 2, {type:"blur", blurX:20, blurY:20, delay:0, overwrite:false});
this.stop();
}
function frame20(){
this.stop();
}
public function onFinishFrameTween():void{
gotoAndPlay(2);
}
}
}//package AMG07_en_fla
Section 8
//BlackSeries_intro_141 (AMG07_en_fla.BlackSeries_intro_141)
package AMG07_en_fla {
import flash.display.*;
public dynamic class BlackSeries_intro_141 extends MovieClip {
public function BlackSeries_intro_141(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package AMG07_en_fla
Section 9
//bottomlinksmask_15 (AMG07_en_fla.bottomlinksmask_15)
package AMG07_en_fla {
import flash.display.*;
public dynamic class bottomlinksmask_15 extends MovieClip {
public function bottomlinksmask_15(){
addFrameScript(99, frame100);
}
function frame100(){
stop();
}
}
}//package AMG07_en_fla
Section 10
//btn_about_23 (AMG07_en_fla.btn_about_23)
package AMG07_en_fla {
import flash.display.*;
public dynamic class btn_about_23 extends MovieClip {
public function btn_about_23(){
addFrameScript(0, frame1, 14, frame15, 24, frame25);
}
function frame15(){
this.stop();
}
function frame1(){
this.stop();
}
function frame25(){
this.stop();
}
}
}//package AMG07_en_fla
Section 11
//btn_learn_more_144 (AMG07_en_fla.btn_learn_more_144)
package AMG07_en_fla {
import flash.display.*;
public dynamic class btn_learn_more_144 extends MovieClip {
public function btn_learn_more_144(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
this.stop();
}
function frame1(){
this.stop();
}
}
}//package AMG07_en_fla
Section 12
//btn_send_to_friend_21 (AMG07_en_fla.btn_send_to_friend_21)
package AMG07_en_fla {
import flash.display.*;
public dynamic class btn_send_to_friend_21 extends MovieClip {
public function btn_send_to_friend_21(){
addFrameScript(0, frame1, 14, frame15, 24, frame25);
}
function frame15(){
this.stop();
}
function frame1(){
this.stop();
}
function frame25(){
this.stop();
}
}
}//package AMG07_en_fla
Section 13
//btn_start_comp_16 (AMG07_en_fla.btn_start_comp_16)
package AMG07_en_fla {
import flash.display.*;
public dynamic class btn_start_comp_16 extends MovieClip {
public function btn_start_comp_16(){
addFrameScript(0, frame1, 14, frame15, 24, frame25);
}
function frame15(){
this.stop();
}
function frame1(){
this.stop();
}
function frame25(){
this.stop();
}
}
}//package AMG07_en_fla
Section 14
//btn_view_scores_19 (AMG07_en_fla.btn_view_scores_19)
package AMG07_en_fla {
import flash.display.*;
public dynamic class btn_view_scores_19 extends MovieClip {
public function btn_view_scores_19(){
addFrameScript(0, frame1, 14, frame15, 24, frame25);
}
function frame15(){
this.stop();
}
function frame1(){
this.stop();
}
function frame25(){
this.stop();
}
}
}//package AMG07_en_fla
Section 15
//btn_visit_amg_123 (AMG07_en_fla.btn_visit_amg_123)
package AMG07_en_fla {
import flash.display.*;
public dynamic class btn_visit_amg_123 extends MovieClip {
public function btn_visit_amg_123(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
this.stop();
}
function frame1(){
this.stop();
}
}
}//package AMG07_en_fla
Section 16
//car_view_mc_36 (AMG07_en_fla.car_view_mc_36)
package AMG07_en_fla {
import flash.display.*;
public dynamic class car_view_mc_36 extends MovieClip {
public function car_view_mc_36(){
addFrameScript(0, frame1);
}
function frame1(){
this.stop();
}
}
}//package AMG07_en_fla
Section 17
//close_btn_8 (AMG07_en_fla.close_btn_8)
package AMG07_en_fla {
import flash.display.*;
public dynamic class close_btn_8 extends MovieClip {
public function close_btn_8(){
addFrameScript(0, frame1);
}
function frame1(){
this.stop();
}
}
}//package AMG07_en_fla
Section 18
//Countdown_49 (AMG07_en_fla.Countdown_49)
package AMG07_en_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import flash.xml.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Countdown_49 extends MovieClip {
public function Countdown_49(){
addFrameScript(102, frame103);
}
function frame103(){
this.master.play();
this.stop();
}
}
}//package AMG07_en_fla
Section 19
//countdownanim_46 (AMG07_en_fla.countdownanim_46)
package AMG07_en_fla {
import flash.events.*;
import flash.display.*;
import com.mercedesamg.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import flash.xml.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class countdownanim_46 extends MovieClip {
public var countdown_mc:MovieClip;
public function countdownanim_46(){
addFrameScript(0, frame1, 21, frame22, 24, frame25, 31, frame32);
}
function frame22(){
this.stop();
countdown_mc.master = this;
}
function frame25(){
DriftRevolution.getInstance().startGame();
}
function frame1(){
this.stop();
}
function frame32(){
this.stop();
}
}
}//package AMG07_en_fla
Section 20
//description_mc_6 (AMG07_en_fla.description_mc_6)
package AMG07_en_fla {
import flash.display.*;
import flash.text.*;
public dynamic class description_mc_6 extends MovieClip {
public var description_txt:TextField;
}
}//package AMG07_en_fla
Section 21
//driftbutton_88 (AMG07_en_fla.driftbutton_88)
package AMG07_en_fla {
import flash.display.*;
public dynamic class driftbutton_88 extends MovieClip {
public var drift_btn:SimpleButton;
public function driftbutton_88(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package AMG07_en_fla
Section 22
//enterName_66 (AMG07_en_fla.enterName_66)
package AMG07_en_fla {
import flash.display.*;
import flash.text.*;
public dynamic class enterName_66 extends MovieClip {
public var name_txt:TextField;
}
}//package AMG07_en_fla
Section 23
//game_MC_29 (AMG07_en_fla.game_MC_29)
package AMG07_en_fla {
import flash.display.*;
import flash.text.*;
public dynamic class game_MC_29 extends MovieClip {
public var car_view_mc:MovieClip;
public var steering_wheel_mc:MovieClip;
public var drift_particles_front_mc:MovieClip;
public var track_mc:MovieClip;
public var speedo_mc:MovieClip;
public var distance_txt:TextField;
public var rear_snow_mc:MovieClip;
public var bonus_txt:TextField;
public var background_mc:MovieClip;
public var countdown_mc:MovieClip;
public var minimap_mc:MovieClip;
public var drift_particles_back_mc:MovieClip;
public var angle_mc:MovieClip;
public var status_icons_mc:MovieClip;
public var gameover_mc:MovieClip;
public var submit_score_mc:MovieClip;
public var game_clock_txt:TextField;
public function game_MC_29(){
addFrameScript(0, frame1);
}
function frame1(){
this.stop();
}
}
}//package AMG07_en_fla
Section 24
//gameover_54 (AMG07_en_fla.gameover_54)
package AMG07_en_fla {
import flash.events.*;
import flash.display.*;
import com.mercedesamg.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import flash.xml.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class gameover_54 extends MovieClip {
public var scoring_fields_mc:MovieClip;
public var play_again_btn:MovieClip;
public function gameover_54(){
addFrameScript(0, frame1, 98, frame99);
}
function frame1(){
this.stop();
}
public function btnRollover(_arg1:MouseEvent):void{
_arg1.target.gotoAndPlay("_rollover");
}
function frame99(){
play_again_btn.addEventListener(MouseEvent.CLICK, playAgain);
play_again_btn.addEventListener(MouseEvent.ROLL_OVER, btnRollover);
play_again_btn.addEventListener(MouseEvent.ROLL_OUT, btnRollout);
play_again_btn.buttonMode = true;
this.stop();
}
public function btnRollout(_arg1:MouseEvent):void{
_arg1.target.gotoAndStop("_null");
}
public function playAgain(_arg1:MouseEvent):void{
DriftRevolution.getInstance().onPlayAgainClicked();
}
}
}//package AMG07_en_fla
Section 25
//gameovercopyanim_60 (AMG07_en_fla.gameovercopyanim_60)
package AMG07_en_fla {
import flash.display.*;
public dynamic class gameovercopyanim_60 extends MovieClip {
public function gameovercopyanim_60(){
addFrameScript(27, frame28);
}
function frame28(){
stop();
}
}
}//package AMG07_en_fla
Section 26
//highscore_intro_118 (AMG07_en_fla.highscore_intro_118)
package AMG07_en_fla {
import flash.events.*;
import flash.display.*;
import com.mercedesamg.utils.*;
import com.mercedesamg.serverComm.*;
import com.mercedesamg.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import flash.xml.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class highscore_intro_118 extends MovieClip {
public var score1:TextField;
public var name0:TextField;
public var name1:TextField;
public var name3:TextField;
public var name4:TextField;
public var name6:TextField;
public var name8:TextField;
public var name2:TextField;
public var score5:TextField;
public var name5:TextField;
public var hs:HighScores;
public var name7:TextField;
public var score6:TextField;
public var name9:TextField;
public var alertTimer:Timer;
public var country1:TextField;
public var country3:TextField;
public var country5:TextField;
public var country2:TextField;
public var country0:TextField;
public var country9:TextField;
public var country4:TextField;
public var country7:TextField;
public var country8:TextField;
public var country6:TextField;
public var score0:TextField;
public var score2:TextField;
public var score3:TextField;
public var score7:TextField;
public var score8:TextField;
public var score4:TextField;
public var score9:TextField;
public function highscore_intro_118(){
addFrameScript(41, frame42);
}
public function scoresReceived(_arg1:Event):void{
renderScores();
alertTimer.start();
}
public function renderScores():void{
var _local1:Array;
var _local2:uint;
_local1 = HighScores.getInstance().getHighScores();
_local2 = 0;
while (_local2 < 10) {
this[("name" + _local2)].text = _local1[_local2].racename;
this[("country" + _local2)].text = _local1[_local2].country;
this[("score" + _local2)].text = _local1[_local2].score;
_local2++;
};
if (HighScores.getInstance().scoreSubmitted){
HighScores.getInstance().scoreSubmitted = false;
} else {
HighScores.getInstance().removeEventListener(HighScores.HIGH_SCORES_RECEIVED, scoresReceived);
};
}
public function hideLoadingScreen(_arg1:TimerEvent):void{
AlertModalWindow.getInstance().hideMessage();
alertTimer.removeEventListener(TimerEvent.TIMER, hideLoadingScreen);
DriftRevolution.getInstance().unlockNavigation();
}
public function wipeoutScores():void{
var _local1:uint;
_local1 = 0;
while (_local1 < 10) {
this[("name" + _local1)].text = "...";
this[("country" + _local1)].text = "...";
this[("score" + _local1)].text = "...";
_local1++;
};
}
function frame42(){
this.stop();
wipeoutScores();
alertTimer = new Timer(1000, 1);
alertTimer.addEventListener(TimerEvent.TIMER, hideLoadingScreen);
hs = HighScores.getInstance();
DriftRevolution.getInstance().lockNavigation();
hs.addEventListener(HighScores.HIGH_SCORES_RECEIVED, scoresReceived);
AlertModalWindow.getInstance().showMessage("Loading High Scores", "Please wait one moment while we load the most recent scores.", false);
hs.loadHighScores();
}
}
}//package AMG07_en_fla
Section 27
//highscorebox_65 (AMG07_en_fla.highscorebox_65)
package AMG07_en_fla {
import flash.events.*;
import flash.display.*;
import com.mercedesamg.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import flash.xml.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class highscorebox_65 extends MovieClip {
public var scrollDirection:Boolean;
public var cTimer:Timer;
public var countries:Array;
public var name_mc:MovieClip;
public var highscore_btn:MovieClip;
public var currentCountry:uint;
public var country_mc:MovieClip;
public function highscorebox_65(){
addFrameScript(0, frame1, 26, frame27, 51, frame52);
}
public function arrowDownOut(_arg1:MouseEvent):void{
country_mc.arrow_down.gotoAndStop("_null");
}
public function arrowUpOut(_arg1:MouseEvent):void{
country_mc.arrow_up.gotoAndStop("_null");
}
public function btnRollOver(_arg1:MouseEvent):void{
highscore_btn.gotoAndPlay("_rollover");
}
public function scrollCountries(_arg1:TimerEvent):void{
if (!scrollDirection){
currentCountry = Math.max(0, (currentCountry - 1));
country_mc.country_txt.text = countries[currentCountry].name;
} else {
currentCountry = Math.min(countries.length, (currentCountry + 1));
country_mc.country_txt.text = countries[currentCountry].name;
};
}
public function arrowUpClick(_arg1:MouseEvent):void{
currentCountry = Math.max(0, (currentCountry - 1));
country_mc.country_txt.text = countries[currentCountry].name;
scrollDirection = false;
cTimer.start();
}
public function arrowUpOver(_arg1:MouseEvent):void{
country_mc.arrow_up.gotoAndPlay("_rollover");
}
function frame27(){
this.stop();
countries = MiscDataProviders.getCountriesList();
currentCountry = 0;
country_mc.country_txt.text = countries[currentCountry].name;
scrollDirection = false;
cTimer = new Timer(100);
cTimer.addEventListener(TimerEvent.TIMER, scrollCountries);
highscore_btn.addEventListener(MouseEvent.ROLL_OVER, btnRollOver);
highscore_btn.addEventListener(MouseEvent.ROLL_OUT, btnRollOut);
highscore_btn.buttonMode = true;
country_mc.arrow_up.addEventListener(MouseEvent.ROLL_OVER, arrowUpOver);
country_mc.arrow_up.addEventListener(MouseEvent.ROLL_OUT, arrowUpOut);
country_mc.arrow_up.addEventListener(MouseEvent.MOUSE_DOWN, arrowUpClick);
country_mc.arrow_up.addEventListener(MouseEvent.MOUSE_UP, cancelCountryScrolling);
country_mc.arrow_down.addEventListener(MouseEvent.ROLL_OVER, arrowDownOver);
country_mc.arrow_down.addEventListener(MouseEvent.ROLL_OUT, arrowDownOut);
country_mc.arrow_down.addEventListener(MouseEvent.MOUSE_DOWN, arrowDownClick);
country_mc.arrow_down.addEventListener(MouseEvent.MOUSE_UP, cancelCountryScrolling);
}
function frame1(){
this.stop();
}
public function btnRollOut(_arg1:MouseEvent):void{
highscore_btn.gotoAndStop("_null");
}
public function cancelCountryScrolling(_arg1:MouseEvent):void{
cTimer.stop();
}
public function arrowDownOver(_arg1:MouseEvent):void{
country_mc.arrow_down.gotoAndPlay("_rollover");
}
function frame52(){
}
public function arrowDownClick(_arg1:MouseEvent):void{
currentCountry = Math.min(countries.length, (currentCountry + 1));
country_mc.country_txt.text = countries[currentCountry].name;
scrollDirection = true;
cTimer.start();
}
}
}//package AMG07_en_fla
Section 28
//highscoreboxes_93 (AMG07_en_fla.highscoreboxes_93)
package AMG07_en_fla {
import flash.display.*;
public dynamic class highscoreboxes_93 extends MovieClip {
public function highscoreboxes_93(){
addFrameScript(21, frame22);
}
function frame22(){
stop();
}
}
}//package AMG07_en_fla
Section 29
//highscoresheadline_119 (AMG07_en_fla.highscoresheadline_119)
package AMG07_en_fla {
import flash.display.*;
public dynamic class highscoresheadline_119 extends MovieClip {
public function highscoresheadline_119(){
addFrameScript(41, frame42);
}
function frame42(){
stop();
}
}
}//package AMG07_en_fla
Section 30
//home_page_MC_82 (AMG07_en_fla.home_page_MC_82)
package AMG07_en_fla {
import flash.display.*;
public dynamic class home_page_MC_82 extends MovieClip {
public var logo_mc:MovieClip;
public function home_page_MC_82(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package AMG07_en_fla
Section 31
//homepageimage_83 (AMG07_en_fla.homepageimage_83)
package AMG07_en_fla {
import flash.display.*;
public dynamic class homepageimage_83 extends MovieClip {
public var logo_mc:MovieClip;
}
}//package AMG07_en_fla
Section 32
//instr_copy_115 (AMG07_en_fla.instr_copy_115)
package AMG07_en_fla {
import flash.display.*;
public dynamic class instr_copy_115 extends MovieClip {
public function instr_copy_115(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package AMG07_en_fla
Section 33
//instructiondivboxes_116 (AMG07_en_fla.instructiondivboxes_116)
package AMG07_en_fla {
import flash.display.*;
public dynamic class instructiondivboxes_116 extends MovieClip {
public function instructiondivboxes_116(){
addFrameScript(21, frame22);
}
function frame22(){
stop();
}
}
}//package AMG07_en_fla
Section 34
//Instructions_intro_92 (AMG07_en_fla.Instructions_intro_92)
package AMG07_en_fla {
import flash.display.*;
public dynamic class Instructions_intro_92 extends MovieClip {
public function Instructions_intro_92(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package AMG07_en_fla
Section 35
//instructions_MC_91 (AMG07_en_fla.instructions_MC_91)
package AMG07_en_fla {
import flash.events.*;
import flash.display.*;
import com.mercedesamg.*;
public dynamic class instructions_MC_91 extends MovieClip {
public var start_drift_btn:MovieClip;
public function instructions_MC_91(){
addFrameScript(39, frame40);
}
public function doIt(_arg1:MouseEvent):void{
DriftRevolution.getInstance().onStartGameClicked();
}
function frame40(){
stop();
this.start_drift_btn.addEventListener(MouseEvent.CLICK, doIt);
}
}
}//package AMG07_en_fla
Section 36
//logoanim_84 (AMG07_en_fla.logoanim_84)
package AMG07_en_fla {
import flash.events.*;
import flash.display.*;
import com.mercedesamg.*;
public dynamic class logoanim_84 extends MovieClip {
public var start_drift_btn:MovieClip;
public function logoanim_84(){
addFrameScript(0, frame1, 82, frame83);
}
public function doIt(_arg1:MouseEvent):void{
DriftRevolution.getInstance().onStartDriftingClicked();
}
function frame1(){
stop();
}
function frame83(){
stop();
this.start_drift_btn.addEventListener(MouseEvent.CLICK, doIt);
}
}
}//package AMG07_en_fla
Section 37
//MainTimeline (AMG07_en_fla.MainTimeline)
package AMG07_en_fla {
import com.mercedesamg.gs.*;
import flash.events.*;
import flash.display.*;
import com.mercedesamg.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import flash.xml.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MainTimeline extends MovieClip {
public var gradient_bg_mc:MovieClip;
public var game_mc:MovieClip;
public var high_scores_mc:MovieClip;
public var black_series_mc:MovieClip;
public var alert_modal_window_mc:MovieClip;
public var send_to_friend_mc:MovieClip;
public var instructions_mc:MovieClip;
public var navbuttons_mc:MovieClip;
public var frame_mc:MovieClip;
public var home_mc:MovieClip;
public function MainTimeline(){
addFrameScript(2, frame3, 3, frame4, 4, frame5);
}
public function onFinishTween(_arg1:Number, _arg2:MovieClip):void{
home_mc.logo_mc.gotoAndPlay(2);
navbuttons_mc.gotoAndPlay(2);
trace(((("The tween has finished! argument1_num = " + _arg1) + ", and argument2_mc = ") + _arg2));
}
function frame3(){
game_mc.visible = false;
}
function frame4(){
DriftRevolution.getInstance().init(this);
TweenFilterLite.from(frame_mc, 1, {type:"Color", colorize:3407871, amount:0.4, brightness:5, saturation:5, delay:0, onComplete:onFinishFrameTween, onCompleteParams:[5, frame_mc]});
TweenFilterLite.from(frame_mc, 1, {type:"blur", blurX:50, blurY:50, delay:0, overwrite:false});
this.stop();
}
function frame5(){
TweenFilterLite.from(home_mc, 2, {type:"Color", colorize:3407871, amount:0.4, brightness:5, saturation:5, delay:0, onComplete:onFinishTween, onCompleteParams:[5, home_mc]});
TweenFilterLite.from(home_mc, 2, {type:"blur", blurX:20, blurY:20, delay:0, overwrite:false});
this.stop();
}
public function onFinishFrameTween(_arg1:Number, _arg2:MovieClip):void{
gotoAndStop(5);
}
}
}//package AMG07_en_fla
Section 38
//minimap_mc_43 (AMG07_en_fla.minimap_mc_43)
package AMG07_en_fla {
import flash.display.*;
public dynamic class minimap_mc_43 extends MovieClip {
public var car_pos_mc:MovieClip;
public var track_map_mc:MovieClip;
}
}//package AMG07_en_fla
Section 39
//navbuttonsanim_14 (AMG07_en_fla.navbuttonsanim_14)
package AMG07_en_fla {
import flash.display.*;
public dynamic class navbuttonsanim_14 extends MovieClip {
public var friend_btn:MovieClip;
public var scores_btn:MovieClip;
public var about_btn:MovieClip;
public var start_btn:MovieClip;
public function navbuttonsanim_14(){
addFrameScript(0, frame1, 4, frame5);
}
function frame1(){
stop();
}
function frame5(){
stop();
}
}
}//package AMG07_en_fla
Section 40
//over_btn_base_90 (AMG07_en_fla.over_btn_base_90)
package AMG07_en_fla {
import flash.display.*;
public dynamic class over_btn_base_90 extends MovieClip {
public function over_btn_base_90(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package AMG07_en_fla
Section 41
//playagainbluebtnanim_64 (AMG07_en_fla.playagainbluebtnanim_64)
package AMG07_en_fla {
import flash.display.*;
public dynamic class playagainbluebtnanim_64 extends MovieClip {
public function playagainbluebtnanim_64(){
addFrameScript(16, frame17, 27, frame28);
}
function frame17(){
this.stop();
}
function frame28(){
this.stop();
}
}
}//package AMG07_en_fla
Section 42
//playagainbtn_126 (AMG07_en_fla.playagainbtn_126)
package AMG07_en_fla {
import flash.display.*;
public dynamic class playagainbtn_126 extends MovieClip {
public function playagainbtn_126(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
this.stop();
}
function frame1(){
this.stop();
}
}
}//package AMG07_en_fla
Section 43
//scoring_fields_mc_57 (AMG07_en_fla.scoring_fields_mc_57)
package AMG07_en_fla {
import flash.display.*;
import flash.text.*;
public dynamic class scoring_fields_mc_57 extends MovieClip {
public var total_txt:TextField;
public var distance_txt:TextField;
public var bonus_txt:TextField;
}
}//package AMG07_en_fla
Section 44
//select_box_arrow_68 (AMG07_en_fla.select_box_arrow_68)
package AMG07_en_fla {
import flash.display.*;
public dynamic class select_box_arrow_68 extends MovieClip {
public function select_box_arrow_68(){
addFrameScript(0, frame1);
}
function frame1(){
this.stop();
}
}
}//package AMG07_en_fla
Section 45
//selectCountry_67 (AMG07_en_fla.selectCountry_67)
package AMG07_en_fla {
import flash.display.*;
import flash.text.*;
public dynamic class selectCountry_67 extends MovieClip {
public var arrow_down:MovieClip;
public var country_txt:TextField;
public var arrow_up:MovieClip;
}
}//package AMG07_en_fla
Section 46
//send_to_friend_MC_129 (AMG07_en_fla.send_to_friend_MC_129)
package AMG07_en_fla {
import flash.events.*;
import flash.display.*;
import com.mercedesamg.serverComm.*;
import flash.text.*;
public dynamic class send_to_friend_MC_129 extends MovieClip {
public var send_btn:MovieClip;
public var textName:TextField;
public var textEmail:TextField;
public var textBody:TextField;
public var taf:SendToFriend;
public var status_txt:TextField;
public var textEmail2:TextField;
public var textName2:TextField;
public function send_to_friend_MC_129(){
addFrameScript(50, frame51);
}
public function btnOver(_arg1:MouseEvent):void{
send_btn.gotoAndPlay("_rollover");
}
public function submitIt(_arg1:MouseEvent):void{
taf.onSubmit(this.textBody.text, this.textName.text, this.textEmail.text, this.textName2.text, this.textEmail2.text);
send_btn.gotoAndStop("_null");
}
public function clearFields(_arg1:Event):void{
textBody.text = "";
textName2.text = "";
textEmail2.text = "";
}
public function btnOut(_arg1:MouseEvent):void{
send_btn.gotoAndStop("_null");
}
function frame51(){
this.stop();
taf = SendToFriend.getInstance();
taf.addEventListener(SendToFriend.TAF_SUBMITTED, clearFields);
send_btn.addEventListener(MouseEvent.CLICK, submitIt);
send_btn.addEventListener(MouseEvent.ROLL_OVER, btnOver);
send_btn.addEventListener(MouseEvent.ROLL_OUT, btnOut);
send_btn.buttonMode = true;
}
}
}//package AMG07_en_fla
Section 47
//send2friendboxdividermid_136 (AMG07_en_fla.send2friendboxdividermid_136)
package AMG07_en_fla {
import flash.display.*;
public dynamic class send2friendboxdividermid_136 extends MovieClip {
public function send2friendboxdividermid_136(){
addFrameScript(21, frame22);
}
function frame22(){
stop();
}
}
}//package AMG07_en_fla
Section 48
//send2friendboxdividershort_135 (AMG07_en_fla.send2friendboxdividershort_135)
package AMG07_en_fla {
import flash.display.*;
public dynamic class send2friendboxdividershort_135 extends MovieClip {
public function send2friendboxdividershort_135(){
addFrameScript(21, frame22);
}
function frame22(){
stop();
}
}
}//package AMG07_en_fla
Section 49
//sendbutton_138 (AMG07_en_fla.sendbutton_138)
package AMG07_en_fla {
import flash.display.*;
public dynamic class sendbutton_138 extends MovieClip {
public function sendbutton_138(){
addFrameScript(16, frame17, 26, frame27);
}
function frame17(){
this.stop();
}
function frame27(){
this.stop();
}
}
}//package AMG07_en_fla
Section 50
//sendcopymask_137 (AMG07_en_fla.sendcopymask_137)
package AMG07_en_fla {
import flash.display.*;
public dynamic class sendcopymask_137 extends MovieClip {
public function sendcopymask_137(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package AMG07_en_fla
Section 51
//sendformmask_130 (AMG07_en_fla.sendformmask_130)
package AMG07_en_fla {
import flash.display.*;
public dynamic class sendformmask_130 extends MovieClip {
public function sendformmask_130(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package AMG07_en_fla
Section 52
//SendtoFriend_intro_133 (AMG07_en_fla.SendtoFriend_intro_133)
package AMG07_en_fla {
import flash.display.*;
public dynamic class SendtoFriend_intro_133 extends MovieClip {
public function SendtoFriend_intro_133(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package AMG07_en_fla
Section 53
//snowrearanim_38 (AMG07_en_fla.snowrearanim_38)
package AMG07_en_fla {
import flash.display.*;
public dynamic class snowrearanim_38 extends MovieClip {
public function snowrearanim_38(){
addFrameScript(19, frame20);
}
function frame20(){
this.gotoAndPlay("loop");
}
}
}//package AMG07_en_fla
Section 54
//speedometer_mc2_73 (AMG07_en_fla.speedometer_mc2_73)
package AMG07_en_fla {
import flash.display.*;
public dynamic class speedometer_mc2_73 extends MovieClip {
public var needle_mc:MovieClip;
}
}//package AMG07_en_fla
Section 55
//status_icons_mc_40 (AMG07_en_fla.status_icons_mc_40)
package AMG07_en_fla {
import flash.display.*;
public dynamic class status_icons_mc_40 extends MovieClip {
public function status_icons_mc_40(){
addFrameScript(0, frame1);
}
function frame1(){
this.stop();
}
}
}//package AMG07_en_fla
Section 56
//submitbluebtnanim_70 (AMG07_en_fla.submitbluebtnanim_70)
package AMG07_en_fla {
import flash.display.*;
public dynamic class submitbluebtnanim_70 extends MovieClip {
public function submitbluebtnanim_70(){
addFrameScript(16, frame17, 29, frame30);
}
function frame17(){
this.stop();
}
function frame30(){
this.stop();
}
}
}//package AMG07_en_fla
Section 57
//title_mc_7 (AMG07_en_fla.title_mc_7)
package AMG07_en_fla {
import flash.display.*;
import flash.text.*;
public dynamic class title_mc_7 extends MovieClip {
public var title_txt:TextField;
}
}//package AMG07_en_fla
Section 58
//txt_PlayAgain_glow_128 (AMG07_en_fla.txt_PlayAgain_glow_128)
package AMG07_en_fla {
import flash.display.*;
public dynamic class txt_PlayAgain_glow_128 extends MovieClip {
public function txt_PlayAgain_glow_128(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package AMG07_en_fla
Section 59
//visitAMGbuttons_122 (AMG07_en_fla.visitAMGbuttons_122)
package AMG07_en_fla {
import flash.events.*;
import flash.display.*;
import com.mercedesamg.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.filters.*;
import flash.xml.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class visitAMGbuttons_122 extends MovieClip {
public var btn_play_again:MovieClip;
public var btn_visit_amg:MovieClip;
public function visitAMGbuttons_122(){
addFrameScript(12, frame13);
}
function frame13(){
btn_play_again.addEventListener(MouseEvent.CLICK, playAgain);
btn_play_again.addEventListener(MouseEvent.ROLL_OVER, btnRollover);
btn_play_again.addEventListener(MouseEvent.ROLL_OUT, btnRollout);
btn_visit_amg.addEventListener(MouseEvent.CLICK, navToWebsite);
btn_visit_amg.addEventListener(MouseEvent.ROLL_OVER, btnRollover);
btn_visit_amg.addEventListener(MouseEvent.ROLL_OUT, btnRollout);
btn_play_again.buttonMode = (btn_visit_amg.buttonMode = true);
this.stop();
}
public function btnRollover(_arg1:MouseEvent):void{
_arg1.target.gotoAndPlay("_rollover");
}
public function btnRollout(_arg1:MouseEvent):void{
_arg1.target.gotoAndStop(1);
}
public function playAgain(_arg1:MouseEvent):void{
DriftRevolution.getInstance().onStartDriftingClicked();
}
public function navToWebsite(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.mercedes-amg.com"));
}
}
}//package AMG07_en_fla
Section 60
//TweenFilterLite (com.mercedesamg.gs.TweenFilterLite)
package com.mercedesamg.gs {
import flash.display.*;
import flash.utils.*;
import flash.filters.*;
public class TweenFilterLite extends TweenLite {
private var _mc:DisplayObject;
private var _clrsa:Array;
private var _fType;
private var _clrMtxTw:TweenLite;
public var _matrix:Array;
private var _f:Object;
private var _endMatrix:Array;
public static var version:Number = 5.3;
private static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
public static var killTweensOf:Function = TweenLite.killTweensOf;
public static var delayedCall:Function = TweenLite.delayedCall;
private static var _lumB:Number = 0.072169;
private static var _lumG:Number = 0.71516;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
private static var _lumR:Number = 0.212671;
public function TweenFilterLite(_arg1:DisplayObject, _arg2:Number, _arg3:Object){
super(_arg1, _arg2, _arg3);
if (_arg1 == null){
return;
};
_mc = _arg1;
_clrsa = [];
if (this.vars.runBackwards == true){
initTweenVals();
};
if ((((TweenLite.version < 5.3)) || (isNaN(TweenLite.version)))){
trace("ERROR! Please update your TweenLite class. TweenFilterLite requires a more recent version. Download updates at http://www.TweenLite.com.");
};
}
private function setFilter(_arg1:Class, _arg2:Array, _arg3:Object):void{
var _local4:Array;
var _local5:int;
var _local6:Number;
var _local7:String;
var _local8:Object;
var _local9:Object;
var _local10:Object;
_fType = _arg1;
_local4 = _mc.filters;
_local5 = 0;
while (_local5 < _local4.length) {
if ((_local4[_local5] is _arg1)){
_f = _local4[_local5];
break;
};
_local5++;
};
if (_f == null){
_local4.push(_arg3);
_mc.filters = _local4;
_f = _arg3;
};
_local5 = 0;
while (_local5 < _arg2.length) {
_local7 = _arg2[_local5];
if (this.tweens[_local7] != undefined){
_local8 = this.tweens[_local7];
delete this.tweens[_local7];
} else {
if (this.extraTweens[_local7] != undefined){
_local8 = this.extraTweens[_local7];
} else {
_local8 = null;
};
};
if (_local8 != null){
if ((((((((((((((_local7 == "brightness")) || ((_local7 == "colorize")))) || ((_local7 == "amount")))) || ((_local7 == "saturation")))) || ((_local7 == "contrast")))) || ((_local7 == "hue")))) || ((_local7 == "threshold")))){
} else {
if ((((((_local7 == "color")) || ((_local7 == "highlightColor")))) || ((_local7 == "shadowColor")))){
_local9 = HEXtoRGB(_f[_local7]);
_local10 = HEXtoRGB(this.vars[_local7]);
_clrsa.push({p:_local7, e:this.vars.ease, sr:_local9.rb, cr:(_local10.rb - _local9.rb), sg:_local9.gb, cg:(_local10.gb - _local9.gb), sb:_local9.bb, cb:(_local10.bb - _local9.bb)});
} else {
if ((((((((_local7 == "quality")) || ((_local7 == "inner")))) || ((_local7 == "knockout")))) || ((_local7 == "hideObject")))){
_f[_local7] = this.vars[_local7];
} else {
if (typeof(this.vars[_local7]) == "number"){
_local6 = (this.vars[_local7] - _f[_local7]);
} else {
_local6 = Number(this.vars[_local7]);
};
this.tweens[_local7] = {o:_f, p:_local7, s:_f[_local7], c:_local6, e:this.vars.ease};
};
};
};
};
_local5++;
};
}
override public function render(_arg1:int):void{
var _local2:Number;
var _local3:Object;
var _local4:String;
var _local5:int;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Array;
_local2 = ((_arg1 - this.startTime) / 1000);
if (_local2 > this.duration){
_local2 = this.duration;
};
if (_mc.parent != null){
for (_local4 in this.tweens) {
_local3 = this.tweens[_local4];
_local3.o[_local4] = _local3.e(_local2, _local3.s, _local3.c, this.duration);
};
_local5 = 0;
while (_local5 < _clrsa.length) {
_local3 = _clrsa[_local5];
_local6 = _local3.e(_local2, _local3.sr, _local3.cr, this.duration);
_local7 = _local3.e(_local2, _local3.sg, _local3.cg, this.duration);
_local8 = _local3.e(_local2, _local3.sb, _local3.cb, this.duration);
_f[_local3.p] = (((_local6 << 16) | (_local7 << 8)) | _local8);
_local5++;
};
if (_endMatrix != null){
_f.matrix = _matrix;
};
_local9 = ((_mc.filters.slice()) || ([]));
_local5 = (_local9.length - 1);
while (_local5 > -1) {
if ((_local9[_local5] is _fType)){
_local9[_local5] = _f;
break;
};
_local5--;
};
_mc.filters = _local9;
if (this.onUpdate != null){
this.onUpdate.apply(null, this.onUpdateParams);
};
};
if (_local2 == this.duration){
if ((((((typeof(this.vars.autoAlpha) == "number")) && ((this.target.alpha == 0)))) && (!((this.target.parent == null))))){
this.target.visible = false;
};
if (this.onComplete != null){
this.onComplete.apply(null, this.onCompleteParams);
};
removeTween(this);
};
}
public function HEXtoRGB(_arg1:Number):Object{
return ({rb:(_arg1 >> 16), gb:((_arg1 >> 8) & 0xFF), bb:(_arg1 & 0xFF)});
}
override public function initTweenVals():void{
var _local1:int;
var _local2:String;
var _local3:Number;
if (_mc != null){
super.initTweenVals();
if (this.vars.type != null){
_clrsa = [];
_matrix = _idMatrix.slice();
if ((((this.vars.quality == undefined)) || (isNaN(this.vars.quality)))){
this.vars.quality = 2;
};
if (this.vars.runBackwards == true){
for (_local2 in this.tweens) {
this.tweens[_local2].flipped = true;
};
};
switch (this.vars.type.toLowerCase()){
case "blur":
setFilter(BlurFilter, ["blurX", "blurY", "quality"], new BlurFilter(0, 0, this.vars.quality));
break;
case "glow":
setFilter(GlowFilter, ["alpha", "blurX", "blurY", "color", "quality", "strength", "inner", "knockout"], new GlowFilter(0xFFFFFF, 0, 0, 0, ((this.vars.strength) || (1)), this.vars.quality, this.vars.inner, this.vars.knockout));
break;
case "colormatrix":
case "color":
case "colormatrixfilter":
case "colorize":
setFilter(ColorMatrixFilter, [], new ColorMatrixFilter(_matrix));
_matrix = _f.matrix;
if (this.vars.relative == true){
_endMatrix = _matrix.slice();
} else {
_endMatrix = _idMatrix.slice();
};
_endMatrix = setBrightness(_endMatrix, this.vars.brightness);
_endMatrix = setContrast(_endMatrix, this.vars.contrast);
_endMatrix = setHue(_endMatrix, this.vars.hue);
_endMatrix = setSaturation(_endMatrix, this.vars.saturation);
_endMatrix = setThreshold(_endMatrix, this.vars.threshold);
if (!isNaN(this.vars.colorize)){
_endMatrix = colorize(_endMatrix, this.vars.colorize, this.vars.amount);
} else {
if (!isNaN(this.vars.color)){
_endMatrix = colorize(_endMatrix, this.vars.color, this.vars.amount);
};
};
_local3 = (this.delay - ((getTimer() - this.initTime) / 1000));
_clrMtxTw = new TweenLite(_matrix, this.duration, {endMatrix:_endMatrix, ease:this.vars.ease, delay:_local3, overwrite:false, runBackwards:this.vars.runBackwards});
_clrMtxTw.endTarget = _mc;
break;
case "shadow":
case "dropshadow":
setFilter(DropShadowFilter, ["alpha", "angle", "blurX", "blurY", "color", "distance", "quality", "strength", "inner", "knockout", "hideObject"], new DropShadowFilter(0, 45, 0, 0, 0, 0, 1, this.vars.quality, this.vars.inner, this.vars.knockout, this.vars.hideObject));
break;
case "bevel":
setFilter(BevelFilter, ["angle", "blurX", "blurY", "distance", "highlightAlpha", "highlightColor", "quality", "shadowAlpha", "shadowColor", "strength"], new BevelFilter(0, 0, 0xFFFFFF, 0.5, 0, 0.5, 2, 2, 0, this.vars.quality));
break;
};
if (this.vars.runBackwards == true){
flipFilterVals();
};
};
};
}
private function flipFilterVals():void{
var _local1:Boolean;
var _local2:int;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Object;
var _local7:String;
var _local8:Array;
_local1 = this.active;
for (_local7 in this.tweens) {
if (this.tweens[_local7].flipped != true){
_local6 = this.tweens[_local7];
this.tweens[_local7].s = (_local6.s + _local6.c);
_local6.c = (_local6.c * -1);
_local6.o[_local7] = _local6.e(0, _local6.s, _local6.c, this.duration);
_local6.flipped = true;
};
};
_local2 = 0;
while (_local2 < _clrsa.length) {
_local6 = _clrsa[_local2];
_clrsa[_local2].sr = (_local6.sr + _local6.cr);
_local6.cr = (_local6.cr * -1);
_local6.sg = (_local6.sg + _local6.cg);
_local6.cg = (_local6.cg * -1);
_local6.sb = (_local6.sb + _local6.cb);
_local6.cb = (_local6.cb * -1);
if (!_local1){
_local3 = _local6.e(0, _local6.sr, _local6.cr, this.duration);
_local4 = _local6.e(0, _local6.sg, _local6.cg, this.duration);
_local5 = _local6.e(0, _local6.sb, _local6.cb, this.duration);
_f[_local6.p] = (((_local3 << 16) | (_local4 << 8)) | _local5);
};
_local2++;
};
if (((_local1) && (!((this.duration == 0.001))))){
render(getTimer());
} else {
if (_mc.parent != null){
if (_endMatrix != null){
_f.matrix = _matrix;
};
_local8 = ((_mc.filters.slice()) || ([]));
_local2 = (_local8.length - 1);
while (_local2 > -1) {
if ((_local8[_local2] is _fType)){
_local8[_local2] = _f;
break;
};
_local2--;
};
_mc.filters = _local8;
};
};
if (this.onUpdate != null){
this.onUpdate.apply(null, this.onUpdateParams);
};
}
public static function setContrast(_arg1:Array, _arg2:Number):Array{
var _local3:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 + 0.01);
_local3 = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function applyMatrix(_arg1:Array, _arg2:Array):Array{
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (_arg2);
};
_local3 = [];
_local4 = 0;
_local5 = 0;
_local6 = 0;
while (_local6 < 4) {
_local7 = 0;
while (_local7 < 5) {
if (_local7 == 4){
_local5 = _arg1[(_local4 + 4)];
} else {
_local5 = 0;
};
_local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5);
_local7++;
};
_local4 = (_local4 + 5);
_local6++;
};
return (_local3);
}
public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=100):Array{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Array;
if (isNaN(_arg2)){
return (_arg1);
};
if (isNaN(_arg3)){
_arg3 = 1;
};
_local4 = (((_arg2 >> 16) & 0xFF) / 0xFF);
_local5 = (((_arg2 >> 8) & 0xFF) / 0xFF);
_local6 = ((_arg2 & 0xFF) / 0xFF);
_local7 = (1 - _arg3);
_local8 = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local8, _arg1));
}
public static function setBrightness(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = ((_arg2 * 100) - 100);
return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1));
}
public static function setSaturation(_arg1:Array, _arg2:Number):Array{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_local3 = (1 - _arg2);
_local4 = (_local3 * _lumR);
_local5 = (_local3 * _lumG);
_local6 = (_local3 * _lumB);
_local7 = [(_local4 + _arg2), _local5, _local6, 0, 0, _local4, (_local5 + _arg2), _local6, 0, 0, _local4, _local5, (_local6 + _arg2), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local7, _arg1));
}
public static function from(_arg1:DisplayObject, _arg2:Number, _arg3:Object):TweenFilterLite{
_arg3.runBackwards = true;
return (new TweenFilterLite(_arg1, _arg2, _arg3));
}
public static function setThreshold(_arg1:Array, _arg2:Number):Array{
var _local3:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_local3 = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function setHue(_arg1:Array, _arg2:Number):Array{
var _local3:Number;
var _local4:Number;
var _local5:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 * (Math.PI / 180));
_local3 = Math.cos(_arg2);
_local4 = Math.sin(_arg2);
_local5 = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
return (applyMatrix(_local5, _arg1));
}
public static function to(_arg1:DisplayObject, _arg2:Number, _arg3:Object):TweenFilterLite{
return (new TweenFilterLite(_arg1, _arg2, _arg3));
}
}
}//package com.mercedesamg.gs
Section 61
//TweenLite (com.mercedesamg.gs.TweenLite)
package com.mercedesamg.gs {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
import flash.utils.*;
public class TweenLite {
public var delay:Number;
public var onUpdate:Function;
private var _sound:SoundTransform;
public var target:Object;
public var duration:Number;
public var extraTweens:Object;
private var _active:Boolean;
private var _endColor:ColorTransform;
public var onStartParams:Array;
public var vars:Object;
public var onUpdateParams:Array;
public var onComplete:Function;
public var onStart:Function;
private var _endTarget:Object;
public var startTime:uint;
public var onCompleteParams:Array;
private var _color:ColorTransform;
public var tweens:Object;
public var initTime:uint;
private static var _sprite:Sprite = new Sprite();
private static var _timer:Timer = new Timer(2000);
private static var _all:Dictionary = new Dictionary();
public static var killDelayedCallsTo:Function = killTweensOf;
public static var version:Number = 5.3;
private static var _listening:Boolean;
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
var _local4:Boolean;
super();
if (_arg1 == null){
return;
};
if (((((!((_arg3.overwrite == false))) && (!((_arg1 == null))))) || ((_all[_arg1] == undefined)))){
delete _all[_arg1];
_all[_arg1] = new Dictionary();
};
_all[_arg1][this] = this;
this.vars = _arg3;
this.duration = _arg2;
this.delay = ((_arg3.delay) || (0));
if (_arg2 == 0){
this.duration = 0.001;
if (this.delay == 0){
this.vars.runBackwards = true;
};
};
this.target = (_endTarget = _arg1);
this.onComplete = _arg3.onComplete;
this.onCompleteParams = ((_arg3.onCompleteParams) || ([]));
this.onUpdate = _arg3.onUpdate;
this.onUpdateParams = ((_arg3.onUpdateParams) || ([]));
this.onStart = _arg3.onStart;
this.onStartParams = ((_arg3.onStartParams) || ([]));
if (this.vars.ease == undefined){
this.vars.ease = easeOut;
} else {
if (!(this.vars.ease is Function)){
trace((("ERROR: You cannot use '" + this.vars.ease) + "' for the TweenLite ease property. Only functions are accepted."));
};
};
if (!isNaN(Number(this.vars.autoAlpha))){
this.vars.alpha = Number(this.vars.autoAlpha);
} else {
if (!isNaN(Number(this.vars._autoAlpha))){
this.vars.alpha = (this.vars.autoAlpha = Number(this.vars._autoAlpha));
};
};
this.tweens = {};
this.extraTweens = {};
this.initTime = getTimer();
if (this.vars.runBackwards == true){
initTweenVals();
};
_active = false;
_local4 = this.active;
if ((((_arg2 == 0)) && ((this.delay == 0)))){
if (this.vars.autoAlpha == 0){
this.target.visible = false;
};
if (this.onComplete != null){
this.onComplete.apply(null, this.onCompleteParams);
};
removeTween(this);
} else {
if (!_listening){
_sprite.addEventListener(Event.ENTER_FRAME, executeAll);
_timer.addEventListener("timer", killGarbage);
_timer.start();
_listening = true;
};
};
}
public function get active():Boolean{
if (_active){
return (true);
};
if (((getTimer() - this.initTime) / 1000) > this.delay){
_active = true;
this.startTime = (this.initTime + (this.delay * 1000));
if (this.vars.runBackwards != true){
initTweenVals();
} else {
if (typeof(this.vars.autoAlpha) == "number"){
this.target.visible = true;
};
};
if (this.onStart != null){
this.onStart.apply(null, this.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
return (true);
//unresolved jump
};
return (false);
}
public function render(_arg1:int):void{
var _local2:Number;
var _local3:Object;
var _local4:String;
_local2 = ((_arg1 - this.startTime) / 1000);
if (_local2 > this.duration){
_local2 = this.duration;
};
for (_local4 in this.tweens) {
_local3 = this.tweens[_local4];
_local3.o[_local4] = _local3.e(_local2, _local3.s, _local3.c, this.duration);
};
if (this.onUpdate != null){
this.onUpdate.apply(null, this.onUpdateParams);
};
if (_local2 == this.duration){
if ((((typeof(this.vars.autoAlpha) == "number")) && ((this.target.alpha == 0)))){
this.target.visible = false;
};
if (this.onComplete != null){
this.onComplete.apply(null, this.onCompleteParams);
};
removeTween(this);
};
}
public function set colorProxy(_arg1:Number):void{
var _local2:Number;
_local2 = (1 - _arg1);
this.target.transform.colorTransform = new ColorTransform(((_color.redMultiplier * _local2) + (_endColor.redMultiplier * _arg1)), ((_color.greenMultiplier * _local2) + (_endColor.greenMultiplier * _arg1)), ((_color.blueMultiplier * _local2) + (_endColor.blueMultiplier * _arg1)), ((_color.alphaMultiplier * _local2) + (_endColor.alphaMultiplier * _arg1)), ((_color.redOffset * _local2) + (_endColor.redOffset * _arg1)), ((_color.greenOffset * _local2) + (_endColor.greenOffset * _arg1)), ((_color.blueOffset * _local2) + (_endColor.blueOffset * _arg1)), ((_color.alphaOffset * _local2) + (_endColor.alphaOffset * _arg1)));
}
public function set endTarget(_arg1:Object):void{
delete _all[_endTarget][this];
_endTarget = _arg1;
if (_all[_arg1] == undefined){
_all[_arg1] = new Dictionary();
};
_all[_arg1][this] = this;
}
public function get colorProxy():Number{
return (0);
}
public function get endTarget():Object{
return (_endTarget);
}
public function initTweenVals():void{
var _local1:Number;
var _local2:String;
var _local3:Number;
var _local4:Array;
var _local5:int;
var _local6:TweenLite;
var _local7:TweenLite;
var _local8:Object;
_local1 = (this.delay - ((getTimer() - this.initTime) / 1000));
if ((this.target is Array)){
_local4 = [];
for (_local2 in this.vars) {
if ((this.vars[_local2] is Array)){
_local4 = this.vars[_local2];
break;
};
};
_local5 = 0;
while (_local5 < _local4.length) {
if (((!((this.target[_local5] == _local4[_local5]))) && (!((this.target[_local5] == undefined))))){
this.tweens[_local5.toString()] = {o:this.target, s:this.target[_local5], c:(_local4[_local5] - this.target[_local5]), e:this.vars.ease};
};
_local5++;
};
} else {
for (_local2 in this.vars) {
if ((((_local2 == "volume")) && ((this.target is MovieClip)))){
_sound = this.target.soundTransform;
_local6 = new TweenLite(this, this.duration, {volumeProxy:this.vars[_local2], ease:easeOut, delay:_local1, overwrite:false, runBackwards:this.vars.runBackwards});
_local6.endTarget = this.target;
} else {
if ((((_local2.toLowerCase() == "mccolor")) && ((this.target is DisplayObject)))){
_color = this.target.transform.colorTransform;
_endColor = new ColorTransform();
_endColor.alphaMultiplier = ((this.vars.alpha) || (this.target.alpha));
if (((!((this.vars[_local2] == null))) && (!((this.vars[_local2] == ""))))){
_endColor.color = this.vars[_local2];
};
_local7 = new TweenLite(this, this.duration, {colorProxy:1, delay:_local1, overwrite:false, runBackwards:this.vars.runBackwards});
_local7.endTarget = this.target;
} else {
if ((((((((((((((((((((((((_local2 == "delay")) || ((_local2 == "ease")))) || ((_local2 == "overwrite")))) || ((_local2 == "onComplete")))) || ((_local2 == "onCompleteParams")))) || ((_local2 == "runBackwards")))) || ((_local2 == "onUpdate")))) || ((_local2 == "onUpdateParams")))) || ((_local2 == "autoAlpha")))) || ((_local2 == "_autoAlpha")))) || ((_local2 == "onStart")))) || ((_local2 == "onStartParams")))){
} else {
if (this.target.hasOwnProperty(_local2)){
if (typeof(this.vars[_local2]) == "number"){
_local3 = (this.vars[_local2] - this.target[_local2]);
} else {
_local3 = Number(this.vars[_local2]);
};
this.tweens[_local2] = {o:this.target, s:this.target[_local2], c:_local3, e:this.vars.ease};
} else {
this.extraTweens[_local2] = {o:this.target, s:0, c:0, e:this.vars.ease, v:this.vars[_local2]};
};
};
};
};
};
};
if (this.vars.runBackwards == true){
for (_local2 in this.tweens) {
_local8 = this.tweens[_local2];
this.tweens[_local2].s = (_local8.s + _local8.c);
_local8.c = (_local8.c * -1);
if (_local8.c != 0){
_local8.o[_local2] = _local8.e(0, _local8.s, _local8.c, this.duration);
};
};
if (this.onUpdate != null){
this.onUpdate.apply(null, this.onUpdateParams);
};
};
if (typeof(this.vars.autoAlpha) == "number"){
this.target.visible = !((((this.vars.runBackwards == true)) && ((this.target.alpha == 0))));
};
}
public function set volumeProxy(_arg1:Number):void{
_sound.volume = _arg1;
this.target.soundTransform = _sound;
}
public function get volumeProxy():Number{
return (_sound.volume);
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:false}));
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function removeTween(_arg1:TweenLite=null):void{
if (((!((_arg1 == null))) && (!((_all[_arg1.endTarget] == null))))){
delete _all[_arg1.endTarget][_arg1];
};
}
private static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function killGarbage(_arg1:TimerEvent):void{
var _local2:Object;
var _local3:int;
var _local4:Boolean;
var _local5:Object;
var _local6:Object;
var _local7:Object;
_local2 = _all;
_local3 = 0;
for (_local5 in _local2) {
_local4 = false;
for (_local6 in _local2[_local5]) {
_local4 = true;
break;
};
if (!_local4){
delete _local2[_local5];
} else {
_local3++;
};
};
if (_local3 == 0){
_sprite.removeEventListener(Event.ENTER_FRAME, executeAll);
_timer.removeEventListener("timer", killGarbage);
_timer.stop();
_listening = false;
};
}
public static function executeAll(_arg1:Event):void{
var _local2:Object;
var _local3:int;
var _local4:Object;
var _local5:Object;
var _local6:Object;
_local2 = _all;
_local3 = getTimer();
for (_local4 in _local2) {
for (_local5 in _local2[_local4]) {
_local6 = _local2[_local4][_local5];
if (_local6.active){
_local6.render(_local3);
};
};
};
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function killTweensOf(_arg1:Object=null):void{
if (_arg1 != null){
delete _all[_arg1];
};
}
}
}//package com.mercedesamg.gs
Section 62
//DriftParticle3d (com.mercedesamg.mcClasses.DriftParticle3d)
package com.mercedesamg.mcClasses {
import flash.display.*;
public class DriftParticle3d extends MovieClip {
private var speedz:Number;
public var yPos:Number;
public var front:Boolean;
private var cont:MovieClip;
private var speed:Number;
public var xMove:Number;
public var scale:Number;
public var dead:Boolean;
private var snowScale:Number;
public var dy:Number;
public var zPos:Number;
public var dx:Number;
public var dir:Number;
public var xPos:Number;
private var scale_ceil:Number;
private var angdiff:Number;
static const snowScale:Number = 1.12;
static const snowGravity:Number = 2.45;
static const snowFrict:Number = 0.95;
static const snowFade:Number = 0.03;
public function DriftParticle3d(_arg1:Number, _arg2:uint, _arg3:Number){
var _local4:Number;
super();
this.dead = false;
this.front = false;
this.dir = _arg2;
this.angdiff = _arg3;
_local4 = (60 - _arg3);
this.scaleX = (this.scaleY = 2);
if (_arg2){
xMove = ((Math.abs(((_arg1 * 0.45) - _arg3)) * -1) - 1);
this.x = ((Math.random() * -60) - 60);
} else {
xMove = (Math.abs(((_arg1 * 0.45) - _arg3)) + 1);
this.x = ((Math.random() * 60) + 60);
};
this.y = ((Math.random() * (-(_arg1) * 6)) - 20);
this.speedz = (_arg1 * 1.2);
this.rotation = (Math.random() * 180);
this.cacheAsBitmap = true;
}
public function destroy():void{
delete ??getglobalscope
[this];
}
public function calculate():void{
this.x = (this.x + xMove);
this.y = (this.y - speedz);
speedz = (speedz - DriftParticle3d.snowGravity);
this.alpha = (this.alpha - DriftParticle3d.snowFade);
this.scaleX = (this.scaleY = (this.scaleX * DriftParticle3d.snowScale));
if ((((((this.y > 0)) || ((this.alpha < 0.1)))) || ((this.scaleX > 6)))){
dead = true;
};
}
}
}//package com.mercedesamg.mcClasses
Section 63
//BackgroundView (com.mercedesamg.mvc.BackgroundView)
package com.mercedesamg.mvc {
import flash.events.*;
import flash.display.*;
public class BackgroundView {
private var mountains:MovieClip;
private var model:GameModel;
private var viewingWidth:Number;// = 750
private var cloudsHW:Number;
private var mountainsHW:Number;
private var rootmc:MovieClip;
private var clouds:MovieClip;
public function BackgroundView(){
viewingWidth = 750;
super();
}
private function fixAngle(_arg1:Number):Number{
_arg1 = (_arg1 % 360);
return (((_arg1)<0) ? (_arg1 + 360) : _arg1);
}
private function prepView(_arg1:Event):void{
clouds.x = 0;
mountains.x = 0;
}
private function render(_arg1:Event):void{
var _local2:Number;
_local2 = fixAngle(_arg1.target.getCameraFacingAngle());
clouds.x = (-(cloudsHW) + ((cloudsHW / 360) * _local2));
mountains.x = (-(mountainsHW) + ((mountainsHW / 360) * _local2));
}
public function init(_arg1:GameModel, _arg2:MovieClip):void{
this.model = _arg1;
this.rootmc = _arg2;
this.mountains = rootmc.mountains_mc;
this.clouds = rootmc.clouds_mc;
mountainsHW = (mountains.width / 2);
cloudsHW = (clouds.width / 2);
_arg1.addEventListener(GameModel.MODEL_CHANGED, render);
_arg1.addEventListener(GameModel.PREP_GAME, prepView);
}
}
}//package com.mercedesamg.mvc
Section 64
//Car3dView (com.mercedesamg.mvc.Car3dView)
package com.mercedesamg.mvc {
import flash.events.*;
import flash.display.*;
public class Car3dView {
private var lastGoodAngleDiff:Number;
private var model:GameModel;
private var initY:uint;
private var car:MovieClip;
private var rear_snow_mc:MovieClip;
private var toggle:Boolean;// = false
public function Car3dView(){
toggle = false;
super();
}
private function reset(_arg1:Event):void{
car.gotoAndStop(13);
rear_snow_mc.visible = false;
}
private function gameEnd(_arg1:Event):void{
rear_snow_mc.visible = false;
}
private function render(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:uint;
var _local5:Number;
var _local6:uint;
var _local7:Boolean;
_local2 = _arg1.target.getAcceleration();
if (((toggle) && ((_local2 > 1)))){
_local7 = _arg1.target.getIsOffroad();
if (_local7){
if (_local2 > 4){
car.y = (initY + 2);
} else {
car.y = (initY + 1);
};
};
} else {
car.y = initY;
};
toggle = !(toggle);
_local3 = _arg1.target.getAngleDifference();
if (_local3 > 180){
return;
};
_local4 = _arg1.target.getTurningDirection();
_local5 = Math.ceil((_local3 / 10));
_local6 = 13;
if (!_local4){
if ((((_local3 > 0.25)) && ((_local3 < 5)))){
_local6++;
} else {
if (_local3 > 5){
_local6 = Math.min(25, (_local6 + _local5));
};
};
lastGoodAngleDiff = _local3;
} else {
if ((((_local3 > 0.1)) && ((_local3 < 5)))){
_local6--;
} else {
if (_local3 > 5){
_local6 = Math.max(1, (_local6 - _local5));
};
};
lastGoodAngleDiff = _local3;
};
car.gotoAndStop(_local6);
if (_arg1.target.getAcceleration() > 3){
rear_snow_mc.visible = true;
switch (_local6){
case 13:
rear_snow_mc.scaleX = 1;
rear_snow_mc.rotation = 0;
rear_snow_mc.x = 355;
break;
case 14:
rear_snow_mc.scaleX = 1;
rear_snow_mc.rotation = 0;
rear_snow_mc.x = 377;
break;
case 15:
rear_snow_mc.scaleX = 1;
rear_snow_mc.rotation = -3;
rear_snow_mc.x = 405;
break;
case 16:
rear_snow_mc.scaleX = 1;
rear_snow_mc.rotation = -5.5;
rear_snow_mc.x = 421;
break;
case 12:
rear_snow_mc.scaleX = 1;
rear_snow_mc.rotation = 0;
rear_snow_mc.x = 330;
break;
case 11:
rear_snow_mc.scaleX = 1;
rear_snow_mc.rotation = 3;
rear_snow_mc.x = 305;
rear_snow_mc.y = 337;
break;
case 10:
rear_snow_mc.scaleX = 1;
rear_snow_mc.rotation = 5.3;
rear_snow_mc.x = 279;
break;
case 9:
rear_snow_mc.scaleX = 0.88;
rear_snow_mc.rotation = 9.7;
rear_snow_mc.x = 260;
break;
default:
rear_snow_mc.visible = false;
};
} else {
rear_snow_mc.visible = false;
};
}
public function init(_arg1:GameModel, _arg2:MovieClip, _arg3):void{
this.model = _arg1;
this.car = _arg2;
this.rear_snow_mc = _arg3;
initY = car.y;
_arg1.addEventListener(GameModel.MODEL_CHANGED, render);
_arg1.addEventListener(GameModel.END_GAME, gameEnd);
_arg1.addEventListener(GameModel.PREP_GAME, reset);
}
}
}//package com.mercedesamg.mvc
Section 65
//DashboardView (com.mercedesamg.mvc.DashboardView)
package com.mercedesamg.mvc {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class DashboardView {
private var speedo_needle:MovieClip;
private var car_angle:MovieClip;
private var model:GameModel;
private var steering_wheel:MovieClip;
private var clock_txt:TextField;
private var distance_txt:TextField;
private var rootmc:MovieClip;
private var bonus_txt:TextField;
private function render(_arg1:Event):void{
var _local2:Number;
var _local3:uint;
_local2 = _arg1.target.getAngleDifference();
_local3 = _arg1.target.getTurningDirection();
if (_local3){
car_angle.rotation = _local2;
steering_wheel.rotation = (_local2 * 3);
} else {
car_angle.rotation = -(_local2);
steering_wheel.rotation = (-(_local2) * 3);
};
speedo_needle.rotation = (_arg1.target.getAcceleration() * 8);
distance_txt.text = _arg1.target.getTotalKmTraveled().toString();
bonus_txt.text = _arg1.target.getDriftBonus().toString();
}
private function updateGameClock(_arg1:Event):void{
clock_txt.text = (_arg1.target.getGameClock() + ":00");
}
private function reset(_arg1:Event):void{
car_angle.rotation = 0;
steering_wheel.rotation = 0;
speedo_needle.rotation = 0;
distance_txt.text = "0";
bonus_txt.text = "1";
clock_txt.text = "";
}
public function init(_arg1:GameModel, _arg2:MovieClip):void{
this.model = _arg1;
this.rootmc = _arg2;
this.steering_wheel = _arg2.steering_wheel_mc;
this.speedo_needle = _arg2.speedo_mc.needle_mc;
this.car_angle = _arg2.angle_mc.car_mc;
this.distance_txt = _arg2.distance_txt;
this.bonus_txt = _arg2.bonus_txt;
this.clock_txt = _arg2.game_clock_txt;
_arg1.addEventListener(GameModel.MODEL_CHANGED, render);
_arg1.addEventListener(GameModel.GAME_CLOCK_UPDATED, updateGameClock);
_arg1.addEventListener(GameModel.PREP_GAME, reset);
}
}
}//package com.mercedesamg.mvc
Section 66
//DriftParticlesView (com.mercedesamg.mvc.DriftParticlesView)
package com.mercedesamg.mvc {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import com.mercedesamg.mcClasses.*;
public class DriftParticlesView {
private var container_back:MovieClip;
private var model:GameModel;
private var container_front:MovieClip;
private var particles:Array;
private var particlesAdd:Array;
private var uuid:int;// = 0
private var flen:Number;// = 20
public function DriftParticlesView(){
flen = 20;
uuid = 0;
super();
}
private function createParticle(_arg1:Number, _arg2:Number):void{
var _local3:uint;
var _local4:uint;
var _local5:DriftParticle3d;
_local3 = model.getTurningDirection();
_local4 = 0;
while (_local4 < 2) {
_local5 = new DriftParticle3d(_arg1, _local3, _arg2);
_local5.name = ("p" + uuid);
particlesAdd.push(_local5);
container_back.addChild(_local5);
uuid++;
_local4++;
};
}
private function render(_arg1:Event):void{
var _local2:Point;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:uint;
var _local7:uint;
var _local8:DriftParticle3d;
var _local9:Number;
particlesAdd = new Array();
_local2 = new Point(_arg1.target.getXPos(), _arg1.target.getYPos());
_local3 = (_arg1.target.getCameraFacingAngle() * GameModel.DEG2RAD);
_local4 = _arg1.target.getAngleDifference();
_local5 = _arg1.target.getAcceleration();
if ((((_local5 > 1.5)) && ((_local4 > 1)))){
createParticle(_local5, _local4);
};
_local6 = particles.length;
_local7 = 0;
for (;_local7 < _local6;_local7++) {
_local8 = (particles[_local7] as DriftParticle3d);
_local8.calculate();
if (_local8.dead){
particles.splice(_local7, 1);
if (_local8.front){
_local9 = container_front.getChildIndex(container_front.getChildByName(_local8.name));
container_front.removeChildAt(_local9);
} else {
_local9 = container_back.getChildIndex(container_back.getChildByName(_local8.name));
container_back.removeChildAt(_local9);
};
_local8.destroy();
_local6--;
_local7--;
continue;
};
};
particles = particles.concat(particlesAdd);
}
public function init(_arg1:GameModel, _arg2:MovieClip, _arg3:MovieClip):void{
this.model = _arg1;
this.container_back = _arg2;
this.container_front = _arg3;
particles = new Array();
_arg1.addEventListener(GameModel.MODEL_CHANGED, render);
_arg1.addEventListener(GameModel.PREP_GAME, reset);
}
private function reset(_arg1:Event):void{
var _local2:uint;
var _local3:uint;
var _local4:DriftParticle3d;
var _local5:int;
_local2 = particles.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = (particles[_local3] as DriftParticle3d);
if (_local4.front){
_local5 = container_front.getChildIndex(container_front.getChildByName(_local4.name));
container_front.removeChildAt(_local5);
} else {
_local5 = container_back.getChildIndex(container_back.getChildByName(_local4.name));
container_back.removeChildAt(_local5);
};
_local3++;
};
particles = new Array();
particlesAdd = new Array();
uuid = 0;
}
}
}//package com.mercedesamg.mvc
Section 67
//GameModel (com.mercedesamg.mvc.GameModel)
package com.mercedesamg.mvc {
import flash.events.*;
import flash.display.*;
import com.mercedesamg.utils.*;
import flash.utils.*;
public class GameModel extends EventDispatcher {
private var snowDepth;// = 0
private var keyPressedSpace:Boolean;// = false
private var keyPressedDown:Boolean;// = false
private var sideGravity;// = 0.5
private var deccel:Number;// = 0.92
private var steer_normal:Number;// = 0.07
private var keyPressedRight:Boolean;// = false
private var handbrake:Number;// = 0.95
private var gameTimeMax:Number;// = 60
private var pixelsTraveled:Number;
private var lastDriftTime:Number;// = 0
private var steer_handbrake:Number;// = 0.08
private var offroad:Boolean;// = false
private var traction:Number;
private var cameraDistance:Number;// = 10
private var tractionRate:Number;// = 1.11
private var offroadArea:OffroadHitTestArea;
private var currentSound:uint;// = 50
private var driftAngleMin:Number;// = 24
private var realSpeed:Number;// = 0
private var snowGravity;// = 2.3
private var speed:Number;// = 0
private var reset:Boolean;
private var speedSlideMin:Number;// = 7
private var driftAngleMax:Number;// = 60
private var speedSlideMax:Number;// = 12
private var car_pos:Vector;
private var keyPressedLeft:Boolean;// = false
private var movementAngle:Number;// = 0
private var gameTimer:Timer;
private var angleDiff:Number;// = 0
private var steer_threshold:Number;// = 5
private var tractionMin:Number;// = 2
private var snowMaxHeight;// = 0
private var snowScale;// = 0.5
private var snowHeight;// = 6
private var speedMin:Number;// = 0
private var dw:Number;// = 0
private var dir;// = null
private var tractionMax:Number;// = 150
private var driftingTotalTime:Number;// = 1
private var drifting:Boolean;// = false
private var speedMax:Number;// = 40
private var carFacingAngle:Number;// = 0
private var drift:Number;// = 0.97
private var snowFade;// = 2
private var cameraFacingAngle:Number;// = 0
private var snowSpeedDecay;// = 1
private var speedMaxOffroad:Number;// = 4
private var turningDirection:uint;// = 0
private var keyPressedUp:Boolean;// = false
private var vx:Number;// = 0
private var isTurning:Boolean;// = false
private var steer:Number;// = 0.05
private var angle:Number;// = 0
private var worldScale:Number;// = 0.008
private var handbraking:Boolean;// = false
private var vy:Number;// = 0
private var kmTraveled:Number;
private var gameTime:Number;
private var cam_pos:Vector;
private var accel:Number;// = 0.14
private var snowBounce;// = 0.3
private var frameRate:Number;// = 60
private var rootmc:MovieClip;
private var handbrake_traction:Number;// = 11
static const KEY_RIGHT = 39;
public static const SOUND_CHANGED:String = "sound_changed";
public static const END_DRIFT:String = "end_drift";
static const KEY_LEFT = 37;
public static const PREP_GAME:String = "prep_game";
public static const START_DRIFT:String = "start_drift";
public static const CANCEL_DRIFT:String = "cancel_drift";
public static const START_GAME:String = "start_game";
static const KEY_UP = 38;
public static const MODEL_CHANGED:String = "model_changed";
public static const PI2:Number = 1.5707963267949;
public static const TWOPI:Number = 6.28318530717959;
static const KEY_SPACE = 32;
public static const DEG2RAD:Number = 0.0174532925199433;
public static const RAD2DEG:Number = 57.2957795130823;
static const KEY_DOWN = 40;
public static const HALFPI:Number = 1.5707963267949;
public static const END_GAME:String = "end_game";
public static const GAME_CLOCK_UPDATED:String = "clock_updated";
public function GameModel(_arg1:MovieClip, _arg2:Number, _arg3:Number){
frameRate = 60;
worldScale = 0.008;
cameraDistance = 10;
accel = 0.14;
steer = 0.05;
steer_normal = 0.07;
steer_handbrake = 0.08;
steer_threshold = 5;
deccel = 0.92;
handbrake = 0.95;
handbrake_traction = 11;
drift = 0.97;
handbraking = false;
drifting = false;
driftAngleMin = 24;
driftAngleMax = 60;
tractionMin = 2;
tractionMax = 150;
traction = tractionMin;
tractionRate = 1.11;
speed = 0;
realSpeed = 0;
speedMax = 40;
speedMaxOffroad = 4;
speedSlideMin = 7;
speedSlideMax = 12;
speedMin = 0;
vx = 0;
vy = 0;
dw = 0;
isTurning = false;
turningDirection = 0;
angle = 0;
carFacingAngle = 0;
cameraFacingAngle = 0;
movementAngle = 0;
angleDiff = 0;
dir = null;
snowGravity = 2.3;
snowScale = 0.5;
snowHeight = 6;
snowFade = 2;
snowBounce = 0.3;
snowMaxHeight = 0;
snowSpeedDecay = 1;
sideGravity = 0.5;
snowDepth = 0;
keyPressedRight = false;
keyPressedLeft = false;
keyPressedUp = false;
keyPressedDown = false;
keyPressedSpace = false;
driftingTotalTime = 1;
lastDriftTime = 0;
offroad = false;
gameTimeMax = 60;
currentSound = 50;
super();
rootmc = _arg1;
offroadArea = new OffroadHitTestArea();
offroadArea.cacheAsBitmap = true;
offroadArea.visible = false;
rootmc.addChildAt(offroadArea, 0);
reset = false;
}
public function getDirectionNormal():void{
}
public function initGame():void{
var _local1:Sprite;
_local1 = new Sprite();
_local1.name = "modelSprite";
rootmc.addChild(_local1);
}
public function getDriftTotal():Number{
return (driftingTotalTime);
}
public function getCameraFacingAngle():Number{
return (cameraFacingAngle);
}
private function keyUpListener(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case KEY_LEFT:
keyPressedLeft = false;
break;
case KEY_RIGHT:
keyPressedRight = false;
break;
case KEY_UP:
keyPressedUp = false;
break;
case KEY_DOWN:
keyPressedDown = false;
break;
case KEY_SPACE:
keyPressedSpace = false;
break;
};
}
public function getTurningDirection():uint{
return (turningDirection);
}
private function addToDriftTotal():void{
driftingTotalTime = (driftingTotalTime + (getTimer() - lastDriftTime));
lastDriftTime = getTimer();
}
public function setIsOffroad(_arg1:Boolean):void{
offroad = _arg1;
}
public function getXPos():Number{
return (cam_pos.x);
}
private function calculate(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Vector;
var _local9:Vector;
var _local10:Vector;
_local2 = speedMax;
if (offroad){
_local2 = speedMaxOffroad;
};
if (keyPressedLeft){
isTurning = true;
turningDirection = 0;
if ((speed > speedSlideMin)){
traction = Math.min(tractionMax, (traction * tractionRate));
} else {
traction = Math.max(tractionMin, (traction / tractionRate));
};
dw = ((steer * adjust(Math.abs(speed), steer_threshold)) * sign(speed));
angle = (angle + dw);
} else {
if (keyPressedRight){
isTurning = true;
turningDirection = 1;
if ((speed > speedSlideMin)){
traction = Math.min(tractionMax, (traction * tractionRate));
} else {
traction = Math.max(tractionMin, (traction / tractionRate));
};
dw = ((-(steer) * adjust(Math.abs(speed), steer_threshold)) * sign(speed));
angle = (angle + dw);
} else {
dw = 0;
if (isTurning){
speed = (realSpeed * sign(speed));
};
isTurning = false;
traction = Math.max(tractionMin, (traction / tractionRate));
};
};
if (keyPressedSpace){
speed = Math.min((speed + accel), _local2);
setCurrentSound(1);
} else {
if (keyPressedDown){
speed = Math.max((speed - accel), speedMin);
setCurrentSound(2);
} else {
speed = (speed * drift);
traction = Math.max(tractionMin, (traction / tractionRate));
setCurrentSound(2);
};
};
vx = (vx + (((Math.cos(angle) * speed) - vx) / traction));
vy = (vy + (((Math.sin(angle) * speed) - vy) / traction));
realSpeed = Math.sqrt(((vx * vx) + (vy * vy)));
carFacingAngle = (angle * RAD2DEG);
movementAngle = (Math.atan2(vy, vx) * RAD2DEG);
if (!turningDirection){
angleDiff = fixAngle((carFacingAngle - movementAngle));
} else {
angleDiff = fixAngle((movementAngle - carFacingAngle));
};
if ((((((((realSpeed > speedSlideMin)) && ((angleDiff >= driftAngleMin)))) && ((angleDiff <= driftAngleMax)))) && (!(offroad)))){
if (!drifting){
lastDriftTime = getTimer();
} else {
addToDriftTotal();
};
drifting = true;
} else {
if (offroad){
driftingTotalTime = Math.max(1, (driftingTotalTime - 40));
drifting = false;
} else {
drifting = false;
};
};
if (Math.abs(speed) > 0.1){
if (!offroad){
pixelsTraveled = (pixelsTraveled + realSpeed);
};
} else {
setCurrentSound(0);
speed = 0;
};
_local3 = (movementAngle * DEG2RAD);
_local4 = Math.cos(_local3);
_local5 = Math.sin(_local3);
_local6 = (_local4 * cameraDistance);
_local7 = (_local5 * cameraDistance);
_local8 = new Vector(vx, vy);
_local9 = new Vector(_local6, _local7);
_local10 = car_pos.getClone();
_local10.plus(_local8);
if ((((((((_local10.x > -760)) && ((_local10.x < 760)))) && ((_local10.y > -760)))) && ((_local10.y < 760)))){
car_pos.plus(_local8);
cam_pos = car_pos.getClone();
cam_pos.minus(_local9);
};
cameraFacingAngle = movementAngle;
if (offroadArea.hitTestPoint(car_pos.x, car_pos.y, true)){
offroad = true;
} else {
offroad = false;
};
dispatchEvent(new Event(GameModel.MODEL_CHANGED));
}
public function getAngleDifference():Number{
return (angleDiff);
}
private function endGame():void{
rootmc.getChildByName("modelSprite").stage.removeEventListener(Event.ENTER_FRAME, calculate);
rootmc.getChildByName("modelSprite").stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownListener);
rootmc.getChildByName("modelSprite").stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpListener);
reset = false;
}
private function keyDownListener(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case KEY_LEFT:
keyPressedLeft = true;
break;
case KEY_RIGHT:
keyPressedRight = true;
break;
case KEY_UP:
keyPressedUp = true;
break;
case KEY_DOWN:
keyPressedDown = true;
break;
case KEY_SPACE:
keyPressedSpace = true;
break;
};
}
public function getCarXPos():Number{
return (car_pos.x);
}
private function updateGameClock(_arg1:TimerEvent):void{
gameTime--;
dispatchEvent(new Event(GameModel.GAME_CLOCK_UPDATED));
if (gameTime <= 0){
endGame();
dispatchEvent(new Event(GameModel.END_GAME));
gameTimer.stop();
};
}
public function startGame():void{
if (!reset){
resetGame();
reset = true;
};
gameTime = gameTimeMax;
gameTimer = new Timer(1000);
gameTimer.addEventListener(TimerEvent.TIMER, updateGameClock);
gameTimer.start();
rootmc.getChildByName("modelSprite").stage.addEventListener(Event.ENTER_FRAME, calculate);
rootmc.getChildByName("modelSprite").stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownListener);
rootmc.getChildByName("modelSprite").stage.addEventListener(KeyboardEvent.KEY_UP, keyUpListener);
dispatchEvent(new Event(GameModel.START_GAME));
}
public function getIsTurning():Boolean{
return (isTurning);
}
public function getCurrentSound():uint{
return (currentSound);
}
private function adjust(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = 0;
if (_arg1 < 2){
_local3 = 0;
} else {
if (_arg1 <= _arg2){
_local3 = (_arg1 / _arg2);
} else {
_local3 = 1;
};
};
return (_local3);
}
public function getYPos():Number{
return (cam_pos.y);
}
public function getCarFacingAngle():Number{
return (carFacingAngle);
}
private function setCurrentSound(_arg1:uint):void{
if (currentSound != _arg1){
currentSound = _arg1;
dispatchEvent(new Event(GameModel.SOUND_CHANGED));
};
}
public function getGameClock():Number{
return (gameTime);
}
public function getTraction():Number{
return (traction);
}
public function getMovementAngle():Number{
return (movementAngle);
}
private function sign(_arg1:Number):Number{
if (_arg1 < 0){
return (-1);
};
if (_arg1 > 0){
return (1);
};
return (0);
}
public function getFinalScore():Number{
return ((int(((getTotalKmTraveled() * getDriftBonus()) * 100)) / 100));
}
public function fixAngle(_arg1:Number):Number{
_arg1 = (_arg1 % 360);
return (((_arg1)<0) ? (_arg1 + 360) : _arg1);
}
public function getIsOffroad():Boolean{
return (offroad);
}
public function getCarYPos():Number{
return (car_pos.y);
}
public function resetGame():void{
drifting = false;
traction = tractionMin;
speed = 0;
realSpeed = 0;
vx = 0;
vy = 0;
dw = 0;
isTurning = false;
turningDirection = 0;
angle = 0;
carFacingAngle = 0;
cameraFacingAngle = 0;
movementAngle = 0;
angleDiff = 0;
dir = null;
keyPressedRight = false;
keyPressedLeft = false;
keyPressedUp = false;
keyPressedDown = false;
keyPressedSpace = false;
car_pos = new Vector(0, 0);
cam_pos = car_pos.getClone();
pixelsTraveled = 0;
kmTraveled = 0;
lastDriftTime = 0;
driftingTotalTime = 1;
dispatchEvent(new Event(GameModel.PREP_GAME));
}
public function getTotalKmTraveled():Number{
kmTraveled = (int((((pixelsTraveled / 85) * 4.65) * 100)) / 100);
return (kmTraveled);
}
public function getDriftBonus():Number{
return (Math.max(1, (int(((driftingTotalTime / 1000) * 100)) / 100)));
}
public function getIsDrifting():Boolean{
return (drifting);
}
public function getAcceleration():Number{
return (speed);
}
}
}//package com.mercedesamg.mvc
Section 68
//GameOverView (com.mercedesamg.mvc.GameOverView)
package com.mercedesamg.mvc {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class GameOverView {
private var distance_txt:TextField;
private var model:GameModel;
private var total_txt:TextField;
private var bonus_txt:TextField;
private var rootmc:MovieClip;
private function showGameOver(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
rootmc.visible = true;
rootmc.gotoAndPlay("_show");
_local2 = _arg1.target.getTotalKmTraveled();
_local3 = _arg1.target.getDriftBonus();
_local4 = _arg1.target.getFinalScore();
distance_txt.text = _local2.toString();
bonus_txt.text = _local3.toString();
total_txt.text = _local4.toString();
}
public function init(_arg1:GameModel, _arg2:MovieClip):void{
this.model = _arg1;
this.rootmc = _arg2;
rootmc.master = this;
distance_txt = rootmc.scoring_fields_mc.distance_txt;
bonus_txt = rootmc.scoring_fields_mc.bonus_txt;
total_txt = rootmc.scoring_fields_mc.total_txt;
_arg1.addEventListener(GameModel.END_GAME, showGameOver);
}
}
}//package com.mercedesamg.mvc
Section 69
//MiniMapView (com.mercedesamg.mvc.MiniMapView)
package com.mercedesamg.mvc {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class MiniMapView {
private var track_area:MovieClip;
private var model:GameModel;
private var offroad:Boolean;// = false
private var rootmc:MovieClip;
private var offroad_area:MovieClip;
private var car_dot:MovieClip;
public function MiniMapView(){
offroad = false;
super();
}
private function render(_arg1:Event):void{
var _local2:Point;
_local2 = new Point(_arg1.target.getXPos(), _arg1.target.getYPos());
car_dot.x = _local2.x;
car_dot.y = _local2.y;
}
private function reset(_arg1:Event):void{
car_dot.x = (car_dot.y = 0);
}
public function init(_arg1:GameModel, _arg2:MovieClip):void{
this.model = _arg1;
this.rootmc = _arg2;
this.track_area = _arg2.track_map_mc;
this.car_dot = _arg2.car_pos_mc;
_arg1.addEventListener(GameModel.MODEL_CHANGED, render);
_arg1.addEventListener(GameModel.PREP_GAME, reset);
}
}
}//package com.mercedesamg.mvc
Section 70
//SoundView (com.mercedesamg.mvc.SoundView)
package com.mercedesamg.mvc {
import flash.events.*;
import flash.media.*;
public class SoundView {
private var offroadSound:Sound;
private var accelLoopSound:Sound;
private var currentListener:Function;// = null
private var accelSound:Sound;
private var idleSoundTransform:SoundTransform;
private var idleSound:Sound;
private var decelSound:Sound;
private var model:GameModel;
private var decelGurgleSound:Sound;
private var basicSoundTransform:SoundTransform;
private var driftSound:Sound;
private var soundChannel:SoundChannel;
public function SoundView(){
basicSoundTransform = new SoundTransform();
currentListener = null;
super();
}
public function init(_arg1:GameModel):void{
this.model = _arg1;
basicSoundTransform.volume = 0.6;
soundChannel = new SoundChannel();
idleSound = new IdleSound();
idleSoundTransform = new SoundTransform();
idleSoundTransform.volume = 0.4;
decelGurgleSound = new DecelerateGurgleSound();
decelSound = new DeceleratingSound();
accelSound = new AcceleratingSound();
accelLoopSound = new AccelerationLoopSound();
_arg1.addEventListener(GameModel.SOUND_CHANGED, changeSound);
_arg1.addEventListener(GameModel.START_GAME, startGame);
_arg1.addEventListener(GameModel.END_GAME, stopSounds);
}
private function playAccelerationLoopSound(_arg1:Event):void{
soundChannel.removeEventListener(Event.SOUND_COMPLETE, currentListener);
soundChannel = accelLoopSound.play(0, 500);
soundChannel.soundTransform = basicSoundTransform;
}
private function playDecelerationSound(_arg1:Event):void{
soundChannel.removeEventListener(Event.SOUND_COMPLETE, currentListener);
soundChannel = decelSound.play(0, 0);
soundChannel.soundTransform = basicSoundTransform;
currentListener = playIdleSound;
soundChannel.addEventListener(Event.SOUND_COMPLETE, currentListener);
}
private function playIdleSound(_arg1:Event):void{
soundChannel.removeEventListener(Event.SOUND_COMPLETE, currentListener);
soundChannel.soundTransform = idleSoundTransform;
soundChannel = idleSound.play(0, 900);
}
private function startMainMusic(_arg1:TimerEvent):void{
}
private function stopSounds(_arg1:Event):void{
if (currentListener != null){
soundChannel.removeEventListener(Event.SOUND_COMPLETE, currentListener);
};
soundChannel.stop();
}
private function startGame(_arg1:Event):void{
currentListener = null;
}
private function changeSound(_arg1:Event):void{
var _local2:uint;
_local2 = _arg1.target.getCurrentSound();
soundChannel.stop();
soundChannel.soundTransform = basicSoundTransform;
if (currentListener != null){
soundChannel.removeEventListener(Event.SOUND_COMPLETE, currentListener);
};
switch (_local2){
case 0:
soundChannel = idleSound.play(0, 900);
soundChannel.soundTransform = idleSoundTransform;
currentListener = null;
break;
case 1:
if (model.getAcceleration() > 4){
currentListener = null;
soundChannel = accelLoopSound.play(0, 900);
} else {
soundChannel = accelSound.play(0, 0);
currentListener = playAccelerationLoopSound;
soundChannel.addEventListener(Event.SOUND_COMPLETE, currentListener);
};
break;
case 2:
if (model.getAcceleration() > 5){
soundChannel = decelGurgleSound.play(0, 0);
currentListener = playDecelerationSound;
soundChannel.addEventListener(Event.SOUND_COMPLETE, currentListener);
} else {
currentListener = playIdleSound;
soundChannel = decelSound.play(0, 0);
soundChannel.addEventListener(Event.SOUND_COMPLETE, currentListener);
};
break;
};
}
}
}//package com.mercedesamg.mvc
Section 71
//StatusIconsView (com.mercedesamg.mvc.StatusIconsView)
package com.mercedesamg.mvc {
import flash.events.*;
import flash.display.*;
public class StatusIconsView {
private var rootmc:MovieClip;
private var model:GameModel;
private function render(_arg1:Event):void{
var _local2:Number;
var _local3:uint;
_local2 = _arg1.target.getIsOffroad();
_local3 = _arg1.target.getIsDrifting();
if (_local2){
rootmc.gotoAndStop("offroad");
} else {
if (_local3){
rootmc.gotoAndStop("perfect_drift");
} else {
rootmc.gotoAndStop(1);
};
};
}
private function reset(_arg1:Event):void{
rootmc.gotoAndStop(1);
}
public function init(_arg1:GameModel, _arg2:MovieClip):void{
this.model = _arg1;
this.rootmc = _arg2;
_arg1.addEventListener(GameModel.PREP_GAME, reset);
_arg1.addEventListener(GameModel.MODEL_CHANGED, render);
}
}
}//package com.mercedesamg.mvc
Section 72
//SubmitScoreView (com.mercedesamg.mvc.SubmitScoreView)
package com.mercedesamg.mvc {
import flash.events.*;
import flash.display.*;
import com.mercedesamg.utils.*;
import com.mercedesamg.serverComm.*;
import flash.text.*;
import flash.utils.*;
public class SubmitScoreView {
private var showTimer:Timer;
private var country_txt:TextField;
private var country_up_btn:MovieClip;
private var country_down_btn:MovieClip;
private var model:GameModel;
private var submit_btn:MovieClip;
private var rootmc:MovieClip;
private var name_txt:TextField;
private function showView(_arg1:TimerEvent):void{
rootmc.visible = true;
rootmc.gotoAndPlay("_show");
showTimer.removeEventListener(TimerEvent.TIMER, showView);
showTimer.stop();
}
private function onHighScoreSubmitted(_arg1:Event):void{
submit_btn.addEventListener(MouseEvent.CLICK, submitHighScore);
}
public function init(_arg1:GameModel, _arg2:MovieClip):void{
this.model = _arg1;
this.rootmc = _arg2;
rootmc.master = this;
name_txt = rootmc.name_mc.name_txt;
country_txt = rootmc.country_mc.country_txt;
submit_btn = rootmc.highscore_btn;
submit_btn.addEventListener(MouseEvent.CLICK, submitHighScore);
name_txt.addEventListener(MouseEvent.CLICK, clearNameField);
_arg1.addEventListener(GameModel.END_GAME, checkForHighScores);
HighScores.getInstance().addEventListener(HighScores.HIGH_SCORE_SUBMITTED, onHighScoreSubmitted);
}
public function submitHighScore(_arg1:MouseEvent):void{
var _local2:Array;
var _local3:String;
var _local4:String;
var _local5:Number;
var _local6:String;
var _local7:uint;
submit_btn.removeEventListener(MouseEvent.CLICK, submitHighScore);
_local2 = new Array();
_local3 = name_txt.text;
_local4 = country_txt.text;
if (_local3.length == 0){
_local2.push("You must enter your name.");
} else {
if (_local3 == "Enter Name Here"){
_local2.push("You must enter your name.");
};
};
if (_local4.length == 0){
_local2.push("Your must enter your country of residence.");
};
if (_local2.length <= 0){
_local5 = model.getFinalScore();
HighScores.getInstance().submitHighScore(_local3, _local5, _local4);
} else {
_local6 = "";
_local7 = 0;
while (_local7 < _local2.length) {
_local6 = (_local6 + (_local2[_local7] + "\n"));
_local7++;
};
AlertModalWindow.getInstance().showMessage("Form Validation Error", _local6);
submit_btn.addEventListener(MouseEvent.CLICK, submitHighScore);
};
}
private function clearNameField(_arg1:MouseEvent):void{
if (_arg1.target.text == "Enter Name Here"){
_arg1.target.text = "";
};
}
private function checkForHighScores(_arg1:Event):void{
var _local2:Number;
var _local3:Array;
var _local4:Boolean;
var _local5:Number;
_local2 = _arg1.target.getFinalScore();
_local3 = HighScores.getInstance().getHighScores();
_local4 = false;
if (_local3.length == 0){
_local4 = true;
} else {
_local5 = _local3[(_local3.length - 1)].score;
trace(("lowest score is " + _local5));
if (_local2 > _local5){
_local4 = true;
};
};
if (_local4){
trace("you have a high score!");
showTimer = new Timer(3000, 1);
showTimer.addEventListener(TimerEvent.TIMER, showView);
showTimer.start();
} else {
trace("you don't have a high score");
};
}
}
}//package com.mercedesamg.mvc
Section 73
//TrackZMappingView (com.mercedesamg.mvc.TrackZMappingView)
package com.mercedesamg.mvc {
import flash.events.*;
import flash.display.*;
public class TrackZMappingView {
private var groundScale:Number;// = 3
private var numStrips:Number;// = 0
private var model:GameModel;
private var totalHeight:Number;// = 260
private var topH:Number;// = 1
private var rootmc:MovieClip;
private var cont:MovieClip;
private var strips:Array;
private var bottomH:Number;// = 8
public function TrackZMappingView(){
topH = 1;
bottomH = 8;
groundScale = 3;
totalHeight = 260;
numStrips = 0;
super();
}
private function render(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:uint;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
_local2 = _arg1.target.getXPos();
_local3 = _arg1.target.getYPos();
_local4 = _arg1.target.getAngleDifference();
_local5 = _arg1.target.getCameraFacingAngle();
_local6 = _arg1.target.getTurningDirection();
if (_local6){
_local5 = (_local5 - _local4);
} else {
_local5 = (_local5 + _local4);
};
_local7 = 0;
while (_local7 < numStrips) {
_local8 = strips[_local7];
_local9 = _local8.getChildByName("m");
_local10 = strips[(_local7 + 1)];
_local11 = _local10.getChildByName("m");
_local8.rotation = (_local10.rotation = _local5);
_local9.y = (_local11.y = _local2);
_local9.x = (_local11.x = _local3);
_local7 = (_local7 + 2);
};
}
public function init(_arg1:GameModel, _arg2:MovieClip):void{
var _local3:Number;
var _local4:Number;
var _local5:Sprite;
var _local6:*;
var _local7:box;
var _local8:Number;
var _local9:Number;
this.model = _arg1;
this.cont = _arg2;
cont.x = 385;
cont.y = 210;
cont.cacheAsBitmap = true;
_local3 = ((topH + bottomH) / 2);
_local4 = 0;
strips = new Array();
_local6 = 0;
while (_local6 < totalHeight) {
if (_local4 < (totalHeight * 0.06)){
_local5 = new track_lo();
} else {
_local5 = new track_hi();
};
strips.push(_local5);
_local5.y = 200;
_local7 = new box();
_local8 = Math.pow((_local6 / (totalHeight / _local3)), 1.5);
_local9 = Math.round((topH + ((bottomH - topH) * _local8)));
_local7.height = (_local9 + 2);
_local7.width = 750;
_local7.x = (_local7.x - 375);
_local4 = (_local4 + _local9);
_local7.y = _local4;
_local5.mask = _local7;
_local5.rotation = 0;
_local5.getChildByName("m").y = 0;
_local5.getChildByName("m").x = 0;
_local5.scaleX = (_local5.scaleY = ((((_local4 / totalHeight) * totalHeight) * groundScale) / 110));
cont.addChild(_local5);
cont.addChild(_local7);
if (((((_local4 + (_local9 * 2)) > totalHeight)) && (((_local6 % 2) == 0)))){
break;
};
_local6++;
};
numStrips = _local6;
_arg1.addEventListener(GameModel.MODEL_CHANGED, render);
_arg1.addEventListener(GameModel.PREP_GAME, resetTrack);
}
public function resetTrack(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = 0;
while (_local2 < numStrips) {
_local3 = strips[_local2];
_local4 = _local3.getChildByName("m");
_local5 = strips[(_local2 + 1)];
_local6 = _local5.getChildByName("m");
_local3.rotation = (_local5.rotation = 0);
_local4.y = (_local6.y = -10);
_local4.x = (_local6.x = 0);
_local2 = (_local2 + 2);
};
}
}
}//package com.mercedesamg.mvc
Section 74
//HighScores (com.mercedesamg.serverComm.HighScores)
package com.mercedesamg.serverComm {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
import flash.xml.*;
public class HighScores extends EventDispatcher {
public var scoreSubmitted:Boolean;
private var loader:URLLoader;
private var highScores:Array;
private var view:DisplayObject;
public static const HIGH_SCORE_SUBMITTED:String = "high_score_subitted";
public static const HIGH_SCORES_RECEIVED:String = "high_scores_received";
private static var _instance:HighScores;
public function HighScores(_arg1:SingletonEnforcer){
loader = new URLLoader();
highScores = new Array();
scoreSubmitted = false;
}
private function highScoreSubmitted(_arg1:Event):void{
loader.removeEventListener(Event.COMPLETE, highScoreSubmitted);
dispatchEvent(new Event(HighScores.HIGH_SCORE_SUBMITTED));
}
private function onHighScoresLoaded(_arg1:Event):void{
var s:String;
var s2:String;
var d:XML;
var e = _arg1;
loader.removeEventListener(Event.COMPLETE, onHighScoresLoaded);
try {
s = e.target.data;
s2 = (("<?xml version='1.0' encoding='UTF-8'?><high_scores>" + e.target.data) + "</high_scores>");
d = new XML(s2);
parseHighScores(d);
} catch(er:TypeError) {
trace(((("data could not to converted to XML format:\n" + er) + "\n") + e.target.data));
};
}
public function submitHighScore(_arg1:String, _arg2:Number, _arg3:String):void{
var _local4:URLVariables;
var _local5:URLRequest;
trace(((((("HighScores.submitHighScore() name: " + _arg1) + " score: ") + _arg2) + " country: ") + _arg3));
_local4 = new URLVariables();
_local4.action = "i";
_local4.racename = _arg1;
_local4.score = _arg2;
_local4.country = _arg3;
_local5 = new URLRequest("http://www.mercedes-amg.com/drift/scores.php");
_local5.data = _local4;
_local5.method = URLRequestMethod.POST;
scoreSubmitted = true;
loader.addEventListener(Event.COMPLETE, highScoreSubmitted);
loader.load(_local5);
}
public function getHighScores():Array{
return (highScores);
}
public function registerView(_arg1:DisplayObject):void{
this.view = _arg1;
}
public function loadHighScores():void{
loader.addEventListener(Event.COMPLETE, onHighScoresLoaded);
loader.dataFormat = URLLoaderDataFormat.TEXT;
loader.load(new URLRequest("http://www.mercedes-amg.com/drift/scores.php"));
}
private function parseHighScores(_arg1:XML):void{
var _local2:XMLList;
var _local3:int;
var _local4:int;
highScores = new Array();
_local2 = _arg1.user;
_local3 = _local2.length();
_local4 = 0;
while (_local4 < _local3) {
highScores.push({racename:_local2[_local4].racename, score:_local2[_local4].score, country:_local2[_local4].country});
_local4++;
};
dispatchEvent(new Event(HighScores.HIGH_SCORES_RECEIVED));
trace((("high scores parsed!\nThere are " + highScores.length) + " number of scores"));
}
public static function getInstance():HighScores{
if (HighScores._instance == null){
HighScores._instance = new HighScores(new SingletonEnforcer());
};
return (HighScores._instance);
}
}
}//package com.mercedesamg.serverComm
class SingletonEnforcer {
private function SingletonEnforcer(){
}
}
Section 75
//SendToFriend (com.mercedesamg.serverComm.SendToFriend)
package com.mercedesamg.serverComm {
import flash.events.*;
import flash.display.*;
import com.mercedesamg.utils.*;
import flash.text.*;
import flash.net.*;
public class SendToFriend extends EventDispatcher {
private var loader:URLLoader;
public static const TAF_SERVER_ERROR:String = "taf_server_error";
public static const TAF_SUBMITTED:String = "taf_submitted";
public static const TAF_ERROR:String = "taf_error";
private static var _instance:SendToFriend;
public function SendToFriend(_arg1:SingletonEnforcer){
loader = new URLLoader();
}
private function onTAFComplete(_arg1:Event):void{
loader.removeEventListener(Event.COMPLETE, onTAFComplete);
dispatchEvent(new Event(SendToFriend.TAF_SUBMITTED));
AlertModalWindow.getInstance().showMessage("Your Email Has Been Sent", "Thank you for spreading the word about our latest Drift Revolution online game!");
}
public function submitToServer(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String):void{
var _local6:URLVariables;
var _local7:URLRequest;
trace(((((((((("submiting TAF to server. from: " + _arg2) + " fromE: ") + _arg3) + " to: ") + _arg4) + " toE:") + _arg5) + " mesg: ") + _arg1));
_local6 = new URLVariables();
_local6.subject = (_arg2 + " has invited you to a Winter Drift!");
_local6.messageBody = _arg1;
_local6.senderName = _arg2;
_local6.senderEmail = _arg3;
_local6.friendName1 = _arg4;
_local6.friendEmail1 = _arg5;
_local7 = new URLRequest("http://www.mercedes-amg.com/drift/sendtoafriend.php");
_local7.data = _local6;
_local7.method = URLRequestMethod.POST;
loader.addEventListener(Event.COMPLETE, onTAFComplete);
loader.load(_local7);
}
public function onSubmit(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String):void{
var _local6:Array;
var _local7:String;
var _local8:uint;
_local6 = new Array();
if (_arg2.length == 0){
_local6.push("You must enter your name.");
};
if (_arg3.length == 0){
_local6.push("Your must enter your email address.");
} else {
if (!TextFieldValidators.validateEmail(_arg3)){
_local6.push("Your email address is invalid.");
};
};
if (_arg4.length == 0){
_local6.push("You must enter your friend's name.");
};
if (_arg5.length == 0){
_local6.push("Your must enter your friend's email address.");
} else {
if (!TextFieldValidators.validateEmail(_arg5)){
_local6.push("Your friend's email address is invalid.");
};
};
if (_local6.length == 0){
submitToServer(_arg1, _arg2, _arg3, _arg4, _arg5);
} else {
dispatchEvent(new Event(SendToFriend.TAF_ERROR));
_local7 = "";
_local8 = 0;
while (_local8 < _local6.length) {
_local7 = (_local7 + (_local6[_local8] + "\n"));
_local8++;
};
AlertModalWindow.getInstance().showMessage("Form Validation Error", _local7);
};
}
public static function getInstance():SendToFriend{
if (SendToFriend._instance == null){
SendToFriend._instance = new SendToFriend(new SingletonEnforcer());
};
return (SendToFriend._instance);
}
}
}//package com.mercedesamg.serverComm
class SingletonEnforcer {
private function SingletonEnforcer(){
}
}
Section 76
//AlertModalWindow (com.mercedesamg.utils.AlertModalWindow)
package com.mercedesamg.utils {
import com.mercedesamg.gs.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class AlertModalWindow extends EventDispatcher {
private var showing:Boolean;
private var titletxt:TextField;
private var bgmc:MovieClip;
private var closebtn:MovieClip;
private var descmc:MovieClip;
private var titlemc:MovieClip;
private var rootmc:MovieClip;
private var desctxt:TextField;
private static const TEXT_WIDTH:Number = 430;
private static var _instance:AlertModalWindow;
public function AlertModalWindow(_arg1:SingletonEnforcer){
}
private function closeBtnClicked(_arg1:MouseEvent):void{
hideMessage();
}
public function init(_arg1:MovieClip):void{
_arg1.visible = false;
rootmc = _arg1;
titlemc = rootmc.title_mc;
titletxt = titlemc.title_txt;
descmc = rootmc.description_mc;
desctxt = descmc.description_txt;
closebtn = rootmc.close_btn;
bgmc = rootmc.bg_mc;
titletxt.autoSize = (desctxt.autoSize = TextFieldAutoSize.LEFT);
titletxt.width = (desctxt.width = AlertModalWindow.TEXT_WIDTH);
titletxt.multiline = false;
desctxt.multiline = true;
desctxt.wordWrap = true;
showing = false;
closebtn.addEventListener(MouseEvent.ROLL_OVER, closeBtnRollOver);
closebtn.addEventListener(MouseEvent.ROLL_OUT, closeBtnRollOut);
closebtn.buttonMode = true;
}
public function showMessage(_arg1:String, _arg2:String, _arg3:Boolean=true):void{
titletxt.text = _arg1;
desctxt.text = _arg2;
closebtn.y = ((descmc.y + descmc.height) + 15);
if (!this.showing){
rootmc.alpha = 0;
rootmc.visible = true;
TweenLite.to(rootmc, 0.5, {alpha:1});
this.showing = true;
bgmc.addEventListener(MouseEvent.CLICK, modalEnforcer);
if (_arg3){
closebtn.addEventListener(MouseEvent.CLICK, closeBtnClicked);
closebtn.visible = true;
} else {
closebtn.visible = false;
};
};
}
private function onHideTweenCompleted():void{
rootmc.visible = false;
}
public function hideMessage():void{
if (this.showing){
TweenLite.to(rootmc, 0.2, {alpha:0, onComplete:onHideTweenCompleted});
this.showing = false;
bgmc.removeEventListener(MouseEvent.CLICK, modalEnforcer);
closebtn.removeEventListener(MouseEvent.CLICK, closeBtnClicked);
};
}
private function closeBtnRollOver(_arg1:MouseEvent):void{
closebtn.gotoAndPlay("_rollover");
}
private function modalEnforcer(_arg1:MouseEvent):void{
}
private function closeBtnRollOut(_arg1:MouseEvent):void{
closebtn.gotoAndStop(1);
}
public static function getInstance():AlertModalWindow{
if (AlertModalWindow._instance == null){
AlertModalWindow._instance = new AlertModalWindow(new SingletonEnforcer());
};
return (AlertModalWindow._instance);
}
}
}//package com.mercedesamg.utils
class SingletonEnforcer {
private function SingletonEnforcer(){
}
}
Section 77
//MathAddons (com.mercedesamg.utils.MathAddons)
package com.mercedesamg.utils {
public class MathAddons {
static const DEG2RAD = 0.0174532925199433;
static const RAD2DEG = 57.2957795130823;
public static function atan2D(_arg1:Number, _arg2:Number):Number{
return ((Math.atan2(_arg1, _arg2) * RAD2DEG));
}
public static function tanD(_arg1:Number):Number{
return (Math.tan((_arg1 * DEG2RAD)));
}
public static function fixAngle(_arg1:Number):Number{
_arg1 = (_arg1 % 360);
return (((_arg1)<0) ? (_arg1 + 360) : _arg1);
}
public static function sinD(_arg1:Number):Number{
return (Math.sin((_arg1 * DEG2RAD)));
}
public static function asinD(_arg1:Number):Number{
return ((Math.asin(_arg1) * RAD2DEG));
}
public static function degreesToRadians(_arg1:Number):Number{
return ((_arg1 * DEG2RAD));
}
public static function distanceBetweenPoints(_arg1, _arg2, _arg3, _arg4):Number{
var _local5:*;
var _local6:*;
_local5 = (_arg3 - _arg1);
_local6 = (_arg4 - _arg2);
return (Math.sqrt(((_local5 * _local5) + (_local6 * _local6))));
}
public static function radiansToDegrees(_arg1:Number):Number{
return ((_arg1 * RAD2DEG));
}
public static function cosD(_arg1:Number):Number{
return (Math.cos((_arg1 * DEG2RAD)));
}
public static function acosD(_arg1:Number):Number{
return ((Math.acos(_arg1) * RAD2DEG));
}
}
}//package com.mercedesamg.utils
Section 78
//MiscDataProviders (com.mercedesamg.utils.MiscDataProviders)
package com.mercedesamg.utils {
public class MiscDataProviders {
public static function getCountriesList():Array{
var _local1:Array;
_local1 = new Array();
_local1.push({uuid:230, name:"United Kingdom"});
_local1.push({uuid:231, name:"United States"});
_local1.push({uuid:80, name:"Germany"});
_local1.push({uuid:1, name:"Abkhazia"});
_local1.push({uuid:2, name:"Afghanistan"});
_local1.push({uuid:3, name:"Akrotiri and Dhekelia"});
_local1.push({uuid:4, name:"Åland"});
_local1.push({uuid:5, name:"Albania"});
_local1.push({uuid:6, name:"Algeria"});
_local1.push({uuid:7, name:"American Samoa"});
_local1.push({uuid:8, name:"Andorra"});
_local1.push({uuid:9, name:"Angola"});
_local1.push({uuid:10, name:"Anguilla"});
_local1.push({uuid:11, name:"Antigua and Barbuda"});
_local1.push({uuid:12, name:"Argentina"});
_local1.push({uuid:13, name:"Armenia"});
_local1.push({uuid:14, name:"Aruba"});
_local1.push({uuid:15, name:"Ascension Island"});
_local1.push({uuid:16, name:"Australia"});
_local1.push({uuid:17, name:"Austria"});
_local1.push({uuid:18, name:"Azerbaijan"});
_local1.push({uuid:19, name:"Bahamas, The"});
_local1.push({uuid:20, name:"Bahrain"});
_local1.push({uuid:21, name:"Bangladesh"});
_local1.push({uuid:22, name:"Barbados"});
_local1.push({uuid:23, name:"Belarus"});
_local1.push({uuid:24, name:"Belguim"});
_local1.push({uuid:25, name:"Belize"});
_local1.push({uuid:26, name:"Benin"});
_local1.push({uuid:27, name:"Bermuda"});
_local1.push({uuid:28, name:"Bhutan"});
_local1.push({uuid:29, name:"Bolivia"});
_local1.push({uuid:30, name:"Bosnia and Herzegovina"});
_local1.push({uuid:31, name:"Botswana"});
_local1.push({uuid:32, name:"Brazil"});
_local1.push({uuid:33, name:"Brunei"});
_local1.push({uuid:34, name:"Bulgeria"});
_local1.push({uuid:35, name:"Burkina Faso"});
_local1.push({uuid:36, name:"Burundi"});
_local1.push({uuid:37, name:"Cambodia"});
_local1.push({uuid:38, name:"Cameroon"});
_local1.push({uuid:39, name:"Canada"});
_local1.push({uuid:40, name:"Cape Verde"});
_local1.push({uuid:41, name:"Cayman Islands"});
_local1.push({uuid:42, name:"Central African Republic"});
_local1.push({uuid:43, name:"Chad"});
_local1.push({uuid:44, name:"Chile"});
_local1.push({uuid:45, name:"China, People's Republic of"});
_local1.push({uuid:46, name:"China, Republic of"});
_local1.push({uuid:47, name:"Christman Island"});
_local1.push({uuid:48, name:"Cocos (Keeling) Islands"});
_local1.push({uuid:49, name:"Colombia"});
_local1.push({uuid:50, name:"Comoros"});
_local1.push({uuid:51, name:"Congo, Democratic Republic of"});
_local1.push({uuid:52, name:"Congo, Republic of"});
_local1.push({uuid:53, name:"Cook Islands"});
_local1.push({uuid:54, name:"Costa Rica"});
_local1.push({uuid:55, name:"Côte d'Ivoire"});
_local1.push({uuid:56, name:"Croatia"});
_local1.push({uuid:57, name:"Cuba"});
_local1.push({uuid:58, name:"Cyprus"});
_local1.push({uuid:59, name:"Czech Republic"});
_local1.push({uuid:60, name:"Denmark"});
_local1.push({uuid:61, name:"Djibouti"});
_local1.push({uuid:62, name:"Dominica"});
_local1.push({uuid:63, name:"Dominican Republic"});
_local1.push({uuid:64, name:"Ecuador"});
_local1.push({uuid:65, name:"Egypt"});
_local1.push({uuid:66, name:"El Salvador"});
_local1.push({uuid:67, name:"Equatorial Guinea"});
_local1.push({uuid:68, name:"Eritrea"});
_local1.push({uuid:69, name:"Estonia"});
_local1.push({uuid:70, name:"Ethiopia"});
_local1.push({uuid:71, name:"Falkland Islands"});
_local1.push({uuid:72, name:"Faroe Islands"});
_local1.push({uuid:73, name:"Fiji"});
_local1.push({uuid:74, name:"Finland"});
_local1.push({uuid:75, name:"France"});
_local1.push({uuid:76, name:"French Polynesia"});
_local1.push({uuid:77, name:"Gabon"});
_local1.push({uuid:78, name:"Gambia, The"});
_local1.push({uuid:79, name:"Georgia"});
_local1.push({uuid:81, name:"Ghana"});
_local1.push({uuid:82, name:"Gibraltar"});
_local1.push({uuid:83, name:"Greece"});
_local1.push({uuid:84, name:"Greenland"});
_local1.push({uuid:85, name:"Grenada"});
_local1.push({uuid:86, name:"Guam"});
_local1.push({uuid:87, name:"Guatemala"});
_local1.push({uuid:88, name:"Guernsey"});
_local1.push({uuid:89, name:"Guinea"});
_local1.push({uuid:90, name:"Guinea-Bissau"});
_local1.push({uuid:91, name:"Guyana"});
_local1.push({uuid:92, name:"Haiti"});
_local1.push({uuid:93, name:"Honduras"});
_local1.push({uuid:94, name:"Hong Kong"});
_local1.push({uuid:95, name:"Hungary"});
_local1.push({uuid:96, name:"Iceland"});
_local1.push({uuid:97, name:"India"});
_local1.push({uuid:98, name:"Indonesia"});
_local1.push({uuid:99, name:"Iran"});
_local1.push({uuid:100, name:"Iraq"});
_local1.push({uuid:101, name:"Ireland"});
_local1.push({uuid:102, name:"Isle of Man"});
_local1.push({uuid:103, name:"Isreal"});
_local1.push({uuid:104, name:"Italy"});
_local1.push({uuid:105, name:"Jamaica"});
_local1.push({uuid:106, name:"Japan"});
_local1.push({uuid:107, name:"Jersey"});
_local1.push({uuid:108, name:"Jordan"});
_local1.push({uuid:109, name:"Kazakhstan"});
_local1.push({uuid:110, name:"Kenya"});
_local1.push({uuid:111, name:"Kiribati"});
_local1.push({uuid:112, name:"Korea, Democratic People's Republic of"});
_local1.push({uuid:113, name:"Korea, Republic of"});
_local1.push({uuid:114, name:"Kosovo"});
_local1.push({uuid:115, name:"Kuwait"});
_local1.push({uuid:116, name:"Kyrgyzstan"});
_local1.push({uuid:117, name:"Laos"});
_local1.push({uuid:118, name:"Latvia"});
_local1.push({uuid:119, name:"Lebanon"});
_local1.push({uuid:120, name:"Lesotho"});
_local1.push({uuid:121, name:"Liberia"});
_local1.push({uuid:122, name:"Libya"});
_local1.push({uuid:123, name:"Liechtenstein"});
_local1.push({uuid:124, name:"Lithuania"});
_local1.push({uuid:125, name:"Luxembourg"});
_local1.push({uuid:126, name:"Macao"});
_local1.push({uuid:127, name:"Macedonia, Republic of"});
_local1.push({uuid:128, name:"Madagascar"});
_local1.push({uuid:129, name:"Malawi"});
_local1.push({uuid:130, name:"Malaysia"});
_local1.push({uuid:131, name:"Maldives"});
_local1.push({uuid:132, name:"Mali"});
_local1.push({uuid:133, name:"Malta"});
_local1.push({uuid:134, name:"Marshall Islands"});
_local1.push({uuid:135, name:"Mauritania"});
_local1.push({uuid:136, name:"Mauritius"});
_local1.push({uuid:137, name:"Mayotte"});
_local1.push({uuid:138, name:"Mexico"});
_local1.push({uuid:139, name:"Micronesia"});
_local1.push({uuid:140, name:"Moldova"});
_local1.push({uuid:141, name:"Monaco"});
_local1.push({uuid:142, name:"Mongolia"});
_local1.push({uuid:143, name:"Montenegro"});
_local1.push({uuid:144, name:"Montserrat"});
_local1.push({uuid:145, name:"Morocco"});
_local1.push({uuid:146, name:"Mozambique"});
_local1.push({uuid:147, name:"Myanmar"});
_local1.push({uuid:148, name:"Nagorno-Karabakh"});
_local1.push({uuid:149, name:"Namibia"});
_local1.push({uuid:150, name:"Nauru"});
_local1.push({uuid:151, name:"Nepal"});
_local1.push({uuid:152, name:"Netherlands"});
_local1.push({uuid:153, name:"Netherlands Antilles"});
_local1.push({uuid:154, name:"New Caledonia"});
_local1.push({uuid:155, name:"New Zealand"});
_local1.push({uuid:156, name:"Nicaragua"});
_local1.push({uuid:157, name:"Niger"});
_local1.push({uuid:158, name:"Nigeria"});
_local1.push({uuid:159, name:"Niue"});
_local1.push({uuid:160, name:"Norfolk Island"});
_local1.push({uuid:161, name:"Northern Cyprus"});
_local1.push({uuid:162, name:"Northern Mariana Islands"});
_local1.push({uuid:163, name:"Norway"});
_local1.push({uuid:164, name:"Oman"});
_local1.push({uuid:165, name:"Pakistan"});
_local1.push({uuid:166, name:"Palau"});
_local1.push({uuid:167, name:"Palestine - State of Palestine"});
_local1.push({uuid:168, name:"Panama"});
_local1.push({uuid:169, name:"Papua New Guinea"});
_local1.push({uuid:170, name:"Paraguay"});
_local1.push({uuid:171, name:"Peru"});
_local1.push({uuid:172, name:"Phillippines"});
_local1.push({uuid:173, name:"Pitcairn Islands"});
_local1.push({uuid:174, name:"Poland"});
_local1.push({uuid:175, name:"Portugal"});
_local1.push({uuid:176, name:"Pridnestrovie"});
_local1.push({uuid:177, name:"Puerto Rico"});
_local1.push({uuid:178, name:"Qatar"});
_local1.push({uuid:179, name:"Romania"});
_local1.push({uuid:180, name:"Russia"});
_local1.push({uuid:181, name:"Rwanda"});
_local1.push({uuid:182, name:"Saint Barthelemy"});
_local1.push({uuid:183, name:"Saint Helena"});
_local1.push({uuid:184, name:"Saint Kitts and Nevis"});
_local1.push({uuid:185, name:"Saint Lucia"});
_local1.push({uuid:186, name:"Saint Martin"});
_local1.push({uuid:187, name:"Saint Pierre and Miquelon"});
_local1.push({uuid:188, name:"Saint Vincent and the Granadines"});
_local1.push({uuid:189, name:"Samoa"});
_local1.push({uuid:190, name:"San Marino"});
_local1.push({uuid:191, name:"São Tomé and Príncipe"});
_local1.push({uuid:192, name:"Saudi Arabia"});
_local1.push({uuid:193, name:"Senegal"});
_local1.push({uuid:194, name:"Seychelles"});
_local1.push({uuid:195, name:"Sierra Leone"});
_local1.push({uuid:196, name:"Singapore"});
_local1.push({uuid:197, name:"Slovakia"});
_local1.push({uuid:198, name:"Slovenia"});
_local1.push({uuid:199, name:"Solomon Islands"});
_local1.push({uuid:200, name:"Somalia"});
_local1.push({uuid:201, name:"Somaliland"});
_local1.push({uuid:202, name:"South Africa"});
_local1.push({uuid:203, name:"South Ossetia"});
_local1.push({uuid:204, name:"Spain"});
_local1.push({uuid:205, name:"Sri Lanka"});
_local1.push({uuid:206, name:"Sudan"});
_local1.push({uuid:207, name:"Suriname"});
_local1.push({uuid:208, name:"Svalbard"});
_local1.push({uuid:209, name:"Swaziland"});
_local1.push({uuid:210, name:"Sweden"});
_local1.push({uuid:211, name:"Switzerland"});
_local1.push({uuid:212, name:"Syria"});
_local1.push({uuid:213, name:"Tajikistan"});
_local1.push({uuid:214, name:"Tanzania"});
_local1.push({uuid:215, name:"Thailand"});
_local1.push({uuid:216, name:"Timor-Leste"});
_local1.push({uuid:217, name:"Togo"});
_local1.push({uuid:218, name:"Tokelau"});
_local1.push({uuid:219, name:"Tonga"});
_local1.push({uuid:220, name:"Trinidad and Tobago"});
_local1.push({uuid:221, name:"Tristan de Cunha"});
_local1.push({uuid:222, name:"Tunisia"});
_local1.push({uuid:223, name:"Turkey"});
_local1.push({uuid:224, name:"Turkmenistan"});
_local1.push({uuid:225, name:"Turks and Caicos Islands"});
_local1.push({uuid:226, name:"Tuvalu"});
_local1.push({uuid:227, name:"Uganda"});
_local1.push({uuid:228, name:"Ukraine"});
_local1.push({uuid:229, name:"United Arab Emirates"});
_local1.push({uuid:232, name:"Uruguay"});
_local1.push({uuid:233, name:"Uzbekistan"});
_local1.push({uuid:234, name:"Vanuatu"});
_local1.push({uuid:235, name:"Vatican City"});
_local1.push({uuid:236, name:"Venezuela"});
_local1.push({uuid:237, name:"Vietnam"});
_local1.push({uuid:238, name:"Virgin Islands, British"});
_local1.push({uuid:239, name:"Virgin Islands, United States"});
_local1.push({uuid:240, name:"Wallis and Futuna"});
_local1.push({uuid:241, name:"Western Sahara - Sahrawi Arab Democratic Republic"});
_local1.push({uuid:242, name:"Yemen"});
_local1.push({uuid:243, name:"Zambia"});
_local1.push({uuid:244, name:"Zimbabwe"});
return (_local1);
}
public static function getUSStates():Array{
var _local1:Array;
_local1 = new Array();
_local1.push({data:null, label:""});
_local1.push({data:"AL", label:"AL"});
_local1.push({data:"AK", label:"AK"});
_local1.push({data:"AZ", label:"AZ"});
_local1.push({data:"AR", label:"AR"});
_local1.push({data:"CA", label:"CA"});
_local1.push({data:"CO", label:"CO"});
_local1.push({data:"CT", label:"CT"});
_local1.push({data:"DE", label:"DE"});
_local1.push({data:"FL", label:"FL"});
_local1.push({data:"GA", label:"GA"});
_local1.push({data:"HI", label:"HI"});
_local1.push({data:"ID", label:"ID"});
_local1.push({data:"IL", label:"IL"});
_local1.push({data:"IN", label:"IN"});
_local1.push({data:"IA", label:"IA"});
_local1.push({data:"KS", label:"KS"});
_local1.push({data:"KY", label:"KY"});
_local1.push({data:"LA", label:"LA"});
_local1.push({data:"ME", label:"ME"});
_local1.push({data:"MD", label:"MD"});
_local1.push({data:"MA", label:"MA"});
_local1.push({data:"MI", label:"MI"});
_local1.push({data:"MN", label:"MN"});
_local1.push({data:"MS", label:"MS"});
_local1.push({data:"MO", label:"MO"});
_local1.push({data:"MT", label:"MT"});
_local1.push({data:"NE", label:"NE"});
_local1.push({data:"NV", label:"NV"});
_local1.push({data:"NH", label:"NH"});
_local1.push({data:"NJ", label:"NJ"});
_local1.push({data:"NM", label:"NM"});
_local1.push({data:"NY", label:"NY"});
_local1.push({data:"NC", label:"NC"});
_local1.push({data:"ND", label:"ND"});
_local1.push({data:"OH", label:"OH"});
_local1.push({data:"OK", label:"OK"});
_local1.push({data:"OR", label:"OR"});
_local1.push({data:"PA", label:"PA"});
_local1.push({data:"RI", label:"RI"});
_local1.push({data:"SC", label:"SC"});
_local1.push({data:"SD", label:"SD"});
_local1.push({data:"TN", label:"TN"});
_local1.push({data:"TX", label:"TX"});
_local1.push({data:"UT", label:"UT"});
_local1.push({data:"VT", label:"VT"});
_local1.push({data:"VA", label:"VA"});
_local1.push({data:"WA", label:"WA"});
_local1.push({data:"DC", label:"DC"});
_local1.push({data:"WV", label:"WV"});
_local1.push({data:"WI", label:"WI"});
_local1.push({data:"WY", label:"WI"});
return (_local1);
}
}
}//package com.mercedesamg.utils
Section 79
//NavButton (com.mercedesamg.utils.NavButton)
package com.mercedesamg.utils {
import flash.events.*;
import flash.display.*;
public class NavButton extends EventDispatcher {
private var instance:MovieClip;
private var btn_name:String;
public static const NAV_BUTTON_CLICKED:String = "nav_button_clicked";
public function NavButton(_arg1:MovieClip, _arg2:String){
instance = _arg1;
btn_name = _arg2;
instance.buttonMode = true;
instance.addEventListener(MouseEvent.ROLL_OVER, rollOverListener);
instance.addEventListener(MouseEvent.ROLL_OUT, rollOutListener);
instance.addEventListener(MouseEvent.CLICK, clickListener);
}
public function disableButton():void{
instance.removeEventListener(MouseEvent.CLICK, clickListener);
instance.removeEventListener(MouseEvent.ROLL_OVER, rollOverListener);
instance.removeEventListener(MouseEvent.ROLL_OUT, rollOutListener);
instance.alpha = 0.25;
instance.buttonMode = false;
}
private function clickListener(_arg1:MouseEvent):void{
dispatchEvent(new Event(NavButton.NAV_BUTTON_CLICKED));
}
private function rollOutListener(_arg1:MouseEvent):void{
instance.gotoAndPlay("_rollout");
}
public function enableButton():void{
instance.addEventListener(MouseEvent.CLICK, clickListener);
instance.addEventListener(MouseEvent.ROLL_OVER, rollOverListener);
instance.addEventListener(MouseEvent.ROLL_OUT, rollOutListener);
instance.alpha = 1;
instance.buttonMode = true;
}
public function getButtonName():String{
return (btn_name);
}
private function rollOverListener(_arg1:MouseEvent):void{
instance.gotoAndPlay("_rollover");
}
}
}//package com.mercedesamg.utils
Section 80
//TextFieldValidators (com.mercedesamg.utils.TextFieldValidators)
package com.mercedesamg.utils {
public class TextFieldValidators {
public static function validatePhoneNumber(_arg1:String):Boolean{
var _local2:RegExp;
var _local3:Object;
_local2 = /^\d{3}-\d{3}-\d{4}$/;
_local3 = _local2.exec(_arg1);
if (_local3 == null){
return (false);
};
return (true);
}
public static function validateEmail(_arg1:String):Boolean{
var _local2:RegExp;
var _local3:Object;
_local2 = /(\w|[_.\-])+@((\w|-)+\.)+\w{2,4}+/;
_local3 = _local2.exec(_arg1);
if (_local3 == null){
return (false);
};
return (true);
}
}
}//package com.mercedesamg.utils
Section 81
//Vector (com.mercedesamg.utils.Vector)
package com.mercedesamg.utils {
public class Vector {
public var x:Number;
public var y:Number;
public function Vector(_arg1:Number, _arg2:Number){
this.x = _arg1;
this.y = _arg2;
}
public function negate():void{
this.x = -(this.x);
this.y = -(this.y);
}
public function rotateNew(_arg1:Number):Vector{
var _local2:Vector;
_local2 = new Vector(this.x, this.y);
_local2.rotate(_arg1);
return (_local2);
}
public function dot(_arg1:Vector):Number{
return (((this.x * _arg1.x) + (this.y * _arg1.y)));
}
public function scale(_arg1:Number):void{
this.x = (this.x * _arg1);
this.y = (this.y * _arg1);
}
public function reset(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function minusNew(_arg1:Vector):Vector{
return (new Vector((this.x = (this.x - _arg1.x)), (this.y = (this.y - _arg1.y))));
}
public function setAngle(_arg1:Number):void{
var _local2:Number;
_local2 = getLength();
this.x = (_local2 * MathAddons.cosD(_arg1));
this.y = (_local2 * MathAddons.sinD(_arg1));
}
public function isPerpTo(_arg1:Vector):Boolean{
return ((dot(_arg1) == 0));
}
public function plus(_arg1:Vector):void{
this.x = (this.x + _arg1.x);
this.y = (this.y + _arg1.y);
}
public function rotate(_arg1:Number):void{
var ca:Number;
var sa:Number;
var a = _arg1;
ca = MathAddons.cosD(a);
sa = MathAddons.sinD(a);
var _local3 = this;
with (_local3) {
x = ((x * ca) - (y * sa));
y = ((x * sa) + (y * ca));
};
}
public function getLength():Number{
return (Math.sqrt(((this.x * this.x) + (this.y * this.y))));
}
public function getAngle():Number{
return (MathAddons.atan2D(this.y, this.x));
}
public function getNormal():Vector{
return (new Vector(-(this.y), this.x));
}
public function plusNew(_arg1:Vector):Vector{
return (new Vector((this.x = (this.x + _arg1.x)), (this.y = (this.y + _arg1.y))));
}
public function getClone():Vector{
return (new Vector(this.x, this.y));
}
public function setLength(_arg1:Number):void{
var _local2:Number;
_local2 = getLength();
if (_local2){
this.scale((_arg1 / _local2));
} else {
this.x = _arg1;
};
}
public function angleBetween(_arg1:Vector):Number{
var _local2:Number;
var _local3:Number;
_local2 = dot(_arg1);
_local3 = (_local2 / (getLength() * _arg1.getLength()));
return (MathAddons.acosD(_local3));
}
public function scaleNew(_arg1:Number):Vector{
return (new Vector((this.x = (this.x * _arg1)), (this.y = (this.y * _arg1))));
}
public function minus(_arg1:Vector):void{
this.x = (this.x - _arg1.x);
this.y = (this.y - _arg1.y);
}
public function negateNew():Vector{
return (new Vector(-(this.x), -(this.y)));
}
public function equals(_arg1:Vector):Boolean{
return ((((this.x == _arg1.x)) && ((this.y == _arg1.y))));
}
}
}//package com.mercedesamg.utils
Section 82
//DriftRevolution (com.mercedesamg.DriftRevolution)
package com.mercedesamg {
import flash.events.*;
import com.mercedesamg.mvc.*;
import flash.display.*;
import com.mercedesamg.utils.*;
import com.mercedesamg.serverComm.*;
public class DriftRevolution extends Sprite {
private var soundsView:SoundView;
private var submitScoreView:SubmitScoreView;
private var navbtns:Array;
private var gameModel:GameModel;
private var highScores:HighScores;
private var dashView:DashboardView;
private var bgView:BackgroundView;
private var trackView:TrackZMappingView;
private var car3dView:Car3dView;
private var gameOverView:GameOverView;
private var driftParticlesView:DriftParticlesView;
private var viewsInitted:Boolean;
private var iconsView:StatusIconsView;
private var minimapView:MiniMapView;
private var navmc:MovieClip;
private var rootmc:MovieClip;
private static var _instance:DriftRevolution;
public function DriftRevolution(_arg1:SingletonEnforcer){
viewsInitted = false;
}
public function onStartDriftingClicked():void{
trace("main 'start drifting' button clicked");
rootmc.gotoAndStop("instructions");
}
public function init(_arg1:MovieClip):void{
var _local2:Array;
var _local3:uint;
var _local4:uint;
var _local5:AlertModalWindow;
var _local6:MovieClip;
var _local7:NavButton;
rootmc = _arg1;
navmc = rootmc.navbuttons_mc;
_local2 = ["start", "scores", "friend", "about"];
navbtns = new Array();
_local3 = _local2.length;
while (_local4 < _local3) {
_local6 = (navmc.getChildByName((_local2[_local4] + "_btn")) as MovieClip);
_local7 = new NavButton(_local6, _local2[_local4]);
_local7.addEventListener(NavButton.NAV_BUTTON_CLICKED, onNavButtonClicked);
navbtns.push(_local7);
_local4++;
};
gameModel = new GameModel(rootmc, 0, 0);
gameModel.initGame();
gameModel.addEventListener(GameModel.END_GAME, onGameEnd);
car3dView = new Car3dView();
trackView = new TrackZMappingView();
bgView = new BackgroundView();
dashView = new DashboardView();
driftParticlesView = new DriftParticlesView();
minimapView = new MiniMapView();
soundsView = new SoundView();
iconsView = new StatusIconsView();
submitScoreView = new SubmitScoreView();
gameOverView = new GameOverView();
initGameViews();
_local5 = AlertModalWindow.getInstance();
_local5.init(rootmc.alert_modal_window_mc);
HighScores.getInstance().addEventListener(HighScores.HIGH_SCORE_SUBMITTED, onHighScoreSubmitted);
}
private function onHighScoreSubmitted(_arg1:Event):void{
lockNavigation();
rootmc.game_mc.visible = false;
rootmc.gotoAndStop("highscores");
}
private function onNavButtonClicked(_arg1:Event):void{
var _local2:String;
var _local3:MovieClip;
_local2 = _arg1.target.getButtonName();
switch (_local2){
case "start":
trace("start button was clicked");
if ((((rootmc.currentLabel == "instructions")) || ((rootmc.currentLabel == "game")))){
_local3 = (navmc.getChildByName("start_btn") as MovieClip);
_local3.gotoAndStop(1);
onStartGameClicked();
return;
};
rootmc.gotoAndStop("instructions");
break;
case "scores":
trace("scores button was clicked");
rootmc.gotoAndStop("highscores");
break;
case "friend":
trace("send to friend button was clicked");
rootmc.gotoAndStop("sendtofriend");
break;
case "about":
trace("about black series button was clicked");
rootmc.gotoAndStop("blackseries");
break;
};
rootmc.game_mc.visible = false;
}
public function onStartGameClicked():void{
trace("main 'start drifting' button clicked");
trace(rootmc.game_mc);
HighScores.getInstance().loadHighScores();
lockNavigation();
gameModel.resetGame();
rootmc.game_mc.car_view_mc.gotoAndStop(13);
rootmc.game_mc.gameover_mc.visible = false;
rootmc.game_mc.countdown_mc.visible = true;
rootmc.game_mc.countdown_mc.gotoAndPlay(2);
rootmc.game_mc.submit_score_mc.visible = false;
rootmc.gotoAndStop("game");
rootmc.game_mc.visible = true;
}
private function initGameViews():void{
if (viewsInitted){
return;
};
viewsInitted = true;
trace("initting game views");
car3dView.init(gameModel, rootmc.game_mc.car_view_mc, rootmc.game_mc.rear_snow_mc);
trackView.init(gameModel, rootmc.game_mc.track_mc);
minimapView.init(gameModel, rootmc.game_mc.minimap_mc);
dashView.init(gameModel, rootmc.game_mc);
iconsView.init(gameModel, rootmc.game_mc.status_icons_mc);
soundsView.init(gameModel);
bgView.init(gameModel, rootmc.game_mc.background_mc);
gameOverView.init(gameModel, rootmc.game_mc.gameover_mc);
submitScoreView.init(gameModel, rootmc.game_mc.submit_score_mc);
driftParticlesView = new DriftParticlesView();
driftParticlesView.init(gameModel, rootmc.game_mc.drift_particles_back_mc, rootmc.game_mc.drift_particles_front_mc);
rootmc.game_mc.alpha = 1;
}
public function unlockNavigation():void{
var _local1:uint;
while (_local1 < navbtns.length) {
navbtns[_local1].enableButton();
_local1++;
};
}
public function startGame():void{
gameModel.startGame();
}
public function lockNavigation():void{
var _local1:uint;
while (_local1 < navbtns.length) {
navbtns[_local1].disableButton();
_local1++;
};
}
private function onGameEnd(_arg1:Event):void{
unlockNavigation();
}
public function onPlayAgainClicked():void{
lockNavigation();
gameModel.resetGame();
rootmc.game_mc.car_view_mc.gotoAndStop(13);
rootmc.game_mc.gameover_mc.visible = false;
rootmc.game_mc.countdown_mc.visible = true;
rootmc.game_mc.countdown_mc.gotoAndPlay(2);
rootmc.game_mc.submit_score_mc.visible = false;
}
public static function getInstance():DriftRevolution{
if (DriftRevolution._instance == null){
DriftRevolution._instance = new DriftRevolution(new SingletonEnforcer());
};
return (DriftRevolution._instance);
}
}
}//package com.mercedesamg
class SingletonEnforcer {
private function SingletonEnforcer(){
}
}
Section 83
//AcceleratingSound (AcceleratingSound)
package {
import flash.media.*;
public dynamic class AcceleratingSound extends Sound {
}
}//package
Section 84
//AccelerationLoopSound (AccelerationLoopSound)
package {
import flash.media.*;
public dynamic class AccelerationLoopSound extends Sound {
}
}//package
Section 85
//box (box)
package {
import flash.display.*;
public dynamic class box extends Sprite {
}
}//package
Section 86
//DecelerateGurgleSound (DecelerateGurgleSound)
package {
import flash.media.*;
public dynamic class DecelerateGurgleSound extends Sound {
}
}//package
Section 87
//DeceleratingSound (DeceleratingSound)
package {
import flash.media.*;
public dynamic class DeceleratingSound extends Sound {
}
}//package
Section 88
//IdleSound (IdleSound)
package {
import flash.media.*;
public dynamic class IdleSound extends Sound {
}
}//package
Section 89
//OffroadHitTestArea (OffroadHitTestArea)
package {
import flash.display.*;
public dynamic class OffroadHitTestArea extends MovieClip {
}
}//package
Section 90
//track_hi (track_hi)
package {
import flash.display.*;
public dynamic class track_hi extends Sprite {
public var m:MovieClip;
}
}//package
Section 91
//track_lo (track_lo)
package {
import flash.display.*;
public dynamic class track_lo extends MovieClip {
public var m:MovieClip;
}
}//package