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

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

Ultrakillz.swf

This is the info page for
Flash #220185

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


Text
88

COMPLETED

<p align="center"><font face="BigNoodleTitling" size="22" color="#ffffff" letterSpacing="0.000000" kerning="0">field</font></p>

field

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

<p align="right"></p>

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

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

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

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

<p align="center"><font face="BigNoodleTitling" size="68" color="#ffffff" letterSpacing="0.000000" kerning="0"><b>dsadsa</b></font></p>

<p align="center"><font face="Arial Black" size="24" color="#ffffff" letterSpacing="0.000000" kerning="0">88:88</font></p>

<p align="left"><font face="Arial Black" size="24" color="#ffffff" letterSpacing="0.000000" kerning="0">9</font></p>

W

S

D

A

space

1

6

-

CPU

n/a

<p align="center"><font face="BigNoodleTitling" size="18" color="#ff9900" letterSpacing="0.000000" kerning="0">fdsfdsfdsfds</font></p>

Disconnect

<p align="left"><font face="BigNoodleTitling" size="16" color="#ffffff" letterSpacing="0.000000" kerning="0">TextField</font></p>

<p align="left"><font face="Arial" size="9" color="#ff9900" letterSpacing="0.000000" kerning="0">bbbbb</font></p>

<p align="left"><font face="Arial" size="9" color="#ffffff" letterSpacing="0.000000" kerning="0">bodyField</font></p><p align="left"><font face="Arial" size="9" color="#ffffff" letterSpacing="0.000000" kerning="0">gfdgfdgfd</font></p>

<p align="left"><font face="Arial_10pt_st" size="10" color="#ffffff" letterSpacing="0.000000" kerning="0">Field</font></p>

<p align="left"><font face="Arial" size="9" color="#ff9900" letterSpacing="0.000000" kerning="0">bbbbb</font></p>

<p align="left"><font face="Arial" size="9" color="#ffffff" letterSpacing="0.000000" kerning="0">bodyField</font></p><p align="left"><font face="Arial" size="9" color="#ffffff" letterSpacing="0.000000" kerning="0">gfdgfdgfd</font></p>

<p align="center"><font face="Arial_11pt_st" size="11" color="#ffffff" letterSpacing="0.000000" kerning="0">bodyField</font></p>

name

888888888888

»

<p align="center"><font face="Arial" size="10" color="#ffffff" letterSpacing="0.000000" kerning="0">Enter password</font></p>

Enter password

requesting access...

access denied

dsadsadsadsa

dsadsadsadsa

dsadsadsadsa

dsadsadsadsa

dsadsadsadsa

dsadsadsa

dsadsadsa

<p align="center"><font face="Arial" size="10" color="#ffffff" letterSpacing="0.000000" kerning="1">ddwadwadsa</font></p>

PRACTICE SETUP

GAME NAME :

PASSWORD :

GAME SETUP

username

username

Lobby

10

© Copyright 2008 MBXGames Ltd

www.ultrakillz.com

move

weapons

jump

chat

fire

<p align="center"><font face="BigNoodleTitling" size="24" color="#ffffff" letterSpacing="0.000000" kerning="0">PREPARING MATCH..</font></p>

<p align="center"><font face="BigNoodleTitling" size="24" color="#ffffff" letterSpacing="0.000000" kerning="0">loading resources...</font></p>

GAME options

MOUSE INVERT

SOUND ON

VISUAL EFFECTS

GAME options

WELL DONE!

ALL LEVELS UNLOCKED!

<p align="center"><font face="BigNoodleTitling" size="22" color="#c8c8c8" letterSpacing="0.000000" kerning="1">dsadsa</font></p>

<p align="center"><font face="BigNoodleTitling" size="20" color="#ff9900" letterSpacing="0.000000" kerning="0">SummaryView</font></p>

<p align="center"><font face="BigNoodleTitling" size="18" color="#ffffff" letterSpacing="0.000000" kerning="0">some status text</font></p><p align="center"><font face="BigNoodleTitling" size="18" color="#ffffff" letterSpacing="0.000000" kerning="0">fdsfdsfdsfdsfdsfds</font></p><p align="center"><font face="BigNoodleTitling" size="18" color="#ffffff" letterSpacing="0.000000" kerning="0">fdsfdsfdsfdsfdsfsd</font></p>

<p align="center"><font face="BigNoodleTitling" size="10" color="#ffffff" letterSpacing="0.000000" kerning="0">#</font></p>

kills

playername

scores:

<p align="left"><font face="BigNoodleTitling" size="18" color="#ffffff" letterSpacing="0.000000" kerning="0">playername</font></p>

<p align="center"><font face="BigNoodleTitling" size="18" color="#ffffff" letterSpacing="0.000000" kerning="0">20/20</font></p>

version 0.2

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

...because servers don't grow on trees...

<p align="center"><font face="Arial_10pt_st" size="10" color="#ffffff" letterSpacing="0.000000" kerning="0">textfield</font></p>

Current rank

next rank

Brigadier General

Brigadier General

(888 points remaining)

888888

888888

join a game room
to start playing!

no games available.
create your own!

Click to activate the game

game holder

Press [ Esc ] to return to lobby

Practice mode

?

<p align="left"><font face="Arial_12pt_st" size="12" color="#ffffff" letterSpacing="0.000000" kerning="0">fdsfdsfdsjhg</font></p><p align="left"><font face="Arial_12pt_st" size="12" color="#ffffff" letterSpacing="0.000000" kerning="0">jhgjhgjhgjhg</font></p>

<p align="left"><font face="BigNoodleTitling" size="24" color="#ffffff" letterSpacing="0.000000" kerning="0"><b>fdsfdsfds</b></font></p>

<p align="left"><font face="BigNoodleTitling" size="24" color="#ff9900" letterSpacing="0.000000" kerning="0">title</font></p>

<p align="left"><font face="Arial_11pt_st" size="11" color="#ffffff" letterSpacing="0.000000" kerning="0">title</font></p>

<p align="left"><font face="BigNoodleTitling" size="24" color="#ff9900" letterSpacing="0.000000" kerning="0">title</font></p>

<p align="left"><font face="Arial_11pt_st" size="11" color="#ffffff" letterSpacing="0.000000" kerning="0">title</font></p>

<p align="right"><font face="BigNoodleTitling" size="18" color="#ffffff" letterSpacing="0.000000" kerning="0">POINTS:</font></p>

<p align="left"><font face="BigNoodleTitling" size="18" color="#ff9900" letterSpacing="0.000000" kerning="0">123456</font></p>

ENTER YOUR NAME

ActionScript [AS3]

Section 1
//adHolder_48 (a_ultrakillz_mochi_fla.adHolder_48) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class adHolder_48 extends MovieClip { public var holder:MovieClip; } }//package a_ultrakillz_mochi_fla
Section 2
//arrowBtn_125 (a_ultrakillz_mochi_fla.arrowBtn_125) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class arrowBtn_125 extends MovieClip { public function arrowBtn_125(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package a_ultrakillz_mochi_fla
Section 3
//btn_bg_6 (a_ultrakillz_mochi_fla.btn_bg_6) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class btn_bg_6 extends MovieClip { public function btn_bg_6(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package a_ultrakillz_mochi_fla
Section 4
//e4_sticker_96 (a_ultrakillz_mochi_fla.e4_sticker_96) package a_ultrakillz_mochi_fla { import flash.display.*; import flash.events.*; import flash.net.*; public dynamic class e4_sticker_96 extends MovieClip { public function e4_sticker_96(){ addFrameScript(0, frame1); } function frame1(){ buttonMode = true; addEventListener(MouseEvent.MOUSE_DOWN, clickEvent, false, 0, true); } public function clickEvent(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://www.e4.com/joystick/"), "_blank"); } } }//package a_ultrakillz_mochi_fla
Section 5
//fire_flame_157 (a_ultrakillz_mochi_fla.fire_flame_157) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class fire_flame_157 extends MovieClip { public function fire_flame_157(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package a_ultrakillz_mochi_fla
Section 6
//flashing_light_168 (a_ultrakillz_mochi_fla.flashing_light_168) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class flashing_light_168 extends MovieClip { public function flashing_light_168(){ addFrameScript(0, frame1); } function frame1(){ play(); } } }//package a_ultrakillz_mochi_fla
Section 7
//health_bar_195 (a_ultrakillz_mochi_fla.health_bar_195) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class health_bar_195 extends MovieClip { public var anim:MovieClip; } }//package a_ultrakillz_mochi_fla
Section 8
//health_bar_anim_197 (a_ultrakillz_mochi_fla.health_bar_anim_197) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class health_bar_anim_197 extends MovieClip { public var fill:MovieClip; } }//package a_ultrakillz_mochi_fla
Section 9
//health_bar_fill_198 (a_ultrakillz_mochi_fla.health_bar_fill_198) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class health_bar_fill_198 extends MovieClip { public function health_bar_fill_198(){ addFrameScript(0, frame1, 1, frame2, 11, frame12); } function frame12(){ gotoAndPlay(2); } function frame1(){ stop(); } function frame2(){ play(); } } }//package a_ultrakillz_mochi_fla
Section 10
//lense_blood_mc_199 (a_ultrakillz_mochi_fla.lense_blood_mc_199) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class lense_blood_mc_199 extends MovieClip { public function lense_blood_mc_199(){ addFrameScript(0, frame1, 6, frame7); } function frame7(){ stop(); } function frame1(){ stop(); } } }//package a_ultrakillz_mochi_fla
Section 11
//level_select_hilite_209 (a_ultrakillz_mochi_fla.level_select_hilite_209) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class level_select_hilite_209 extends MovieClip { public function level_select_hilite_209(){ addFrameScript(0, frame1, 71, frame72); } function frame72(){ } function frame1(){ stop(); } } }//package a_ultrakillz_mochi_fla
Section 12
//levelSelectThumb_hidden_18 (a_ultrakillz_mochi_fla.levelSelectThumb_hidden_18) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class levelSelectThumb_hidden_18 extends MovieClip { public var maskMC:MovieClip; } }//package a_ultrakillz_mochi_fla
Section 13
//lobby_userBtn_throb_anim_116 (a_ultrakillz_mochi_fla.lobby_userBtn_throb_anim_116) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class lobby_userBtn_throb_anim_116 extends MovieClip { public function lobby_userBtn_throb_anim_116(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package a_ultrakillz_mochi_fla
Section 14
//lobbyBtn_140 (a_ultrakillz_mochi_fla.lobbyBtn_140) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class lobbyBtn_140 extends MovieClip { public function lobbyBtn_140(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package a_ultrakillz_mochi_fla
Section 15
//mainStatus_text_gfx_186 (a_ultrakillz_mochi_fla.mainStatus_text_gfx_186) package a_ultrakillz_mochi_fla { import flash.display.*; import flash.text.*; public dynamic class mainStatus_text_gfx_186 extends MovieClip { public var field:TextField; } }//package a_ultrakillz_mochi_fla
Section 16
//mainStatusClip_185 (a_ultrakillz_mochi_fla.mainStatusClip_185) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class mainStatusClip_185 extends MovieClip { public var textMC:MovieClip; public function mainStatusClip_185(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package a_ultrakillz_mochi_fla
Section 17
//mask_171 (a_ultrakillz_mochi_fla.mask_171) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class mask_171 extends MovieClip { public function mask_171(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package a_ultrakillz_mochi_fla
Section 18
//player_firstperson_160 (a_ultrakillz_mochi_fla.player_firstperson_160) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class player_firstperson_160 extends MovieClip { public var inner:MovieClip; public var flashHolder:MovieClip; public function player_firstperson_160(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package a_ultrakillz_mochi_fla
Section 19
//player_thirdperson_159 (a_ultrakillz_mochi_fla.player_thirdperson_159) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class player_thirdperson_159 extends MovieClip { public var flashHolder:MovieClip; } }//package a_ultrakillz_mochi_fla
Section 20
//playerLives_191 (a_ultrakillz_mochi_fla.playerLives_191) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class playerLives_191 extends MovieClip { public var textMC:MovieClip; } }//package a_ultrakillz_mochi_fla
Section 21
//playerLivesText_192 (a_ultrakillz_mochi_fla.playerLivesText_192) package a_ultrakillz_mochi_fla { import flash.display.*; import flash.text.*; public dynamic class playerLivesText_192 extends MovieClip { public var field:TextField; } }//package a_ultrakillz_mochi_fla
Section 22
//rocket_gfx_main_161 (a_ultrakillz_mochi_fla.rocket_gfx_main_161) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class rocket_gfx_main_161 extends MovieClip { public function rocket_gfx_main_161(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package a_ultrakillz_mochi_fla
Section 23
//spriteSheet_blood_60 (a_ultrakillz_mochi_fla.spriteSheet_blood_60) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class spriteSheet_blood_60 extends MovieClip { public var contents:MovieClip; } }//package a_ultrakillz_mochi_fla
Section 24
//spriteSheet_character_strafe_66 (a_ultrakillz_mochi_fla.spriteSheet_character_strafe_66) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class spriteSheet_character_strafe_66 extends MovieClip { public var contents:MovieClip; } }//package a_ultrakillz_mochi_fla
Section 25
//spriteSheet_character_walk_63 (a_ultrakillz_mochi_fla.spriteSheet_character_walk_63) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class spriteSheet_character_walk_63 extends MovieClip { public var contents:MovieClip; } }//package a_ultrakillz_mochi_fla
Section 26
//Spritesheet_explosion_72 (a_ultrakillz_mochi_fla.Spritesheet_explosion_72) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class Spritesheet_explosion_72 extends MovieClip { public var contents:MovieClip; } }//package a_ultrakillz_mochi_fla
Section 27
//spriteSheet_smoke_69 (a_ultrakillz_mochi_fla.spriteSheet_smoke_69) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class spriteSheet_smoke_69 extends MovieClip { public var contents:MovieClip; } }//package a_ultrakillz_mochi_fla
Section 28
//tickBox_tick_26 (a_ultrakillz_mochi_fla.tickBox_tick_26) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class tickBox_tick_26 extends MovieClip { public function tickBox_tick_26(){ addFrameScript(3, frame4); } function frame4(){ stop(); } } }//package a_ultrakillz_mochi_fla
Section 29
//timeFieldMC_189 (a_ultrakillz_mochi_fla.timeFieldMC_189) package a_ultrakillz_mochi_fla { import flash.display.*; import flash.text.*; public dynamic class timeFieldMC_189 extends MovieClip { public var field:TextField; } }//package a_ultrakillz_mochi_fla
Section 30
//timeRemainingClip_188 (a_ultrakillz_mochi_fla.timeRemainingClip_188) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class timeRemainingClip_188 extends MovieClip { public var textMC:MovieClip; public function timeRemainingClip_188(){ addFrameScript(0, frame1, 1, frame2, 7, frame8); } function frame1(){ stop(); } function frame2(){ play(); } function frame8(){ gotoAndPlay(2); } } }//package a_ultrakillz_mochi_fla
Section 31
//tutorial_bodyClip_13 (a_ultrakillz_mochi_fla.tutorial_bodyClip_13) package a_ultrakillz_mochi_fla { import flash.display.*; import flash.text.*; public dynamic class tutorial_bodyClip_13 extends MovieClip { public var field:TextField; } }//package a_ultrakillz_mochi_fla
Section 32
//userDetailsModalTopbar_138 (a_ultrakillz_mochi_fla.userDetailsModalTopbar_138) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class userDetailsModalTopbar_138 extends MovieClip { public function userDetailsModalTopbar_138(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package a_ultrakillz_mochi_fla
Section 33
//WaitAnim_Complete_45 (a_ultrakillz_mochi_fla.WaitAnim_Complete_45) package a_ultrakillz_mochi_fla { import flash.display.*; public dynamic class WaitAnim_Complete_45 extends MovieClip { public function WaitAnim_Complete_45(){ addFrameScript(62, frame63); } function frame63(){ gotoAndPlay("loop"); } } }//package a_ultrakillz_mochi_fla
Section 34
//Opera (com.iopred.opera.Opera) package com.iopred.opera { import flash.display.*; import flash.events.*; import flash.media.*; import flash.utils.*; public class Opera extends EventDispatcher { private var m_musicMute:Boolean; private var m_globalVolume:Number; private var m_musicChannel:OperaChannel; private var m_soundVolume:Number; private var m_shape:Shape; private var m_musicVolume:Number; private var m_sounds:Dictionary; private var m_channels:Array; private var m_globalMute:Boolean; private var m_soundMute:Boolean; private var m_timer:uint; private static var m_instance:Opera; public function Opera(_arg1:Number=1, _arg2:Number=1, _arg3:Number=1, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:Boolean=false){ if (m_instance != null){ throw (new Error("Opera has already been created")); }; m_sounds = new Dictionary(); m_channels = new Array(); m_globalVolume = _arg1; m_musicVolume = _arg3; m_soundVolume = _arg2; m_globalMute = _arg4; m_musicMute = _arg5; revolume(); m_shape = new Shape(); m_shape.addEventListener(Event.ENTER_FRAME, update); m_timer = getTimer(); } public function get globalVolumeIgnoreMute():Number{ return (m_globalVolume); } public function get soundVolume():Number{ return ((m_soundMute) ? 0 : m_soundVolume); } public function get musicVolumeIgnoreMute():Number{ return (m_musicVolume); } public function set soundMute(_arg1:Boolean):void{ m_soundMute = _arg1; revolume(); } public function set soundVolume(_arg1:Number):void{ m_soundVolume = Math.min(1, Math.max(0, _arg1)); revolume(); } public function getChannel(_arg1:SoundChannel):OperaChannel{ var _local2:int; var _local3:OperaChannel; _local2 = (m_channels.length - 1); while (_local2 >= 0) { _local3 = m_channels[_local2]; if (_local3.soundChannel == _arg1){ return (_local3); }; _local2--; }; return (null); } public function revolume():void{ var _local1:SoundTransform; var _local2:OperaChannel; _local1 = SoundMixer.soundTransform; _local1.volume = globalVolume; SoundMixer.soundTransform = _local1; for each (_local2 in m_channels) { if (_local2.isSound){ if (_local2.transform != null){ _local2.transform.update(0, soundVolume); } else { _local1 = _local2.soundChannel.soundTransform; _local1.volume = (_local2.volume * soundVolume); _local2.soundChannel.soundTransform = _local1; }; } else { if (_local2.transform != null){ _local2.transform.update(0, musicVolume); } else { _local1 = _local2.soundChannel.soundTransform; _local1.volume = (_local2.volume * musicVolume); _local2.soundChannel.soundTransform = _local1; }; }; }; } public function stopSoundChannel(_arg1:SoundChannel):void{ var _local2:int; var _local3:OperaChannel; _local2 = (m_channels.length - 1); while (_local2 >= 0) { _local3 = m_channels[_local2]; if (_local3.soundChannel == _arg1){ _local3.soundChannel.stop(); m_channels.splice(_local2, 1); return; }; _local2--; }; } public function get globalVolume():Number{ return ((m_globalMute) ? 0 : m_globalVolume); } public function get musicVolume():Number{ return ((m_musicMute) ? 0 : m_musicVolume); } private function setTransform(_arg1:OperaChannel, _arg2:SoundTransform, _arg3:SoundTransform, _arg4:int):OperaTransform{ _arg1.transform = new OperaTransform(_arg1.soundChannel, _arg2, _arg3, _arg4); return (_arg1.transform); } public function set globalMute(_arg1:Boolean):void{ m_globalMute = _arg1; revolume(); } public function set globalVolume(_arg1:Number):void{ m_globalVolume = Math.min(1, Math.max(0, _arg1)); revolume(); } public function registerSound(_arg1:String, _arg2:Sound):void{ if (m_sounds[_arg1] == null){ m_sounds[_arg1] = _arg2; } else { throw (new Error("Opera.registerSound: Sound already exists on that id")); }; } public function set musicMute(_arg1:Boolean):void{ m_musicMute = _arg1; revolume(); } public function set musicVolume(_arg1:Number):void{ m_musicVolume = Math.min(1, Math.max(0, _arg1)); revolume(); } public function playSound(_arg1, _arg2:Number=1, _arg3:Function=null):SoundChannel{ var _local4:Sound; var _local5:SoundChannel; if ((_arg1 is String)){ _local4 = m_sounds[_arg1]; } else { if ((_arg1 is Sound)){ _local4 = _arg1; }; }; if (_local4 != null){ _local5 = _local4.play(0, 0, new SoundTransform((_arg2 * soundVolume))); m_channels.push(new OperaChannel(_local4, _local5, _arg2, true, _arg3, null)); return (_local5); }; return (null); } public function stopMusic(_arg1:uint=0, _arg2:Number=0):void{ if (m_musicChannel != null){ if (_arg1 <= 0){ stopSoundChannel(m_musicChannel.soundChannel); } else { setTransform(m_musicChannel, new SoundTransform(m_musicChannel.volume), new SoundTransform(0, _arg2), _arg1); m_musicChannel.transform.update(0, musicVolume); m_musicChannel.volume = 0; m_musicChannel.transformOnly = true; }; m_musicChannel = null; }; } public function get soundMute():Boolean{ return (m_soundMute); } private function update(_arg1:Event):void{ var _local2:uint; var _local3:uint; var _local4:int; var _local5:OperaChannel; var _local6:Boolean; _local2 = getTimer(); _local3 = (_local2 - m_timer); m_timer = _local2; _local4 = (m_channels.length - 1); while (_local4 >= 0) { _local5 = m_channels[_local4]; if (_local5.transform != null){ _local6 = false; if (_local5.isSound){ _local5.transform.update(_local3, soundVolume); } else { _local5.transform.update(_local3, musicVolume); }; if (_local6){ _local5.transform.dispose(); _local5.transform = null; }; } else { if (((((_local5.isSound) && ((_local5.soundChannel.position >= _local5.sound.length)))) || (_local5.transformOnly))){ if (_local5.callBack != null){ _local5.soundChannel.removeEventListener(Event.SOUND_COMPLETE, _local5.callBack); }; m_channels.splice(_local4, 1); }; }; _local4--; }; } public function playSoundTransformed(_arg1, _arg2:SoundTransform, _arg3:SoundTransform, _arg4:uint=4294967295, _arg5:Function=null):SoundChannel{ var _local6:Sound; var _local7:SoundChannel; var _local8:OperaTransform; if ((_arg1 is String)){ _local6 = m_sounds[_arg1]; } else { if ((_arg1 is Sound)){ _local6 = _arg1; }; }; if (_local6 != null){ _local7 = _local6.play(0, 0); if (_arg4 > _local6.length){ _arg4 = _local6.length; }; _local8 = new OperaTransform(_local7, _arg2, _arg3, _arg4); _local8.update(0, soundVolume); m_channels.push(new OperaChannel(_local6, _local7, 1, true, _arg5, _local8)); }; return (null); } public function playMusic(_arg1, _arg2:Number=1, _arg3:uint=0, _arg4:Number=0):void{ var _local5:Sound; var _local6:SoundChannel; var _local7:OperaTransform; if ((_arg1 is String)){ _local5 = m_sounds[_arg1]; } else { if ((_arg1 is Sound)){ _local5 = _arg1; }; }; if (((!((m_musicChannel == null))) && ((m_musicChannel.sound == _local5)))){ return; }; stopMusic(_arg3, -(_arg4)); if (_local5 != null){ _local6 = _local5.play(0, 999999999, new SoundTransform((_arg2 * musicVolume))); if (_arg3 > 0){ _local7 = new OperaTransform(_local6, new SoundTransform(0, _arg4), new SoundTransform(_arg2), _arg3); _local7.update(0, musicVolume); }; m_musicChannel = new OperaChannel(_local5, _local6, _arg2, false, null, _local7); m_channels.push(m_musicChannel); }; } public function get musicMute():Boolean{ return (m_musicMute); } public function get globalMute():Boolean{ return (m_globalMute); } public function get soundVolumeIgnoreMute():Number{ return (m_soundVolume); } public static function get instance():Opera{ if (m_instance == null){ m_instance = new (Opera); }; return (m_instance); } } }//package com.iopred.opera import flash.events.*; import flash.media.*; class OperaTransform { private var length:uint; private var startTransform:SoundTransform; private var time:uint; private var endTransform:SoundTransform; private var soundChannel:SoundChannel; private var soundTransform:SoundTransform; private function OperaTransform(_arg1:SoundChannel, _arg2:SoundTransform, _arg3:SoundTransform, _arg4:uint){ soundChannel = _arg1; soundTransform = soundChannel.soundTransform; startTransform = _arg2; endTransform = _arg3; length = _arg4; } public function update(_arg1:uint, _arg2:Number):Boolean{ var _local3:Number; time = (time + _arg1); if (time > length){ time = length; }; _local3 = (time / length); soundTransform.volume = (startTransform.volume + ((endTransform.volume - startTransform.volume) * _local3)); soundTransform.volume = (soundTransform.volume * _arg2); soundTransform.pan = (startTransform.pan + ((endTransform.pan - startTransform.pan) * _local3)); soundChannel.soundTransform = soundTransform; return ((time == length)); } public function dispose():void{ soundChannel = null; soundTransform = null; startTransform = null; endTransform = null; } } class OperaChannel { private var isSound:Boolean; private var transform:OperaTransform; private var soundChannel:SoundChannel; private var sound:Sound; private var volume:Number; private var callBack:Function; private var transformOnly:Boolean; private function OperaChannel(_arg1:Sound, _arg2:SoundChannel, _arg3:Number, _arg4:Boolean, _arg5:Function=null, _arg6:OperaTransform=null, _arg7:Boolean=false){ sound = _arg1; soundChannel = _arg2; transform = _arg6; isSound = _arg4; volume = _arg3; if (_arg5 != null){ callBack = _arg5; soundChannel.addEventListener(Event.SOUND_COMPLETE, callBack); }; transformOnly = _arg7; } }
Section 35
//Linear (fl.motion.easing.Linear) package fl.motion.easing { public class Linear { public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } } }//package fl.motion.easing
Section 36
//TweenLite (gs.TweenLite) package gs { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.utils.*; public class TweenLite { public var delay:Number; protected var _endTarget:Object; private var _sound:SoundTransform; public var target:Object; public var duration:Number; public var startTime:uint; public var extraTweens:Object; protected var _color:ColorTransform; protected var _active:Boolean; protected var _endColor:ColorTransform; public var vars:Object; 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.83; private static var _listening:Boolean; public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){ 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); if (!(this.vars.ease is Function)){ this.vars.ease = easeOut; }; if (this.vars.easeParams != null){ this.vars.proxiedEase = this.vars.ease; this.vars.ease = easeProxy; }; if (this.vars.mcColor != null){ this.vars.tint = this.vars.mcColor; }; if (!isNaN(Number(this.vars.autoAlpha))){ this.vars.alpha = Number(this.vars.autoAlpha); }; this.tweens = {}; this.extraTweens = {}; this.initTime = getTimer(); if (this.vars.runBackwards == true){ initTweenVals(); }; _active = false; if ((((_arg2 == 0)) && ((this.delay == 0)))){ complete(true); } else { if (!_listening){ _sprite.addEventListener(Event.ENTER_FRAME, executeAll); _timer.addEventListener("timer", killGarbage); _timer.start(); _listening = true; }; }; } 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 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.vars.onStart != null){ this.vars.onStart.apply(null, this.vars.onStartParams); }; if (this.duration == 0.001){ this.startTime = (this.startTime - 1); }; return (true); //unresolved jump }; return (false); } 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 = ((this.vars.endArray) || ([])); _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])}; }; _local5++; }; } else { for (_local2 in this.vars) { 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")))) || ((_local2 == "easeParams")))) || ((_local2 == "mcColor")))){ } else { if ((((_local2 == "tint")) && ((this.target is DisplayObject)))){ _color = this.target.transform.colorTransform; _endColor = new ColorTransform(); if (this.vars.alpha != undefined){ _endColor.alphaMultiplier = this.vars.alpha; delete this.vars.alpha; delete this.tweens.alpha; } else { _endColor.alphaMultiplier = this.target.alpha; }; if (((!((this.vars[_local2] == null))) && (!((this.vars[_local2] == ""))))){ _endColor.color = this.vars[_local2]; }; _local6 = new TweenLite(this, this.duration, {colorProxy:1, delay:_local1, overwrite:false, ease:this.vars.ease, runBackwards:this.vars.runBackwards}); _local6.endTarget = this.target; } else { if ((((_local2 == "volume")) && ((this.target is MovieClip)))){ _sound = this.target.soundTransform; _local7 = new TweenLite(this, this.duration, {volumeProxy:this.vars[_local2], ease:easeOut, delay:_local1, overwrite:false, runBackwards:this.vars.runBackwards}); _local7.endTarget = this.target; } 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}; } else { this.extraTweens[_local2] = {o:this.target, s:0, c:0, 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.s; }; }; if (this.vars.onUpdate != null){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; }; if (typeof(this.vars.autoAlpha) == "number"){ this.target.visible = !((((this.vars.runBackwards == true)) && ((this.target.alpha == 0)))); }; } public function render(_arg1:int):void{ var _local2:Number; var _local3:Number; var _local4:Object; var _local5:String; _local2 = ((_arg1 - this.startTime) / 1000); if (_local2 > this.duration){ _local2 = this.duration; }; _local3 = this.vars.ease(_local2, 0, 1, this.duration); for (_local5 in this.tweens) { _local4 = this.tweens[_local5]; _local4.o[_local5] = (_local4.s + (_local3 * _local4.c)); }; if (this.vars.onUpdate != null){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_local2 == this.duration){ complete(true); }; } 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 get volumeProxy():Number{ return (_sound.volume); } public function set volumeProxy(_arg1:Number):void{ _sound.volume = _arg1; this.target.soundTransform = _sound; } protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams))); } public function complete(_arg1:Boolean=false):void{ if (!_arg1){ this.startTime = 0; render((this.duration * 1000)); return; }; if ((((typeof(this.vars.autoAlpha) == "number")) && ((this.target.alpha == 0)))){ this.target.visible = false; }; if (this.vars.onComplete != null){ this.vars.onComplete.apply(null, this.vars.onCompleteParams); }; removeTween(this); } 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] == undefined))))){ delete _all[_arg1.endTarget][_arg1]; }; } protected 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 == null))) && (_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, _arg2:Boolean=false):void{ var _local3:Object; var _local4:*; if (((!((_arg1 == null))) && (!((_all[_arg1] == undefined))))){ if (_arg2){ _local3 = _all[_arg1]; for (_local4 in _local3) { _local3[_local4].complete(false); }; }; delete _all[_arg1]; }; } } }//package gs
Section 37
//MochiAd (mochi.MochiAd) package mochi { import flash.display.*; import flash.events.*; import flash.net.*; import flash.utils.*; import flash.system.*; public class MochiAd { public static function getVersion():String{ return ("2.6"); } public static function showClickAwayAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_timeout:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var sendHostProgress:Boolean; var options = _arg1; DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{ }, ad_finished:function ():void{ }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_timeout = options.ad_timeout; delete options.ad_timeout; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; sendHostProgress = false; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Number; var _local3:Boolean; var _local4:Number; if (!this.parent){ delete this.onEnterFrame; return; }; _local1 = this.parent._mochiad_ctr; _local2 = (getTimer() - this.started); _local3 = false; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; _local3 = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (this.root == null){ _local3 = true; }; if (_local3){ delete this.onEnterFrame; }; }; doOnEnterFrame(chk); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function _allowDomains(_arg1:String):String{ var _local2:String; _local2 = _arg1.split("/")[2].split(":")[0]; Security.allowDomain("*"); Security.allowDomain(_local2); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(_local2); return (_local2); } public static function unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (_arg1.origFrameRate != undefined){ _arg1.stage.frameRate = _arg1.origFrameRate; }; if (!_arg1._mochiad){ return (false); }; if (_arg1._mochiad._containerLCName != undefined){ _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"}); }; if (_arg1._mochiad.onUnload){ _arg1._mochiad.onUnload(); }; delete _arg1._mochiad_loaded; delete _arg1._mochiad; return (true); } public static function showInterLevelAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = (_arg1 - 250); }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Number; var _local3:Boolean; var _local4:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; _local1 = this.parent._mochiad_ctr; _local2 = (getTimer() - this.started); _local3 = false; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (_local2 > chk.ad_msec){ _local3 = true; }; if (_local3){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _parseOptions(_arg1:Object, _arg2:Object):Object{ var _local3:Object; var _local4:String; var _local5:Array; var _local6:Number; var _local7:Array; _local3 = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; if (_arg1){ for (_local4 in _arg1) { _local3[_local4] = _arg1[_local4]; }; }; if (_local3.clip == undefined){ throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite.")); }; _arg1 = _local3.clip.loaderInfo.parameters.mochiad_options; if (_arg1){ _local5 = _arg1.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6].split("="); _local3[unescape(_local7[0])] = unescape(_local7[1]); _local6++; }; }; if (_local3.id == "test"){ }; return (_local3); } public static function _cleanup(_arg1:Object):void{ var idx:Number; var k:String; var lc:LocalConnection; var f:Function; var mc = _arg1; if (("lc" in mc)){ lc = mc.lc; f = function ():void{ try { lc.client = null; lc.close(); } catch(e:Error) { }; }; setTimeout(f, 0); }; idx = DisplayObjectContainer(mc).numChildren; while (idx > 0) { idx = (idx - 1); DisplayObjectContainer(mc).removeChildAt(idx); }; for (k in mc) { delete mc[k]; }; } public static function load(_arg1:Object):MovieClip{ var DEFAULTS:Object; var clip:Object; var depth:Number; var mc:MovieClip; var wh:Array; var lv:URLVariables; var k:String; var server:String; var hostname:String; var lc:LocalConnection; var name:String; var loader:Loader; var g:Function; var req:URLRequest; var v:Object; var options = _arg1; DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; if (!MochiAd._isNetworkAvailable()){ return (null); }; try { if (clip._mochiad_loaded){ return (null); }; } catch(e:Error) { throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; depth = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, "_mochiad", depth); wh = MochiAd._getRes(options, clip); options.res = ((wh[0] + "x") + wh[1]); options.server = (options.server + options.id); delete options.id; clip._mochiad_loaded = true; if (clip.loaderInfo.loaderURL.indexOf("http") == 0){ options.as3_swf = clip.loaderInfo.loaderURL; }; lv = new URLVariables(); for (k in options) { v = options[k]; if (!(v is Function)){ lv[k] = v; }; }; server = lv.server; delete lv.server; hostname = _allowDomains(server); lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.lc = lc; mc.lcName = name; lv.lc = name; lv.st = getTimer(); loader = new Loader(); g = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); MochiAd.unload(clip); }; loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g); req = new URLRequest((server + ".swf")); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader.load(req); mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{ var _local4:Array; var _local5:Number; _local4 = _arg2.split("."); _local5 = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return (undefined); }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; if (typeof(_arg1[_local4[_local5]]) == "function"){ return (_arg1[_local4[_local5]].apply(_arg1, _arg3)); }; return (undefined); } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{ var _local4:MovieClip; _local4 = new MovieClip(); if (((false) && (_arg3))){ _arg1.addChildAt(_local4, _arg3); } else { _arg1.addChild(_local4); }; _arg1[_arg2] = _local4; _local4["_name"] = _arg2; return (_local4); } public static function _getRes(_arg1:Object, _arg2:Object):Array{ var _local3:Object; var _local4:Number; var _local5:Number; var _local6:Array; _local3 = _arg2.getBounds(_arg2.root); _local4 = 0; _local5 = 0; if (typeof(_arg1.res) != "undefined"){ _local6 = _arg1.res.split("x"); _local4 = parseFloat(_local6[0]); _local5 = parseFloat(_local6[1]); } else { _local4 = (_local3.xMax - _local3.xMin); _local5 = (_local3.yMax - _local3.yMin); }; if ((((_local4 == 0)) || ((_local5 == 0)))){ _local4 = _arg2.stage.stageWidth; _local5 = _arg2.stage.stageHeight; }; return ([_local4, _local5]); } public static function adShowing(_arg1:Object):void{ _arg1.origFrameRate = _arg1.stage.frameRate; _arg1.stage.frameRate = 30; } public static function getValue(_arg1:Object, _arg2:String):Object{ var _local3:Array; var _local4:Number; _local3 = _arg2.split("."); _local4 = 0; while (_local4 < (_local3.length - 1)) { if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){ return (undefined); }; _arg1 = _arg1[_local3[_local4]]; _local4++; }; return (_arg1[_local3[_local4]]); } public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{ var _local4:Object; var _local5:Object; switch (_arg3.id){ case "setValue": MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value); break; case "getValue": _local4 = MochiAd.getValue(_arg1, _arg3.objectName); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4); break; case "runMethod": _local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5); break; }; } public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Array; var _local5:Number; _local4 = _arg2.split("."); _local5 = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return; }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; _arg1[_local4[_local5]] = _arg3; } public static function showPreGameAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var bar:MovieClip; var bar_color:Number; var bar_background:Number; var bar_outline:Number; var backing_mc:MovieClip; var backing:Object; var inside_mc:MovieClip; var inside:Object; var outline_mc:MovieClip; var outline:Object; var complete:Boolean; var unloaded:Boolean; var f:Function; var sendHostProgress:Boolean; var fn:Function; var r:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ }, ad_skipped:function ():void{ }, ad_progress:function (_arg1:Number):void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){ options.ad_started(); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); return; }; clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ var fn:Function; MochiAd._cleanup(mc); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); bar = createEmptyMovieClip(chk, "_mochiad_bar", 4); if (options.no_progress_bar){ bar.visible = false; delete options.no_progress_bar; } else { bar.x = 10; bar.y = (h - 20); }; bar_color = options.color; delete options.color; bar_background = options.background; delete options.background; bar_outline = options.outline; delete options.outline; backing_mc = createEmptyMovieClip(bar, "_outline", 1); backing = backing_mc.graphics; backing.beginFill(bar_background); backing.moveTo(0, 0); backing.lineTo((w - 20), 0); backing.lineTo((w - 20), 10); backing.lineTo(0, 10); backing.lineTo(0, 0); backing.endFill(); inside_mc = createEmptyMovieClip(bar, "_inside", 2); inside = inside_mc.graphics; inside.beginFill(bar_color); inside.moveTo(0, 0); inside.lineTo((w - 20), 0); inside.lineTo((w - 20), 10); inside.lineTo(0, 10); inside.lineTo(0, 0); inside.endFill(); inside_mc.scaleX = 0; outline_mc = createEmptyMovieClip(bar, "_outline", 3); outline = outline_mc.graphics; outline.lineStyle(0, bar_outline, 100); outline.moveTo(0, 0); outline.lineTo((w - 20), 0); outline.lineTo((w - 20), 10); outline.lineTo(0, 10); outline.lineTo(0, 0); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; f = function (_arg1:Event):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); complete = true; if (unloaded){ MochiAd.unload(clip); }; }; clip.loaderInfo.addEventListener(Event.COMPLETE, f); if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = _arg1; }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; mc.rpcTestFn = function (_arg1:String):Object{ return (_arg1); }; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; sendHostProgress = false; mc.sendHostLoadProgress = function (_arg1:String):void{ sendHostProgress = true; }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Object; var _local3:Number; var _local4:Boolean; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Object; var _local10:Number; var _local11:Number; if (((!(this.parent)) || (!(this.parent.parent)))){ delete this["onEnterFrame"]; return; }; _local1 = this.parent.parent.root; _local2 = this.parent._mochiad_ctr; _local3 = (getTimer() - this.started); _local4 = false; _local5 = _local1.loaderInfo.bytesTotal; _local6 = _local1.loaderInfo.bytesLoaded; if (complete){ _local6 = Math.max(1, _local6); _local5 = _local6; }; _local7 = ((100 * _local6) / _local5); _local8 = ((100 * _local3) / chk.ad_msec); _local9 = this._mochiad_bar._inside; _local10 = Math.min(100, Math.min(((_local7) || (0)), _local8)); _local10 = Math.max(this.last_pcnt, _local10); this.last_pcnt = _local10; _local9.scaleX = (_local10 * 0.01); options.ad_progress(_local10); if (sendHostProgress){ clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7}); if (_local7 == 100){ sendHostProgress = false; }; }; if (!chk.showing){ _local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local11 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){ options.ad_failed(); _local4 = true; }; }; }; if (_local3 > chk.ad_msec){ _local4 = true; }; if (((complete) && (_local4))){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(_arg1:Object):void{ MochiAd.showPreGameAd(_arg1); } public static function showTimedAd(_arg1:Object):void{ MochiAd.showInterLevelAd(_arg1); } public static function doOnEnterFrame(_arg1:MovieClip):void{ var f:Function; var mc = _arg1; f = function (_arg1:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; }; mc.addEventListener(Event.ENTER_FRAME, f); } } }//package mochi
Section 38
//MochiScores (mochi.MochiScores) package mochi { import flash.display.*; import flash.text.*; public class MochiScores { private static var boardID:String; public static var onErrorHandler:Object; public static var onCloseHandler:Object; public static function showLeaderboard(_arg1:Object=null):void{ var options = _arg1; if (options != null){ if (options.clip != null){ if ((options.clip is Sprite)){ MochiServices.setContainer(options.clip); }; delete options.clip; } else { MochiServices.setContainer(); }; MochiServices.stayOnTop(); if (options.name != null){ if ((options.name is TextField)){ if (options.name.text.length > 0){ options.name = options.name.text; }; }; }; if (options.score != null){ if ((options.score is TextField)){ if (options.score.text.length > 0){ options.score = options.score.text; }; }; }; if (options.onDisplay != null){ options.onDisplay(); } else { if (MochiServices.clip != null){ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); //unresolved jump }; }; }; } else { options = {}; if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); //unresolved jump }; }; if (options.onClose != null){ onCloseHandler = options.onClose; } else { onCloseHandler = function ():void{ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.play(); //unresolved jump }; }; }; if (options.onError != null){ onErrorHandler = options.onError; } else { onErrorHandler = null; }; if (options.boardID == null){ if (MochiScores.boardID != null){ options.boardID = MochiScores.boardID; }; }; MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose); } public static function closeLeaderboard():void{ MochiServices.send("scores_closeLeaderboard"); } public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2); } public static function requestList(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_requestList", null, _arg1, _arg2); } public static function scoresArrayToObjects(_arg1:Object):Object{ var _local2:Object; var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Object; var _local7:String; var _local8:String; _local2 = {}; for (_local7 in _arg1) { if (typeof(_arg1[_local7]) == "object"){ if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){ _local2[_local7] = []; _local5 = _arg1[_local7]; _local4 = 0; while (_local4 < _local5.rows.length) { _local6 = {}; _local3 = 0; while (_local3 < _local5.cols.length) { _local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3]; _local3++; }; _local2[_local7].push(_local6); _local4++; }; } else { _local2[_local7] = {}; for (_local8 in _arg1[_local7]) { _local2[_local7][_local8] = _arg1[_local7][_local8]; }; }; } else { _local2[_local7] = _arg1[_local7]; }; }; return (_local2); } public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{ MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4); } public static function onClose(_arg1:Object=null):void{ if (_arg1 != null){ if (_arg1.error != null){ if (_arg1.error == true){ if (onErrorHandler != null){ if (_arg1.errorCode == null){ _arg1.errorCode = "IOError"; }; onErrorHandler(_arg1.errorCode); MochiServices.doClose(); return; }; }; }; }; onCloseHandler(); MochiServices.doClose(); } public static function setBoardID(_arg1:String):void{ MochiScores.boardID = _arg1; MochiServices.send("scores_setBoardID", {boardID:_arg1}); } } }//package mochi
Section 39
//MochiServices (mochi.MochiServices) package mochi { import flash.display.*; import flash.events.*; import flash.net.*; import flash.utils.*; import flash.system.*; public class MochiServices { private static var _container:Object; private static var _connected:Boolean = false; private static var _swfVersion:String; private static var _sendChannel:LocalConnection; private static var _rcvChannelName:String; private static var _gatewayURL:String = "http://www.mochiads.com/static/lib/services/services.swf"; private static var _clip:MovieClip; private static var _loader:Loader; private static var _id:String; private static var _listenChannel:LocalConnection; private static var _timer:Timer; private static var _sendChannelName:String; private static var _startTime:Number; private static var _connecting:Boolean = false; public static var onError:Object; private static var _listenChannelName:String = "__mochiservices"; private static var _rcvChannel:LocalConnection; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ if (_connected){ _sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ onError("NotConnected"); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); }; if (_clip != null){ if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){ _clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _clip._nextcallbackID++; }; }; } public static function get connected():Boolean{ return (_connected); } private static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (_clip != null){ if (_clip._queue != null){ while (_clip._queue.length > 0) { _local2 = _clip._queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _clip._callbacks[_local2.callbackID]; }; delete _clip._callbacks[_local2.callbackID]; if (((_arg1) && (!((_local3 == null))))){ handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod); }; }; }; }; }; } private static function init(_arg1:String, _arg2:Object):void{ _id = _arg1; if (_arg2 != null){ _container = _arg2; loadCommunicator(_arg1, _container); }; } public static function get childClip():Object{ return (_clip); } public static function get id():String{ return (_id); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } public static function getVersion():String{ return ("1.34"); } public static function disconnect():void{ if (((_connected) || (_connecting))){ if (_clip != null){ if (_clip.parent != null){ if ((_clip.parent is Sprite)){ Sprite(_clip.parent).removeChild(_clip); _clip = null; }; }; }; _connecting = (_connected = false); flush(true); try { _listenChannel.close(); _rcvChannel.close(); } catch(error:Error) { }; }; if (_timer != null){ try { _timer.stop(); } catch(error:Error) { }; }; } public static function allowDomains(_arg1:String):String{ var _local2:String; Security.allowDomain("*"); Security.allowInsecureDomain("*"); if (_arg1.indexOf("http://") != -1){ _local2 = _arg1.split("/")[2].split(":")[0]; Security.allowDomain(_local2); Security.allowInsecureDomain(_local2); }; return (_local2); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); if (_clip.parent != null){ Sprite(_clip.parent).removeChild(_clip); }; } public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{ if (_arg1 != null){ if ((_arg1 is Sprite)){ _container = _arg1; }; }; if (_arg2){ if ((_container is Sprite)){ Sprite(_container).addChild(_clip); }; }; } private static function onStatus(_arg1:StatusEvent):void{ switch (_arg1.level){ case "error": _connected = false; _listenChannel.connect(_listenChannelName); break; }; } private static function initComChannels():void{ if (!_connected){ _sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _rcvChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _clip.onReceive = function (_arg1:Object):void{ var cb:String; var cblst:Object; var method:*; var methodName:String; var obj:Object; var pkg = _arg1; cb = pkg.callbackID; cblst = this.client._callbacks[cb]; if (!cblst){ return; }; method = cblst.callbackMethod; methodName = ""; obj = cblst.callbackObject; if (((obj) && ((typeof(method) == "string")))){ methodName = method; if (obj[method] != null){ method = obj[method]; //unresolved jump }; }; if (method != undefined){ try { method.apply(obj, pkg.args); } catch(error:Error) { }; } else { if (obj != null){ try { obj(pkg.args); } catch(error:Error) { }; }; }; delete this.client._callbacks[cb]; }; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; _rcvChannel.connect(_rcvChannelName); _connecting = false; _connected = true; _listenChannel.close(); while (_clip._queue.length > 0) { _sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift()); }; }; } private static function listen():void{ _listenChannel = new LocalConnection(); _listenChannel.client = _clip; _clip.handshake = function (_arg1:Object):void{ MochiServices.comChannelName = _arg1.newChannel; }; _listenChannel.allowDomain("*", "localhost"); _listenChannel.allowInsecureDomain("*", "localhost"); _listenChannel.connect(_listenChannelName); } private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{ var args = _arg1; var callbackObject = _arg2; var callbackMethod = _arg3; if (args != null){ if (args.onError != null){ args.onError.apply(null, ["NotConnected"]); }; if (((!((args.options == null))) && (!((args.options.onError == null))))){ args.options.onError.apply(null, ["NotConnected"]); }; }; if (callbackMethod != null){ args = {}; args.error = true; args.errorCode = "NotConnected"; if (((!((callbackObject == null))) && ((callbackMethod is String)))){ try { var _local5 = callbackObject; _local5[callbackMethod](args); } catch(error:Error) { }; } else { if (callbackMethod != null){ try { callbackMethod.apply(args); } catch(error:Error) { }; }; }; }; } public static function get clip():Object{ return (_container); } public static function set comChannelName(_arg1:String):void{ if (_arg1 != null){ if (_arg1.length > 3){ _sendChannelName = (_arg1 + "_fromgame"); _rcvChannelName = _arg1; initComChannels(); }; }; } private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{ var clipname:String; var f:Function; var req:URLRequest; var id = _arg1; var clip = _arg2; clipname = ("_mochiservices_com_" + id); if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; MochiServices.allowDomains(_gatewayURL); _clip = createEmptyMovieClip(clip, clipname, 10336, false); _loader = new Loader(); _timer = new Timer(1000, 0); _startTime = getTimer(); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); f = function (_arg1:Object):void{ _clip._mochiad_ctr_failed = true; MochiServices.disconnect(); MochiServices.onError("IOError"); }; _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); req = new URLRequest(_gatewayURL); _loader.load(req); _clip.addChild(_loader); _clip._mochiservices_com = _loader; _sendChannel = new LocalConnection(); _clip._queue = []; _rcvChannel = new LocalConnection(); _rcvChannel.allowDomain("*", "localhost"); _rcvChannel.allowInsecureDomain("*", "localhost"); _rcvChannel.client = _clip; _clip._nextcallbackID = 0; _clip._callbacks = {}; listen(); return (_clip); } public static function bringToTop(_arg1:Event):void{ var e = _arg1; if (MochiServices.clip != null){ if (MochiServices.childClip != null){ try { if (MochiServices.clip.numChildren > 1){ MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1)); }; } catch(errorObject:Error) { _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); }; }; }; } public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{ var id = _arg1; var clip = _arg2; var onError = _arg3; if ((clip is DisplayObject)){ if (((!(_connected)) && ((_clip == null)))){ _connecting = true; init(id, clip); }; //unresolved jump }; if (onError != null){ MochiServices.onError = onError; } else { if (MochiServices.onError == null){ MochiServices.onError = function (_arg1:String):void{ }; }; }; } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{ var mc:MovieClip; var parent = _arg1; var name = _arg2; var depth = _arg3; var doAdd = _arg4; mc = new MovieClip(); if (doAdd){ if (((false) && (depth))){ parent.addChildAt(mc, depth); } else { parent.addChild(mc); }; }; try { parent[name] = mc; } catch(e:Error) { throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; mc["_name"] = name; return (mc); } public static function connectWait(_arg1:TimerEvent):void{ if ((getTimer() - _startTime) > 10000){ if (!_connected){ _clip._mochiad_ctr_failed = true; MochiServices.disconnect(); MochiServices.onError("IOError"); }; _timer.stop(); }; } } }//package mochi
Section 40
//DistortImage (sandy.util.DistortImage) package sandy.util { import flash.display.*; import flash.geom.*; public class DistortImage { private var _container:Object; private var _yMax:Number; private var _hsLen:Number; private var _hseg:Number; public var target:Object; private var offsetRect:Rectangle; private var _xMin:Number; public var texture:BitmapData; private var _vsLen:Number; public var points:Array; private var _h:Number; private var _aMcs:Array; private var _xMax:Number; private var _tri:Array; public var smooth:Boolean; private var _w:Number; private var _vseg:Number; private var _yMin:Number; public function DistortImage(){ smooth = true; } private function renderVector(_arg1:Rectangle=null):void{ var _local2:DisplayObject; var _local3:Matrix; _local2 = (target as DisplayObject); if (_arg1 != null){ texture = new BitmapData(_arg1.width, _arg1.height, true, 0); } else { texture = new BitmapData(_local2.width, _local2.height, true, 0); _arg1 = new Rectangle(0, 0, texture.width, texture.height); }; _local3 = new Matrix(); _local3.translate((_arg1.x * -1), (_arg1.y * -1)); texture.draw(_local2, _local3); container.transform.matrix.translate(_local2.transform.matrix.tx, _local2.transform.matrix.ty); _w = _arg1.width; _h = _arg1.height; } private function __render():void{ var _local1:Array; var _local2:SandyPoint; var _local3:SandyPoint; var _local4:SandyPoint; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Object; var _local10:Triangle; var _local11:Matrix; var _local12:Matrix; var _local13:int; _local7 = (1 / _h); _local8 = (1 / _w); _local9 = container; _local9.graphics.clear(); _local11 = new Matrix(); _local12 = new Matrix(); _local13 = _tri.length; while (--_local13 > -1) { _local10 = _tri[_local13]; _local2 = _local10.p0; _local3 = _local10.p1; _local4 = _local10.p2; _local12 = _local10.tMat; _local5 = _local2.sx; _local11.a = ((_local3.sx - _local5) * _local8); _local6 = _local2.sy; _local11.b = ((_local3.sy - _local6) * _local8); _local11.c = ((_local4.sx - _local5) * _local7); _local11.d = ((_local4.sy - _local6) * _local7); _local11.tx = _local5; _local11.ty = _local6; _local11 = __concat(_local11, _local12); _local9.graphics.beginBitmapFill(texture, _local11, false, smooth); _local9.graphics.moveTo(_local5, _local6); _local9.graphics.lineTo(_local3.sx, _local3.sy); _local9.graphics.lineTo(_local4.sx, _local4.sy); _local9.graphics.endFill(); }; } public function get container():Object{ return (_container); } public function set container(_arg1:Object):void{ if ((((_arg1 is Shape)) || ((_arg1 is Sprite)))){ _container = _arg1; } else { throw (new Error("container must be flash.display.Shape or flash.display.Sprite")); }; } public function initialize(_arg1:Number, _arg2:Number, _arg3:Rectangle=null):void{ if ((target is BitmapData)){ texture = (target as BitmapData); _w = texture.width; _h = texture.height; } else { if ((target is DisplayObject)){ renderVector(_arg3); } else { throw (new Error("target must be flash.display.BitmapData or flash.display.DisplayObject")); }; }; _vseg = ((_arg1) || (0)); _hseg = ((_arg2) || (0)); _aMcs = new Array(); points = new Array(); _tri = new Array(); __init(); } private function __init():void{ var _local1:int; var _local2:int; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:SandyPoint; var _local8:SandyPoint; var _local9:SandyPoint; points = new Array(); _tri = new Array(); _local3 = (_w / 2); _local4 = (_h / 2); _xMin = (_yMin = 0); _xMax = _w; _yMax = _h; _hsLen = (_w / (_hseg + 1)); _vsLen = (_h / (_vseg + 1)); _local1 = 0; while (_local1 < (_hseg + 2)) { _local2 = 0; while (_local2 < (_vseg + 2)) { _local5 = (_local1 * _hsLen); _local6 = (_local2 * _vsLen); points.push(new SandyPoint(_local5, _local6, _local5, _local6)); _local2++; }; _local1++; }; _local1 = 0; while (_local1 < (_vseg + 1)) { _local2 = 0; while (_local2 < (_hseg + 1)) { _local7 = points[(_local2 + (_local1 * (_hseg + 2)))]; _local8 = points[((_local2 + (_local1 * (_hseg + 2))) + 1)]; _local9 = points[(_local2 + ((_local1 + 1) * (_hseg + 2)))]; __addTriangle(_local7, _local8, _local9); _local7 = points[((_local2 + ((_local1 + 1) * (_vseg + 2))) + 1)]; _local8 = points[(_local2 + ((_local1 + 1) * (_vseg + 2)))]; _local9 = points[((_local2 + (_local1 * (_vseg + 2))) + 1)]; __addTriangle(_local7, _local8, _local9); _local2++; }; _local1++; }; } public function render():void{ __render(); } private function __addTriangle(_arg1:SandyPoint, _arg2:SandyPoint, _arg3:SandyPoint):void{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Matrix; _local10 = new Matrix(); _local4 = _arg1.x; _local5 = _arg1.y; _local6 = _arg2.x; _local7 = _arg2.y; _local8 = _arg3.x; _local9 = _arg3.y; _local10.tx = (-(_local5) * (_w / (_local7 - _local5))); _local10.ty = (-(_local4) * (_h / (_local8 - _local4))); _local10.a = (_local10.d = 0); _local10.b = (_h / (_local8 - _local4)); _local10.c = (_w / (_local7 - _local5)); _tri.push(new Triangle(_arg1, _arg2, _arg3, _local10)); } public function setTransform(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{ var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:int; var _local16:SandyPoint; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; _local9 = _w; _local10 = _h; _local11 = (_arg7 - _arg1); _local12 = (_arg8 - _arg2); _local13 = (_arg5 - _arg3); _local14 = (_arg6 - _arg4); _local15 = points.length; while (--_local15 > -1) { _local16 = points[_local15]; _local17 = ((_local16.x - _xMin) / _local9); _local18 = ((_local16.y - _yMin) / _local10); _local19 = (_arg1 + (_local18 * _local11)); _local20 = (_arg2 + (_local18 * _local12)); _local16.sx = (_local19 + (_local17 * ((_arg3 + (_local18 * _local13)) - _local19))); _local16.sy = (_local20 + (_local17 * ((_arg4 + (_local18 * _local14)) - _local20))); }; __render(); } private function __concat(_arg1:Matrix, _arg2:Matrix):Matrix{ var _local3:Matrix; _local3 = new Matrix(); _local3.a = (_arg1.c * _arg2.b); _local3.b = (_arg1.d * _arg2.b); _local3.c = (_arg1.a * _arg2.c); _local3.d = (_arg1.b * _arg2.c); _local3.tx = (((_arg1.a * _arg2.tx) + (_arg1.c * _arg2.ty)) + _arg1.tx); _local3.ty = (((_arg1.b * _arg2.tx) + (_arg1.d * _arg2.ty)) + _arg1.ty); return (_local3); } public function destroy():void{ container.graphics.clear(); texture.dispose(); texture = null; } } }//package sandy.util
Section 41
//SandyPoint (sandy.util.SandyPoint) package sandy.util { import flash.geom.*; public class SandyPoint extends Point { public var sx:Number; public var sy:Number; public function SandyPoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){ super(_arg1, _arg2); this.sx = _arg3; this.sy = _arg4; } } }//package sandy.util
Section 42
//Triangle (sandy.util.Triangle) package sandy.util { import flash.geom.*; public class Triangle { public var p0:SandyPoint; public var p1:SandyPoint; public var p2:SandyPoint; public var tMat:Matrix; public function Triangle(_arg1:SandyPoint, _arg2:SandyPoint, _arg3:SandyPoint, _arg4:Matrix){ this.p0 = _arg1; this.p1 = _arg2; this.p2 = _arg3; this.tMat = _arg4; } } }//package sandy.util
Section 43
//MochiAd (uk.co.barraxworld.ads.MochiAd) package uk.co.barraxworld.ads { import flash.display.*; import flash.events.*; import flash.net.*; import flash.utils.*; import flash.system.*; public class MochiAd { public static function getVersion():String{ return ("2.1"); } public static function showTimedAd(_arg1:Object):void{ MochiAd.showInterLevelAd(_arg1); } public static function _allowDomains(_arg1:String):String{ var _local2:String; _local2 = _arg1.split("/")[2].split(":")[0]; Security.allowDomain("*"); Security.allowDomain(_local2); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(_local2); return (_local2); } public static function load(_arg1:Object):MovieClip{ var DEFAULTS:Object; var clip:Object; var depth:Number; var mc:MovieClip; var wh:Array; var lv:URLVariables; var k:String; var server:String; var hostname:String; var lc:LocalConnection; var name:String; var loader:Loader; var f:Function; var g:Function; var req:URLRequest; var v:Object; var options = _arg1; DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; if (!MochiAd._isNetworkAvailable()){ return (null); }; if (clip._mochiad_loaded){ return (null); }; depth = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, "_mochiad", depth); wh = MochiAd._getRes(options, clip); options.res = ((wh[0] + "x") + wh[1]); options.server = (options.server + options.id); delete options.id; clip._mochiad_loaded = true; if (clip.loaderInfo.loaderURL.indexOf("http") == 0){ options.as3_swf = clip.loaderInfo.loaderURL; }; lv = new URLVariables(); for (k in options) { v = options[k]; if (!(v is Function)){ lv[k] = v; }; }; server = lv.server; delete lv.server; hostname = _allowDomains(server); lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.lc = lc; lv.lc = name; lv.st = getTimer(); loader = new Loader(); f = function (_arg1:Object):void{ mc._mochiad_ctr_failed = true; }; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); g = function (_arg1:Object):void{ MochiAd.unload(clip); }; loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g); req = new URLRequest((server + ".swf")); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader.load(req); mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{ var _local4:MovieClip; _local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id}); if (!_local4){ return (false); }; _local4.doSend(["sendHighScore", _arg1], _arg2, _arg3); return (true); } public static function _parseOptions(_arg1:Object, _arg2:Object):Object{ var _local3:Object; var _local4:String; var _local5:Array; var _local6:Number; var _local7:Array; _local3 = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; if (_arg1){ for (_local4 in _arg1) { _local3[_local4] = _arg1[_local4]; }; }; _arg1 = _local3.clip.loaderInfo.parameters.mochiad_options; if (_arg1){ _local5 = _arg1.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6].split("="); _local3[unescape(_local7[0])] = unescape(_local7[1]); _local6++; }; }; return (_local3); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (!_arg1._mochiad){ return (false); }; if (_arg1._mochiad.onUnload){ _arg1._mochiad.onUnload(); }; _arg1.removeChild(_arg1._mochiad); delete _arg1._mochiad_loaded; delete _arg1._mochiad; return (true); } public static function showInterLevelAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{ this.clip.stop(); }, ad_finished:function ():void{ this.clip.play(); }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ options.ad_finished(); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.started = getTimer(); _local2.ad_msec = (_arg1 - 250); }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Number; var _local3:Boolean; var _local4:Number; _local1 = this.parent._mochiad_ctr; _local2 = (getTimer() - this.started); _local3 = false; if (!chk.showing){ _local4 = _local1.loaderInfo.bytesTotal; if ((((_local4 > 0)) || (("number" == "undefined")))){ chk.showing = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ _local3 = true; }; }; }; if ((((_local2 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){ _local3 = true; }; if (_local3){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _getRes(_arg1:Object, _arg2:Object):Array{ var _local3:Object; var _local4:Number; var _local5:Number; var _local6:Array; _local3 = _arg2.getBounds(_arg2.root); _local4 = 0; _local5 = 0; if (typeof(_arg1.res) != "undefined"){ _local6 = _arg1.res.split("x"); _local4 = parseFloat(_local6[0]); _local5 = parseFloat(_local6[1]); } else { _local4 = (_local3.xMax - _local3.xMin); _local5 = (_local3.yMax - _local3.yMin); }; if ((((_local4 == 0)) || ((_local5 == 0)))){ _local4 = _arg2.stage.stageWidth; _local5 = _arg2.stage.stageHeight; }; return ([_local4, _local5]); } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{ var _local4:MovieClip; _local4 = new MovieClip(); if (((false) && (_arg3))){ _arg1.addChildAt(_local4, _arg3); } else { _arg1.addChild(_local4); }; _arg1[_arg2] = _local4; _local4["_name"] = _arg2; return (_local4); } public static function _loadCommunicator(_arg1:Object):MovieClip{ var DEFAULTS:Object; var clip:Object; var clipname:String; var server:String; var depth:Number; var mc:MovieClip; var lv:URLVariables; var k:String; var lc:LocalConnection; var name:String; var req:URLRequest; var loader:Loader; var options = _arg1; DEFAULTS = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; clipname = ("_mochiad_com_" + options.id); if (!MochiAd._isNetworkAvailable()){ return (null); }; if (clip[clipname]){ return (clip[clipname]); }; server = (options.com_server + options.id); MochiAd._allowDomains(server); delete options.id; delete options.com_server; depth = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, clipname, depth); lv = new URLVariables(); for (k in options) { lv[k] = options[k]; }; lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.name = name; mc.lc = lc; lv.lc = name; mc._id = 0; mc._queue = []; mc.rpcResult = function (_arg1:Object):void{ var _local3:Array; var _local4:Array; var _local5:Number; var _local6:Object; var _local7:Object; _arg1 = parseInt(_arg1.toString()); _local3 = mc._callbacks[_arg1]; if (typeof(_local3) == "undefined"){ return; }; delete mc._callbacks[_arg1]; _local4 = []; _local5 = 2; while (_local5 < _local3.length) { _local4.push(_local3[_local5]); _local5++; }; _local5 = 1; while (_local5 < arguments.length) { _local4.push(arguments[_local5]); _local5++; }; _local6 = _local3[1]; _local7 = _local3[0]; if (((_local7) && ((typeof(_local6) == "string")))){ _local6 = _local7[_local6]; }; if (typeof(_local6) == "function"){ _local6.apply(_local7, _local4); }; }; mc._didConnect = function (_arg1:String):void{ var _local2:Array; var _local3:Function; var _local4:Number; var _local5:Array; mc._endpoint = _arg1; _local2 = mc._queue; delete mc._queue; _local3 = mc.doSend; _local4 = 0; while (_local4 < _local2.length) { _local5 = _local2[_local4]; _local3.apply(this, _local5); _local4++; }; }; mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{ var _local5:Number; var _local6:LocalConnection; var _local7:Array; var _local8:Number; if (mc._endpoint == null){ _local7 = []; _local8 = 0; while (_local8 < arguments.length) { _local7.push(arguments[_local8]); _local8++; }; mc._queue.push(_local7); return; }; mc._id = (mc._id + 1); _local5 = mc._id; mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))]; _local6 = new LocalConnection(); _local6.send(mc._endpoint, "rpc", _local5, _arg1); }; mc._callbacks = {}; mc._callbacks[0] = [mc, "_didConnect"]; lv.st = getTimer(); req = new URLRequest((server + ".swf")); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader = new Loader(); loader.load(req); mc.addChild(loader); mc._mochiad_com = loader; return (mc); } public static function showPreGameAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var bar:MovieClip; var bar_color:Number; var bar_background:Number; var bar_outline:Number; var backing_mc:MovieClip; var backing:Object; var inside_mc:MovieClip; var inside:Object; var outline_mc:MovieClip; var outline:Object; var complete:Boolean; var unloaded:Boolean; var f:Function; var r:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, ad_started:function ():void{ this.clip.stop(); }, ad_finished:function ():void{ this.clip.play(); }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ var fn:Function; fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); bar = createEmptyMovieClip(chk, "_mochiad_bar", 4); bar.x = 10; bar.y = (h - 20); bar_color = options.color; delete options.color; bar_background = options.background; delete options.background; bar_outline = options.outline; delete options.outline; backing_mc = createEmptyMovieClip(bar, "_outline", 1); backing = backing_mc.graphics; backing.beginFill(bar_background); backing.moveTo(0, 0); backing.lineTo((w - 20), 0); backing.lineTo((w - 20), 10); backing.lineTo(0, 10); backing.lineTo(0, 0); backing.endFill(); inside_mc = createEmptyMovieClip(bar, "_inside", 2); inside = inside_mc.graphics; inside.beginFill(bar_color); inside.moveTo(0, 0); inside.lineTo((w - 20), 0); inside.lineTo((w - 20), 10); inside.lineTo(0, 10); inside.lineTo(0, 0); inside.endFill(); inside_mc.scaleX = 0; outline_mc = createEmptyMovieClip(bar, "_outline", 3); outline = outline_mc.graphics; outline.lineStyle(0, bar_outline, 100); outline.moveTo(0, 0); outline.lineTo((w - 20), 0); outline.lineTo((w - 20), 10); outline.lineTo(0, 10); outline.lineTo(0, 0); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; f = function (_arg1:Event):void{ complete = true; if (unloaded){ MochiAd.unload(clip); }; }; clip.loaderInfo.addEventListener(Event.COMPLETE, f); if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.started = getTimer(); _local2.ad_msec = _arg1; }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Object; var _local3:Number; var _local4:Boolean; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Object; var _local10:Number; var _local11:Number; if (!this.parent.parent){ delete this["onEnterFrame"]; return; }; _local1 = this.parent.parent.root; _local2 = this.parent._mochiad_ctr; _local3 = (getTimer() - this.started); _local4 = false; _local5 = _local1.loaderInfo.bytesTotal; _local6 = _local1.loaderInfo.bytesLoaded; _local7 = ((100 * _local6) / _local5); _local8 = ((100 * _local3) / chk.ad_msec); _local9 = this._mochiad_bar._inside; _local10 = Math.min(100, Math.min(((_local7) || (0)), _local8)); _local10 = Math.max(this.last_pcnt, _local10); this.last_pcnt = _local10; _local9.scaleX = (_local10 * 0.01); if (!chk.showing){ _local11 = _local2.loaderInfo.bytesTotal; if ((((_local11 > 0)) || (("number" == "undefined")))){ chk.showing = true; chk.started = getTimer(); } else { if (_local3 > chk.ad_timeout){ _local4 = true; }; }; }; if ((((_local3 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){ _local4 = true; }; if (((complete) && (_local4))){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(_arg1:Object):void{ MochiAd.showPreGameAd(_arg1); } public static function fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{ var _local4:MovieClip; _local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id}); if (!_local4){ return (false); }; _local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3); return (true); } public static function doOnEnterFrame(_arg1:MovieClip):void{ var f:Function; var mc = _arg1; f = function (_arg1:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { mc.removeEventListener(Event.ENTER_FRAME, f); }; }; mc.addEventListener(Event.ENTER_FRAME, f); } } }//package uk.co.barraxworld.ads
Section 44
//Countdown (uk.co.barraxworld.common.Countdown) package uk.co.barraxworld.common { import flash.events.*; import flash.utils.*; public class Countdown extends EventDispatcher { private var count:Number;// = 0 private var timer:Timer; public function Countdown(_arg1:Number, _arg2:Number){ count = 0; super(); count = _arg1; timer = new Timer(_arg2); timer.addEventListener(TimerEvent.TIMER, tick); timer.start(); } private function tick(_arg1:TimerEvent):void{ dispatchEvent(new CustomEvent(count.toString())); count--; } public function destroy():void{ timer.stop(); timer.removeEventListener(TimerEvent.TIMER, tick); timer = null; } } }//package uk.co.barraxworld.common
Section 45
//CustomEvent (uk.co.barraxworld.common.CustomEvent) package uk.co.barraxworld.common { import flash.events.*; public class CustomEvent extends Event { public var instance; public var modeStr:String; public static const EVT:String = ""; public function CustomEvent(_arg1:String, _arg2=null){ super(EVT); this.modeStr = _arg1; this.instance = _arg2; } } }//package uk.co.barraxworld.common
Section 46
//KeyboardHandler (uk.co.barraxworld.common.KeyboardHandler) package uk.co.barraxworld.common { import flash.events.*; public class KeyboardHandler { protected var dispatcher:EventDispatcher; protected var keys:Array; private static var singleton:KeyboardHandler; public function KeyboardHandler(_arg1:EventDispatcher){ singleton = this; setDispatcher(_arg1); } public function setDispatcher(_arg1:EventDispatcher){ if (dispatcher == null){ keys = new Array(); } else { dispatcher.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); dispatcher.removeEventListener(KeyboardEvent.KEY_UP, keyUpHandler); dispatcher.removeEventListener(Event.DEACTIVATE, deactivateHandler); dispatcher.removeEventListener(FocusEvent.FOCUS_OUT, deactivateHandler); }; dispatcher = _arg1; dispatcher.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); dispatcher.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler); dispatcher.addEventListener(Event.DEACTIVATE, deactivateHandler); dispatcher.addEventListener(FocusEvent.FOCUS_OUT, deactivateHandler); } public function isDown(_arg1:uint):Boolean{ return ((keys[_arg1] == true)); } private function keyDownHandler(_arg1:KeyboardEvent):void{ keys[_arg1.keyCode] = true; } private function deactivateHandler(_arg1:Event){ keys = new Array(); } private function keyUpHandler(_arg1:KeyboardEvent):void{ keys[_arg1.keyCode] = false; } public static function getInstance():KeyboardHandler{ if (singleton == null){ throw (new Error("KeyboardHandler::No instance exists")); }; return (singleton); } } }//package uk.co.barraxworld.common
Section 47
//TiledFill (uk.co.barraxworld.effects.TiledFill) package uk.co.barraxworld.effects { import flash.display.*; import flash.geom.*; public class TiledFill extends Sprite { public function TiledFill(_arg1:BitmapData, _arg2:Matrix, _arg3:Number, _arg4:Number){ graphics.lineStyle(); graphics.beginBitmapFill(_arg1, _arg2, true, true); graphics.drawRect(0, 0, _arg3, _arg4); graphics.endFill(); } public function destroy():void{ graphics.clear(); } } }//package uk.co.barraxworld.effects
Section 48
//TweenEffects (uk.co.barraxworld.effects.TweenEffects) package uk.co.barraxworld.effects { import flash.display.*; import flash.events.*; import gs.*; import fl.motion.easing.*; public class TweenEffects extends EventDispatcher { public static var instance:TweenEffects; public function blinkBlack(_arg1:DisplayObject, _arg2:Number=0.5):void{ blink(_arg1, _arg2, 0); } public function fadeIn(_arg1:DisplayObject, _arg2:Number=1, _arg3:Number=0):void{ TweenLite.killTweensOf(_arg1, true); TweenLite.to(_arg1, _arg2, {alpha:1, delay:_arg3, autoAlpha:true, ease:Linear.easeOut}); } private function blink(_arg1:DisplayObject, _arg2:Number, _arg3):void{ TweenLite.killTweensOf(_arg1, true); TweenLite.to(_arg1, 0, {tint:_arg3}); TweenLite.to(_arg1, _arg2, {tint:null, ease:Linear.easeOut}); } public function blinkRed(_arg1:DisplayObject, _arg2:Number=0.5):void{ blink(_arg1, _arg2, 0xFF0000); } public function scaleTo(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Number=0):void{ TweenLite.killTweensOf(_arg1, true); TweenLite.to(_arg1, _arg4, {scaleX:_arg2, scaleY:_arg3, delay:_arg5, ease:Linear.easeOut}); } public function fadeOutAndRemove(_arg1:DisplayObject, _arg2:Number):void{ TweenLite.killTweensOf(_arg1, true); TweenLite.to(_arg1, _arg2, {alpha:0, ease:Linear.easeOut, onComplete:removeClip, onCompleteParams:[_arg1]}); } public function blinkWhite(_arg1:DisplayObject, _arg2:Number=0.5):void{ blink(_arg1, _arg2, 0xFFFFFF); } private function restoreAlpha(_arg1:DisplayObject):void{ _arg1.alpha = 1; } public function fadeOut(_arg1:DisplayObject, _arg2:Number=1, _arg3:Number=0):void{ TweenLite.killTweensOf(_arg1, true); TweenLite.to(_arg1, _arg2, {alpha:0, delay:_arg3, autoAlpha:true, ease:Linear.easeOut}); } public function flicker(_arg1:DisplayObject, _arg2:int=10, _arg3:Number=0, _arg4:Number=1):void{ var _local5:*; var _local6:uint; var _local7:*; TweenLite.killTweensOf(_arg1, true); _local5 = 0; _local6 = 0; while (_local6 < _arg2) { _local7 = ((_local6 & 1)) ? _arg4 : _arg3; TweenLite.to(_arg1, 0, {alpha:_local7, delay:(_local5 * 0.1), overwrite:false}); _local5++; _local6++; }; TweenLite.to(_arg1, 0, {alpha:1, delay:(_local5 * 0.1), overwrite:false, onComplete:restoreAlpha, onCompleteParams:[_arg1]}); } private function removeClip(_arg1:DisplayObject):void{ _arg1.parent.removeChild(_arg1); } public static function getInstance():TweenEffects{ if (!instance){ instance = new (TweenEffects); }; return (instance); } } }//package uk.co.barraxworld.effects
Section 49
//LevelSelectThumb (uk.co.barraxworld.game.common.LevelSelectThumb) package uk.co.barraxworld.game.common { import flash.display.*; public class LevelSelectThumb extends MovieClip { public var id:int; public var hideMC:MovieClip; public var completed:MovieClip; public var maskMC:MovieClip; private var thumbnailIcon:ThumbnailIcon; public var holder:MovieClip; public function initialise(_arg1:String, _arg2:String):void{ thumbnailIcon = new ThumbnailIcon(); thumbnailIcon.initialise(_arg1, _arg2); holder.mask = maskMC; holder.addChild(thumbnailIcon); } } }//package uk.co.barraxworld.game.common
Section 50
//PlayerGetReady (uk.co.barraxworld.game.common.PlayerGetReady) package uk.co.barraxworld.game.common { import flash.events.*; import uk.co.barraxworld.common.*; import uk.co.barraxworld.game.hud.*; public class PlayerGetReady extends EventDispatcher { private var pArray:Array; private var hud:GenericHud; private var countdown:Countdown; public function PlayerGetReady(_arg1:Array, _arg2:GenericHud){ pArray = _arg1; hud = _arg2; countdown = new Countdown((pArray.length - 1), 500); countdown.addEventListener(CustomEvent.EVT, getReadyHandler); } private function getReadyHandler(_arg1):void{ hud.updateMainStatus(pArray[Number(_arg1.modeStr)]); if (_arg1.modeStr == "0"){ countdown.destroy(); countdown = null; dispatchEvent(new CustomEvent("")); }; } } }//package uk.co.barraxworld.game.common
Section 51
//GameOptions (uk.co.barraxworld.game.config.GameOptions) package uk.co.barraxworld.game.config { import uk.co.barraxworld.settings.*; public class GameOptions { protected var _effectsLevel:int;// = 1 protected var _soundOn:Boolean;// = true protected var _invertMouse:Boolean;// = false public static var instance:GameOptions; public function GameOptions(){ _invertMouse = false; _effectsLevel = 1; _soundOn = true; super(); } public function set effectsLevel(_arg1:int):void{ _effectsLevel = _arg1; } public function set invertMouse(_arg1:Boolean):void{ _invertMouse = _arg1; } public function get effectsLevel():int{ return (_effectsLevel); } public function initFromCookie(_arg1:CookieManager):void{ var _local2:*; _invertMouse = ((_arg1.getItem("invertMouse") == "1")) ? true : false; _soundOn = ((_arg1.getItem("soundOn") == "0")) ? false : true; _local2 = _arg1.getItem("effectsLevel"); _effectsLevel = ((_local2)=="") ? 1 : int(_local2); } public function get soundOn():Boolean{ return (_soundOn); } public function get invertMouse():Boolean{ return (_invertMouse); } public function set soundOn(_arg1:Boolean):void{ _soundOn = _arg1; } public static function getInstance():GameOptions{ if (!instance){ instance = new (GameOptions); }; return (instance); } } }//package uk.co.barraxworld.game.config
Section 52
//Crosshair (uk.co.barraxworld.game.cursors.Crosshair) package uk.co.barraxworld.game.cursors { import uk.co.barraxworld.game.config.*; import flash.display.*; import gs.*; public class Crosshair extends Sprite { private var _k:Number; private var _ypos:Number; private var limity:Number; private var useInertia:Boolean; public var _clip:Sprite; public var _speed:Number; private var gameOptions:GameOptions; private var mouse_y:Number; private var mouse_x:Number; private var _inertia:Number; public var tl:MovieClip; private var _xp:Number; private var _xpos:Number; private var targetColour:uint; private var _yp:Number; private var _stage:Stage; public function Crosshair(_arg1:MovieClip, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Boolean=true){ gameOptions = GameOptions.getInstance(); this.tl = _arg1; _stage = _arg1.stage; _inertia = _arg2; _k = _arg3; this.useInertia = _arg5; limity = _arg4; mouse_x = _stage.mouseX; mouse_y = _stage.mouseY; _xp = (_xpos = mouse_x); _yp = (_ypos = mouse_y); _clip = new crosshair_sprite(); _arg1.addChild(_clip); _clip.x = (_stage.stageWidth / 2); _clip.y = (_stage.stageHeight / 2); _clip.visible = false; } public function destroy():void{ tl.removeChild(_clip); _clip = null; } private function rand(_arg1:Number, _arg2:Number):Number{ return (Math.floor((_arg1 + (Math.random() * ((_arg2 - _arg1) + 1))))); } public function get ypos():Number{ return (_clip.y); } public function show():void{ _clip.visible = true; } public function hide():void{ _clip.visible = false; } public function recoil(_arg1:Number):void{ var _local2:int; _ypos = (_ypos - _arg1); _local2 = (_arg1 / 10); _xpos = (_xpos + rand((-(_local2) / 2), _local2)); } private function render():void{ _clip.x = (_clip.x + _xp); if ((_clip.y + _yp) > (_stage.stageHeight - limity)){ _clip.y = (_stage.stageHeight - limity); _yp = 0; } else { _clip.y = (_clip.y + _yp); }; } public function update():void{ mouse_x = _stage.mouseX; if (gameOptions.invertMouse){ mouse_y = (_stage.stageHeight + (_stage.mouseY * -1)); } else { mouse_y = _stage.mouseY; }; _xpos = (_xpos - ((_xpos - (-(_clip.x) + mouse_x)) / 2)); _ypos = (_ypos - ((_ypos - (-(_clip.y) + mouse_y)) / 2)); _xp = ((_xp * _inertia) + (_xpos * _k)); _yp = ((_yp * _inertia) + (_ypos * _k)); _speed = Math.sqrt(((_xp * _xp) + (_yp * _yp))); render(); } public function setColour(_arg1:uint):void{ if (_arg1 == targetColour){ return; }; targetColour = _arg1; TweenLite.killTweensOf(_clip); TweenLite.to(_clip, 0.3, {tint:targetColour}); } public function get xpos():Number{ return (_clip.x); } } }//package uk.co.barraxworld.game.cursors
Section 53
//StandardCrosshair (uk.co.barraxworld.game.cursors.StandardCrosshair) package uk.co.barraxworld.game.cursors { import flash.display.*; public class StandardCrosshair extends Crosshair { private var left:Sprite; private var right:Sprite; private var bottom:Sprite; private var top:Sprite; public function StandardCrosshair(_arg1:MovieClip, _arg2:Number=0, _arg3:Number=0){ super(_arg1, _arg2, _arg3, 60, false); addLines(); } public function focus():void{ var _local1:*; _local1 = (_speed / 2); top.y = -(_local1); bottom.y = _local1; left.x = -(_local1); right.x = _local1; } private function addLines():void{ top = new crosshair_line(); _clip.addChild(top); right = new crosshair_line(); right.rotation = 90; _clip.addChild(right); bottom = new crosshair_line(); bottom.rotation = 180; _clip.addChild(bottom); left = new crosshair_line(); left.rotation = 270; _clip.addChild(left); } } var _local1:* = Crosshair; return (_local1); }//package uk.co.barraxworld.game.cursors
Section 54
//CharacterStrafeAnim (uk.co.barraxworld.game.engine3D.characters.CharacterStrafeAnim) package uk.co.barraxworld.game.engine3D.characters { import flash.display.*; import uk.co.barraxworld.game.gfx.*; public class CharacterStrafeAnim extends SpriteSheet { public var sheet:MovieClip; public function CharacterStrafeAnim(){ var _local1:*; var _local2:*; _local1 = 64; _local2 = 16; super(_local2, _local1, true); playMode = "fwd"; completeCycle = true; } } }//package uk.co.barraxworld.game.engine3D.characters
Section 55
//CharacterWalkAnim (uk.co.barraxworld.game.engine3D.characters.CharacterWalkAnim) package uk.co.barraxworld.game.engine3D.characters { import flash.display.*; import uk.co.barraxworld.game.gfx.*; public class CharacterWalkAnim extends SpriteSheet { public var sheet:MovieClip; public function CharacterWalkAnim(){ var _local1:*; var _local2:*; _local1 = 64; _local2 = 16; super(_local2, _local1, true); playMode = "fwd"; completeCycle = true; } } }//package uk.co.barraxworld.game.engine3D.characters
Section 56
//CpuPlayer (uk.co.barraxworld.game.engine3D.characters.CpuPlayer) package uk.co.barraxworld.game.engine3D.characters { import flash.display.*; import flash.events.*; import uk.co.barraxworld.game.engine3D.structures.*; import uk.co.barraxworld.game.engine3D.*; import flash.utils.*; public class CpuPlayer extends RemotePlayer { private var lastPos:Point3D; private var localPlayer:LocalPlayer; private var targetArea_x:Number;// = 0 private var targetArea_z:Number;// = 0 private var targetPoint:Point3D; private var zMax:Number; private var targetOffset_z:Number;// = 0 private var currObstruction:Object3D; private var selectableWeapons:Array; private var targetOffset_x:Number;// = 0 private var shotFreq:Number;// = 24 private var clearShot:Boolean; private var utils3D:Utils3D; private var count:int; private var respawnTimer:Timer; private var targetArea_max:Number; private var zMin:Number; public var modeStr:String; private var jumpFreq:Number;// = 64 private var isSafe:Boolean; private var safePosition:Point3D; private var retreat:Boolean; private var moveFreq:Number;// = 32 private var obstacles:Array; public function CpuPlayer(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number){ targetArea_max = moveBounds2.xMax; targetArea_x = 0; targetArea_z = 0; targetOffset_x = 0; targetOffset_z = 0; moveFreq = 32; shotFreq = 24; jumpFreq = 64; zMax = moveBounds2.zMax; zMin = moveBounds2.zMin; super(_arg1, _arg2, _arg3, _arg4); Object3D.registerMovableObject(this); utils3D = Utils3D.getInstance(); bounds = moveBounds2; useBounds = true; } private function aiMove():void{ var _local1:*; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:*; count++; if (!active){ return; }; _local1 = Utils3D.getDistance(targetPoint, new Point3D(xpos, 0, zpos)); if (((((count % int((moveFreq - ((moveFreq / 2) * skill)))) == 0)) && ((Math.random() < skill)))){ targetOffset_x = randRange(-(targetArea_x), targetArea_x); targetOffset_z = randRange(((zMax / 2) + 400), zMax); }; if (retreat){ targetPoint.xpos = safePosition.xpos; targetPoint.zpos = safePosition.ypos; } else { targetPoint.xpos = (targetOffset_x + (localPlayer.xpos * (1 + (Math.random() * 1.2)))); if ((id & 1)){ targetPoint.xpos = (targetPoint.xpos * -1); }; if (Math.abs(targetPoint.xpos) > targetArea_max){ if (Math.random() > 0.3){ targetPoint.xpos = randRange(-(targetArea_max), targetArea_max); }; }; targetPoint.zpos = targetOffset_z; }; _local2 = (targetPoint.xpos - xpos); _local3 = (targetPoint.zpos - zpos); _local4 = 30; if (Math.abs(_local2) < _local4){ movex = 0; } else { movex = ((_local2 > 1)) ? 1 : -1; }; if (Math.abs(_local3) < _local4){ movez = 0; } else { movez = ((_local3 > 1)) ? 1 : -1; }; if (((!((movex == 0))) || (!((movez == 0))))){ walk(); }; animateSpriteSheet(); if (localPlayer.active){ retreat = false; if ((count % 4) == 0){ currObstruction = checkForObstacleIntersections().obstacle; clearShot = !(currObstruction); }; if ((count % int((jumpFreq - ((jumpFreq / 2) * skill)))) == 0){ if (((((!(clearShot)) || ((localPlayer.ypos < 0)))) && ((Math.random() > 0.3)))){ jump(); }; }; if (clearShot){ _local5 = int((shotFreq - (shotFreq * skill))); if (currWeapon.automatic){ _local5 = 1; }; if ((count % _local5) == 0){ if (currWeapon.weaponAmmo > 0){ pullTrigger(); } else { selectNewWeapon(); }; }; } else { if (currObstruction){ if (currObstruction.zpos > (zMax / 2)){ safePosition = new Point3D(xpos, ypos, zpos); }; }; }; if (Utils3D.getDistance(lastPos, new Point3D(xpos, ypos, zpos)) < 1){ jump(); }; lastPos = new Point3D(xpos, ypos, zpos); } else { retreat = true; }; } private function selectNewWeapon():void{ var _local1:int; reloadAllWeapons(); _local1 = selectableWeapons[randRange(0, (selectableWeapons.length - 1))]; selectWeapon(_local1); currWeapon.arm(); } override public function die():void{ active = false; removeSpriteSheet(); setVisible(false); doGiblets(); doBlood(); if (lives > 0){ respawnTimer = new Timer(5000, 1); respawnTimer.addEventListener(TimerEvent.TIMER_COMPLETE, autoSpawn, false, 0, true); respawnTimer.start(); }; } private function checkForObstacleIntersections():Object{ var _local1:*; var _local2:*; var _local3:*; var _local4:*; _local1 = -150; _local2 = new Point3D(localPlayer.xpos, localPlayer.centre.ypos, localPlayer.zpos); _local3 = new Point3D(xpos, centre.ypos, zpos); _local4 = obstacles.filter(inMyPath); return (Utils3D.checkForObstacleIntersections(_local4, _local2, _local3, 1)); } override public function moveByTime(_arg1:Number):void{ if (!gameOn){ return; }; aiMove(); } public function autoSpawn(_arg1:TimerEvent=null):void{ if (!gameOn){ return; }; retreat = false; lastPos = new Point3D(xpos, ypos, zpos); targetPoint = new Point3D(xpos, ypos, zpos); safePosition = targetPoint; spawn(); count = 0; localPlayer = LocalPlayer.getInstance(); targetArea_x = (targetArea_max - ((targetArea_max * 0.66) * skill)); targetArea_z = (zMax - 100); obstacles = staticObstacles.concat(); obstacles.sortOn("zpos", Array.NUMERIC); obstacles.pop(); equipInitialWeapons(); restrictWeapons(); selectNewWeapon(); currWeapon.arm(); } public function inMyPath(_arg1, _arg2:int, _arg3:Array):Boolean{ return ((((_arg1.zpos < zpos)) && ((_arg1.centreBack.zpos > localPlayer.centreBack.zpos)))); } private function restrictWeapons():void{ var _local1:uint; selectableWeapons = []; _local1 = 0; while (_local1 < inventory.length) { if (skill < 0.5){ if (inventory[_local1].automatic == 0){ selectableWeapons.push(_local1); }; } else { selectableWeapons.push(_local1); }; _local1++; }; } override public function destroy():void{ removeMyUserInstance(); removeCurrentRespawnProcess(); removeSpriteSheet(); removeSounds(); removeMe = true; if (respawnTimer){ respawnTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, autoSpawn); respawnTimer.stop(); respawnTimer = null; }; } } }//package uk.co.barraxworld.game.engine3D.characters
Section 57
//LocalPlayer (uk.co.barraxworld.game.engine3D.characters.LocalPlayer) package uk.co.barraxworld.game.engine3D.characters { import flash.display.*; import uk.co.barraxworld.game.engine3D.*; import uk.co.barraxworld.common.*; import uk.co.barraxworld.game.engine3D.effects.*; public class LocalPlayer extends Player { public static var instance:LocalPlayer; public static var LIVES_REMAINING:int; public function LocalPlayer(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number){ super(_arg1, "player_human", _arg2, _arg3, _arg4); numBloodParticles = 8; Object3D.registerMovableObject(this); instance = this; } override public function die():void{ resetEnhancements(); releaseTrigger(); active = false; doGiblets(); doBlood(); setView("death"); initRespawn(); } override public function spawn(_arg1=null):void{ var _local2:Flies; _local2 = new Flies(timeline, xpos, ypos, zpos); travelDist = 0; xpos = spawnPoint.xpos; if (spawnInRandom_x){ xpos = (xpos + randRange(-1000, 1000)); }; ypos = spawnPoint.ypos; zpos = spawnPoint.zpos; setView("firstperson"); health = 100; initSpawnAnim(); hasSpawned = true; dispatchEvent(new CustomEvent("spawn", this)); } public static function getInstance():LocalPlayer{ return (instance); } } }//package uk.co.barraxworld.game.engine3D.characters
Section 58
//OpponentHealthBar (uk.co.barraxworld.game.engine3D.characters.OpponentHealthBar) package uk.co.barraxworld.game.engine3D.characters { import flash.display.*; public class OpponentHealthBar extends MovieClip { public var max:Number;// = 100 public var fill:MovieClip; public function OpponentHealthBar(){ max = 100; super(); } public function set value(_arg1:Number):void{ var _local2:Number; _local2 = Math.max((_arg1 / max), 0); fill.scaleX = _local2; } } }//package uk.co.barraxworld.game.engine3D.characters
Section 59
//Player (uk.co.barraxworld.game.engine3D.characters.Player) package uk.co.barraxworld.game.engine3D.characters { import uk.co.barraxworld.game.config.*; import flash.display.*; import flash.events.*; import uk.co.barraxworld.game.engine3D.structures.*; import uk.co.barraxworld.game.engine3D.*; import uk.co.barraxworld.common.*; import uk.co.barraxworld.game.shooter.armoury.*; import uk.co.barraxworld.game.gfx.*; import flash.utils.*; import uk.co.barraxworld.game.shooter.*; import uk.co.barraxworld.game.engine3D.effects.*; public class Player extends MovableObject3D { public var spawnInRandom_x:Boolean;// = true public var userID:String;// = "" public var invincible:Boolean; private var _stepx:Number;// = 0 private var _stepy:Number;// = 0 private var spawnAnimation:SpawnAnimation; private var _currWeaponID:int;// = -1 public var walkSpeed_x:Number;// = 20 public var walkSpeed_z:Number;// = 12 private var spawnAnimTimer:Timer; private var _currWeapon:Weapon;// = null private var jumpMultiplier:Number; public var weaponCallback:Function; public var movex:int;// = 0 public var movez:int;// = 0 private var stepDist:Number;// = 0 public var spawnPoint:Point3D; public var maxHealth:int;// = 100 public var hitDamage:Number; public var numBloodParticles:int;// = 4 private var _weaponPos:Object; public var lives:int; public var oldx:Number; public var oldz:Number; private var _currView:String; private var spawnDelayTimer:Timer; private var speedMultiplier:Number; private var _health:int; public var hasSpawned:Boolean; public var gameOn:Boolean;// = true private var spriteSheet:SpriteSheet; private var invincibiltyTimer:Timer; private var _inventory:Array; public var hitByID:String;// = "" public static var ITINERARY_TYPE:String; public function Player(_arg1:MovieClip, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number){ _currWeapon = null; _currWeaponID = -1; gameOn = true; spawnInRandom_x = true; userID = ""; hitByID = ""; numBloodParticles = 4; movex = 0; movez = 0; walkSpeed_x = 20; walkSpeed_z = 12; maxHealth = 100; _health = maxHealth; stepDist = 0; _stepx = 0; _stepy = 0; _weaponPos = {x:0, y:0}; super(_arg1, _arg2, _arg3, _arg4, _arg5, 250, 250, 40); mass = 3; resetEnhancements(); hasSpawned = false; spawnPoint = new Point3D(xpos, ypos, zpos); active = false; } public function onImpact():void{ if (_health > 0){ grunt(); } else { scream(); }; } public function addWeapon(_arg1:Object):void{ var _local2:uint; var _local3:Weapon; if (!_inventory){ _inventory = []; }; _local2 = 0; while (_local2 < _inventory.length) { if (_inventory[_local2].ref == _arg1.ref){ _inventory[_local2].quickReload(); return; }; _local2++; }; _local3 = new Weapon(_arg1); _local3.addEventListener(CustomEvent.EVT, weaponCallback); _local3.owner = this; _inventory.push(_local3); _inventory.sortOn("menuIndex", Array.NUMERIC); reIndexWeapons(); } public function cycleWeapons(_arg1:int=1):void{ var _local2:*; if (_inventory.length > 0){ _local2 = Math.min(Math.max((_currWeaponID - _arg1), 0), (_inventory.length - 1)); selectWeapon(_local2); }; } public function jumpBoost(_arg1:Number):void{ var _local2:*; jumpMultiplier = _arg1; _local2 = new Timer(10000, 1); _local2.addEventListener(TimerEvent.TIMER_COMPLETE, onJumpBoostComplete, false, 0, true); _local2.start(); } public function get legs():Point3D{ return (new Point3D(xpos, (ypos - (h / 2.5)), zpos)); } public function setView(_arg1:String):void{ if (_currView != _arg1){ _currView = _arg1; clip.gotoAndStop(_currView); }; } public function doBlood():void{ var _local1:uint; var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:Blood3D; if (GameOptions.getInstance().effectsLevel == 0){ return; }; _local1 = 0; while (_local1 < numBloodParticles) { _local2 = randRange((xpos - w), (xpos + w)); _local3 = randRange((ypos - h), (ypos - (h * 2))); _local4 = randRange((zpos - d), (zpos + d)); _local5 = randRange(5, 10); _local6 = new Blood3D(timeline, _local2, _local3, _local4); _local6.scaleMultiplier = _local5; _local1++; }; } public function grunt():void{ playSound("grunt1"); } public function equipInitialWeapons():void{ var _local1:*; var _local2:int; var _local3:uint; if (ITINERARY_TYPE == "dynamic"){ _local1 = DynamicItinerary; _local2 = DynamicItinerary.weapons.length(); } else { _local1 = Itinerary; _local2 = Itinerary.weapons.length; }; _local3 = 0; while (_local3 < _local2) { if ((((this is CpuPlayer)) && ((_local1.weapons[_local3].ref == "pipebomb")))){ } else { addWeapon(_local1.weapons[_local3]); }; _local3++; }; } private function invincibility(_arg1:int):void{ invincible = true; if (!invincibiltyTimer){ invincibiltyTimer = new Timer(_arg1, 1); invincibiltyTimer.addEventListener(TimerEvent.TIMER_COMPLETE, endInvinciblityTimer); }; invincibiltyTimer.reset(); invincibiltyTimer.start(); } public function jump(_arg1:Number=-70):void{ if (!active){ return; }; if (ypos == ground){ ySpeed = (_arg1 * jumpMultiplier); }; } public function get body():Point3D{ return (new Point3D(xpos, (ypos - (h / 2)), zpos)); } private function onJumpBoostComplete(_arg1:TimerEvent):void{ var _local2:*; _local2 = _arg1.target; _local2.stop(); _local2.removeEventListener(TimerEvent.TIMER_COMPLETE, onJumpBoostComplete); jumpMultiplier = 1; } public function doGiblets():void{ var _local1:*; playSound("flesh"); _local1 = new Giblets(timeline, this); debug(((("adding giblets: " + this) + " , zpos = ") + zpos)); _local1.addEventListener("onComplete", onGibletsComplete); } public function get health():int{ return (_health); } public function removeSpriteSheet():void{ var _local1:*; if (!spriteSheet){ return; }; _local1 = clip.gfx; _local1.removeChild(spriteSheet); spriteSheet.destroy(); spriteSheet = null; } public function selectWeapon(_arg1:Number):void{ if (_currWeaponID != _arg1){ if (!_inventory[_arg1]){ return; }; releaseTrigger(); _currWeaponID = _arg1; if (_currWeapon){ _currWeapon.destroy(); }; _currWeapon = _inventory[_currWeaponID]; _currWeapon.arm(); }; } public function get weaponPos():Object{ return (_weaponPos); } private function endInvinciblityTimer(_arg1:TimerEvent):void{ invincibiltyTimer.stop(); invincible = false; clip.alpha = 1; } public function die():void{ resetEnhancements(); releaseTrigger(); active = false; setView("death"); doGiblets(); removeAllWeapons(); setVisible(false); } private function reIndexWeapons():void{ var _local1:uint; _local1 = 0; while (_local1 < _inventory.length) { if (_currWeapon == _inventory[_local1]){ _currWeaponID = _local1; }; _local1++; }; } public function set health(_arg1:int):void{ _health = Math.min(_arg1, maxHealth); } public function footStep(_arg1:Number):void{ var _local2:*; var _local3:*; var _local4:*; if (ypos == ground){ if ((((hSpeed > 1)) || ((stepy < -1)))){ _local2 = 2; _local3 = 8; _local4 = 18; stepDist++; _stepx = (Math.cos((stepDist / _local2)) * _local3); _stepy = Math.abs((Math.sin((stepDist / _local2)) * _local4)); }; }; } public function get currWeaponID():int{ return (_currWeaponID); } public function get alive():Boolean{ return ((health > 0)); } public function removeCurrentWeapon():void{ removeWeapon(_currWeaponID); _currWeaponID = -1; _currWeapon = null; } public function removeAllWeapons():void{ var _local1:uint; if (_inventory){ _local1 = 0; while (_local1 < _inventory.length) { removeWeapon(_local1); _local1++; }; _inventory = []; _currWeaponID = -1; _currWeapon = null; }; } public function get currWeapon():Weapon{ return (_currWeapon); } public function laugh():void{ playSound("laugh1"); } public function initSpawnAnim():void{ var _local1:*; var _local2:*; removeCurrentRespawnProcess(); playSound("spawn_sound"); if (gameOptions.effectsLevel > 0){ tweenEffects.flicker(clip, 30, 0.3, 0.7); }; invincibility(3000); _local1 = ((this is LocalPlayer)) ? (d / 4) : -1; _local2 = ((this is LocalPlayer)) ? 2 : 1; spawnAnimation = new SpawnAnimation(timeline, xpos, ypos, (zpos + _local1)); spawnAnimation.scaleMultiplier = _local2; active = true; } public function selectNextBestWeapon():void{ var _local1:*; _local1 = (_inventory.length - 1); selectWeapon(_local1); } public function updateView(_arg1:Number, _arg2:Number):void{ var _local3:*; var _local4:*; _local3 = 550; _local4 = 400; if (clip.gfx){ _weaponPos.x = (((_arg1 / _local3) * (_local3 / 4)) - _stepx); _weaponPos.y = (((_arg2 / _local4) * (_local4 / 5)) - _stepy); clip.gfx.x = _weaponPos.x; clip.gfx.y = _weaponPos.y; clip.gfx.gotoAndStop(Math.floor(((_arg1 / _local3) * clip.gfx.totalFrames))); }; } public function set currWeaponID(_arg1:int):void{ _currWeaponID = _arg1; } private function onGibletsComplete(_arg1:Event):void{ var _local2:*; _local2 = _arg1.target; _local2.removeEventListener("onComplete", onGibletsComplete); _local2.destroy(); _local2 = null; } public function get stepx():Number{ return (_stepx); } private function onSpeedBoostComplete(_arg1:TimerEvent):void{ var _local2:*; _local2 = _arg1.target; _local2.stop(); _local2.removeEventListener(TimerEvent.TIMER_COMPLETE, onSpeedBoostComplete); speedMultiplier = 1; } public function get stepy():Number{ return (_stepy); } public function get inventory():Array{ return (_inventory); } public function reloadAllWeapons():void{ var _local1:uint; _local1 = 0; while (_local1 < _inventory.length) { _inventory[_local1].quickReload(); _local1++; }; } public function spawn(_arg1=null):void{ } public function reload():void{ _currWeapon.reload(); } public function speedBoost(_arg1:Number):void{ var _local2:*; speedMultiplier = _arg1; _local2 = new Timer(10000, 1); _local2.addEventListener(TimerEvent.TIMER_COMPLETE, onSpeedBoostComplete, false, 0, true); _local2.start(); } public function pullTrigger():void{ if (((!(active)) || (!(_currWeapon)))){ return; }; _currWeapon.pullTrigger(); } public function walk():void{ var _local1:*; var _local2:*; var _local3:*; if (!active){ return; }; _local1 = Math.atan2(movez, movex); _local2 = (Math.cos(_local1) * walkSpeed_x); _local3 = (Math.sin(_local1) * walkSpeed_z); _local2 = (_local2 * speedMultiplier); _local3 = (_local3 * speedMultiplier); xSpeed = (xSpeed + _local2); zSpeed = (zSpeed + _local3); } public function resetEnhancements():void{ speedMultiplier = 1; jumpMultiplier = 1; } public function releaseTrigger(_arg1=null):void{ if (((!(active)) || (!(_currWeapon)))){ return; }; _currWeapon.releaseTrigger(); } private function removeWeapon(_arg1:Number):void{ var _local2:*; _local2 = _inventory[_arg1]; _local2.removeEventListener(CustomEvent.EVT, weaponCallback); _local2.destroy(); _inventory.splice(_arg1, 1); } public function removeCurrentRespawnProcess():void{ if (spawnDelayTimer){ spawnDelayTimer.stop(); spawnDelayTimer.removeEventListener(TimerEvent.TIMER, spawn); spawnDelayTimer = null; }; } public function get head():Point3D{ return (new Point3D(xpos, (ypos - (h / 1.5)), zpos)); } public function recoil():void{ } public function set currWeapon(_arg1:Weapon):void{ _currWeapon = _arg1; } public function get currView():String{ return (_currView); } public function initRespawn():void{ spawnDelayTimer = new Timer(5000, 1); spawnDelayTimer.addEventListener(TimerEvent.TIMER, spawn); spawnDelayTimer.start(); } public function animateSpriteSheet():void{ var _local1:*; var _local2:*; var _local3:*; var _local4:*; var _local5:*; _local1 = clip.gfx; _local2 = (xpos - oldx); _local3 = (zpos - oldz); _local4 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3))); if (!spriteSheet){ spriteSheet = new characterWalkAnim(); } else { _local5 = 8; if ((((spriteSheet is CharacterStrafeAnim)) && ((Math.abs(_local2) < _local5)))){ removeSpriteSheet(); spriteSheet = new characterWalkAnim(); } else { if ((((spriteSheet is CharacterWalkAnim)) && ((Math.abs(_local2) > _local5)))){ removeSpriteSheet(); spriteSheet = new characterStrafeAnim(); }; }; }; spriteSheet.incr = ((_local4 > 10)) ? 2 : 1; spriteSheet.scaleX = (spriteSheet.scaleY = 5.3); clip.gfx.addChild(spriteSheet); spriteSheet.playMode = ((_local3 < 0)) ? "fwd" : "rev"; spriteSheet.pause = ((_local4)>2) ? false : true; oldx = xpos; oldz = zpos; } override public function destroy():void{ if (invincibiltyTimer){ invincibiltyTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, endInvinciblityTimer); invincibiltyTimer = null; }; removeCurrentRespawnProcess(); removeSpriteSheet(); removeAllWeapons(); removeSounds(); } public function scream():void{ playSound("scream1"); } } }//package uk.co.barraxworld.game.engine3D.characters
Section 60
//PlayerIdentity (uk.co.barraxworld.game.engine3D.characters.PlayerIdentity) package uk.co.barraxworld.game.engine3D.characters { import flash.display.*; import flash.text.*; import gs.*; public class PlayerIdentity extends MovieClip { public var field:TextField; public function PlayerIdentity(){ visible = false; } public function hide():void{ if (!visible){ return; }; TweenLite.killTweensOf(this); TweenLite.to(this, 0.3, {autoAlpha:0}); } public function initialise(_arg1:String):void{ field.antiAliasType = "advanced"; field.htmlText = _arg1; } public function show():void{ if (visible){ return; }; TweenLite.killTweensOf(this); TweenLite.to(this, 0.5, {autoAlpha:1}); } } }//package uk.co.barraxworld.game.engine3D.characters
Section 61
//RemotePlayer (uk.co.barraxworld.game.engine3D.characters.RemotePlayer) package uk.co.barraxworld.game.engine3D.characters { import flash.display.*; import uk.co.barraxworld.utils.*; import flash.events.*; import uk.co.barraxworld.multiuser.lobby.*; import uk.co.barraxworld.game.engine3D.*; import uk.co.barraxworld.game.shooter.armoury.*; import flash.utils.*; public class RemotePlayer extends Player { public var user:User; private var healthBar:OpponentHealthBar; public var skill:Number; public var startTime:int; private var serverTime:Number; private var moves:Array; public var playerIdentity:PlayerIdentity; public var id:int; private var pkt:Object; public static var players:Array; public function RemotePlayer(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number){ if (!players){ players = []; }; players.push(this); super(_arg1, "player_human", _arg2, _arg3, _arg4); } private function updatePlayerIdentity(_arg1:String=""):void{ if (_arg1.length > 0){ playerIdentity.initialise(user.name); }; playerIdentity.scaleX = (playerIdentity.scaleY = 8); playerIdentity.y = (playerIdentity.y - h); playerIdentity.hide(); } public function addMove(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{ if (!alive){ return; }; if (!moves){ moves = []; }; moves.push({type:_arg1, pos:new Point3D(_arg2, _arg3, _arg4), vel:new Velocity3D(_arg5, _arg6, _arg7), time:_arg8}); } override public function selectWeapon(_arg1:Number):void{ currWeapon = inventory[_arg1]; } override public function die():void{ active = false; removeSpriteSheet(); playerIdentity.hide(); setVisible(false); doGiblets(); doBlood(); } public function updateHealthStatus():void{ if (!healthBar){ if (!playerIdentity){ return; }; healthBar = new opponentHealthBar(); healthBar.max = maxHealth; playerIdentity.addChild(healthBar); }; healthBar.value = health; } public function removeMyUserInstance():void{ var id:*; try { id = user.id; User.remove(id); user = null; } catch(e:Error) { }; } public function moveByTime(_arg1:Number):void{ if (!active){ return; }; serverTime = _arg1; updateWaypoint(); updateSplinePosition(); animateSpriteSheet(); } public function updateSplinePosition():void{ var _local1:*; if (!pkt){ return; }; _local1 = serverTime; xpos = Spline.getCubicPosition(pkt.pos.xpos, (pkt.vel.xSpeed / 1000), pkt.time, xpos, (xSpeed / 1000), _local1, 90, 100).pos; ypos = Spline.getCubicPosition(pkt.pos.ypos, (pkt.vel.ySpeed / 1000), pkt.time, ypos, (ySpeed / 1000), _local1, 78, 90).pos; zpos = Spline.getCubicPosition(pkt.pos.zpos, (pkt.vel.zSpeed / 1000), pkt.time, zpos, (zSpeed / 1000), _local1, 90, 100).pos; } public function assignUser(_arg1:String):void{ if (_arg1 == "BOT"){ user = new User(); user.name = "BOT - ULTRAKILLER"; user.id = (int((Math.random() * 100)) + ""); user.country = "GB"; user.rank = 1337; } else { user = User.getByID(_arg1); }; if (!playerIdentity){ playerIdentity = new PlayerIdentity(); updatePlayerIdentity(user.name); clip.addChild(playerIdentity); }; } override public function spawn(_arg1=null):void{ var evt = _arg1; pkt = null; moves = []; health = maxHealth; updateHealthStatus(); xpos = (oldx = spawnPoint.xpos); ypos = spawnPoint.ypos; zpos = (oldz = spawnPoint.zpos); hasSpawned = true; animateSpriteSheet(); initSpawnAnim(); try { playerIdentity.show(); } catch(e:Error) { }; } private function trimMoves():void{ var _local1:uint; _local1 = 0; while (_local1 < moves.length) { if (moves[_local1].type != "a1"){ moves.splice(_local1, 1); }; _local1++; }; } private function updateWaypoint():void{ if (!moves){ return; }; if (moves.length > 0){ pkt = moves.shift(); if (moves.length > 1){ trimMoves(); }; }; } public static function initialiseClass():void{ players = []; } } }//package uk.co.barraxworld.game.engine3D.characters
Section 62
//Blood (uk.co.barraxworld.game.engine3D.effects.Blood) package uk.co.barraxworld.game.engine3D.effects { import flash.display.*; import uk.co.barraxworld.game.gfx.*; public class Blood extends SpriteSheet { public var sheet:MovieClip; public function Blood(){ var _local1:*; var _local2:*; _local1 = 48; _local2 = 30; super(_local2, _local1); } } }//package uk.co.barraxworld.game.engine3D.effects
Section 63
//Blood3D (uk.co.barraxworld.game.engine3D.effects.Blood3D) package uk.co.barraxworld.game.engine3D.effects { import flash.display.*; public class Blood3D extends ParticleEffect { public function Blood3D(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number){ super(_arg1, "blood", _arg2, _arg3, _arg4); registerMovableObject(this); mass = -2; useBounds = false; } } }//package uk.co.barraxworld.game.engine3D.effects
Section 64
//Explosion (uk.co.barraxworld.game.engine3D.effects.Explosion) package uk.co.barraxworld.game.engine3D.effects { import flash.display.*; import uk.co.barraxworld.game.gfx.*; public class Explosion extends SpriteSheet { public var sheet:MovieClip; public function Explosion(){ var _local1:*; var _local2:*; _local1 = 48; _local2 = 18; super(_local2, _local1); } } }//package uk.co.barraxworld.game.engine3D.effects
Section 65
//Explosion3D (uk.co.barraxworld.game.engine3D.effects.Explosion3D) package uk.co.barraxworld.game.engine3D.effects { import flash.display.*; public class Explosion3D extends ParticleEffect { public function Explosion3D(_arg1:MovieClip, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number){ super(_arg1, _arg2, _arg4, _arg5, _arg6); this.scaleMultiplier = _arg3; playSound("explosionSound"); registerMovableObject(this); mass = -3.5; useBounds = false; } } }//package uk.co.barraxworld.game.engine3D.effects
Section 66
//Flies (uk.co.barraxworld.game.engine3D.effects.Flies) package uk.co.barraxworld.game.engine3D.effects { import flash.display.*; import flash.events.*; import uk.co.barraxworld.game.engine3D.*; import flash.utils.*; public class Flies extends Object3D { private var timer:Timer; private var duration:int;// = 8000 public function Flies(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number){ duration = 8000; super(_arg1, "fliesAnim", _arg2, _arg3, _arg4); initialise(); } override public function destroy():void{ timer.removeEventListener(TimerEvent.TIMER_COMPLETE, timerHandler); timer = null; removeSounds(); } private function initialise():void{ playSound("flies", 5, (Math.random() * 2), 0.6); timer = new Timer(duration, 1); timer.addEventListener(TimerEvent.TIMER_COMPLETE, timerHandler); timer.start(); } private function timerHandler(_arg1:TimerEvent):void{ removeMe = true; } } }//package uk.co.barraxworld.game.engine3D.effects
Section 67
//Giblets (uk.co.barraxworld.game.engine3D.effects.Giblets) package uk.co.barraxworld.game.engine3D.effects { import flash.display.*; import flash.events.*; import uk.co.barraxworld.game.engine3D.*; import flash.utils.*; public class Giblets extends ParticleFountain { private var timer:Timer; private var timeline:MovieClip; private var flysAnim:Object3D; private var arr:Array; private var num:int;// = 10 public function Giblets(_arg1:MovieClip, _arg2:Object3D){ var _local3:uint; var _local4:MovableObject3D; num = 10; super(); timeline = _arg1; arr = []; xpos = _arg2.xpos; ypos = _arg2.ypos; zpos = _arg2.zpos; _local3 = 0; while (_local3 < num) { _local4 = new MovableObject3D(timeline, "giblet", xpos, ypos, zpos); _local4.reboundSoundRef = ("reboundMeat" + randRange(0, 3)); _local4.allowRebound = true; _local4.useBounds = false; _local4.mass = (6 + (Math.random() * 6)); Object3D.registerMovableObject(_local4); _local4.clip.gotoAndStop(Math.ceil((Math.random() * _local4.clip.totalFrames))); arr.push(_local4); addItem(_local4); _local3++; }; triggerAnimation(); timer = new Timer(8000, 1); timer.addEventListener(TimerEvent.TIMER_COMPLETE, initRemove); timer.start(); } private function onComplete(_arg1:TimerEvent):void{ dispatchEvent(new Event("onComplete")); } public function destroy():void{ timer.stop(); timer.removeEventListener(TimerEvent.TIMER_COMPLETE, initRemove); timer.removeEventListener(TimerEvent.TIMER, animateRemove); timer.removeEventListener(TimerEvent.TIMER_COMPLETE, onComplete); timer = null; removeAllItems(); } private function initRemove(_arg1:TimerEvent):void{ var _local2:uint; var _local3:MovableObject3D; timer.removeEventListener(TimerEvent.TIMER_COMPLETE, initRemove); _local2 = 0; while (_local2 < arr.length) { _local3 = arr[_local2]; Object3D.unregisterMovableObject(_local3); _local2++; }; timer = new Timer(32, 10); timer.addEventListener(TimerEvent.TIMER, animateRemove); timer.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete); timer.start(); } private function animateRemove(_arg1:TimerEvent):void{ var _local2:uint; var _local3:MovableObject3D; _local2 = 0; while (_local2 < arr.length) { _local3 = arr[_local2]; _local3.ypos = (_local3.ypos + 8); _local2++; }; } } }//package uk.co.barraxworld.game.engine3D.effects
Section 68
//ParticleEffect (uk.co.barraxworld.game.engine3D.effects.ParticleEffect) package uk.co.barraxworld.game.engine3D.effects { import flash.display.*; import flash.events.*; import uk.co.barraxworld.game.engine3D.*; public class ParticleEffect extends MovableObject3D { public function ParticleEffect(_arg1:MovieClip, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number){ super(_arg1, _arg2, _arg3, _arg4, _arg5); clip.addEventListener("onComplete", remove, false, 0, true); } private function remove(_arg1:Event):void{ if (registeredAsMovable){ unregisterMovableObject(this); }; removeMe = true; } } }//package uk.co.barraxworld.game.engine3D.effects
Section 69
//ParticleFountain (uk.co.barraxworld.game.engine3D.effects.ParticleFountain) package uk.co.barraxworld.game.engine3D.effects { import uk.co.barraxworld.game.engine3D.*; public class ParticleFountain extends Particles3D { public var ySpeed:Number;// = -120 public var zRange:Number;// = 10 public var xRange:Number;// = 20 public function ParticleFountain(){ xRange = 20; zRange = 10; ySpeed = -120; super(); } public function triggerAnimation():void{ var _local1:uint; _local1 = 0; while (_local1 < list.length) { list[_local1].xSpeed = (-(xRange) + (Math.random() * (xRange * 2))); list[_local1].zSpeed = (-(zRange) + (Math.random() * (zRange * 2))); list[_local1].ySpeed = (ySpeed - (Math.random() * 10)); _local1++; }; } } }//package uk.co.barraxworld.game.engine3D.effects
Section 70
//SmokeTrail (uk.co.barraxworld.game.engine3D.effects.SmokeTrail) package uk.co.barraxworld.game.engine3D.effects { import flash.display.*; import uk.co.barraxworld.game.gfx.*; public class SmokeTrail extends SpriteSheet { public var sheet:MovieClip; public function SmokeTrail(){ var _local1:*; var _local2:*; _local1 = 48; _local2 = 18; super(_local2, _local1); } } }//package uk.co.barraxworld.game.engine3D.effects
Section 71
//SpawnAnimation (uk.co.barraxworld.game.engine3D.effects.SpawnAnimation) package uk.co.barraxworld.game.engine3D.effects { import flash.display.*; import flash.events.*; import uk.co.barraxworld.game.engine3D.*; import flash.utils.*; public class SpawnAnimation extends Object3D { private var timer:Timer; public function SpawnAnimation(_arg1:MovieClip, _arg2, _arg3, _arg4){ super(_arg1, "spawn_mc", _arg2, _arg3, _arg4); initialise(); } override public function destroy():void{ timer.removeEventListener(TimerEvent.TIMER, checkComplete); timer = null; removeSounds(); } private function initialise():void{ timer = new Timer(32); timer.addEventListener(TimerEvent.TIMER, checkComplete); timer.start(); } private function checkComplete(_arg1:TimerEvent):void{ if (clip.currentFrame >= clip.totalFrames){ clip.stop(); removeMe = true; }; } } }//package uk.co.barraxworld.game.engine3D.effects
Section 72
//Trail3D (uk.co.barraxworld.game.engine3D.effects.Trail3D) package uk.co.barraxworld.game.engine3D.effects { import flash.display.*; public class Trail3D extends ParticleEffect { public function Trail3D(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number){ super(_arg1, "trail", _arg2, _arg3, _arg4); scaleMultiplier = 6; registerMovableObject(this); mass = -4; useBounds = false; } } }//package uk.co.barraxworld.game.engine3D.effects
Section 73
//StaticBox3D (uk.co.barraxworld.game.engine3D.structures.StaticBox3D) package uk.co.barraxworld.game.engine3D.structures { import flash.display.*; import uk.co.barraxworld.game.engine3D.*; import flash.geom.*; import uk.co.barraxworld.effects.*; import uk.co.barraxworld.loaders.*; public class StaticBox3D extends Object3D { private var bitmapList:BitmapList; private var initialised:Boolean;// = false private var get3DPosition:Function; private var utils3D:Utils3D; private var faceSide:Face3D; private var faceFront:TiledFill; private var faceTop:Face3D; public function StaticBox3D(_arg1:MovieClip, _arg2:String, _arg3:String, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number=0, _arg8:Number=0, _arg9:Number=0){ var _local10:*; var _local11:*; var _local12:Matrix; var _local13:*; var _local14:*; var _local15:*; var _local16:*; var _local17:*; initialised = false; bitmapList = BitmapList.getInstance(); super(_arg1, "blank", _arg4, _arg5, _arg6, _arg7, _arg8, _arg9); get3DPosition = Utils3D.getInstance().get3DPosition; _local10 = 1200; _local11 = ((zpos < _local10)) ? 1 : 0; faceSide = new Face3D(clip, (_arg2 + "_lo"), _local11); faceTop = new Face3D(clip, _arg3, 0); _local12 = new Matrix(); _local13 = 2.5; _local14 = 128; _local15 = ((((zpos > _local10)) || ((gameOptions.effectsLevel == 0)))) ? bitmapList.getAsset((_arg2 + "_lo"), "GAME") : bitmapList.getAsset((_arg2 + "_hi"), "GAME"); _local16 = ((_local14 / _local15.width) * _local13); _local17 = (_arg8 / _local15.height); _local12.scale(_local16, _local17); faceFront = new TiledFill(_local15.bitmapData, _local12, _arg7, _arg8); faceFront.width = (faceFront.width + 4); faceFront.x = (-(faceFront.width) / 2); faceFront.y = -(_arg8); clip.addChild(faceFront); mass = -1; addObstacle(this); } private function gtl(_arg1:Object):Object{ return ({x:((_arg1.x - clip.x) / clip.scaleX), y:((_arg1.y - clip.y) / clip.scaleY)}); } public function applyPerspective(_arg1:Camera3D){ var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; var _local8:*; var _local9:*; var _local10:*; var _local11:*; var _local12:*; if (((((clip.visible) && (_arg1.isMoving))) || (!(initialised)))){ initialised = true; _local2 = ((xpos > -(_arg1.xpos))) ? (-(w) / 2) : (w / 2); _local3 = (ypos - h); _local4 = {x:_local2, y:_local3}; if (_local4.x > 0){ faceSide.tint("right"); faceSide.visible = (-(_arg1.xpos) > (xpos + (w / 2))); } else { faceSide.tint("left"); faceSide.visible = (-(_arg1.xpos) < (xpos - (w / 2))); }; if (faceSide.visible){ _local5 = gtl(get3DPosition((xpos + _local4.x), (ypos - h), zpos)); _local6 = gtl(get3DPosition((xpos + _local4.x), (ypos - h), (zpos + (d / 4)))); _local7 = gtl(get3DPosition((xpos + _local4.x), ypos, (zpos + (d / 4)))); _local8 = gtl(get3DPosition((xpos + _local4.x), ypos, zpos)); faceSide.setTransform(_local5.x, _local5.y, _local6.x, _local6.y, _local7.x, _local7.y, _local8.x, _local8.y); }; _local4 = ((ypos)>-(_arg1.ypos)) ? {x:(-(w) / 2), y:-(h)} : {x:(-(w) / 2), y:0}; if (_local4.y == -(h)){ faceTop.tint("top"); faceTop.visible = ((ypos - h) > (-(_arg1.ypos) - d)); } else { faceTop.tint("bottom"); faceTop.visible = (ypos < (-(_arg1.ypos) - (d / 2))); }; if (faceTop.visible){ _local9 = gtl(get3DPosition((xpos + _local4.x), (ypos + _local4.y), zpos)); _local10 = gtl(get3DPosition((xpos + _local4.x), (ypos + _local4.y), (zpos + (d / 4)))); _local11 = gtl(get3DPosition(((xpos + _local4.x) + w), (ypos + _local4.y), (zpos + (d / 4)))); _local12 = gtl(get3DPosition(((xpos + _local4.x) + w), (ypos + _local4.y), zpos)); faceTop.setTransform(_local9.x, _local9.y, _local10.x, _local10.y, _local11.x, _local11.y, _local12.x, _local12.y); }; }; } override public function destroy():void{ clip.removeChild(faceFront); faceTop.destroy(); faceSide.destroy(); faceFront.destroy(); faceTop = null; faceSide = null; faceFront = null; } } }//package uk.co.barraxworld.game.engine3D.structures
Section 74
//Wall3D (uk.co.barraxworld.game.engine3D.structures.Wall3D) package uk.co.barraxworld.game.engine3D.structures { import flash.display.*; public class Wall3D extends StaticBox3D { public function Wall3D(_arg1:MovieClip, _arg2:String, _arg3:String, _arg4:Number=0, _arg5:Number=0, _arg6:Number=0, _arg7:Number=250, _arg8:Number=250, _arg9:Number=250){ super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9); } } }//package uk.co.barraxworld.game.engine3D.structures
Section 75
//Bullet (uk.co.barraxworld.game.engine3D.Bullet) package uk.co.barraxworld.game.engine3D { import flash.display.*; import uk.co.barraxworld.game.engine3D.characters.*; public class Bullet extends PropelledProjectile { public function Bullet(_arg1:MovieClip, _arg2:Number, _arg3:Player, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{ super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9); } } }//package uk.co.barraxworld.game.engine3D
Section 76
//Camera3D (uk.co.barraxworld.game.engine3D.Camera3D) package uk.co.barraxworld.game.engine3D { import uk.co.barraxworld.game.engine3D.characters.*; import uk.co.barraxworld.game.cursors.*; public class Camera3D extends Point3D { private var origin:Point3D; private var _shiftx:Number;// = 0 private var _shifty:Number;// = 0 private var _shiftz:Number;// = 0 private var _isMoving:Boolean; public function Camera3D(_arg1:Point3D, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ _shiftx = 0; _shifty = 0; _shiftz = 0; super(_arg2, _arg3, _arg4); origin = _arg1; } public function goOverview():void{ pointTo(0, -5000, -1200, 0); } public function goThirdPerson(_arg1:Player):void{ _shiftx = -50; _shifty = -150; _shiftz = -200; pointTo((_arg1.xpos + _shiftx), (_arg1.ypos + _shifty), (_arg1.zpos + _shiftz), 0); } public function get isMoving():Boolean{ return (_isMoving); } public function goFirstPerson(_arg1:Player, _arg2:StandardCrosshair, _arg3:Number=1):void{ var _local4:*; var _local5:*; _local4 = 0; _local5 = 0; _shiftx = (_local4 + _arg1.stepx); _shifty = (_local5 + _arg1.stepy); _shiftz = 10; pointTo((_arg1.xpos + _shiftx), (_arg1.ypos + _shifty), (_arg1.zpos + _shiftz), 0, _arg3); } private function pointTo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0, _arg5:Number=5):void{ var _local6:*; var _local7:*; var _local8:*; var _local9:*; _local6 = (-(_arg1) - xpos); _local7 = (-(_arg2) - ypos); _local8 = ((_arg3 - _arg4) - zpos); _local9 = Math.sqrt((((_local6 * _local6) + (_local7 * _local7)) + (_local8 * _local8))); if (_local9 > 0.5){ xpos = (xpos - ((xpos - -(_arg1)) / _arg5)); ypos = (ypos - ((ypos - -(_arg2)) / _arg5)); zpos = (zpos - ((zpos - (_arg3 - _arg4)) / _arg5)); _isMoving = true; } else { xpos = -(_arg1); ypos = -(_arg2); zpos = (_arg3 - _arg4); _isMoving = false; }; if (zpos < 0){ zpos = 0; }; } public function get shiftx():Number{ return (_shiftx); } public function get shifty():Number{ return (_shifty); } public function get shiftz():Number{ return (_shiftz); } public function goZoomed(_arg1:Player):void{ _shiftx = (_shifty = (_shiftz = 0)); pointTo((_arg1.xpos + _shiftx), (_arg1.ypos + _shifty), (_arg1.zpos + _shiftz), 0, 1); } public function goDeathCam(_arg1:Player, _arg2):void{ _shiftx = 0; _shiftz = -300; pointTo((_arg1.xpos + _shiftx), 0, (_arg1.zpos + _shiftz)); } public function set shiftx(_arg1:Number):void{ _shiftx = _arg1; } public function set shifty(_arg1:Number):void{ _shifty = _arg1; } public function set shiftz(_arg1:Number):void{ _shiftz = _arg1; } } }//package uk.co.barraxworld.game.engine3D
Section 77
//CrosshairProxy3D (uk.co.barraxworld.game.engine3D.CrosshairProxy3D) package uk.co.barraxworld.game.engine3D { import flash.geom.*; import uk.co.barraxworld.game.engine3D.characters.*; public class CrosshairProxy3D { private var sw:Number; private var targetObject3D:Object3D; private var floorArray:Array; private var sh:Number; private var _zpos; private var _ypos; private var _xpos; public function CrosshairProxy3D(_arg1:Array, _arg2:Number, _arg3:Number){ floorArray = _arg1; sw = _arg2; sh = _arg3; } public function getAngle(_arg1:Number, _arg2:Number):Object{ var _local3:*; var _local4:*; _local3 = int((((_arg1 - (sw / 2)) / sw) * 140)); _local4 = int((((_arg2 - sh) / sh) * 90)); return ({xpos:_local3, ypos:_local4, zpos:null}); } public function getPosition(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Boolean=false):Object{ var _local5:Array; var _local6:Object; var _local7:*; var _local8:Point; var _local9:Number; var _local10:Function; var _local11:Function; var _local12:*; var _local13:*; var _local14:*; var _local15:*; var _local16:*; var _local17:*; _local5 = (_arg4) ? Object3D.staticObstacles.concat(Object3D.movableObstacles).concat(RemotePlayer.players) : Object3D.staticObstacles.concat(Object3D.movableObstacles); _local5.sortOn("zpos", Array.NUMERIC); _local6 = {}; _local7 = (targetObject3D = _local5[(_local5.length - 1)]); _local8 = new Point(_arg2, _arg3); _local6.z = _local7.zpos; _local9 = 0; if (_local5.length > 0){ do { } while (!((((_local5[_local9].zpos > _arg1)) && (_local5[_local9].clip.visible)))); }; if (_local7 == _local5[(_local5.length - 1)]){ _local9 = 0; do { _local16 = floorArray[_local9].clip.y; _local17 = 100; } while (!((((_arg3 > _local16)) && ((_arg3 < (_local16 + _local17)))))); }; _local10 = _local7.clip.globalToLocal; _local11 = Math.min; _local6.x = (_local7.clip.globalToLocal(_local8).x + _local7.xpos); _local6.y = (_local10(_local8).y + _local7.ypos); return ({xpos:int(_local6.x), ypos:int(_local6.y), zpos:int(_local6.z), targetObject3D:targetObject3D}); } } }//package uk.co.barraxworld.game.engine3D
Section 78
//Face3D (uk.co.barraxworld.game.engine3D.Face3D) package uk.co.barraxworld.game.engine3D { import flash.display.*; import flash.geom.*; import sandy.util.*; import uk.co.barraxworld.loaders.*; import flash.utils.*; public class Face3D { private var container:Sprite; private var di:DistortImage; private var currTint:String; private var clip:MovieClip; private var texture; private var facets:int; private var bitmapRef:Class; private var bitmapList:BitmapList; private var textureRef:String; public function Face3D(_arg1:MovieClip, _arg2:String, _arg3:int=0){ facets = _arg3; clip = _arg1; textureRef = _arg2; bitmapList = BitmapList.getInstance(); initialise(); } public function setAlpha(_arg1:Number):void{ container.alpha = _arg1; } public function setTransform(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{ di.setTransform(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8); } public function set visible(_arg1):void{ container.visible = _arg1; } public function get visible():Boolean{ return (container.visible); } private function initialise():void{ var bmp:Bitmap; try { bmp = bitmapList.getAsset(textureRef, "GAME"); } catch(e:ReferenceError) { bitmapRef = (getDefinitionByName(textureRef) as Class); bmp = new Bitmap(); bmp.bitmapData = new bitmapRef(0, 0); }; container = new Sprite(); clip.addChild(container); di = new DistortImage(); di.target = bmp; di.smooth = false; di.container = container; di.texture = bmp.bitmapData; di.initialize(facets, facets); } public function destroy():void{ di.destroy(); di = null; clip.removeChild(container); container = null; } public function tint(_arg1:String):void{ if (currTint != _arg1){ currTint = _arg1; switch (currTint){ case "top": container.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 30, 30, 30, 0); break; case "left": container.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 40, 40, 40, 0); break; case "right": container.transform.colorTransform = new ColorTransform(1, 1, 1, 1, -40, -40, -40, 0); break; case "bottom": container.transform.colorTransform = new ColorTransform(1, 1, 1, 1, -30, -30, -30, 0); break; }; }; } } }//package uk.co.barraxworld.game.engine3D
Section 79
//Grenade (uk.co.barraxworld.game.engine3D.Grenade) package uk.co.barraxworld.game.engine3D { import flash.display.*; import flash.events.*; import uk.co.barraxworld.game.engine3D.characters.*; import flash.utils.*; public class Grenade extends Projectile3D { private var debugCount:int;// = 0 private var timer:Timer; public function Grenade(_arg1:MovieClip, _arg2:Number, _arg3:Player, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{ debugCount = 0; super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6); xSpeed = _arg7; ySpeed = _arg8; zSpeed = ammoObj.speed; if (zDir == -1){ zpos = (zpos + (sourceObject3D.d + d)); zSpeed = (zSpeed * -1); }; clip.visible = false; allowRebound = true; reboundSoundRef = "reboundMetal"; useBounds = false; mass = 2; timer = new Timer(ammoObj.detonationTime, 1); timer.addEventListener(TimerEvent.TIMER_COMPLETE, detonate, false, 0, true); timer.start(); } private function detonate(_arg1:TimerEvent):void{ destx = xpos; desty = ypos; destz = zpos; onDestinationReached(); } override public function move():void{ show(); applyFriction(); updatePosition(); applyBounds(); applyGravity(); renderPosition(); zpos = Math.min(maxzDepth, zpos); if (rebounds > 1){ clip.gotoAndStop(1); if ((moveCount % 8) == 0){ addTrail(); }; } else { if (((((moveCount % 4) == 0)) && (ammoObj.trail))){ debugCount++; addTrail(); }; }; moveCount++; } override public function destroy():void{ timer.stop(); timer.removeEventListener(TimerEvent.TIMER_COMPLETE, detonate); timer = null; removeSounds(); timeline.removeChild(clip); } } }//package uk.co.barraxworld.game.engine3D
Section 80
//MovableObject3D (uk.co.barraxworld.game.engine3D.MovableObject3D) package uk.co.barraxworld.game.engine3D { import flash.display.*; import uk.co.barraxworld.game.engine3D.characters.*; public class MovableObject3D extends Object3D { private var _ySpeed:Number;// = 0 public var obstacleHit:Object3D; private var _ground:Number;// = 0 public var rebounds:int;// = 0 public var bounds:Object; public var active:Boolean;// = true private var _zSpeed:Number;// = 0 public var useBounds:Boolean;// = true private var oldx:Number;// = 0 private var oldy:Number;// = 0 private var oldz:Number;// = 0 public var reboundSoundRef:String; private var _isMoving:Boolean; public var useFriction:Boolean;// = true public var allowRebound:Boolean;// = false private var _xSpeed:Number;// = 0 private var _anchor:Boolean; public var travelDist:uint;// = 0 public static var moveBounds1:Object; public static var moveBounds2:Object; public static var maxzDepth:Number; public static var gravity:Number = 3; public function MovableObject3D(_arg1:MovieClip, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number=0, _arg7:Number=0, _arg8:Number=0){ allowRebound = false; rebounds = 0; bounds = moveBounds1; useBounds = true; useFriction = true; oldx = 0; oldy = 0; oldz = 0; _xSpeed = 0; _ySpeed = 0; _zSpeed = 0; _ground = 0; travelDist = 0; active = true; super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8); oldx = xpos; oldz = zpos; } public function get isMoving():Boolean{ return (((((!((xSpeed == 0))) || (!((ySpeed == 0))))) || (!((zSpeed == 0))))); } public function set isMoving(_arg1:Boolean):void{ _isMoving = _arg1; } public function checkObstacleHit(_arg1:Number, _arg2:Number, _arg3:Number):Object3D{ var _local4:Array; var _local5:uint; var _local6:*; _local4 = Object3D.staticObstacles.concat(Object3D.pickups); _local5 = 0; do { _local6 = _local4[_local5]; if (_local6 != this){ if ((back + _arg3) > _local6.front){ if ((front + _arg3) < _local6.back){ if ((left + _arg1) < _local6.right){ if ((right + _arg1) > _local6.left){ if ((top + _arg2) < _local6.bottom){ if ((bottom + _arg2) > _local6.top){ if (_local6.collectable){ _local6.collect(); } else { return (_local6); }; }; }; }; }; }; }; }; ++_local5; } while (_local5 < _local4.length); return (null); } public function applyFriction():void{ if (useFriction){ if ((this is Player)){ xSpeed = (xSpeed * ((gravity + mass) / 10)); zSpeed = (zSpeed * ((gravity + mass) / 10)); } else { if (ypos >= ground){ xSpeed = (xSpeed * 0.5); zSpeed = (zSpeed * 0.5); }; }; xSpeed = (int((xSpeed * 10)) / 10); zSpeed = (int((zSpeed * 10)) / 10); }; } public function set ySpeed(_arg1:Number):void{ _ySpeed = _arg1; } public function get xSpeed():Number{ return (_xSpeed); } public function get hSpeed():Number{ return (Math.abs(((_zSpeed + _xSpeed) / 2))); } public function get anchor():Boolean{ return (_anchor); } public function renderPosition():void{ logTravelDistance(); xpos = (xpos + xSpeed); ypos = (ypos + ySpeed); zpos = (zpos + zSpeed); } public function applyGravity():void{ if ((ypos + ySpeed) < ground){ ySpeed = (ySpeed + (gravity + mass)); } else { ypos = ground; if (((allowRebound) && ((rebounds < 3)))){ if (rebounds < 5){ rebounds++; ySpeed = (ySpeed * -0.5); if (reboundSoundRef){ playSound(reboundSoundRef); }; } else { rebounds = 0; ySpeed = 0; }; } else { ySpeed = 0; }; }; } public function updatePosition():void{ var _local1:*; var _local2:*; if (checkObstacleHit(xSpeed, 0, 0)){ xSpeed = 0; } else { if (checkObstacleHit(0, 0, zSpeed)){ zSpeed = 0; }; }; _local1 = (ySpeed + 1); _local2 = checkObstacleHit(0, _local1, 0); if (_local2){ if (ySpeed > 0){ ground = _local2.top; } else { ySpeed = 0; }; } else { ground = 0; }; } public function set ground(_arg1:Number):void{ _ground = _arg1; } public function execImpact(_arg1:Velocity3D):void{ xSpeed = (xSpeed + _arg1.xSpeed); zSpeed = (zSpeed + _arg1.zSpeed); } public function get ySpeed():Number{ return (_ySpeed); } public function set xSpeed(_arg1:Number):void{ _xSpeed = _arg1; } public function set anchor(_arg1:Boolean){ _anchor = true; } public function get ground():Number{ return (_ground); } public function applyBounds():void{ if (useBounds){ if ((zpos + zSpeed) > bounds.zMax){ zpos = bounds.zMax; } else { if ((zpos + zSpeed) < bounds.zMin){ zpos = bounds.zMin; }; }; if ((xpos + xSpeed) > bounds.xMax){ xpos = bounds.xMax; } else { if ((xpos + xSpeed) < bounds.xMin){ xpos = bounds.xMin; }; }; }; } private function logTravelDistance():void{ travelDist = (travelDist + Math.sqrt(((xSpeed * xSpeed) + (zSpeed * zSpeed)))); } public function move():void{ applyFriction(); updatePosition(); applyBounds(); applyGravity(); renderPosition(); } public function set zSpeed(_arg1:Number):void{ _zSpeed = _arg1; } public function get zSpeed():Number{ return (_zSpeed); } } }//package uk.co.barraxworld.game.engine3D
Section 81
//Object3D (uk.co.barraxworld.game.engine3D.Object3D) package uk.co.barraxworld.game.engine3D { import uk.co.barraxworld.game.config.*; import flash.display.*; import uk.co.barraxworld.utils.*; import uk.co.barraxworld.game.engine3D.structures.*; import uk.co.barraxworld.game.engine3D.characters.*; import uk.co.barraxworld.effects.*; import flash.net.*; import uk.co.barraxworld.sound.*; import flash.utils.*; import flash.filters.*; public class Object3D extends MovieClip { private var _ypos:int; private var _hitx:int; private var _hity:int; private var _hitz:int; private var _clip:MovieClip; public var timeline:MovieClip; private var _isVisible:Boolean; private var _scaleRatio:Number; private var _zpos:int; public var scaleMultiplier:Number;// = 1 private var myFilters:Array; private var soundObject:SoundObject; public var removeMe:Boolean;// = false public var registeredAsMovable:Boolean; private var debugConsole:DebugConsole; public var collectable:Boolean; private var _weight:Number;// = 3 public var renderx:int; public var renderz:int; public var rendery:int; public var applyDepthOfField:Boolean;// = true private var _xpos:int; public var _mass:Number;// = 1 private var _d:Number; private var _h:Number; private var _w:Number; public static var movableObjects:Array; public static var gameOptions:GameOptions; public static var tweenEffects:TweenEffects; public static var items3D:Array; public static var wallAlpha:Boolean = false; public static var staticObstacles:Array; public static var pickups:Array; public static var movableObstacles:Array; public static var globalID:uint = 0; public function Object3D(_arg1:MovieClip, _arg2, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number=0, _arg7:Number=0, _arg8:Number=0){ var classRef:Class; var tl = _arg1; var linkage = _arg2; var xp = _arg3; var yp = _arg4; var zp = _arg5; var w = _arg6; var h = _arg7; var d = _arg8; removeMe = false; scaleMultiplier = 1; applyDepthOfField = true; _weight = 3; _mass = 1; super(); if (!gameOptions){ gameOptions = GameOptions.getInstance(); }; if (!tweenEffects){ tweenEffects = TweenEffects.getInstance(); }; timeline = tl; if (linkage == "blank"){ _clip = new MovieClip(); } else { try { classRef = (getDefinitionByName(linkage) as Class); _clip = new (classRef); } catch(e:ReferenceError) { try { classRef = getClassByAlias(linkage); _clip = new (classRef); } catch(e:ReferenceError) { _clip = new MovieClip(); _clip.graphics.lineStyle(); _clip.graphics.beginFill(0xFF0000); _clip.graphics.drawRect(-100, -200, 200, 200); _clip.graphics.endFill(); }; }; }; timeline.addChild(_clip); _isVisible = true; _xpos = xp; _ypos = yp; _zpos = zp; _w = w; _h = h; _d = d; items3D.push(this); } public function get left():Number{ return ((xpos - (w / 2))); } public function randRange(_arg1:Number, _arg2:Number):Number{ return (NumberUtils.randRange(_arg1, _arg2)); } public function get right():Number{ return ((xpos + (w / 2))); } public function get front():Number{ return (zpos); } public function get bottom():Number{ return (ypos); } public function get bbr():Point3D{ return (new Point3D((xpos + (w / 2)), ypos, (zpos + (d / 4)))); } public function playSound(_arg1:String, _arg2:int=0, _arg3:Number=0, _arg4:Number=1):void{ if (!gameOptions.soundOn){ return; }; if (!soundObject){ soundObject = new SoundObject(this); }; soundObject.play(_arg1, _arg2, _arg3, _arg4); soundObject.setLevels(_arg4, 0); } public function get br():Point3D{ return (new Point3D((xpos + (w / 2)), ypos, zpos)); } public function get btl():Point3D{ return (new Point3D((xpos - (w / 2)), (ypos - h), (zpos + (d / 4)))); } public function debug(_arg1:String):void{ if (!debugConsole){ debugConsole = DebugConsole.getInstance(); }; debugConsole.debug(_arg1); } public function get h():Number{ return (_h); } public function get d():Number{ return (_d); } public function addDepthOfField():void{ var _local1:*; var _local2:*; var _local3:BlurFilter; if (!applyDepthOfField){ return; }; _local1 = 1.5; _local2 = (_local1 - ((clip.scaleY / 0.8) * _local1)); if (_local2 < 0.1){ clip.filters = []; } else { _local3 = new BlurFilter(_local2, _local2, 1); clip.filters = [_local3]; }; } public function set ypos(_arg1:Number):void{ _ypos = _arg1; } public function get w():Number{ return (_w); } public function get tl():Point3D{ return (new Point3D((xpos - (w / 2)), (ypos - h), zpos)); } public function set hitx(_arg1:Number):void{ _hitx = _arg1; } public function set hity(_arg1:Number):void{ _hity = _arg1; } public function get weight():Number{ return (_weight); } public function set hitz(_arg1:Number):void{ _hitz = _arg1; } public function get radius():Number{ return ((w / 2)); } public function checkEndFrame(_arg1):void{ if (clip.currentFrame >= clip.totalFrames){ clip.stop(); clip.removeEventListener("enterFrame", checkEndFrame); removeMe = true; }; } override public function set alpha(_arg1:Number):void{ _clip.alpha = _arg1; } public function get scaleRatio():Number{ return (_scaleRatio); } public function get back():Number{ return ((zpos + (d / 4))); } public function removeSounds():void{ if (!gameOptions.soundOn){ return; }; if (!soundObject){ return; }; soundObject.destroy(); soundObject = null; } public function get xpos():Number{ return (_xpos); } public function get centreFront():Point3D{ return (new Point3D(xpos, (ypos - (h / 2)), zpos)); } public function changeProperties(_arg1:Object):void{ var _local2:String; for (_local2 in _arg1) { this[_local2] = _arg1[_local2]; }; } public function get mass():Number{ return (_mass); } public function set zpos(_arg1:Number):void{ _zpos = _arg1; } public function get ypos():Number{ return (_ypos); } public function get hitx():Number{ return (_hitx); } public function get hitz():Number{ return (_hitz); } public function setSoundVolume():void{ var _local1:*; var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; if (!gameOptions.soundOn){ return; }; if (!soundObject){ return; }; if ((this is LocalPlayer)){ return; }; _local1 = 2600; _local2 = (zpos - LocalPlayer.getInstance().zpos); _local3 = Math.max(((_local1 - _local2) / _local1), 0); _local4 = 1600; _local5 = (xpos - LocalPlayer.getInstance().xpos); _local6 = Math.max(Math.min((_local5 / _local4), 1), -1); soundObject.setLevels(_local3, _local6); } public function get clip():MovieClip{ return (_clip); } public function get top():Number{ return ((ypos - h)); } override public function get alpha():Number{ return (_clip.alpha); } public function get centreBack():Point3D{ return (new Point3D(xpos, (ypos - (h / 2)), (zpos + d))); } public function get hity():Number{ return (_hity); } public function get zpos():Number{ return (_zpos); } public function setVisible(_arg1:Boolean=true):void{ if (_isVisible != _arg1){ _isVisible = _arg1; clip.visible = _arg1; }; } public function set scaleRatio(_arg1:Number):void{ _scaleRatio = _arg1; } public function set xpos(_arg1:Number):void{ _xpos = _arg1; } public function get centre():Point3D{ return (new Point3D(xpos, (ypos - (h / 2)), (zpos + (d / 2)))); } public function get isVisible():Boolean{ return (_isVisible); } public function set mass(_arg1:Number):void{ _mass = _arg1; } public function destroy():void{ removeSounds(); timeline.removeChild(_clip); _clip = null; } public static function initialiseClass():void{ items3D = new Array(); pickups = new Array(); staticObstacles = new Array(); movableObstacles = new Array(); movableObjects = new Array(); } public static function addPickup(_arg1:PickupItem):void{ pickups.push(_arg1); } public static function addObstacle(_arg1, _arg2:String="static"):void{ var _local3:Array; _local3 = ((_arg2 == "static")) ? staticObstacles : movableObstacles; _local3.push(_arg1); _local3.sortOn("zpos", Array.NUMERIC); } public static function removeAllObjects():void{ var _local1:uint; _local1 = 0; while (_local1 < items3D.length) { items3D[_local1].destroy(); items3D[_local1] = null; _local1++; }; items3D = null; } public static function removePickup(_arg1:PickupItem):void{ var _local2:uint; _local2 = 0; while (_local2 < pickups.length) { if (_arg1 == pickups[_local2]){ pickups.splice(_local2, 1); return; }; _local2++; }; } public static function registerMovableObject(_arg1):void{ _arg1.registeredAsMovable = true; movableObjects.push(_arg1); } public static function getPickup(_arg1:String):PickupItem{ var _local2:uint; _local2 = 0; while (_local2 < pickups.length) { if (pickups[_local2].hash == _arg1){ return (pickups[_local2]); }; _local2++; }; return (null); } public static function unregisterMovableObject(_arg1):void{ var _local2:uint; _local2 = 0; while (_local2 < movableObjects.length) { if (movableObjects[_local2] == _arg1){ movableObjects[_local2].registeredAsMovable = false; movableObjects.splice(_local2, 1); }; _local2++; }; } } }//package uk.co.barraxworld.game.engine3D
Section 82
//Particles3D (uk.co.barraxworld.game.engine3D.Particles3D) package uk.co.barraxworld.game.engine3D { import uk.co.barraxworld.utils.*; import flash.events.*; public class Particles3D extends EventDispatcher { public var zpos:Number; public var xpos:Number; public var list:Array; public var ypos:Number; public function Particles3D(){ list = []; } public function removeAllItems():void{ var _local1:uint; _local1 = 0; while (_local1 < list.length) { list[_local1].removeMe = true; _local1++; }; } public function addItem(_arg1:MovableObject3D):void{ list.push(_arg1); } public function randRange(_arg1:Number, _arg2:Number):Number{ return (NumberUtils.randRange(_arg1, _arg2)); } } }//package uk.co.barraxworld.game.engine3D
Section 83
//PickupItem (uk.co.barraxworld.game.engine3D.PickupItem) package uk.co.barraxworld.game.engine3D { import flash.display.*; import flash.events.*; import flash.text.*; import flash.utils.*; public class PickupItem extends MovableObject3D { public var removeMode:String; private var txtFormat:TextFormat; public var obj:Object; private var field:TextField; public var displayText:Boolean; public var hash:String; private var timer:Timer; public var type:String; public function PickupItem(_arg1:MovieClip, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Boolean){ super(_arg1, _arg2, _arg3, _arg4, _arg5, 200, 200, 200); mass = 8; Object3D.registerMovableObject(this); allowRebound = true; useBounds = false; collectable = _arg6; if (!_arg6){ zpos = (zpos + d); }; timer = new Timer(10000, 1); timer.addEventListener(TimerEvent.TIMER_COMPLETE, timeoutHandler); timer.start(); txtFormat = new TextFormat(); txtFormat.font = "BigNoodleTitling"; txtFormat.size = 12; txtFormat.color = 0xFFFFFF; } public function remove():void{ removeMode = "standard"; dispatch(); } private function timeoutHandler(_arg1:TimerEvent):void{ remove(); } private function dispatch():void{ removeTimer(); Object3D.unregisterMovableObject(this); dispatchEvent(new Event("removed")); } public function setText(_arg1:String):void{ var _local2:*; if (!displayText){ return; }; if (!field){ field = new TextField(); field.defaultTextFormat = txtFormat; field.autoSize = "center"; field.embedFonts = true; field.antiAliasType = AntiAliasType.ADVANCED; _local2 = new Sprite(); _local2.addChild(field); _local2.alpha = 0.8; clip.iconHolder.addChild(_local2); }; field.text = _arg1; field.x = -((field.width / 2)); field.y = -((field.height / 2)); } public function collect():void{ removeMode = "collected"; dispatch(); } public function removeTimer():void{ if (!timer){ return; }; timer.stop(); timer.removeEventListener(TimerEvent.TIMER_COMPLETE, timeoutHandler); timer = null; } } }//package uk.co.barraxworld.game.engine3D
Section 84
//PickupManager (uk.co.barraxworld.game.engine3D.PickupManager) package uk.co.barraxworld.game.engine3D { import flash.display.*; import uk.co.barraxworld.utils.*; import flash.events.*; import uk.co.barraxworld.game.shooter.armoury.*; import uk.co.barraxworld.game.*; import uk.co.barraxworld.game.shooter.*; public class PickupManager extends EventDispatcher { private var ypos:Number;// = -2000 public var sendString:String; private var timeline:MovieClip; private var zpos:Number; private var id:int;// = -1 private var hash:String; private var isLocal:Boolean; private var xpos:Number; private var arr; private var zone:Object; public var pickups:Array; private var types:Array; private var type:String; public var pickup:Object; public function PickupManager(_arg1:MovieClip, _arg2:Array, _arg3:Object){ pickups = []; id = -1; ypos = -2000; super(); timeline = _arg1; types = _arg2; zone = _arg3; pickups = []; } public function destroy():void{ var _local1:uint; _local1 = 0; while (_local1 < pickups.length) { pickup = pickups[_local1]; removePickup(); _local1++; }; } public function spawn(_arg1:Object=null){ var _local2:Object; if (_arg1){ type = _arg1.type; id = _arg1.id; hash = _arg1.hash; xpos = _arg1.xpos; zpos = _arg1.zpos; isLocal = false; } else { type = types[int((Math.random() * types.length))]; hash = StringUtils.hash(4); xpos = randRange(zone.xMin, zone.xMax); zpos = randRange(zone.zMin, zone.zMax); isLocal = true; }; switch (type){ case "w": arr = DynamicItinerary.weapons; break; case "p": arr = Powerups.items; break; }; if ((arr is XMLList)){ id = ((id)!=-1) ? id : randRange(0, (arr.length() - 1)); } else { id = ((id)!=-1) ? id : randRange(0, (arr.length - 1)); }; _local2 = arr[id]; exec(_local2, isLocal); } private function exec(_arg1:Object, _arg2:Boolean):void{ var _local3:PickupItem; switch (type){ case "w": _local3 = new WeaponPickup(timeline, "uk.co.barraxworld.game.shooter.WeaponPickupIcon", xpos, ypos, zpos, isLocal); break; case "p": _local3 = new PowerupPickup(timeline, "uk.co.barraxworld.game.shooter.PowerupPickupIcon", xpos, ypos, zpos, isLocal); break; }; _local3.type = type; _local3.obj = _arg1; _local3.hash = hash; _local3.displayText = _arg1.txtDisplay; _local3.clip.attachSprite(("icon_" + _local3.obj.ref), _local3.clip.iconHolder); _local3.clip.scaleSprite(2); _local3.setText(("" + _arg1.num)); _local3.addEventListener("removed", removeHandler); Object3D.addPickup(_local3); if (_arg2){ sendString = ((((((((type + ",") + id) + ",") + _local3.hash) + ",") + _local3.xpos) + ",") + _local3.zpos); dispatchEvent(new Event("onSpawn")); }; pickups.push(_local3); id = -1; } public function removeHandler(_arg1):void{ if ((_arg1 is Event)){ pickup = _arg1.target; if (pickup.removeMode == "collected"){ dispatchEvent(new Event("onCollected")); }; } else { pickup = Object3D.getPickup(_arg1.hash); }; removePickup(); } private function removePickup():void{ var _local1:uint; _local1 = 0; while (_local1 < pickups.length) { if (pickups[_local1] == pickup){ Object3D.removePickup(pickups[_local1]); pickups[_local1].removeTimer(); pickups[_local1].removeMe = true; pickups.splice(_local1, 1); pickup = null; return; }; _local1++; }; } private function randRange(_arg1:Number, _arg2:Number):Number{ return (NumberUtils.randRange(_arg1, _arg2)); } } }//package uk.co.barraxworld.game.engine3D
Section 85
//Plane3D (uk.co.barraxworld.game.engine3D.Plane3D) package uk.co.barraxworld.game.engine3D { import flash.display.*; public class Plane3D extends Object3D { private var get3DPosition:Function; private var utils3D:Utils3D; private var gtl:Function; private var face3D:Face3D; public function Plane3D(_arg1:Utils3D, _arg2:MovieClip, _arg3:String, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number=0, _arg8:Number=0, _arg9:Number=0){ super(_arg2, "blank", _arg4, _arg5, _arg6, _arg7, _arg8, _arg9); get3DPosition = _arg1.get3DPosition; gtl = clip.globalToLocal; face3D = new Face3D(clip, _arg3); if (_arg9 == 0){ face3D.setTransform((-(_arg7) / 2), -(_arg8), (_arg7 / 2), -(_arg8), (_arg7 / 2), 0, (-(_arg7) / 2), 0); }; } public function applyPerspective(_arg1:Camera3D){ } } }//package uk.co.barraxworld.game.engine3D
Section 86
//Point3D (uk.co.barraxworld.game.engine3D.Point3D) package uk.co.barraxworld.game.engine3D { public dynamic class Point3D { private var _oldx:Number;// = 0 private var _oldy:Number;// = 0 private var _oldz:Number;// = 0 public var startx:Number; public var starty:Number; public var startz:Number; private var _ypos:Number; public var rendery:int; public var renderx:int; public var renderz:int; private var _zpos:Number; private var _xpos:Number; public function Point3D(_arg1:Number, _arg2:Number, _arg3:Number){ _oldx = 0; _oldy = 0; _oldz = 0; super(); _xpos = (startx = _arg1); _ypos = (starty = _arg2); _zpos = (startz = _arg3); } public function get oldx():Number{ return (_oldx); } public function get ypos():Number{ return (_ypos); } public function set zpos(_arg1:Number):void{ _zpos = _arg1; } public function get oldy():Number{ return (_oldy); } public function get xpos():Number{ return (_xpos); } public function get zpos():Number{ return (_zpos); } public function set oldz(_arg1:Number):void{ _oldz = _arg1; } public function set oldx(_arg1:Number):void{ _oldx = _arg1; } public function set xpos(_arg1:Number):void{ _xpos = _arg1; } public function get oldz():Number{ return (_oldz); } public function set oldy(_arg1:Number):void{ _oldy = _arg1; } public function set ypos(_arg1:Number):void{ _ypos = _arg1; } } }//package uk.co.barraxworld.game.engine3D
Section 87
//PowerupPickup (uk.co.barraxworld.game.engine3D.PowerupPickup) package uk.co.barraxworld.game.engine3D { import flash.display.*; public class PowerupPickup extends PickupItem { public function PowerupPickup(_arg1:MovieClip, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Boolean){ super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6); } } }//package uk.co.barraxworld.game.engine3D
Section 88
//Projectile3D (uk.co.barraxworld.game.engine3D.Projectile3D) package uk.co.barraxworld.game.engine3D { import flash.display.*; import flash.events.*; import uk.co.barraxworld.game.shooter.armoury.*; import uk.co.barraxworld.game.engine3D.characters.*; import uk.co.barraxworld.game.engine3D.effects.*; public class Projectile3D extends MovableObject3D { public var trail:Trail3D; public var destx:Number; public var desty:Number; public var weapon:Weapon; public var destz:Number; public var localPlayer:Player; public var speed:Number; public var anchorDestz:Number; public var anchorDestx:Number; public var anchorDesty:Number; public var hitDamage:Number; public var playerHit:Player; private var id:int; public var ownerID:String; public var sourceObject3D:Player; public var ammoObj:Object; public var destinationReached:Boolean;// = false public var hitType:String; public var hitVelocity:Velocity3D; public var zDir:int; public var moveCount:Number;// = 0 public var timeOffset:Number; public var obstacles:Array; public static var NUM_PROJECTILES:int; public static var projectileId:int = 0; public function Projectile3D(_arg1:MovieClip, _arg2:Number, _arg3:Player, _arg4:Number=0, _arg5:Number=0, _arg6:Number=0){ destinationReached = false; moveCount = 0; if (!NUM_PROJECTILES){ NUM_PROJECTILES = 1; } else { NUM_PROJECTILES++; }; Object3D.registerMovableObject(this); localPlayer = LocalPlayer.getInstance(); sourceObject3D = _arg3; timeOffset = Math.min(_arg2, 6); zDir = ((sourceObject3D is LocalPlayer)) ? 1 : -1; ownerID = sourceObject3D.userID; weapon = sourceObject3D.currWeapon; ammoObj = weapon.ammoObj; super(_arg1, ammoObj.linkage, _arg4, _arg5, _arg6, ammoObj.size, ammoObj.size, (ammoObj.size / 4)); speed = 0; clip.visible = false; id = projectileId; projectileId++; playSound("gunfire_sound"); } public function solveDestination(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number):void{ var _local5:Array; var _local6:*; var _local7:*; _local5 = Object3D[(_arg1 + "Obstacles")]; obstacles = _local5.filter(inMyPath); if (zDir == -1){ obstacles.reverse(); }; _local6 = new Point3D(_arg2, _arg3, _arg4); _local7 = checkForObstacleIntersections(obstacles, _local6); if (_local7.point){ destx = _local7.point.xpos; desty = _local7.point.ypos; destz = _local7.point.zpos; return; }; if (!anchorDestx){ anchorDestx = (destx = _arg2); anchorDesty = (desty = _arg3); anchorDestz = (destz = _arg4); }; } public function detectOpponentHit(_arg1:RemotePlayer):Boolean{ var _local2:*; var _local3:*; var _local4:*; _local2 = checkForObstacleIntersections([_arg1], new Point3D(destx, desty, destz)); if (_local2.point){ _local3 = Utils3D.getDistance(_arg1, this); _local4 = (_arg1.d * 4); if (_local3 < _local4){ return (true); }; }; return (false); } public function advance():void{ var _local1:uint; _local1 = 0; while (_local1 < timeOffset) { if (destinationReached){ return; }; move(); _local1++; }; } public function checkForObstacleIntersections(_arg1:Array, _arg2:Point3D):Object{ var _local3:*; _local3 = new Point3D(xpos, ypos, zpos); return (Utils3D.checkForObstacleIntersections(_arg1, _local3, _arg2, zDir)); } public function initialise():void{ advance(); } public function getRemoteBlastDamage(_arg1:RemotePlayer):Number{ return (getBlastAmount(_arg1)); } public function getLocalBlastDamage():Number{ return (getBlastAmount(localPlayer)); } public function show():void{ if (moveCount > 0){ clip.visible = ammoObj.isViewable; }; if (destinationReached){ clip.visible = false; }; } private function getBlastAmount(_arg1:Player):Number{ var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:Number; _local2 = ammoObj.blastRadius; _local3 = Math.max((Utils3D.getVisibleDistance(_arg1.centre, this) - _arg1.radius), 0); if (zDir == 1){ _local2 = (_local2 / 10); _local3 = (_local3 * 10); }; if (_local3 < _local2){ _local4 = Object3D.staticObstacles; _local5 = checkForObstacleIntersections(_local4, _arg1.centre); if (_local5.point){ if (_local5.point.zpos != _local5.obstacle.zpos){ return (0); }; }; _local6 = (_local2 - _local3); _local7 = ((_local6 / _local2) * ammoObj.damage); return (Number(_local7)); }; return (0); } public function inMyPath(_arg1, _arg2:int, _arg3:Array):Boolean{ if (zDir == 1){ return ((_arg1.zpos > zpos)); }; return ((_arg1.zpos < zpos)); } public function detectLocalPlayerHit():Boolean{ var _local1:*; var _local2:*; var _local3:*; if ((sourceObject3D is LocalPlayer)){ return (false); }; if (destz > (localPlayer.zpos + localPlayer.d)){ return (false); }; _local1 = checkForObstacleIntersections([localPlayer], new Point3D(destx, desty, destz)); if (_local1.point){ _local2 = Utils3D.getDistance(localPlayer, this); _local3 = 250; if (_local2 < _local3){ return (true); }; }; return (false); } public function onDestinationReached(_arg1:Player=null):void{ var _local2:uint; var _local3:*; playerHit = null; if (_arg1){ playerHit = _arg1; if ((((playerHit == localPlayer)) || ((playerHit is CpuPlayer)))){ hitDamage = ammoObj.damage; }; zpos = ((zDir == 1)) ? (_arg1.zpos - 1) : _arg1.back; } else { if ((((zDir == 1)) && ((zpos > (localPlayer.zpos + 400))))){ if (RemotePlayer.players){ _local2 = 0; while (_local2 < RemotePlayer.players.length) { _local3 = RemotePlayer.players[_local2]; hitDamage = getRemoteBlastDamage(_local3); if (hitDamage > 0){ playerHit = _local3; break; }; _local2++; }; }; } else { hitDamage = getLocalBlastDamage(); playerHit = ((hitDamage > 0)) ? localPlayer : null; }; xpos = destx; ypos = desty; zpos = destz; }; Object3D.unregisterMovableObject(this); destinationReached = true; dispatchEvent(new Event("onProjectileHit")); NUM_PROJECTILES--; } override public function move():void{ } public function addTrail():void{ if ((((gameOptions.effectsLevel > 0)) && ((NUM_PROJECTILES < 5)))){ trail = new Trail3D(timeline, xpos, ypos, zpos); trail.playSound("fuseSound", 0, 0, 0.2); }; } } }//package uk.co.barraxworld.game.engine3D
Section 89
//PropelledProjectile (uk.co.barraxworld.game.engine3D.PropelledProjectile) package uk.co.barraxworld.game.engine3D { import flash.display.*; import uk.co.barraxworld.game.engine3D.characters.*; public class PropelledProjectile extends Projectile3D { public function PropelledProjectile(_arg1:MovieClip, _arg2:Number, _arg3:Player, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{ super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6); zDir = ((_arg6 < _arg9)) ? 1 : -1; solveDestination("static", _arg7, _arg8, _arg9); } override public function move():void{ var _local1:*; var _local2:*; var _local3:*; var _local4:*; var _local5:uint; show(); _local1 = (xpos - destx); _local2 = (ypos - desty); _local3 = (zpos - destz); _local4 = Math.sqrt((((_local1 * _local1) + (_local2 * _local2)) + (_local3 * _local3))); xSpeed = -(((_local1 / _local4) * speed)); ySpeed = -(((_local2 / _local4) * speed)); zSpeed = -(((_local3 / _local4) * speed)); if (_local4 > speed){ xpos = (xpos + xSpeed); ypos = (ypos + ySpeed); zpos = (zpos + zSpeed); moveCount++; if (ammoObj.trail){ if ((moveCount % ammoObj.trailFrequency) == 0){ addTrail(); }; }; } else { onDestinationReached(); addTrail(); return; }; if (zDir == 1){ if (RemotePlayer.players){ _local5 = 0; while (_local5 < RemotePlayer.players.length) { if (detectOpponentHit(RemotePlayer.players[_local5])){ onDestinationReached(RemotePlayer.players[_local5]); return; }; _local5++; }; }; } else { if (detectLocalPlayerHit()){ onDestinationReached(localPlayer); return; }; }; speed = ammoObj.speed; } } }//package uk.co.barraxworld.game.engine3D
Section 90
//Rocket (uk.co.barraxworld.game.engine3D.Rocket) package uk.co.barraxworld.game.engine3D { import flash.display.*; import uk.co.barraxworld.game.engine3D.characters.*; public class Rocket extends PropelledProjectile { public function Rocket(_arg1:MovieClip, _arg2:Number, _arg3:Player, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{ super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9); playSound("propelledProjectile_sound", 99); } } }//package uk.co.barraxworld.game.engine3D
Section 91
//StaticObject3D (uk.co.barraxworld.game.engine3D.StaticObject3D) package uk.co.barraxworld.game.engine3D { import flash.display.*; public class StaticObject3D extends Object3D { public function StaticObject3D(_arg1:MovieClip, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number=0, _arg7:Number=0, _arg8:Number=0){ super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8); } } }//package uk.co.barraxworld.game.engine3D
Section 92
//TiledPlane3D (uk.co.barraxworld.game.engine3D.TiledPlane3D) package uk.co.barraxworld.game.engine3D { import flash.display.*; import flash.geom.*; import uk.co.barraxworld.effects.*; import uk.co.barraxworld.loaders.*; public class TiledPlane3D extends Object3D { private var bitmapList:BitmapList; public var image:Sprite; private var textureRef:String; private var fill:TiledFill; public function TiledPlane3D(_arg1:MovieClip, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number=0, _arg7:Number=0){ var _local8:*; bitmapList = BitmapList.getInstance(); textureRef = _arg2; _local8 = 0; super(_arg1, "blank", _arg3, _arg4, _arg5, _arg6, _arg7, _local8); } public function renderPlane(_arg1:Matrix):void{ var _local2:*; var _local3:*; _local2 = bitmapList.getAsset(textureRef, "GAME"); _local3 = _local2.bitmapData; fill = new TiledFill(_local3, _arg1, w, h); image = new Sprite(); image.addChild(fill); clip.addChild(image); } override public function destroy():void{ image.removeChild(fill); clip.removeChild(image); fill.destroy(); fill = null; image = null; timeline.removeChild(clip); removeSounds(); } } }//package uk.co.barraxworld.game.engine3D
Section 93
//Utils3D (uk.co.barraxworld.game.engine3D.Utils3D) package uk.co.barraxworld.game.engine3D { import flash.display.*; import uk.co.barraxworld.game.engine3D.structures.*; import uk.co.barraxworld.game.engine3D.characters.*; import uk.co.barraxworld.game.engine3D.effects.*; public class Utils3D { private var sw:Number;// = 550 private var camera:Object; private var origin:Object; public var focalLength:Number; private var sh:Number;// = 400 private var viewDistance:Number; private var topObjects:Array; public static var instance:Utils3D; public function Utils3D(_arg1:Object, _arg2:Object, _arg3:Number, _arg4:Number):void{ sw = 550; sh = 400; super(); camera = _arg1; origin = _arg2; viewDistance = _arg3; focalLength = _arg4; topObjects = []; instance = this; } public function applyDepthOfField(_arg1:Object):void{ var obj = _arg1; try { obj.addDepthOfField(); } catch(e:Error) { }; } public function get3DPosition(_arg1:Number, _arg2:Number, _arg3:Number):Object{ var _local4:*; var _local5:Number; var _local6:Number; var _local7:Number; _local4 = (focalLength / ((focalLength + _arg3) - camera.zpos)); _local5 = (origin.xpos + ((_arg1 + camera.xpos) * _local4)); _local6 = (origin.ypos + (((_arg2 + origin.ypos) + camera.ypos) * _local4)); _local7 = _local4; return ({x:_local5, y:_local6, s:_local7}); } public function registerTopLevel(_arg1):void{ topObjects.push(_arg1); } public function update3DPositions(_arg1:MovieClip, _arg2:Array):void{ var depthArr:Array; var i:uint; var topPosition:Number; var t:uint; var n:uint; var obj:*; var clip = _arg1; var objectArr = _arg2; depthArr = new Array(); i = 0; while (i < objectArr.length) { if (objectArr[i].removeMe){ if ((objectArr[i] is MovableObject3D)){ Object3D.unregisterMovableObject(objectArr[i]); }; objectArr[i].destroy(); objectArr[i] = null; objectArr.splice(i, 1); }; if (objectArr[i]){ if (set3DPosition(clip, objectArr[i])){ if ((objectArr[i] is StaticBox3D)){ objectArr[i].alpha = (Object3D.wallAlpha) ? 0.5 : 1; }; objectArr[i].setSoundVolume(); depthArr.push({c:objectArr[i].clip, d:objectArr[i].zpos, t:objectArr.top, instance:objectArr[i]}); }; }; i = (i + 1); }; depthArr.sortOn("d", (Array.DESCENDING | Array.NUMERIC)); topPosition = (clip.numChildren - 1); t = 0; while (t < depthArr.length) { if (depthArr[t]){ try { clip.setChildIndex(depthArr[t].c, topPosition); } catch(e:Error) { depthArr[t].instance.removeMe = true; }; } else { break; }; t = (t + 1); }; n = 0; while (n < topObjects.length) { obj = topObjects[n]; if ((obj is LocalPlayer)){ if (obj.currView == "firstperson"){ clip.setChildIndex(obj.clip, topPosition); }; }; n = (n + 1); }; depthArr = null; } public function set3DPosition(_arg1:MovieClip, _arg2:Object3D):Boolean{ var _local3:*; _local3 = _arg2.clip; if ((((_arg2.back < camera.zpos)) || (((_arg2.front - camera.zpos) > viewDistance)))){ if ((_arg2 is LocalPlayer)){ return (true); }; _arg2.setVisible(false); return (false); //unresolved jump }; _arg2.scaleRatio = (focalLength / ((focalLength + _arg2.zpos) - camera.zpos)); _local3.x = (origin.xpos + ((_arg2.xpos + camera.xpos) * _arg2.scaleRatio)); _local3.y = (origin.ypos + (((_arg2.ypos + origin.ypos) + camera.ypos) * _arg2.scaleRatio)); _local3.scaleX = (_local3.scaleY = (_arg2.scaleRatio * _arg2.scaleMultiplier)); if (((((_local3.x + _local3.width) < 0)) || (((_local3.x - _local3.width) > sw)))){ _arg2.setVisible(false); return (false); }; _arg2.setVisible(); return (true); } public static function checkForObstacleIntersections(_arg1:Array, _arg2:Point3D, _arg3:Point3D, _arg4:int):Object{ var _local5:Point3D; var _local6:uint; var _local7:*; var _local8:*; _local6 = 0; while (_local6 < _arg1.length) { _local7 = _arg1[_local6]; _local5 = getIntersection(_arg2, _arg3, _local7.tl, _local7.br); if (_local5.hit){ if (_arg4 == -1){ _local5 = getIntersection(_arg2, _arg3, _local7.btl, _local7.bbr); }; _local8 = new Point3D(_local5.xpos, _local5.ypos, _local5.zpos); return ({point:_local8, obstacle:_local7}); }; _local6++; }; return ({point:null, obstacle:null}); } public static function getDistance(_arg1, _arg2):Number{ var _local3:*; var _local4:*; var _local5:*; _local3 = (_arg2.xpos - _arg1.xpos); _local4 = (_arg2.ypos - _arg1.ypos); _local5 = (_arg2.zpos - _arg1.zpos); return (Math.sqrt((((_local3 * _local3) + (_local4 * _local4)) + (_local5 * _local5)))); } public static function getVisibleDistance(_arg1, _arg2):Number{ var _local3:*; var _local4:*; var _local5:*; _local3 = (_arg2.xpos - _arg1.xpos); _local4 = (_arg2.ypos - _arg1.ypos); _local5 = ((_arg2.zpos - _arg1.zpos) * 2); return (Math.sqrt((((_local3 * _local3) + (_local4 * _local4)) + (_local5 * _local5)))); } public static function getInstance():Utils3D{ if (instance){ return (instance); }; return (null); } public static function getAngle(_arg1, _arg2):Number{ var _local3:*; var _local4:*; var _local5:*; _local3 = (_arg2.xpos - _arg1.xpos); _local4 = (_arg2.zpos - _arg1.zpos); _local5 = Math.atan2(_local4, _local3); return (((_local5 * 180) / Math.PI)); } public static function getIntersection(_arg1:Point3D, _arg2:Point3D, _arg3:Point3D, _arg4:Point3D):Point3D{ var _local5:Point3D; var _local6:Number; _local5 = new Point3D(0, 0, _arg3.zpos); _local5.hit = false; if (_arg1.zpos == _arg2.zpos){ return (_local5); }; _local6 = ((_arg3.zpos - _arg1.zpos) / (_arg2.zpos - _arg1.zpos)); _local5.xpos = ((_local6 * (_arg2.xpos - _arg1.xpos)) + _arg1.xpos); _local5.ypos = ((_local6 * (_arg2.ypos - _arg1.ypos)) + _arg1.ypos); if ((((((((_local5.xpos < _arg4.xpos)) && ((_local5.xpos > _arg3.xpos)))) && ((_local5.ypos > _arg3.ypos)))) && ((_local5.ypos < _arg4.ypos)))){ _local5.hit = true; }; return (_local5); } } }//package uk.co.barraxworld.game.engine3D
Section 94
//WeaponPickup (uk.co.barraxworld.game.engine3D.WeaponPickup) package uk.co.barraxworld.game.engine3D { import flash.display.*; public class WeaponPickup extends PickupItem { public function WeaponPickup(_arg1:MovieClip, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Boolean){ super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6); } } }//package uk.co.barraxworld.game.engine3D
Section 95
//Velocity3D (uk.co.barraxworld.game.engine3D.Velocity3D) package uk.co.barraxworld.game.engine3D { public dynamic class Velocity3D { private var _zSpeed:Number; private var _ySpeed:Number; private var _xSpeed:Number; public function Velocity3D(_arg1:Number, _arg2:Number, _arg3:Number){ _xSpeed = _arg1; _ySpeed = _arg2; _zSpeed = _arg3; } public function set zSpeed(_arg1:Number):void{ _zSpeed = _arg1; } public function get zSpeed():Number{ return (_zSpeed); } public function get ySpeed():Number{ return (_ySpeed); } public function get xSpeed():Number{ return (_xSpeed); } public function set ySpeed(_arg1:Number):void{ _ySpeed = _arg1; } public function set xSpeed(_arg1:Number):void{ _xSpeed = _arg1; } } }//package uk.co.barraxworld.game.engine3D
Section 96
//WorldBuilder (uk.co.barraxworld.game.engine3D.WorldBuilder) package uk.co.barraxworld.game.engine3D { import uk.co.barraxworld.game.config.*; import flash.display.*; import uk.co.barraxworld.utils.*; import uk.co.barraxworld.game.engine3D.structures.*; public class WorldBuilder { public var perspectiveItems:Array; private var timeline:MovieClip; private var walls:Array; private var maxzDepth:Number; private var gameOptions:GameOptions; private var grass:Array; private var maxxDist:Number; public function WorldBuilder(_arg1:MovieClip, _arg2:Array, _arg3:Number, _arg4:Number){ gameOptions = GameOptions.getInstance(); timeline = _arg1; perspectiveItems = []; walls = _arg2; grass = []; maxxDist = _arg3; maxzDepth = _arg4; build(); } private function createGrass():void{ var _local1:Number; var _local2:StaticObject3D; var _local3:Number; var _local4:uint; _local1 = 10; _local3 = ((maxzDepth / _local1) / 2); _local4 = 0; while (_local4 < _local1) { _local2 = new StaticObject3D(timeline, "grass", randRange(-(maxxDist), maxxDist), 0, (_local4 * _local3)); _local4++; }; } private function createWall(_arg1:Object, _arg2:String="local"):Wall3D{ var _local3:String; _local3 = "box"; if (_arg2 == "local"){ return (new Wall3D(timeline, (_local3 + "side"), (_local3 + "top"), _arg1.x, _arg1.y, _arg1.z, _arg1.w, _arg1.h, _arg1.d)); }; return (new Wall3D(timeline, (_local3 + "side"), (_local3 + "top"), -(_arg1.x), _arg1.y, (maxzDepth - _arg1.z), _arg1.w, _arg1.h, _arg1.d)); } private function build():void{ var _local1:uint; _local1 = 0; while (_local1 < walls.length) { perspectiveItems.push(createWall(walls[_local1], "local")); perspectiveItems.push(createWall(walls[_local1], "remote")); _local1++; }; if (gameOptions.effectsLevel > 0){ createGrass(); }; } private function randRange(_arg1:Number, _arg2:Number):Number{ return (NumberUtils.randRange(_arg1, _arg2)); } } }//package uk.co.barraxworld.game.engine3D
Section 97
//SpriteSheet (uk.co.barraxworld.game.gfx.SpriteSheet) package uk.co.barraxworld.game.gfx { import flash.display.*; import flash.events.*; import flash.geom.*; public class SpriteSheet extends MovieClip { private var _pause:Boolean; private var contents:MovieClip; private var id:uint;// = 0 private var _completeCycle; private var _incr:int; private var _playMode:Function; private var handler:MovieClip; private var grid:Number;// = 8 private var num:uint; private var s:Number; private var loop:Boolean; private var startID:int;// = 0 public function SpriteSheet(_arg1:Number, _arg2:Number, _arg3:Boolean=false){ startID = 0; id = 0; grid = 8; super(); this.s = _arg2; this.num = _arg1; this.loop = _arg3; _playMode = fwd; _pause = false; _completeCycle = false; _incr = 1; handler = this; onAddedHandler(); } public function set pause(_arg1:Boolean):void{ _pause = _arg1; } public function destroy():void{ handler.removeEventListener(Event.ENTER_FRAME, tick); handler.removeEventListener(Event.ADDED_TO_STAGE, onAddedHandler); handler = null; } public function set playMode(_arg1:String):void{ _playMode = this[_arg1]; } public function set completeCycle(_arg1:Boolean):void{ _completeCycle = _arg1; } private function tick(_arg1:Event):void{ if (!_pause){ _playMode(); } else { if (_completeCycle){ if (id != 0){ _playMode(); }; }; }; } private function dispatch():void{ dispatchEvent(new Event("onComplete")); } public function set incr(_arg1:int):void{ _incr = _arg1; } private function onAddedHandler(_arg1:Event=null):void{ handler.sheet.scrollRect = new Rectangle(0, 0, s, s); handler.addEventListener(Event.ENTER_FRAME, tick); } public function fwd():void{ startID = 0; handler.sheet.contents.x = (-((id % grid)) * s); handler.sheet.contents.y = (-(s) * Math.floor((id / grid))); if ((id + _incr) <= num){ id = (id + _incr); } else { if (loop){ id = startID; } else { dispatch(); }; }; } public function rev():void{ startID = (num - 1); handler.sheet.contents.x = (-((id % grid)) * s); handler.sheet.contents.y = (-(s) * Math.floor((id / grid))); if ((id - _incr) >= 0){ id = (id - _incr); } else { if (loop){ id = startID; } else { dispatch(); }; }; } } }//package uk.co.barraxworld.game.gfx
Section 98
//SpriteSheetAnimator (uk.co.barraxworld.game.gfx.SpriteSheetAnimator) package uk.co.barraxworld.game.gfx { import flash.display.*; import flash.events.*; import flash.geom.*; public class SpriteSheetAnimator extends EventDispatcher { private var loopCount:int; private var spriteSheetFactory:SpriteSheetFactory; private var spriteSheet:Bitmap; private var currFrame:uint; public var enableMask:Boolean;// = true private var numLoops:int; private var _clip:MovieClip; private var looping:Boolean; public function SpriteSheetAnimator(_arg1:SpriteSheetFactory){ enableMask = true; super(); spriteSheetFactory = _arg1; spriteSheet = spriteSheetFactory.spriteSheet; } public function stop():void{ _clip.removeEventListener(Event.ENTER_FRAME, gotoNextPosition); } public function play():void{ looping = false; _clip.addEventListener(Event.ENTER_FRAME, gotoNextPosition); } public function get clip():MovieClip{ return (_clip); } public function reset():void{ currFrame = 0; } public function initialise():void{ _clip = new MovieClip(); if (enableMask){ _clip.scrollRect = new Rectangle(0, 0, spriteSheetFactory.fw, spriteSheetFactory.fh); }; _clip.addChild(spriteSheet); dispatchEvent(new Event("onComplete")); } public function playLoop(_arg1:int=999):void{ looping = true; numLoops = _arg1; loopCount = 1; _clip.addEventListener(Event.ENTER_FRAME, gotoNextPosition); } public function destroy():void{ stop(); } public function pause():void{ _clip.removeEventListener(Event.ENTER_FRAME, gotoNextPosition); } private function gotoNextPosition(_arg1:Event):void{ var _local2:*; var _local3:Boolean; _local2 = spriteSheetFactory.array[currFrame]; spriteSheet.x = -(_local2.x); spriteSheet.y = -(_local2.y); _local3 = false; if (currFrame >= (spriteSheetFactory.array.length - 1)){ if (looping){ if (loopCount < numLoops){ currFrame = 0; loopCount++; } else { _local3 = true; }; } else { _local3 = true; }; } else { currFrame++; }; if (_local3){ dispatchEvent(new Event("onFinished")); }; } } }//package uk.co.barraxworld.game.gfx
Section 99
//SpriteSheetFactory (uk.co.barraxworld.game.gfx.SpriteSheetFactory) package uk.co.barraxworld.game.gfx { import flash.display.*; import flash.events.*; import flash.geom.*; import uk.co.barraxworld.game.projects.ultrakillz.*; import flash.utils.*; public class SpriteSheetFactory extends EventDispatcher { private var numcols:int; private var frameIncrement:int; private var ref:String; public var spriteSheet:Bitmap; private var spriteID:uint; private var cloned:Boolean; private var main:Main; public var fh:Number; private var sourceMovieClip:MovieClip; private var numFrames:int; private var bmpArray:Array; private var currFrame:uint; private var numrows:int; private var bmdArray:Array; private var posArray:Array; public var fw:Number; private var spriteSheetBmd:BitmapData; public static var spriteSheets:Array; public function SpriteSheetFactory(_arg1:Object, _arg2:Object){ var _local3:Class; super(); ref = _arg1.src; _local3 = (getDefinitionByName(ref) as Class); sourceMovieClip = new (_local3); frameIncrement = _arg1.incr; numFrames = int((sourceMovieClip.totalFrames / frameIncrement)); numcols = int((numFrames / 4)); numrows = int((numFrames / numcols)); fw = _arg2.fw; fh = _arg2.fh; spriteID = 0; currFrame = 1; sourceMovieClip.width = fw; sourceMovieClip.height = fh; if (!spriteSheets){ spriteSheets = []; }; posArray = []; bmpArray = []; bmdArray = []; } private function cloneSheet(_arg1:Bitmap):Bitmap{ return (new Bitmap(_arg1.bitmapData)); } private function buildSheet():void{ var _local1:uint; var _local2:int; var _local3:int; var _local4:BitmapData; var _local5:Rectangle; var _local6:Point; _local1 = 0; spriteSheetBmd = new BitmapData((numrows * fw), (numcols * fh), true, 0); _local2 = 0; while (_local2 < numrows) { _local3 = 0; while (_local3 < numcols) { if (_local1 < numFrames){ if (!cloned){ _local4 = bmdArray[_local1]; if (_local4){ _local5 = new Rectangle(0, 0, fw, fh); _local6 = new Point((_local3 * fw), (_local2 * fh)); spriteSheetBmd.copyPixels(_local4, _local5, _local6); } else { break; }; }; posArray.push({x:(_local3 * fw), y:(_local2 * fh)}); _local1++; }; _local3++; }; _local2++; }; completed(); } private function findExistingSpriteSheet():Boolean{ var _local1:uint; _local1 = 0; while (_local1 < spriteSheets.length) { if (spriteSheets[_local1].name == ref){ spriteSheet = cloneSheet(spriteSheets[_local1]); return (true); }; _local1++; }; return (false); } public function initialise():void{ if (!findExistingSpriteSheet()){ cloned = false; takeSnapshot(); } else { cloned = true; buildSheet(); }; } private function completed():void{ dispatchEvent(new Event("onComplete")); } public function get array():Array{ return (posArray); } private function takeSnapshot():void{ var bmd:BitmapData; if (currFrame < numFrames){ sourceMovieClip.gotoAndStop(currFrame); bmd = new BitmapData(fw, fh, true, 0); try { bmd.draw(sourceMovieClip); } catch(e:Error) { }; bmdArray.push(bmd); spriteID++; currFrame = (currFrame + frameIncrement); takeSnapshot(); } else { buildSheet(); return; }; } public function destroy():void{ var _local1:uint; _local1 = 0; while (_local1 < bmpArray.length) { bmpArray[_local1].bitmapData.dispose(); _local1++; }; } } }//package uk.co.barraxworld.game.gfx
Section 100
//SpriteSheetManager (uk.co.barraxworld.game.gfx.SpriteSheetManager) package uk.co.barraxworld.game.gfx { import flash.events.*; public class SpriteSheetManager { public static var spriteSheets:Array; public static function create(_arg1:String, _arg2:Number, _arg3:Number, _arg4:int=1):Object{ var _local5:SpriteSheetFactory; var _local6:*; var _local7:*; _local5 = new SpriteSheetFactory({src:_arg1, incr:_arg4}, {fw:_arg2, fh:_arg3}); _local5.initialise(); _local6 = new SpriteSheetAnimator(_local5); _local6.initialise(); _local6.clip.x = (_local6.clip.x - (_arg2 / 2)); _local6.clip.y = (_local6.clip.y - _arg3); _local7 = {ref:_arg1, anim:_local6}; spriteSheets.push(_local7); return (_local7); } public static function initialise():void{ var _local1:uint; if (spriteSheets){ _local1 = 0; while (_local1 < spriteSheets.length) { spriteSheets[_local1].stop(); spriteSheets[_local1] = null; _local1++; }; }; spriteSheets = []; } } }//package uk.co.barraxworld.game.gfx
Section 101
//GenericHud (uk.co.barraxworld.game.hud.GenericHud) package uk.co.barraxworld.game.hud { import flash.display.*; import uk.co.barraxworld.utils.*; import flash.events.*; import flash.text.*; import gs.*; import flash.media.*; import flash.geom.*; import flash.utils.*; public class GenericHud { private var _playername:String; private var _score:Number; private var _time:Number; public var _clip:MovieClip; private var chatDisplayTime:int;// = 10000 private var mainStatus_y:Number;// = 105 private var chatLog:Array; private var chatTimer:Timer; private var sh:Number; private var sw:Number; public var countdownSound:Sound;// = null private var statusTimer:Timer; public var tl:MovieClip; private var _health:Number; public function GenericHud(_arg1:MovieClip, _arg2:Number, _arg3:Number){ mainStatus_y = 105; chatDisplayTime = 10000; countdownSound = null; super(); this.sw = _arg2; this.sh = _arg3; this.tl = _arg1; initialise(); } public function get score():Number{ return (_score); } public function set time(_arg1:Number):void{ if (_time != _arg1){ _time = _arg1; if (_time <= 5){ if (_clip.timeRemaining.currentFrame == 1){ _clip.timeRemaining.gotoAndPlay(2); }; playSound(countdownSound); } else { _clip.timeRemaining.gotoAndStop(1); }; _clip.timeRemaining.textMC.field.htmlText = NumberUtils.returnTime(_time); }; } public function genericDestroy():void{ if (chatTimer){ if (chatTimer.hasEventListener(TimerEvent.TIMER_COMPLETE)){ chatTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, removeChat); }; }; if (statusTimer){ if (statusTimer.hasEventListener(TimerEvent.TIMER_COMPLETE)){ statusTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, onStatusTimerComplete); }; }; tl.removeChild(_clip); _clip = null; } public function set score(_arg1:Number):void{ _score = _arg1; } public function hideTime():void{ _clip.timeRemaining.visible = false; } public function updateMainStatus(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=true):void{ var _local4:int; if (!statusTimer){ statusTimer = new Timer(3000, 1); statusTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onStatusTimerComplete); }; if (_arg2){ statusTimer.reset(); statusTimer.start(); }; _local4 = (_arg3) ? 1 : 2; _clip.mainStatus.gotoAndStop(_local4); _clip.mainStatus.y = mainStatus_y; _clip.mainStatus.alpha = 1; _clip.mainStatus.textMC.field.antiAliasType = AntiAliasType.ADVANCED; _clip.mainStatus.textMC.field.htmlText = _arg1; TweenLite.killTweensOf(_clip.mainStatus); TweenLite.from(_clip.mainStatus, 0.3, {autoAlpha:0, y:(mainStatus_y + 30)}); } public function clearMainStatus():void{ TweenLite.killTweensOf(_clip.mainStatus); TweenLite.to(_clip.mainStatus, 0.2, {autoAlpha:0}); } private function playSound(_arg1:Sound):void{ if (_arg1){ _arg1.play(); }; } public function hideHealth():void{ _clip.health_bar.visible = false; } public function set health(_arg1:Number):void{ _health = _arg1; _clip.health.htmlText = _health; if (_health < 20){ if (_clip.health_bar.anim.fill.currentFrame == 1){ _clip.health_bar.anim.fill.gotoAndPlay(2); }; } else { _clip.health_bar.anim.fill.gotoAndStop(1); }; _clip.health_bar.anim.fill.scaleY = (_health / 100); } private function initialise():void{ chatLog = []; _clip = new hud_mc(); _clip.scrollRect = new Rectangle(0, 0, sw, sh); tl.addChild(_clip); } public function get clip():MovieClip{ return (_clip); } public function set playerLives(_arg1:int):void{ _clip.playerLives.textMC.field.htmlText = ("" + _arg1); } public function get time():Number{ return (_time); } public function set opponentLives(_arg1:int):void{ _clip.opponentLives.textMC.field.htmlText = (("<p align='right'>" + _arg1) + "</font>"); } public function get health():Number{ return (_health); } public function chat(_arg1:String, _arg2:String):void{ var _local3:*; var _local4:uint; if (!chatTimer){ chatTimer = new Timer(chatDisplayTime, 1); chatTimer.addEventListener(TimerEvent.TIMER_COMPLETE, removeChat); }; chatTimer.reset(); chatTimer.start(); _local3 = 4; chatLog.push({name:_arg1, str:_arg2}); if (chatLog.length > _local3){ chatLog.splice(0, (chatLog.length - _local3)); }; clip.chatOutput.htmlText = ""; _local4 = 0; while (_local4 < chatLog.length) { clip.chatOutput.htmlText = (clip.chatOutput.htmlText + (((chatLog[_local4].name + " > ") + chatLog[_local4].str) + "<br/>")); _local4++; }; } public function set playername(_arg1:String):void{ _playername = _arg1; } public function get playername():String{ return (_playername); } private function onStatusTimerComplete(_arg1:TimerEvent):void{ statusTimer.stop(); clearMainStatus(); } public function hideLives():void{ _clip.playerLives.visible = false; _clip.opponentLives.visible = false; _clip.livesClip1.visible = false; _clip.livesClip2.visible = false; } public function destroy():void{ genericDestroy(); } private function removeChat(_arg1:TimerEvent):void{ clip.chatOutput.htmlText = ""; chatLog = []; } } }//package uk.co.barraxworld.game.hud
Section 102
//ShooterHud (uk.co.barraxworld.game.hud.ShooterHud) package uk.co.barraxworld.game.hud { import flash.display.*; public class ShooterHud extends GenericHud { private var ammoClips:Array; public function ShooterHud(_arg1:MovieClip, _arg2:Number, _arg3:Number){ ammoClips = []; super(_arg1, _arg2, _arg3); hideBlood(); } public function showBlood():void{ clip.blood.scaleY = (clip.blood.scaleY * -1); clip.blood.gotoAndPlay("show"); } public function updateWeaponStatus(_arg1:String, _arg2:int):void{ var _local3:*; var _local4:*; var _local5:*; var _local6:uint; var _local7:MovieClip; clip.weaponname.htmlText = _arg1; clip.ammo.htmlText = _arg2; if (clip.ammoHolder){ resetAmmoClips(); _local3 = 20; _local4 = 5; _local5 = 11; _local6 = 0; while (_local6 < _arg2) { _local7 = new hudAmmo(); _local7.x = ((_local6 % _local3) * _local4); _local7.y = (-(_local5) * Math.floor((_local6 / _local3))); ammoClips.push(_local7); clip.ammoHolder.addChild(_local7); _local6++; }; }; } private function resetAmmoClips():void{ var _local1:uint; _local1 = 0; while (_local1 < ammoClips.length) { clip.ammoHolder.removeChild(ammoClips[_local1]); _local1++; }; ammoClips = []; } public function hideBlood():void{ clip.blood.gotoAndStop(1); } public function hideAmmo():void{ clip.ammoHolder.visible = false; } override public function destroy():void{ resetAmmoClips(); genericDestroy(); } } }//package uk.co.barraxworld.game.hud
Section 103
//BackWall (uk.co.barraxworld.game.projects.ultrakillz.assets.BackWall) package uk.co.barraxworld.game.projects.ultrakillz.assets { import flash.display.*; import uk.co.barraxworld.game.engine3D.*; import flash.geom.*; public class BackWall extends TiledPlane3D { public function BackWall(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number){ var _local5:*; var _local6:*; var _local7:Matrix; _local5 = 15000; _local6 = 500; super(_arg1, "backwall", _arg2, _arg3, _arg4, _local5, _local6); _local7 = new Matrix(); _local7.scale(10, 10); renderPlane(_local7); image.x = -((_local5 / 2)); image.y = -(_local6); } } }//package uk.co.barraxworld.game.projects.ultrakillz.assets
Section 104
//Divide (uk.co.barraxworld.game.projects.ultrakillz.assets.Divide) package uk.co.barraxworld.game.projects.ultrakillz.assets { import flash.display.*; import uk.co.barraxworld.game.engine3D.*; public class Divide extends Object3D { public function Divide(_arg1:MovieClip, _arg2:Number){ var _local3:*; var _local4:*; _local3 = 1600; _local4 = 200; super(_arg1, "divide", 0, 0, _arg2, _local3, _local4); } } }//package uk.co.barraxworld.game.projects.ultrakillz.assets
Section 105
//FloorStrip (uk.co.barraxworld.game.projects.ultrakillz.assets.FloorStrip) package uk.co.barraxworld.game.projects.ultrakillz.assets { import flash.display.*; import uk.co.barraxworld.game.engine3D.*; import flash.geom.*; public class FloorStrip extends TiledPlane3D { public function FloorStrip(_arg1:MovieClip, _arg2:uint, _arg3:Number, _arg4:Number, _arg5:Number){ var _local6:*; var _local7:*; var _local8:Matrix; _local6 = 15000; _local7 = 200; super(_arg1, ("floor" + _arg2), _arg3, _arg4, _arg5, _local6, _local7); _local8 = new Matrix(); _local8.scale(1.5, 1.5); renderPlane(_local8); image.x = -((_local6 / 2)); } } }//package uk.co.barraxworld.game.projects.ultrakillz.assets
Section 106
//Foliage (uk.co.barraxworld.game.projects.ultrakillz.assets.Foliage) package uk.co.barraxworld.game.projects.ultrakillz.assets { import flash.display.*; import uk.co.barraxworld.loaders.*; public class Foliage extends MovieClip { private var contentClip; public function Foliage(_arg1:String){ var _local2:*; super(); _local2 = BitmapList.getInstance(); contentClip = _local2.getAsset(_arg1, "GAME"); contentClip.y = (contentClip.y - contentClip.height); addChild(contentClip); } } }//package uk.co.barraxworld.game.projects.ultrakillz.assets
Section 107
//Grass (uk.co.barraxworld.game.projects.ultrakillz.assets.Grass) package uk.co.barraxworld.game.projects.ultrakillz.assets { public class Grass extends Foliage { public function Grass(){ super("grass"); } } }//package uk.co.barraxworld.game.projects.ultrakillz.assets
Section 108
//SideMarker (uk.co.barraxworld.game.projects.ultrakillz.assets.SideMarker) package uk.co.barraxworld.game.projects.ultrakillz.assets { import flash.display.*; import uk.co.barraxworld.loaders.*; public class SideMarker extends MovieClip { private var contentClip; public function SideMarker(){ var _local1:*; super(); _local1 = BitmapList.getInstance(); contentClip = _local1.getAsset("sidemarker", "GAME"); contentClip.y = (contentClip.y - contentClip.height); addChild(contentClip); } } }//package uk.co.barraxworld.game.projects.ultrakillz.assets
Section 109
//AssetsController (uk.co.barraxworld.game.projects.ultrakillz.controllers.AssetsController) package uk.co.barraxworld.game.projects.ultrakillz.controllers { import flash.display.*; import flash.events.*; import uk.co.barraxworld.multiuser.lobby.*; import uk.co.barraxworld.game.shooter.armoury.*; import uk.co.barraxworld.game.engine3D.characters.*; import uk.co.barraxworld.loaders.*; import uk.co.barraxworld.multiuser.server.socket.*; import uk.co.barraxworld.game.projects.ultrakillz.*; import uk.co.barraxworld.game.projects.ultrakillz.interfaces.*; import flash.utils.*; import uk.co.barraxworld.game.projects.ultrakillz.assets.*; public class AssetsController implements IController { private var dataDir:String; private var timer:Timer; private var itinerary:Itinerary; private var dynamicItinerary:DynamicItinerary; private var assetsDir:String; private var themeID:uint; private var view:MovieClip; private var swfDir:String; private var loaderItems:Array; private var socket:UltraKillzSocket; private var bitmapList:BitmapList; private var main:Main; private var _stage:Stage; public function AssetsController(_arg1:uint=3){ var _local2:*; super(); main = Main.getInstance(); _stage = main._stage; if (Main.gameMode == Main.CAMPAIGN_MODE){ swfDir = ""; if (main.deployment == Main.DEPLOYMENT_MOCHIAD){ assetsDir = ""; dataDir = ""; }; } else { swfDir = "play/"; assetsDir = "assets/"; dataDir = "data/"; }; if (GameController.GAMEMODE == "normal"){ socket = main.socket; socket.addEventListener("onSocketData", onSocketData); }; _local2 = main.gameConfig.getThemeID((main.currLevel - 1)); themeID = (_local2) ? _local2 : _arg1; loaderItems = []; loaderItems[0] = {ref:"backwall", type:Bitmap}; loaderItems[1] = {ref:"floor1", type:Bitmap}; loaderItems[2] = {ref:"floor2", type:Bitmap}; loaderItems[3] = {ref:"boxside_hi", type:Bitmap}; loaderItems[4] = {ref:"boxside_lo", type:Bitmap}; loaderItems[5] = {ref:"boxtop", type:Bitmap}; loaderItems[6] = {ref:"background", type:Bitmap}; loaderItems[7] = {ref:"grass", type:Grass}; loaderItems[8] = {ref:"sidemarker", type:SideMarker}; loadXML(); initView(); } private function onLoaded(_arg1:Event):void{ main.goGame(); } public function destroyView():void{ stopProcesses(); if (dynamicItinerary){ dynamicItinerary.destroy(); }; view.template.destroy(); _stage.removeChild(view); } private function initView():void{ view = new AssetsLoaderView(); view.progressBar.percent = 0; _stage.addChild(view); } private function loadBitmaps():void{ var _local1:uint; var _local2:String; bitmapList = BitmapList.getInstance(); bitmapList.addEventListener("listLoaded", onLoaded); bitmapList.addEventListener("listProgress", onProgress); if (main.deployment == Main.DEPLOYMENT_MOCHIAD){ _local1 = 0; while (_local1 < loaderItems.length) { _local2 = loaderItems[_local1].ref; loaderItems[_local1].fileName = ((("lvl" + themeID) + "_") + _local2); _local1++; }; bitmapList.loadNewList(main.baseURL, loaderItems, "GAME"); } else { bitmapList.loadNewList(((((main.baseURL + swfDir) + "assets/lvl") + themeID) + "/"), loaderItems, "GAME"); }; } private function loadXML():void{ Player.ITINERARY_TYPE = "dynamic"; dynamicItinerary = new DynamicItinerary(); dynamicItinerary.addEventListener("complete", onXMLComplete, false, 0, true); dynamicItinerary.init((((main.baseURL + swfDir) + dataDir) + "itinerary.xml")); } private function onXMLComplete(_arg1:Event):void{ loadBitmaps(); } private function onProgress(_arg1:Event):void{ var _local2:*; _local2 = bitmapList.gLoadPercent; view.progressBar.percent = _local2; } private function abort(_arg1:String):void{ stopProcesses(); socket.sendRequest("l"); bitmapList.unloadList("GAME"); view.field.htmlText = _arg1; setTimeout(main.goPlay, 2000); } private function stopProcesses():void{ view.anim.stop(); view.anim.visible = false; if (socket){ socket.removeEventListener("onSocketData", onSocketData); }; bitmapList.removeEventListener("listLoaded", onLoaded); bitmapList.removeEventListener("listProgress", onProgress); if (dynamicItinerary){ dynamicItinerary.removeEventListener("complete", onXMLComplete); }; } private function onSocketData(_arg1:Event):void{ var _local2:String; var _local3:Array; var _local4:String; var _local5:*; _local2 = _arg1.target.currResponse; _local3 = _local2.split(","); _local4 = _local3.splice(0, 1); switch (_local4){ case "l": _local5 = _local3.splice(0, 1); Room.currRoom.removeUser(User.getByID(_local5)); abort("Match Cancelled<br><font size='-2'>(your opponent has left)</font>"); break; }; } } }//package uk.co.barraxworld.game.projects.ultrakillz.controllers
Section 110
//DifficultyController (uk.co.barraxworld.game.projects.ultrakillz.controllers.DifficultyController) package uk.co.barraxworld.game.projects.ultrakillz.controllers { import flash.display.*; import flash.events.*; import gs.*; import uk.co.barraxworld.game.projects.ultrakillz.*; import uk.co.barraxworld.game.projects.ultrakillz.interfaces.*; public class DifficultyController implements IController { private var view:MovieClip; private var difficulty_unlocked:uint; private var main:Main; private var _stage:Stage; public function DifficultyController(){ main = Main.getInstance(); _stage = main._stage; initView(); } public function destroyView():void{ view.template.destroy(); _stage.removeChild(view); } private function btnClick(_arg1:MouseEvent):void{ main.gameConfig.currStage = (_arg1.target.value - 1); main.difficulty = _arg1.target.value; main.goLevelSelect(); } private function goBack(_arg1:MouseEvent):void{ main.goHome(); } private function initView():void{ var _local1:Sprite; var _local2:*; var _local3:uint; var _local4:MovieClip; var _local5:*; view = new DifficultyView(); view.backBtn.setText("« Back "); view.backBtn.addEventListener(MouseEvent.MOUSE_DOWN, goBack, false, 0, true); _local1 = new Sprite(); difficulty_unlocked = Math.max(1, int(main.cookie.getItem("campaign_unlocked"))); _local2 = []; _local2.push({title:"Easy", value:1}); _local2.push({title:"Medium", value:2}); _local2.push({title:"Hard", value:3}); _local3 = 0; while (_local3 < _local2.length) { _local4 = new genericButton(); TweenLite.from(_local4, 0.3, {alpha:0, tint:0xFFFFFF, delay:(_local3 * 0.1)}); _local4.value = _local2[_local3].value; _local4.y = (_local3 * (_local4.height + 10)); _local4.setText(_local2[_local3].title); if (difficulty_unlocked >= (_local3 + 1)){ _local4.addEventListener(MouseEvent.MOUSE_DOWN, btnClick, false, 0, true); } else { _local5 = new padlock_icon(); _local5.x = ((_local4.width / 2) - 20); _local5.y = (_local5.y - (_local5.height * 0.55)); _local4.addChild(_local5); _local4.buttonMode = false; }; _local1.addChild(_local4); _local3++; }; _local1.x = (main.sw / 2); _local1.y = (((main.sh / 2) - (_local1.height / 2)) + 40); view.addChild(_local1); _stage.addChild(view); } } }//package uk.co.barraxworld.game.projects.ultrakillz.controllers
Section 111
//GameController (uk.co.barraxworld.game.projects.ultrakillz.controllers.GameController) package uk.co.barraxworld.game.projects.ultrakillz.controllers { import uk.co.barraxworld.game.config.*; import flash.display.*; import uk.co.barraxworld.utils.*; import flash.events.*; import flash.text.*; import uk.co.barraxworld.multiuser.lobby.*; import gs.*; import uk.co.barraxworld.game.engine3D.structures.*; import uk.co.barraxworld.game.engine3D.*; import uk.co.barraxworld.common.*; import flash.geom.*; import uk.co.barraxworld.game.shooter.armoury.*; import uk.co.barraxworld.game.engine3D.characters.*; import uk.co.barraxworld.game.cursors.*; import uk.co.barraxworld.effects.*; import uk.co.barraxworld.loaders.*; import uk.co.barraxworld.game.hud.*; import uk.co.barraxworld.game.gfx.*; import uk.co.barraxworld.multiuser.server.socket.*; import uk.co.barraxworld.game.projects.ultrakillz.*; import flash.net.*; import uk.co.barraxworld.game.projects.ultrakillz.interfaces.*; import uk.co.barraxworld.game.*; import flash.utils.*; import uk.co.barraxworld.ui.*; import flash.ui.*; import uk.co.barraxworld.game.projects.ultrakillz.assets.*; import uk.co.barraxworld.game.projects.ultrakillz.views.*; import uk.co.barraxworld.game.shooter.*; import uk.co.barraxworld.game.common.*; import uk.co.barraxworld.game.engine3D.effects.*; public class GameController implements IController { private var mainTL:MovieClip; private var timeUnit:int; private var allowUserAction:Boolean; private var timeoutThreshold:int;// = 20000 private var hintArray:Array; private var crosshair3D:CrosshairProxy3D; private var tweenEffects:TweenEffects; private var baseFocalLength:Number;// = 120 private var tutorialSeq:Array; private var crosshair:StandardCrosshair; private var keyIsDown:Function; private var zoomID:uint; private var spawnPoints:Array; private var floor_markers:Array; private var responses:Array; private var gameOptions:GameOptions; public var sh:Number; private var cMenu:ContextMenu; public var sw:Number; private var bitmapList:BitmapList; private var timeLeft:int; private var hintClip:MovieClip; private var deaths:int; private var score:int; private var gameLevel:int;// = 7 private var opponents:Array; private var shots:int; private var timerCount:Number;// = 0 private var maxzDepth:Number;// = 2500 private var chatInputField:ChatInputField; private var fpsCounter:FpsCounter; private var kills:int; private var player:Player; private var perspectiveItems:Array; private var worldBounds:Object; public var utils3D:Utils3D; private var timeLimit:int;// = 120 private var hud:ShooterHud; private var loopTimer:Timer; private var matchStarted:Boolean;// = false private var killLimit:int;// = 2 private var hintTimer:Timer; private var moveBounds1:Object; private var moveBounds2:Object; private var count:Number;// = 0 private var maxyHeight:Number;// = -4000 private var socketDebugWin:socketDebugWindow; public var camera:Camera3D; private var origin:Point3D; private var tuteClip:MovieClip; private var currTimerFunction:Function; private var zooming:Boolean; private var endTimer:Timer; private var hits:int; private var timer:Timer; private var tuteID:uint; private var backWall:BackWall; private var maxxDist:Number;// = 1600 private var summaryView:SummaryView; private var opponentLivesRemaining:int; private var gameOn:Boolean; private var socket:UltraKillzSocket; private var enableMatchStart:Boolean;// = true private var timeoutStart:int; private var assets:Array; private var idleSent:Boolean; private var pickupManager:PickupManager; private var timeStart:int; private var horizon:Object3D; private var weaponMenu:WeaponMenu; private var binaryCompressor:BinaryCompressor; private var worldBuilder:WorldBuilder; private var focalLength:Number; private var zoomed:Boolean; private var main:Main; private var viewDistance:Number;// = 10000 private var tickDelay:uint; private var hintID:uint; private var game:MovieClip; private var playerGetReady:PlayerGetReady; private var currLoop:Function; private var _stage:Stage; public static const KILL_SCORE:int = 10000; public static var GAMEMODE:String = "normal"; public static var PRACTICE_SETTINGS:Object; public function GameController(){ var _local1:KeyboardHandler; count = 0; timerCount = 0; maxyHeight = -4000; maxzDepth = 2500; maxxDist = 1600; moveBounds1 = {xMin:-(maxxDist), xMax:maxxDist, zMin:200, zMax:((maxzDepth - (maxzDepth / 2)) - 300)}; moveBounds2 = {xMin:-(maxxDist), xMax:maxxDist, zMin:((maxzDepth - (maxzDepth / 2)) + 400), zMax:(maxzDepth - 200)}; baseFocalLength = 120; focalLength = baseFocalLength; viewDistance = 10000; gameLevel = 7; killLimit = 2; timeLimit = 120; timeLeft = timeLimit; timeoutThreshold = 20000; matchStarted = false; enableMatchStart = true; super(); main = Main.getInstance(); bitmapList = BitmapList.getInstance(); gameOptions = GameOptions.getInstance(); tweenEffects = TweenEffects.getInstance(); _stage = main._stage; _stage.frameRate = 31; mainTL = new gameHolder(); _stage.addChild(mainTL); timeUnit = (int(((1000 / _stage.frameRate) * 100)) / 100); Spline.incr = timeUnit; tickDelay = 100; sw = main.sw; sh = main.sh; MovableObject3D.moveBounds1 = moveBounds1; MovableObject3D.moveBounds2 = moveBounds2; MovableObject3D.maxzDepth = maxzDepth; binaryCompressor = BinaryCompressor.getInstance(); if (socket){ socket = main.socket; socket.currMode = "game"; socket.addEventListener("onSocketData", onSocketData); if (GAMEMODE == "normal"){ gameLevel = int(Room.currRoom.map); killLimit = Room.currRoom.killlimit; timeLimit = Room.currRoom.timelimit; }; }; if (GAMEMODE == "practice"){ gameLevel = main.currLevel; killLimit = 999; timeLimit = 999; } else { if (GAMEMODE == "campaign"){ gameLevel = main.currLevel; killLimit = 999; timeLimit = main.timeLimit; } else { if (GAMEMODE == "tutorial"){ gameLevel = 1; killLimit = 999; timeLimit = 999; }; }; }; responses = []; initGame(); _local1 = new KeyboardHandler(_stage); keyIsDown = KeyboardHandler.getInstance().isDown; _local1 = null; } private function startTimer(_arg1:Function):void{ if (timer){ timer.stop(); timer = null; }; currTimerFunction = _arg1; timer = new Timer(tickDelay); timer.addEventListener(TimerEvent.TIMER, currTimerFunction); timer.start(); } private function killLocalPlayer():void{ var _local1:String; zoom(0); if (opponentLivesRemaining <= 0){ return; }; player.die(); hud.showBlood(); Object3D.wallAlpha = false; deaths++; debug(("i died: player.hitByID=" + player.hitByID)); switch (GAMEMODE){ case "normal": addRequest("died", player.hitByID, true); showGameStatus("Bad Luck!", "", false); announceKill(player.hitByID, User.localUser.id); break; case "practice": announce("Bad luck!"); break; case "campaign": announce("Bad luck!"); player.lives--; LocalPlayer.LIVES_REMAINING = player.lives; hud.playerLives = player.lives; if (player.lives <= 0){ endRound("k", "l"); } else { _local1 = ((player.lives > 1)) ? "LIVEZ" : "LIFE"; hud.updateMainStatus((((player.lives + " ") + _local1) + " REMAINING!"), true, true); }; break; }; } private function onMuzzleFlashComplete(_arg1:Event):void{ var _local2:*; _local2 = _arg1.target; _local2.removeEventListener("complete", onMuzzleFlashComplete); _local2.destroy(); _local2 = null; } private function endLoop():void{ if (currLoop == null){ return; }; loopTimer.removeEventListener(TimerEvent.TIMER, currLoop); loopTimer.stop(); loopTimer = null; currLoop = null; } private function initPlayer():void{ var point:Object; point = spawnPoints["player1"]; player = new LocalPlayer(game, point.xpos, point.ypos, point.zpos); if (GAMEMODE == "tutorial"){ player.spawnInRandom_x = false; }; try { player.userID = User.localUser.id; } catch(e:Error) { User.localUser = new LocalUser(); User.localUser.id = "leet1337"; User.localUser.name = "tester"; User.localUser.room = "testRoom"; User.localUser.roomPos = 0; player.userID = User.localUser.id; }; player.lives = LocalPlayer.LIVES_REMAINING; player.weaponCallback = playerWeaponCallback; player.addEventListener(CustomEvent.EVT, onSpawn); hud.playerLives = player.lives; utils3D.registerTopLevel(player); } private function randRange(_arg1:Number, _arg2:Number):Number{ return (NumberUtils.randRange(_arg1, _arg2)); } private function introTick(_arg1:TimerEvent):void{ camera.goFirstPerson(player, crosshair, 8); player.updateView(crosshair.xpos, crosshair.ypos); renderRealtime(); } private function startLoop(_arg1:Function):void{ if (currLoop != null){ endLoop(); }; currLoop = _arg1; loopTimer = new Timer(timeUnit); loopTimer.addEventListener(TimerEvent.TIMER, currLoop); loopTimer.start(); } private function nextHint(_arg1:TimerEvent):void{ var _local2:uint; if (hintClip){ return; }; _local2 = 0; while (_local2 < hintArray.length) { showHint(_local2); break; _local2++; }; } private function nextTute(_arg1:MouseEvent=null):void{ if (tuteID < tutorialSeq.length){ tuteClip.gotoAndStop((tuteID + 1)); tuteClip.titleField.htmlText = tutorialSeq[tuteID].title; tuteClip.bodyClip.field.htmlText = tutorialSeq[tuteID].body; tuteClip.bodyClip.alpha = 0; TweenLite.to(tuteClip.bodyClip, 0.8, {alpha:1}); switch (tuteID){ case 1: playerGetReady = new PlayerGetReady(["", ""], hud); playerGetReady.addEventListener(CustomEvent.EVT, startRound); initPlayer(); startLoop(introTick); break; case 2: initMouseButton(); break; case 3: initMouseWheel(); break; case 5: allowUserAction = true; break; }; tuteID++; } else { mainTL.removeChild(tuteClip); endRound("q"); }; } private function removeSummaryView():void{ if (summaryView){ mainTL.removeChild(summaryView); summaryView.removeEventListener("onClose", gameStatusCloseHandler); summaryView.removeEventListener("onClick", gameStatusClickHandler); summaryView.destroy(); summaryView = null; }; } private function onPickupCollected(_arg1:Event):void{ var _local2:*; var _local3:*; var _local4:*; var _local5:*; if (!player.active){ return; }; _local2 = _arg1.target; _local3 = _local2.pickup; _local4 = _local2.sendString; if (_local3.type == "w"){ player.playSound("ammo_collect_sound"); player.addWeapon(_local3.obj); if (!player.currWeapon){ player.selectWeapon(0); }; initWeaponMenu(player.currWeapon, true); updateHud(_local3.obj.wName); } else { player.playSound("powerup_sound"); switch (_local3.obj.ref.substr(0, 4)){ case "heal": hud.updateMainStatus(("Health +" + _local3.obj.num), true, false); player.health = (player.health + _local3.obj.num); hud.health = player.health; break; case "spee": hud.updateMainStatus("Speed Boost", true, false); player.speedBoost(_local3.obj.num); break; case "jump": hud.updateMainStatus("Jump Boost", true, false); player.jumpBoost(_local3.obj.num); break; case "wall": hud.updateMainStatus("X-Ray", true, false); Object3D.wallAlpha = true; _local5 = new Timer(10000, 1); _local5.addEventListener(TimerEvent.TIMER_COMPLETE, onWallHackComplete, false, 0, true); _local5.start(); break; }; }; addRequest("pickupCollected", _local3.hash); blinkScreen(); } private function onContextMenu(_arg1:ContextMenuEvent):void{ } private function initWorldObjects():void{ var _local1:Array; _local1 = main.gameConfig.getLayout((gameLevel - 1)); worldBuilder = new WorldBuilder(game, _local1, maxxDist, maxzDepth); } private function debug(_arg1):void{ main.debug(_arg1); } private function startRound(_arg1:Event):void{ initHints(); playerGetReady.removeEventListener(CustomEvent.EVT, startRound); player.spawn(); gameOn = true; if (GAMEMODE != "tutorial"){ Mouse.hide(); spawnOpponents(); initMouseEvents(); }; timeStart = (getTimer() - 2000); startLoop(gameTick); startTimer(socketTick); matchStarted = true; } private function mouseDownHandler(_arg1:MouseEvent):void{ if (!allowUserAction){ if (chatInputField){ chatInputField.focus(); }; return; }; player.pullTrigger(); } private function initRound(_arg1:Event=null):void{ hud.clearMainStatus(); _stage.removeEventListener(MouseEvent.MOUSE_DOWN, initRound); crosshair = new StandardCrosshair(mainTL, 0.5, 0.1); crosshair3D = new CrosshairProxy3D(floor_markers, sw, sh); zoomID = 0; score = 0; hits = 0; shots = 0; if (GAMEMODE != "tutorial"){ playerGetReady = new PlayerGetReady(["", "PWN!", "SET...", "READY?"], hud); playerGetReady.addEventListener(CustomEvent.EVT, startRound); initPlayer(); startLoop(introTick); } else { initTute(); }; } private function keyDownHandler(_arg1:KeyboardEvent):void{ if (chatInputField){ return; }; if (!gameOn){ return; }; switch (_arg1.keyCode){ case Keyboard.ESCAPE: if (GAMEMODE != "normal"){ quitGame(); }; break; case 188: player.cycleWeapons(1); break; case 190: player.cycleWeapons(-1); break; case Keyboard.SHIFT: showGameStatus("Current round", "", false, 0); break; }; } private function onWallHackComplete(_arg1:TimerEvent):void{ var _local2:*; _local2 = _arg1.target; _local2.stop(); _local2.removeEventListener(TimerEvent.TIMER_COMPLETE, onWallHackComplete); Object3D.wallAlpha = false; } private function announce(_arg1:String):void{ var str = _arg1; try { hud.chat("", str); } catch(e:Error) { }; } private function addScore(_arg1:int):void{ score = (score + _arg1); } private function removeChatField():void{ if (chatInputField){ chatInputField.removeEventListener("submitted", onChatSubmitted); chatInputField.destroy(); chatInputField = null; }; } private function initWorld():void{ var _local1:*; var _local2:*; var _local3:*; var _local4:FloorStrip; var _local5:StaticObject3D; var _local6:StaticObject3D; var _local7:Number; var _local8:*; var _local9:*; var _local10:*; var _local11:*; game = new MovieClip(); mainTL.addChild(game); horizon = new Plane3D(utils3D, game, "background", 0, 6000, (viewDistance - 1000), 45000, 22500, 0); horizon.applyDepthOfField = false; floor_markers = []; _local1 = 24; _local2 = (maxzDepth / _local1); _local3 = Math.floor((_local1 / 10)); _local7 = 1; while (_local7 <= _local1) { _local10 = 200; if ((((_local7 > ((_local1 / 2) - _local3))) && ((_local7 < ((_local1 / 2) + _local3))))){ if (!_local9){ _local9 = new Divide(game, (_local2 * (_local7 - 1))); }; _local4 = new FloorStrip(game, 2, 0, 0, (_local2 * _local7)); } else { if (_local9){ _local9 = new Divide(game, (_local2 * (_local7 - 1))); _local9 = null; }; _local4 = new FloorStrip(game, 1, 0, 0, (_local2 * _local7)); }; floor_markers.push(_local4); _local11 = 100; if ((_local7 & 1)){ _local5 = new StaticObject3D(game, "sidemarker", (-(maxxDist) - _local11), 0, (_local2 * _local7)); _local6 = new StaticObject3D(game, "sidemarker", (maxxDist + _local11), 0, (_local2 * _local7)); }; _local7++; }; backWall = new BackWall(game, 0, 0, maxzDepth); backWall.changeProperties({_h:40000}); Object3D.staticObstacles.push(backWall); initWorldObjects(); game.scrollRect = new Rectangle(0, 0, sw, sh); } private function initChat():void{ if (((((!(chatInputField)) && (socket))) && ((GAMEMODE == "normal")))){ activateGame(false); chatInputField = new ChatInputField(hud.clip, {x:10, y:360, w:200, h:18, selectable:false, lockFocus:true, background:true, border:true, defaultText:""}); chatInputField.addEventListener("submitted", onChatSubmitted); }; } private function keyUpHandler(_arg1:KeyboardEvent):void{ if (chatInputField){ return; }; if (!gameOn){ return; }; switch (_arg1.keyCode){ case 122: fpsCounter.toggleVisible(); break; case Keyboard.HOME: case 84: initChat(); break; case Keyboard.SHIFT: hideGameStatus(); break; }; } public function showNewLobbyUser(_arg1:String):void{ hud.chat("Lobby", (("<font color='#ff9900'>" + _arg1) + " joined. (press Esc to return)</font>")); } private function processResponses():void{ var _local1:*; var _local2:String; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:int; var _local11:int; var _local12:String; var _local13:String; var _local14:int; var _local15:RemotePlayer; var _local16:int; var _local17:int; var _local18:int; var _local19:*; var _local20:*; var _local21:String; var _local22:String; var _local23:*; var _local24:*; var _local25:Point3D; var _local26:Object; var _local27:Object; var _local28:Array; var _local29:*; var _local30:uint; var _local31:Array; var _local32:*; var _local33:Number; var _local34:*; var _local35:*; var _local36:*; var _local37:*; var _local38:*; var _local39:*; var _local40:*; var _local41:int; var _local42:Object; if (GAMEMODE != "normal"){ return; }; if (responses.length <= 0){ return; }; _local1 = responses.shift().split(","); _local2 = _local1.splice(0, 1); if (((!(gameOn)) && ((_local2 == "a")))){ return; }; _local15 = _local15[0]; switch (_local2){ case "l": announce("Your opponent has left the game"); _local15.destroy(); if (((gameOn) || (!(matchStarted)))){ endRound("d"); }; return; case "g": if (enableMatchStart){ enableMatchStart = false; setTimeout(initRound, Math.max((socket.serverTime - socket.currentTime), 1)); }; break; case "c": _local13 = _local1.splice(0, 1).toString(); _local14 = _local1.splice(0, 1).toString(); hud.chat(User.getByID(_local13).name, _local1.toString()); break; case "y": _local12 = _local1.splice(0, 1); switch (_local12){ case "c": hud.chat("ADMIN:", _local1.toString()); break; }; break; case "p": _local16 = Number(_local1.splice(0, 1)); _local17 = Number(_local1.splice(0, 1)); _local18 = socket.currentTime; socket.calculateOffsetTime(_local16, _local17, _local18); break; case "k": _local15.die(); player.laugh(); _local19 = _local1.splice(0, 1); _local20 = _local1.splice(0, 1); debug(((("i killed them: killedByID: " + _local19) + ",killedID:") + _local20)); announceKill(_local19, _local20); if (_local19 == player.userID){ kills++; }; break; case "f": debug("game finished"); _local21 = _local1.splice(0, 1); _local22 = _local1.splice(0, 1); endRound(_local22, _local21); break; case "q": if (summaryView){ _local28 = _local1.toString().split("&"); _local29 = []; _local30 = 0; while (_local30 < _local28.length) { _local31 = _local28[_local30].split(","); _local32 = User.getByID(_local31[0]).name; _local33 = int(_local31[1]); _local29.push({name:_local32, kills:_local33}); _local30++; }; summaryView.showScoreTable(_local29); }; break; case "a": timeoutStart = getTimer(); _local13 = _local1.splice(0, 1).toString(); _local23 = _local1.splice(0, 1).toString(); _local14 = Number(_local1.splice(0, 1)); _local24 = _local1; if (!_local15.user){ _local15.assignUser(_local13); }; if (((!((_local23 == "a7"))) && (!(_local15.hasSpawned)))){ debug("***opponent force spawn, equip wepaons"); _local15.spawn(); _local15.equipInitialWeapons(); _local15.selectWeapon(0); _local15.userID = _local13; }; switch (_local23){ case "a1": case "a2": _local4 = -(Number(_local24[0])); _local5 = Number(_local24[1]); _local6 = Number((maxzDepth - int(_local24[2]))); _local7 = Number(_local24[3]); _local8 = Number(_local24[4]); _local9 = Number(_local24[5]); _local15.addMove(_local23, _local4, _local5, _local6, _local7, _local8, _local9, _local14); break; case "a3": _local34 = -(Number(_local24[0])); _local35 = Number(_local24[1]); _local36 = Number((maxzDepth - int(_local24[2]))); _local37 = -(Number(_local24[3])); _local38 = Number(_local24[4]); _local39 = Number((maxzDepth - int(_local24[5]))); _local40 = Math.max(((socket.serverTime - _local14) / 2), 0); debug("***opponent fire weapon"); initFire(_local15, {xpos:_local34, ypos:_local35, zpos:_local36}, {xpos:_local37, ypos:_local38, zpos:_local39}, _local40); break; case "a4": _local41 = Number(_local24[0]); debug(("***opponent arm weapon:" + _local41)); _local15.selectWeapon(_local41); break; case "a5": attachRedMist(_local15.clip, 0, -200); _local15.health = _local24[1]; _local15.updateHealthStatus(); break; case "a7": debug("***opponent spawn"); _local15.spawnPoint.xpos = -(Number(_local24[0])); _local15.spawn(); _local15.equipInitialWeapons(); _local15.userID = _local13; break; case "a9": _local42 = {}; _local42.type = _local24[0]; _local42.id = Number(_local24[1]); _local42.hash = _local24[2]; _local42.xpos = -(Number(_local24[3])); _local42.zpos = Number((maxzDepth - int(_local24[4]))); pickupManager.spawn(_local42); break; case "a10": pickupManager.removeHandler({hash:_local24[0]}); break; }; case "x": _local12 = _local1.splice(0, 1); switch (_local12){ case "666": _local3 = _local1.splice(0, 1); socket.updateSync(_local3); break; }; break; }; } private function hintDone(_arg1:String):void{ var _local2:uint; if (!hintArray){ return; }; if (hintArray.length < 1){ return; }; _local2 = 0; while (_local2 < hintArray.length) { if (hintArray[_local2] == _arg1){ if (hintClip){ if (hintClip.name == _arg1){ removeHint(); }; }; hintArray.splice(_local2, 1); break; }; _local2++; }; } private function addRequest(_arg1:String, _arg2="", _arg3:Boolean=false):void{ if (((socket) && ((GAMEMODE == "normal")))){ socket.addRequest(_arg1, _arg2, _arg3); if (!gameOn){ flushRequests(); }; }; } private function gameTick(_arg1:TimerEvent){ var _local2:Number; var _local3:uint; if (fpsCounter.isVisible){ fpsCounter.update(); }; if (gameOn){ if (!allowUserAction){ player.releaseTrigger(); crosshair.hide(); } else { if ((count % 10) == 0){ detectOpponentMouseOver(); }; if (player.active){ if (player.currWeapon){ crosshair.show(); } else { crosshair.hide(); }; crosshair.update(); crosshair.focus(); } else { crosshair.hide(); }; if (player.currWeapon){ if ((((player.currWeapon.automatic == 1)) && (player.currWeapon.triggerPulled))){ player.currWeapon.pullTrigger(); }; }; player.footStep(1); checkKeysDown(); if ((count % 15) == 0){ if (player.travelDist > 300){ hintDone("move"); initHintCheck(); }; }; }; _local2 = 0; if ((((GAMEMODE == "normal")) && (socket))){ _local2 = socket.serverTime; processResponses(); }; _local3 = 0; while (_local3 < opponents.length) { opponents[_local3].moveByTime(_local2); _local3++; }; }; updateMovableObjects(); if (player.alive){ if (zoomed){ camera.goZoomed(player); player.setView("zoomed"); } else { camera.goFirstPerson(player, crosshair); player.setView("firstperson"); player.updateView(crosshair.xpos, crosshair.ypos); }; } else { camera.goDeathCam(player, 2); if (player.active){ killLocalPlayer(); }; }; renderRealtime(); count++; } private function mouseWheelHandler(_arg1:MouseEvent):void{ var _local2:int; _local2 = ((_arg1.delta > 0)) ? 1 : -1; if (player){ if (player.alive){ player.cycleWeapons(_local2); }; }; } private function removeEvents():void{ pickupManager.removeEventListener("onSpawn", onPickupSpawned); pickupManager.removeEventListener("onCollected", onPickupCollected); _stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); _stage.removeEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler); _stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); } private function initWeaponMenu(_arg1:Weapon=null, _arg2:Boolean=false):void{ if (weaponMenu){ weaponMenu.destroy(); }; weaponMenu = new WeaponMenu(hud.clip, player.inventory, 500, 200, _arg1); if (_arg2){ weaponMenu.show(); }; } private function onSpawn(_arg1:Event){ addRequest("spawn", player.xpos, true); hideGameStatus(); player.removeAllWeapons(); player.equipInitialWeapons(); player.selectWeapon(0); initWeaponMenu(player.currWeapon, true); hud.hideBlood(); hud.health = player.health; hud.updateWeaponStatus(player.currWeapon.weaponName, player.currWeapon.weaponAmmo); } private function gameStatusCloseHandler(_arg1:Event):void{ removeSummaryView(); } private function initMouseWheel():void{ _stage.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler, false); } private function onChatSubmitted(_arg1:Event):void{ var _local2:*; _local2 = _arg1.currentTarget.str; if (_local2.length > 0){ chat(_local2); }; activateGame(); removeChatField(); } private function flushRequests():void{ if (GAMEMODE == "normal"){ socket.sendNextRequest(); }; } private function quitGame(_arg1:Event=null):void{ endRound("q"); } private function onSocketData(_arg1:Event):void{ var _local2:*; var _local3:*; var _local4:uint; if (GAMEMODE != "normal"){ return; }; _local2 = _arg1.target.currResponse; _local3 = _local2.split("|"); _local4 = 0; while (_local4 < _local3.length) { responses.push(_local3[_local4]); _local4++; }; if (!gameOn){ flushCurrentResponses(); }; } private function initMouseEvents():void{ initMouseButton(); initMouseWheel(); } private function mouseUpHandler(_arg1:MouseEvent):void{ if (allowUserAction){ player.releaseTrigger(); }; } private function initMouseButton():void{ _stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); _stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); } private function blinkScreen():void{ if (gameOptions.effectsLevel > 0){ tweenEffects.blinkWhite(game); }; } private function addOpponent():void{ var _local1:Object; var _local2:RemotePlayer; _local1 = spawnPoints["player2"]; if (!opponents){ opponents = []; }; switch (GAMEMODE){ case "normal": _local2 = new RemotePlayer(game, _local1.xpos, _local1.ypos, _local1.zpos); break; case "tutorial": case "campaign": case "practice": _local2 = new CpuPlayer(game, _local1.xpos, _local1.ypos, _local1.zpos); _local2.id = opponents.length; _local2.skill = main.botSkillLevel; _local2.lives = main.maxLives; break; }; _local2.weaponCallback = cpuPlayerWeaponCallback; opponents.push(_local2); } private function updatePerspectives():void{ var _local1:uint; var _local2:*; if (!worldBuilder){ return; }; _local1 = 0; while (_local1 < worldBuilder.perspectiveItems.length) { _local2 = worldBuilder.perspectiveItems[_local1]; _local2.applyPerspective(camera); _local1++; }; } private function renderRealtime():void{ utils3D.update3DPositions(game, Object3D.items3D); updatePerspectives(); } private function attachRedMist(_arg1:MovieClip, _arg2:Number, _arg3:Number):void{ var _local4:*; _local4 = new RedMist(); _local4.rotation = randRange(0, 360); _local4.x = _arg2; _local4.y = _arg3; _arg1.addChild(_local4); tweenEffects.fadeOutAndRemove(_local4, 0.5); } private function removeHint():void{ mainTL.removeChild(hintClip); hintClip = null; } private function showHint(_arg1:uint):void{ var _local2:String; var _local3:*; _local2 = hintArray[_arg1]; _local3 = (getDefinitionByName(("hint_" + _local2)) as Class); hintClip = new (_local3); hintClip.name = _local2; mainTL.addChild(hintClip); } private function initGame():void{ var _local1:uint; var _local2:Timer; var _local3:int; var _local4:MovieClip; kills = 0; deaths = 0; SpriteSheetManager.initialise(); Object3D.initialiseClass(); Itinerary.initialise(); Powerups.initialise(); RemotePlayer.initialiseClass(); worldBounds = {xMin:-(maxxDist), xMax:maxxDist, zMin:200, zMax:maxzDepth}; spawnPoints = new Array(); spawnPoints["player1"] = new Point3D(0, 0, 200); spawnPoints["player2"] = new Point3D(0, 0, (maxzDepth - 200)); origin = new Point3D((sw / 2), (sh / 2), 5000); camera = new Camera3D(origin); utils3D = new Utils3D(camera, origin, viewDistance, focalLength); initWorld(); _local1 = 0; while (_local1 < main.difficulty) { addOpponent(); _local1++; }; pickupManager = new PickupManager(game, ["w", "p"], {xMin:-(maxxDist), xMax:maxxDist, zMin:(moveBounds1.zMax - 350), zMax:moveBounds1.zMax}); pickupManager.addEventListener("onSpawn", onPickupSpawned); pickupManager.addEventListener("onCollected", onPickupCollected); hud = new ShooterHud(mainTL, sw, sh); hud.playerLives = LocalPlayer.LIVES_REMAINING; hud.health = 100; opponentLivesRemaining = (opponents.length * main.maxLives); hud.opponentLives = opponentLivesRemaining; _local3 = 1200; switch (GAMEMODE){ case "campaign": hud.updateMainStatus("Match starting...", false); _local2 = new Timer(_local3, 1); _local2.addEventListener(TimerEvent.TIMER_COMPLETE, initRound, false, 0, true); _local2.start(); break; case "practice": hud.hideTime(); _local4 = new quitGameBtn(); hud._clip.addChild(_local4); hud.updateMainStatus("Practice starting...", false); _local2 = new Timer(_local3, 1); _local2.addEventListener(TimerEvent.TIMER_COMPLETE, initRound, false, 0, true); _local2.start(); break; case "tutorial": hud.hideLives(); hud.hideTime(); hud.hideHealth(); hud.hideAmmo(); hud.updateMainStatus("Ultrakillz 101...", false); _local2 = new Timer(_local3, 1); _local2.addEventListener(TimerEvent.TIMER_COMPLETE, initRound, false, 0, true); _local2.start(); break; case "normal": hud.updateMainStatus("Waiting for other players...", false); break; }; hud.countdownSound = new timeCountdownSound(); timeLeft = timeLimit; hud.time = timeLeft; addRequest("ready", "", true); fpsCounter = new FpsCounter(mainTL, (sw / 2), (sh - 18)); fpsCounter.setVisible(false); camera.goOverview(); renderRealtime(); activateGame(); if (GAMEMODE == "practice"){ allowUserAction = false; }; _stage.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler); _stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); } private function gameStatusClickHandler(_arg1:Event):void{ removeSummaryView(); exitGameController(); } private function onProjectileHit(_arg1:Event):void{ var _local2:*; var _local3:*; var _local4:*; var _local5:Explosion3D; var _local6:String; var _local7:*; var _local8:*; var _local9:*; _local2 = _arg1.target; _local3 = _local2.ammoObj; _local2.removeMe = true; if ((_local2.playerHit is CpuPlayer)){ if (((_local2.playerHit) && (!(player.invincible)))){ if (_local2.playerHit != player){ if (_local2.playerHit.active){ _local2.playerHit.onImpact(); _local2.playerHit.health = (_local2.playerHit.health - _local2.hitDamage); _local2.playerHit.updateHealthStatus(); hits++; addScore(_local2.hitDamage); if (!_local2.playerHit.alive){ _local2.playerHit.lives--; opponentLivesRemaining--; _local2.playerHit.die(); addScore(KILL_SCORE); hud.opponentLives = opponentLivesRemaining; player.laugh(); if (opponentLivesRemaining <= 0){ endRound("k", "w"); } else { _local6 = ((opponentLivesRemaining > 1)) ? "KILLZ" : "KILL"; hud.updateMainStatus((((opponentLivesRemaining + " ") + _local6) + " REMAINING!"), true, true); }; }; attachRedMist(_local2.playerHit.clip, 0, -150); }; }; }; }; if (!gameOn){ return; }; if ((((((((_local2.playerHit == player)) && ((_local2.hitDamage > 0)))) && (player.alive))) && (!(player.invincible)))){ attachRedMist(hud.clip, (sw / 2), (sh / 2)); if (gameOptions.effectsLevel > 0){ tweenEffects.blinkRed(game, 0.2); }; _local7 = (Utils3D.getAngle(new Point3D(_local2.xpos, _local2.ypos, _local2.zpos), player) * -1); _local8 = (Math.cos(_local7) * _local3.damage); _local9 = (Math.sin(_local7) * _local3.damage); player.execImpact(new Velocity3D(_local8, 0, _local9)); player.hitByID = _local2.ownerID; player.health = (player.health - _local2.hitDamage); player.onImpact(); hud.health = player.health; addRequest("hit", ((player.hitByID + ",") + int(player.health))); }; _local4 = _local3.explosionSize; _local5 = new Explosion3D(game, _local3.blastLinkage, _local4, _local2.xpos, _local2.ypos, (_local2.zpos - 1)); } private function chat(_arg1:String):void{ addRequest("chat", _arg1); hud.chat(User.localUser.name, _arg1); } private function showGameStatus(_arg1:String, _arg2:String, _arg3:Boolean=false, _arg4:int=800):void{ if (summaryView){ return; }; activateGame(false); summaryView = new SummaryView(); if (_arg4 > 0){ summaryView.delayTime = _arg4; }; summaryView.allowClick = _arg3; summaryView.addEventListener("onClick", gameStatusClickHandler); summaryView.addEventListener("onClose", gameStatusCloseHandler); summaryView.title = _arg1; summaryView.msg = _arg2; addRequest("scoretable", "", true); mainTL.addChild(summaryView); } private function hideGameStatus():void{ activateGame(); removeSummaryView(); } private function announceKill(_arg1, _arg2):void{ if (_arg1 == _arg2){ announce((User.getByID(_arg2).name + " killed themselves...idiots!")); } else { announce(((User.getByID(_arg2).name + " was killed by ") + User.getByID(_arg1).name)); }; } private function processRemainingPacketsLoop():void{ endTimer = new Timer(100); endTimer.addEventListener(TimerEvent.TIMER, remainingPacketsHandler); endTimer.start(); } private function initFire(_arg1:Player, _arg2:Object, _arg3:Object, _arg4:Number=0):void{ var _local5:*; var _local6:Projectile3D; var _local7:*; var _local8:MuzzleFlash; _local5 = _arg1; _local7 = Math.floor((_arg4 / timeUnit)); switch (_local5.currWeapon.ammoType){ case "rockets": _local6 = new Rocket(game, _local7, _local5, _arg2.xpos, _arg2.ypos, _arg2.zpos, _arg3.xpos, _arg3.ypos, _arg3.zpos); break; case "bullets": _local6 = new Bullet(game, _local7, _local5, _arg2.xpos, _arg2.ypos, _arg2.zpos, _arg3.xpos, _arg3.ypos, _arg3.zpos); break; case "grenades": _local6 = new Grenade(game, _local7, _local5, _arg2.xpos, _arg2.ypos, _arg2.zpos, _arg3.xpos, _arg3.ypos); break; }; _local6.addEventListener("onProjectileHit", onProjectileHit, false, 100); _local6.initialise(); _local8 = new MuzzleFlash(_local5.clip.gfx.flashHolder, "muzzleFlash", 1); _local8.addEventListener("complete", onMuzzleFlashComplete); } private function updateHud(_arg1:String):void{ var statusText = _arg1; if (statusText != ""){ hud.updateMainStatus(statusText, true, false); }; try { hud.updateWeaponStatus(player.currWeapon.weaponName, player.currWeapon.weaponAmmo); } catch(e:Error) { hud.updateWeaponStatus("", 0); }; } private function remainingPacketsHandler(_arg1:TimerEvent):void{ processResponses(); } private function stopGeneralProcesses():void{ if (crosshair){ crosshair.hide(); }; if (weaponMenu){ weaponMenu.destroy(); }; if (player){ endPlayer(); }; removeEvents(); } private function endRound(_arg1:String="", _arg2:String=""):void{ var _local3:uint; var _local4:*; var _local5:String; var _local6:String; Mouse.show(); enableMatchStart = false; gameOn = false; _local3 = 0; while (_local3 < opponents.length) { opponents[_local3].gameOn = false; _local3++; }; processRemainingPacketsLoop(); stopGeneralProcesses(); stopAllHints(); _local4 = []; _local4["w"] = "win"; _local4["l"] = "lose"; _local4["d"] = "draw"; _local5 = ""; _local6 = ""; switch (_arg1){ case "c": _local5 = "Server Disconnect"; _local6 = "You were disconnected - sorry"; break; case "q": _local5 = "Quitter!"; _local6 = "Are you sure you want to quit?"; break; case "d": _local5 = "No one's here!"; _local6 = "The other players left the game"; _arg2 = "w"; break; case "t": _local5 = "Round Over"; _local6 = "Time ran out"; break; case "k": _local5 = "Round Over"; _local6 = "Kill Limit reached"; break; }; if (_arg2 != ""){ main.prevGame.winStatus = _local4[_arg2]; _local6 = (_local6 + ("<br/>You " + _local4[_arg2])); }; main.prevGame.roundScore = score; main.prevGame.roundTimeRemaining = ((_arg2 == "l")) ? 0 : hud.time; main.prevGame.roundAccuracy = int(((hits / shots) * 100)); hideGameStatus(); if (_arg1 == "q"){ exitGameController(); } else { if (GAMEMODE == "campaign"){ TweenLite.to(mainTL, 0.9, {tint:0x101010, delay:3, onComplete:exitGameController}); } else { showGameStatus("End of Round", _local6, true); }; }; } private function spawnOpponents():void{ var _local1:uint; var _local2:RemotePlayer; _local1 = 0; while (_local1 < opponents.length) { _local2 = opponents[_local1]; if ((_local2 is CpuPlayer)){ CpuPlayer(_local2).autoSpawn(); }; _local1++; }; } private function activateGame(_arg1:Boolean=true):void{ if (_arg1){ _stage.focus = null; allowUserAction = true; game.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0); } else { allowUserAction = false; game.transform.colorTransform = new ColorTransform(1, 1, 1, 1, -20, -20, -20, 0); }; } private function cpuPlayerWeaponCallback(_arg1):void{ var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; var _local8:*; _local2 = _arg1.target.owner; switch (_arg1.modeStr){ case "fired": _local3 = 1000; _local4 = (_local3 - (_local3 * _local2.skill)); _local5 = (player.ypos - 100); _local6 = (randRange((-(_local4) / 2), (_local4 / 2)) + (player.xSpeed * 10)); _local7 = (randRange((-(_local4) / 3), (_local4 / 3)) + (player.ySpeed * 10)); _local8 = (randRange((-(_local4) / 2), 0) + (player.zSpeed * 10)); initFire(_local2, new Point3D(_local2.xpos, (_local2.ypos - 100), _local2.zpos), new Point3D((player.xpos + _local6), (_local5 + _local7), (player.zpos + _local8))); break; }; } private function initHintCheck():void{ var _local1:int; if (!hintArray){ return; }; if (hintArray.length <= 0){ return; }; _local1 = 10000; hintTimer = new Timer(_local1, 1); hintTimer.addEventListener(TimerEvent.TIMER_COMPLETE, nextHint); hintTimer.start(); } private function endPlayer():void{ player.removeEventListener(CustomEvent.EVT, onSpawn); player.destroy(); } private function onPickupSpawned(_arg1:Event):void{ addRequest("pickupSpawned", _arg1.target.sendString); } private function initHints():void{ } public function showNewLobbyRoom(_arg1:Room):void{ if (_arg1.ranked == 1){ hud.chat("Lobby", "<font color='#ff9900'>A new clan match was created. (press Esc to return and join)</font>"); } else { hud.chat("Lobby", "<font color='#ff9900'>A new multiplayer match was created. (press Esc to return and join)</font>"); }; } private function socketTick(_arg1:TimerEvent):void{ var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; var _local8:*; if (!gameOn){ return; }; if (GAMEMODE == "tutorial"){ return; }; hud.time = Math.max((timeLimit - int(((getTimer() - timeStart) / 1000))), 0); if (GAMEMODE == "practice"){ hud.time = 99; }; if ((((GAMEMODE == "campaign")) && ((hud.time <= 0)))){ endRound("t", "l"); return; }; _local3 = NumberUtils.round2dp(player.xpos); _local4 = NumberUtils.round2dp(player.ypos); _local5 = NumberUtils.round2dp(player.zpos); _local6 = NumberUtils.round2dp(player.xSpeed); _local7 = NumberUtils.round2dp(player.ySpeed); _local8 = NumberUtils.round2dp(player.zSpeed); if (player.isMoving){ _local2 = ((((((((((_local3 + ",") + _local4) + ",") + _local5) + ",") + _local6) + ",") + _local7) + ",") + _local8); addRequest("move2", _local2); idleSent = false; } else { if (!idleSent){ idleSent = true; _local2 = (((((_local3 + ",") + _local4) + ",") + _local5) + ",0,0,0"); addRequest("move1", _local2); }; }; if ((timerCount % int(((1000 / tickDelay) * 2))) == 0){ addRequest("ping", "", true); if ((((GAMEMODE == "normal")) && (!(socket.connected)))){ endRound("c"); }; }; if ((timerCount % 60) == 0){ pickupManager.spawn(); }; flushRequests(); timerCount++; } private function forceGCCleanUp():void{ try { new LocalConnection().connect("foo"); new LocalConnection().connect("foo"); } catch(e) { }; } public function destroyView():void{ Object3D.removeAllObjects(); pickupManager.destroy(); hud.destroy(); hud = null; if (crosshair){ crosshair.destroy(); crosshair = null; }; fpsCounter.destroy(); fpsCounter = null; mainTL.removeChild(game); game = null; backWall = null; horizon = null; floor_markers = null; _stage.removeChild(mainTL); bitmapList.unloadList("GAME"); if (GAMEMODE == "normal"){ bitmapList.unloadList("ICON"); }; forceGCCleanUp(); } private function playerWeaponCallback(_arg1):void{ var _local2:String; var _local3:String; var _local4:*; var _local5:*; var _local6:Object; var _local7:Object; var _local8:*; _local2 = ""; if (!gameOn){ return; }; if ((((GAMEMODE == "tutorial")) && ((crosshair.ypos > (main.sh - 75))))){ return; }; switch (_arg1.modeStr){ case "arming": crosshair.hide(); initWeaponMenu(); weaponMenu.hover(player.currWeaponID); weaponMenu.show(); if (player.currWeaponID != 0){ hintDone("fireWeapon"); initHintCheck(); }; addRequest("arming", player.currWeapon.menuIndex, true); break; case "armed": crosshair.show(); weaponMenu.select(player.currWeaponID); break; case "fired": _local4 = {}; _local5 = -150; _local4.x = (player.weaponPos.x + player.xpos); _local4.y = ((player.weaponPos.y + player.ypos) + _local5); _local4.z = player.zpos; _local6 = {xpos:int(_local4.x), ypos:int(_local4.y), zpos:int(_local4.z)}; switch (player.currWeapon.ammoType){ case "rockets": case "bullets": _local7 = crosshair3D.getPosition(player.zpos, crosshair.xpos, crosshair.ypos); initFire(player, _local6, _local7); _local3 = ((((((((((_local6.xpos + ",") + _local6.ypos) + ",") + _local6.zpos) + ",") + _local7.xpos) + ",") + _local7.ypos) + ",") + _local7.zpos); break; case "grenades": _local8 = crosshair3D.getAngle(crosshair.xpos, crosshair.ypos); initFire(player, _local6, _local8); _local3 = ((((((((_local6.xpos + ",") + _local6.ypos) + ",") + _local6.zpos) + ",") + _local8.xpos) + ",") + _local8.ypos); break; }; shots++; addRequest("firing", _local3); player.recoil(); crosshair.recoil(player.currWeapon.recoil); break; case "outOfAmmo": player.removeCurrentWeapon(); player.selectNextBestWeapon(); initWeaponMenu(player.currWeapon, true); break; case "reloading": crosshair.hide(); break; case "reloaded": crosshair.show(); break; }; updateHud(_local2); } private function stopAllHints():void{ if (hintClip){ mainTL.removeChild(hintClip); hintClip = null; }; if (hintTimer){ hintTimer.stop(); hintTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, nextHint); hintTimer = null; }; } public function showLobbyChat(_arg1:String, _arg2:String):void{ hud.chat(_arg1, _arg2); } private function zoom(_arg1:int=-1):void{ var _local2:*; if (((zooming) || (!(player.active)))){ return; }; _local2 = [baseFocalLength, (baseFocalLength * 2)]; if (_arg1 != -1){ zoomID = _arg1; } else { zoomID = ((zoomID < (_local2.length - 1))) ? (zoomID + 1) : 0; }; zoomed = ((zoomID > 0)) ? true : false; focalLength = (utils3D.focalLength = _local2[zoomID]); } private function detectOpponentMouseOver():void{ var _local1:Boolean; var _local2:uint; var _local3:RemotePlayer; if (GAMEMODE != "normal"){ return; }; _local1 = (crosshair3D.getPosition(player.zpos, crosshair.xpos, crosshair.ypos, true).targetObject3D is RemotePlayer); _local2 = 0; while (_local2 < opponents.length) { _local3 = opponents[_local2]; if (_local3.playerIdentity){ if (_local1){ if (_local3.active){ _local3.playerIdentity.show(); }; } else { _local3.playerIdentity.hide(); }; }; _local2++; }; } private function checkKeysDown():void{ var _local1:uint; var _local2:uint; if (!allowUserAction){ return; }; if (_stage.focus != null){ _stage.focus = null; }; player.movex = 0; player.movez = 0; if (((keyIsDown(Keyboard.LEFT)) || (keyIsDown(65)))){ player.movex = -1; } else { if (((keyIsDown(Keyboard.RIGHT)) || (keyIsDown(68)))){ player.movex = 1; }; }; if (((keyIsDown(Keyboard.UP)) || (keyIsDown(87)))){ player.movez = 1; } else { if (((keyIsDown(Keyboard.DOWN)) || (keyIsDown(83)))){ player.movez = -1; }; }; if (((!((player.movex == 0))) || (!((player.movez == 0))))){ player.walk(); }; if (keyIsDown(Keyboard.SPACE)){ player.jump(); }; if (keyIsDown(Keyboard.CONTROL)){ zoom(); zooming = true; } else { zooming = false; }; _local1 = 0; _local2 = 49; while (_local2 < 58) { if (keyIsDown(_local2)){ player.selectWeapon(_local1); }; _local1++; _local2++; }; } private function updateMovableObjects():void{ var _local1:uint; _local1 = 0; while (_local1 < Object3D.movableObjects.length) { if (!Object3D.movableObjects[_local1].removeMe){ Object3D.movableObjects[_local1].move(); } else { Object3D.movableObjects.splice(_local1, 1); }; _local1++; }; } private function initTute():void{ tutorialSeq = []; tutorialSeq[0] = {ref:"intro", title:"Ultrakillz tutorial", body:"This is a quick run-down on how to play Ultrakillz.<br />It should only take a minute."}; tutorialSeq[1] = {ref:"aim", title:"Aiming your weapon", body:"Move your MOUSE or TOUCH-PAD to move the crosshair..."}; tutorialSeq[2] = {ref:"fire", title:"Firing your weapon", body:"Press the LEFT MOUSE BUTTON to fire your weapon..."}; tutorialSeq[3] = {ref:"ammoselect", title:"Selecting your ammo", body:"You can use your MOUSEWHEEL<br />or the NUMBER KEYS at the top of the keyboard to switch your ammo..."}; tutorialSeq[4] = {ref:"moving0", title:"Moving around", body:"Most FPS (first person shooter) games<br />use the same keyboard layout for moving around..."}; tutorialSeq[5] = {ref:"moving1", title:"Moving around", body:"With this game it's the same keys:<br />W, A, S, and D"}; tutorialSeq[6] = {ref:"moving2", title:"Moving around", body:"You can also use the arrow keys:<br />UP, DOWN, LEFT and RIGHT..."}; tutorialSeq[7] = {ref:"moving3", title:"Moving around", body:"Use the SPACE BAR to jump.<br />This can be used to get on platforms and dodge projectiles."}; tutorialSeq[8] = {ref:"done", title:"Go PWN!", body:"That's it! You now know how to play.<br />Now go kick some n00b butt!"}; tuteID = 0; tuteClip = new tutorialClip(); tuteClip.nextBtn.setText("Next"); tuteClip.nextBtn.addEventListener(MouseEvent.MOUSE_DOWN, nextTute, false, 0, true); mainTL.addChild(tuteClip); nextTute(); } private function exitGameController():void{ addRequest("leave", "", true); endLoop(); if (endTimer){ endTimer.stop(); endTimer.removeEventListener(TimerEvent.TIMER, remainingPacketsHandler); endTimer = null; }; _stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); _stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpHandler); if (socket){ socket.removeEventListener("onSocketData", onSocketData); }; switch (GAMEMODE){ case "normal": main.goInterlude(); break; case "campaign": main.goLevelSummary(); break; case "practice": main.removePracticeSession(); break; case "tutorial": main.endTutorial(); break; default: main.goHome(); break; }; } private function flushCurrentResponses():void{ var _local1:uint; _local1 = 0; while (_local1 < responses.length) { processResponses(); _local1++; }; } } }//package uk.co.barraxworld.game.projects.ultrakillz.controllers
Section 112
//HighscoresController (uk.co.barraxworld.game.projects.ultrakillz.controllers.HighscoresController) package uk.co.barraxworld.game.projects.ultrakillz.controllers { import flash.display.*; import flash.events.*; import uk.co.barraxworld.game.projects.ultrakillz.*; import uk.co.barraxworld.game.projects.ultrakillz.interfaces.*; import mochi.*; public class HighscoresController implements IController { private var view:MovieClip; private var main:Main; private var _stage:Stage; public function HighscoresController(){ main = Main.getInstance(); _stage = main._stage; initView(); } public function destroyView():void{ _stage.removeChild(view); } private function closeMe():void{ main.removeCurrentOverlay(); } private function initView():void{ var w:*; var h:*; view = new HighscoresView(); _stage.addChild(view); w = view.holder.width; h = view.holder.height; MochiScores.showLeaderboard({res:((w + "x") + h), clip:view.holder, onClose:closeMe, onError:function ():void{ }}); } } }//package uk.co.barraxworld.game.projects.ultrakillz.controllers
Section 113
//HomeController (uk.co.barraxworld.game.projects.ultrakillz.controllers.HomeController) package uk.co.barraxworld.game.projects.ultrakillz.controllers { import flash.display.*; import flash.events.*; import gs.*; import uk.co.barraxworld.game.projects.ultrakillz.*; import uk.co.barraxworld.game.projects.ultrakillz.interfaces.*; public class HomeController implements IController { private var view:MovieClip; private var main:Main; private var _stage:Stage; public function HomeController(){ main = Main.getInstance(); _stage = main._stage; initView(); } public function destroyView():void{ view.template.destroy(); _stage.removeChild(view); } private function goHighscores():void{ main.goHighscores(); } private function btnClick(_arg1:MouseEvent):void{ _arg1.target.callback(); } private function goMultiplayer():void{ main.goMultiplayer(); } private function initView():void{ var _local1:Sprite; var _local2:*; var _local3:uint; var _local4:MovieClip; view = new HomeView(); _local1 = new Sprite(); _local2 = []; _local2.push({title:"Single Player", callback:goPlay}); _local2.push({title:"Multiplayer", callback:goMultiplayer}); _local2.push({title:"How to Play", callback:goHowToPlay}); _local2.push({title:"Options", callback:goOptions}); if (main.deployment == Main.DEPLOYMENT_MOCHIAD){ _local2.push({title:"Highscores", callback:goHighscores}); }; _local3 = 0; while (_local3 < _local2.length) { _local4 = new genericButton(); TweenLite.from(_local4, 0.3, {alpha:0, tint:0xFFFFFF, delay:(_local3 * 0.1)}); _local4.y = (_local3 * (_local4.height + 10)); _local4.setText(_local2[_local3].title); _local4.callback = _local2[_local3].callback; _local4.addEventListener(MouseEvent.MOUSE_DOWN, btnClick, false, 0, true); _local1.addChild(_local4); _local3++; }; _local1.x = (main.sw / 2); _local1.y = (((main.sh / 2) - (_local1.height / 2)) + 60); view.addChild(_local1); _stage.addChild(view); } private function goOptions():void{ main.goOptions(); } private function goHowToPlay():void{ main.goHowToPlay(); } private function goPlay():void{ main.goPlay(); } } }//package uk.co.barraxworld.game.projects.ultrakillz.controllers
Section 114
//HowToPlayController (uk.co.barraxworld.game.projects.ultrakillz.controllers.HowToPlayController) package uk.co.barraxworld.game.projects.ultrakillz.controllers { import flash.display.*; import flash.events.*; import uk.co.barraxworld.game.projects.ultrakillz.*; import uk.co.barraxworld.game.projects.ultrakillz.interfaces.*; public class HowToPlayController implements IController { private var view:MovieClip; private var main:Main; private var _stage:Stage; public function HowToPlayController(){ main = Main.getInstance(); _stage = main._stage; initView(); } private function goTutorial(_arg1:MouseEvent):void{ main.goTutorial(); } private function goHome(_arg1:MouseEvent):void{ main.goHome(); } private function initView():void{ view = new HowToPlayView(); view.btnHome.setText("« Back"); view.btnHome.addEventListener(MouseEvent.MOUSE_DOWN, goHome, false, 0, true); view.btnTute.setText("Play the tutorial"); view.btnTute.addEventListener(MouseEvent.MOUSE_DOWN, goTutorial, false, 0, true); _stage.addChild(view); } public function destroyView():void{ view.template.destroy(); _stage.removeChild(view); } } }//package uk.co.barraxworld.game.projects.ultrakillz.controllers
Section 115
//InterludeController (uk.co.barraxworld.game.projects.ultrakillz.controllers.InterludeController) package uk.co.barraxworld.game.projects.ultrakillz.controllers { import flash.display.*; import flash.events.*; import flash.geom.*; import uk.co.barraxworld.game.projects.ultrakillz.*; import uk.co.barraxworld.game.projects.ultrakillz.interfaces.*; import uk.co.barraxworld.ads.*; import flash.utils.*; public class InterludeController implements IController { private var msgTimer:Timer; private var _stage:Stage; private var msgComplete:Boolean;// = false private var msgID:int;// = 0 private var view:MovieClip; private var rejoinTimer:Timer; private var adHolder:MovieClip; private var main:Main; public function InterludeController(){ msgID = 0; msgComplete = false; super(); main = Main.getInstance(); _stage = main._stage; initView(); } private function initView():void{ view = new InterludeView(); view.msgField.htmlText = ""; _stage.addChild(view); view.adHolder.scrollRect = new Rectangle(0, 0, 300, 300); MochiAd.showInterLevelAd({clip:view.adHolder.holder, id:"317ca6d3cff7ce7b", res:"300x300", ad_finished:adFinished}); msgTimer = new Timer(1500); msgTimer.addEventListener(TimerEvent.TIMER, updateStatusMessage); msgTimer.start(); } private function readyHandler(_arg1:TimerEvent):void{ if (msgComplete){ rejoinTimer.stop(); main.goPlay(); }; } private function updateStatusMessage(_arg1:TimerEvent):void{ var _local2:*; var _local3:*; var _local4:*; _local2 = []; _local2[0] = "Saving your killz..."; _local2[1] = "Getting your rank..."; _local2[2] = "Rejoining lobby..."; _local3 = []; _local3[0] = "<font color='#ff9900'>Done!</font>"; _local3[1] = "<font color='#ff9900'>Done!</font>"; _local3[2] = "<font color='#ff9900'>connecting...</font>"; _local4 = []; _local4[0] = _local2[0]; _local4[1] = (_local2[0] + _local3[0]); _local4[2] = ((_local4[1] + "<br/>") + _local2[1]); _local4[3] = (((_local4[1] + "<br/>") + _local2[1]) + _local3[1]); _local4[4] = ((_local4[3] + "<br/>") + _local2[2]); _local4[5] = (((_local4[3] + "<br/>") + _local2[2]) + _local3[2]); if (msgID >= _local4.length){ msgTimer.stop(); msgComplete = true; return; }; view.msgField.htmlText = _local4[msgID]; msgID++; } private function adFinished(_arg1:Event=null):void{ rejoinTimer = new Timer(100); rejoinTimer.addEventListener(TimerEvent.TIMER, readyHandler); rejoinTimer.start(); } public function destroyView():void{ rejoinTimer.removeEventListener(TimerEvent.TIMER, readyHandler); rejoinTimer = null; msgTimer.removeEventListener(TimerEvent.TIMER, updateStatusMessage); msgTimer = null; _stage.removeChild(view); } } }//package uk.co.barraxworld.game.projects.ultrakillz.controllers
Section 116
//LevelSelectController (uk.co.barraxworld.game.projects.ultrakillz.controllers.LevelSelectController) package uk.co.barraxworld.game.projects.ultrakillz.controllers { import flash.display.*; import flash.events.*; import gs.*; import flash.geom.*; import uk.co.barraxworld.game.projects.ultrakillz.*; import uk.co.barraxworld.game.projects.ultrakillz.interfaces.*; import uk.co.barraxworld.ui.*; import flash.filters.*; public class LevelSelectController implements IController { private var view:MovieClip; private var numLevels:int; private var main:Main; private var _stage:Stage; public function LevelSelectController(){ main = Main.getInstance(); _stage = main._stage; initView(); } public function destroyView():void{ view.template.destroy(); _stage.removeChild(view); } private function goBack(_arg1:MouseEvent):void{ main.goDifficulty(); } private function onSelected(_arg1:Event):void{ var _local2:int; _local2 = (_arg1.target.id + 1); main.botSkillLevel = main.gameConfig.getBotSkill(_arg1.target.id); _arg1.target.destroy(); main.currLevel = _local2; main.goCampaign(); } private function initView():void{ var _local1:int; var _local2:int; var _local3:Boolean; var _local4:String; var _local5:*; var _local6:uint; var _local7:*; var _local8:*; var _local9:*; var _local10:uint; var _local11:Boolean; var _local12:Boolean; view = new LevelSelectView(); view.backBtn.setText("« Back "); view.backBtn.addEventListener(MouseEvent.MOUSE_DOWN, goBack, false, 0, true); _local1 = main.numLevels; _local2 = main.currLevel; _local3 = ((int(main.cookie.getItem("campaign_unlocked")) > main.difficulty)) ? true : false; view.unlockedMC.visible = _local3; _local4 = main.levelsCompleted.join(","); _local5 = []; _local6 = 0; while (_local6 < _local1) { _local10 = (_local6 + 1); _local11 = !((_local4.indexOf(("" + _local10)) == -1)); _local12 = ((_local3) || ((_local2 == _local10))); _local5.push({ref:(((((main.baseURL + "cthumb_") + main.difficulty) + "_") + (_local6 + 1)) + ".jpg"), completed:_local11, locked:!(_local12)}); _local6++; }; _local7 = new ThumbnailSelector2(); _local7.x = 275; _local7.y = 215; view.scrollRect = new Rectangle(0, 0, 550, 400); view.addChild(_local7); _stage.addChild(view); _local8 = []; _local8.push(new DropShadowFilter(10, 60, 0, 1, 20, 20)); _local8.push(new GlowFilter(0, 1, 5, 5, 0.5)); _local7.filters = _local8; _local7.addEventListener("selected", onSelected, false, 0, true); _local9 = {}; _local9.dir = ((main.deployment == Main.DEPLOYMENT_MOCHIAD)) ? "" : "assets/"; _local9.buttons_linkage = "level_select_buttons"; _local9.overlay_linkage = "level_select_overlay"; _local9.w = (_local9.h = 128); _local9.xgap = 15; _local7.initialise(_local5, (_local2 - 1), _local9); TweenLite.from(_local7, 0.4, {alpha:0}); } } }//package uk.co.barraxworld.game.projects.ultrakillz.controllers
Section 117
//LevelSummaryController (uk.co.barraxworld.game.projects.ultrakillz.controllers.LevelSummaryController) package uk.co.barraxworld.game.projects.ultrakillz.controllers { import flash.display.*; import flash.events.*; import gs.*; import com.iopred.opera.*; import uk.co.barraxworld.game.projects.ultrakillz.*; import uk.co.barraxworld.game.projects.ultrakillz.interfaces.*; import mochi.*; public class LevelSummaryController implements IController { private var hs_name_panel:MovieClip; private var tallyID:uint; private var tallyStartIncr:int;// = 10 private var center_y:Number; private var totalGameScore:Number; private var tallyIncr:int; private var arr:Array; private var view:MovieClip; private var count:uint;// = 0 private var btnHolder:MovieClip; private var main:Main; private var _stage:Stage; public function LevelSummaryController(){ tallyStartIncr = 10; count = 0; super(); main = Main.getInstance(); _stage = main._stage; initView(); } private function goNextStage(_arg1:MouseEvent):void{ main.currLevel++; main.goPlay(); } private function tallyNumbers(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:Boolean; _local2 = ((_arg1.value < _arg1.endValue)) ? 1 : -1; _local3 = ((tallyIncr = (tallyIncr * 1.2)) * _local2); _local4 = false; _arg1.value = (_arg1.value + _local3); if ((((((_local2 == 1)) && ((_arg1.value >= _arg1.endValue)))) || ((((_local2 == -1)) && ((_arg1.value <= _arg1.endValue)))))){ _local4 = true; }; if (_local4){ _arg1.value = _arg1.endValue; tallyID++; count = 0; tallyIncr = tallyStartIncr; if (tallyID > (arr.length - 1)){ view.removeEventListener(Event.ENTER_FRAME, tick); btnHolder.visible = true; }; }; count++; renderNumbers(_arg1); } public function destroyView():void{ view.template.destroy(); _stage.removeChild(view); } private function goDifficulty(_arg1:MouseEvent):void{ main.goDifficulty(); } private function initPointsTally():void{ var _local1:Sprite; var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; var _local8:*; var _local9:uint; var _local10:Object; var _local11:MovieClip; var _local12:*; _local1 = new Sprite(); _local2 = main.prevGame.roundScore; _local3 = main.prevGame.roundAccuracy; _local4 = main.prevGame.roundTimeRemaining; _local5 = main.score; _local6 = int(((_local2 / 100) * _local3)); _local7 = (_local4 * 100); _local8 = ((_local2 + _local6) + _local7); totalGameScore = (_local5 + _local8); main.score = totalGameScore; arr = []; arr[0] = {title:"Points:", value:_local2, endValue:0, unitStr:"", scale:1}; arr[1] = {title:"Accuracy:", value:_local3, endValue:0, unitStr:"%", scale:1}; arr[2] = {title:"Time Remaining:", value:_local4, endValue:0, unitStr:"", scale:1}; arr[3] = {title:"Round Total:", value:0, endValue:_local8, unitStr:""}; arr[4] = {title:"Total Score:", value:_local5, endValue:totalGameScore, unitStr:"", scale:1.5}; _local9 = 0; while (_local9 < arr.length) { _local10 = arr[_local9]; _local11 = new roundSummary_tallyItem(); _local11.field1.htmlText = (("<p align='right'>" + _local10.title) + "</p>"); _local11.field2.htmlText = ((("<p align='left'>" + _local10.value) + _local10.unitStr) + "</p>"); _local11.y = (_local9 * _local11.height); arr[_local9].clip = _local11; arr[_local9].id = _local9; _local12 = {alpha:0, delay:(_local9 * 0.1)}; if (_local9 == (arr.length - 1)){ _local12.onComplete = initTally; }; TweenLite.from(_local11, 0.2, _local12); _local1.addChild(_local11); _local9++; }; _local1.x = (main.sw / 2); _local1.y = (center_y - (_local1.height / 2)); view.addChild(_local1); } private function submitScore(_arg1:MouseEvent):void{ var _local2:*; if (hs_name_panel.field.text.length == 0){ return; }; _local2 = {res:((hs_name_panel.width + "x") + hs_name_panel.height), score:totalGameScore, clip:hs_name_panel, name:hs_name_panel.field.text, onClose:onScoreSubmit}; main.cookie.setItem("hs_playername", _local2.name); MochiScores.showLeaderboard(_local2); hs_name_panel.btn.removeEventListener(MouseEvent.MOUSE_DOWN, submitScore); hs_name_panel.btn.buttonMode = false; } private function renderNumbers(_arg1:Object):void{ if ((count % 10) == 0){ TweenLite.killTweensOf(_arg1.clip); _arg1.clip.scaleX = (_arg1.clip.scaleY = 1); TweenLite.from(_arg1.clip, 0.2, {scaleX:1.1, scaleY:1.1}); Opera.instance.playSound("bloop", 3); } else { Opera.instance.playSound("bloop"); }; _arg1.clip.field2.htmlText = ((("<p align='left'>" + _arg1.value) + _arg1.unitStr) + "</p>"); if (_arg1.id < (arr.length - 1)){ if (_arg1.value == _arg1.endValue){ }; }; } private function tick(_arg1:Event):void{ tallyNumbers(arr[tallyID]); } private function initView():void{ var _local1:*; view = new LevelSummaryView(); btnHolder = new MovieClip(); btnHolder.y = 337; view.addChild(btnHolder); if (main.prevGame.winStatus == "win"){ if (main.levelsCompleted.length < (main.numLevels - 1)){ view.titleField.htmlText = "WELL DONE!"; _local1 = new genericButton(); _local1.setText("Next stage"); _local1.addEventListener(MouseEvent.MOUSE_DOWN, goNextStage, false, 0, true); _local1.x = (_local1.width / 2); btnHolder.addChild(_local1); main.levelsCompleted.push(main.currLevel); Opera.instance.playMusic("music_nextlevel", 1, 0); } else { view.titleField.htmlText = "COMPLETED!"; _local1 = new genericButton_small(); _local1.setText("Play again"); _local1.addEventListener(MouseEvent.MOUSE_DOWN, goHome, false, 0, true); _local1.x = (_local1.width / 2); btnHolder.addChild(_local1); addSubmitButton(); if (int(main.cookie.getItem("campaign_unlocked")) <= main.difficulty){ main.cookie.setItem("campaign_unlocked", ((main.difficulty + 1) + "")); }; Opera.instance.playMusic("music_gameover", 1, 0); }; } else { view.titleField.htmlText = "BAD LUCK!"; _local1 = new genericButton_small(); _local1.setText("Try again"); _local1.addEventListener(MouseEvent.MOUSE_DOWN, goHome, false, 0, true); _local1.x = (_local1.width / 2); btnHolder.addChild(_local1); addSubmitButton(); Opera.instance.playMusic("music_gameover", 1, 0); }; center_y = 246; btnHolder.x = ((main.sw / 2) - (btnHolder.width / 2)); btnHolder.visible = false; _stage.addChild(view); initPointsTally(); } private function addSubmitButton():void{ var _local1:*; if (main.deployment == Main.DEPLOYMENT_MOCHIAD){ _local1 = new genericButton_small(); _local1.x = ((btnHolder.width + 10) + (_local1.width / 2)); _local1.setText("Submit"); _local1.addEventListener(MouseEvent.MOUSE_DOWN, goSubmit, false, 0, true); btnHolder.addChild(_local1); }; } private function goHome(_arg1:MouseEvent):void{ main.goHome(); } private function goSubmit(_arg1:MouseEvent):void{ hs_name_panel = new highscoresNamePanel(); view.addChild(hs_name_panel); TweenLite.from(hs_name_panel, 0.8, {alpha:0}); hs_name_panel.field.text = main.cookie.getItem("hs_playername"); hs_name_panel.btn.setText("Submit score"); hs_name_panel.btn.addEventListener(MouseEvent.MOUSE_DOWN, submitScore, false, 0, true); _stage.focus = hs_name_panel.field; } private function onScoreSubmit():void{ main.goHome(); } private function initTally():void{ tallyID = 3; tallyIncr = tallyStartIncr; view.addEventListener(Event.ENTER_FRAME, tick, false, 0, true); } } }//package uk.co.barraxworld.game.projects.ultrakillz.controllers
Section 118
//MultiUserController (uk.co.barraxworld.game.projects.ultrakillz.controllers.MultiUserController) package uk.co.barraxworld.game.projects.ultrakillz.controllers { import flash.display.*; import flash.events.*; import flash.text.*; import uk.co.barraxworld.multiuser.lobby.*; import uk.co.barraxworld.multiuser.server.socket.*; import uk.co.barraxworld.game.projects.ultrakillz.*; import uk.co.barraxworld.game.projects.ultrakillz.interfaces.*; import flash.utils.*; import uk.co.barraxworld.multiuser.server.*; public class MultiUserController implements IController { private var timer:Timer; private var messageOverlay:MessageOverlay; private var announcePort:int; private var connectionTimeoutLimit:int;// = 8000 private var view; private var holder:Sprite; private var sessionID:String; public var socket:UltraKillzSocket; private var main:Main; private var _stage:Stage; public static var serverList:ServerList; public static var instance:MultiUserController; public function MultiUserController(){ connectionTimeoutLimit = 8000; super(); instance = this; main = Main.getInstance(); _stage = main._stage; holder = new menuTemplate(); _stage.addChild(holder); if (main.socket){ if (main.socket.connected){ initLobby(); return; }; }; initialise(); } private function onDisconnected(_arg1:Event):void{ var _local2:*; _local2 = ""; if (socket){ _local2 = (socket.statusString) ? socket.statusString : ""; }; changeView("server"); showMessageOverlay(("You have been disconnected.<br/><br/>Please try again later." + _local2), 3000, main.goHome); removeTimeoutTimer(); removeLobbyListeners(); } private function goPractice(_arg1:Event):void{ main.goPractice(); } private function onServerSelected(_arg1:Event):void{ initSocket(_arg1.target.serverObj); } public function destroyView():void{ _stage.removeChild(holder); removeMessageOverlay(); instance = null; } private function removeTimeoutTimer():void{ if (!timer){ return; }; timer.stop(); timer = null; } private function onConnectFail(_arg1:Event):void{ removeTimeoutTimer(); showMessageOverlay("failed to connect\nperhaps try again later.", 3000, main.goHome); } public function showMessageOverlay(_arg1:String, _arg2:uint=0, _arg3:Function=null):void{ removeMessageOverlay(); messageOverlay = new MessageOverlay(_stage, _arg1, _arg2); messageOverlay.callback = _arg3; messageOverlay.addEventListener("complete", onMessageOverlayComplete, false, 0, true); } private function removeSocket():void{ if (!socket){ return; }; socket.removeEventListener("onConnectSuccess", onConnectSuccess); socket.removeEventListener("onConnectFail", onConnectFail); socket.removeEventListener("onDisconnected", onDisconnected); socket.destroy(); socket = null; User.localUser = null; } private function onLobbyLoaded(_arg1:Event):void{ removeMessageOverlay(); } private function connectTimeout(_arg1:TimerEvent):void{ removeTimeoutTimer(); showMessageOverlay("Connection timed out<br/><br/>Please try again later.", 3000, main.goHome); } private function onMessageOverlayComplete(_arg1:Event):void{ if (messageOverlay.callback != null){ messageOverlay.callback(); }; removeMessageOverlay(); } private function initSocket(_arg1:Object):void{ var _local2:String; var _local3:uint; _local2 = _arg1.ip; _local3 = _arg1.port; announcePort = _local3; socket = UltraKillzSocket.getInstance(); if (!socket){ socket = new UltraKillzSocket(sessionID, _local2, _local3); socket.addEventListener("onConnectSuccess", onConnectSuccess); socket.addEventListener("onConnectFail", onConnectFail); socket.addEventListener("onDisconnected", onDisconnected); }; showMessageOverlay("connecting..."); timer = new Timer(connectionTimeoutLimit, 1); timer.addEventListener(TimerEvent.TIMER_COMPLETE, connectTimeout, false, 0, true); timer.start(); } private function goGame(_arg1:Event):void{ var evt = _arg1; try { main.currLevel = int(Room.currRoom.map); main.goSync(); } catch(e:Error) { main.debug("Game no longer available .. you prolly quit on 0 secs"); }; } public function resumeLobby():void{ if ((view is LobbyView)){ view.resumeAll(); }; } private function initLobby():void{ view = new LobbyView(_stage, holder); view.addEventListener("goGame", goGame); view.addEventListener("goPractice", goPractice); view.addEventListener("disconnect", onDisconnected); view.addEventListener("lobbyReady", onLobbyLoaded); } private function autoSelectServer():void{ initSocket(serverList.sArray[0]); } private function removeLobbyListeners():void{ if (view.hasEventListener("goGame")){ view.removeEventListener("goGame", goGame); view.removeEventListener("goPractice", goPractice); view.removeEventListener("disconnect", onDisconnected); view.removeEventListener("lobbyReady", onLobbyLoaded); }; } private function changeView(_arg1:String):void{ if (view){ view.destroy(); }; switch (_arg1){ case "server": removeSocket(); view = new ServerView(); view.initialise(_stage, "images/flags/_.html?i=", serverList.sArray); view.addEventListener("serverSelected", onServerSelected, false, 0, true); break; case "lobby": socket.sendRequest("[begin]"); initLobby(); return; }; holder.addChild(view); } private function initialise():void{ var _local1:Object; var _local2:String; _local1 = LoaderInfo(_stage.root.loaderInfo).parameters; sessionID = _local1["sid"]; if (!serverList){ _local2 = "http://api.ultrakillz.com/?srv=1"; if (main.local){ _local2 = (_local2 + "&gd=1"); }; serverList = new ServerList(_local2, "all"); serverList.addEventListener("xmlLoaded", onServerListLoaded, false, 0, true); } else { onServerListLoaded(); }; showMessageOverlay("Finding servers..."); } private function onConnectSuccess(_arg1:Event):void{ removeTimeoutTimer(); showMessageOverlay("connected!"); changeView("lobby"); } private function removeMessageOverlay():void{ if (messageOverlay){ messageOverlay.destroy(); messageOverlay = null; }; } private function onServerListLoaded(_arg1:Event=null):void{ removeMessageOverlay(); if (serverList.sArray.length == 1){ autoSelectServer(); } else { changeView("server"); }; } public static function getInstance():MultiUserController{ if (instance != null){ return (instance); }; return (null); } } }//package uk.co.barraxworld.game.projects.ultrakillz.controllers
Section 119
//OptionsController (uk.co.barraxworld.game.projects.ultrakillz.controllers.OptionsController) package uk.co.barraxworld.game.projects.ultrakillz.controllers { import uk.co.barraxworld.game.config.*; import flash.display.*; import flash.events.*; import com.iopred.opera.*; import uk.co.barraxworld.game.projects.ultrakillz.*; import uk.co.barraxworld.game.projects.ultrakillz.interfaces.*; public class OptionsController extends EventDispatcher implements IController { private var gameOptions:GameOptions; private var overlay:Boolean; private var view:MovieClip; private var main:Main; private var _stage:Stage; private static var overlayInstance:OptionsController; public function OptionsController(_arg1:Boolean=false){ gameOptions = GameOptions.getInstance(); main = Main.getInstance(); _stage = main._stage; this.overlay = _arg1; initView(); } private function endOptions():void{ if (overlay){ dispatchEvent(new Event("complete")); } else { main.goHome(); }; } public function destroyView():void{ if (view.template){ view.template.destroy(); }; _stage.removeChild(view); view = null; } private function initView():void{ view = new OptionsView(); if (overlay){ view.gotoAndStop(2); }; view.btn.setText("Done"); view.btn.addEventListener(MouseEvent.MOUSE_DOWN, go, false, 0, true); view.mouseInvertCB.value = ((main.cookie.getItem("invertMouse") == "1")) ? 1 : 0; view.soundOnCB.value = ((main.cookie.getItem("soundOn") == "0")) ? 0 : 1; view.effectsLevelCB.value = ((main.cookie.getItem("effectsLevel") == "0")) ? 0 : 1; view.bg.buttonMode = true; view.bg.useHandCursor = false; _stage.addChild(view); } private function go(_arg1:MouseEvent):void{ view.btn.removeEventListener(MouseEvent.MOUSE_DOWN, go); main.cookie.setItem("soundOn", view.soundOnCB.value.toString()); main.cookie.setItem("invertMouse", view.mouseInvertCB.value.toString()); main.cookie.setItem("effectsLevel", view.effectsLevelCB.value.toString()); gameOptions.soundOn = ((view.soundOnCB.value == 1)) ? true : false; gameOptions.invertMouse = ((view.mouseInvertCB.value == 1)) ? true : false; gameOptions.effectsLevel = view.effectsLevelCB.value; Opera.instance.globalMute = !(gameOptions.soundOn); endOptions(); } public static function overlay():void{ overlayInstance = new OptionsController(true); overlayInstance.addEventListener("complete", OptionsController.removeOverlay); } public static function removeOverlay(_arg1:Event=null):void{ if (!overlayInstance){ return; }; overlayInstance.removeEventListener("complete", OptionsController.removeOverlay); overlayInstance.destroyView(); overlayInstance = null; } } }//package uk.co.barraxworld.game.projects.ultrakillz.controllers
Section 120
//SyncController (uk.co.barraxworld.game.projects.ultrakillz.controllers.SyncController) package uk.co.barraxworld.game.projects.ultrakillz.controllers { import flash.display.*; import flash.events.*; import uk.co.barraxworld.multiuser.lobby.*; import uk.co.barraxworld.multiuser.server.socket.*; import uk.co.barraxworld.game.projects.ultrakillz.*; import uk.co.barraxworld.game.projects.ultrakillz.interfaces.*; import flash.utils.*; public class SyncController implements IController { private var timer:Timer; private var pingID:int; private var view:MovieClip; private var pingStage:int;// = 0 private var tmpTimer:Timer; private var checkTime:int; private var serverOffset:int;// = 0 private var main:Main; private var socket:UltraKillzSocket; private var _stage:Stage; public function SyncController(){ pingStage = 0; serverOffset = 0; super(); main = Main.getInstance(); _stage = main._stage; socket = main.socket; socket.addEventListener("onSocketData", onSocketData); initView(); initPings(1000, 5); pingID = 0; checkTime = 2000; tmpTimer = new Timer(1); tmpTimer.addEventListener(TimerEvent.TIMER, beep); tmpTimer.start(); } private function stopProcesses():void{ view.anim.stop(); view.anim.visible = false; if (socket.hasEventListener("onSocketData")){ socket.removeEventListener("onSocketData", onSocketData); tmpTimer.removeEventListener(TimerEvent.TIMER, beep); tmpTimer.stop(); endPings(); }; } public function destroyView():void{ view.template.destroy(); stopProcesses(); _stage.removeChild(view); } private function debug(_arg1:String):void{ main.debug(_arg1); } private function initView():void{ view = new SyncView(); _stage.addChild(view); } private function timerComplete(_arg1:TimerEvent):void{ endPings(); main.goLoadAssets(); } private function initPings(_arg1:Number, _arg2:Number=0):void{ timer = new Timer(_arg1, _arg2); timer.addEventListener(TimerEvent.TIMER, sendPing); timer.addEventListener(TimerEvent.TIMER_COMPLETE, timerComplete); timer.start(); } private function sendPing(_arg1:TimerEvent):void{ var _local2:String; _local2 = ("p," + socket.currentTime); debug(_local2); socket.sendRequest(_local2); } private function endPings():void{ timer.removeEventListener(TimerEvent.TIMER, timerComplete); timer.removeEventListener(TimerEvent.TIMER, sendPing); timer.stop(); } private function abort(_arg1:String):void{ stopProcesses(); socket.sendRequest("l"); view.field.htmlText = _arg1; setTimeout(main.goPlay, 2000); } private function onSocketData(_arg1:Event):void{ var _local2:String; var _local3:Array; var _local4:String; var _local5:*; var _local6:int; var _local7:int; var _local8:int; _local2 = _arg1.target.currResponse; _local3 = _local2.split(","); _local4 = _local3.splice(0, 1); switch (_local4){ case "l": _local5 = _local3.splice(0, 1); Room.currRoom.removeUser(User.getByID(_local5)); abort("Match Cancelled<br><font size='-2'>(your opponent has left)</font>"); break; case "p": _local6 = Number(_local3.splice(0, 1)); _local7 = Number(_local3.splice(0, 1)); _local8 = socket.currentTime; socket.calculateOffsetTime(_local6, _local7, _local8); debug((("------------ new ping #" + pingID) + "--------------")); debug(((((((("time1 : " + _local6) + " , time2 : ") + _local7) + " , time3 : ") + _local8) + " , offset = ") + socket.serverOffsetTime)); debug(("serverTime guess: " + socket.serverTime)); pingID++; break; }; } private function beep(_arg1:TimerEvent):void{ if (socket.serverTime >= checkTime){ checkTime = (checkTime + 2000); }; } } }//package uk.co.barraxworld.game.projects.ultrakillz.controllers
Section 121
//IController (uk.co.barraxworld.game.projects.ultrakillz.interfaces.IController) package uk.co.barraxworld.game.projects.ultrakillz.interfaces { public interface IController { function destroyView():void; } }//package uk.co.barraxworld.game.projects.ultrakillz.interfaces
Section 122
//ControlHint (uk.co.barraxworld.game.projects.ultrakillz.views.ControlHint) package uk.co.barraxworld.game.projects.ultrakillz.views { import flash.display.*; import flash.events.*; import gs.*; public class ControlHint extends MovieClip { public var keys1:movementKeys; public var keys2:movementKeys; public function ControlHint(){ addEventListener(Event.ADDED_TO_STAGE, init); x = -(width); } public function destroy():void{ TweenLite.killTweensOf(this); removeEventListener(Event.ADDED_TO_STAGE, init); } private function init(_arg1:Event):void{ TweenLite.to(this, 0.5, {x:0}); } } }//package uk.co.barraxworld.game.projects.ultrakillz.views
Section 123
//ScoreTable (uk.co.barraxworld.game.projects.ultrakillz.views.ScoreTable) package uk.co.barraxworld.game.projects.ultrakillz.views { import flash.display.*; import uk.co.barraxworld.utils.*; import flash.text.*; import uk.co.barraxworld.multiuser.lobby.*; public class ScoreTable extends MovieClip { private var arr:Array; private var debugConsole:DebugConsole; public var holder:MovieClip; private var killLimit:Number; public function ScoreTable():void{ debugConsole = DebugConsole.getInstance(); } public function init(_arg1:Array):void{ var scoreTableItem:MovieClip; var ygap:Number; var i:uint; var name:String; var kills:String; var a = _arg1; arr = a; try { killLimit = Room.currRoom.killlimit; } catch(e:Error) { killLimit = 0; }; ygap = 5; i = 0; while (i < arr.length) { name = arr[i].name; kills = arr[i].kills; scoreTableItem = new ScoreTableItem(); scoreTableItem.nameField.htmlText = name; scoreTableItem.killsField.htmlText = ((kills + "/") + killLimit); scoreTableItem.y = (i * (scoreTableItem.height + ygap)); holder.addChild(scoreTableItem); i = (i + 1); }; } private function debug(_arg1:String):void{ debugConsole.debug(((this + " : ") + _arg1)); } } }//package uk.co.barraxworld.game.projects.ultrakillz.views
Section 124
//SummaryView (uk.co.barraxworld.game.projects.ultrakillz.views.SummaryView) package uk.co.barraxworld.game.projects.ultrakillz.views { import flash.display.*; import uk.co.barraxworld.utils.*; import flash.events.*; import flash.text.*; import flash.utils.*; public class SummaryView extends MovieClip { public var nextBtn:genericButton; private var debugConsole:DebugConsole; public var titleField:TextField; private var delayTimer:Timer; public var msgField:TextField; public var delayTime:int; public function SummaryView(){ debugConsole = DebugConsole.getInstance(); addEventListener(Event.ADDED_TO_STAGE, initialise); visible = false; } public function destroy():void{ delayTimer.stop(); delayTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, showMe); delayTimer = null; removeEventListener(Event.ADDED_TO_STAGE, initialise); nextBtn.removeEventListener(MouseEvent.MOUSE_DOWN, clickNextBtn); } private function clickCloseBtn(_arg1:MouseEvent):void{ dispatchEvent(new Event("onClose")); } public function set msg(_arg1:String):void{ msgField.htmlText = _arg1; } public function showScoreTable(_arg1:Array):void{ var _local2:*; _local2 = new scoreTable(); _local2.init(_arg1); addChild(_local2); } private function debug(_arg1:String):void{ debugConsole.debug(((this + " : ") + _arg1)); } private function showMe(_arg1:TimerEvent):void{ visible = true; } public function set title(_arg1:String):void{ titleField.htmlText = _arg1; } public function initialise(_arg1:Event):void{ delayTimer = new Timer(delayTime, 1); delayTimer.addEventListener(TimerEvent.TIMER_COMPLETE, showMe); delayTimer.start(); nextBtn.setText("next"); nextBtn.addEventListener(MouseEvent.MOUSE_DOWN, clickNextBtn); } private function clickNextBtn(_arg1:MouseEvent):void{ dispatchEvent(new Event("onClick")); } public function set allowClick(_arg1:Boolean):void{ nextBtn.visible = _arg1; } } }//package uk.co.barraxworld.game.projects.ultrakillz.views
Section 125
//Template (uk.co.barraxworld.game.projects.ultrakillz.views.Template) package uk.co.barraxworld.game.projects.ultrakillz.views { import flash.display.*; import flash.events.*; import flash.net.*; public class Template extends MovieClip { public var ukzBtn:SimpleButton; public var logo_mc:MovieClip; public var mbxBtn:SimpleButton; public function Template(){ ukzBtn.addEventListener(MouseEvent.MOUSE_DOWN, btn1Handler, false, 0, true); mbxBtn.addEventListener(MouseEvent.MOUSE_DOWN, btn2Handler, false, 0, true); } public function destroy():void{ logo_mc.stop(); } private function btn2Handler(_arg1:MouseEvent):void{ clickthru("http://www.mbxgames.com"); } private function btn1Handler(_arg1:MouseEvent):void{ clickthru("http://www.ultrakillz.com"); } private function clickthru(_arg1:String):void{ var url = _arg1; try { navigateToURL(new URLRequest(url), "_blank"); } catch(e:Error) { }; } } }//package uk.co.barraxworld.game.projects.ultrakillz.views
Section 126
//UKZButton (uk.co.barraxworld.game.projects.ultrakillz.views.UKZButton) package uk.co.barraxworld.game.projects.ultrakillz.views { import uk.co.barraxworld.game.config.*; import flash.display.*; import flash.events.*; import flash.text.*; import com.iopred.opera.*; public class UKZButton extends MovieClip { public var field:TextField; public var bg:MovieClip; private var gameOptions:GameOptions; public function UKZButton(){ gameOptions = GameOptions.getInstance(); stop(); buttonMode = true; mouseChildren = false; addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); } private function mouseDownHandler(_arg1:MouseEvent):void{ if (!gameOptions.soundOn){ return; }; if (buttonMode){ Opera.instance.playSound("button_click", 0.6); }; } public function setText(_arg1:String):void{ field.autoSize = "center"; field.htmlText = _arg1; } private function mouseOverHandler(_arg1:MouseEvent):void{ if (!gameOptions.soundOn){ return; }; if (buttonMode){ Opera.instance.playSound("button_over", 0.2); }; } } }//package uk.co.barraxworld.game.projects.ultrakillz.views
Section 127
//GameConfig (uk.co.barraxworld.game.projects.ultrakillz.GameConfig) package uk.co.barraxworld.game.projects.ultrakillz { import flash.events.*; public class GameConfig extends EventDispatcher { public var layouts:Array; public var ranks:Array; public var levels:Array; public static var instance:GameConfig; public function GameConfig(){ if (instance == null){ instance = this; }; generateLevels(); } public function generateLevels():void{ } public function get numLevels():int{ return (levels.length); } public function getLayout(_arg1:int):Array{ return (levels[_arg1].layout); } public function getThemeID(_arg1:int):int{ return (levels[_arg1].themeID); } } }//package uk.co.barraxworld.game.projects.ultrakillz
Section 128
//GameConfigCampaign (uk.co.barraxworld.game.projects.ultrakillz.GameConfigCampaign) package uk.co.barraxworld.game.projects.ultrakillz { public class GameConfigCampaign extends GameConfig { public var currStage:int; public var stages:Array; override public function generateLevels():void{ layouts = []; layouts[0] = []; layouts[0][0] = {x:0, y:0, z:800, w:300, h:300, d:300}; layouts[0][1] = {x:600, y:0, z:600, w:300, h:300, d:300}; layouts[0][2] = {x:-600, y:0, z:600, w:300, h:300, d:300}; layouts[0][3] = {x:900, y:0, z:300, w:300, h:200, d:200}; layouts[0][4] = {x:-900, y:0, z:300, w:300, h:200, d:200}; layouts[1] = []; layouts[1][0] = {x:-1100, y:0, z:900, w:450, h:700, d:300}; layouts[1][1] = {x:1100, y:0, z:900, w:450, h:700, d:300}; layouts[1][2] = {x:0, y:0, z:900, w:450, h:700, d:300}; layouts[1][3] = {x:-550, y:0, z:650, w:450, h:500, d:300}; layouts[1][4] = {x:550, y:0, z:650, w:450, h:500, d:300}; layouts[1][5] = {x:0, y:0, z:400, w:300, h:300, d:300}; layouts[2] = []; layouts[2][0] = {x:-1100, y:0, z:900, w:450, h:350, d:300}; layouts[2][1] = {x:1100, y:0, z:900, w:450, h:350, d:300}; layouts[2][2] = {x:-550, y:-400, z:899, w:500, h:200, d:300}; layouts[2][3] = {x:550, y:-400, z:899, w:500, h:200, d:300}; layouts[2][4] = {x:0, y:0, z:900, w:450, h:350, d:300}; layouts[2][5] = {x:600, y:0, z:300, w:300, h:300, d:300}; layouts[2][6] = {x:-600, y:0, z:300, w:300, h:300, d:300}; layouts[3] = []; layouts[3][0] = {x:-1300, y:0, z:900, w:800, h:700, d:300}; layouts[3][1] = {x:1300, y:0, z:900, w:800, h:700, d:300}; layouts[3][2] = {x:-800, y:0, z:500, w:600, h:280, d:300}; layouts[3][3] = {x:0, y:0, z:250, w:600, h:280, d:300}; layouts[3][4] = {x:800, y:0, z:500, w:600, h:280, d:300}; layouts[4] = []; layouts[4][0] = {x:0, y:-300, z:900, w:300, h:0x0100, d:300}; layouts[4][1] = {x:-600, y:-300, z:600, w:300, h:0x0100, d:0x0100}; layouts[4][2] = {x:600, y:-300, z:600, w:300, h:0x0100, d:0x0100}; layouts[4][3] = {x:0, y:0, z:300, w:300, h:0x0100, d:0x0100}; layouts[4][4] = {x:-600, y:0, z:300, w:300, h:0x0100, d:0x0100}; layouts[4][5] = {x:600, y:0, z:300, w:300, h:0x0100, d:0x0100}; layouts[4][6] = {x:1000, y:0, z:500, w:300, h:0x0100, d:0x0100}; layouts[4][7] = {x:-1000, y:0, z:500, w:300, h:0x0100, d:0x0100}; layouts[5] = []; layouts[5][0] = {x:-150, y:0, z:550, w:640, h:280, d:300}; layouts[5][1] = {x:600, y:0, z:650, w:320, h:500, d:300}; layouts[5][2] = {x:-600, y:0, z:400, w:320, h:320, d:300}; layouts[5][3] = {x:-1200, y:0, z:900, w:640, h:400, d:300}; layouts[5][4] = {x:1200, y:0, z:900, w:640, h:400, d:300}; layouts[5][5] = {x:-200, y:0, z:900, w:320, h:300, d:180}; levels = []; levels[0] = {}; levels[0].themeID = 1; levels[0].layout = layouts[0]; levels[0].botSkill = 0.1; levels[1] = {}; levels[1].themeID = 1; levels[1].layout = layouts[2]; levels[1].botSkill = 0.3; levels[2] = {}; levels[2].themeID = 1; levels[2].layout = layouts[3]; levels[2].botSkill = 0.5; levels[3] = {}; levels[3].themeID = 3; levels[3].layout = layouts[2]; levels[3].botSkill = 0.1; levels[4] = {}; levels[4].themeID = 3; levels[4].layout = layouts[5]; levels[4].botSkill = 0.2; levels[5] = {}; levels[5].themeID = 3; levels[5].layout = layouts[4]; levels[5].botSkill = 0.5; levels[6] = {}; levels[6].themeID = 2; levels[6].layout = layouts[1]; levels[6].botSkill = 0.3; levels[7] = {}; levels[7].themeID = 2; levels[7].layout = layouts[3]; levels[7].botSkill = 0.7; levels[8] = {}; levels[8].themeID = 2; levels[8].layout = layouts[0]; levels[8].botSkill = 0.9; stages = []; stages[0] = {}; stages[0].levels = [levels[0], levels[1], levels[2]]; stages[1] = {}; stages[1].levels = [levels[3], levels[4], levels[5]]; stages[2] = {}; stages[2].levels = [levels[6], levels[7], levels[8]]; } override public function get numLevels():int{ return (stages[currStage].levels.length); } override public function getLayout(_arg1:int):Array{ return (stages[currStage].levels[_arg1].layout); } public function getBotSkill(_arg1:int):Number{ return (stages[currStage].levels[_arg1].botSkill); } override public function getThemeID(_arg1:int):int{ return (stages[currStage].levels[_arg1].themeID); } } }//package uk.co.barraxworld.game.projects.ultrakillz
Section 129
//GameConfigMultiplayer (uk.co.barraxworld.game.projects.ultrakillz.GameConfigMultiplayer) package uk.co.barraxworld.game.projects.ultrakillz { import flash.events.*; import uk.co.barraxworld.game.shooter.*; public class GameConfigMultiplayer extends GameConfig { override public function generateLevels():void{ layouts = []; layouts[0] = []; layouts[0][0] = {x:0, y:0, z:800, w:300, h:300, d:300}; layouts[0][1] = {x:600, y:0, z:600, w:300, h:300, d:300}; layouts[0][2] = {x:-600, y:0, z:600, w:300, h:300, d:300}; layouts[0][3] = {x:900, y:0, z:300, w:300, h:200, d:200}; layouts[0][4] = {x:-900, y:0, z:300, w:300, h:200, d:200}; layouts[1] = []; layouts[1][0] = {x:-1100, y:0, z:900, w:450, h:700, d:300}; layouts[1][1] = {x:1100, y:0, z:900, w:450, h:700, d:300}; layouts[1][2] = {x:0, y:0, z:900, w:450, h:700, d:300}; layouts[1][3] = {x:-550, y:0, z:650, w:450, h:500, d:300}; layouts[1][4] = {x:550, y:0, z:650, w:450, h:500, d:300}; layouts[1][5] = {x:0, y:0, z:400, w:300, h:300, d:300}; layouts[2] = []; layouts[2][0] = {x:-1100, y:0, z:900, w:450, h:350, d:300}; layouts[2][1] = {x:1100, y:0, z:900, w:450, h:350, d:300}; layouts[2][2] = {x:-550, y:-400, z:899, w:500, h:200, d:300}; layouts[2][3] = {x:550, y:-400, z:899, w:500, h:200, d:300}; layouts[2][4] = {x:0, y:0, z:900, w:450, h:350, d:300}; layouts[2][5] = {x:600, y:0, z:300, w:300, h:300, d:300}; layouts[2][6] = {x:-600, y:0, z:300, w:300, h:300, d:300}; layouts[3] = []; layouts[3][0] = {x:-1300, y:0, z:900, w:800, h:700, d:300}; layouts[3][1] = {x:1300, y:0, z:900, w:800, h:700, d:300}; layouts[3][2] = {x:-800, y:0, z:500, w:600, h:280, d:300}; layouts[3][3] = {x:0, y:0, z:250, w:600, h:280, d:300}; layouts[3][4] = {x:800, y:0, z:500, w:600, h:280, d:300}; layouts[4] = []; layouts[4][0] = {x:0, y:-300, z:900, w:300, h:0x0100, d:300}; layouts[4][1] = {x:-600, y:-300, z:600, w:300, h:0x0100, d:0x0100}; layouts[4][2] = {x:600, y:-300, z:600, w:300, h:0x0100, d:0x0100}; layouts[4][3] = {x:0, y:0, z:300, w:300, h:0x0100, d:0x0100}; layouts[4][4] = {x:-600, y:0, z:300, w:300, h:0x0100, d:0x0100}; layouts[4][5] = {x:600, y:0, z:300, w:300, h:0x0100, d:0x0100}; layouts[4][6] = {x:1000, y:0, z:500, w:300, h:0x0100, d:0x0100}; layouts[4][7] = {x:-1000, y:0, z:500, w:300, h:0x0100, d:0x0100}; layouts[5] = []; layouts[5][0] = {x:-150, y:0, z:550, w:640, h:280, d:300}; layouts[5][1] = {x:600, y:0, z:650, w:320, h:500, d:300}; layouts[5][2] = {x:-600, y:0, z:400, w:320, h:320, d:300}; layouts[5][3] = {x:-1200, y:0, z:900, w:640, h:400, d:300}; layouts[5][4] = {x:1200, y:0, z:900, w:640, h:400, d:300}; layouts[5][5] = {x:-200, y:0, z:900, w:320, h:300, d:180}; levels = []; levels[0] = {}; levels[0].themeID = 1; levels[0].layout = layouts[0]; levels[1] = {}; levels[1].themeID = 2; levels[1].layout = layouts[1]; levels[2] = {}; levels[2].themeID = 3; levels[2].layout = layouts[2]; levels[3] = {}; levels[3].themeID = 4; levels[3].layout = layouts[3]; levels[4] = {}; levels[4].themeID = 5; levels[4].layout = layouts[4]; levels[5] = {}; levels[5].themeID = 6; levels[5].layout = layouts[5]; } public function getRank(_arg1:Number):Object{ var _local2:Object; var _local3:uint; _local3 = 0; while (_local3 < ranks.length) { if (_arg1 >= ranks[_local3].points_needed){ _local2 = ranks[_local3]; } else { return (_local2); }; _local3++; }; return (null); } private function onRankListLoaded(_arg1:Event){ ranks = _arg1.target.rArray; dispatchEvent(new Event("ready")); } public function getRankList():void{ var _local1:*; _local1 = new RankList("http://api.ultrakillz.com/?rk=1"); _local1.addEventListener("xmlLoaded", onRankListLoaded); } public function getRankID(_arg1:Number):int{ var _local2:*; var _local3:uint; _local2 = 0; _local3 = 0; while (_local3 < ranks.length) { if (_arg1 >= ranks[_local3].points_needed){ _local2 = _local3; } else { return (_local2); }; _local3++; }; return (0); } } }//package uk.co.barraxworld.game.projects.ultrakillz
Section 130
//Main (uk.co.barraxworld.game.projects.ultrakillz.Main) package uk.co.barraxworld.game.projects.ultrakillz { import uk.co.barraxworld.game.config.*; import uk.co.barraxworld.settings.*; import flash.display.*; import uk.co.barraxworld.utils.*; import flash.events.*; import flash.text.*; import uk.co.barraxworld.game.engine3D.characters.*; import uk.co.barraxworld.game.projects.ultrakillz.controllers.*; import uk.co.barraxworld.loaders.*; import com.iopred.opera.*; import uk.co.barraxworld.multiuser.server.socket.*; import uk.co.barraxworld.tracking.*; import flash.net.*; import uk.co.barraxworld.game.projects.ultrakillz.interfaces.*; import mochi.*; import uk.co.barraxworld.ui.*; import flash.ui.*; import flash.system.*; public class Main extends MovieClip { public var maxLives:int;// = 2 private var homeHosted:Boolean; private var gameOptions:GameOptions; public var overlay:IController; public var sh:Number;// = 400 private var cMenu:ContextMenu; public var cookie:CookieManager; public var sw:Number;// = 550 public var currLevel:int; public var numLevels:int; public var score:int; private var okDomains:Array; public var deployment:String; public var prevGame:Object; public var botSkillLevel:Number; public var baseURL:String; private var liveURL:String;// = "http://www.ultrakillz.com/" public var timeLimit:int;// = 90 public var showMultiplayerOption:Boolean;// = true public var mochi_root:MovieClip; public var local:Boolean; public var debugConsole:DebugConsole; private var siteAuth:Boolean; private var stageURL:String;// = "http://stage.ultrakillz.com/" private var activateMessage:Sprite; private var controller:IController; public var levelsCompleted:Array; public var difficulty:int;// = 1 public var isDeveloper:Boolean; public var gameConfig; public var remoteTest:Boolean; public var _stage:Stage; public static const MULTIPLAYER_MODE:String = "multiplayer"; public static const DEPLOYMENT_E4:String = "e4"; public static const DEPLOYMENT_MOCHIAD:String = "mochiad"; public static const CAMPAIGN_MODE:String = "campaign"; public static var gameMode:String; public static var instance:Main; public function Main(){ var _local1:Opera; okDomains = ["repos/mbxgames", "barraxworld.co.uk", "ultrakillz.com", "quickwars.com"]; liveURL = "http://www.ultrakillz.com/"; stageURL = "http://stage.ultrakillz.com/"; baseURL = liveURL; difficulty = 1; timeLimit = 90; maxLives = 2; prevGame = {}; showMultiplayerOption = true; sw = 550; sh = 400; super(); addFrameScript(0, frame1); Security.allowDomain("*"); instance = this; _local1 = Opera.instance; _local1.registerSound("music_main", new sound_music_main()); _local1.registerSound("music_nextlevel", new sound_music_nextlevel()); _local1.registerSound("music_gameover", new sound_music_gameover()); _local1.registerSound("button_over", new sound_click()); _local1.registerSound("button_click", new sound_button_click()); _local1.registerSound("bloop", new sound_lobby_countdown()); _local1.registerSound("select_thumb", new sound_select_thumb()); } private function checkDomains(_arg1:String):Boolean{ var _local2:String; var _local3:uint; var _local4:String; _local2 = unescape(_arg1).toLowerCase(); _local3 = 0; while (_local3 < okDomains.length) { _local4 = okDomains[_local3]; if (_local2.indexOf(_local4) != -1){ return (true); }; _local3++; }; return (false); } private function onContextMenuHandler(_arg1:ContextMenuEvent):void{ debug("contextMenu select"); } public function goCampaign():void{ GameController.GAMEMODE = "campaign"; goLoadAssets(); } private function deactivateHandler(_arg1:Event):void{ showActivateMessage(); debug("Event.DEACTIVATE"); } public function removeCurrentOverlay():void{ if (overlay){ overlay.destroyView(); overlay = null; }; } public function goPlay():void{ var _local1:*; if (cookie.getItem("tute") == ""){ _local1 = new confirmView(); _local1.subject = "run_tutorial"; _local1.title = "Have you played before?"; _local1.body = "This appears to be your first time.<br />Would you like to run the tutorial?<br />(Takes around 1 minute)"; _local1.btn1_title = "Yes, I'm a n00b!"; _local1.btn2_title = "No, I rock already!"; _local1.continuation_callback = goPlay; _local1.addEventListener("submit", popup_callback, false, 0, true); _stage.addChild(_local1); return; }; switch (gameMode){ case CAMPAIGN_MODE: if (levelsCompleted.length > 0){ goLevelSelect(); } else { goDifficulty(); }; break; case MULTIPLAYER_MODE: changePage("lobby"); break; }; } public function goPractice():void{ GameController.GAMEMODE = "practice"; goLoadAssets(); } public function campaignLevelsReady():void{ var _local1:Sprite; var _local2:*; numLevels = gameConfig.numLevels; goHome(); if (!gameAllowed()){ _local1 = new Sprite(); _local1.graphics.lineStyle(); _local1.graphics.beginFill(0, 0.9); _local1.graphics.drawRect(0, 0, sw, sh); _local1.graphics.endFill(); stage.addChild(_local1); _local2 = new alertView(); _local2.subject = "relocate"; _local2.title = "EXPIRED VERSION OF ULTRAKILLZ"; _local2.body = "This appears to be an old version of Ultrakillz. Go play the latest version!"; _local2.btn1_title = "Click to play Ultrakillz"; _local2.addEventListener("submit", popup_callback, false, 0, true); _stage.addChild(_local2); }; } private function resetScores():void{ score = 0; prevGame.roundScore = 0; prevGame.roundAccuracy = 0; prevGame.roundTimeRemaining = 0; } private function changePage(_arg1:String):void{ if (controller){ controller.destroyView(); }; removeCurrentOverlay(); OptionsController.removeOverlay(); _stage.quality = ((_arg1 == "game")) ? "medium" : "high"; switch (_arg1){ case "home": controller = new HomeController(); break; case "difficulty": controller = new DifficultyController(); break; case "levelSelect": controller = new LevelSelectController(); break; case "levelSummary": controller = new LevelSummaryController(); break; case "options": controller = new OptionsController(); break; case "howToPlay": controller = new HowToPlayController(); break; case "lobby": controller = new MultiUserController(); break; case "assets": controller = new AssetsController(); break; case "sync": controller = new SyncController(); break; case "game": controller = new GameController(); break; case "interlude": controller = new InterludeController(); break; }; } public function goTutorial():void{ cookie.setItem("tute", "1"); botSkillLevel = 0.05; GameController.GAMEMODE = "tutorial"; goLoadAssets(); } public function goRelocate():void{ navigateToURL(new URLRequest(liveURL)); } public function debug(_arg1:String):void{ debugConsole.debug(_arg1); } function frame1(){ if (stage){ this.initialise(stage, "campaign", "mochiad"); }; } private function popup_callback(_arg1:Event):void{ var _local2:Boolean; _local2 = ((_arg1.target.resultStr == "yes")) ? true : false; switch (_arg1.target.subject){ case "relocate": goRelocate(); break; case "run_tutorial": cookie.setItem("tute", "1"); if (_local2){ goTutorial(); } else { _arg1.target.continuation_callback(); }; break; case "exit_site_multiplayer": if (_local2){ goRelocate(); }; break; }; _stage.removeChild(MovieClip(_arg1.target)); } private function changeOverlay(_arg1:String):void{ removeCurrentOverlay(); _stage.quality = ((_arg1 == "game")) ? "medium" : "high"; switch (_arg1){ case "assets": overlay = new AssetsController(); break; case "game": overlay = new GameController(); break; case "highscores": overlay = new HighscoresController(); break; case "": break; }; } public function goLevelSummary():void{ changePage("levelSummary"); } public function goOptions():void{ changePage("options"); } public function goInterlude():void{ changePage("interlude"); } public function initialise(_arg1:Stage, _arg2:String="multiplayer", _arg3:String=""):void{ var _local4:String; var _local5:int; var _local6:Date; var _local7:Date; var _local8:int; var _local9:String; gameMode = _arg2; _stage = _arg1; _local4 = _stage.loaderInfo.url; isDeveloper = !((_local4.indexOf("repos/mbxgames/ultrakillz") == -1)); local = (_local4.substring(0, 5) == "file:"); remoteTest = (_local4.substring(0, 20) == "stage.ultrakillz.com"); homeHosted = !((_local4.indexOf("ultrakillz.com") == -1)); if (gameMode == CAMPAIGN_MODE){ baseURL = ""; } else { if (local){ baseURL = liveURL; } else { if (remoteTest){ baseURL = stageURL; }; }; }; BitmapList.baseURL = baseURL; deployment = _arg3; switch (deployment){ case DEPLOYMENT_MOCHIAD: _local9 = "58fca4b1f46066b8"; MochiServices.connect(_local9, mochi_root); _local5 = 1; _local6 = new Date(2009, (_local5 - 1), 25); _local7 = new Date(); _local8 = Math.ceil(DateUtils.getDiffDays(_local7, _local6)); baseURL = "http://games.mochiads.com/c/g/ultrakillz_v1/"; siteAuth = ((_local8 < 1)) ? false : true; break; case DEPLOYMENT_E4: okDomains.push("e4.com"); okDomains.push("goldenjoystick.com"); _local5 = 12; _local6 = new Date(2008, (_local5 - 1), 25); _local7 = new Date(); _local8 = Math.ceil(DateUtils.getDiffDays(_local7, _local6)); siteAuth = ((_local8 < 1)) ? false : true; siteAuth = checkDomains(_local4); showMultiplayerOption = true; if (_local8 < 1){ return; }; MochiBot.track(this, "c66f1762"); break; default: MochiBot.track(this, "e1212f89"); BitmapList.initPolicy((baseURL + "crossdomain.xml")); siteAuth = ((!((_local4.indexOf(liveURL) == -1))) || (isDeveloper)); break; }; _stage.stageFocusRect = false; _stage.showDefaultContextMenu = false; _stage.scaleMode = StageScaleMode.NO_SCALE; cMenu = new ContextMenu(); cMenu.hideBuiltInItems(); cMenu.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, onContextMenuHandler); this.contextMenu = cMenu; cookie = new CookieManager("ukz1"); gameOptions = GameOptions.getInstance(); gameOptions.initFromCookie(cookie); Opera.instance.globalMute = !(gameOptions.soundOn); DebugConsole.registerStage(_stage); debugConsole = DebugConsole.getInstance(); addEventListener(Event.DEACTIVATE, deactivateHandler); addEventListener(Event.ACTIVATE, activateHandler); if (gameMode == MULTIPLAYER_MODE){ gameConfig = new GameConfigMultiplayer(); gameConfig.addEventListener("ready", onConfigLoaded); gameConfig.getRankList(); } else { gameConfig = new GameConfigCampaign(); if (deployment == DEPLOYMENT_MOCHIAD){ MochiScores.setBoardID("f0ecf521148fa582"); MochiAd.showPreGameAd({clip:mochi_root, id:_local9, res:"550x400", ad_finished:campaignLevelsReady}); } else { campaignLevelsReady(); }; }; } public function goHowToPlay():void{ changePage("howToPlay"); } public function goDifficulty():void{ changePage("difficulty"); } private function showActivateMessage(_arg1:Boolean=true):void{ if (activateMessage){ _stage.removeChild(activateMessage); activateMessage = null; }; if (_arg1){ activateMessage = new stageActivateMessage(); _stage.addChild(activateMessage); }; } private function activateHandler(_arg1:Event):void{ showActivateMessage(false); debug("Event.ACTIVATE"); } public function goGame():void{ if (GameController.GAMEMODE == "practice"){ changeOverlay("game"); } else { changePage("game"); }; } public function goLoadAssets():void{ Opera.instance.stopMusic(2800); if (GameController.GAMEMODE == "practice"){ changeOverlay("assets"); } else { changePage("assets"); }; } public function goGameSummary():void{ changePage("gameSummary"); } public function goHighscores():void{ changeOverlay("highscores"); } private function gameAllowed():Boolean{ if (((!(siteAuth)) && (!(isDeveloper)))){ return (false); }; return (true); } public function goMultiplayer():void{ var _local1:*; if (homeHosted){ gameMode = MULTIPLAYER_MODE; goPlay(); } else { _local1 = new confirmView(); _local1.subject = "exit_site_multiplayer"; _local1.title = "Visit www.ultrakillz.com"; _local1.body = "To play other people you will need to visit www.ultrakillz.com<br />Go there now?"; _local1.btn1_title = "Yes, let me at them!"; _local1.btn2_title = "No, I'm too scared!"; _local1.addEventListener("submit", popup_callback, false, 0, true); _stage.addChild(_local1); }; } private function onConfigLoaded(_arg1:Event):void{ gameConfig.removeEventListener("ready", onConfigLoaded); numLevels = gameConfig.numLevels; goHome(); } public function endTutorial():void{ goHome(); } public function get socket():UltraKillzSocket{ return (UltraKillzSocket.getInstance()); } public function goLevelSelect():void{ changePage("levelSelect"); } public function goSync():void{ GameController.GAMEMODE = "normal"; changePage("sync"); } public function removePracticeSession():void{ var _local1:*; GameController.GAMEMODE = "normal"; changeOverlay(""); _local1 = MultiUserController.getInstance(); if (_local1){ _local1.resumeLobby(); }; } public function goHome():void{ resetScores(); LocalPlayer.LIVES_REMAINING = maxLives; levelsCompleted = []; currLevel = 1; changePage("home"); Opera.instance.playMusic("music_main", 1, 0); } public static function getInstance():Main{ if (instance == null){ instance = new (Main); }; return (instance); } } }//package uk.co.barraxworld.game.projects.ultrakillz
Section 131
//DynamicItinerary (uk.co.barraxworld.game.shooter.armoury.DynamicItinerary) package uk.co.barraxworld.game.shooter.armoury { import flash.events.*; import flash.net.*; import flash.utils.*; public class DynamicItinerary extends EventDispatcher { private var loader:URLLoader; public static var projectiles:Array; public static var xml:XML; public static var weapons:XMLList; public static var currURL:String = ""; public function DynamicItinerary(){ loader = new URLLoader(); loader.dataFormat = URLLoaderDataFormat.TEXT; loader.addEventListener(Event.COMPLETE, handleComplete); } private function handleComplete(_arg1:Event):void{ var evt = _arg1; try { xml = new XML(loader.data); projectiles = []; projectiles["bullets"] = xml.projectiles.bullets.*; projectiles["rockets"] = xml.projectiles.rockets.*; projectiles["grenades"] = xml.projectiles.grenades.*; weapons = xml.weapons.*; dispatch(); } catch(e:Error) { }; } private function dispatch():void{ dispatchEvent(new Event("complete")); } public function init(_arg1:String):void{ if (currURL == _arg1){ dispatch(); } else { currURL = _arg1; loader.load(new URLRequest(currURL)); }; } public function destroy():void{ loader.removeEventListener(Event.COMPLETE, handleComplete); loader = null; } } }//package uk.co.barraxworld.game.shooter.armoury
Section 132
//Itinerary (uk.co.barraxworld.game.shooter.armoury.Itinerary) package uk.co.barraxworld.game.shooter.armoury { public class Itinerary { public static var projectiles:Array; public static var weapons:Array; public static function initialise():void{ projectiles = []; projectiles["rockets"] = []; projectiles["rockets"][0] = {linkage:"rocket1", isViewable:1, size:170, speed:130, damage:25, trail:1, trailFrequency:4, blastLinkage:"explosion", explosionSize:13, blastRadius:250}; projectiles["rockets"][1] = {linkage:"rocket2", isViewable:1, size:160, speed:100, damage:50, trail:1, explosionSize:16, trailFrequency:3, blastLinkage:"explosion", blastRadius:290}; projectiles["grenades"] = []; projectiles["grenades"][0] = {linkage:"grenade1", isViewable:1, size:50, speed:40, damage:45, trail:1, trailFrequency:5, detonationTime:3000, explosionSize:20, blastLinkage:"explosion", blastRadius:400}; projectiles["bullets"] = []; projectiles["bullets"][0] = {linkage:"bullet1", isViewable:0, size:130, speed:300, damage:20, explosionSize:1, blastLinkage:"explosion", blastRadius:0}; projectiles["bullets"][1] = {linkage:"bullet1", isViewable:0, size:150, speed:300, damage:10, explosionSize:1, blastLinkage:"explosion", blastRadius:0}; projectiles["bullets"][2] = {linkage:"plasma1", isViewable:1, size:170, speed:100, damage:30, explosionSize:1, blastLinkage:"explosion", blastRadius:0}; weapons = []; weapons[0] = {ref:"bullets", linkage:"bullets", wName:"Auto Bullets", menuIndex:0, ammoType:"bullets", ammoID:1, weight:1, maxAmmo:40, automatic:1, iconRef:"icon_bullets", recoil:50, cockDelay:110, reloadTime:900, armTime:600}; weapons[1] = {ref:"plasma", linkage:"plasma", wName:"Plasma", menuIndex:1, ammoType:"bullets", ammoID:2, weight:1, maxAmmo:40, automatic:1, iconRef:"icon_plasma", recoil:50, cockDelay:110, reloadTime:900, armTime:600}; weapons[2] = {ref:"rocket", linkage:"rocket", wName:"Rocket", menuIndex:2, ammoType:"rockets", ammoID:0, weight:1, maxAmmo:10, automatic:0, iconRef:"icon_rocket", recoil:1000, cockDelay:800, reloadTime:1500, armTime:600}; weapons[3] = {ref:"rockets", linkage:"rockets", wName:"Auto Rockets", menuIndex:3, ammoType:"rockets", ammoID:0, weight:1, maxAmmo:40, automatic:1, iconRef:"icon_rockets", recoil:80, cockDelay:200, reloadTime:1000, armTime:600}; weapons[4] = {ref:"rocket_large", linkage:"rocket_large", wName:"Uber Rockets", menuIndex:4, ammoType:"rockets", ammoID:1, weight:1, maxAmmo:6, automatic:0, iconRef:"icon_rocket_large", recoil:1000, cockDelay:800, reloadTime:1500, armTime:600}; weapons[5] = {ref:"pipebomb", linkage:"pipe_bomb", wName:"Pipe Bombs", menuIndex:5, ammoType:"grenades", ammoID:0, weight:1, maxAmmo:15, automatic:1, iconRef:"icon_pipebomb", recoil:150, cockDelay:800, reloadTime:1000, armTime:600}; } } }//package uk.co.barraxworld.game.shooter.armoury
Section 133
//Weapon (uk.co.barraxworld.game.shooter.armoury.Weapon) package uk.co.barraxworld.game.shooter.armoury { import flash.events.*; import uk.co.barraxworld.common.*; import flash.utils.*; public class Weapon extends EventDispatcher { public var numAmmo:uint; public var ref:String; public var reloadTime:uint; public var cockDelay:uint; private var _ammoObj:Object; public var autoReload:Boolean;// = false private var reloading:Boolean; public var automatic:uint; private var reloadTimer:Timer; private var wAttributes:Object; public var ammoType:String; public var wName:String; public var menuIndex:int; public var owner; public var recoil:Number; public var callback:Function; private var armTimer:Timer; public var linkage:String; public var iconRef:String; private var cockTimer:Timer; public var maxAmmo:uint; public var ammoID:uint; public var armTime:uint; private var cocked:Boolean; public var triggerPulled:Boolean; public var weight:Number; public function Weapon(_arg1:Object){ autoReload = false; super(); wAttributes = _arg1; initialise(); } public function quickReload():void{ numAmmo = maxAmmo; } public function reload():void{ if (((!(reloading)) && ((numAmmo < maxAmmo)))){ reloading = true; dispatchEvent(new CustomEvent("reloading")); if (!reloadTimer){ reloadTimer = new Timer(reloadTime, 1); reloadTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onReloaded); }; reloadTimer.reset(); reloadTimer.start(); }; } private function onCocked(_arg1:TimerEvent):void{ cocked = true; } private function fire():void{ if (reloading){ return; }; numAmmo--; dispatchEvent(new CustomEvent("fired")); if (!cockTimer){ cockTimer = new Timer(cockDelay, 1); cockTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onCocked); }; cockTimer.reset(); cockTimer.start(); } public function initialise():void{ var _local1:XML; for each (_local1 in XMLList(wAttributes).*) { this[_local1.name()] = _local1.toString(); }; _ammoObj = DynamicItinerary.projectiles[ammoType][ammoID]; numAmmo = ((maxAmmo > 0)) ? maxAmmo : 9999999999; } public function releaseTrigger():void{ triggerPulled = false; } public function get weaponAmmo():Number{ return (numAmmo); } public function get weaponName():String{ return (wName); } public function pullTrigger():void{ triggerPulled = true; if (cocked){ cocked = false; if ((((numAmmo > 0)) || ((maxAmmo == -1)))){ fire(); } else { dispatchEvent(new CustomEvent("outOfAmmo")); if (autoReload){ reload(); }; }; }; } public function arm():void{ dispatchEvent(new CustomEvent("arming")); if (!armTimer){ armTimer = new Timer(armTime, 1); armTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onArmed); }; armTimer.reset(); armTimer.start(); } public function get ammoObj():Object{ return (_ammoObj); } private function onReloaded(_arg1:TimerEvent):void{ numAmmo = maxAmmo; cocked = true; reloading = false; dispatchEvent(new CustomEvent("reloaded")); } public function destroy():void{ if (reloadTimer){ reloadTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, onReloaded); reloadTimer = null; }; if (armTimer){ armTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, onArmed); armTimer = null; }; if (cockTimer){ cockTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, onCocked); cockTimer = null; }; } private function onArmed(_arg1:TimerEvent):void{ dispatchEvent(new CustomEvent("armed")); cocked = true; } } }//package uk.co.barraxworld.game.shooter.armoury
Section 134
//MuzzleFlash (uk.co.barraxworld.game.shooter.MuzzleFlash) package uk.co.barraxworld.game.shooter { import flash.display.*; import flash.events.*; import flash.utils.*; public class MuzzleFlash extends EventDispatcher { private var timer:Timer; private var duration:uint;// = 3 private var count:uint;// = 0 private var _timeline:MovieClip; private var _clip:Sprite; public function MuzzleFlash(_arg1:MovieClip, _arg2:String, _arg3:Number=1){ var _local4:Class; count = 0; duration = 3; super(); _local4 = (getDefinitionByName(_arg2) as Class); _clip = new (_local4); _clip.scaleX = (_clip.scaleY = _arg3); _timeline = _arg1; _timeline.addChildAt(_clip, 0); animate(); } private function onAnimate(_arg1:TimerEvent):void{ if (count < (duration - 1)){ _clip.scaleX = (_clip.scaleY = (_clip.scaleY + 0.5)); count++; } else { dispatchEvent(new Event("complete")); }; } private function animate():void{ timer = new Timer(30, duration); timer.addEventListener(TimerEvent.TIMER, onAnimate); timer.start(); } public function destroy():void{ _timeline.removeChild(_clip); timer.removeEventListener(TimerEvent.TIMER, onAnimate); timer = null; } } }//package uk.co.barraxworld.game.shooter
Section 135
//PickupIcon (uk.co.barraxworld.game.shooter.PickupIcon) package uk.co.barraxworld.game.shooter { import flash.display.*; import flash.utils.*; public class PickupIcon extends MovieClip { public var id:int; private var tl:MovieClip; public var sprite:Sprite; public function attachSprite(_arg1:String, _arg2:MovieClip):void{ var _local3:Class; this.tl = _arg2; _local3 = (getDefinitionByName(_arg1) as Class); sprite = new (_local3); _arg2.addChild(sprite); } public function scaleSprite(_arg1:Number):void{ tl.scaleX = (tl.scaleY = _arg1); } } }//package uk.co.barraxworld.game.shooter
Section 136
//PowerupPickupIcon (uk.co.barraxworld.game.shooter.PowerupPickupIcon) package uk.co.barraxworld.game.shooter { import flash.display.*; public class PowerupPickupIcon extends PickupIcon { public var iconHolder:MovieClip; } }//package uk.co.barraxworld.game.shooter
Section 137
//RankList (uk.co.barraxworld.game.shooter.RankList) package uk.co.barraxworld.game.shooter { import uk.co.barraxworld.loaders.*; public class RankList extends GenericXMLLoader { private var _rArray:Array; public function RankList(_arg1:String){ super(_arg1); } override public function parseXML():void{ var _local1:uint; var _local2:uint; var _local3:Object; _rArray = []; _local1 = xml.rank.length(); _local2 = 0; while (_local2 < _local1) { _local3 = {}; _local3.id = (_local2 + 1); _local3.title = xml.rank[_local2].@title; _local3.points_needed = Number(xml.rank[_local2].@points_needed); _rArray.push(_local3); _local2++; }; dispatch(); } public function get rArray():Array{ return (_rArray); } } }//package uk.co.barraxworld.game.shooter
Section 138
//RankStatusView (uk.co.barraxworld.game.shooter.RankStatusView) package uk.co.barraxworld.game.shooter { import flash.display.*; import flash.events.*; import flash.text.*; import uk.co.barraxworld.loaders.*; import flash.utils.*; public class RankStatusView extends MovieClip { public var fieldMin:TextField; public var bar:ProgressBarView; public var thumb2:rankThumb; public var fieldMax:TextField; public var thumb1:rankThumb; private var timer:Timer; public var btn:button2_complete; public var field1:TextField; private var targetPercent:Number; public var field2:TextField; public var field3:TextField; private var points2:Number; private var currPercent:Number; private var currPoints:Number; private var points1:Number; private var prevPoints:Number; public function destroy():void{ btn.removeEventListener(MouseEvent.MOUSE_DOWN, clickNextHandler); timer.stop(); timer.removeEventListener(TimerEvent.TIMER, updateBarAnim); timer = null; thumb1.destroy(); thumb2.destroy(); } private function clickNextHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event("complete")); } private function initAnim():void{ currPercent = 0; targetPercent = int((((currPoints - points1) / (points2 - points1)) * 100)); bar.percent = currPercent; timer = new Timer(30); timer.addEventListener(TimerEvent.TIMER, updateBarAnim); timer.start(); } public function initialise(_arg1:Object):void{ field1.htmlText = _arg1.rankStr1; field2.htmlText = _arg1.rankStr2; thumb1.initialise(_arg1.thumbDir, _arg1.thumb1ref); thumb2.initialise(_arg1.thumbDir, _arg1.thumb2ref); currPoints = _arg1.currPoints; prevPoints = _arg1.prevPoints; points1 = _arg1.points1; points2 = _arg1.points2; fieldMin.htmlText = ("" + points1); fieldMax.htmlText = ("" + points2); field3.htmlText = (("(" + (points2 - currPoints)) + " points remaining)"); initAnim(); bar.percent = 0; btn.setText("Next"); btn.addEventListener(MouseEvent.MOUSE_DOWN, clickNextHandler); } private function updateBarAnim(_arg1:TimerEvent):void{ currPercent = (currPercent - ((currPercent - targetPercent) / 4)); if ((targetPercent - currPercent) < 1){ currPercent = targetPercent; timer.stop(); }; bar.percent = currPercent; } } }//package uk.co.barraxworld.game.shooter
Section 139
//WeaponIcon (uk.co.barraxworld.game.shooter.WeaponIcon) package uk.co.barraxworld.game.shooter { import flash.display.*; import flash.utils.*; public class WeaponIcon extends MovieClip { public var id:int; public var sprite:Sprite; public function attachSprite(_arg1:String, _arg2:MovieClip):void{ var _local3:Class; _local3 = (getDefinitionByName(_arg1) as Class); sprite = new (_local3); _arg2.addChild(sprite); } public function scaleSprite(_arg1:Number):void{ sprite.scaleX = (sprite.scaleY = _arg1); } } }//package uk.co.barraxworld.game.shooter
Section 140
//WeaponMenu (uk.co.barraxworld.game.shooter.WeaponMenu) package uk.co.barraxworld.game.shooter { import flash.display.*; import flash.events.*; import uk.co.barraxworld.game.shooter.armoury.*; import flash.utils.*; import uk.co.barraxworld.ui.*; public class WeaponMenu extends IconMenu { private var moveBy_x:Number; private var moveBy_y:Number; private var active:Boolean; private var ex:Number; private var ey:Number; private var timer:Timer; private var target_y:Number; private var target_x:Number; private var sx:Number; private var sy:Number; private var currWeapon:Weapon; public function WeaponMenu(_arg1:MovieClip, _arg2:Array, _arg3:Number, _arg4:Number, _arg5:Weapon=null){ super(_arg1); initialise(_arg2, {iconClassRef:"uk.co.barraxworld.game.shooter.WeaponMenuIcon", xpos:_arg3, ypos:_arg4, layout:"vertical", centralise:true, gap:52, cycle:false}); if (_arg5){ selectedIndex = getWeaponIndex(_arg5); }; ex = clip.x; ey = clip.y; moveBy_x = 35; moveBy_y = 0; sx = (ex + moveBy_x); sy = (ey + moveBy_y); clip.x = sx; clip.y = sy; timer = new Timer(2000, 1); timer.addEventListener(TimerEvent.TIMER_COMPLETE, timerCompleteHandler); } public function show():void{ if (arr.length > 0){ render(); active = true; initAnimate(); timer.reset(); timer.start(); }; } public function initAnimate():void{ if (!animTimer){ animTimer = new Timer(20); animTimer.addEventListener(TimerEvent.TIMER, animTimerHandler); }; target_x = (active) ? ex : sx; target_y = (active) ? ey : sy; animTimer.start(); } public function hide():void{ active = false; initAnimate(); } private function timerCompleteHandler(_arg1:TimerEvent):void{ timer.stop(); hide(); } public function getWeaponIndex(_arg1:Weapon):int{ var _local2:uint; _local2 = 0; while (_local2 < arr.length) { if (arr[_local2].ref == _arg1.ref){ return (_local2); }; _local2++; }; return (-1); } override public function animTimerHandler(_arg1:TimerEvent):void{ var _local2:*; var _local3:*; var _local4:*; _local2 = (target_x - clip.x); _local3 = (target_y - clip.y); _local4 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3))); if (_local4 < 1){ clip.x = target_x; clip.y = target_y; animTimer.stop(); } else { clip.x = (clip.x - ((clip.x - target_x) / 3)); clip.y = (clip.y - ((clip.y - target_y) / 3)); }; } } }//package uk.co.barraxworld.game.shooter
Section 141
//WeaponMenuIcon (uk.co.barraxworld.game.shooter.WeaponMenuIcon) package uk.co.barraxworld.game.shooter { import flash.display.*; import flash.text.*; public class WeaponMenuIcon extends WeaponIcon { public var field:TextField; public var bg:MovieClip; public function WeaponMenuIcon(){ addFrameScript(0, frame1); super(); } function frame1(){ stop(); } } }//package uk.co.barraxworld.game.shooter
Section 142
//WeaponPickupIcon (uk.co.barraxworld.game.shooter.WeaponPickupIcon) package uk.co.barraxworld.game.shooter { import flash.display.*; public class WeaponPickupIcon extends PickupIcon { public var iconHolder:MovieClip; } }//package uk.co.barraxworld.game.shooter
Section 143
//Powerups (uk.co.barraxworld.game.Powerups) package uk.co.barraxworld.game { public class Powerups { public static var items:Array; public static function initialise(){ items = []; items[0] = {ref:"health", num:20, txtDisplay:true}; items[1] = {ref:"health", num:40, txtDisplay:true}; items[2] = {ref:"speed", num:2}; items[3] = {ref:"jump", num:2}; items[4] = {ref:"wallhack", num:1}; } } }//package uk.co.barraxworld.game
Section 144
//BitmapList (uk.co.barraxworld.loaders.BitmapList) package uk.co.barraxworld.loaders { import flash.display.*; import uk.co.barraxworld.utils.*; import flash.events.*; import uk.co.barraxworld.effects.*; import flash.utils.*; import flash.system.*; public class BitmapList extends EventDispatcher { private var debugConsole:DebugConsole; private var bml:BitmapLoader; private var srcDir:String; public var catName:String; public var loadedBitmap:BitmapLoader; private var tweenEffects:TweenEffects; private var progressTimer:Timer; private var categories:Array; public var gLoadPercent:int; private var srcList:Array; private var cloned:Array; private var currID:int; private var waitIntervals:Array; public var loadPercent:int; public static var instance:BitmapList; public static var baseURL:String = ""; public function BitmapList():void{ tweenEffects = TweenEffects.getInstance(); waitIntervals = []; categories = []; cloned = []; } private function addBitmapToList():void{ if (srcList[currID].fileName){ addBitmap(srcDir, srcList[currID].fileName, srcList[currID].ref, catName, srcList[currID].type); } else { addBitmap(srcDir, srcList[currID].ref, srcList[currID].ref, catName, srcList[currID].type); }; } private function retryGetAsset(_arg1, _arg2, _arg3):void{ var interval:*; var ref = _arg1; var catName = _arg2; var displayObjectTarget = _arg3; interval = setTimeout(function (){ getAsset(ref, catName, displayObjectTarget, true); }, 50); waitIntervals.push(interval); } public function addBitmap(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5):void{ bml = new BitmapLoader((baseURL + _arg1), _arg2, _arg3, _arg5, false); bml.addEventListener("loadComplete", onBitmapLoadComplete, false, 0, true); if (!categories[_arg4]){ categories[_arg4] = []; cloned[_arg4] = []; }; categories[_arg4].push(bml); } private function removeClone(_arg1:String, _arg2:String="all", _arg3=null):void{ var _local4:*; var _local5:uint; var _local6:*; if (((!(_arg3)) && (!((_arg2 == "all"))))){ return; }; _local4 = 0; _local5 = 0; while (_local5 < cloned[_arg1].length) { if ((((((cloned[_arg1][_local5].ref == _arg2)) && ((cloned[_arg1][_local5].bitmap.parent == _arg3)))) || ((_arg2 == "all")))){ _local6 = cloned[_arg1][_local5].bitmap; cloned[_arg1].splice(_local5, 1); if (_local6.parent){ _local6.parent.removeChild(_local6.parent.getChildByName(_local6.name)); }; _local6.bitmapData.dispose(); _local6 = null; _local4++; if (_arg2 != "all"){ break; }; }; _local5++; }; } public function loadNewList(_arg1:String, _arg2:Array, _arg3:String):void{ this.srcDir = _arg1; this.srcList = _arg2; this.catName = _arg3; currID = 0; if (categories[_arg3]){ unloadList(_arg3); }; categories[_arg3] = []; cloned[_arg3] = []; addBitmapToList(); if (!progressTimer){ progressTimer = new Timer(32); progressTimer.addEventListener(TimerEvent.TIMER, dispatchLoadProgress, false, 0, true); }; progressTimer.start(); } public function unloadList(_arg1:String):void{ var _local2:*; var _local3:uint; var _local4:uint; var _local5:*; if (!categories[_arg1]){ return; }; _local2 = 0; _local3 = 0; while (_local3 < cloned[_arg1].length) { _local5 = cloned[_arg1][_local4].bitmap; _local5.bitmapData.dispose(); _local5 = null; _local2++; _local3++; }; cloned[_arg1] = []; _local4 = 0; while (_local4 < categories[_arg1].length) { categories[_arg1][_local4].destroy(); categories[_arg1][_local4] = null; _local4++; }; categories[_arg1] = []; waitIntervals = []; dispatchEvent(new Event("listUnloaded")); } public function getAsset(_arg1:String, _arg2:String, _arg3=null, _arg4:Boolean=false):Bitmap{ var _local5:*; var _local6:uint; var _local7:*; _local5 = categories[_arg2]; removeClone(_arg2, _arg1, _arg3); _local6 = 0; while (_local6 < _local5.length) { if (_local5[_local6].ref == _arg1){ if (_local5[_local6].loaded){ _local7 = new Bitmap(_local5[_local6].bitmap.bitmapData.clone()); _local7.name = (_arg1 + int((Math.random() * 999))); cloned[_arg2].push({ref:_arg1, bitmap:_local7}); if (_arg3){ _arg3.addChild(_local7); if (_arg4){ _local7.alpha = 0; tweenEffects.fadeIn(_local7, 0.2); }; } else { return (_local7); }; break; } else { retryGetAsset(_arg1, _arg2, _arg3); break; }; }; _local6++; }; return (null); } private function debug(_arg1:String):void{ } private function dispatchLoadProgress(_arg1:TimerEvent):void{ loadPercent = bml.percent; gLoadPercent = int(((currID / (srcList.length - 1)) * 100)); if (loadPercent < 100){ dispatchEvent(new Event("listProgress")); } else { if (currID >= (srcList.length - 1)){ progressTimer.stop(); dispatchEvent(new Event("listLoaded")); } else { currID++; addBitmapToList(); }; }; } private function onBitmapLoadComplete(_arg1:Event):void{ loadedBitmap = BitmapLoader(_arg1.target); dispatchEvent(new Event("loaded")); } public function hasAsset(_arg1:String, _arg2:String):Boolean{ var _local3:uint; if (categories[_arg2]){ _local3 = 0; while (_local3 < categories[_arg2].length) { if (categories[_arg2][_local3].ref == _arg1){ return (true); }; _local3++; }; }; return (false); } public function destroy():void{ var _local1:*; progressTimer.stop(); progressTimer = null; for (_local1 in categories) { unloadList(_local1); }; categories = null; cloned = null; } public static function initPolicy(_arg1:String):void{ Security.loadPolicyFile(_arg1); } public static function getInstance():BitmapList{ if (!instance){ instance = new (BitmapList); }; return (instance); } } }//package uk.co.barraxworld.loaders
Section 145
//BitmapLoader (uk.co.barraxworld.loaders.BitmapLoader) package uk.co.barraxworld.loaders { import flash.display.*; import flash.events.*; import flash.net.*; import flash.system.*; public class BitmapLoader extends EventDispatcher { public var loaded:Boolean; private var loader:Loader; public var ref:String; public var bitmap:Bitmap; private var fileExtensions:Array; public var type; public var tb:Number;// = 0 private var url:String; public var fname:String; public var lb:Number;// = 0 private var extID:int; private var useExtension:Boolean; public function BitmapLoader(_arg1:String, _arg2:String, _arg3:String, _arg4, _arg5:Boolean=true){ tb = 0; lb = 0; fileExtensions = ["jpg", "gif", "png"]; super(); this.useExtension = _arg5; fname = _arg2; ref = _arg3; url = (_arg1 + fname); type = _arg4; loaded = false; initialise(); } private function handleComplete(_arg1:Event):void{ lb = tb; loaded = true; bitmap = Bitmap(loader.content); registerClassAlias(ref, type); dispatchEvent(new Event("loadComplete")); } private function handleOpen(_arg1:Event):void{ } private function initHandler(_arg1:Event):void{ } private function unLoadHandler(_arg1:Event):void{ } private function removeLoader():void{ } private function initialise():void{ var _local1:String; var _local2:LoaderContext; _local1 = url; if (useExtension){ _local1 = (_local1 + ("." + fileExtensions[extID])); }; _local2 = new LoaderContext(); _local2.checkPolicyFile = true; loader = new Loader(); configureListeners(loader.contentLoaderInfo); loader.load(new URLRequest(_local1), _local2); } public function get percent():int{ return (int(((lb / tb) * 100))); } private function httpStatusHandler(_arg1:HTTPStatusEvent):void{ } private function unregisterListeners(_arg1:IEventDispatcher):void{ _arg1.removeEventListener(Event.COMPLETE, handleComplete); _arg1.removeEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler); _arg1.removeEventListener(Event.INIT, initHandler); _arg1.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); _arg1.removeEventListener(Event.OPEN, handleOpen); _arg1.removeEventListener(ProgressEvent.PROGRESS, handleProgress); _arg1.removeEventListener(Event.UNLOAD, unLoadHandler); } private function ioErrorHandler(_arg1:IOErrorEvent):void{ if (extID >= (fileExtensions.length - 1)){ } else { if (useExtension){ extID++; initialise(); }; }; } private function handleProgress(_arg1:ProgressEvent):void{ tb = _arg1.bytesTotal; lb = Math.min(_arg1.bytesLoaded, 99); } private function configureListeners(_arg1:IEventDispatcher):void{ _arg1.addEventListener(Event.COMPLETE, handleComplete); _arg1.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler); _arg1.addEventListener(Event.INIT, initHandler); _arg1.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); _arg1.addEventListener(Event.OPEN, handleOpen); _arg1.addEventListener(ProgressEvent.PROGRESS, handleProgress); _arg1.addEventListener(Event.UNLOAD, unLoadHandler); } public function destroy():void{ if (loaded){ bitmap.bitmapData.dispose(); bitmap = null; }; unregisterListeners(loader.contentLoaderInfo); Bitmap(loader.content).bitmapData.dispose(); loader.unload(); loader = null; } } }//package uk.co.barraxworld.loaders
Section 146
//GenericXMLLoader (uk.co.barraxworld.loaders.GenericXMLLoader) package uk.co.barraxworld.loaders { import flash.events.*; import flash.net.*; import flash.utils.*; public class GenericXMLLoader extends EventDispatcher { private var loader:URLLoader; public var xml:XML; private var url:String; public function GenericXMLLoader(_arg1:String){ this.url = _arg1; loadXML(); } private function handleComplete(_arg1:Event):void{ var evt = _arg1; try { xml = new XML(evt.target.data); parseXML(); } catch(e:TypeError) { }; } public function destroy():void{ xml = null; loader.removeEventListener(Event.COMPLETE, handleComplete); loader.close(); loader = null; } public function loadXML():void{ loader = new URLLoader(); loader.dataFormat = URLLoaderDataFormat.TEXT; loader.addEventListener(Event.COMPLETE, handleComplete); loader.load(new URLRequest(url)); } public function parseXML():void{ } public function dispatch():void{ dispatchEvent(new Event("xmlLoaded")); } } }//package uk.co.barraxworld.loaders
Section 147
//ProgressBarView (uk.co.barraxworld.loaders.ProgressBarView) package uk.co.barraxworld.loaders { import flash.display.*; import uk.co.barraxworld.effects.*; public class ProgressBarView extends MovieClip { private var tweenEffects:TweenEffects; private var targetScale:Number;// = 0 public var fill_mc:MovieClip; public function ProgressBarView(){ targetScale = 0; super(); tweenEffects = TweenEffects.getInstance(); fill_mc.scaleX = 0; } public function set percent(_arg1:Number):void{ if (targetScale < (_arg1 / 100)){ targetScale = (_arg1 / 100); tweenEffects.scaleTo(fill_mc, targetScale, 1, 0.5); }; } } }//package uk.co.barraxworld.loaders
Section 148
//ChatInputField (uk.co.barraxworld.multiuser.lobby.ChatInputField) package uk.co.barraxworld.multiuser.lobby { import flash.display.*; import flash.events.*; import flash.text.*; import flash.ui.*; public class ChatInputField extends Sprite { private var defaultText:String;// = "Enter message >> " public var str:String; private var timeline:Sprite; private var myTextFormat:TextFormat; private var lockFocus:Boolean; public var focused:Boolean;// = false private var currText:String; private var field:TextField; private var _stage:Stage; public function ChatInputField(_arg1:Sprite, _arg2:Object){ defaultText = "Enter message >> "; focused = false; super(); timeline = _arg1; _stage = timeline.stage; if (_arg2.defaultText != null){ defaultText = _arg2.defaultText; }; currText = defaultText; myTextFormat = new TextFormat(); myTextFormat.font = "arial"; myTextFormat.size = 10; myTextFormat.color = (_arg2.color) ? _arg2.color : 0; field = new TextField(); field.type = TextFieldType.INPUT; field.maxChars = 128; field.defaultTextFormat = myTextFormat; field.background = (_arg2.background) ? _arg2.background : false; if (field.background){ field.backgroundColor = (_arg2.backgroundColor) ? _arg2.backgroundColor : 0xCCCCCC; }; field.border = (_arg2.border) ? _arg2.border : false; if (field.border){ field.borderColor = (_arg2.borderColor) ? _arg2.borderColor : 0x666666; }; field.selectable = _arg2.selectable; field.x = _arg2.x; field.y = _arg2.y; field.width = _arg2.w; field.height = _arg2.h; if (_arg2.lockFocus){ lockFocus = true; focus(); } else { field.addEventListener(FocusEvent.FOCUS_IN, onFocusIn); field.addEventListener(FocusEvent.FOCUS_OUT, onFocusOut); }; timeline.addChild(field); reset(); } public function destroy():void{ onFocusOut(); _stage.focus = null; field.removeEventListener(FocusEvent.FOCUS_IN, onFocusIn); field.removeEventListener(FocusEvent.FOCUS_OUT, onFocusOut); timeline.removeChild(field); } public function focus(){ _stage.focus = field; onFocusIn(); } private function onFocusIn(_arg1:FocusEvent=null):void{ focused = true; if (field.text == currText){ clear(); }; _stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed); } private function submit():void{ str = field.text; if (str == currText){ return; }; clear(); dispatchEvent(new Event("submitted")); } public function reset():void{ if (field.text.length < 1){ field.text = currText; }; } public function clear():void{ field.replaceText(0, field.text.length, ""); } private function onFocusOut(_arg1:FocusEvent=null):void{ if (lockFocus){ focus(); return; }; reset(); focused = false; _stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed); } public function set initText(_arg1:String):void{ currText = ((_arg1 == "default")) ? defaultText : _arg1; field.text = currText; } private function keyPressed(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.ENTER){ submit(); }; } } }//package uk.co.barraxworld.multiuser.lobby
Section 149
//LobbyView (uk.co.barraxworld.multiuser.lobby.LobbyView) package uk.co.barraxworld.multiuser.lobby { import uk.co.barraxworld.game.config.*; import flash.display.*; import uk.co.barraxworld.utils.*; import flash.events.*; import flash.text.*; import flash.geom.*; import uk.co.barraxworld.game.projects.ultrakillz.controllers.*; import uk.co.barraxworld.multiuser.server.socket.*; import uk.co.barraxworld.game.projects.ultrakillz.*; import uk.co.barraxworld.sound.*; import flash.utils.*; import uk.co.barraxworld.ui.*; import uk.co.barraxworld.game.shooter.*; import uk.co.barraxworld.multiuser.server.*; public class LobbyView extends Sprite { private var selectedRoom:Room;// = null private var preparingGame:Boolean;// = false private var roomView:RoomView; private var currRoom:Room; private var roomErrorView; private var defaultTextSize:Number;// = 10 private var timeline:Sprite; private var gameOptions:GameOptions; private var roomPasswordView:RoomPasswordView; private var userListXML:String; private var defaultTextEmbed:Boolean;// = false private var userDetailsPanel:UserDetailsPanel; private var roomListView:RoomListView; private var userListPanel:MovieClip; private var defaultTextFont:String;// = "arial" private var tipsShown:Array; private var prepareGameMaxCount:uint;// = 5 private var currSlotClip:Object; private var chatInputField:ChatInputField; private var selectedUserView:Object; private var modalHolder:Sprite; private var inputTextFormat:TextFormat; private var defaultTextColor:String;// = "0xcccccc" private var prepareGameCount:uint; private var lastChatTime:int; private var currTip:Tip; private var selectedUser:User;// = null private var lastChat:String; private var initResponses:Array; private var chatFloodCount:uint; private var soundObject:SoundObject; private var userScrollpage:Scrollpage; private var roomListXML:String; private var clip:MovieClip; private var outputTextFormat:TextFormat; private var lobbyReady:Boolean; private var localUserID:String; private var socket:UltraKillzSocket; private var outputPanel:Scrollpage; private var debugConsole:DebugConsole; private var socketTimer:Timer; private var userModal:MovieClip; private var roomConfigurator:RoomConfigurator; private var main:Main; private var localUser:User; private var _stage:Stage; public function LobbyView(_arg1:Stage, _arg2:Sprite){ defaultTextFont = "arial"; defaultTextSize = 10; defaultTextColor = "0xcccccc"; defaultTextEmbed = false; selectedRoom = null; preparingGame = false; prepareGameMaxCount = 5; prepareGameCount = prepareGameMaxCount; selectedUser = null; super(); _stage = _arg1; Scrollpage._stage = _stage; gameOptions = GameOptions.getInstance(); main = Main.getInstance(); debugConsole = DebugConsole.getInstance(); initSocket(); soundObject = new SoundObject(this); timeline = _arg2; initResponses = []; initialise(); } public function destroy():void{ hideTip(); soundObject.destroy(); socketTimer.stop(); socketTimer = null; timeline.removeChild(clip); chatInputField.destroy(); outputPanel.destroy(); if (userScrollpage){ userScrollpage.destroy(); userScrollpage = null; }; if (roomListView){ roomListView.destroy(); roomListView = null; }; } private function processInitialResponses():void{ var _local1:uint; _local1 = 0; while (_local1 < initResponses.length) { onSocketData(initResponses.shift()); _local1++; }; initResponses = []; } private function createDropMenu(_arg1:MovieClip):void{ var _local2:DropMenu; var _local3:*; _local2 = new dropMenu(); _local2.x = _arg1.x; _local2.y = (_arg1.y + _arg1.height); _local2.addEventListener("itemSelected", onDropMenuItemSelected, false, 0, true); _local3 = []; switch (_arg1){ case clip.gameOptionsBtn: _local2.name = "gameOptions"; _local3[0] = {id:"invertMouse", title:"Invert Mouse", value:((main.cookie.getItem("invertMouse") == "1")) ? 1 : 0}; _local3[1] = {id:"soundOn", title:"Sound Enabled", value:((main.cookie.getItem("soundOn") == "0")) ? 0 : 1}; _local3[2] = {id:"effectsLevel", title:"Visual Effects Enabled", value:((main.cookie.getItem("effectsLevel") == "0")) ? 0 : 1}; break; case clip.lobbyOptionsBtn: _local2.name = "lobbyOptions"; _local3[0] = {id:"chatColor", title:"Chat Colors", value:1}; _local3[1] = {id:"swearFilter", title:"Chat Filter", value:1}; _local3[2] = {id:"lobbySoundOn", title:"Sound Enabled", value:1}; break; }; clip.addChild(_local2); clip.setChildIndex(_arg1, clip.getChildIndex(_local2)); _local2.initialise(_local3); } private function processInitialLobbyState():void{ if (((userListXML) && (roomListXML))){ dispatchEvent(new Event("lobbyReady")); parseUserList(); parseRoomList(); displayLocalUserDetails(); lobbyReady = true; }; } private function parseRoomList():void{ var _local1:*; var _local2:*; var _local3:uint; var _local4:Room; _local1 = new XML(roomListXML); _local2 = _local1.room.length(); _local3 = 0; while (_local3 < _local2) { _local4 = new Room(); _local4.id = _local1.room[_local3].@id; _local4.name = _local1.room[_local3].@name; _local4.teams = _local1.room[_local3].@teams; _local4.passworded = _local1.room[_local3].@passworded; _local4.killlimit = _local1.room[_local3].@killlimit; _local4.timelimit = _local1.room[_local3].@timelimit; _local4.map = _local1.room[_local3].@map; _local4.ranked = _local1.room[_local3].@ranked; _local3++; }; initRoomList(); if (_local2 > 0){ output("Join an existing game room (above) or create your own game room to start playing!"); } else { output("Create your own game room to start playing!"); }; } private function refreshRoomList():void{ if (Room.list){ if (Room.list.length < 1){ if (!roomConfigurator){ clip.createRoomBtn.gotoAndPlay("pulsate"); }; clip.practiceBtn.gotoAndPlay("pulsate"); showTip("CreateGameTip"); } else { showTip("JoinGameTip"); }; } else { clip.practiceBtn.gotoAndPlay("pulsate"); clip.createRoomBtn.gotoAndPlay("pulsate"); showTip("CreateGameTip", true); }; roomListView.refresh(); } private function showRankStatus():void{ var _local1:*; var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; var _local8:int; var _local9:Object; var _local10:Object; var _local11:uint; var _local12:String; var _local13:*; _local1 = new rankStatusView(); _local2 = {}; _local3 = main.gameConfig.ranks; _local4 = User.localUser.rank; _local5 = main.prevGame.score; _local6 = main.prevGame.ranked; _local7 = main.prevGame.winStatus; _local8 = (_local4 - _local5); _local11 = 0; while (_local11 < _local3.length) { if (_local4 >= _local3[_local11].points_needed){ _local9 = _local3[_local11]; _local2.thumb1ref = ("r" + (_local11 + 1)); } else { if (_local3[_local11]){ _local10 = _local3[_local11]; _local2.thumb2ref = ("r" + (_local11 + 1)); } else { _local10 = {points_needed:0, title:"(No more ranks)"}; }; break; }; _local11++; }; _local2.rankStr1 = _local9.title; _local2.rankStr2 = _local10.title; _local2.currPoints = _local4; _local2.prevPoints = _local5; _local2.points1 = _local9.points_needed; _local2.points2 = _local10.points_needed; _local2.thumbDir = "images/ranks/_.html?i="; _local12 = ""; if (_local8 > 0){ _local12 = (_local12 + (("You have just been awarded <font color='#ffffff'>" + _local8) + " points</font>")); } else { if (_local8 == 0){ _local12 = (_local12 + "You failed to earn any points"); } else { if (_local8 < 0){ _local12 = (_local12 + (("You just lost <font color='#ffffff'>" + Math.abs(_local8)) + " points.</font><br>Better luck next match!")); }; }; }; if (_local6 == 1){ if (_local7 == "win"){ _local12 = (_local12 + "<br><font color='#ffffff' size='-2'>You earned 1 extra point for your clan</font>"); } else { _local12 = (_local12 + "<br><font color='#ffffff' size='-2'>You earned 0 points for your clan</font>"); }; }; _local13 = new MessageOverlay(_stage, _local12); _local13.attach(_local1); _local1.initialise(_local2); } private function onRoomErrorComplete(_arg1:Event):void{ roomErrorView.destroy(); roomErrorView = null; if (roomConfigurator){ roomConfigurator.enable(); }; } private function deselectUser(_arg1:MouseEvent):void{ if (!chatInputField.focused){ _stage.removeEventListener(MouseEvent.MOUSE_DOWN, deselectUser, true); selectedUserView.reset(); selectedUser = null; displayUsers(); }; } private function onRoomCreated(_arg1:String):void{ currRoom.id = _arg1; selectedRoom = Room.getByID(currRoom.id); localUser.room = currRoom.id; localUser.roomPos = 0; } public function resumeAll():void{ initSocket(); displayUsers(); refreshRoomList(); } private function playSound(_arg1:String):void{ if (!gameOptions.soundOn){ return; }; soundObject.play(_arg1); } private function onIncorrectRoomPassword():void{ roomPasswordView.fail(); } private function leaveRoom():void{ localUser.room = ""; localUser.roomPos = -1; currRoom = null; enableButton(clip.createRoomBtn, true); sendLeaveRoom(); refreshRoomList(); preparingGame = false; } private function isInPractice():Boolean{ return ((main.overlay is GameController)); } public function debug(_arg1:String):void{ debugConsole.debug(_arg1); } private function removeRoomConfigurator():void{ roomConfigurator.destroy(); roomConfigurator = null; } private function displayUsers():void{ var _local1:uint; var _local2:*; var _local3:UserView; if (!userListPanel){ userListPanel = new UserListPanel(); userListPanel.field.htmlText = "Lobby"; clip.addChild(userListPanel); userScrollpage = new Scrollpage(); userScrollpage.setDimensions(new Rectangle(0, 0, 120, 145)); userListPanel.holder.addChild(userScrollpage); }; userListPanel.numField.text = User.list.length; userScrollpage.clearPage(); _local2 = User.list; _local2.sortOn("name", Array.CASEINSENSITIVE); _local1 = 0; while (_local1 < _local2.length) { if ((_local2[_local1] is LocalUser)){ _local2.unshift(_local2.splice(_local1, 1)[0]); break; }; _local1++; }; _local1 = 0; while (_local1 < _local2.length) { _local3 = new UserView(_stage, _local2[_local1], true, true, true); _local3.addEventListener("selected", onUserSelected); userScrollpage.addItem(_local3.clip); _local1++; }; } private function initSocketTimer():void{ socketTimer = new Timer(1000); socketTimer.addEventListener(TimerEvent.TIMER, socketTimerHandler, false, 0, true); socketTimer.start(); } private function displayLocalUserDetails():void{ userDetailsPanel = new UserDetailsPanel(clip, localUser); } private function buildRoom(_arg1:Event):void{ var _local2:Object; _local2 = _arg1.target.roomObj; if (_local2.name == "practice"){ removeRoomConfigurator(); main.currLevel = _local2.map; main.botSkillLevel = _local2.skill; dispatchEvent(new Event("goPractice")); } else { currRoom = new Room(); currRoom.name = ((_local2.name)!="") ? _local2.name : (localUser.name + "'s game"); currRoom.password = _local2.password; currRoom.teams = _local2.teams; currRoom.timelimit = _local2.timelimit; currRoom.killlimit = _local2.killlimit; currRoom.map = _local2.map; currRoom.ranked = _local2.ranked; if (currRoom.password != ""){ currRoom.passworded = 1; }; sendNewRoom(); }; } private function onPasswordFailed(_arg1:Event):void{ currRoom = null; localUser.room = ""; localUser.roomPos = -1; removeRoomPaswordView(); roomView.refreshSlots(); } private function getUserList():void{ sendRequest("u"); } private function showTip(_arg1:String, _arg2:Boolean=false):void{ } private function removeRoomPaswordView():void{ if (roomPasswordView){ roomPasswordView.destroy(); roomPasswordView = null; }; } private function enableButton(_arg1:MovieClip, _arg2:Boolean=true):void{ _arg1.alpha = (_arg2) ? 1 : 0.6; _arg1.mouseChildren = false; _arg1.mouseEnabled = _arg2; } private function rankStatusComplete(_arg1:Event):void{ debug("rankStatusComplete - destroying.."); _arg1.target.destroy(); } private function initJoinRoom(_arg1:int):void{ currRoom = selectedRoom; localUser.room = currRoom.id; localUser.roomPos = _arg1; if (currRoom.passworded == 1){ showRoomPasswordPanel(); } else { sendEnterRoom(); }; } private function initSocket():void{ socket = main.socket; socket.currMode = "lobby"; socket.addEventListener("onSocketData", onSocketData); } private function assignUserRank(_arg1:User):void{ var _local2:*; _local2 = main.gameConfig.getRank(_arg1.rank); _arg1.rankID = _local2.id; _arg1.rankTitle = _local2.title; } private function showWelcomeMessage():void{ var _local1:String; _local1 = ""; if (main.prevGame.score){ _local1 = (("Welcome back, " + User.localUser.name) + "!"); showRankStatus(); } else { _local1 = (("Welcome to the lobby, " + User.localUser.name) + "!"); }; output(_local1); } private function userModalFinishedHandler(_arg1:Event):void{ removeUserModal(); } private function initialise(){ initSocketTimer(); clip = new lobbyView(); clip.scrollRect = new Rectangle(0, 0, main.sw, main.sh); modalHolder = new Sprite(); timeline.addChild(clip); timeline.addChild(modalHolder); tipsShown = []; initChatOutputField(); initChatInputField(); clip.createRoomBtn.setText("Create Game"); clip.createRoomBtn.addEventListener(MouseEvent.MOUSE_DOWN, newRoomClick, false, 0, true); clip.gameOptionsBtn.setText("Game Options"); clip.gameOptionsBtn.addEventListener(MouseEvent.MOUSE_DOWN, optionsClick, false, 0, true); clip.lobbyOptionsBtn.setText("Lobby Options"); clip.lobbyOptionsBtn.addEventListener(MouseEvent.MOUSE_DOWN, optionsClick, false, 0, true); clip.practiceBtn.setText("Play CPU Bot"); clip.practiceBtn.addEventListener(MouseEvent.MOUSE_DOWN, practiceClick, false, 0, true); clip.disconnectBtn.visible = false; clip.disconnectBtn.buttonMode = true; clip.disconnectBtn.addEventListener(MouseEvent.MOUSE_DOWN, dispatchDisconnect, false, 0, true); User.initClass(); Room.initClass(); lobbyReady = false; if (User.localUser){ User.localUser.room = ""; User.localUser.roomPos = -1; localUserID = User.localUser.id; fetchInitialLobbyState(); } else { joinServer(); }; } private function showRoomContents():void{ roomView = new RoomView(_stage, clip, selectedRoom); roomView.addEventListener("roomPosSelected", onRoomPosSelected, false, 0, true); roomView.addEventListener("onRoomQuit", quitRoom, false, 0, true); roomView.addEventListener("userSelected", onUserSelected, false, 0, true); roomView.status = ((currRoom == selectedRoom)) ? "Waiting for players..." : "Select a slot to join the room"; } private function dispatchDisconnect(_arg1:Event=null):void{ debug("dispatching disconnect"); dispatchEvent(new Event("disconnect")); } private function removeRoomView():void{ roomView.destroy(); roomView = null; } private function initChatOutputField():void{ var _local1:TextFormat; _local1 = new TextFormat(); _local1.font = defaultTextFont; _local1.size = defaultTextSize; _local1.color = defaultTextColor; outputPanel = new Scrollpage(); outputPanel.setTextFormat(_local1); outputPanel.setDimensions(new Rectangle(150, 230, 248, 140)); clip.addChild(outputPanel); } private function selectUser(_arg1:User):void{ selectedUser = _arg1; chatInputField.initText = (selectedUser) ? (("Whisper to " + _arg1.name) + " >> ") : "default"; } private function parseUserList():void{ var _local1:*; var _local2:*; var _local3:uint; var _local4:*; var _local5:String; var _local6:User; _local1 = new XML(userListXML); _local2 = _local1.user.length(); _local3 = 0; while (_local3 < _local2) { _local5 = _local1.user[_local3].@id; if (_local5 == localUserID){ _local6 = (localUser = new LocalUser()); } else { _local6 = new User(); }; _local6.id = _local5; _local6.room = _local1.user[_local3].@room; _local6.roomPos = _local1.user[_local3].@roomPos; _local6.name = _local1.user[_local3].@name; _local6.clanID = _local1.user[_local3].@clanID; _local6.clanName = _local1.user[_local3].@clanName; _local6.clanTag = _local1.user[_local3].@clanTag; _local6.rank = _local1.user[_local3].@rank; _local6.country = _local1.user[_local3].@country; _local6.silenced = isSilenced(_local6); assignUserRank(_local6); _local3++; }; User.localUser = localUser; _local4 = localUser.name.toLowerCase(); DebugConsole.enabled = (((((_local4 == "malcx")) || ((_local4 == "barrax")))) || ((_local4 == "guest"))); showWelcomeMessage(); displayUsers(); } private function onChatSubmitted(_arg1:Event):void{ var _local2:*; var _local3:*; _local2 = _arg1.currentTarget.str; if (_local2.length > 0){ if (lastChat == _local2){ if (chatFloodCount < 2){ chatFloodCount++; } else { return; }; } else { chatFloodCount = 0; }; _local3 = getTimer(); if (((!(lastChatTime)) || (((_local3 - lastChatTime) > 1000)))){ lastChat = _local2; lastChatTime = _local3; chat(_local2); }; }; } private function output(_arg1:String):void{ outputPanel.addText(_arg1); } private function onUserSelected(_arg1:Event):void{ var _local2:User; var _local3:*; _local2 = _arg1.target.user; removeUserModal(); userModal = new userDetailsModal(); userModal.addEventListener("silenceUser", silenceUserHandler, false, 0, true); userModal.addEventListener("finished", userModalFinishedHandler, false, 0, true); modalHolder.addChild(userModal); _local3 = {}; _local3.silenced = isSilenced(_local2); userModal.init(_local2, _local3); selectUser(_local2); } private function onSocketData(_arg1:Event):void{ var user:User; var room:Room; var msg:String; var xcode:String; var str:String; var traceStr:*; var arr:Array; var evtID:String; var allowPkt:*; var chkList:*; var i:uint; var roomID:*; var id:*; var evt = _arg1; try { str = evt.target.currResponse; traceStr = str; } catch(e:Error) { debug("socketData: evt.target.currResponse invalid"); return; }; try { arr = str.split(","); evtID = arr.splice(0, 1); } catch(e:Error) { debug("socketData: arr OR evtID invalid"); return; }; try { if (!lobbyReady){ allowPkt = false; chkList = ["i", "u", "r"]; i = 0; while (i < chkList.length) { if (evtID == chkList[i]){ allowPkt = true; break; }; i = (i + 1); }; if (!allowPkt){ return; }; }; } catch(e:Error) { debug("onSocketData error: the lobby preparation segment"); return; }; try { switch (evtID){ case "i": localUserID = arr.splice(0, 1); fetchInitialLobbyState(); break; case "u": userListXML = arr.splice(0, 1); processInitialLobbyState(); break; case "r": roomListXML = arr.splice(0, 1); processInitialLobbyState(); break; case "n": room = new Room(); room.id = arr.splice(0, 1); room.name = arr.splice(0, 1); room.passworded = arr.splice(0, 1); room.teams = arr.splice(0, 1); room.killlimit = arr.splice(0, 1); room.timelimit = arr.splice(0, 1); room.map = arr.splice(0, 1); room.ranked = arr.splice(0, 1); playSound("sound_lobby_newroom"); refreshRoomList(); if (isInPractice()){ GameController(main.overlay).showNewLobbyRoom(room); }; break; case "e": room = Room.getByID(arr.splice(0, 1)); user = User.getByID(arr.splice(0, 1)); user.room = room.id; user.roomPos = arr.splice(0, 1); refreshRoomList(); if (selectedRoom == room){ viewRoom(); }; break; case "l": try { user = User.getByID(arr.splice(0, 1)); room = Room.getByID(user.room); user.room = ""; user.roomPos = -1; refreshRoomList(); if (selectedRoom == room){ viewRoom(); }; } catch(e:Error) { debug("a user just quit their game"); }; break; case "d": roomID = arr.splice(0, 1); if (((selectedRoom) && ((selectedRoom.id == roomID)))){ quitRoom(); }; User.removeFromDestroyedRoom(roomID); Room.remove(roomID); refreshRoomList(); displayUsers(); break; case "j": user = new User(); user.id = arr.splice(0, 1); user.name = arr.splice(0, 1); user.rank = arr.splice(0, 1); user.country = arr.splice(0, 1); user.clanID = arr.splice(0, 1); user.clanName = arr.splice(0, 1); user.clanTag = arr.splice(0, 1); user.silenced = isSilenced(user); playSound("sound_lobby_newuser"); assignUserRank(user); displayUsers(); if (isInPractice()){ GameController(main.overlay).showNewLobbyUser(user.name); }; break; case "t": id = arr.splice(0, 1); User.remove(id); displayUsers(); break; case "c": user = User.getByID(arr.splice(0, 1)); if (!user.silenced){ output(user.say(arr.toString())); playSound("sound_lobby_chat"); }; break; case "m": user = User.getByID(arr.splice(0, 1)); if (!user.silenced){ msg = arr.splice(0, 1); output(user.say(msg, "private")); playSound("sound_lobby_chat"); if (isInPractice()){ GameController(main.overlay).showLobbyChat(user.name, msg); }; }; break; case "b": socket.resetTime(); preparingGame = true; prepareGameCount = prepareGameMaxCount; roomView.status = "Starting..."; break; case "s": socket.removeEventListener("onSocketData", onSocketData); Room.currRoom = currRoom; main.prevGame.score = User.localUser.rank; main.prevGame.ranked = currRoom.ranked; dispatchEvent(new Event("goGame")); break; case "y": xcode = arr.splice(0, 1); switch (xcode){ case "c": output((("<font color='#FF3366'>ADMIN::> " + arr.toString()) + "</font>")); break; }; case "x": xcode = arr.splice(0, 1); switch (xcode){ case "000": break; case "100": showRoomError("Room name already exists"); Room.remove(currRoom.id); refreshRoomList(); enableButton(clip.createRoomBtn, true); roomConfigurator.enable(); break; case "101": playSound("sound_lobby_newroom"); onRoomCreated(arr.splice(0, 1)); refreshRoomList(); removeRoomConfigurator(); break; case "200": showRoomError("Room is now full"); break; case "202": showRoomError("Room no longer exists"); break; case "201": onIncorrectRoomPassword(); break; case "203": currRoom = selectedRoom; roomListView.selectedRoom = selectedRoom; refreshRoomList(); viewRoom(); break; case "501": refreshRoomList(); break; case "777": socket.statusString = "Server is full"; break; case "601": socket.statusString = "User not recognised"; break; case "602": socket.statusString = "Only one connection<br>per account allowed"; break; case "610": showRoomError("You can't fight<br>your own clan!"); break; case "611": showRoomError("This is a clan fight.<br>You need to be in a clan!"); break; case "666": if (preparingGame){ prepareGameCount--; if (prepareGameCount < 1){ preparingGame = false; roomView.status = "starting game now!"; } else { roomView.status = (("Game will begin in " + prepareGameCount) + "secs"); if (prepareGameCount == 1){ roomView.disableInteraction(); roomListView.disableInteraction(); }; }; playSound("sound_lobby_countdown"); }; break; }; break; }; } catch(e:Error) { debug("onSocketData error: Big ass switch statement"); }; } private function joinServer():void{ var _local1:*; var _local2:String; _local1 = socket.sessionID; _local2 = _stage.loaderInfo.url; if (_local2.indexOf("file") != -1){ debug("setting the hardcoded sessionID for barrax"); _local1 = "e8c21a048ab4538d59c19e9902674619"; }; sendRequest(("j," + _local1)); } private function practiceClick(_arg1:MouseEvent):void{ removeUserModal(); roomConfigurator = new PracticeConfigurator(clip); roomConfigurator.addEventListener("onSubmit", buildRoom, false, 0, true); roomConfigurator.addEventListener("onCancel", cancelBuildRoom, false, 0, true); roomConfigurator.initialise(); quitRoom(); hideTip(); } private function cancelBuildRoom(_arg1:Event):void{ enableButton(clip.createRoomBtn, true); removeRoomConfigurator(); } private function viewRoom():void{ if (roomView){ removeRoomView(); }; if (roomPasswordView){ removeRoomPaswordView(); }; refreshRoomList(); showRoomContents(); } private function fetchInitialLobbyState():void{ getUserList(); getRoomList(); } private function isSilenced(_arg1:User):Boolean{ var _local2:Array; var _local3:uint; _local2 = main.cookie.getItem("silenceIDs").split(","); _local3 = 0; while (_local3 < _local2.length) { if (_arg1.name.toLowerCase() == _local2[_local3]){ return (true); }; _local3++; }; return (false); } private function fetchHandler(_arg1:TimerEvent):void{ } private function sendEnterRoom():void{ sendRequest(((((("e," + currRoom.id) + ",") + currRoom.password) + ",") + localUser.roomPos)); } private function tipShown(_arg1:String):Boolean{ var _local2:uint; _local2 = 0; while (_local2 < tipsShown.length) { if (tipsShown[_local2] == _arg1){ return (true); }; _local2++; }; return (false); } private function initRoomList():void{ roomListView = new RoomListView(_stage, clip); roomListView.addEventListener("clicked", onRoomListClicked, false, 0, true); refreshRoomList(); } private function onRoomPosSelected(_arg1:Event):void{ var _local2:*; _local2 = _arg1.currentTarget.selectedSlotID; enableButton(clip.createRoomBtn, false); initJoinRoom(_local2); } private function socketTimerHandler(_arg1:TimerEvent):void{ if (!socket.connected){ socketTimer.stop(); dispatchDisconnect(); }; } private function onDropMenuItemSelected(_arg1:Event):void{ var _local2:DropMenu; var _local3:Object; _local2 = DropMenu(_arg1.target); _local3 = _local2.selectedObject; main.cookie.setItem(_local3.id, _local3.value.toString()); switch (_local2.name){ case "gameOptions": if (_local3.id == "effectsLevel"){ gameOptions[_local3.id] = _local3.value; } else { gameOptions[_local3.id] = ((_local3.value == 1)) ? true : false; }; break; case "lobbyOptions": break; }; } private function chat(_arg1:String):void{ if (!selectedUser){ output(localUser.say(_arg1)); sendRequest(("c," + _arg1)); } else { output(localUser.say(_arg1, "private", selectedUser.name)); sendRequest(((("m," + selectedUser.id) + ",") + _arg1)); }; } private function showRoomError(_arg1:String):void{ var _local2:*; _local2 = 3000; if (roomView){ roomErrorView = new RoomErrorView(_stage, roomView.clip, selectedRoom, _arg1, _local2); roomErrorView.addEventListener("onComplete", onRoomErrorComplete); } else { roomErrorView = new MessageOverlay(_stage, _arg1, _local2); roomErrorView.addEventListener("complete", onRoomErrorComplete); }; localUser.room = ""; localUser.roomPos = -1; refreshRoomList(); } private function removeUserModal():void{ if (!userModal){ return; }; userModal.destroy(); modalHolder.removeChild(userModal); userModal = null; selectUser(null); } private function optionsClick(_arg1:MouseEvent):void{ createDropMenu(MovieClip(_arg1.target)); hideTip(); quitRoom(); } private function sendLeaveRoom():void{ sendRequest("l"); } private function showRoomPasswordPanel():void{ roomPasswordView = new RoomPasswordView(_stage, roomView.clip, selectedRoom); roomPasswordView.addEventListener("onRoomPasswordEntered", onRoomPasswordEntered); roomPasswordView.addEventListener("onRoomPasswordQuit", onPasswordFailed); roomPasswordView.addEventListener("onFailRemoveMe", onPasswordFailed); } private function getRoomList():void{ sendRequest("r"); } private function onRoomPasswordEntered(_arg1:Event):void{ var _local2:String; _local2 = _arg1.currentTarget.passwordStr; selectedRoom.password = _local2; sendEnterRoom(); } private function newRoomClick(_arg1:MouseEvent=null):void{ removeUserModal(); enableButton(clip.createRoomBtn, false); roomConfigurator = new RoomConfigurator(clip); roomConfigurator.addEventListener("onSubmit", buildRoom, false, 0, true); roomConfigurator.addEventListener("onCancel", cancelBuildRoom, false, 0, true); roomConfigurator.initialise(); quitRoom(); hideTip(); } private function silenceUserHandler(_arg1:Event):void{ var _local2:String; var _local3:int; var _local4:String; var _local5:Array; var _local6:uint; _local2 = _arg1.target.user.name.toLowerCase(); _local3 = _arg1.target.currValue; User(_arg1.target.user).silenced = ((_local3 == 0)) ? false : true; displayUsers(); if (selectedRoom){ roomView.refreshSlots(); }; _local4 = main.cookie.getItem("silenceIDs"); _local5 = ((_local4 == "")) ? [] : _local4.split(","); _local6 = 0; while (_local6 < _local5.length) { if (_local2 == _local5[_local6]){ _local5.splice(_local6, 1); break; }; _local6++; }; if (_local3 == 1){ _local5.push(_local2); }; _local4 = _local5.toString(); main.cookie.setItem("silenceIDs", _local4); } private function quitRoom(_arg1:Event=null):void{ if (roomView){ removeRoomView(); if (currRoom){ leaveRoom(); }; enableButton(clip.createRoomBtn, true); }; roomListView.selectedRoom = null; refreshRoomList(); selectedRoom = null; } private function sendRequest(_arg1:String):void{ socket.sendRequest(_arg1); } private function onRoomListClicked(_arg1:Event):void{ if (currRoom){ leaveRoom(); }; selectedRoom = roomListView.selectedRoom; viewRoom(); } private function initChatInputField():void{ chatInputField = new ChatInputField(timeline, {x:150, y:377, w:248, h:15, selectable:true, background:false, border:false, color:0xCCCCCC}); chatInputField.addEventListener("submitted", onChatSubmitted, false, 0, true); } private function hideTip(_arg1:Event=null):void{ if (!currTip){ return; }; currTip.stop(); clip.removeChild(currTip); currTip.removeEventListener("complete", hideTip); currTip.destroy(); currTip = null; } private function sendNewRoom():void{ var _local1:String; _local1 = ((((((((((((currRoom.name + ",") + currRoom.password) + ",") + currRoom.teams) + ",") + currRoom.killlimit) + ",") + currRoom.timelimit) + ",") + currRoom.map) + ",") + currRoom.ranked); main.cookie.setItem("roomString", _local1); sendRequest(("n," + _local1)); } } }//package uk.co.barraxworld.multiuser.lobby
Section 150
//LocalUser (uk.co.barraxworld.multiuser.lobby.LocalUser) package uk.co.barraxworld.multiuser.lobby { public class LocalUser extends User { public static var instance:LocalUser; public static var userID:String; public function LocalUser(){ instance = this; } override public function say(_arg1:String, _arg2:String="public", _arg3:String=""):String{ var _local4:String; var _local5:String; var _local6:String; _local5 = (isGod) ? "#00FF00" : "#ff9900"; _local6 = (isGod) ? "#99CC00" : "#FFFF99"; if (_arg2 == "public"){ _local4 = (((((("<font color='" + _local5) + "'>") + name) + " > ") + _arg1) + "</font>"); } else { if (_arg2 == "private"){ _local4 = (((((((("<font color='" + _local6) + "'>") + name) + " (private to ") + _arg3) + ") > ") + _arg1) + "</font>"); }; }; return (_local4); } public static function getInstance():LocalUser{ return (instance); } } }//package uk.co.barraxworld.multiuser.lobby
Section 151
//Modal (uk.co.barraxworld.multiuser.lobby.Modal) package uk.co.barraxworld.multiuser.lobby { import flash.display.*; import flash.events.*; public class Modal extends MovieClip { public var useLastPosition:Boolean;// = true public var currValue:int; private var handle:MovieClip; public var initObj:Object; public static var lastPos_y:Number; public static var lastPos_x:Number; public function Modal():void{ useLastPosition = true; super(); handle = this; this.x = (((useLastPosition) && (lastPos_x))) ? lastPos_x : mouseX; this.y = (((useLastPosition) && (lastPos_y))) ? lastPos_y : mouseY; } public function destroy():void{ genericDestroy(); } public function genericDestroy():void{ handle.bar.removeEventListener(MouseEvent.MOUSE_DOWN, dragClick); handle.closeBtn.removeEventListener(MouseEvent.MOUSE_UP, closeBtnClick); lastPos_x = x; lastPos_y = y; } private function dragRelease(_arg1:MouseEvent):void{ handle.stage.removeEventListener(MouseEvent.MOUSE_UP, dragRelease); stopDrag(); } private function closeBtnClick(_arg1:MouseEvent):void{ dispatchEvent(new Event("finished")); } public function initialise(_arg1:Object):void{ this.initObj = _arg1; handle.bar.addEventListener(MouseEvent.MOUSE_DOWN, dragClick); handle.bar.buttonMode = true; handle.bar.useHandCursor = false; handle.closeBtn.addEventListener(MouseEvent.MOUSE_DOWN, closeBtnClick); handle.closeBtn.buttonMode = true; handle.closeBtn.mouseChildren = false; } public function setPosition(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } private function dragClick(_arg1:MouseEvent):void{ handle.stage.addEventListener(MouseEvent.MOUSE_UP, dragRelease, false, 0, true); startDrag(); } public function populate():void{ } } }//package uk.co.barraxworld.multiuser.lobby
Section 152
//PracticeConfigurator (uk.co.barraxworld.multiuser.lobby.PracticeConfigurator) package uk.co.barraxworld.multiuser.lobby { import flash.display.*; import flash.events.*; import flash.text.*; import uk.co.barraxworld.ui.*; import flash.ui.*; public class PracticeConfigurator extends RoomConfigurator { public function PracticeConfigurator(_arg1:MovieClip){ super(_arg1); cookieStr = "practiceRoomPreset"; } override public function getPresetRoom():Object{ var _local1:String; var _local2:Array; _local1 = cookie.getItem(cookieStr); if (_local1 == ""){ return (null); }; _local2 = _local1.split(","); roomObj = {}; roomObj.map = _local2[0]; roomObj.skill = _local2[1]; return (roomObj); } override public function submit(_arg1:Event=null):void{ var _local2:String; var _local3:uint; disable(); _local2 = ""; roomObj = {}; roomObj.name = "practice"; roomObj.teams = "1v1"; _local3 = 0; while (_local3 < formItems.length) { roomObj[formItems[_local3].name] = formItems[_local3].value; if (_local3 > 0){ _local2 = (_local2 + ","); }; _local2 = (_local2 + (formItems[_local3].value + "")); _local3++; }; cookie.setItem(cookieStr, _local2); dispatchEvent(new Event("onSubmit")); } override public function initialise():void{ var _local1:Array; var _local2:ToggleArrows; var _local3:*; presetRoom = getPresetRoom(); formItems = []; clip = new practiceConfigPanel(); clip.bg.buttonMode = true; clip.bg.useHandCursor = false; timeline.addChild(clip); _local3 = "play/assets/"; _local1 = []; _local1[0] = {ref:"thumb_1.jpg", title:"map1"}; _local1[1] = {ref:"thumb_2.jpg", title:"map2"}; _local1[2] = {ref:"thumb_3.jpg", title:"map3"}; _local1[3] = {ref:"thumb_4.jpg", title:"map4"}; _local1[4] = {ref:"thumb_5.jpg", title:"map5"}; _local1[5] = {ref:"thumb_6.jpg", title:"map6"}; clip.mapMenu.name = "map"; clip.mapMenu.initialise(_local3, _local1); clip.mapMenu.value = (presetRoom) ? presetRoom.map : 1; formItems.push(clip.mapMenu); _local1 = []; _local1[2] = {label:"1", value:0.1}; _local1[1] = {label:"2", value:0.45}; _local1[0] = {label:"3", value:0.6}; _local1[4] = {label:"4", value:0.85}; _local1[3] = {label:"5", value:0.98}; _local2 = new ToggleArrows(clip.holder, "skill", "SKILL:", 0, 0, _local1); formItems.push(_local2); enable(); clip.holder.x = ((clip.width / 2) - (clip.holder.width / 2)); clip.submitBtn.setText("Practice Now"); } } }//package uk.co.barraxworld.multiuser.lobby
Section 153
//Room (uk.co.barraxworld.multiuser.lobby.Room) package uk.co.barraxworld.multiuser.lobby { public class Room { private var __id:String; public var ranked:int;// = 0 private var __passworded:uint;// = 0 private var __teams:String;// = "1v1" private var __users:Array; private var __name:String; private var __timelimit:int; private var __password:String;// = "" private var __map:String; private var __killlimit:int; public static var currRoom:Room; public static var list:Array; public function Room(){ __passworded = 0; __password = ""; __teams = "1v1"; ranked = 0; super(); if (!list){ list = []; }; list.push(this); list.reverse(); __users = []; } public function set name(_arg1:String):void{ __name = _arg1; } public function set teams(_arg1:String):void{ __teams = _arg1; } public function get users():Array{ return (__users); } public function get passworded():uint{ return (__passworded); } public function set passworded(_arg1:uint):void{ __passworded = _arg1; } public function get teams():String{ return (__teams); } public function removeUser(_arg1:User):void{ var _local2:uint; _local2 = 0; while (_local2 < users.length) { if (users[_local2] == _arg1){ users.splice(_local2, 1); }; _local2++; }; } public function getUsers():Array{ var _local1:Array; var _local2:uint; _local1 = []; _local2 = 0; while (_local2 < User.list.length) { if (User.list[_local2].room == __id){ _local1.push(User.list[_local2]); }; _local2++; }; return (_local1); } public function addUser(_arg1:User):void{ users.push(_arg1); } public function get timelimit():int{ return (__timelimit); } public function set id(_arg1:String):void{ __id = _arg1; } public function get id():String{ return (__id); } public function get numSlots():int{ var _local1:*; _local1 = __teams.split("v"); return ((int(_local1[0]) + int(_local1[1]))); } public function get password():String{ return (__password); } public function get name():String{ return (__name); } public function get killlimit():int{ return (__killlimit); } public function set killlimit(_arg1:int):void{ __killlimit = _arg1; } public function set password(_arg1:String):void{ __password = _arg1; } public function set timelimit(_arg1:int):void{ __timelimit = _arg1; } public function get map():String{ return (__map); } public function set map(_arg1:String):void{ __map = _arg1; } public static function remove(_arg1:String):void{ var _local2:uint; _local2 = 0; while (_local2 < list.length) { if (list[_local2].id == _arg1){ list.splice(_local2, 1); }; _local2++; }; } public static function initClass():void{ var _local1:uint; if (list){ if (list.length > 0){ _local1 = 0; while (_local1 < list.length) { list[_local1] = null; _local1++; }; list = []; }; }; } public static function getByID(_arg1:String):Room{ var _local2:uint; _local2 = 0; while (_local2 < list.length) { if (list[_local2].id == _arg1){ return (list[_local2]); }; _local2++; }; return (null); } } }//package uk.co.barraxworld.multiuser.lobby
Section 154
//RoomClip (uk.co.barraxworld.multiuser.lobby.RoomClip) package uk.co.barraxworld.multiuser.lobby { import flash.display.*; import flash.events.*; import flash.text.*; public class RoomClip extends MovieClip { public var field:TextField; private var _enabled:Boolean;// = true public var padlock:padlock_icon; public var _upState:String;// = "_up" public var _downState:String;// = "_down" public var _overState:String;// = "_over" public var room:Room; public function RoomClip(){ _upState = "_up"; _overState = "_over"; _downState = "_down"; _enabled = true; super(); buttonMode = true; mouseChildren = false; addEventListener(Event.ADDED_TO_STAGE, onAddedHandler, false, 0, true); } private function mouseUpHandler(_arg1:MouseEvent):void{ gotoAndStop(_upState); } private function registerListeners(_arg1:Boolean=true):void{ if (_arg1){ addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_OUT, mouseUpHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, false, 0, true); } else { removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); removeEventListener(MouseEvent.MOUSE_OUT, mouseUpHandler); removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); }; } private function mouseDownHandler(_arg1:MouseEvent):void{ gotoAndStop(_downState); } public function enable(_arg1:Boolean=true):void{ _enabled = _arg1; } private function onAddedHandler(_arg1:Event):void{ if (_enabled){ registerListeners(); }; } private function mouseOverHandler(_arg1:MouseEvent):void{ gotoAndStop(_overState); } } }//package uk.co.barraxworld.multiuser.lobby
Section 155
//RoomConfigurator (uk.co.barraxworld.multiuser.lobby.RoomConfigurator) package uk.co.barraxworld.multiuser.lobby { import uk.co.barraxworld.settings.*; import flash.display.*; import flash.events.*; import flash.text.*; import uk.co.barraxworld.ui.*; import flash.ui.*; public class RoomConfigurator extends EventDispatcher { public var timeline:MovieClip; private var nameDefaultText:String;// = "" public var clip:MovieClip; public var formItems:Array; public var presetRoom:Object; public var roomObj:Object; public var cookie:CookieManager; public var cookieStr:String;// = "roomString" private var passwordDefaultText:String;// = "(optional)" public function RoomConfigurator(_arg1:MovieClip){ cookieStr = "roomString"; nameDefaultText = ""; passwordDefaultText = "(optional)"; super(); timeline = _arg1; cookie = CookieManager.instance; } private function cancel(_arg1:MouseEvent):void{ removeListeners(); dispatchEvent(new Event("onCancel")); } public function submit(_arg1:Event=null):void{ var _local2:*; var _local3:*; var _local4:uint; disable(); roomObj = {}; _local2 = clip.nameField.text.split(",").join(""); roomObj.name = ((((_local2.length <= 0)) || ((_local2 == nameDefaultText)))) ? "" : _local2; _local3 = clip.passwordField.text.split(",").join(""); roomObj.password = ((_local3)!=passwordDefaultText) ? _local3 : ""; roomObj.teams = "1v1"; _local4 = 0; while (_local4 < formItems.length) { roomObj[formItems[_local4].name] = formItems[_local4].value; _local4++; }; dispatchEvent(new Event("onSubmit")); } private function focusOutHandler(_arg1:FocusEvent):void{ switch (_arg1.target){ case clip.passwordField: if (clip.passwordField.text.length < 1){ clip.passwordField.text = passwordDefaultText; }; break; case clip.nameField: if (clip.nameField.text.length < 1){ clip.nameField.text = nameDefaultText; }; break; }; } public function getPresetRoom():Object{ var _local1:String; var _local2:Array; _local1 = cookie.getItem(cookieStr); if (_local1 == ""){ return (null); }; _local2 = _local1.split(","); roomObj = {}; roomObj.name = _local2[0]; roomObj.password = ""; roomObj.teams = _local2[2]; roomObj.killlimit = _local2[3]; roomObj.timelimit = _local2[4]; roomObj.map = _local2[5]; return (roomObj); } private function removeListeners():void{ clip.stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); clip.cancelBtn.removeEventListener(MouseEvent.MOUSE_DOWN, cancel); clip.submitBtn.removeEventListener(MouseEvent.MOUSE_DOWN, submit); } private function registerFocusEvent(_arg1:TextField):void{ _arg1.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, false, 0, true); _arg1.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, false, 0, true); } public function destroy():void{ removeListeners(); clip.mapMenu.destroy(); timeline.removeChild(clip); } public function disable():void{ clip.submitBtn.visible = false; clip.cancelBtn.visible = false; removeListeners(); } private function keyDownHandler(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.ENTER){ submit(); }; } public function enable():void{ clip.submitBtn.visible = true; clip.cancelBtn.visible = true; clip.submitBtn.buttonMode = (clip.cancelBtn.buttonMode = true); clip.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); clip.submitBtn.addEventListener(MouseEvent.MOUSE_DOWN, submit); clip.cancelBtn.addEventListener(MouseEvent.MOUSE_DOWN, cancel); } public function initialise():void{ var _local1:Array; var _local2:ToggleArrows; var _local3:*; var _local4:*; var _local5:*; presetRoom = getPresetRoom(); formItems = []; clip = new roomConfigPanel(); clip.nameField.text = (presetRoom) ? ((presetRoom.name)!="") ? presetRoom.name : nameDefaultText : nameDefaultText; clip.nameField.restrict = "a-z A-Z 0-9"; clip.passwordField.text = (presetRoom) ? ((presetRoom.password)!="") ? presetRoom.password : passwordDefaultText : passwordDefaultText; clip.passwordField.restrict = "a-z A-Z 0-9"; registerFocusEvent(clip.nameField); registerFocusEvent(clip.passwordField); clip.bg.buttonMode = true; clip.bg.useHandCursor = false; timeline.addChild(clip); _local3 = "play/assets/"; _local1 = []; _local1[0] = {ref:"thumb_1.jpg", title:"map1"}; _local1[1] = {ref:"thumb_2.jpg", title:"map2"}; _local1[2] = {ref:"thumb_3.jpg", title:"map3"}; _local1[3] = {ref:"thumb_4.jpg", title:"map4"}; _local1[4] = {ref:"thumb_5.jpg", title:"map5"}; _local1[5] = {ref:"thumb_6.jpg", title:"map6"}; clip.mapMenu.name = "map"; clip.mapMenu.initialise(_local3, _local1); clip.mapMenu.value = (presetRoom) ? presetRoom.map : 1; formItems.push(clip.mapMenu); _local1 = []; _local1[0] = {label:"2", value:2}; _local1[1] = {label:"3", value:3}; _local1[2] = {label:"4", value:4}; _local1[3] = {label:"5", value:5}; _local2 = new ToggleArrows(clip.holder, "killlimit", "KILL LIMIT:", 0, 0, _local1); formItems.push(_local2); _local1 = []; _local1[0] = {label:"5min", value:300}; _local1[1] = {label:"10min", value:600}; _local1[2] = {label:"20min", value:1200}; _local1[3] = {label:"2min", value:120}; _local4 = _local2.clip; _local5 = 10; _local2 = new ToggleArrows(clip.holder, "timelimit", "TIME LIMIT:", ((_local4.x + _local4.width) + _local5), 0, _local1); formItems.push(_local2); if (LocalUser.getInstance().hasClan){ _local1 = []; _local1[0] = {label:"no", value:0}; _local1[1] = {label:"yes", value:1}; _local4 = _local2.clip; _local2 = new ToggleArrows(clip.holder, "ranked", "CLAN MATCH:", ((_local4.x + _local4.width) + _local5), 0, _local1); formItems.push(_local2); }; enable(); clip.holder.x = ((clip.width / 2) - (clip.holder.width / 2)); clip.submitBtn.setText("Create Game"); } private function focusInHandler(_arg1:FocusEvent):void{ switch (_arg1.target){ case clip.passwordField: if (clip.passwordField.text == passwordDefaultText){ clip.passwordField.text = ""; }; break; case clip.nameField: if (clip.nameField.text == nameDefaultText){ clip.nameField.text = ""; }; break; }; } } }//package uk.co.barraxworld.multiuser.lobby
Section 156
//RoomErrorView (uk.co.barraxworld.multiuser.lobby.RoomErrorView) package uk.co.barraxworld.multiuser.lobby { import flash.display.*; import flash.events.*; import flash.utils.*; public class RoomErrorView extends EventDispatcher { private var delay:Number; private var timer:Timer; private var msg:String; private var timeline:MovieClip; private var clip:MovieClip; private var room:Room; private var _stage:Stage; public function RoomErrorView(_arg1:Stage, _arg2:MovieClip, _arg3:Room, _arg4:String, _arg5:Number=3000){ _stage = _arg1; msg = _arg4; timeline = _arg2; room = _arg3; delay = _arg5; initialise(); } private function initialise():void{ clip = new roomErrorPanel(); timeline.addChild(clip); clip.field.autoSize = "center"; clip.field.htmlText = msg; timer = new Timer(delay, 1); timer.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete); timer.start(); } private function onComplete(_arg1:TimerEvent):void{ timer.removeEventListener(TimerEvent.TIMER_COMPLETE, onComplete); timer.stop(); timer = null; dispatchEvent(new Event("onComplete")); } public function destroy():void{ timeline.removeChild(clip); } } }//package uk.co.barraxworld.multiuser.lobby
Section 157
//RoomListView (uk.co.barraxworld.multiuser.lobby.RoomListView) package uk.co.barraxworld.multiuser.lobby { import flash.display.*; import flash.events.*; import flash.geom.*; import uk.co.barraxworld.ui.*; public class RoomListView extends EventDispatcher { private var timeline:MovieClip; private var roomBtns:Array; private var _selectedRoom:Room; private var scrollPage:Scrollpage; private var _stage:Stage; public function RoomListView(_arg1:Stage, _arg2:MovieClip):void{ _stage = _arg1; timeline = _arg2; roomBtns = []; initialise(); } public function set selectedRoom(_arg1:Room):void{ _selectedRoom = _arg1; } private function clearList():void{ disableButtons(); roomBtns = []; scrollPage.clearPage(); } public function get selectedRoom():Room{ return (_selectedRoom); } public function disableInteraction():void{ disableButtons(); } public function refresh():void{ var _local1:uint; var _local2:RoomClip; var _local3:Array; var _local4:String; clearList(); if (((Room.list) && ((Room.list.length > 0)))){ _local1 = 0; while (_local1 < Room.list.length) { _local2 = new roomClip(); _local2.room = Room.list[_local1]; _local3 = _local2.room.getUsers(); _local4 = (((((_local2.room.name + " - (") + _local3.length) + "/") + _local2.room.numSlots) + ")"); if (_local2.room.ranked == 1){ _local4 = (_local4 + "<font size='-2'> Clan Match</font>"); }; _local2.field.htmlText = _local4; if (_local2.room != _selectedRoom){ if (_local2.room.ranked == 1){ _local2._upState = "ranked"; }; _local2.gotoAndStop(_local2._upState); _local2.addEventListener(MouseEvent.MOUSE_DOWN, onClick); roomBtns.push(_local2); } else { if (_local2.room.ranked){ _local2._downState = "rankedSelected"; }; _local2.buttonMode = false; _local2.gotoAndStop(_local2._downState); _local2.enable(false); }; _local2.padlock.visible = (_local2.room.passworded == 1); scrollPage.addItem(_local2); _local1++; }; }; } private function onClick(_arg1:Event):void{ _selectedRoom = _arg1.currentTarget.room; dispatchEvent(new Event("clicked")); refresh(); } private function initialise():void{ scrollPage = new Scrollpage(); scrollPage.setDimensions(new Rectangle(14, 13, 270, 164)); timeline.addChild(scrollPage); } private function disableButtons():void{ var _local1:*; for (_local1 in roomBtns) { roomBtns[_local1].removeEventListener(MouseEvent.MOUSE_DOWN, onClick); }; } public function destroy():void{ clearList(); scrollPage.destroy(); scrollPage = null; } } }//package uk.co.barraxworld.multiuser.lobby
Section 158
//RoomPasswordView (uk.co.barraxworld.multiuser.lobby.RoomPasswordView) package uk.co.barraxworld.multiuser.lobby { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.ui.*; public class RoomPasswordView extends EventDispatcher { private var timer:Timer; private var timeline:MovieClip; private var clip:MovieClip; public var passwordStr:String; private var room:Room; private var submitted:Boolean; private var _stage:Stage; public function RoomPasswordView(_arg1:Stage, _arg2:MovieClip, _arg3:Room){ _stage = _arg1; timeline = _arg2; room = _arg3; initialise(); } private function initEvents():void{ clip.quitBtn.addEventListener(MouseEvent.MOUSE_DOWN, onQuitBtn); clip.field.restrict = "a-z A-Z 0-9"; clip.field.addEventListener(FocusEvent.FOCUS_IN, onFieldSelected); clip.field.addEventListener(FocusEvent.FOCUS_OUT, onFieldDeselected); } private function keyPressed(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.ENTER){ onFieldDeselected(); submit(); }; } private function onFieldDeselected(_arg1:FocusEvent=null):void{ _stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed); } private function submit():void{ submitted = true; clip.quitBtn.removeEventListener(MouseEvent.MOUSE_DOWN, onQuitBtn); clip.field.removeEventListener(FocusEvent.FOCUS_IN, onFieldSelected); clip.field.removeEventListener(FocusEvent.FOCUS_OUT, onFieldDeselected); _stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed); passwordStr = clip.field.text.split(",").join(""); dispatchEvent(new Event("onRoomPasswordEntered")); clip.gotoAndStop("sending"); } public function destroy():void{ timeline.removeChild(clip); } private function onFieldSelected(_arg1:FocusEvent):void{ _stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed); } public function fail():void{ clip.gotoAndStop("fail"); timer = new Timer(2000, 1); timer.addEventListener(TimerEvent.TIMER, onFailRemoveMe); timer.start(); } private function onQuitBtn(_arg1:MouseEvent):void{ dispatchEvent(new Event("onRoomPasswordQuit")); } private function initialise():void{ clip = new roomPasswordPanel(); timeline.addChild(clip); initEvents(); submitted = false; clip.stage.focus = clip.field; } private function onFailRemoveMe(_arg1:TimerEvent):void{ dispatchEvent(new Event("onFailRemoveMe")); } } }//package uk.co.barraxworld.multiuser.lobby
Section 159
//RoomView (uk.co.barraxworld.multiuser.lobby.RoomView) package uk.co.barraxworld.multiuser.lobby { import flash.display.*; import flash.events.*; public class RoomView extends EventDispatcher { private var timeline:MovieClip; public var user:User; public var clip:MovieClip; private var localUser:LocalUser; private var room:Room; private var opponent:User; private var users:Array; public var selectedSlotID:int; private var emptySlots:Array; private var _stage:Stage; public function RoomView(_arg1:Stage, _arg2:MovieClip, _arg3:Room){ _stage = _arg1; timeline = _arg2; room = _arg3; localUser = LocalUser.getInstance(); initialise(); } private function onUserSelected(_arg1:Event):void{ user = _arg1.target.user; dispatchEvent(new Event("userSelected")); } private function onRoomQuit(_arg1:MouseEvent):void{ dispatchEvent(new Event("onRoomQuit")); } public function destroy():void{ clip.quitBtn.removeEventListener("onRoomQuit", onRoomQuit); clearSlots(); timeline.removeChild(clip); } private function initEmptySlots():void{ var _local1:uint; var _local2:*; if (emptySlots.length > 0){ _local1 = 0; while (_local1 < emptySlots.length) { _local2 = emptySlots[_local1]; if (room.ranked == 1){ if (canJoinRankedGame()){ _local2.nameField = "<font color='#FFFFFF'>Click to play clan match...</font>"; _local2.addEventListener("selected", onRoomPosSelected); } else { _local2.nameField = "<font color='#FFFFFF'>Opposing clan members only</font>"; }; } else { _local2.nameField = "<font color='#FFFFFF'>Click to join...</font>"; _local2.addEventListener("selected", onRoomPosSelected); }; _local1++; }; }; } public function disableInteraction():void{ clip.quitBtn.visible = false; } public function refreshSlots():void{ var _local1:UserView; var _local2:uint; var _local3:Boolean; var _local4:uint; clearSlots(); emptySlots = []; _local2 = 0; while (_local2 < room.numSlots) { _local3 = false; _local4 = 0; while (_local4 < users.length) { if (users[_local4].roomPos == _local2){ if ((users[_local4] is LocalUser)){ _local1 = new UserView(_stage, users[_local4], false); } else { _local1 = new UserView(_stage, users[_local4], false, true); _local1.addEventListener("selected", onUserSelected); opponent = users[_local4]; }; _local3 = true; break; }; _local4++; }; if (!_local3){ if (localUser.roomPos != -1){ _local1 = new UserView(_stage, null, false, false); _local1.clip.gotoAndStop("waiting"); _local1.nameField_x = 5; _local1.nameField = "<font color='#FFFFFF'>Waiting...</font>"; } else { _local1 = new UserView(_stage, null, true, false); _local1.nameField_x = 5; _local1.clip.gotoAndStop("clickMe"); emptySlots.push(_local1); }; _local1.clip.countryClip.visible = (_local1.clip.rankClip.visible = false); }; _local1.slotID = _local2; _local1.clip.y = (_local1.clip.height * _local2); clip.slotHolder.addChild(_local1.clip); _local2++; }; initEmptySlots(); } private function onRoomPosSelected(_arg1:Event):void{ var _local2:*; _local2 = _arg1.currentTarget; _local2.nameField = "<font color='#FFFFFF'>Joining...</font>"; selectedSlotID = _arg1.currentTarget.slotID; dispatchEvent(new Event("roomPosSelected")); } private function canJoinRankedGame():Boolean{ if (!localUser.hasClan){ return (false); }; if (opponent){ if (localUser.clanID == opponent.clanID){ return (false); }; }; return (true); } private function clearSlots():void{ var _local1:*; var _local2:int; var _local3:uint; var _local4:MovieClip; _local1 = clip.slotHolder; _local2 = _local1.numChildren; _local3 = 0; while (_local3 < _local2) { _local4 = _local1.getChildAt(0); if (_local4.hasEventListener(MouseEvent.MOUSE_DOWN)){ _local4.removeEventListener(MouseEvent.MOUSE_DOWN, onRoomPosSelected); }; _local4.bg.stop(); _local1.removeChild(_local4); _local3++; }; } public function set status(_arg1:String):void{ clip.statusField.htmlText = (("<p align='center'>" + _arg1) + "</p>"); } private function initialise():void{ var _local1:String; var _local2:String; var _local3:String; clip = new roomDetailsPanel(); clip.field.htmlText = room.name; users = room.getUsers(); _local1 = "#ff9900"; clip.mapIcon.initialise("/play/assets/", (("thumb_" + room.map) + ".jpg")); _local2 = ((("<font color='" + _local1) + "'>Map:</font> ") + room.map); _local3 = (((("<font color='" + _local1) + "'>Map:</font> ") + room.map) + " (Clan Match)"); clip.mapField.htmlText = ((room.ranked)==1) ? _local3 : _local2; clip.killlimitField.htmlText = ((("<font color='" + _local1) + "'>Kill Limit: </font>") + room.killlimit); clip.timelimitField.htmlText = ((("<font color='" + _local1) + "'>Time Limit: </font>") + room.timelimit); timeline.addChild(clip); clip.quitBtn.buttonMode = true; clip.quitBtn.addEventListener(MouseEvent.MOUSE_DOWN, onRoomQuit); refreshSlots(); } } }//package uk.co.barraxworld.multiuser.lobby
Section 160
//Tip (uk.co.barraxworld.multiuser.lobby.Tip) package uk.co.barraxworld.multiuser.lobby { import flash.display.*; import flash.events.*; import flash.utils.*; public class Tip extends MovieClip { private var timer:Timer; public static var msgDelay:int = 5000; public function Tip(){ initialise(); } public function destroy():void{ timer.removeEventListener(TimerEvent.TIMER_COMPLETE, timerCompleteHandler); timer = null; } private function initialise():void{ timer = new Timer(msgDelay, 1); timer.addEventListener(TimerEvent.TIMER_COMPLETE, timerCompleteHandler); timer.start(); } private function timerCompleteHandler(_arg1:TimerEvent):void{ dispatchEvent(new Event("complete")); } } }//package uk.co.barraxworld.multiuser.lobby
Section 161
//User (uk.co.barraxworld.multiuser.lobby.User) package uk.co.barraxworld.multiuser.lobby { public class User { public var clanName:String; private var __id:String; private var __rank:int; public var msg:String; private var __roomPos:int; public var silenced:Boolean; public var clanTag:String; private var __rankID:int; private var __name:String; private var __rankTitle:String; public var clanID:String; public var isGod:Boolean; private var __room:String;// = "" private var __country:String; public static var localUser:User; public static var list:Array; public function User(){ __room = ""; super(); if (!list){ list = []; }; list.push(this); list.sortOn("name", Array.DESCENDING); } public function get roomPos():int{ return (__roomPos); } public function say(_arg1:String, _arg2:String="public", _arg3:String=""):String{ var _local4:String; var _local5:String; var _local6:String; var _local7:String; var _local8:String; var _local9:String; _local4 = (isGod) ? "#00FF00" : "#CCCCCC"; _local5 = (isGod) ? "#99CC00" : "#666666"; _local6 = "#FF0000"; _local7 = localUser.name; _local8 = _arg1.split(_local7).join((("<i>" + _local7) + "</i>")); if (_arg2 == "public"){ _local9 = (((((("<font color='" + _local4) + "'>") + __name) + " > ") + _local8) + "</font>"); } else { if (_arg2 == "private"){ _local9 = (((((("<font color='" + _local5) + "'>") + __name) + " (private) > ") + _local8) + "</font>"); }; }; return (_local9); } public function get rank():int{ return (__rank); } public function get name():String{ return (__name); } public function set rankTitle(_arg1:String):void{ __rankTitle = _arg1; } public function get rankTitle():String{ return (__rankTitle); } public function set roomPos(_arg1:int):void{ __roomPos = _arg1; } public function set rankID(_arg1:int):void{ __rankID = _arg1; } public function get id():String{ return (__id); } public function get country():String{ return (__country); } public function set room(_arg1:String):void{ __room = _arg1; } public function set name(_arg1:String):void{ var _local2:*; __name = _arg1; _local2 = _arg1.toLowerCase(); isGod = Boolean((((_local2 == "malcx")) || ((_local2 == "barrax")))); } public function get hasClan():Boolean{ if ((((clanID == "-1")) || (!(clanID)))){ return (false); }; return (true); } public function get rankID():int{ return (__rankID); } public function get room():String{ return (__room); } public function set id(_arg1:String):void{ __id = _arg1; } public function set rank(_arg1:int):void{ __rank = _arg1; } public function set country(_arg1:String):void{ __country = _arg1; } public static function remove(_arg1:String):void{ var _local2:uint; var _local3:User; _local2 = 0; while (_local2 < list.length) { _local3 = list[_local2]; if (_local3.id == _arg1){ list.splice(_local2, 1); }; _local2++; }; } public static function initClass():void{ var _local1:uint; if (list){ if (list.length > 0){ _local1 = 0; while (_local1 < list.length) { list[_local1] = null; _local1++; }; list = []; }; }; } public static function removeFromDestroyedRoom(_arg1:String):void{ var _local2:*; var _local3:uint; var _local4:User; _local2 = []; _local3 = 0; while (_local3 < list.length) { _local4 = list[_local3]; if (_local4.room != _arg1){ _local2.push(_local4); }; _local3++; }; list = _local2; } public static function getByID(_arg1:String):User{ var _local2:uint; var _local3:User; _local2 = 0; while (_local2 < list.length) { _local3 = list[_local2]; if (_local3.id == _arg1){ return (_local3); }; _local2++; }; return (null); } } }//package uk.co.barraxworld.multiuser.lobby
Section 162
//UserDetailsModal (uk.co.barraxworld.multiuser.lobby.UserDetailsModal) package uk.co.barraxworld.multiuser.lobby { import flash.display.*; import flash.events.*; import flash.text.*; public class UserDetailsModal extends Modal { public var countryClip:countryThumb; public var bar:MovieClip; public var nameField:TextField; public var closeBtn:MovieClip; public var bg:MovieClip; public var userIcon:ThumbnailIcon; public var optionSilence:dropMenuItem; public var bodyField:TextField; public var rankClip:rankThumb; public var user:User; public function UserDetailsModal():void{ } public function init(_arg1:User, _arg2:Object):void{ user = _arg1; super.initialise(_arg2); populate(); } private function itemSelectHandler(_arg1:Event):void{ switch (_arg1.target){ case optionSilence: currValue = optionSilence.value; dispatchEvent(new Event("silenceUser")); break; }; } override public function populate():void{ userIcon.initialise("/images/users/_.html?i=", user.name); nameField.htmlText = user.name; bodyField.htmlText = ("Score: " + user.rank); bodyField.htmlText = (bodyField.htmlText + ("Rank: " + user.rankTitle)); if (user.hasClan){ bodyField.htmlText = (bodyField.htmlText + ("Clan: " + user.clanTag)); }; rankClip.initialise("/images/ranks/_.html?i=", ("r" + user.rankID)); countryClip.initialise("/images/flags/_.html?i=", user.country); optionSilence.addEventListener("selected", itemSelectHandler); optionSilence.id = "silence"; optionSilence.title = "Silence user"; optionSilence.value = (initObj.silenced) ? 1 : 0; } override public function destroy():void{ genericDestroy(); optionSilence.removeEventListener("selected", itemSelectHandler); userIcon.destroy(); } } }//package uk.co.barraxworld.multiuser.lobby
Section 163
//UserDetailsPanel (uk.co.barraxworld.multiuser.lobby.UserDetailsPanel) package uk.co.barraxworld.multiuser.lobby { import flash.display.*; public class UserDetailsPanel extends Sprite { private var timeline:Sprite; private var clip:MovieClip; private var user:User; public function UserDetailsPanel(_arg1:Sprite, _arg2:User){ user = _arg2; timeline = _arg1; initialise(); } private function displayLocalUser():void{ clip = new localUserDetailsPanel(); clip.userIcon.initialise("/images/users/_.html?i=", user.name); clip.nameField.htmlText = user.name; clip.bodyField.htmlText = ("Score: " + user.rank); clip.bodyField.htmlText = (clip.bodyField.htmlText + ("Rank: " + user.rankTitle)); if (user.hasClan){ clip.bodyField.htmlText = (clip.bodyField.htmlText + ("Clan: " + user.clanTag)); }; clip.rankClip.initialise("/images/ranks/_.html?i=", ("r" + user.rankID)); clip.countryClip.initialise("/images/flags/_.html?i=", user.country); timeline.addChild(clip); } private function displayUser():void{ clip = new userDetailsPanel(); clip.nameField.htmlText = user.name; clip.bodyField.htmlText = (((("Score: " + user.rank) + "<br/>Clan ID: ") + user.clanID) + "<br/>"); timeline.addChild(clip); } private function initialise():void{ if ((user is LocalUser)){ displayLocalUser(); } else { displayUser(); }; } public function destroy(){ clip.userIcon.destroy(); timeline.removeChild(clip); } } }//package uk.co.barraxworld.multiuser.lobby
Section 164
//UserView (uk.co.barraxworld.multiuser.lobby.UserView) package uk.co.barraxworld.multiuser.lobby { import flash.display.*; import uk.co.barraxworld.utils.*; import flash.events.*; import flash.text.*; import uk.co.barraxworld.ui.*; public dynamic class UserView extends EventDispatcher { private var debugConsole:DebugConsole; public var user:User; private var textCol:String; private var useSmall:Boolean; private var enableToolTip:Boolean; private var _clip:MovieClip; private var isButton:Boolean; private var _stage:Stage; public function UserView(_arg1:Stage=null, _arg2:User=null, _arg3:Boolean=true, _arg4:Boolean=true, _arg5:Boolean=false){ _stage = _arg1; user = _arg2; isButton = _arg3; enableToolTip = _arg4; this.useSmall = _arg5; debugConsole = DebugConsole.getInstance(); createClip(); } private function select(_arg1:MouseEvent):void{ dispatchEvent(new Event("selected")); } public function set nameField_x(_arg1:Number):void{ _clip.nameField.x = _arg1; } public function get clip():MovieClip{ return (_clip); } private function createClip():void{ var _local1:Array; _clip = (useSmall) ? new UserClipSmall() : new UserClip(); _local1 = []; _local1["standard"] = "FFFFFF"; _local1["god"] = "FF9900"; textCol = _local1["standard"]; _clip.nameField.autoSize = TextFieldAutoSize.LEFT; if (user){ if (user.isGod){ textCol = _local1["god"]; }; _clip.nameField.htmlText = (((("<font color='#" + textCol) + "'>") + user.name) + "</font>"); setSilenced(); _clip.rankClip.initialise("/images/ranks/_.html?i=", ("r" + user.rankID)); debug((("requesting flag from :: " + "/images/flags/_.html?i=") + user.country)); _clip.countryClip.initialise("/images/flags/_.html?i=", user.country); if ((user is LocalUser)){ _clip.gotoAndStop("localUser"); return; }; }; initButton(); } private function debug(_arg1:String):void{ debugConsole.debug(_arg1); } public function get id():String{ return (user.id); } public function set nameField(_arg1:String):void{ _clip.nameField.htmlText = _arg1; } public function reset():void{ initButton(); } private function initButton():void{ _clip.gotoAndStop("_up"); if (isButton){ _clip.mouseChildren = false; _clip.buttonMode = true; _clip.addEventListener(MouseEvent.MOUSE_DOWN, select); }; if (enableToolTip){ _clip.mouseChildren = false; _clip.buttonMode = true; _clip.addEventListener(MouseEvent.MOUSE_DOWN, select); }; } private function setSilenced():void{ var _local1:Shape; if (user.silenced){ _local1 = new Shape(); _local1.graphics.lineStyle(1, int(("0x" + textCol))); _local1.graphics.moveTo(_clip.nameField.x, (_clip.nameField.y + (_clip.nameField.height / 2))); _local1.graphics.lineTo((_clip.nameField.x + _clip.nameField.width), (_clip.nameField.y + (_clip.nameField.height / 2))); _clip.addChild(_local1); }; } } }//package uk.co.barraxworld.multiuser.lobby
Section 165
//CustomSocket (uk.co.barraxworld.multiuser.server.socket.CustomSocket) package uk.co.barraxworld.multiuser.server.socket { import uk.co.barraxworld.utils.*; import flash.events.*; import flash.net.*; import flash.utils.*; import flash.errors.*; public class CustomSocket extends Socket { private var _serverOffsetTime:int; private var _serverTime:uint; private var _statusString:String; public var debugConsole:DebugConsole; public var currResponse:String; private var _startTime:uint; public var currMode:String; private var heartbeat:Timer; public function CustomSocket(_arg1:String, _arg2:uint){ super(_arg1, _arg2); _statusString = ""; configureListeners(); debugConsole = DebugConsole.getInstance(); } private function connectHandler(_arg1:Event):void{ dispatchEvent(new Event("onConnectSuccess")); } public function calculateOffsetTime(_arg1, _arg2, _arg3):void{ _serverOffsetTime = int(((((_arg2 - _arg1) + ((_arg3 - _arg2) / 2)) + _arg2) - _arg3)); } public function stopHeartbeat():void{ heartbeat.stop(); heartbeat.reset(); heartbeat.removeEventListener(TimerEvent.TIMER, heartbeatHandler); } public function removeListeners():void{ removeEventListener(Event.CLOSE, closeHandler); removeEventListener(Event.CONNECT, connectHandler); removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); removeEventListener(ProgressEvent.SOCKET_DATA, socketDataHandler); } private function closeHandler(_arg1:Event):void{ dispatchEvent(new Event("onDisconnected")); } public function set statusString(_arg1:String):void{ _statusString = _arg1; debug(("setting statusString: " + _statusString)); } public function get startTime():uint{ return (_startTime); } private function ioErrorHandler(_arg1:IOErrorEvent):void{ dispatchEvent(new Event("onConnectFail")); } private function securityErrorHandler(_arg1:SecurityErrorEvent):void{ } public function debug(_arg1:String, _arg2:int=0):void{ debugConsole.debug(_arg1, _arg2); } private function writeln(_arg1:String):void{ var str = _arg1; str = (str + "\n"); try { writeUTFBytes(str); } catch(e:IOError) { }; } public function get serverOffsetTime():int{ return (_serverOffsetTime); } public function get serverTime():int{ return ((currentTime + _serverOffsetTime)); } private function heartbeatHandler(_arg1:TimerEvent):void{ sendRequest("z"); } public function set startTime(_arg1:uint):void{ _startTime = _arg1; } public function resetTime():void{ _startTime = getTimer(); } private function socketDataHandler(_arg1:ProgressEvent):void{ while (bytesAvailable) { readResponse(readUTFBytes(1)); }; } public function startHeartbeat():void{ heartbeat = new Timer(5000); heartbeat.addEventListener(TimerEvent.TIMER, heartbeatHandler); heartbeat.start(); } public function get statusString():String{ debug(("getting statusString: " + _statusString)); return (_statusString); } public function get currentTime():uint{ return ((getTimer() - _startTime)); } public function sendRequest(_arg1:String):void{ var str = _arg1; writeln(str); try { debug(("--" + str), 1); flush(); } catch(e:IOError) { debug("failed to flush buffer: ", 1); }; } public function readResponse(_arg1:String):void{ } private function configureListeners():void{ addEventListener(Event.CLOSE, closeHandler); addEventListener(Event.CONNECT, connectHandler); addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); addEventListener(ProgressEvent.SOCKET_DATA, socketDataHandler); } public function destroy():void{ removeListeners(); } } }//package uk.co.barraxworld.multiuser.server.socket
Section 166
//RealtimeSocket (uk.co.barraxworld.multiuser.server.socket.RealtimeSocket) package uk.co.barraxworld.multiuser.server.socket { import uk.co.barraxworld.utils.*; import flash.events.*; import flash.utils.*; public class RealtimeSocket extends CustomSocket { private var incomingBuffer:String;// = "" public var sessionID:String; private var maxPacketLen:int;// = 3 private var syncArray:Array; public var timeOffset:Number; private var currRequest:String; public function RealtimeSocket(_arg1:String, _arg2:String, _arg3:uint){ maxPacketLen = 3; incomingBuffer = ""; super(_arg2, _arg3); sessionID = _arg1; currRequest = ""; syncArray = []; } public function updateSync(_arg1:Number):void{ var _local2:uint; _local2 = 5; syncArray.unshift({id:_arg1, time:getTimer()}); if (syncArray.length > _local2){ syncArray.pop(); }; } public function queueRequest(_arg1:String, _arg2:Boolean=false):void{ var _local3:Array; if (_arg2){ sendNextRequest(_arg1); } else { currRequest = ((currRequest)=="") ? _arg1 : ((currRequest + "|") + _arg1); _local3 = currRequest.split("|"); if (_local3.length >= maxPacketLen){ sendNextRequest(); }; }; } private function flushResponse():void{ currResponse = StringUtils.trimWhite(incomingBuffer); debug(currResponse, 2); incomingBuffer = ""; dispatchEvent(new Event("onSocketData")); } public function sendNextRequest(_arg1:String=""):void{ if (_arg1 != ""){ sendRequest(_arg1); return; }; if (currRequest != ""){ sendRequest(currRequest); currRequest = ""; }; } public function getSyncTime():int{ var _local1:Number; var _local2:int; var _local3:*; var _local4:Number; var _local5:Number; _local1 = 0; _local2 = syncArray.length; _local3 = 0; while (_local3 < syncArray.length) { _local4 = syncArray[_local3].id; _local5 = syncArray[_local3].time; _local1 = (_local1 + (_local5 + (_local3 * 1000))); _local3++; }; _local1 = ((_local1 / _local2) - getTimer()); return (int(_local1)); } override public function readResponse(_arg1:String):void{ var _local2:*; _local2 = _arg1.charCodeAt(0); if ((((((_local2 == 0)) || ((_local2 == 10)))) || ((_local2 == 13)))){ flushResponse(); } else { incomingBuffer = (incomingBuffer + _arg1); return; }; } } }//package uk.co.barraxworld.multiuser.server.socket
Section 167
//UltraKillzSocket (uk.co.barraxworld.multiuser.server.socket.UltraKillzSocket) package uk.co.barraxworld.multiuser.server.socket { public class UltraKillzSocket extends RealtimeSocket { static const cmdArray:Array = [{id:"p", ref:"ping"}, {id:"g", ref:"ready"}, {id:"a", ref:"action"}, {id:"a1", ref:"move1"}, {id:"a2", ref:"move2"}, {id:"a3", ref:"firing"}, {id:"a4", ref:"arming"}, {id:"a5", ref:"hit"}, {id:"a6", ref:"jump"}, {id:"k", ref:"died"}, {id:"a7", ref:"spawn"}, {id:"a8", ref:"begin"}, {id:"a9", ref:"pickupSpawned"}, {id:"a10", ref:"pickupCollected"}, {id:"l", ref:"leave"}, {id:"c", ref:"chat"}, {id:"q", ref:"scoretable"}]; public static var instance:UltraKillzSocket = null; public function UltraKillzSocket(_arg1:String, _arg2:String, _arg3:uint){ super(_arg1, _arg2, _arg3); startHeartbeat(); instance = this; } public function getID(_arg1:String):String{ var _local2:uint; _local2 = 0; while (_local2 < cmdArray.length) { if (_arg1 == cmdArray[_local2].ref){ return (cmdArray[_local2].id); }; _local2++; }; return ("getID: no id found"); } public function getRef(_arg1:String):String{ var _local2:uint; _local2 = 0; while (_local2 < cmdArray.length) { if (_arg1 == cmdArray[_local2].id){ return (cmdArray[_local2].ref); }; _local2++; }; return ("getRef: no ref found"); } public function addRequest(_arg1:String, _arg2:String="", _arg3:Boolean=false):void{ var _local4:String; _local4 = ((_arg2)!="") ? ((currentTime + ",") + _arg2) : currentTime.toString(); queueRequest(((getID(_arg1) + ",") + _local4), _arg3); } override public function destroy():void{ stopHeartbeat(); removeListeners(); instance = null; } public static function getInstance():UltraKillzSocket{ return (instance); } } }//package uk.co.barraxworld.multiuser.server.socket
Section 168
//MessageOverlay (uk.co.barraxworld.multiuser.server.MessageOverlay) package uk.co.barraxworld.multiuser.server { import flash.display.*; import flash.events.*; import flash.utils.*; public class MessageOverlay extends EventDispatcher { public var callback:Function; private var timeline:Stage; private var timer:Timer; private var overlay:MovieClip; private var attached:Array; public function MessageOverlay(_arg1:Stage, _arg2:String, _arg3:uint=0){ overlay = new messageOverlay(); timeline = _arg1; overlay.field.htmlText = _arg2; overlay.visible = false; _arg1.addChild(overlay); if (_arg3 > 0){ timer = new Timer(_arg3); timer.addEventListener(TimerEvent.TIMER, onComplete); timer.start(); }; show(); } private function hide():void{ overlay.visible = false; dispatchEvent(new Event("complete")); } public function attach(_arg1:MovieClip):void{ if (!attached){ attached = []; }; _arg1.addEventListener("complete", onComplete); attached.push(_arg1); overlay.addChild(_arg1); } private function removeTimer():void{ if (timer != null){ timer.stop(); timer.removeEventListener(TimerEvent.TIMER, onComplete); timer = null; }; } private function onComplete(_arg1:Event):void{ removeTimer(); hide(); } public function destroy():void{ var _local1:uint; if (attached){ _local1 = 0; while (_local1 < attached.length) { overlay.removeChild(attached[_local1]); attached[_local1].removeEventListener("complete", onComplete); attached[_local1].destroy(); attached[_local1] = null; _local1++; }; attached = null; }; removeTimer(); timeline.removeChild(overlay); overlay = null; } private function show():void{ overlay.visible = true; } } }//package uk.co.barraxworld.multiuser.server
Section 169
//ServerList (uk.co.barraxworld.multiuser.server.ServerList) package uk.co.barraxworld.multiuser.server { import uk.co.barraxworld.loaders.*; public class ServerList extends GenericXMLLoader { private var _sArray:Array; private var locationFilter:String; public function ServerList(_arg1:String, _arg2:String="all"){ locationFilter = _arg2.toLowerCase(); super(_arg1); } override public function parseXML():void{ var _local1:uint; var _local2:uint; var _local3:String; var _local4:Object; _sArray = []; _local1 = xml.server.length(); _local2 = 0; while (_local2 < _local1) { _local3 = xml.server[_local2].loc; if ((((_local3.toLowerCase() == locationFilter)) || ((locationFilter == "all")))){ _local4 = {}; _local4.loc = _local3; _local4.name = xml.server[_local2].name; _local4.ip = xml.server[_local2].ip; _local4.port = xml.server[_local2].port; _sArray.push(_local4); }; _local2++; }; dispatch(); } public function get sArray():Array{ return (_sArray); } } }//package uk.co.barraxworld.multiuser.server
Section 170
//ServerView (uk.co.barraxworld.multiuser.server.ServerView) package uk.co.barraxworld.multiuser.server { import flash.display.*; import flash.events.*; import uk.co.barraxworld.effects.*; public class ServerView extends MovieClip { private var tweenEffects:TweenEffects; private var serverList:Array; private var btns:Array; public var template:menuTemplate; private var holder:Sprite; public var serverObj:Object; private var _stage:Stage; public function ServerView(){ tweenEffects = TweenEffects.getInstance(); } public function destroy(){ var _local1:uint; _local1 = 0; while (_local1 < btns.length) { btns[_local1].removeEventListener(MouseEvent.MOUSE_DOWN, onServerSelected); _local1++; }; template.destroy(); } public function initialise(_arg1:Stage, _arg2:String, _arg3:Array):void{ var _local4:*; var _local5:*; var _local6:*; var _local7:*; var _local8:*; var _local9:uint; var _local10:uint; var _local11:*; var _local12:*; var _local13:*; _stage = _arg1; serverList = _arg3; holder = new Sprite(); _arg3 = serverList; _local4 = 3; _local5 = 3; _local6 = 100; _local7 = 80; _local8 = 0; btns = []; _local9 = 0; while (_local9 < _local4) { _local10 = 0; while (_local10 < _local5) { if (_local8 >= _arg3.length){ break; }; _local11 = new btnServerSelect(); holder.addChild(_local11); _local11.x = (_local10 * _local6); _local11.y = (_local9 * _local7); _local11.mouseChildren = false; _local11.buttonMode = true; _local12 = _arg3[_local8]; _local11.id = _local8; _local11.field.autoSize = "center"; _local11.field.text = _local12.name; _local11.addEventListener(MouseEvent.MOUSE_DOWN, onServerSelected); _local11.alpha = 0; tweenEffects.fadeIn(_local11, 0.2); _local13 = new countryThumb(); _local13.initialise(_arg2, _local12.loc); _local11.addChild(_local13); btns.push(_local11); _local8++; _local10++; }; _local9++; }; holder.x = ((_stage.stageWidth / 2) - (holder.width / 2)); holder.y = (_stage.stageHeight / 2); addChild(holder); } private function onServerSelected(_arg1:MouseEvent):void{ serverObj = serverList[_arg1.target.id]; dispatchEvent(new Event("serverSelected")); } } }//package uk.co.barraxworld.multiuser.server
Section 171
//CookieManager (uk.co.barraxworld.settings.CookieManager) package uk.co.barraxworld.settings { import flash.net.*; public class CookieManager { private var so:SharedObject; private var cName:String; public static var instance:CookieManager; public function CookieManager(_arg1:String){ instance = this; cName = _arg1; initialise(); } public function getAllItems():Array{ var _local1:Array; var _local2:String; _local1 = []; for (_local2 in so.data) { _local1[_local2] = ((so.data[_local2])!=undefined) ? so.data[_local2] : ""; }; return (_local1); } public function setItem(_arg1:String, _arg2:Object):void{ so.data[_arg1] = _arg2; } private function initialise():void{ so = SharedObject.getLocal(cName, "/"); } public function getItem(_arg1:String):String{ if (!so.data[_arg1]){ return (""); }; return (so.data[_arg1]); } } }//package uk.co.barraxworld.settings
Section 172
//SoundObject (uk.co.barraxworld.sound.SoundObject) package uk.co.barraxworld.sound { import uk.co.barraxworld.utils.*; import flash.events.*; import flash.media.*; import flash.utils.*; public class SoundObject { private var sounds:Array; private var debugConsole:DebugConsole; private var myParent:Object; public static var maxChannels:uint = 16; public static var soundOn:Boolean = true; public static var list:Array; public function SoundObject(_arg1:Object){ debugConsole = DebugConsole.getInstance(); if (!list){ list = []; }; this.myParent = _arg1; list.push(this); sounds = []; } public function destroy():void{ var _local1:uint; removeAllSounds(); _local1 = 0; while (_local1 < list.length) { if (list[_local1] == this){ list[_local1] = null; list.splice(_local1, 1); return; }; _local1++; }; } public function get numSounds():int{ return (sounds.length); } public function removeAllSounds():void{ var _local1:uint; _local1 = 0; while (_local1 < sounds.length) { endSound(sounds[_local1]); sounds[_local1].sound = null; sounds[_local1].sndChannel = null; sounds[_local1] = null; _local1++; }; sounds = []; } public function setLevels(_arg1:Number, _arg2:Number):void{ var _local3:uint; var _local4:*; if (sounds.length == 0){ return; }; _local3 = 0; while (_local3 < sounds.length) { _local4 = sounds[_local3]; if (_local4.sndChannel){ if (!_local4.sndTransform){ _local4.sndTransform = new SoundTransform(); }; _local4.sndTransform.volume = (_arg1 * _local4.soundVol); _local4.sndTransform.pan = _arg2; _local4.sndChannel.soundTransform = _local4.sndTransform; }; _local3++; }; } public function play(_arg1:String, _arg2:int=0, _arg3:Number=0, _arg4:Number=1):void{ var currNumOfChannels:*; var existing:*; var soundObject:SoundObject; var classRef:*; var sound:*; var soundVol:*; var sndChannel:*; var linkage = _arg1; var loops = _arg2; var offset = _arg3; var vol = _arg4; if (!soundOn){ return; }; currNumOfChannels = getNumberOfChannels(); if (currNumOfChannels > (maxChannels - 1)){ soundObject = list[0]; if (soundObject != this){ soundObject.destroy(); }; }; existing = checkExists(linkage); if (existing){ existing.sound.play(offset, loops); } else { try { classRef = (getDefinitionByName(linkage) as Class); sound = new (classRef); soundVol = vol; sndChannel = sound.play(offset, loops); sndChannel.addEventListener(Event.SOUND_COMPLETE, completeHandler); sounds.push({ref:linkage, sound:sound, soundVol:soundVol, sndChannel:sndChannel}); } catch(e:Error) { debug("Sound overflow - aborting.."); destroy(); }; }; } private function completeHandler(_arg1:Event):void{ } public function debug(_arg1:String):void{ debugConsole.debug(_arg1); } private function endSound(_arg1:Object):void{ _arg1.sndChannel.removeEventListener(Event.SOUND_COMPLETE, completeHandler); _arg1.sndChannel.stop(); } private function checkExists(_arg1:String):Object{ var _local2:uint; _local2 = 0; while (_local2 < sounds.length) { if (sounds[_local2].ref == _arg1){ return (sounds[_local2]); }; _local2++; }; return (null); } public static function getNumberOfChannels():int{ var _local1:uint; var _local2:uint; _local1 = 0; _local2 = 0; while (_local2 < list.length) { _local1 = (_local1 + list[_local2].numSounds); _local2++; }; return (_local1); } public static function enableSounds(_arg1:Boolean=true):void{ soundOn = _arg1; } } }//package uk.co.barraxworld.sound
Section 173
//MochiBot (uk.co.barraxworld.tracking.MochiBot) package uk.co.barraxworld.tracking { import flash.display.*; import flash.net.*; import flash.system.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ var _local3:MochiBot; var _local4:String; var _local5:URLVariables; var _local6:String; var _local7:URLRequest; var _local8:Loader; if (Security.sandboxType == "localWithFile"){ return (null); }; _local3 = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); _local4 = "http://core.mochibot.com/my/core.swf"; _local5 = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; _local6 = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; _local7 = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; _local8 = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package uk.co.barraxworld.tracking
Section 174
//AlertPopup (uk.co.barraxworld.ui.AlertPopup) package uk.co.barraxworld.ui { import flash.text.*; public class AlertPopup extends Popup { public var btn1:genericButton; public var bodyField:TextField; public var titleField:TextField; public function AlertPopup():void{ } } }//package uk.co.barraxworld.ui
Section 175
//CheckBox (uk.co.barraxworld.ui.CheckBox) package uk.co.barraxworld.ui { import flash.display.*; import flash.events.*; public class CheckBox extends MovieClip { public var myTitle:String; private var myValue:int; public var myName:String; public function CheckBox(){ buttonMode = true; mouseChildren = false; addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true); addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, false, 0, true); } public function init(_arg1:Event):void{ stop(); myName = name; } private function toggle():void{ myValue = ((currentFrame == 1)) ? 1 : 0; gotoAndStop((myValue + 1)); dispatchEvent(new Event("selected")); } private function mouseDownHandler(_arg1:MouseEvent):void{ toggle(); } public function get value(){ return (myValue); } public function set value(_arg1:int):void{ myValue = _arg1; gotoAndStop((myValue + 1)); } } }//package uk.co.barraxworld.ui
Section 176
//ConfirmPopup (uk.co.barraxworld.ui.ConfirmPopup) package uk.co.barraxworld.ui { import flash.events.*; import flash.text.*; public class ConfirmPopup extends Popup { public var btn2:genericButton; public var btn1:genericButton; public var bodyField:TextField; public var titleField:TextField; public function ConfirmPopup():void{ btn2.addEventListener(MouseEvent.MOUSE_DOWN, btnPress, false, 0, true); } public function set btn2_title(_arg1:String){ btn2.setText(_arg1); } } }//package uk.co.barraxworld.ui
Section 177
//DropMenu (uk.co.barraxworld.ui.DropMenu) package uk.co.barraxworld.ui { import flash.display.*; import flash.events.*; import gs.*; public class DropMenu extends MovieClip { public var bg:MovieClip; public var top:MovieClip; public var list:Array; public var footer:MovieClip; public var selectedObject:Object; public static var instance:DropMenu; public function DropMenu(){ if (instance){ instance.terminate(); }; instance = this; } private function mouseLeaveHandler():void{ removeEventListener(Event.ENTER_FRAME, tick); TweenLite.killTweensOf(this); TweenLite.to(this, 0.2, {alpha:0, onComplete:removeMe}); } private function removeMe():void{ parent.removeChild(this); instance = null; } private function itemSelectHandler(_arg1:Event):void{ var _local2:*; _local2 = list[int(_arg1.target.name)]; _local2.value = _arg1.target.value; selectedObject = _local2; dispatchEvent(new Event("itemSelected")); } public function terminate():void{ removeEventListener(Event.ENTER_FRAME, tick); TweenLite.killTweensOf(this); removeMe(); } private function tick(_arg1:Event):void{ var _local2:*; _local2 = 6; if ((((((((mouseX < -(_local2))) || ((mouseX > (width + _local2))))) || ((mouseY < (top.y - _local2))))) || ((mouseY > ((footer.y + footer.height) + _local2))))){ mouseLeaveHandler(); }; } public function initialise(_arg1:Array):void{ var _local2:*; var _local3:*; var _local4:*; var _local5:uint; var _local6:Object; list = _arg1; _local2 = 4; _local3 = 4; _local4 = 2; _local5 = 0; while (_local5 < list.length) { _local6 = list[_local5]; _local6.clip = new dropMenuItem(); _local6.clip.addEventListener("selected", itemSelectHandler, false, 0, true); _local6.clip.name = _local5; _local6.clip.title = _local6.title; _local6.clip.value = _local6.value; _local6.clip.x = _local3; _local6.clip.y = (_local2 + (_local5 * (_local6.clip.height + _local4))); addChild(_local6.clip); _local5++; }; mouseEnabled = false; footer.y = (_local6.clip.y + _local6.clip.height); bg.height = footer.y; TweenLite.killTweensOf(this); TweenLite.from(this, 0.4, {alpha:0}); addEventListener(Event.ENTER_FRAME, tick, false, 0, true); } } }//package uk.co.barraxworld.ui
Section 178
//GenericButton (uk.co.barraxworld.ui.GenericButton) package uk.co.barraxworld.ui { import flash.display.*; import flash.text.*; public class GenericButton extends MovieClip { public var field:TextField; public var callback:Function; public function GenericButton(){ stop(); buttonMode = true; mouseChildren = false; } public function setText(_arg1:String):void{ var str = _arg1; try { field.autoSize = "center"; field.htmlText = str; } catch(e:Error) { }; } } }//package uk.co.barraxworld.ui
Section 179
//IconMenu (uk.co.barraxworld.ui.IconMenu) package uk.co.barraxworld.ui { import flash.display.*; import uk.co.barraxworld.utils.*; import flash.events.*; import flash.utils.*; public class IconMenu extends EventDispatcher { private var debugConsole:DebugConsole; private var iconClassRef:String; private var btnMode:Boolean; private var clips:Array; private var layout:String; public var animTimer:Timer; private var ypos:Number; private var timeline:MovieClip; public var clip:MovieClip; private var gap:Number; private var xpos:Number; public var arr:Array; private var centralise:Boolean; private var cycle:Boolean; public var hoverIndex:Number; public static var selectedIndex:int = -1; public function IconMenu(_arg1:MovieClip){ timeline = _arg1; debugConsole = DebugConsole.getInstance(); } public function animTimerHandler(_arg1:TimerEvent):void{ } private function addClips():void{ var _local1:*; var _local2:*; var _local3:uint; var _local4:Class; var _local5:MovieClip; clips = []; clip = new MovieClip(); clip.x = xpos; clip.y = ypos; _local1 = ((layout == "horizontal")) ? gap : 0; _local2 = ((layout == "vertical")) ? gap : 0; _local3 = 0; while (_local3 < arr.length) { _local4 = (getDefinitionByName(iconClassRef) as Class); _local5 = new (_local4); _local5.attachSprite(arr[_local3].iconRef, _local5.bg); if (_local5.field){ _local5.field.text = (_local3 + 1); _local5.field.antiAliasType = "advanced"; }; _local5.id = _local3; _local5.x = (_local1 * _local3); _local5.y = (_local2 * _local3); _local5.cacheAsBitmap = true; if (btnMode){ _local5.buttonMode = true; _local5.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); }; clips.push(_local5); clip.addChild(_local5); _local3++; }; if (centralise){ if (layout == "horizontal"){ clip.x = (clip.x - (clip.width / 2)); }; if (layout == "vertical"){ clip.y = (clip.y - (clip.height / 2)); }; }; timeline.addChild(clip); } public function destroy():void{ removeClips(); if (animTimer){ animTimer.stop(); animTimer.removeEventListener(TimerEvent.TIMER, animTimerHandler); animTimer = null; }; } public function selectNext(_arg1:int=1):void{ selectedIndex = (selectedIndex + _arg1); if (cycle){ if (selectedIndex < 0){ select((arr.length - 1)); }; if (selectedIndex > (arr.length - 1)){ select(0); }; } else { if (selectedIndex < 0){ select(0); }; if (selectedIndex > (arr.length - 1)){ select((arr.length - 1)); }; }; render(); } public function setAlpha(_arg1:Number):void{ clip.alpha = _arg1; } public function render():void{ var _local1:uint; var _local2:*; _local1 = 0; while (_local1 < arr.length) { _local2 = clips[_local1]; if (_local1 == selectedIndex){ _local2.gotoAndStop("_down"); } else { if (_local1 == hoverIndex){ _local2.gotoAndStop("_over"); } else { _local2.gotoAndStop("_up"); }; }; _local1++; }; } public function initialise(_arg1:Array, _arg2:Object):void{ arr = _arg1; iconClassRef = _arg2.iconClassRef; xpos = (_arg2.xpos) ? _arg2.xpos : 0; ypos = (_arg2.ypos) ? _arg2.ypos : 0; gap = (_arg2.gap) ? _arg2.gap : 10; layout = (_arg2.layout) ? _arg2.layout : "vertical"; cycle = (_arg2.cycle) ? _arg2.cycle : false; btnMode = (_arg2.btnMode) ? _arg2.btnMode : false; centralise = (_arg2.centralise) ? _arg2.centralise : false; hoverIndex = -1; addClips(); } public function hover(_arg1:int):void{ hoverIndex = _arg1; render(); } private function debug(_arg1:String):void{ debugConsole.debug(_arg1); } private function mouseDownHandler(_arg1:MouseEvent):void{ select(_arg1.target.id); } private function dispatch(_arg1:Number):void{ dispatchEvent(new Event("onSelected")); } public function select(_arg1:int):void{ selectedIndex = _arg1; hoverIndex = -1; render(); } private function removeClips():void{ var i:uint; i = 0; while (i < arr.length) { if (clips[i]){ if (btnMode){ clips[i].removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); }; }; i = (i + 1); }; try { timeline.removeChild(clip); } catch(e:Error) { debug(("IconMenu RemoveClips :: Error= " + e)); }; } } }//package uk.co.barraxworld.ui
Section 180
//Popup (uk.co.barraxworld.ui.Popup) package uk.co.barraxworld.ui { import flash.display.*; import flash.events.*; import flash.text.*; import gs.*; import flash.utils.*; import flash.filters.*; public class Popup extends MovieClip { public var blurBG:Boolean;// = true public var subject:String; public var handle:MovieClip; private var bmd:BitmapData; public var continuation_callback:Function; public var resultStr:String; public function Popup(){ blurBG = true; super(); handle = this; addEventListener(Event.ADDED_TO_STAGE, onAdded, false, 0, true); handle.btn1.addEventListener(MouseEvent.MOUSE_DOWN, btnPress, false, 0, true); } public function set btn1_title(_arg1:String){ handle.btn1.setText(_arg1); } public function set body(_arg1:String){ handle.bodyField.htmlText = _arg1; } public function btnPress(_arg1:MouseEvent):void{ var shape:Shape; var evt = _arg1; resultStr = ((evt.target.name == "btn1")) ? "yes" : "no"; shape = new Shape(); shape.graphics.lineStyle(); shape.graphics.beginFill(0, 0); shape.graphics.drawRect(0, 0, handle.stage.stageWidth, handle.stage.stageHeight); shape.graphics.endFill(); addChild(shape); if (bmd){ bmd.dispose(); }; TweenLite.to(handle, 0.3, {alpha:0, onComplete:function (){ dispatchEvent(new Event("submit")); }}); } private function onAdded(_arg1:Event):void{ var sprite:Sprite; var filterArray:*; var bm:Bitmap; var evt = _arg1; if (blurBG){ sprite = new Sprite(); addChildAt(sprite, 0); filterArray = []; filterArray[0] = new BlurFilter(8, 8, 2); try { bmd = new BitmapData(handle.stage.stageWidth, handle.stage.stageHeight); bmd.draw(handle.stage.getChildAt(1)); bm = new Bitmap(bmd); sprite.filters = filterArray; sprite.addChild(bm); } catch(e:Error) { }; TweenLite.from(sprite, 0.3, {alpha:0}); }; } public function set title(_arg1:String){ handle.titleField.htmlText = _arg1; } } }//package uk.co.barraxworld.ui
Section 181
//Scrollpage (uk.co.barraxworld.ui.Scrollpage) package uk.co.barraxworld.ui { import flash.display.*; import flash.events.*; import flash.text.*; import flash.geom.*; import flash.filters.*; public class Scrollpage extends MovieClip { private var field:TextField; private var contentstarty:Number; public var background:MovieClip; public var bf:BlurFilter; private var s_contentClip_y:Number;// = 0 private var minY:Number; private var s_contentstarty:Number;// = 0 private var contentClip:Sprite; private var maxY:Number; private var textFormat:TextFormat; public var maskmc:MovieClip; public var area:MovieClip; private var s_ruler_y:Number;// = 0 public var percentuale:uint; private var item_height:Number;// = 0 private var firstInit:Boolean;// = false public var ruler:MovieClip; public static var _stage:Stage; public function Scrollpage(){ s_contentClip_y = 0; s_contentstarty = 0; s_ruler_y = 0; item_height = 0; firstInit = false; try { } catch(e:Error) { }; super(); addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true); } public function destroy():void{ if (firstInit){ background.removeEventListener(MouseEvent.MOUSE_DOWN, clickHandle); ruler.removeEventListener(MouseEvent.MOUSE_DOWN, clickDragHandle); _stage.removeEventListener(MouseEvent.MOUSE_UP, releaseHandle); this.removeEventListener(MouseEvent.MOUSE_WHEEL, wheelHandle); this.removeEventListener(Event.ENTER_FRAME, enterFrameHandle); }; } public function init(_arg1:Event=null):void{ if (!bf){ bf = new BlurFilter(0, 0, 1); }; clearPage(); if (!firstInit){ this.ruler.buttonMode = true; background.addEventListener(MouseEvent.MOUSE_DOWN, clickHandle); ruler.addEventListener(MouseEvent.MOUSE_DOWN, clickDragHandle); _stage.addEventListener(MouseEvent.MOUSE_UP, releaseHandle); this.addEventListener(MouseEvent.MOUSE_WHEEL, wheelHandle, true); this.addEventListener(Event.ENTER_FRAME, enterFrameHandle); }; this.minY = background.y; this.maxY = ((background.y + background.height) - ruler.height); this.contentstarty = contentClip.y; this.minY = 0; this.maxY = (this.background.height - this.ruler.height); reset(); firstInit = true; } private function releaseHandle(_arg1:MouseEvent){ ruler.stopDrag(); } private function clickDragHandle(_arg1:MouseEvent):void{ var _local2:Rectangle; _local2 = new Rectangle(ruler.x, minY, 0, maxY); ruler.startDrag(false, _local2); } public function positionContent(_arg1:Boolean=false):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; percentuale = ((100 / maxY) * ruler.y); _local2 = 0; _local3 = (contentClip.height - (maskmc.height / 2)); checkContentLength(); _local5 = (contentstarty - (((_local3 - (maskmc.height / 2)) / 100) * percentuale)); _local6 = contentClip.y; _local7 = Math.min(_local5, 0); if (_arg1){ _local6 = _local7; } else { if (_local6 != _local7){ _local8 = (_local7 - _local6); _local6 = (_local6 + (_local8 / 4)); _local9 = (Math.abs(_local8) / 8); bf.blurY = Math.min(8, (_local9 / 2)); contentClip.filters = new Array(bf); }; }; contentClip.y = _local6; } private function enterFrameHandle(_arg1:Event){ positionContent(); } private function scrollData(_arg1:int){ var _local2:Number; var _local3:Number; _local2 = (-(_arg1) * 10); if (_local2 > 0){ _local3 = Math.min(maxY, (ruler.y + _local2)); }; if (_local2 < 0){ _local3 = Math.max(minY, (ruler.y + _local2)); }; ruler.y = _local3; positionContent(); } public function addItem(_arg1:DisplayObject, _arg2:Number=0):void{ var _local3:Number; _local3 = ((contentClip.numChildren > 0)) ? _arg2 : 0; _arg1.y = (contentClip.height + _local3); item_height = _arg1.height; contentClip.addChild(_arg1); positionContent(true); } private function wheelHandle(_arg1:MouseEvent){ if (this.area.hitTestPoint(_stage.mouseX, _stage.mouseY, false)){ scrollData(_arg1.delta); }; } public function reset():void{ if (ruler.visible){ contentstarty = s_contentstarty; ruler.y = s_ruler_y; contentClip.y = s_contentClip_y; } else { ruler.y = 0; contentClip.y = 0; contentstarty = 0; }; } public function clearPage():void{ if (contentClip){ saveCurrentPosition(); removeChild(contentClip); }; contentClip = new Sprite(); contentClip.filters = new Array(bf); contentClip.mask = this.maskmc; addChildAt(contentClip, (getChildIndex(area) + 1)); reset(); } public function addText(_arg1:String):void{ if (!field){ field = new TextField(); field.autoSize = "left"; field.width = maskmc.width; field.multiline = true; field.wordWrap = true; field.defaultTextFormat = textFormat; field.antiAliasType = AntiAliasType.ADVANCED; field.htmlText = ""; contentClip.addChild(field); reset(); }; field.defaultTextFormat = textFormat; field.htmlText = (field.htmlText + (_arg1 + "<br />")); positionContent(true); } public function saveCurrentPosition():void{ s_contentClip_y = contentClip.y; s_contentstarty = contentstarty; s_ruler_y = ruler.y; } public function setTextFormat(_arg1:TextFormat):void{ textFormat = _arg1; } public function checkContentLength():void{ if (contentClip.height < maskmc.height){ ruler.visible = (background.visible = false); } else { ruler.visible = (background.visible = true); }; } private function clickHandle(_arg1:MouseEvent){ ruler.y = Math.min(Math.max(0, background.mouseY), maxY); } public function setDimensions(_arg1:Rectangle):void{ x = _arg1.x; y = _arg1.y; background.x = (ruler.x = (_arg1.width - (background.width / 2))); background.height = _arg1.height; maskmc.width = (background.x - (background.width / 2)); maskmc.height = background.height; area.width = _arg1.width; area.height = _arg1.height; } } }//package uk.co.barraxworld.ui
Section 182
//ThumbnailIcon (uk.co.barraxworld.ui.ThumbnailIcon) package uk.co.barraxworld.ui { import flash.display.*; import flash.text.*; import uk.co.barraxworld.loaders.*; public class ThumbnailIcon extends MovieClip { public var field:TextField; public var completed:MovieClip; private var bitmapList:BitmapList; private var ref:String; public var holder:MovieClip; private var dir:String; public var hiliteAnim:MovieClip; public function ThumbnailIcon(){ bitmapList = BitmapList.getInstance(); } public function destroy():void{ } public function initialise(_arg1:String, _arg2:String, _arg3:MovieClip=null):void{ this.dir = _arg1; this.ref = _arg2; if (!bitmapList.hasAsset(_arg2, "ICON")){ bitmapList.addBitmap(_arg1, _arg2, _arg2, "ICON", Bitmap); }; bitmapList.getAsset(_arg2, "ICON", _arg3); } } }//package uk.co.barraxworld.ui
Section 183
//ThumbnailSelector (uk.co.barraxworld.ui.ThumbnailSelector) package uk.co.barraxworld.ui { import flash.display.*; import flash.events.*; import flash.text.*; public class ThumbnailSelector extends MovieClip { public var field:TextField; private var selID:int;// = 0 public var thumbHolder:MovieClip; public var prevBtn:MovieClip; private var myName:String; public var nextBtn:MovieClip; private var arr:Array; private var thumbnailIcon:ThumbnailIcon; private var dir:String; public function ThumbnailSelector(){ selID = 0; super(); } public function destroy():void{ removeThumbnailIcon(); nextBtn.removeEventListener(MouseEvent.MOUSE_DOWN, nextHandler); prevBtn.removeEventListener(MouseEvent.MOUSE_DOWN, prevHandler); } private function select():void{ field.htmlText = arr[selID].title; removeThumbnailIcon(); thumbnailIcon = new ThumbnailIcon(); thumbnailIcon.initialise(dir, arr[selID].ref); thumbHolder.addChild(thumbnailIcon); } override public function set name(_arg1:String):void{ myName = _arg1; } public function get value():int{ return ((selID + 1)); } private function removeThumbnailIcon():void{ if (thumbnailIcon){ thumbHolder.removeChild(thumbnailIcon); thumbnailIcon.destroy(); }; } private function initButtons():void{ nextBtn.buttonMode = (prevBtn.buttonMode = true); nextBtn.addEventListener(MouseEvent.MOUSE_DOWN, nextHandler); prevBtn.addEventListener(MouseEvent.MOUSE_DOWN, prevHandler); } override public function get name():String{ return (myName); } private function prevHandler(_arg1:MouseEvent):void{ selID--; if (selID < 0){ selID = (arr.length - 1); }; select(); } public function initialise(_arg1:String, _arg2:Array):void{ this.dir = _arg1; this.arr = _arg2; initButtons(); select(); } private function nextHandler(_arg1:MouseEvent):void{ selID++; if (selID > (arr.length - 1)){ selID = 0; }; select(); } public function set value(_arg1:int):void{ selID = (_arg1 - 1); select(); } } }//package uk.co.barraxworld.ui
Section 184
//ThumbnailSelector2 (uk.co.barraxworld.ui.ThumbnailSelector2) package uk.co.barraxworld.ui { import flash.display.*; import flash.events.*; import com.iopred.opera.*; import flash.utils.*; import flash.ui.*; import flash.filters.*; public class ThumbnailSelector2 extends MovieClip { private var friction:Number;// = 2.5 private var buttons_linkage:String; public var id:uint;// = 0 private var overlay:Sprite; private var xgap:Number;// = 10 private var arr:Array; private var target_x:Number; private var h:Number;// = 128 private var buttons:MovieClip; private var w:Number;// = 128 private var dir:String; private var holder:Sprite; private var overlay_linkage:String; public static const START_TEXT = "Start"; public static const NOSTART_TEXT = "N/A"; public function ThumbnailSelector2(){ id = 0; friction = 2.5; w = 128; h = 128; xgap = 10; super(); } function removeThumbs():void{ var _local1:uint; var _local2:*; var _local3:*; _local1 = 0; while (_local1 < arr.length) { _local2 = arr[_local1]; _local3 = _local2.clip; _local2.thumbnail.destroy(); _local1++; }; } public function destroy():void{ this.stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); removeThumbs(); } function generateThumbs():void{ var _local1:uint; var _local2:*; var _local3:*; _local1 = 0; while (_local1 < arr.length) { _local2 = arr[_local1]; _local3 = new level_thumbnail(); if (((_local2.locked) && (!(_local2.completed)))){ _local3.gotoAndStop(2); }; _local3.completed.visible = _local2.completed; _local3.x = (_local1 * (w + xgap)); _local3.field.text = ("" + (_local1 + 1)); _local2.thumbnail = new ThumbnailIcon(); _local2.thumbnail.initialise(dir, arr[_local1].ref, _local3.holder); _local2.clip = _local3; holder.addChild(_local3); _local1++; }; holder.x = (holder.x - (holder.width / 2)); holder.y = (holder.y - (holder.height / 2)); } private function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:*; _local2 = id; switch (_arg1.target){ case buttons.prevBtn: if (id > 0){ id--; }; break; case buttons.nextBtn: if (id < (arr.length - 1)){ id++; }; break; case buttons.selectBtn: dispatch(); return; }; if (id != _local2){ Opera.instance.playSound("select_thumb", 0.3); }; positionThumbs(); } private function keyDownHandler(_arg1:KeyboardEvent):void{ switch (_arg1.keyCode){ case Keyboard.LEFT: if (id > 0){ id--; }; break; case Keyboard.RIGHT: if (id < (arr.length - 1)){ id++; }; break; case Keyboard.ENTER: dispatch(); return; }; positionThumbs(); } function highlightThumb(_arg1:uint):void{ var _local2:*; var _local3:uint; var _local4:*; _local2 = new BlurFilter(2, 2, 1); _local3 = 0; while (_local3 < arr.length) { _local4 = arr[_local3].clip; if (_local3 == _arg1){ _local4.filters = []; _local4.hiliteAnim.visible = true; } else { _local4.hiliteAnim.visible = false; _local4.filters = [_local2]; }; _local3++; }; } private function tick(_arg1:Event):void{ var _local2:*; _local2 = Math.abs((holder.x - target_x)); if (_local2 < 3){ removeEventListener(Event.ENTER_FRAME, tick); holder.x = target_x; } else { holder.x = (holder.x - ((holder.x - target_x) / friction)); }; } function enableStartButton(_arg1:Boolean=true):void{ if (_arg1){ buttons.selectBtn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, false, 0, true); buttons.selectBtn.buttonMode = true; buttons.selectBtn.setText(START_TEXT); } else { if (buttons.selectBtn.hasEventListener(MouseEvent.MOUSE_DOWN)){ buttons.selectBtn.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); buttons.selectBtn.buttonMode = false; }; buttons.selectBtn.setText(NOSTART_TEXT); }; } public function initialise(_arg1:Array, _arg2:uint, _arg3:Object):void{ var _local4:*; var _local5:*; buttons_linkage = _arg3.buttons_linkage; overlay_linkage = _arg3.overlay_linkage; dir = _arg3.dir; if (_arg3.w){ this.w = _arg3.w; }; if (_arg3.h){ this.h = _arg3.h; }; if (_arg3.xgap){ this.xgap = _arg3.xgap; }; this.arr = _arg1; holder = new Sprite(); _local4 = (getDefinitionByName(overlay_linkage) as Class); overlay = new (_local4); holder.cacheAsBitmap = true; overlay.cacheAsBitmap = true; holder.mask = overlay; _local5 = (getDefinitionByName(buttons_linkage) as Class); buttons = new (_local5); buttons.y = ((holder.y + (h / 2)) + 40); buttons.prevBtn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, false, 0, true); buttons.nextBtn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, false, 0, true); stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, false, 0, true); addChild(holder); addChild(overlay); addChild(buttons); generateThumbs(); id = Math.min(_arg2, (_arg1.length - 1)); positionThumbs(true); } private function initAnimate():void{ if (!hasEventListener(Event.ENTER_FRAME)){ addEventListener(Event.ENTER_FRAME, tick, false, 0, true); }; } private function dispatch():void{ if (((!(arr[id].completed)) && (!(arr[id].locked)))){ dispatchEvent(new Event("selected")); }; } private function positionThumbs(_arg1:Boolean=false):void{ var _local2:*; _local2 = arr[id]; if (((_local2.locked) || (_local2.completed))){ enableStartButton(false); } else { enableStartButton(); }; highlightThumb(id); target_x = (-(_local2.clip.x) - (w / 2)); if (_arg1){ holder.x = target_x; } else { initAnimate(); }; } } }//package uk.co.barraxworld.ui
Section 185
//TitledCheckBox (uk.co.barraxworld.ui.TitledCheckBox) package uk.co.barraxworld.ui { import flash.text.*; public class TitledCheckBox extends CheckBox { public var field:TextField; public function set title(_arg1:String):void{ field.htmlText = _arg1; } } }//package uk.co.barraxworld.ui
Section 186
//ToggleArrows (uk.co.barraxworld.ui.ToggleArrows) package uk.co.barraxworld.ui { import flash.display.*; import flash.events.*; import flash.text.*; public class ToggleArrows { private var timeline:MovieClip; private var myTitle:String; private var myArray:Array; public var clip:MovieClip; private var myName:String; public var xpos:Number; private var currValue; private var currLabel:String; private var selectedObj:Object; public var ypos:Number; public function ToggleArrows(_arg1:MovieClip, _arg2:String, _arg3:String, _arg4:Number, _arg5:Number, _arg6:Array){ timeline = _arg1; myArray = _arg6; myTitle = _arg3; myName = _arg2; xpos = _arg4; ypos = _arg5; initialise(); } public function get name(){ return (myName); } private function render():void{ clip.labelField.autoSize = TextFieldAutoSize.CENTER; clip.labelField.htmlText = selectedObj.label; clip.labelField.x = (clip.btnUp.x - (clip.labelField.width / 2)); } private function clickPrev(_arg1:MouseEvent):void{ cycle(-1); } private function cycle(_arg1:int):void{ if (_arg1 == 1){ myArray.push(myArray.shift()); } else { myArray.unshift(myArray.pop()); }; select(); } private function clickNext(_arg1:MouseEvent):void{ cycle(1); } public function get value(){ return (selectedObj.value); } private function initialise():void{ var _local1:*; _local1 = 22; clip = new toggleArrows(); clip.x = xpos; clip.y = ypos; clip.titleField.autoSize = TextFieldAutoSize.LEFT; clip.titleField.htmlText = myTitle; clip.labelField.mouseEnabled = false; clip.titleField.x = 0; clip.btnUp.x = ((clip.titleField.x + clip.titleField.width) + _local1); clip.btnDown.x = ((clip.titleField.x + clip.titleField.width) + _local1); clip.btnUp.mouseChildren = (clip.btnDown.mouseChildren = false); clip.btnUp.buttonMode = (clip.btnDown.buttonMode = true); clip.btnUp.addEventListener(MouseEvent.MOUSE_DOWN, clickPrev, false, 0, true); clip.btnDown.addEventListener(MouseEvent.MOUSE_DOWN, clickNext, false, 0, true); timeline.addChild(clip); select(); } private function select():void{ selectedObj = myArray[0]; render(); } } }//package uk.co.barraxworld.ui
Section 187
//BinaryCompressor (uk.co.barraxworld.utils.BinaryCompressor) package uk.co.barraxworld.utils { public class BinaryCompressor { private var map1:Array; private var map2:Array; public static var instance:BinaryCompressor; public function BinaryCompressor(){ map1 = []; map1["0"] = "0001"; map1["1"] = "0010"; map1["2"] = "0011"; map1["3"] = "0100"; map1["4"] = "0101"; map1["5"] = "0110"; map1["6"] = "0111"; map1["7"] = "1000"; map1["8"] = "1001"; map1["9"] = "1010"; map1[","] = "1011"; map1["-"] = "1100"; map1["."] = "1101"; map2 = []; map2["0001"] = "0"; map2["0010"] = "1"; map2["0011"] = "2"; map2["0100"] = "3"; map2["0101"] = "4"; map2["0110"] = "5"; map2["0111"] = "6"; map2["1000"] = "7"; map2["1001"] = "8"; map2["1010"] = "9"; map2["1011"] = ","; map2["1100"] = "-"; map2["1101"] = "."; } private function BinToDec(_arg1:String):Number{ return (parseInt(_arg1, 2)); } public function decodeStr(_arg1:String):String{ var _local2:*; var _local3:uint; var _local4:String; var _local5:*; var _local6:*; _local2 = ""; _local3 = 0; while (_local3 < _arg1.length) { _local4 = DecToBin((_arg1.charCodeAt(_local3) - 32)); _local5 = _local4.substr(0, 4); _local6 = _local4.substr(4); _local2 = (_local2 + ((_local5)!="0000") ? map2[_local5] : ""); _local2 = (_local2 + ((_local6)!="0000") ? map2[_local6] : ""); _local3++; }; return (_local2); } private function DecToBin(_arg1:Number):String{ var _local2:String; _local2 = parseInt(_arg1.toString()).toString(2); while (_local2.length < 8) { _local2 = ("0" + _local2); }; return (_local2); } public function encodeStr(_arg1:String):String{ var _local2:*; var _local3:uint; var _local4:*; var _local5:*; _local2 = ""; _local3 = 0; while (_local3 < _arg1.length) { _local4 = map1[_arg1.charAt(_local3)]; _local5 = (((_local3 + 1))<_arg1.length) ? map1[_arg1.charAt((_local3 + 1))] : "0000"; _local2 = (_local2 + String.fromCharCode((BinToDec(((_local4 + "") + _local5)) + 32))); _local3 = (_local3 + 2); }; return (_local2); } public static function getInstance():BinaryCompressor{ if (!instance){ instance = new (BinaryCompressor); }; return (instance); } } }//package uk.co.barraxworld.utils
Section 188
//DateUtils (uk.co.barraxworld.utils.DateUtils) package uk.co.barraxworld.utils { public class DateUtils { public static const MS_PER_DAY:int = 86400000; public static const DAYS:Array = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; public static const MONTHS:Array = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; public static const MS_PER_MIN:int = 60000; public static const MS_PER_YEAR:Number = 31536000000; public static const MS_PER_HOUR:int = 3600000; public static function getDiffMins(_arg1:Date, _arg2:Date):Number{ return ((getDiffMS(_arg1, _arg2) / MS_PER_MIN)); } public static function formatTime(_arg1:Date, _arg2:Boolean=true, _arg3:Boolean=false, _arg4:String=":"):String{ var _local5:String; var _local6:String; var _local7:Number; var _local8:String; var _local9:String; _local5 = String(_arg1.getSeconds()); if (_local5.length == 1){ _local5 = ("0" + _local5); }; _local6 = String(_arg1.getMinutes()); if (_local6.length == 1){ _local6 = ("0" + _local6); }; _local7 = _arg1.getHours(); _local8 = ""; if (_arg3){ if (_local7 > 12){ _local7 = (_local7 - 12); _local8 = " pm"; } else { _local8 = " am"; }; }; if (_arg2){ _local9 = (((((String(_local7) + _arg4) + _local6) + _arg4) + _local5) + _local8); } else { _local9 = (((String(_local7) + _arg4) + _local6) + _local8); }; return (_local9); } public static function getShortMonthName(_arg1:Date):String{ return (MONTHS[_arg1.getMonth()].slice(0, 3)); } public static function getDiffMS(_arg1:Date, _arg2:Date):Number{ return ((_arg2.getTime() - _arg1.getTime())); } public static function formatDate(_arg1:Date, _arg2:Number=0, _arg3:String="/"):String{ var _local4:String; switch (_arg2){ case 0: _local4 = ((((_arg1.getDate() + " ") + getMonthName(_arg1)) + " ") + _arg1.getFullYear()); break; case 1: _local4 = ((((_arg1.getDate() + _arg3) + (_arg1.getMonth() + 1)) + _arg3) + _arg1.getFullYear()); break; }; return (_local4); } public static function getDayName(_arg1:Date):String{ return (DAYS[_arg1.getDay()]); } public static function getDiffDays(_arg1:Date, _arg2:Date):Number{ return ((getDiffMS(_arg1, _arg2) / MS_PER_DAY)); } public static function getDiffHours(_arg1:Date, _arg2:Date):Number{ return ((getDiffMS(_arg1, _arg2) / MS_PER_HOUR)); } public static function getDiffYears(_arg1:Date, _arg2:Date):Number{ return ((getDiffMS(_arg1, _arg2) / MS_PER_YEAR)); } public static function getMonthName(_arg1:Date):String{ return (MONTHS[_arg1.getMonth()]); } } }//package uk.co.barraxworld.utils
Section 189
//DebugConsole (uk.co.barraxworld.utils.DebugConsole) package uk.co.barraxworld.utils { import flash.display.*; import flash.events.*; import flash.text.*; public class DebugConsole { protected var numOutputFields:int;// = 3 protected var cH:Number;// = 200 protected var bgRect:Sprite; protected var output0:TextField; protected var output1:TextField; protected var output2:TextField; protected var cW:Number;// = 550 protected var format0:TextFormat; protected var format1:TextFormat; protected var format2:TextFormat; public var isVisible:Boolean; protected var buffer0:String; protected var buffer1:String; protected var format:TextFormat; protected var buffer2:String; protected var maxChars:int;// = 0x0400 public static var enabled:Boolean = true; public static var instance:DebugConsole; public static var _stage:Stage; public function DebugConsole(){ numOutputFields = 3; cW = 550; cH = 200; maxChars = 0x0400; super(); try { !((_stage == null)); } catch(e:Error) { }; _stage.addEventListener(KeyboardEvent.KEY_DOWN, captureKey); buffer0 = (buffer1 = (buffer2 = "")); isVisible = false; } public function hide():void{ isVisible = false; _stage.removeChild(bgRect); } private function renderBuffers():void{ var _local1:uint; var _local2:TextField; if (isVisible){ _local1 = 0; while (_local1 < 3) { _local2 = this[("output" + _local1)]; _local2.htmlText = this[("buffer" + _local1)]; _local2.scrollV = _local2.maxScrollV; _local1++; }; }; } private function captureKey(_arg1:KeyboardEvent):void{ if ((((_arg1.keyCode == 123)) && (enabled))){ toggle(); }; } public function debug(_arg1:String, _arg2:int=0):void{ if (!enabled){ return; }; this[("buffer" + _arg2)] = (this[("buffer" + _arg2)] + (_arg1 + "\n> ")); if (this[("buffer" + _arg2)].length > maxChars){ this[("buffer" + _arg2)] = this[("buffer" + _arg2)].substring(500, this[("buffer" + _arg2)].length); }; renderBuffers(); } private function createOutputField(_arg1:int, _arg2:String):void{ if (!this[("output" + _arg1)]){ this[("output" + _arg1)] = new TextField(); this[("output" + _arg1)].multiline = true; this[("output" + _arg1)].wordWrap = true; this[("output" + _arg1)].x = (_arg1 * (cW / 3)); this[("output" + _arg1)].width = (cW / 3); this[("output" + _arg1)].height = cH; }; this[("output" + _arg1)].defaultTextFormat = getFormat(_arg1, _arg2); bgRect.addChild(this[("output" + _arg1)]); } private function toggle():void{ if (isVisible){ hide(); } else { show(); }; } private function getFormat(_arg1:uint, _arg2:String):TextFormat{ if (!this[("format" + _arg1)]){ this[("format" + _arg1)] = new TextFormat(); this[("format" + _arg1)].font = "arial"; this[("format" + _arg1)].size = 9; this[("format" + _arg1)].color = _arg2; }; return (this[("format" + _arg1)]); } public function show():void{ isVisible = true; if (!bgRect){ bgRect = new Sprite(); bgRect.graphics.lineStyle(); bgRect.graphics.beginFill(6697830); bgRect.graphics.drawRect(0, 0, cW, cH); bgRect.graphics.endFill(); }; _stage.addChild(bgRect); createOutputField(0, "0xffcc33"); createOutputField(1, "0xffffff"); createOutputField(2, "0xcccccc"); renderBuffers(); } public static function getInstance():DebugConsole{ if (instance == null){ instance = new (DebugConsole); }; return (instance); } public static function registerStage(_arg1:Stage):void{ _stage = _arg1; } } }//package uk.co.barraxworld.utils
Section 190
//FpsCounter (uk.co.barraxworld.utils.FpsCounter) package uk.co.barraxworld.utils { import flash.display.*; import flash.events.*; import flash.text.*; import flash.system.*; public class FpsCounter extends Sprite { var count:Number; var currTime:Number; var sysLow:int;// = 999999 var rr:Object; var startTime:Number; var elapsedTime:Number; var my_date:Date; var sysHi:int;// = 0 var FPS:TextField; public function FpsCounter(_arg1, _arg2:Number=0, _arg3:Number=0, _arg4:Boolean=false){ sysLow = 999999; sysHi = 0; super(); rr = _arg1; if (_arg4){ rr.addEventListener(Event.ENTER_FRAME, _arg4); }; FPS = new TextField(); FPS.autoSize = "left"; FPS.x = _arg2; FPS.y = _arg3; FPS.textColor = 0xFFFFFF; rr.addChild(FPS); my_date = new Date(); startTime = my_date.time; currTime = 0; elapsedTime = 0; count = 0; } function oef(_arg1:Event){ update(); } public function setVisible(_arg1:Boolean=true):void{ FPS.visible = _arg1; } public function toggleVisible():void{ FPS.visible = !(FPS.visible); } public function update():void{ var _local1:*; my_date = new Date(); currTime = my_date.time; elapsedTime = (currTime - startTime); count++; if (elapsedTime > 1000){ _local1 = int((System.totalMemory / 0x0400)); sysLow = Math.min(sysLow, _local1); sysHi = Math.max(sysHi, _local1); FPS.text = (((((((("lo:" + sysLow) + ",hi:") + sysHi) + ",curr:") + _local1) + " :: ") + count.toString()) + "fps"); count = 0; }; if (elapsedTime > 1000){ my_date = new Date(); startTime = my_date.time; }; } public function get isVisible():Boolean{ return (FPS.visible); } public function destroy():void{ if (rr.hasEventListener(Event.ENTER_FRAME)){ rr.removeEventListener(Event.ENTER_FRAME, this.oef); }; rr.removeChild(FPS); FPS = null; rr = null; } } }//package uk.co.barraxworld.utils
Section 191
//NumberUtils (uk.co.barraxworld.utils.NumberUtils) package uk.co.barraxworld.utils { public class NumberUtils { public static function randRange(_arg1:Number, _arg2:Number):Number{ var _local3:Number; _local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1); return (_local3); } public static function getTwoDigits(_arg1:Number):String{ if (_arg1 < 10){ return (("0" + _arg1)); }; return ((_arg1 + "")); } public static function returnTime(_arg1:Number):String{ var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:Number; _local2 = Math.floor((_arg1 / 60)); _local3 = (_arg1 % 60); _local4 = (_local2 % 60); _local5 = Math.floor((_local2 / 60)); _local6 = Math.floor(((_local3 - Math.floor(_local3)) * 100)); _local3 = Math.floor(_local3); return (((getTwoDigits(_local4) + ":") + getTwoDigits(_local3))); } public static function round2dp(_arg1:Number):Number{ return ((int((_arg1 * 100)) / 100)); } } }//package uk.co.barraxworld.utils
Section 192
//Spline (uk.co.barraxworld.utils.Spline) package uk.co.barraxworld.utils { public class Spline { public static var incr:Number = 32; public static function getQuadraticPosition(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=100):Number{ return (((_arg1 + (_arg2 * _arg3)) + (_arg4 * (_arg3 * _arg3)))); } public static function getCubicPosition(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number=105, _arg8:Number=120):Object{ var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; _local9 = _arg4; _local10 = (_arg4 + (_arg5 * 80)); _local11 = ((((_arg6 - _arg3) + _arg8) * _arg2) + _arg1); _local12 = ((((_arg6 - _arg3) + 100) * _arg2) + _arg1); _local13 = (incr / _arg7); _local14 = (((_local12 - (3 * _local11)) + (3 * _local10)) - _local9); _local15 = (((3 * _local11) - (6 * _local10)) + (3 * _local9)); _local16 = ((3 * _local10) - (3 * _local9)); _local17 = _local9; _local18 = ((((((_local14 * _local13) * _local13) * _local13) + ((_local15 * _local13) * _local13)) + (_local16 * _local13)) + _local17); _local19 = ((_local18 - _arg4) / 1000); return ({pos:_local18, vel:_local19, time:(_arg6 + incr)}); } } }//package uk.co.barraxworld.utils
Section 193
//StringUtils (uk.co.barraxworld.utils.StringUtils) package uk.co.barraxworld.utils { public class StringUtils { private static function trimR(_arg1:String):String{ var _local2:uint; _local2 = _arg1.length; while (_local2 > 0) { if (_arg1.charCodeAt(_local2) > 32){ return (_arg1.substr(0, (_local2 + 1))); }; _local2--; }; return (_arg1); } private static function trimL(_arg1:String):String{ var _local2:uint; _local2 = 0; while (_local2 < _arg1.length) { if (_arg1.charCodeAt(_local2) > 32){ return (_arg1.substr(_local2, _arg1.length)); }; _local2++; }; return (_arg1); } public static function hash(_arg1:int=4):String{ var _local2:String; var _local3:String; var _local4:String; var _local5:*; var _local6:String; var _local7:uint; var _local8:String; _local2 = "1234567890"; _local3 = "qwertyuiopasdfghjklzxcvbnm"; _local4 = "QWERTYUIOPASDFGHHJKLZXCVBNM"; _local5 = _local2.concat(_local3).concat(_local4).split(""); _local6 = ""; _local7 = 0; while (_local7 < _arg1) { _local8 = _local5[int((Math.random() * _local5.length))]; _local6 = (_local6 + _local8); _local7++; }; return (_local6); } public static function trimWhite(_arg1:String):String{ var _local2:String; _local2 = trimL(_arg1); return (trimR(_local2)); } } }//package uk.co.barraxworld.utils
Section 194
//alertView (alertView) package { import uk.co.barraxworld.ui.*; public dynamic class alertView extends AlertPopup { } }//package
Section 195
//ammo_collect_sound (ammo_collect_sound) package { import flash.media.*; public dynamic class ammo_collect_sound extends Sound { } }//package
Section 196
//arrowBtn (arrowBtn) package { import uk.co.barraxworld.ui.*; public dynamic class arrowBtn extends GenericButton { public function arrowBtn(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 197
//AssetsLoaderView (AssetsLoaderView) package { import flash.display.*; import flash.text.*; import uk.co.barraxworld.loaders.*; public dynamic class AssetsLoaderView extends MovieClip { public var field:TextField; public var anim:MovieClip; public var progressBar:ProgressBarView; public var template:menuTemplate; } }//package
Section 198
//beep0 (beep0) package { import flash.media.*; public dynamic class beep0 extends Sound { } }//package
Section 199
//beep1 (beep1) package { import flash.media.*; public dynamic class beep1 extends Sound { } }//package
Section 200
//blood (blood) package { import uk.co.barraxworld.game.engine3D.effects.*; public dynamic class blood extends Blood { } }//package
Section 201
//btnServerSelect (btnServerSelect) package { import flash.display.*; import flash.text.*; public dynamic class btnServerSelect extends MovieClip { public var field:TextField; } }//package
Section 202
//bullet1 (bullet1) package { import flash.display.*; public dynamic class bullet1 extends MovieClip { } }//package
Section 203
//button_arrow (button_arrow) package { import uk.co.barraxworld.ui.*; public dynamic class button_arrow extends GenericButton { public function button_arrow(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 204
//button2_complete (button2_complete) package { import uk.co.barraxworld.ui.*; public dynamic class button2_complete extends GenericButton { public function button2_complete(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 205
//characterStrafeAnim (characterStrafeAnim) package { import uk.co.barraxworld.game.engine3D.characters.*; public dynamic class characterStrafeAnim extends CharacterStrafeAnim { } }//package
Section 206
//characterWalkAnim (characterWalkAnim) package { import uk.co.barraxworld.game.engine3D.characters.*; public dynamic class characterWalkAnim extends CharacterWalkAnim { } }//package
Section 207
//checkbox (checkbox) package { import uk.co.barraxworld.ui.*; public dynamic class checkbox extends CheckBox { public function checkbox(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 208
//confirmView (confirmView) package { import uk.co.barraxworld.ui.*; public dynamic class confirmView extends ConfirmPopup { } }//package
Section 209
//countryThumb (countryThumb) package { import uk.co.barraxworld.ui.*; public dynamic class countryThumb extends ThumbnailIcon { } }//package
Section 210
//CreateGameTip (CreateGameTip) package { import uk.co.barraxworld.multiuser.lobby.*; public dynamic class CreateGameTip extends Tip { } }//package
Section 211
//crosshair_line (crosshair_line) package { import flash.display.*; public dynamic class crosshair_line extends Sprite { } }//package
Section 212
//crosshair_sprite (crosshair_sprite) package { import flash.display.*; public dynamic class crosshair_sprite extends Sprite { } }//package
Section 213
//DifficultyView (DifficultyView) package { import flash.display.*; public dynamic class DifficultyView extends MovieClip { public var backBtn:genericButton_small; public var template:menuTemplate; } }//package
Section 214
//divide (divide) package { import flash.display.*; public dynamic class divide extends MovieClip { } }//package
Section 215
//dropMenu (dropMenu) package { import uk.co.barraxworld.ui.*; public dynamic class dropMenu extends DropMenu { } }//package
Section 216
//dropMenuItem (dropMenuItem) package { import uk.co.barraxworld.ui.*; public dynamic class dropMenuItem extends TitledCheckBox { public function dropMenuItem(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 217
//explosion (explosion) package { import uk.co.barraxworld.game.engine3D.effects.*; public dynamic class explosion extends Explosion { } }//package
Section 218
//explosion_plasma (explosion_plasma) package { import flash.display.*; public dynamic class explosion_plasma extends MovieClip { } }//package
Section 219
//explosion1 (explosion1) package { import flash.display.*; public dynamic class explosion1 extends MovieClip { } }//package
Section 220
//explosion2 (explosion2) package { import flash.display.*; public dynamic class explosion2 extends MovieClip { } }//package
Section 221
//explosion3 (explosion3) package { import flash.display.*; public dynamic class explosion3 extends MovieClip { } }//package
Section 222
//explosion4 (explosion4) package { import flash.display.*; public dynamic class explosion4 extends MovieClip { } }//package
Section 223
//explosionSound (explosionSound) package { import flash.media.*; public dynamic class explosionSound extends Sound { } }//package
Section 224
//flesh (flesh) package { import flash.media.*; public dynamic class flesh extends Sound { } }//package
Section 225
//flies (flies) package { import flash.media.*; public dynamic class flies extends Sound { } }//package
Section 226
//fliesAnim (fliesAnim) package { import flash.display.*; public dynamic class fliesAnim extends MovieClip { } }//package
Section 227
//fuseSound (fuseSound) package { import flash.media.*; public dynamic class fuseSound extends Sound { } }//package
Section 228
//gameHolder (gameHolder) package { import flash.display.*; public dynamic class gameHolder extends MovieClip { } }//package
Section 229
//genericButton (genericButton) package { import uk.co.barraxworld.game.projects.ultrakillz.views.*; public dynamic class genericButton extends UKZButton { public function genericButton(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 230
//genericButton_small (genericButton_small) package { import uk.co.barraxworld.game.projects.ultrakillz.views.*; public dynamic class genericButton_small extends UKZButton { public function genericButton_small(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 231
//GenericSquare (GenericSquare) package { import flash.display.*; public dynamic class GenericSquare extends MovieClip { } }//package
Section 232
//giblet (giblet) package { import flash.display.*; public dynamic class giblet extends MovieClip { public function giblet(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 233
//grenade1 (grenade1) package { import flash.display.*; public dynamic class grenade1 extends MovieClip { public function grenade1(){ addFrameScript(29, frame30); } function frame30(){ stop(); } } }//package
Section 234
//grunt1 (grunt1) package { import flash.media.*; public dynamic class grunt1 extends Sound { } }//package
Section 235
//gunfire_sound (gunfire_sound) package { import flash.media.*; public dynamic class gunfire_sound extends Sound { } }//package
Section 236
//highscoresNamePanel (highscoresNamePanel) package { import flash.display.*; import flash.text.*; public dynamic class highscoresNamePanel extends MovieClip { public var field:TextField; public var btn:genericButton; } }//package
Section 237
//HighscoresView (HighscoresView) package { import flash.display.*; public dynamic class HighscoresView extends MovieClip { public var holder:MovieClip; public function HighscoresView(){ addFrameScript(19, frame20); } function frame20(){ stop(); } } }//package
Section 238
//hint_fireWeapon (hint_fireWeapon) package { import uk.co.barraxworld.game.projects.ultrakillz.views.*; public dynamic class hint_fireWeapon extends ControlHint { public function hint_fireWeapon(){ addFrameScript(148, frame149); } function frame149(){ gotoAndPlay("loop"); } } }//package
Section 239
//hint_move (hint_move) package { import uk.co.barraxworld.game.projects.ultrakillz.views.*; public dynamic class hint_move extends ControlHint { } }//package
Section 240
//HomeView (HomeView) package { import flash.display.*; public dynamic class HomeView extends MovieClip { public var template:menuTemplate; } }//package
Section 241
//HowToPlayView (HowToPlayView) package { import flash.display.*; public dynamic class HowToPlayView extends MovieClip { public var btnTute:genericButton; public var btnHome:genericButton_small; public var template:menuTemplate; } }//package
Section 242
//hud_mc (hud_mc) package { import flash.display.*; import flash.text.*; public dynamic class hud_mc extends MovieClip { public var blood:MovieClip; public var playername:TextField; public var mainStatus:MovieClip; public var livesClip1:MovieClip; public var livesClip2:MovieClip; public var ammoHolder:MovieClip; public var health:TextField; public var chatOutput:TextField; public var score:TextField; public var playerLives:MovieClip; public var weaponname:TextField; public var timeRemaining:MovieClip; public var health_bar:MovieClip; public var opponentLives:MovieClip; public var ammo:TextField; } }//package
Section 243
//hudAmmo (hudAmmo) package { import flash.display.*; public dynamic class hudAmmo extends MovieClip { } }//package
Section 244
//icon_bullet (icon_bullet) package { import flash.display.*; public dynamic class icon_bullet extends Sprite { } }//package
Section 245
//icon_bullets (icon_bullets) package { import flash.display.*; public dynamic class icon_bullets extends Sprite { } }//package
Section 246
//icon_health (icon_health) package { import flash.display.*; public dynamic class icon_health extends Sprite { } }//package
Section 247
//icon_jump (icon_jump) package { import flash.display.*; public dynamic class icon_jump extends Sprite { } }//package
Section 248
//icon_lightning_beam (icon_lightning_beam) package { import flash.display.*; public dynamic class icon_lightning_beam extends Sprite { } }//package
Section 249
//icon_pipebomb (icon_pipebomb) package { import flash.display.*; public dynamic class icon_pipebomb extends Sprite { } }//package
Section 250
//icon_plasma (icon_plasma) package { import flash.display.*; public dynamic class icon_plasma extends Sprite { } }//package
Section 251
//icon_rocket (icon_rocket) package { import flash.display.*; public dynamic class icon_rocket extends Sprite { } }//package
Section 252
//icon_rocket_large (icon_rocket_large) package { import flash.display.*; public dynamic class icon_rocket_large extends Sprite { } }//package
Section 253
//icon_rockets (icon_rockets) package { import flash.display.*; public dynamic class icon_rockets extends Sprite { } }//package
Section 254
//icon_speed (icon_speed) package { import flash.display.*; public dynamic class icon_speed extends Sprite { } }//package
Section 255
//icon_wallhack (icon_wallhack) package { import flash.display.*; public dynamic class icon_wallhack extends Sprite { } }//package
Section 256
//InterludeView (InterludeView) package { import flash.display.*; import flash.text.*; public dynamic class InterludeView extends MovieClip { public var adHolder:MovieClip; public var msgField:TextField; } }//package
Section 257
//JoinGameTip (JoinGameTip) package { import uk.co.barraxworld.multiuser.lobby.*; public dynamic class JoinGameTip extends Tip { } }//package
Section 258
//keyboardItem (keyboardItem) package { import flash.display.*; public dynamic class keyboardItem extends MovieClip { } }//package
Section 259
//laugh1 (laugh1) package { import flash.media.*; public dynamic class laugh1 extends Sound { } }//package
Section 260
//level_select_buttons (level_select_buttons) package { import flash.display.*; public dynamic class level_select_buttons extends MovieClip { public var prevBtn:arrowBtn; public var nextBtn:arrowBtn; public var selectBtn:genericButton_small; } }//package
Section 261
//level_select_overlay (level_select_overlay) package { import flash.display.*; public dynamic class level_select_overlay extends MovieClip { } }//package
Section 262
//level_thumbnail (level_thumbnail) package { import uk.co.barraxworld.ui.*; public dynamic class level_thumbnail extends ThumbnailIcon { public function level_thumbnail(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 263
//levelSelectThumb (levelSelectThumb) package { import uk.co.barraxworld.game.common.*; public dynamic class levelSelectThumb extends LevelSelectThumb { public function levelSelectThumb(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 264
//LevelSelectView (LevelSelectView) package { import flash.display.*; public dynamic class LevelSelectView extends MovieClip { public var backBtn:genericButton_small; public var template:menuTemplate; public var unlockedMC:MovieClip; public function LevelSelectView(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 265
//LevelSummaryView (LevelSummaryView) package { import flash.display.*; import flash.text.*; public dynamic class LevelSummaryView extends MovieClip { public var titleField:TextField; public var template:menuTemplate; public function LevelSummaryView(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 266
//lobby_button (lobby_button) package { import uk.co.barraxworld.ui.*; public dynamic class lobby_button extends GenericButton { public function lobby_button(){ addFrameScript(0, frame1, 1, frame2, 9, frame10, 19, frame20); } function frame10(){ stop(); } function frame1(){ stop(); } function frame20(){ gotoAndPlay("pulsate"); } function frame2(){ play(); } } }//package
Section 267
//lobbyView (lobbyView) package { import flash.display.*; public dynamic class lobbyView extends MovieClip { public var practiceBtn:lobby_button; public var disconnectBtn:MovieClip; public var lobbyOptionsBtn:lobby_button; public var gameOptionsBtn:lobby_button; public var createRoomBtn:lobby_button; } }//package
Section 268
//localUserDetailsPanel (localUserDetailsPanel) package { import flash.display.*; import flash.text.*; public dynamic class localUserDetailsPanel extends MovieClip { public var countryClip:countryThumb; public var nameField:TextField; public var userIcon:ThumbnailIcon; public var bodyField:TextField; public var rankClip:rankThumb; } }//package
Section 269
//menuTemplate (menuTemplate) package { import uk.co.barraxworld.game.projects.ultrakillz.views.*; public dynamic class menuTemplate extends Template { } }//package
Section 270
//messageOverlay (messageOverlay) package { import flash.display.*; import flash.text.*; public dynamic class messageOverlay extends MovieClip { public var field:TextField; public var bg:MovieClip; } }//package
Section 271
//movementKeys (movementKeys) package { import flash.display.*; public dynamic class movementKeys extends MovieClip { public var btnUp:keyboardItem; public var btnDown:keyboardItem; public var btnRight:keyboardItem; public var btnLeft:keyboardItem; } }//package
Section 272
//muzzleFlash (muzzleFlash) package { import flash.display.*; public dynamic class muzzleFlash extends Sprite { } }//package
Section 273
//opponentHealthBar (opponentHealthBar) package { import uk.co.barraxworld.game.engine3D.characters.*; public dynamic class opponentHealthBar extends OpponentHealthBar { } }//package
Section 274
//OptionsView (OptionsView) package { import flash.display.*; public dynamic class OptionsView extends MovieClip { public var soundOnCB:checkbox; public var bg:MovieClip; public var btn:genericButton_small; public var effectsLevelCB:checkbox; public var template:menuTemplate; public var mouseInvertCB:checkbox; public function OptionsView(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 275
//padlock_icon (padlock_icon) package { import flash.display.*; public dynamic class padlock_icon extends MovieClip { } }//package
Section 276
//plasma1 (plasma1) package { import flash.display.*; public dynamic class plasma1 extends MovieClip { } }//package
Section 277
//player_cpu (player_cpu) package { import flash.display.*; public dynamic class player_cpu extends MovieClip { public var flame:MovieClip; } }//package
Section 278
//player_human (player_human) package { import flash.display.*; public dynamic class player_human extends MovieClip { public var gfx:MovieClip; public function player_human(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 279
//powerup_sound (powerup_sound) package { import flash.media.*; public dynamic class powerup_sound extends Sound { } }//package
Section 280
//practiceConfigPanel (practiceConfigPanel) package { import flash.display.*; public dynamic class practiceConfigPanel extends MovieClip { public var submitBtn:lobby_button; public var bg:GenericSquare; public var cancelBtn:MovieClip; public var holder:MovieClip; public var mapMenu:thumbnailSelector; } }//package
Section 281
//propelledProjectile_sound (propelledProjectile_sound) package { import flash.media.*; public dynamic class propelledProjectile_sound extends Sound { } }//package
Section 282
//quitGameBtn (quitGameBtn) package { import flash.display.*; public dynamic class quitGameBtn extends MovieClip { public function quitGameBtn(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 283
//rankStatusView (rankStatusView) package { import uk.co.barraxworld.game.shooter.*; public dynamic class rankStatusView extends RankStatusView { } }//package
Section 284
//rankThumb (rankThumb) package { import uk.co.barraxworld.ui.*; public dynamic class rankThumb extends ThumbnailIcon { } }//package
Section 285
//reboundGeneric (reboundGeneric) package { import flash.media.*; public dynamic class reboundGeneric extends Sound { } }//package
Section 286
//reboundMeat0 (reboundMeat0) package { import flash.media.*; public dynamic class reboundMeat0 extends Sound { } }//package
Section 287
//reboundMeat1 (reboundMeat1) package { import flash.media.*; public dynamic class reboundMeat1 extends Sound { } }//package
Section 288
//reboundMeat2 (reboundMeat2) package { import flash.media.*; public dynamic class reboundMeat2 extends Sound { } }//package
Section 289
//reboundMeat3 (reboundMeat3) package { import flash.media.*; public dynamic class reboundMeat3 extends Sound { } }//package
Section 290
//reboundMetal (reboundMetal) package { import flash.media.*; public dynamic class reboundMetal extends Sound { } }//package
Section 291
//RedMist (RedMist) package { import flash.display.*; public dynamic class RedMist extends Sprite { } }//package
Section 292
//rocket1 (rocket1) package { import flash.display.*; public dynamic class rocket1 extends MovieClip { public function rocket1(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 293
//rocket2 (rocket2) package { import flash.display.*; public dynamic class rocket2 extends MovieClip { public function rocket2(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 294
//roomClip (roomClip) package { import uk.co.barraxworld.multiuser.lobby.*; public dynamic class roomClip extends RoomClip { public function roomClip(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 295
//roomConfigPanel (roomConfigPanel) package { import flash.display.*; import flash.text.*; public dynamic class roomConfigPanel extends MovieClip { public var submitBtn:lobby_button; public var passwordField:TextField; public var nameField:TextField; public var bg:GenericSquare; public var cancelBtn:MovieClip; public var holder:MovieClip; public var mapMenu:thumbnailSelector; } }//package
Section 296
//roomDetailsPanel (roomDetailsPanel) package { import flash.display.*; import flash.text.*; public dynamic class roomDetailsPanel extends MovieClip { public var field:TextField; public var mapIcon:ThumbnailIcon; public var mapField:TextField; public var slotHolder:MovieClip; public var statusField:TextField; public var quitBtn:MovieClip; public var timelimitField:TextField; public var killlimitField:TextField; } }//package
Section 297
//roomErrorPanel (roomErrorPanel) package { import flash.display.*; import flash.text.*; public dynamic class roomErrorPanel extends MovieClip { public var field:TextField; public function roomErrorPanel(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 298
//roomPasswordPanel (roomPasswordPanel) package { import flash.display.*; import flash.text.*; public dynamic class roomPasswordPanel extends MovieClip { public var field:TextField; public var quitBtn:MovieClip; public function roomPasswordPanel(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 299
//roundSummary_tallyItem (roundSummary_tallyItem) package { import flash.display.*; import flash.text.*; public dynamic class roundSummary_tallyItem extends MovieClip { public var field1:TextField; public var field2:TextField; } }//package
Section 300
//scoreTable (scoreTable) package { import uk.co.barraxworld.game.projects.ultrakillz.views.*; public dynamic class scoreTable extends ScoreTable { } }//package
Section 301
//ScoreTableItem (ScoreTableItem) package { import flash.display.*; import flash.text.*; public dynamic class ScoreTableItem extends MovieClip { public var killsField:TextField; public var nameField:TextField; } }//package
Section 302
//scream1 (scream1) package { import flash.media.*; public dynamic class scream1 extends Sound { } }//package
Section 303
//scream2 (scream2) package { import flash.media.*; public dynamic class scream2 extends Sound { } }//package
Section 304
//ServerView (ServerView) package { import uk.co.barraxworld.multiuser.server.*; public dynamic class ServerView extends ServerView { } }//package
Section 305
//small_button (small_button) package { import uk.co.barraxworld.ui.*; public dynamic class small_button extends GenericButton { public function small_button(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 306
//socketDebugWindow (socketDebugWindow) package { import flash.display.*; import flash.text.*; public dynamic class socketDebugWindow extends MovieClip { public var outField:TextField; public var inField:TextField; } }//package
Section 307
//sound_button_click (sound_button_click) package { import flash.media.*; public dynamic class sound_button_click extends Sound { } }//package
Section 308
//sound_button_over (sound_button_over) package { import flash.media.*; public dynamic class sound_button_over extends Sound { } }//package
Section 309
//sound_click (sound_click) package { import flash.media.*; public dynamic class sound_click extends Sound { } }//package
Section 310
//sound_lobby_chat (sound_lobby_chat) package { import flash.media.*; public dynamic class sound_lobby_chat extends Sound { } }//package
Section 311
//sound_lobby_countdown (sound_lobby_countdown) package { import flash.media.*; public dynamic class sound_lobby_countdown extends Sound { } }//package
Section 312
//sound_lobby_newroom (sound_lobby_newroom) package { import flash.media.*; public dynamic class sound_lobby_newroom extends Sound { } }//package
Section 313
//sound_lobby_newuser (sound_lobby_newuser) package { import flash.media.*; public dynamic class sound_lobby_newuser extends Sound { } }//package
Section 314
//sound_music_gameover (sound_music_gameover) package { import flash.media.*; public dynamic class sound_music_gameover extends Sound { } }//package
Section 315
//sound_music_main (sound_music_main) package { import flash.media.*; public dynamic class sound_music_main extends Sound { } }//package
Section 316
//sound_music_nextlevel (sound_music_nextlevel) package { import flash.media.*; public dynamic class sound_music_nextlevel extends Sound { } }//package
Section 317
//sound_select_thumb (sound_select_thumb) package { import flash.media.*; public dynamic class sound_select_thumb extends Sound { } }//package
Section 318
//spawn_mc (spawn_mc) package { import flash.display.*; public dynamic class spawn_mc extends MovieClip { public function spawn_mc(){ addFrameScript(22, frame23); } function frame23(){ stop(); } } }//package
Section 319
//spawn_sound (spawn_sound) package { import flash.media.*; public dynamic class spawn_sound extends Sound { } }//package
Section 320
//stageActivateMessage (stageActivateMessage) package { import flash.display.*; public dynamic class stageActivateMessage extends Sprite { } }//package
Section 321
//SyncView (SyncView) package { import flash.display.*; import flash.text.*; public dynamic class SyncView extends MovieClip { public var field:TextField; public var anim:MovieClip; public var template:menuTemplate; } }//package
Section 322
//ThumbnailIcon (ThumbnailIcon) package { import uk.co.barraxworld.ui.*; public dynamic class ThumbnailIcon extends ThumbnailIcon { } }//package
Section 323
//thumbnailSelector (thumbnailSelector) package { import uk.co.barraxworld.ui.*; public dynamic class thumbnailSelector extends ThumbnailSelector { } }//package
Section 324
//timeCountdownSound (timeCountdownSound) package { import flash.media.*; public dynamic class timeCountdownSound extends Sound { } }//package
Section 325
//toggleArrows (toggleArrows) package { import flash.display.*; import flash.text.*; public dynamic class toggleArrows extends MovieClip { public var btnUp:MovieClip; public var btnDown:MovieClip; public var labelField:TextField; public var titleField:TextField; } }//package
Section 326
//trail (trail) package { import uk.co.barraxworld.game.engine3D.effects.*; public dynamic class trail extends SmokeTrail { } }//package
Section 327
//trailsmoke (trailsmoke) package { import flash.media.*; public dynamic class trailsmoke extends Sound { } }//package
Section 328
//tutorialClip (tutorialClip) package { import flash.display.*; import flash.text.*; public dynamic class tutorialClip extends MovieClip { public var bodyClip:MovieClip; public var nextBtn:genericButton_small; public var titleField:TextField; } }//package
Section 329
//UserClip (UserClip) package { import flash.display.*; import flash.text.*; public dynamic class UserClip extends MovieClip { public var countryClip:countryThumb; public var nameField:TextField; public var bg:MovieClip; public var rankClip:rankThumb; public function UserClip(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 330
//UserClipSmall (UserClipSmall) package { import flash.display.*; import flash.text.*; public dynamic class UserClipSmall extends MovieClip { public var countryClip:countryThumb; public var nameField:TextField; public var rankClip:rankThumb; public function UserClipSmall(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 331
//userDetailsModal (userDetailsModal) package { import uk.co.barraxworld.multiuser.lobby.*; public dynamic class userDetailsModal extends UserDetailsModal { } }//package
Section 332
//userDetailsPanel (userDetailsPanel) package { import flash.display.*; import flash.text.*; public dynamic class userDetailsPanel extends MovieClip { public var countryClip:countryThumb; public var nameField:TextField; public var userIcon:ThumbnailIcon; public var bodyField:TextField; public var rankClip:rankThumb; } }//package
Section 333
//UserListPanel (UserListPanel) package { import flash.display.*; import flash.text.*; public dynamic class UserListPanel extends MovieClip { public var field:TextField; public var numField:TextField; public var holder:MovieClip; } }//package

Library Items

Symbol 1 Sound {trailsmoke}
Symbol 2 Sound {timeCountdownSound}
Symbol 3 Sound {spawn_sound}
Symbol 4 Sound {sound_select_thumb}
Symbol 5 Sound {sound_music_nextlevel}
Symbol 6 Sound {sound_music_main}
Symbol 7 Sound {sound_music_gameover}
Symbol 8 Sound {sound_lobby_newuser}
Symbol 9 Sound {sound_lobby_newroom}
Symbol 10 Sound {sound_lobby_countdown}
Symbol 11 Sound {sound_lobby_chat}
Symbol 12 Sound {sound_click}
Symbol 13 Sound {sound_button_over}
Symbol 14 Sound {sound_button_click}
Symbol 15 Sound {scream2}
Symbol 16 Sound {scream1}
Symbol 17 Sound {explosionSound}
Symbol 18 Sound {reboundMetal}
Symbol 19 Sound {reboundMeat3}
Symbol 20 Sound {reboundMeat2}
Symbol 21 Sound {reboundMeat1}
Symbol 22 Sound {reboundMeat0}
Symbol 23 Sound {reboundGeneric}
Symbol 24 Sound {propelledProjectile_sound}
Symbol 25 Sound {powerup_sound}
Symbol 26 Sound {laugh1}
Symbol 27 Sound {gunfire_sound}
Symbol 28 Sound {grunt1}
Symbol 29 Sound {fuseSound}
Symbol 30 Sound {flies}
Symbol 31 Sound {flesh}
Symbol 32 Sound {beep1}
Symbol 33 Sound {beep0}
Symbol 34 Sound {ammo_collect_sound}
Symbol 35 GraphicUsed by:51
Symbol 36 MovieClipUsed by:51
Symbol 37 BitmapUsed by:38
Symbol 38 GraphicUses:37Used by:39
Symbol 39 MovieClipUses:38Used by:51
Symbol 40 MovieClip {a_ultrakillz_mochi_fla.level_select_hilite_209}Used by:51
Symbol 41 FontUsed by:42 44 62 65 71 72 73 74 75 80 120 121 122 123 129 139 140 141 213 219 229 270 277 283 284 285 296 308 310 312 314 322 323 346 347 348 349 350 361 367 375 384 388 390 401 418 419 428 457 459 460 489 490 493 497 513 514 521 524 527 552 558 563 566 570 571 573 575
Symbol 42 EditableTextUses:41Used by:51
Symbol 43 GraphicUsed by:45
Symbol 44 TextUses:41Used by:45
Symbol 45 MovieClipUses:43 44Used by:51 554
Symbol 46 BitmapUsed by:47
Symbol 47 GraphicUses:46Used by:51
Symbol 48 BitmapUsed by:49
Symbol 49 GraphicUses:48Used by:50 315
Symbol 50 MovieClip {padlock_icon}Uses:49Used by:51 278
Symbol 51 MovieClip {level_thumbnail}Uses:35 36 39 40 42 45 47 50
Symbol 52 GraphicUsed by:53
Symbol 53 MovieClip {level_select_overlay}Uses:52
Symbol 54 BitmapUsed by:55
Symbol 55 GraphicUses:54Used by:59
Symbol 56 GraphicUsed by:59
Symbol 57 GraphicUsed by:59
Symbol 58 GraphicUsed by:59
Symbol 59 MovieClip {arrowBtn}Uses:55 56 57 58Used by:64
Symbol 60 BitmapUsed by:61
Symbol 61 GraphicUses:60Used by:63 66
Symbol 62 EditableTextUses:41 79Used by:63 355 561
Symbol 63 MovieClip {genericButton_small}Uses:61 62Used by:64 356 385 392 393 559
Symbol 64 MovieClip {level_select_buttons}Uses:59 63
Symbol 65 EditableTextUses:41Used by:66
Symbol 66 MovieClip {small_button}Uses:61 65
Symbol 67 BitmapUsed by:68
Symbol 68 GraphicUses:67Used by:69
Symbol 69 MovieClipUses:68Used by:70
Symbol 70 MovieClip {hudAmmo}Uses:69
Symbol 71 EditableTextUses:41Used by:110
Symbol 72 EditableTextUses:41Used by:110
Symbol 73 EditableTextUses:41Used by:110
Symbol 74 EditableTextUses:41Used by:110
Symbol 75 EditableTextUses:41Used by:110
Symbol 76 FontUsed by:77 242 266 280 306 499 543
Symbol 77 EditableTextUses:76Used by:110
Symbol 78 MovieClipUsed by:110
Symbol 79 FontUsed by:62 80 219 229 361 367 380 381 382 401 418 419 428 489 490 558 563 566 570 571
Symbol 80 EditableTextUses:41 79Used by:81
Symbol 81 MovieClip {a_ultrakillz_mochi_fla.mainStatus_text_gfx_186}Uses:80Used by:85
Symbol 82 GraphicUsed by:83
Symbol 83 MovieClipUses:82Used by:85
Symbol 84 GraphicUsed by:85 91 94
Symbol 85 MovieClip {a_ultrakillz_mochi_fla.mainStatusClip_185}Uses:81 83 84Used by:110
Symbol 86 FontUsed by:87 92
Symbol 87 EditableTextUses:86Used by:88
Symbol 88 MovieClip {a_ultrakillz_mochi_fla.timeFieldMC_189}Uses:87Used by:91
Symbol 89 GraphicUsed by:90 302
Symbol 90 MovieClipUses:89Used by:91 104
Symbol 91 MovieClip {a_ultrakillz_mochi_fla.timeRemainingClip_188}Uses:88 84 90Used by:110
Symbol 92 EditableTextUses:86Used by:93
Symbol 93 MovieClip {a_ultrakillz_mochi_fla.playerLivesText_192}Uses:92Used by:94
Symbol 94 MovieClip {a_ultrakillz_mochi_fla.playerLives_191}Uses:93 84Used by:110
Symbol 95 GraphicUsed by:96
Symbol 96 MovieClipUses:95Used by:110
Symbol 97 GraphicUsed by:98
Symbol 98 MovieClipUses:97Used by:110
Symbol 99 BitmapUsed by:100
Symbol 100 GraphicUses:99Used by:101
Symbol 101 MovieClipUses:100Used by:106
Symbol 102 GraphicUsed by:105
Symbol 103 GraphicUsed by:104
Symbol 104 MovieClip {a_ultrakillz_mochi_fla.health_bar_fill_198}Uses:103 90Used by:105
Symbol 105 MovieClip {a_ultrakillz_mochi_fla.health_bar_anim_197}Uses:102 104Used by:106
Symbol 106 MovieClip {a_ultrakillz_mochi_fla.health_bar_195}Uses:101 105Used by:110
Symbol 107 BitmapUsed by:108
Symbol 108 GraphicUses:107Used by:109
Symbol 109 MovieClip {a_ultrakillz_mochi_fla.lense_blood_mc_199}Uses:108Used by:110
Symbol 110 MovieClip {hud_mc}Uses:71 72 73 74 75 77 78 85 91 94 96 98 106 109
Symbol 111 GraphicUsed by:130
Symbol 112 BitmapUsed by:113 126 235
Symbol 113 GraphicUses:112Used by:114
Symbol 114 MovieClip {keyboardItem}Uses:113Used by:117 142
Symbol 115 GraphicUsed by:116
Symbol 116 MovieClipUses:115Used by:117 142
Symbol 117 MovieClip {movementKeys}Uses:114 116Used by:130
Symbol 118 BitmapUsed by:119
Symbol 119 GraphicUses:118Used by:130
Symbol 120 TextUses:41Used by:130
Symbol 121 TextUses:41Used by:130
Symbol 122 TextUses:41Used by:130
Symbol 123 TextUses:41Used by:130
Symbol 124 GraphicUsed by:130 142
Symbol 125 GraphicUsed by:127 128
Symbol 126 GraphicUses:112Used by:128
Symbol 127 MovieClipUses:125Used by:128
Symbol 128 MovieClipUses:125 126 127Used by:130
Symbol 129 TextUses:41Used by:130
Symbol 130 MovieClip {hint_move}Uses:111 117 119 120 121 122 123 124 128 129
Symbol 131 BitmapUsed by:132
Symbol 132 GraphicUses:131Used by:142
Symbol 133 GraphicUsed by:134
Symbol 134 MovieClipUses:133Used by:142
Symbol 135 GraphicUsed by:142
Symbol 136 ShapeTweeningUsed by:142
Symbol 137 GraphicUsed by:142
Symbol 138 GraphicUsed by:142
Symbol 139 TextUses:41Used by:142
Symbol 140 TextUses:41Used by:142
Symbol 141 TextUses:41Used by:142
Symbol 142 MovieClip {hint_fireWeapon}Uses:132 134 135 136 137 138 114 139 140 141 124 116
Symbol 143 GraphicUsed by:144
Symbol 144 MovieClip {a_ultrakillz_mochi_fla.mask_171}Uses:143Used by:151
Symbol 145 GraphicUsed by:146
Symbol 146 MovieClipUses:145Used by:151
Symbol 147 BitmapUsed by:148
Symbol 148 GraphicUses:147Used by:149
Symbol 149 MovieClipUses:148Used by:150
Symbol 150 MovieClipUses:149Used by:151
Symbol 151 MovieClip {uk.co.barraxworld.ui.Scrollpage}Uses:144 146 150
Symbol 152 FontUsed by:153 154 224 241 242 265 266 280 295 306 515 516 517 518 519
Symbol 153 EditableTextUses:152Used by:155
Symbol 154 EditableTextUses:152Used by:155
Symbol 155 MovieClip {socketDebugWindow}Uses:153 154
Symbol 156 BitmapUsed by:157
Symbol 157 GraphicUses:156Used by:160
Symbol 158 GraphicUsed by:159 333
Symbol 159 MovieClip {a_ultrakillz_mochi_fla.flashing_light_168}Uses:158Used by:160
Symbol 160 MovieClipUses:157 159Used by:161
Symbol 161 MovieClip {grenade1}Uses:160
Symbol 162 GraphicUsed by:167 168
Symbol 163 BitmapUsed by:164
Symbol 164 GraphicUses:163Used by:167 168
Symbol 165 BitmapUsed by:166 191
Symbol 166 GraphicUses:165Used by:167 168 185
Symbol 167 MovieClip {rocket2}Uses:162 164 166
Symbol 168 MovieClip {rocket1}Uses:162 164 166
Symbol 169 BitmapUsed by:170
Symbol 170 GraphicUses:169Used by:171 440
Symbol 171 MovieClip {plasma1}Uses:170
Symbol 172 GraphicUsed by:173
Symbol 173 MovieClip {bullet1}Uses:172
Symbol 174 MovieClipUsed by:175 179 246 248 250 307 309 315 423 424 461 500 554
Symbol 175 MovieClip {a_ultrakillz_mochi_fla.player_thirdperson_159}Uses:174Used by:180
Symbol 176 BitmapUsed by:177
Symbol 177 GraphicUses:176Used by:178
Symbol 178 MovieClip {a_ultrakillz_mochi_fla.rocket_gfx_main_161}Uses:177Used by:179
Symbol 179 MovieClip {a_ultrakillz_mochi_fla.player_firstperson_160}Uses:174 178Used by:180
Symbol 180 MovieClip {player_human}Uses:175 179
Symbol 181 BitmapUsed by:182
Symbol 182 GraphicUses:181Used by:186
Symbol 183 FontUsed by:184
Symbol 184 TextUses:183Used by:186
Symbol 185 MovieClip {a_ultrakillz_mochi_fla.fire_flame_157}Uses:166Used by:186
Symbol 186 MovieClip {player_cpu}Uses:182 184 185
Symbol 187 BitmapUsed by:188
Symbol 188 GraphicUses:187Used by:189
Symbol 189 MovieClipUses:188Used by:190
Symbol 190 MovieClip {RedMist}Uses:189
Symbol 191 GraphicUses:165Used by:192
Symbol 192 MovieClip {muzzleFlash}Uses:191
Symbol 193 VideoUsed by:194
Symbol 194 MovieClip {explosion4}Uses:193
Symbol 195 BitmapUsed by:196
Symbol 196 GraphicUses:195Used by:197 199 200 201
Symbol 197 MovieClip {explosion_plasma}Uses:196
Symbol 198 GraphicUsed by:199 200
Symbol 199 MovieClip {explosion3}Uses:198 196
Symbol 200 MovieClip {explosion2}Uses:198 196
Symbol 201 MovieClip {explosion1}Uses:196
Symbol 202 BitmapUsed by:203
Symbol 203 GraphicUses:202Used by:204
Symbol 204 MovieClip {crosshair_sprite}Uses:203
Symbol 205 BitmapUsed by:206
Symbol 206 GraphicUses:205Used by:207
Symbol 207 MovieClip {crosshair_line}Uses:206
Symbol 208 GraphicUsed by:214
Symbol 209 GraphicUsed by:212
Symbol 210 BitmapUsed by:211
Symbol 211 GraphicUses:210Used by:212
Symbol 212 MovieClipUses:209 211Used by:214
Symbol 213 EditableTextUses:41Used by:214
Symbol 214 MovieClip {btnServerSelect}Uses:208 212 213
Symbol 215 GraphicUsed by:216
Symbol 216 MovieClipUses:215Used by:220
Symbol 217 GraphicUsed by:218
Symbol 218 MovieClipUses:217Used by:220
Symbol 219 EditableTextUses:41 79Used by:220
Symbol 220 MovieClip {messageOverlay}Uses:216 218 219
Symbol 221 GraphicUsed by:223
Symbol 222 GraphicUsed by:223
Symbol 223 MovieClip {a_ultrakillz_mochi_fla.lobbyBtn_140}Uses:221 222Used by:232
Symbol 224 TextUses:152Used by:232
Symbol 225 BitmapUsed by:226
Symbol 226 GraphicUses:225Used by:232
Symbol 227 GraphicUsed by:228
Symbol 228 MovieClipUses:227Used by:230
Symbol 229 EditableTextUses:41 79Used by:230
Symbol 230 MovieClip {lobby_button}Uses:228 229Used by:232 309 315
Symbol 231 GraphicUsed by:232 340
Symbol 232 MovieClip {lobbyView}Uses:223 224 226 230 231
Symbol 233 GraphicUsed by:234 238
Symbol 234 MovieClipUses:233Used by:264
Symbol 235 GraphicUses:112Used by:238
Symbol 236 GraphicUsed by:238
Symbol 237 GraphicUsed by:238
Symbol 238 MovieClip {a_ultrakillz_mochi_fla.userDetailsModalTopbar_138}Uses:235 233 236 237Used by:264
Symbol 239 GraphicUsed by:240
Symbol 240 MovieClipUses:239Used by:264 267
Symbol 241 EditableTextUses:152Used by:264
Symbol 242 EditableTextUses:76 152Used by:264
Symbol 243 GraphicUsed by:246
Symbol 244 GraphicUsed by:246 394 395 577
Symbol 245 GraphicUsed by:246
Symbol 246 MovieClip {ThumbnailIcon}Uses:243 244 174 245Used by:264 267 271 294
Symbol 247 GraphicUsed by:248
Symbol 248 MovieClip {countryThumb}Uses:247 174Used by:264 267 271 317 321
Symbol 249 GraphicUsed by:250
Symbol 250 MovieClip {rankThumb}Uses:249 174Used by:264 267 271 317 321 520
Symbol 251 GraphicUsed by:261
Symbol 252 FontUsed by:253 282 511
Symbol 253 EditableTextUses:252Used by:261
Symbol 254 GraphicUsed by:261
Symbol 255 GraphicUsed by:260
Symbol 256 GraphicUsed by:260
Symbol 257 GraphicUsed by:260
Symbol 258 GraphicUsed by:260
Symbol 259 GraphicUsed by:260
Symbol 260 MovieClip {a_ultrakillz_mochi_fla.tickBox_tick_26}Uses:255 256 257 258 259Used by:261
Symbol 261 MovieClip {dropMenuItem}Uses:251 253 254 260Used by:264
Symbol 262 GraphicUsed by:263
Symbol 263 MovieClipUses:262Used by:264 286 294 309 315
Symbol 264 MovieClip {userDetailsModal}Uses:234 238 240 241 242 246 248 250 261 263
Symbol 265 EditableTextUses:152Used by:267
Symbol 266 EditableTextUses:76 152Used by:267
Symbol 267 MovieClip {userDetailsPanel}Uses:240 265 266 246 248 250
Symbol 268 FontUsed by:269 274 289 290 291 292 293 311 313 316 319 564 567
Symbol 269 EditableTextUses:268Used by:271
Symbol 270 EditableTextUses:41Used by:271
Symbol 271 MovieClip {localUserDetailsPanel}Uses:269 270 246 248 250
Symbol 272 GraphicUsed by:278 317 318 320
Symbol 273 GraphicUsed by:278 317 321
Symbol 274 EditableTextUses:268Used by:278
Symbol 275 GraphicUsed by:276
Symbol 276 MovieClipUses:275Used by:278
Symbol 277 TextUses:41Used by:278
Symbol 278 MovieClip {roomClip}Uses:272 273 274 276 277 50
Symbol 279 GraphicUsed by:281 286
Symbol 280 EditableTextUses:76 152Used by:281
Symbol 281 MovieClip {roomErrorPanel}Uses:279 280
Symbol 282 EditableTextUses:252Used by:286
Symbol 283 TextUses:41Used by:286
Symbol 284 TextUses:41Used by:286
Symbol 285 TextUses:41Used by:286
Symbol 286 MovieClip {roomPasswordPanel}Uses:279 282 283 263 284 285
Symbol 287 GraphicUsed by:294
Symbol 288 MovieClipUsed by:294 324
Symbol 289 EditableTextUses:268Used by:294
Symbol 290 EditableTextUses:268Used by:294
Symbol 291 EditableTextUses:268Used by:294
Symbol 292 EditableTextUses:268Used by:294
Symbol 293 EditableTextUses:268Used by:294
Symbol 294 MovieClip {roomDetailsPanel}Uses:246 287 288 289 290 291 292 293 263
Symbol 295 EditableTextUses:152Used by:301
Symbol 296 EditableTextUses:41Used by:301
Symbol 297 GraphicUsed by:300
Symbol 298 GraphicUsed by:300
Symbol 299 GraphicUsed by:300
Symbol 300 MovieClip {a_ultrakillz_mochi_fla.arrowBtn_125}Uses:297 298 299Used by:301 307
Symbol 301 MovieClip {toggleArrows}Uses:295 296 300
Symbol 302 MovieClip {GenericSquare}Uses:89Used by:309 315
Symbol 303 BitmapUsed by:304 383
Symbol 304 GraphicUses:303Used by:305
Symbol 305 MovieClipUses:304Used by:309 315
Symbol 306 EditableTextUses:76 152Used by:307
Symbol 307 MovieClip {thumbnailSelector}Uses:174 300 306Used by:309 315
Symbol 308 TextUses:41Used by:309
Symbol 309 MovieClip {practiceConfigPanel}Uses:302 305 263 230 174 307 308
Symbol 310 TextUses:41Used by:315
Symbol 311 EditableTextUses:268Used by:315
Symbol 312 TextUses:41Used by:315
Symbol 313 EditableTextUses:268Used by:315
Symbol 314 TextUses:41Used by:315
Symbol 315 MovieClip {roomConfigPanel}Uses:302 305 263 230 174 307 310 311 312 313 49 314
Symbol 316 EditableTextUses:268Used by:317
Symbol 317 MovieClip {UserClipSmall}Uses:272 316 250 248 273
Symbol 318 MovieClipUses:272Used by:321
Symbol 319 EditableTextUses:268Used by:321
Symbol 320 MovieClip {a_ultrakillz_mochi_fla.lobby_userBtn_throb_anim_116}Uses:272Used by:321
Symbol 321 MovieClip {UserClip}Uses:318 319 250 248 273 320
Symbol 322 EditableTextUses:41Used by:324
Symbol 323 EditableTextUses:41Used by:324
Symbol 324 MovieClip {UserListPanel}Uses:322 288 323
Symbol 325 BitmapUsed by:326
Symbol 326 GraphicUses:325Used by:340
Symbol 327 BitmapUsed by:328
Symbol 328 GraphicUses:327Used by:334
Symbol 329 GraphicUsed by:334
Symbol 330 GraphicUsed by:334
Symbol 331 GraphicUsed by:334
Symbol 332 GraphicUsed by:334
Symbol 333 MovieClipUses:158Used by:334
Symbol 334 MovieClipUses:328 329 330 331 332 333Used by:340
Symbol 335 GraphicUsed by:336
Symbol 336 ButtonUses:335Used by:340
Symbol 337 FontUsed by:338 339
Symbol 338 TextUses:337Used by:340
Symbol 339 TextUses:337Used by:340
Symbol 340 MovieClip {menuTemplate}Uses:326 334 336 338 339 231Used by:356 362 368 385 389 392 393 400 492
Symbol 341 GraphicUsed by:344
Symbol 342 BitmapUsed by:343
Symbol 343 GraphicUses:342Used by:344
Symbol 344 MovieClipUses:341 343Used by:356
Symbol 345 GraphicUsed by:351
Symbol 346 TextUses:41Used by:351
Symbol 347 TextUses:41Used by:351
Symbol 348 TextUses:41Used by:351
Symbol 349 TextUses:41Used by:351
Symbol 350 TextUses:41Used by:351
Symbol 351 MovieClipUses:345 346 347 348 349 350Used by:356
Symbol 352 BitmapUsed by:353
Symbol 353 GraphicUses:352Used by:354
Symbol 354 MovieClip {a_ultrakillz_mochi_fla.btn_bg_6}Uses:353Used by:355
Symbol 355 MovieClip {genericButton}Uses:354 62Used by:356 420 565 568 576
Symbol 356 MovieClip {HowToPlayView}Uses:340 344 351 355 63
Symbol 357 GraphicUsed by:358
Symbol 358 MovieClipUses:357Used by:359
Symbol 359 MovieClipUses:358Used by:360
Symbol 360 MovieClip {a_ultrakillz_mochi_fla.WaitAnim_Complete_45}Uses:359Used by:362 368 501
Symbol 361 EditableTextUses:41 79Used by:362
Symbol 362 MovieClip {SyncView}Uses:340 360 361
Symbol 363 GraphicUsed by:364
Symbol 364 MovieClipUses:363Used by:366
Symbol 365 GraphicUsed by:366
Symbol 366 MovieClip {uk.co.barraxworld.loaders.ProgressBarView}Uses:364 365Used by:368 520
Symbol 367 EditableTextUses:41 79Used by:368
Symbol 368 MovieClip {AssetsLoaderView}Uses:340 366 360 367
Symbol 369 GraphicUsed by:385
Symbol 370 GraphicUsed by:371
Symbol 371 MovieClipUses:370Used by:385
Symbol 372 BitmapUsed by:373 386 417
Symbol 373 GraphicUses:372Used by:374
Symbol 374 MovieClipUses:373Used by:385 565 568
Symbol 375 TextUses:41Used by:385
Symbol 376 GraphicUsed by:379
Symbol 377 GraphicUsed by:378
Symbol 378 MovieClipUses:377Used by:379
Symbol 379 MovieClip {checkbox}Uses:376 378Used by:385
Symbol 380 TextUses:79Used by:385
Symbol 381 TextUses:79Used by:385
Symbol 382 TextUses:79Used by:385
Symbol 383 GraphicUses:303Used by:385
Symbol 384 TextUses:41Used by:385
Symbol 385 MovieClip {OptionsView}Uses:369 371 340 63 374 375 379 380 381 382 383 384
Symbol 386 GraphicUses:372Used by:387
Symbol 387 MovieClipUses:386Used by:389 576
Symbol 388 EditableTextUses:41Used by:389
Symbol 389 MovieClip {LevelSummaryView}Uses:340 387 388
Symbol 390 TextUses:41Used by:391
Symbol 391 MovieClipUses:390Used by:392
Symbol 392 MovieClip {LevelSelectView}Uses:340 391 63
Symbol 393 MovieClip {DifficultyView}Uses:340 63
Symbol 394 MovieClipUses:244Used by:396 576
Symbol 395 MovieClipUses:244Used by:396
Symbol 396 MovieClip {HighscoresView}Uses:394 395
Symbol 397 BitmapUsed by:398
Symbol 398 GraphicUses:397Used by:399
Symbol 399 MovieClip {a_ultrakillz_mochi_fla.e4_sticker_96}Uses:398Used by:400
Symbol 400 MovieClip {HomeView}Uses:340 399
Symbol 401 EditableTextUses:41 79Used by:403
Symbol 402 GraphicUsed by:403
Symbol 403 MovieClip {uk.co.barraxworld.game.engine3D.characters.PlayerIdentity}Uses:401 402
Symbol 404 BitmapUsed by:405
Symbol 405 GraphicUses:404Used by:406 407
Symbol 406 MovieClipUses:405Used by:407
Symbol 407 MovieClip {spawn_mc}Uses:405 406
Symbol 408 GraphicUsed by:416
Symbol 409 BitmapUsed by:410
Symbol 410 GraphicUses:409Used by:416
Symbol 411 GraphicUsed by:416
Symbol 412 GraphicUsed by:416
Symbol 413 GraphicUsed by:416
Symbol 414 GraphicUsed by:416
Symbol 415 GraphicUsed by:416
Symbol 416 MovieClip {giblet}Uses:408 410 411 412 413 414 415
Symbol 417 GraphicUses:372Used by:420
Symbol 418 EditableTextUses:41 79Used by:420
Symbol 419 EditableTextUses:41 79Used by:420
Symbol 420 MovieClip {uk.co.barraxworld.game.projects.ultrakillz.views.SummaryView}Uses:417 418 355 419
Symbol 421 BitmapUsed by:422
Symbol 422 GraphicUses:421Used by:423 424
Symbol 423 MovieClip {uk.co.barraxworld.game.shooter.PowerupPickupIcon}Uses:422 174
Symbol 424 MovieClip {uk.co.barraxworld.game.shooter.WeaponPickupIcon}Uses:422 174
Symbol 425 BitmapUsed by:426
Symbol 426 GraphicUses:425Used by:427
Symbol 427 MovieClipUses:426Used by:431
Symbol 428 EditableTextUses:41 79Used by:431
Symbol 429 GraphicUsed by:430 431
Symbol 430 MovieClipUses:429Used by:431
Symbol 431 MovieClip {uk.co.barraxworld.game.shooter.WeaponMenuIcon}Uses:427 428 430 429
Symbol 432 BitmapUsed by:433
Symbol 433 GraphicUses:432Used by:434
Symbol 434 MovieClip {icon_rockets}Uses:433
Symbol 435 GraphicUsed by:436
Symbol 436 MovieClip {icon_lightning_beam}Uses:435
Symbol 437 BitmapUsed by:438
Symbol 438 GraphicUses:437Used by:439
Symbol 439 MovieClip {icon_rocket}Uses:438
Symbol 440 MovieClip {icon_plasma}Uses:170
Symbol 441 BitmapUsed by:442 444
Symbol 442 GraphicUses:441Used by:443
Symbol 443 MovieClip {icon_bullet}Uses:442
Symbol 444 GraphicUses:441Used by:445
Symbol 445 MovieClip {icon_bullets}Uses:444
Symbol 446 BitmapUsed by:447
Symbol 447 GraphicUses:446Used by:448
Symbol 448 MovieClip {icon_rocket_large}Uses:447
Symbol 449 BitmapUsed by:450
Symbol 450 GraphicUses:449Used by:451
Symbol 451 MovieClip {icon_pipebomb}Uses:450
Symbol 452 BitmapUsed by:453
Symbol 453 GraphicUses:452Used by:454
Symbol 454 MovieClipUses:453Used by:455
Symbol 455 MovieClip {icon_health}Uses:454
Symbol 456 GraphicUsed by:461
Symbol 457 TextUses:41Used by:461
Symbol 458 GraphicUsed by:461
Symbol 459 TextUses:41Used by:461
Symbol 460 TextUses:41Used by:461
Symbol 461 MovieClip {scoreTable}Uses:456 174 457 458 459 460
Symbol 462 BitmapUsed by:463
Symbol 463 GraphicUses:462Used by:464
Symbol 464 MovieClipUses:463Used by:465
Symbol 465 MovieClip {a_ultrakillz_mochi_fla.Spritesheet_explosion_72}Uses:464Used by:466
Symbol 466 MovieClip {explosion}Uses:465
Symbol 467 BitmapUsed by:468
Symbol 468 GraphicUses:467Used by:469
Symbol 469 MovieClipUses:468Used by:470
Symbol 470 MovieClip {a_ultrakillz_mochi_fla.spriteSheet_smoke_69}Uses:469Used by:471
Symbol 471 MovieClip {trail}Uses:470
Symbol 472 BitmapUsed by:473
Symbol 473 GraphicUses:472Used by:474
Symbol 474 MovieClipUses:473Used by:475
Symbol 475 MovieClip {a_ultrakillz_mochi_fla.spriteSheet_character_strafe_66}Uses:474Used by:476
Symbol 476 MovieClip {characterStrafeAnim}Uses:475
Symbol 477 BitmapUsed by:478
Symbol 478 GraphicUses:477Used by:479
Symbol 479 MovieClipUses:478Used by:480
Symbol 480 MovieClip {a_ultrakillz_mochi_fla.spriteSheet_character_walk_63}Uses:479Used by:481
Symbol 481 MovieClip {characterWalkAnim}Uses:480
Symbol 482 BitmapUsed by:483
Symbol 483 GraphicUses:482Used by:484
Symbol 484 MovieClipUses:483Used by:485
Symbol 485 MovieClip {a_ultrakillz_mochi_fla.spriteSheet_blood_60}Uses:484Used by:486
Symbol 486 MovieClip {blood}Uses:485
Symbol 487 GraphicUsed by:488
Symbol 488 MovieClip {fliesAnim}Uses:487
Symbol 489 EditableTextUses:41 79Used by:491
Symbol 490 EditableTextUses:41 79Used by:491
Symbol 491 MovieClip {ScoreTableItem}Uses:489 490
Symbol 492 MovieClip {ServerView}Uses:340
Symbol 493 TextUses:41Used by:496
Symbol 494 BitmapUsed by:495
Symbol 495 GraphicUses:494Used by:496
Symbol 496 MovieClipUses:493 495Used by:501
Symbol 497 EditableTextUses:41Used by:501
Symbol 498 GraphicUsed by:500
Symbol 499 TextUses:76Used by:500
Symbol 500 MovieClip {a_ultrakillz_mochi_fla.adHolder_48}Uses:498 174 499Used by:501
Symbol 501 MovieClip {InterludeView}Uses:496 360 497 500
Symbol 502 GraphicUsed by:503
Symbol 503 MovieClip {icon_speed}Uses:502
Symbol 504 GraphicUsed by:505
Symbol 505 MovieClip {icon_jump}Uses:504
Symbol 506 GraphicUsed by:507
Symbol 507 MovieClip {icon_wallhack}Uses:506
Symbol 508 BitmapUsed by:509
Symbol 509 GraphicUses:508Used by:510
Symbol 510 MovieClipUses:509Used by:512
Symbol 511 EditableTextUses:252Used by:512
Symbol 512 MovieClip {button2_complete}Uses:510 511Used by:520
Symbol 513 TextUses:41Used by:520
Symbol 514 TextUses:41Used by:520
Symbol 515 EditableTextUses:152Used by:520
Symbol 516 EditableTextUses:152Used by:520
Symbol 517 EditableTextUses:152Used by:520
Symbol 518 EditableTextUses:152Used by:520
Symbol 519 EditableTextUses:152Used by:520
Symbol 520 MovieClip {rankStatusView}Uses:366 513 514 515 516 250 517 512 518 519
Symbol 521 TextUses:41Used by:523
Symbol 522 GraphicUsed by:523 525
Symbol 523 MovieClip {JoinGameTip}Uses:521 522
Symbol 524 TextUses:41Used by:525
Symbol 525 MovieClip {CreateGameTip}Uses:524 522
Symbol 526 GraphicUsed by:528
Symbol 527 TextUses:41Used by:528
Symbol 528 MovieClip {stageActivateMessage}Uses:526 527
Symbol 529 GraphicUsed by:530
Symbol 530 MovieClipUses:529Used by:535
Symbol 531 GraphicUsed by:532
Symbol 532 MovieClipUses:531Used by:535
Symbol 533 GraphicUsed by:534
Symbol 534 MovieClipUses:533Used by:535
Symbol 535 MovieClip {dropMenu}Uses:530 532 534
Symbol 536 BitmapUsed by:537
Symbol 537 GraphicUses:536Used by:538
Symbol 538 MovieClip {divide}Uses:537
Symbol 539 GraphicUsed by:540
Symbol 540 MovieClipUses:539Used by:541
Symbol 541 MovieClip {opponentHealthBar}Uses:540
Symbol 542 GraphicUsed by:544
Symbol 543 TextUses:76Used by:544
Symbol 544 MovieClip {gameHolder}Uses:542 543
Symbol 545 GraphicUsed by:549
Symbol 546 FontUsed by:547 548 556
Symbol 547 TextUses:546Used by:549
Symbol 548 TextUses:546Used by:549
Symbol 549 MovieClip {quitGameBtn}Uses:545 547 548
Symbol 550 GraphicUsed by:551 554
Symbol 551 MovieClipUses:550Used by:553 554
Symbol 552 TextUses:41Used by:553
Symbol 553 MovieClip {a_ultrakillz_mochi_fla.levelSelectThumb_hidden_18}Uses:551 552Used by:554
Symbol 554 MovieClip {levelSelectThumb}Uses:550 174 551 553 45
Symbol 555 GraphicUsed by:559
Symbol 556 EditableTextUses:546Used by:557
Symbol 557 MovieClip {a_ultrakillz_mochi_fla.tutorial_bodyClip_13}Uses:556Used by:559
Symbol 558 EditableTextUses:41 79Used by:559
Symbol 559 MovieClip {tutorialClip}Uses:555 557 558 63
Symbol 560 GraphicUsed by:561
Symbol 561 MovieClip {button_arrow}Uses:560 62
Symbol 562 GraphicUsed by:565 568
Symbol 563 EditableTextUses:41 79Used by:565
Symbol 564 EditableTextUses:268Used by:565
Symbol 565 MovieClip {alertView}Uses:562 374 563 564 355
Symbol 566 EditableTextUses:41 79Used by:568
Symbol 567 EditableTextUses:268Used by:568
Symbol 568 MovieClip {confirmView}Uses:562 374 566 567 355
Symbol 569 GraphicUsed by:572
Symbol 570 EditableTextUses:41 79Used by:572
Symbol 571 EditableTextUses:41 79Used by:572
Symbol 572 MovieClip {roundSummary_tallyItem}Uses:569 570 571
Symbol 573 TextUses:41Used by:576
Symbol 574 GraphicUsed by:576
Symbol 575 EditableTextUses:41Used by:576
Symbol 576 MovieClip {highscoresNamePanel}Uses:394 387 573 574 575 355
Symbol 577 MovieClipUses:244Used by:Timeline

Instance Names

"mochi_root"Frame 1Symbol 577 MovieClip
"holder"Symbol 51 MovieClip {level_thumbnail} Frame 1Symbol 36 MovieClip
"hiliteAnim"Symbol 51 MovieClip {level_thumbnail} Frame 1Symbol 40 MovieClip {a_ultrakillz_mochi_fla.level_select_hilite_209}
"field"Symbol 51 MovieClip {level_thumbnail} Frame 1Symbol 42 EditableText
"completed"Symbol 51 MovieClip {level_thumbnail} Frame 1Symbol 45 MovieClip
"field"Symbol 63 MovieClip {genericButton_small} Frame 1Symbol 62 EditableText
"prevBtn"Symbol 64 MovieClip {level_select_buttons} Frame 1Symbol 59 MovieClip {arrowBtn}
"nextBtn"Symbol 64 MovieClip {level_select_buttons} Frame 1Symbol 59 MovieClip {arrowBtn}
"selectBtn"Symbol 64 MovieClip {level_select_buttons} Frame 1Symbol 63 MovieClip {genericButton_small}
"field"Symbol 66 MovieClip {small_button} Frame 1Symbol 65 EditableText
"field"Symbol 81 MovieClip {a_ultrakillz_mochi_fla.mainStatus_text_gfx_186} Frame 1Symbol 80 EditableText
"textMC"Symbol 85 MovieClip {a_ultrakillz_mochi_fla.mainStatusClip_185} Frame 1Symbol 81 MovieClip {a_ultrakillz_mochi_fla.mainStatus_text_gfx_186}
"field"Symbol 88 MovieClip {a_ultrakillz_mochi_fla.timeFieldMC_189} Frame 1Symbol 87 EditableText
"textMC"Symbol 91 MovieClip {a_ultrakillz_mochi_fla.timeRemainingClip_188} Frame 1Symbol 88 MovieClip {a_ultrakillz_mochi_fla.timeFieldMC_189}
"field"Symbol 93 MovieClip {a_ultrakillz_mochi_fla.playerLivesText_192} Frame 1Symbol 92 EditableText
"textMC"Symbol 94 MovieClip {a_ultrakillz_mochi_fla.playerLives_191} Frame 1Symbol 93 MovieClip {a_ultrakillz_mochi_fla.playerLivesText_192}
"fill"Symbol 105 MovieClip {a_ultrakillz_mochi_fla.health_bar_anim_197} Frame 1Symbol 104 MovieClip {a_ultrakillz_mochi_fla.health_bar_fill_198}
"anim"Symbol 106 MovieClip {a_ultrakillz_mochi_fla.health_bar_195} Frame 1Symbol 105 MovieClip {a_ultrakillz_mochi_fla.health_bar_anim_197}
"playername"Symbol 110 MovieClip {hud_mc} Frame 1Symbol 71 EditableText
"score"Symbol 110 MovieClip {hud_mc} Frame 1Symbol 72 EditableText
"health"Symbol 110 MovieClip {hud_mc} Frame 1Symbol 73 EditableText
"weaponname"Symbol 110 MovieClip {hud_mc} Frame 1Symbol 74 EditableText
"ammo"Symbol 110 MovieClip {hud_mc} Frame 1Symbol 75 EditableText
"chatOutput"Symbol 110 MovieClip {hud_mc} Frame 1Symbol 77 EditableText
"ammoHolder"Symbol 110 MovieClip {hud_mc} Frame 1Symbol 78 MovieClip
"mainStatus"Symbol 110 MovieClip {hud_mc} Frame 1Symbol 85 MovieClip {a_ultrakillz_mochi_fla.mainStatusClip_185}
"timeRemaining"Symbol 110 MovieClip {hud_mc} Frame 1Symbol 91 MovieClip {a_ultrakillz_mochi_fla.timeRemainingClip_188}
"playerLives"Symbol 110 MovieClip {hud_mc} Frame 1Symbol 94 MovieClip {a_ultrakillz_mochi_fla.playerLives_191}
"opponentLives"Symbol 110 MovieClip {hud_mc} Frame 1Symbol 94 MovieClip {a_ultrakillz_mochi_fla.playerLives_191}
"livesClip1"Symbol 110 MovieClip {hud_mc} Frame 1Symbol 96 MovieClip
"livesClip2"Symbol 110 MovieClip {hud_mc} Frame 1Symbol 98 MovieClip
"health_bar"Symbol 110 MovieClip {hud_mc} Frame 1Symbol 106 MovieClip {a_ultrakillz_mochi_fla.health_bar_195}
"blood"Symbol 110 MovieClip {hud_mc} Frame 1Symbol 109 MovieClip {a_ultrakillz_mochi_fla.lense_blood_mc_199}
"btnUp"Symbol 117 MovieClip {movementKeys} Frame 1Symbol 114 MovieClip {keyboardItem}
"btnDown"Symbol 117 MovieClip {movementKeys} Frame 1Symbol 114 MovieClip {keyboardItem}
"btnLeft"Symbol 117 MovieClip {movementKeys} Frame 1Symbol 114 MovieClip {keyboardItem}
"btnRight"Symbol 117 MovieClip {movementKeys} Frame 1Symbol 114 MovieClip {keyboardItem}
"keys2"Symbol 130 MovieClip {hint_move} Frame 1Symbol 117 MovieClip {movementKeys}
"keys1"Symbol 130 MovieClip {hint_move} Frame 1Symbol 117 MovieClip {movementKeys}
"area"Symbol 151 MovieClip {uk.co.barraxworld.ui.Scrollpage} Frame 1Symbol 144 MovieClip {a_ultrakillz_mochi_fla.mask_171}
"maskmc"Symbol 151 MovieClip {uk.co.barraxworld.ui.Scrollpage} Frame 1Symbol 144 MovieClip {a_ultrakillz_mochi_fla.mask_171}
"background"Symbol 151 MovieClip {uk.co.barraxworld.ui.Scrollpage} Frame 1Symbol 146 MovieClip
"ruler"Symbol 151 MovieClip {uk.co.barraxworld.ui.Scrollpage} Frame 1Symbol 150 MovieClip
"inField"Symbol 155 MovieClip {socketDebugWindow} Frame 1Symbol 153 EditableText
"outField"Symbol 155 MovieClip {socketDebugWindow} Frame 1Symbol 154 EditableText
"flashHolder"Symbol 175 MovieClip {a_ultrakillz_mochi_fla.player_thirdperson_159} Frame 1Symbol 174 MovieClip
"flashHolder"Symbol 179 MovieClip {a_ultrakillz_mochi_fla.player_firstperson_160} Frame 1Symbol 174 MovieClip
"inner"Symbol 179 MovieClip {a_ultrakillz_mochi_fla.player_firstperson_160} Frame 1Symbol 178 MovieClip {a_ultrakillz_mochi_fla.rocket_gfx_main_161}
"gfx"Symbol 180 MovieClip {player_human} Frame 1Symbol 175 MovieClip {a_ultrakillz_mochi_fla.player_thirdperson_159}
"gfx"Symbol 180 MovieClip {player_human} Frame 3Symbol 179 MovieClip {a_ultrakillz_mochi_fla.player_firstperson_160}
"gfx"Symbol 180 MovieClip {player_human} Frame 4Symbol 179 MovieClip {a_ultrakillz_mochi_fla.player_firstperson_160}
"flame"Symbol 186 MovieClip {player_cpu} Frame 1Symbol 185 MovieClip {a_ultrakillz_mochi_fla.fire_flame_157}
"field"Symbol 214 MovieClip {btnServerSelect} Frame 1Symbol 213 EditableText
"bg"Symbol 220 MovieClip {messageOverlay} Frame 1Symbol 216 MovieClip
"field"Symbol 220 MovieClip {messageOverlay} Frame 1Symbol 219 EditableText
"field"Symbol 230 MovieClip {lobby_button} Frame 1Symbol 229 EditableText
"disconnectBtn"Symbol 232 MovieClip {lobbyView} Frame 1Symbol 223 MovieClip {a_ultrakillz_mochi_fla.lobbyBtn_140}
"createRoomBtn"Symbol 232 MovieClip {lobbyView} Frame 1Symbol 230 MovieClip {lobby_button}
"gameOptionsBtn"Symbol 232 MovieClip {lobbyView} Frame 1Symbol 230 MovieClip {lobby_button}
"lobbyOptionsBtn"Symbol 232 MovieClip {lobbyView} Frame 1Symbol 230 MovieClip {lobby_button}
"practiceBtn"Symbol 232 MovieClip {lobbyView} Frame 1Symbol 230 MovieClip {lobby_button}
"holder"Symbol 246 MovieClip {ThumbnailIcon} Frame 1Symbol 174 MovieClip
"holder"Symbol 248 MovieClip {countryThumb} Frame 1Symbol 174 MovieClip
"holder"Symbol 250 MovieClip {rankThumb} Frame 1Symbol 174 MovieClip
"field"Symbol 261 MovieClip {dropMenuItem} Frame 1Symbol 253 EditableText
"bg"Symbol 264 MovieClip {userDetailsModal} Frame 1Symbol 234 MovieClip
"bar"Symbol 264 MovieClip {userDetailsModal} Frame 1Symbol 238 MovieClip {a_ultrakillz_mochi_fla.userDetailsModalTopbar_138}
"nameField"Symbol 264 MovieClip {userDetailsModal} Frame 1Symbol 241 EditableText
"bodyField"Symbol 264 MovieClip {userDetailsModal} Frame 1Symbol 242 EditableText
"userIcon"Symbol 264 MovieClip {userDetailsModal} Frame 1Symbol 246 MovieClip {ThumbnailIcon}
"countryClip"Symbol 264 MovieClip {userDetailsModal} Frame 1Symbol 248 MovieClip {countryThumb}
"rankClip"Symbol 264 MovieClip {userDetailsModal} Frame 1Symbol 250 MovieClip {rankThumb}
"optionSilence"Symbol 264 MovieClip {userDetailsModal} Frame 1Symbol 261 MovieClip {dropMenuItem}
"closeBtn"Symbol 264 MovieClip {userDetailsModal} Frame 1Symbol 263 MovieClip
"nameField"Symbol 267 MovieClip {userDetailsPanel} Frame 1Symbol 265 EditableText
"bodyField"Symbol 267 MovieClip {userDetailsPanel} Frame 1Symbol 266 EditableText
"userIcon"Symbol 267 MovieClip {userDetailsPanel} Frame 1Symbol 246 MovieClip {ThumbnailIcon}
"countryClip"Symbol 267 MovieClip {userDetailsPanel} Frame 1Symbol 248 MovieClip {countryThumb}
"rankClip"Symbol 267 MovieClip {userDetailsPanel} Frame 1Symbol 250 MovieClip {rankThumb}
"bodyField"Symbol 271 MovieClip {localUserDetailsPanel} Frame 1Symbol 269 EditableText
"nameField"Symbol 271 MovieClip {localUserDetailsPanel} Frame 1Symbol 270 EditableText
"userIcon"Symbol 271 MovieClip {localUserDetailsPanel} Frame 1Symbol 246 MovieClip {ThumbnailIcon}
"countryClip"Symbol 271 MovieClip {localUserDetailsPanel} Frame 1Symbol 248 MovieClip {countryThumb}
"rankClip"Symbol 271 MovieClip {localUserDetailsPanel} Frame 1Symbol 250 MovieClip {rankThumb}
"field"Symbol 278 MovieClip {roomClip} Frame 1Symbol 274 EditableText
"padlock"Symbol 278 MovieClip {roomClip} Frame 1Symbol 50 MovieClip {padlock_icon}
"field"Symbol 281 MovieClip {roomErrorPanel} Frame 1Symbol 280 EditableText
"field"Symbol 286 MovieClip {roomPasswordPanel} Frame 1Symbol 282 EditableText
"quitBtn"Symbol 286 MovieClip {roomPasswordPanel} Frame 1Symbol 263 MovieClip
"mapIcon"Symbol 294 MovieClip {roomDetailsPanel} Frame 1Symbol 246 MovieClip {ThumbnailIcon}
"slotHolder"Symbol 294 MovieClip {roomDetailsPanel} Frame 1Symbol 288 MovieClip
"statusField"Symbol 294 MovieClip {roomDetailsPanel} Frame 1Symbol 289 EditableText
"mapField"Symbol 294 MovieClip {roomDetailsPanel} Frame 1Symbol 290 EditableText
"killlimitField"Symbol 294 MovieClip {roomDetailsPanel} Frame 1Symbol 291 EditableText
"timelimitField"Symbol 294 MovieClip {roomDetailsPanel} Frame 1Symbol 292 EditableText
"field"Symbol 294 MovieClip {roomDetailsPanel} Frame 1Symbol 293 EditableText
"quitBtn"Symbol 294 MovieClip {roomDetailsPanel} Frame 1Symbol 263 MovieClip
"labelField"Symbol 301 MovieClip {toggleArrows} Frame 1Symbol 295 EditableText
"titleField"Symbol 301 MovieClip {toggleArrows} Frame 1Symbol 296 EditableText
"btnDown"Symbol 301 MovieClip {toggleArrows} Frame 1Symbol 300 MovieClip {a_ultrakillz_mochi_fla.arrowBtn_125}
"btnUp"Symbol 301 MovieClip {toggleArrows} Frame 1Symbol 300 MovieClip {a_ultrakillz_mochi_fla.arrowBtn_125}
"thumbHolder"Symbol 307 MovieClip {thumbnailSelector} Frame 1Symbol 174 MovieClip
"prevBtn"Symbol 307 MovieClip {thumbnailSelector} Frame 1Symbol 300 MovieClip {a_ultrakillz_mochi_fla.arrowBtn_125}
"nextBtn"Symbol 307 MovieClip {thumbnailSelector} Frame 1Symbol 300 MovieClip {a_ultrakillz_mochi_fla.arrowBtn_125}
"field"Symbol 307 MovieClip {thumbnailSelector} Frame 1Symbol 306 EditableText
"bg"Symbol 309 MovieClip {practiceConfigPanel} Frame 1Symbol 302 MovieClip {GenericSquare}
"cancelBtn"Symbol 309 MovieClip {practiceConfigPanel} Frame 1Symbol 263 MovieClip
"submitBtn"Symbol 309 MovieClip {practiceConfigPanel} Frame 1Symbol 230 MovieClip {lobby_button}
"holder"Symbol 309 MovieClip {practiceConfigPanel} Frame 1Symbol 174 MovieClip
"mapMenu"Symbol 309 MovieClip {practiceConfigPanel} Frame 1Symbol 307 MovieClip {thumbnailSelector}
"bg"Symbol 315 MovieClip {roomConfigPanel} Frame 1Symbol 302 MovieClip {GenericSquare}
"cancelBtn"Symbol 315 MovieClip {roomConfigPanel} Frame 1Symbol 263 MovieClip
"submitBtn"Symbol 315 MovieClip {roomConfigPanel} Frame 1Symbol 230 MovieClip {lobby_button}
"holder"Symbol 315 MovieClip {roomConfigPanel} Frame 1Symbol 174 MovieClip
"mapMenu"Symbol 315 MovieClip {roomConfigPanel} Frame 1Symbol 307 MovieClip {thumbnailSelector}
"nameField"Symbol 315 MovieClip {roomConfigPanel} Frame 1Symbol 311 EditableText
"passwordField"Symbol 315 MovieClip {roomConfigPanel} Frame 1Symbol 313 EditableText
"nameField"Symbol 317 MovieClip {UserClipSmall} Frame 1Symbol 316 EditableText
"rankClip"Symbol 317 MovieClip {UserClipSmall} Frame 1Symbol 250 MovieClip {rankThumb}
"countryClip"Symbol 317 MovieClip {UserClipSmall} Frame 1Symbol 248 MovieClip {countryThumb}
"bg"Symbol 321 MovieClip {UserClip} Frame 1Symbol 318 MovieClip
"nameField"Symbol 321 MovieClip {UserClip} Frame 1Symbol 319 EditableText
"rankClip"Symbol 321 MovieClip {UserClip} Frame 1Symbol 250 MovieClip {rankThumb}
"countryClip"Symbol 321 MovieClip {UserClip} Frame 1Symbol 248 MovieClip {countryThumb}
"bg"Symbol 321 MovieClip {UserClip} Frame 5Symbol 320 MovieClip {a_ultrakillz_mochi_fla.lobby_userBtn_throb_anim_116}
"bg"Symbol 321 MovieClip {UserClip} Frame 6Symbol 318 MovieClip
"field"Symbol 324 MovieClip {UserListPanel} Frame 1Symbol 322 EditableText
"holder"Symbol 324 MovieClip {UserListPanel} Frame 1Symbol 288 MovieClip
"numField"Symbol 324 MovieClip {UserListPanel} Frame 1Symbol 323 EditableText
"logo_mc"Symbol 340 MovieClip {menuTemplate} Frame 1Symbol 334 MovieClip
"mbxBtn"Symbol 340 MovieClip {menuTemplate} Frame 1Symbol 336 Button
"ukzBtn"Symbol 340 MovieClip {menuTemplate} Frame 1Symbol 336 Button
"bg"Symbol 355 MovieClip {genericButton} Frame 1Symbol 354 MovieClip {a_ultrakillz_mochi_fla.btn_bg_6}
"field"Symbol 355 MovieClip {genericButton} Frame 1Symbol 62 EditableText
"template"Symbol 356 MovieClip {HowToPlayView} Frame 1Symbol 340 MovieClip {menuTemplate}
"btnTute"Symbol 356 MovieClip {HowToPlayView} Frame 1Symbol 355 MovieClip {genericButton}
"btnHome"Symbol 356 MovieClip {HowToPlayView} Frame 1Symbol 63 MovieClip {genericButton_small}
"template"Symbol 362 MovieClip {SyncView} Frame 1Symbol 340 MovieClip {menuTemplate}
"anim"Symbol 362 MovieClip {SyncView} Frame 1Symbol 360 MovieClip {a_ultrakillz_mochi_fla.WaitAnim_Complete_45}
"field"Symbol 362 MovieClip {SyncView} Frame 1Symbol 361 EditableText
"fill_mc"Symbol 366 MovieClip {uk.co.barraxworld.loaders.ProgressBarView} Frame 1Symbol 364 MovieClip
"template"Symbol 368 MovieClip {AssetsLoaderView} Frame 1Symbol 340 MovieClip {menuTemplate}
"progressBar"Symbol 368 MovieClip {AssetsLoaderView} Frame 1Symbol 366 MovieClip {uk.co.barraxworld.loaders.ProgressBarView}
"anim"Symbol 368 MovieClip {AssetsLoaderView} Frame 1Symbol 360 MovieClip {a_ultrakillz_mochi_fla.WaitAnim_Complete_45}
"field"Symbol 368 MovieClip {AssetsLoaderView} Frame 1Symbol 367 EditableText
"bg"Symbol 385 MovieClip {OptionsView} Frame 1Symbol 371 MovieClip
"template"Symbol 385 MovieClip {OptionsView} Frame 1Symbol 340 MovieClip {menuTemplate}
"btn"Symbol 385 MovieClip {OptionsView} Frame 1Symbol 63 MovieClip {genericButton_small}
"mouseInvertCB"Symbol 385 MovieClip {OptionsView} Frame 1Symbol 379 MovieClip {checkbox}
"soundOnCB"Symbol 385 MovieClip {OptionsView} Frame 1Symbol 379 MovieClip {checkbox}
"effectsLevelCB"Symbol 385 MovieClip {OptionsView} Frame 1Symbol 379 MovieClip {checkbox}
"template"Symbol 389 MovieClip {LevelSummaryView} Frame 1Symbol 340 MovieClip {menuTemplate}
"titleField"Symbol 389 MovieClip {LevelSummaryView} Frame 1Symbol 388 EditableText
"template"Symbol 392 MovieClip {LevelSelectView} Frame 1Symbol 340 MovieClip {menuTemplate}
"unlockedMC"Symbol 392 MovieClip {LevelSelectView} Frame 1Symbol 391 MovieClip
"backBtn"Symbol 392 MovieClip {LevelSelectView} Frame 1Symbol 63 MovieClip {genericButton_small}
"template"Symbol 393 MovieClip {DifficultyView} Frame 1Symbol 340 MovieClip {menuTemplate}
"backBtn"Symbol 393 MovieClip {DifficultyView} Frame 1Symbol 63 MovieClip {genericButton_small}
"holder"Symbol 396 MovieClip {HighscoresView} Frame 1Symbol 395 MovieClip
"template"Symbol 400 MovieClip {HomeView} Frame 1Symbol 340 MovieClip {menuTemplate}
"field"Symbol 403 MovieClip {uk.co.barraxworld.game.engine3D.characters.PlayerIdentity} Frame 1Symbol 401 EditableText
"titleField"Symbol 420 MovieClip {uk.co.barraxworld.game.projects.ultrakillz.views.SummaryView} Frame 1Symbol 418 EditableText
"nextBtn"Symbol 420 MovieClip {uk.co.barraxworld.game.projects.ultrakillz.views.SummaryView} Frame 1Symbol 355 MovieClip {genericButton}
"msgField"Symbol 420 MovieClip {uk.co.barraxworld.game.projects.ultrakillz.views.SummaryView} Frame 1Symbol 419 EditableText
"iconHolder"Symbol 423 MovieClip {uk.co.barraxworld.game.shooter.PowerupPickupIcon} Frame 1Symbol 174 MovieClip
"iconHolder"Symbol 424 MovieClip {uk.co.barraxworld.game.shooter.WeaponPickupIcon} Frame 1Symbol 174 MovieClip
"bg"Symbol 431 MovieClip {uk.co.barraxworld.game.shooter.WeaponMenuIcon} Frame 1Symbol 427 MovieClip
"field"Symbol 431 MovieClip {uk.co.barraxworld.game.shooter.WeaponMenuIcon} Frame 1Symbol 428 EditableText
"holder"Symbol 461 MovieClip {scoreTable} Frame 1Symbol 174 MovieClip
"contents"Symbol 465 MovieClip {a_ultrakillz_mochi_fla.Spritesheet_explosion_72} Frame 1Symbol 464 MovieClip
"sheet"Symbol 466 MovieClip {explosion} Frame 1Symbol 465 MovieClip {a_ultrakillz_mochi_fla.Spritesheet_explosion_72}
"contents"Symbol 470 MovieClip {a_ultrakillz_mochi_fla.spriteSheet_smoke_69} Frame 1Symbol 469 MovieClip
"sheet"Symbol 471 MovieClip {trail} Frame 1Symbol 470 MovieClip {a_ultrakillz_mochi_fla.spriteSheet_smoke_69}
"contents"Symbol 475 MovieClip {a_ultrakillz_mochi_fla.spriteSheet_character_strafe_66} Frame 1Symbol 474 MovieClip
"sheet"Symbol 476 MovieClip {characterStrafeAnim} Frame 1Symbol 475 MovieClip {a_ultrakillz_mochi_fla.spriteSheet_character_strafe_66}
"contents"Symbol 480 MovieClip {a_ultrakillz_mochi_fla.spriteSheet_character_walk_63} Frame 1Symbol 479 MovieClip
"sheet"Symbol 481 MovieClip {characterWalkAnim} Frame 1Symbol 480 MovieClip {a_ultrakillz_mochi_fla.spriteSheet_character_walk_63}
"contents"Symbol 485 MovieClip {a_ultrakillz_mochi_fla.spriteSheet_blood_60} Frame 1Symbol 484 MovieClip
"sheet"Symbol 486 MovieClip {blood} Frame 1Symbol 485 MovieClip {a_ultrakillz_mochi_fla.spriteSheet_blood_60}
"nameField"Symbol 491 MovieClip {ScoreTableItem} Frame 1Symbol 489 EditableText
"killsField"Symbol 491 MovieClip {ScoreTableItem} Frame 1Symbol 490 EditableText
"template"Symbol 492 MovieClip {ServerView} Frame 1Symbol 340 MovieClip {menuTemplate}
"holder"Symbol 500 MovieClip {a_ultrakillz_mochi_fla.adHolder_48} Frame 1Symbol 174 MovieClip
"msgField"Symbol 501 MovieClip {InterludeView} Frame 1Symbol 497 EditableText
"adHolder"Symbol 501 MovieClip {InterludeView} Frame 1Symbol 500 MovieClip {a_ultrakillz_mochi_fla.adHolder_48}
"field"Symbol 512 MovieClip {button2_complete} Frame 1Symbol 511 EditableText
"bar"Symbol 520 MovieClip {rankStatusView} Frame 1Symbol 366 MovieClip {uk.co.barraxworld.loaders.ProgressBarView}
"field1"Symbol 520 MovieClip {rankStatusView} Frame 1Symbol 515 EditableText
"field2"Symbol 520 MovieClip {rankStatusView} Frame 1Symbol 516 EditableText
"thumb1"Symbol 520 MovieClip {rankStatusView} Frame 1Symbol 250 MovieClip {rankThumb}
"thumb2"Symbol 520 MovieClip {rankStatusView} Frame 1Symbol 250 MovieClip {rankThumb}
"field3"Symbol 520 MovieClip {rankStatusView} Frame 1Symbol 517 EditableText
"btn"Symbol 520 MovieClip {rankStatusView} Frame 1Symbol 512 MovieClip {button2_complete}
"fieldMin"Symbol 520 MovieClip {rankStatusView} Frame 1Symbol 518 EditableText
"fieldMax"Symbol 520 MovieClip {rankStatusView} Frame 1Symbol 519 EditableText
"footer"Symbol 535 MovieClip {dropMenu} Frame 1Symbol 530 MovieClip
"top"Symbol 535 MovieClip {dropMenu} Frame 1Symbol 532 MovieClip
"bg"Symbol 535 MovieClip {dropMenu} Frame 1Symbol 534 MovieClip
"fill"Symbol 541 MovieClip {opponentHealthBar} Frame 1Symbol 540 MovieClip
"maskMC"Symbol 553 MovieClip {a_ultrakillz_mochi_fla.levelSelectThumb_hidden_18} Frame 1Symbol 551 MovieClip
"holder"Symbol 554 MovieClip {levelSelectThumb} Frame 1Symbol 174 MovieClip
"maskMC"Symbol 554 MovieClip {levelSelectThumb} Frame 1Symbol 551 MovieClip
"hideMC"Symbol 554 MovieClip {levelSelectThumb} Frame 1Symbol 553 MovieClip {a_ultrakillz_mochi_fla.levelSelectThumb_hidden_18}
"completed"Symbol 554 MovieClip {levelSelectThumb} Frame 1Symbol 45 MovieClip
"field"Symbol 557 MovieClip {a_ultrakillz_mochi_fla.tutorial_bodyClip_13} Frame 1Symbol 556 EditableText
"bodyClip"Symbol 559 MovieClip {tutorialClip} Frame 1Symbol 557 MovieClip {a_ultrakillz_mochi_fla.tutorial_bodyClip_13}
"titleField"Symbol 559 MovieClip {tutorialClip} Frame 1Symbol 558 EditableText
"nextBtn"Symbol 559 MovieClip {tutorialClip} Frame 1Symbol 63 MovieClip {genericButton_small}
"field"Symbol 561 MovieClip {button_arrow} Frame 1Symbol 62 EditableText
"titleField"Symbol 565 MovieClip {alertView} Frame 1Symbol 563 EditableText
"bodyField"Symbol 565 MovieClip {alertView} Frame 1Symbol 564 EditableText
"btn1"Symbol 565 MovieClip {alertView} Frame 1Symbol 355 MovieClip {genericButton}
"titleField"Symbol 568 MovieClip {confirmView} Frame 1Symbol 566 EditableText
"bodyField"Symbol 568 MovieClip {confirmView} Frame 1Symbol 567 EditableText
"btn1"Symbol 568 MovieClip {confirmView} Frame 1Symbol 355 MovieClip {genericButton}
"btn2"Symbol 568 MovieClip {confirmView} Frame 1Symbol 355 MovieClip {genericButton}
"field1"Symbol 572 MovieClip {roundSummary_tallyItem} Frame 1Symbol 570 EditableText
"field2"Symbol 572 MovieClip {roundSummary_tallyItem} Frame 1Symbol 571 EditableText
"field"Symbol 576 MovieClip {highscoresNamePanel} Frame 1Symbol 575 EditableText
"btn"Symbol 576 MovieClip {highscoresNamePanel} Frame 1Symbol 355 MovieClip {genericButton}

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS3.
Protect (24)Timeline Frame 10 bytes ""
Tag 0x0FF (255)Timeline Frame 11 bytes " "

Labels

"locked"Symbol 51 MovieClip {level_thumbnail} Frame 2
"_up"Symbol 59 MovieClip {arrowBtn} Frame 1
"_over"Symbol 59 MovieClip {arrowBtn} Frame 2
"_down"Symbol 59 MovieClip {arrowBtn} Frame 3
"_up"Symbol 63 MovieClip {genericButton_small} Frame 1
"_over"Symbol 63 MovieClip {genericButton_small} Frame 2
"_down"Symbol 63 MovieClip {genericButton_small} Frame 3
"_up"Symbol 66 MovieClip {small_button} Frame 1
"_over"Symbol 66 MovieClip {small_button} Frame 2
"show"Symbol 109 MovieClip {a_ultrakillz_mochi_fla.lense_blood_mc_199} Frame 2
"loop"Symbol 142 MovieClip {hint_fireWeapon} Frame 95
"thirdperson"Symbol 180 MovieClip {player_human} Frame 2
"firstperson"Symbol 180 MovieClip {player_human} Frame 3
"zoomed"Symbol 180 MovieClip {player_human} Frame 4
"death"Symbol 180 MovieClip {player_human} Frame 5
"_up"Symbol 223 MovieClip {a_ultrakillz_mochi_fla.lobbyBtn_140} Frame 1
"_over"Symbol 223 MovieClip {a_ultrakillz_mochi_fla.lobbyBtn_140} Frame 2
"_up"Symbol 230 MovieClip {lobby_button} Frame 1
"_over"Symbol 230 MovieClip {lobby_button} Frame 2
"pulsate"Symbol 230 MovieClip {lobby_button} Frame 11
"_up"Symbol 238 MovieClip {a_ultrakillz_mochi_fla.userDetailsModalTopbar_138} Frame 1
"_over"Symbol 238 MovieClip {a_ultrakillz_mochi_fla.userDetailsModalTopbar_138} Frame 2
"_up"Symbol 278 MovieClip {roomClip} Frame 1
"_over"Symbol 278 MovieClip {roomClip} Frame 2
"_down"Symbol 278 MovieClip {roomClip} Frame 3
"ranked"Symbol 278 MovieClip {roomClip} Frame 4
"rankedSelected"Symbol 278 MovieClip {roomClip} Frame 5
"sending"Symbol 286 MovieClip {roomPasswordPanel} Frame 2
"fail"Symbol 286 MovieClip {roomPasswordPanel} Frame 3
"_up"Symbol 300 MovieClip {a_ultrakillz_mochi_fla.arrowBtn_125} Frame 1
"_over"Symbol 300 MovieClip {a_ultrakillz_mochi_fla.arrowBtn_125} Frame 2
"_up"Symbol 317 MovieClip {UserClipSmall} Frame 1
"_over"Symbol 317 MovieClip {UserClipSmall} Frame 2
"_down"Symbol 317 MovieClip {UserClipSmall} Frame 3
"localUser"Symbol 317 MovieClip {UserClipSmall} Frame 4
"_up"Symbol 321 MovieClip {UserClip} Frame 1
"_over"Symbol 321 MovieClip {UserClip} Frame 2
"_down"Symbol 321 MovieClip {UserClip} Frame 3
"localUser"Symbol 321 MovieClip {UserClip} Frame 4
"clickMe"Symbol 321 MovieClip {UserClip} Frame 5
"waiting"Symbol 321 MovieClip {UserClip} Frame 6
"_up"Symbol 355 MovieClip {genericButton} Frame 1
"_over"Symbol 355 MovieClip {genericButton} Frame 2
"_down"Symbol 355 MovieClip {genericButton} Frame 3
"loop"Symbol 360 MovieClip {a_ultrakillz_mochi_fla.WaitAnim_Complete_45} Frame 21
"_up"Symbol 431 MovieClip {uk.co.barraxworld.game.shooter.WeaponMenuIcon} Frame 1
"_over"Symbol 431 MovieClip {uk.co.barraxworld.game.shooter.WeaponMenuIcon} Frame 2
"_down"Symbol 431 MovieClip {uk.co.barraxworld.game.shooter.WeaponMenuIcon} Frame 3
"_up"Symbol 512 MovieClip {button2_complete} Frame 1
"_over"Symbol 512 MovieClip {button2_complete} Frame 2
"_up"Symbol 549 MovieClip {quitGameBtn} Frame 1
"_up"Symbol 554 MovieClip {levelSelectThumb} Frame 1
"_over"Symbol 554 MovieClip {levelSelectThumb} Frame 2
"_up"Symbol 561 MovieClip {button_arrow} Frame 1
"_over"Symbol 561 MovieClip {button_arrow} Frame 2




http://swfchan.com/45/220185/info.shtml
Created: 23/6 -2019 09:44:21 Last modified: 23/6 -2019 09:44:21 Server time: 22/12 -2024 13:30:21