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

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

Space-Rescue.swf

This is the info page for
Flash #111216

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


Text
LOADING...

<p align="center"><font face="DIN" size="14" color="#ffffff" letterSpacing="0.000000" kerning="1">85%</font></p>

RANK

SCORE

USERNAME

COUNTRY

HIGH SCORES

<p align="center"><font face="DINBoldNew" size="11" color="#4eaab9" letterSpacing="0.250000" kerning="1">name</font></p>

<p align="center"><font face="DINBoldNew" size="12" color="#4eaab9" letterSpacing="0.250000" kerning="1">1</font></p>

<p align="center"><font face="DINBoldNew" size="12" color="#f141a3" letterSpacing="0.250000" kerning="1">00000000000</font></p>

HI, ARE YOU?

OR

AUSSIE

KIWI

VISIT THE SEEK WEBSITE  |  CREDITS

START GAME

SEND TO FRIEND

SHARE

HOW TO PLAY

HIGH SCORES

SEEK MORE GAMES

SUMMARY

YOUR PERFORMANCE REVIEW

You work impressively under pressure, exemplifying many of
the finest aspects of a search & rescue professional . Bravo!

You achieved outstanding results even when facing major
obstacles, such as alien tentacles and black holes. Top show!

Your tasks were performed with a commitment to excellence and
professional assurance that is rare. Top notch!

Your  space rescue performance reflects
high professional standards and a mature,
responsible nature. Well done.

You’ve kept current with the latest hazard-
avoidance techniques to ensure the safety
of your tourists. Good show.

You’re a self-starter who accepts responsibility willingly and
takes a professional approach to space rescue. Solid effort.

You have difficulty prioritising your work tasks in
a timely fashion, often resulting in fiery fatalities.

While you demonstrate potential, you currently
lack the experience needed to lead search &
rescue missions of this importance.

Until our missing space tourists were
prematurely condemned to a gravity-free tomb,
we thought you were doing rather well.

You seem to exhibit a ‘crash or crash-
through’ approach to the task at hand .
Unfortunately, you crashed…a lot.

You failed to demonstrate the skills and
initiative necessary to successfully excel in
such a demanding role.

If you wish to further pursue a career in this field of work,
you must hone a sharper sense of self-preservation.

SCORE:

<p align="left"><font face="DIN" size="24" color="#f241a4" letterSpacing="0.500000" kerning="1">0</font></p>

PLAY AGAIN

SUBMIT SCORE

Privacy Policy

USERNAME:

<p align="left"><font face="DINBoldNew" size="12" color="#ffffff" letterSpacing="0.200000" kerning="1">Larry David</font></p>

<p align="left"><font face="DINBoldNew" size="11" color="#ffffff" letterSpacing="0.200000" kerning="1">larrydavid@gmail.com</font></p>

EMAIL:

YOUR SCORE:

PLAYER DETAILS

<p align="left"><font face="DINBoldNew" size="21" color="#f241a4" letterSpacing="0.500000" kerning="1">1,280</font></p>

SUBMITTING

Terms & Conditions

FIRST NAME:

SURNAME:

<p align="left"><font face="DINBoldNew" size="12" color="#ffffff" letterSpacing="0.200000" kerning="1">Larry</font></p>

<p align="left"><font face="DINBoldNew" size="12" color="#ffffff" letterSpacing="0.200000" kerning="1">David</font></p>

SUBMIT SCORE

NEXT

HOW TO PLAY

AIM OF THE GAME

You must rescue every stranded space
tourist to complete a mission.
They may be spread out over large areas.

NAVIGATION

Use the Head Up Display to locate
space tourists and monitor your
shield and fuel levels.

7853504

08 / 30

04:35

IN ASSOCIATION WITH

DESIGNED AND BUILT BY

CREDITS

SELECT A LEVEL

<p align="center"></p>

Best Score:

<p align="left"><font face="DIN" size="11" color="#000000" letterSpacing="0.000000" kerning="1">535,998,00</font></p>

<p align="center"><font face="LasVegas-Jackpot" size="32" color="#ffffff" letterSpacing="0.000000" kerning="1">01</font></p>

<p align="center"></p>

BROUGHT TO YOU BY

X

GAME CONTROLS

OR

A

FORWARD

Z

REVERSE

SPACEBAR

FIRE

MOUSE TO TURN &
LEFT CLICK TO FIRE

ROTATE
LEFT

ROTATE
RIGHT

PREVIOUS

DANGEROUS ENEMIES

Avoid space hazards, including
meteors, pirate UFOs, and turrets.

BONUS & POWER UP

Collect bonus items to recharge
fuel, boost energy and improve
firepower.

PRESS THE MOUSEBUTTON OR SPACEBAR TO CONTINUE

SHIP CONTROLS

LEVEL COMPLETE

LEVEL SCORE

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

TOTAL SCORE

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

TIME

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

BONUS

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

<p align="left"><font face="DIN" size="12" color="#ffffff" letterSpacing="0.000000" kerning="1">00:00</font></p>

<p align="left"><font face="DIN" size="12" color="#ffffff" letterSpacing="0.000000" kerning="1">9 / 12</font></p>

<p align="left"><font face="DIN" size="12" color="#ffffff" letterSpacing="0.000000" kerning="1">10000000</font></p>

<p align="left"><font face="LasVegas-Jackpot" size="100" color="#ffffff" letterSpacing="0.000000" kerning="1">01</font></p>

<p align="center"><font face="LasVegas-Jackpot" size="50" color="#ffffff" letterSpacing="0.000000" kerning="1">01</font></p>

REALLY QUIT?

YES

NO

MAIN MENU

<p align="center"><font face="DINBoldNew" size="20" color="#ffffff" letterSpacing="0.000000" kerning="1">+100000</font></p>

RESCUE THIS TRAVELLER

THE MISSION OBJECTIVES ARE TO SAFELY
FIND AND BEAM ABOARD SPACE TRAVELLERS.
THE CIRCULAR NAVIGATION INSTRUMENT IN
THE LOWER LEFT HELPS YOU LOCATE THEM.

UPGRADES

OUTER SPACE CAN BE HAZARDOUS. KEEP YOUR EYE
OUT FOR ITEMS THAT CAN ENHANCE YOUR SHIP.

COLLECT ENERGY CRYSTALS

MAKE SURE YOU KEEP YOUR FUEL AND
SHIELDS TOPPED UP BY FINDING AND
COLLECTING ENERGY CRYSTALS.
SHIELD AND FUEL LEVELS ARE DISPLAYED IN
THE HUD (HEAD UP DISPLAY) IN THE LOWER
LEFT CORNER OF THE SCREEN.

SOME ENERGY CRYSTALS ARE LODGED INSIDE
ASTEROIDS. SHOOT THESE TO BREAK THEM APART.

WELCOME TO PILOT TRAINING

TAKE A MOMENT TO GET FAMILIAR WITH SHIP CONTROL.
YOU CAN FLY FORWARDS OR BACKWARDS ACCORDING TO
THE DIRECTION YOU'RE FACING.

WHEN READY, FLY TO THE RIGHT TO CONTINUE.

FIRE ALL WEAPONS!

THAT SPACE TRAVELLER IS TRAPPED
BEHIND BLUE ASTEROIDS. THEY CAN
BE BROKEN APART BY SHOOTING THEM.

TRIPLE SHOT

COLLECT UPGRADES LIKE THIS ONE TO GREATLY
IMPROVE YOUR SHIP'S WEAPON FOR THE MISSION.

COLLECT THESE FOR
LARGE FUEL REFILLS

GOOD LUCK COMMANDER!

YOU'RE ON YOUR OWN. FIND THE SPACE TRAVELLERS, AND
WATCH OUT FOR THE MANY PERILS OF OUTER SPACE.

ActionScript [AS3]

Section 1
//mc_415 (assets_fla.mc_415) package assets_fla { import flash.display.*; public dynamic class mc_415 extends MovieClip { public function mc_415(){ addFrameScript(33, this.frame34); } function frame34(){ stop(); } } }//package assets_fla
Section 2
//ui_240 (assets_fla.ui_240) package assets_fla { import flash.display.*; public dynamic class ui_240 extends MovieClip { public var _sign:MovieClip; public function ui_240(){ addFrameScript(39, this.frame40); } function frame40(){ stop(); } } }//package assets_fla
Section 3
//ui_259 (assets_fla.ui_259) package assets_fla { import flash.display.*; public dynamic class ui_259 extends MovieClip { public function ui_259(){ addFrameScript(192, this.frame193); } function frame193(){ gotoAndPlay("loop"); } } }//package assets_fla
Section 4
//ui_285 (assets_fla.ui_285) package assets_fla { import flash.display.*; public dynamic class ui_285 extends MovieClip { public function ui_285(){ addFrameScript(163, this.frame164); } function frame164(){ stop(); } } }//package assets_fla
Section 5
//CampaignInfo (com.google.analytics.campaign.CampaignInfo) package com.google.analytics.campaign { import com.google.analytics.utils.*; public class CampaignInfo { private var _new:Boolean; private var _empty:Boolean; public function CampaignInfo(empty:Boolean=true, newCampaign:Boolean=false){ super(); _empty = empty; _new = newCampaign; } public function toURLString():String{ var v:Variables = toVariables(); return (v.toString()); } public function isNew():Boolean{ return (_new); } public function get utmcn():String{ return ("1"); } public function isEmpty():Boolean{ return (_empty); } public function toVariables():Variables{ var variables:Variables = new Variables(); variables.URIencode = true; if (((!(isEmpty())) && (isNew()))){ variables.utmcn = utmcn; }; if (((!(isEmpty())) && (!(isNew())))){ variables.utmcr = utmcr; }; return (variables); } public function get utmcr():String{ return ("1"); } } }//package com.google.analytics.campaign
Section 6
//CampaignKey (com.google.analytics.campaign.CampaignKey) package com.google.analytics.campaign { public class CampaignKey { public var UCMD:String;// = "utm_medium" public var UCID:String;// = "utm_id" public var UCTR:String;// = "utm_term" public var UCSR:String;// = "utm_source" public var UCNO:String;// = "utm_nooverride" public var UCCN:String;// = "utm_campaign" public var UGCLID:String;// = "gclid" public var UCCT:String;// = "utm_content" public function CampaignKey(){ super(); } } }//package com.google.analytics.campaign
Section 7
//CampaignManager (com.google.analytics.campaign.CampaignManager) package com.google.analytics.campaign { import com.google.analytics.core.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import com.google.analytics.utils.*; public class CampaignManager { private var _config:Configuration; private var _domainHash:Number; private var _debug:DebugConfiguration; private var _timeStamp:Number; private var _referrer:String; private var _buffer:Buffer; public static const trackingDelimiter:String = "|"; public function CampaignManager(config:Configuration, debug:DebugConfiguration, buffer:Buffer, domainHash:Number, referrer:String, timeStamp:Number){ super(); _config = config; _debug = debug; _buffer = buffer; _domainHash = domainHash; _referrer = referrer; _timeStamp = timeStamp; } public function getCampaignInformation(search:String, noSessionInformation:Boolean):CampaignInfo{ var campaignTracker:CampaignTracker; var oldTracker:CampaignTracker; var sessionCount:int; var campInfo:CampaignInfo = new CampaignInfo(); var duplicateCampaign:Boolean; var campNoOverride:Boolean; var responseCount:int; if (((_config.allowLinker) && (_buffer.isGenuine()))){ if (!_buffer.hasUTMZ()){ return (campInfo); }; }; campaignTracker = getTrackerFromSearchString(search); if (isValid(campaignTracker)){ campNoOverride = hasNoOverride(search); if (((campNoOverride) && (!(_buffer.hasUTMZ())))){ return (campInfo); }; }; if (!isValid(campaignTracker)){ campaignTracker = getOrganicCampaign(); if (((!(_buffer.hasUTMZ())) && (isIgnoredKeyword(campaignTracker)))){ return (campInfo); }; }; if (((!(isValid(campaignTracker))) && (noSessionInformation))){ campaignTracker = getReferrerCampaign(); if (((!(_buffer.hasUTMZ())) && (isIgnoredReferral(campaignTracker)))){ return (campInfo); }; }; if (!isValid(campaignTracker)){ if (((!(_buffer.hasUTMZ())) && (noSessionInformation))){ campaignTracker = getDirectCampaign(); }; }; if (!isValid(campaignTracker)){ return (campInfo); }; if (((_buffer.hasUTMZ()) && (!(_buffer.utmz.isEmpty())))){ oldTracker = new CampaignTracker(); oldTracker.fromTrackerString(_buffer.utmz.campaignTracking); duplicateCampaign = (oldTracker.toTrackerString() == campaignTracker.toTrackerString()); responseCount = _buffer.utmz.responseCount; }; if (((!(duplicateCampaign)) || (noSessionInformation))){ sessionCount = _buffer.utma.sessionCount; responseCount++; if (sessionCount == 0){ sessionCount = 1; }; _buffer.utmz.domainHash = _domainHash; _buffer.utmz.campaignCreation = _timeStamp; _buffer.utmz.campaignSessions = sessionCount; _buffer.utmz.responseCount = responseCount; _buffer.utmz.campaignTracking = campaignTracker.toTrackerString(); _debug.info(_buffer.utmz.toString(), VisualDebugMode.geek); campInfo = new CampaignInfo(false, true); } else { campInfo = new CampaignInfo(false, false); }; return (campInfo); } public function hasNoOverride(search:String):Boolean{ var key:CampaignKey = _config.campaignKey; if (search == ""){ return (false); }; var variables:Variables = new Variables(search); var value:String = ""; if (variables.hasOwnProperty(key.UCNO)){ value = variables[key.UCNO]; switch (value){ case "1": return (true); case "": case "0": default: return (false); }; }; return (false); } public function getTrackerFromSearchString(search:String):CampaignTracker{ var organicCampaign:CampaignTracker = getOrganicCampaign(); var camp:CampaignTracker = new CampaignTracker(); var key:CampaignKey = _config.campaignKey; if (search == ""){ return (camp); }; var variables:Variables = new Variables(search); if (variables.hasOwnProperty(key.UCID)){ camp.id = variables[key.UCID]; }; if (variables.hasOwnProperty(key.UCSR)){ camp.source = variables[key.UCSR]; }; if (variables.hasOwnProperty(key.UGCLID)){ camp.clickId = variables[key.UGCLID]; }; if (variables.hasOwnProperty(key.UCCN)){ camp.name = variables[key.UCCN]; } else { camp.name = "(not set)"; }; if (variables.hasOwnProperty(key.UCMD)){ camp.medium = variables[key.UCMD]; } else { camp.medium = "(not set)"; }; if (variables.hasOwnProperty(key.UCTR)){ camp.term = variables[key.UCTR]; } else { if (((organicCampaign) && (!((organicCampaign.term == ""))))){ camp.term = organicCampaign.term; }; }; if (variables.hasOwnProperty(key.UCCT)){ camp.content = variables[key.UCCT]; }; return (camp); } public function getOrganicCampaign():CampaignTracker{ var camp:CampaignTracker; var tmp:Array; var currentOrganicSource:OrganicReferrer; var keyword:String; if (((isInvalidReferrer(_referrer)) || (isFromGoogleCSE(_referrer, _config)))){ return (camp); }; var ref:URL = new URL(_referrer); var name:String = ""; if (ref.hostName != ""){ if (ref.hostName.indexOf(".") > -1){ tmp = ref.hostName.split("."); switch (tmp.length){ case 2: name = tmp[0]; break; case 3: name = tmp[1]; break; }; }; }; if (_config.organic.match(name)){ currentOrganicSource = _config.organic.getReferrerByName(name); keyword = _config.organic.getKeywordValue(currentOrganicSource, ref.search); camp = new CampaignTracker(); camp.source = currentOrganicSource.engine; camp.name = "(organic)"; camp.medium = "organic"; camp.term = keyword; }; return (camp); } public function getDirectCampaign():CampaignTracker{ var camp:CampaignTracker = new CampaignTracker(); camp.source = "(direct)"; camp.name = "(direct)"; camp.medium = "(none)"; return (camp); } public function isIgnoredKeyword(tracker:CampaignTracker):Boolean{ if (((tracker) && ((tracker.medium == "organic")))){ return (_config.organic.isIgnoredKeyword(tracker.term)); }; return (false); } public function isIgnoredReferral(tracker:CampaignTracker):Boolean{ if (((tracker) && ((tracker.medium == "referral")))){ return (_config.organic.isIgnoredReferral(tracker.source)); }; return (false); } public function isValid(tracker:CampaignTracker):Boolean{ if (((tracker) && (tracker.isValid()))){ return (true); }; return (false); } public function getReferrerCampaign():CampaignTracker{ var camp:CampaignTracker; if (((isInvalidReferrer(_referrer)) || (isFromGoogleCSE(_referrer, _config)))){ return (camp); }; var ref:URL = new URL(_referrer); var hostname:String = ref.hostName; var content:String = ref.path; if (hostname.indexOf("www.") == 0){ hostname = hostname.substr(4); }; camp = new CampaignTracker(); camp.source = hostname; camp.name = "(referral)"; camp.medium = "referral"; camp.content = content; return (camp); } public static function isInvalidReferrer(referrer:String):Boolean{ var url:URL; if ((((((referrer == "")) || ((referrer == "-")))) || ((referrer == "0")))){ return (true); }; if (referrer.indexOf("://") > -1){ url = new URL(referrer); if ((((url.protocol == Protocols.file)) || ((url.protocol == Protocols.none)))){ return (true); }; }; return (false); } public static function isFromGoogleCSE(referrer:String, config:Configuration):Boolean{ var url:URL = new URL(referrer); if (url.hostName.indexOf(config.google) > -1){ if (url.search.indexOf((config.googleSearchParam + "=")) > -1){ if (url.path == ("/" + config.googleCsePath)){ return (true); }; }; }; return (false); } } }//package com.google.analytics.campaign
Section 8
//CampaignTracker (com.google.analytics.campaign.CampaignTracker) package com.google.analytics.campaign { import com.google.analytics.utils.*; public class CampaignTracker { public var content:String; public var source:String; public var clickId:String; public var name:String; public var term:String; public var medium:String; public var id:String; public function CampaignTracker(id:String="", source:String="", clickId:String="", name:String="", medium:String="", term:String="", content:String=""){ super(); this.id = id; this.source = source; this.clickId = clickId; this.name = name; this.medium = medium; this.term = term; this.content = content; } public function isValid():Boolean{ if (((((!((id == ""))) || (!((source == ""))))) || (!((clickId == ""))))){ return (true); }; return (false); } public function toTrackerString():String{ var data:Array = []; _addIfNotEmpty(data, "utmcid=", id); _addIfNotEmpty(data, "utmcsr=", source); _addIfNotEmpty(data, "utmgclid=", clickId); _addIfNotEmpty(data, "utmccn=", name); _addIfNotEmpty(data, "utmcmd=", medium); _addIfNotEmpty(data, "utmctr=", term); _addIfNotEmpty(data, "utmcct=", content); return (data.join(CampaignManager.trackingDelimiter)); } private function _addIfNotEmpty(arr:Array, field:String, value:String):void{ if (value != ""){ value = value.split("+").join("%20"); value = value.split(" ").join("%20"); arr.push((field + value)); }; } public function fromTrackerString(tracker:String):void{ var data:String = tracker.split(CampaignManager.trackingDelimiter).join("&"); var vars:Variables = new Variables(data); if (vars.hasOwnProperty("utmcid")){ this.id = vars["utmcid"]; }; if (vars.hasOwnProperty("utmcsr")){ this.source = vars["utmcsr"]; }; if (vars.hasOwnProperty("utmccn")){ this.name = vars["utmccn"]; }; if (vars.hasOwnProperty("utmcmd")){ this.medium = vars["utmcmd"]; }; if (vars.hasOwnProperty("utmctr")){ this.term = vars["utmctr"]; }; if (vars.hasOwnProperty("utmcct")){ this.content = vars["utmcct"]; }; if (vars.hasOwnProperty("utmgclid")){ this.clickId = vars["utmgclid"]; }; } } }//package com.google.analytics.campaign
Section 9
//BrowserInfo (com.google.analytics.core.BrowserInfo) package com.google.analytics.core { import com.google.analytics.v4.*; import com.google.analytics.utils.*; public class BrowserInfo { private var _config:Configuration; private var _info:Environment; public function BrowserInfo(config:Configuration, info:Environment){ super(); _config = config; _info = info; } public function get utmul():String{ return (_info.language.toLowerCase()); } public function get utmje():String{ return ("0"); } public function toURLString():String{ var v:Variables = toVariables(); return (v.toString()); } public function get utmsr():String{ return (((_info.screenWidth + "x") + _info.screenHeight)); } public function get utmfl():String{ var v:Version; if (_config.detectFlash){ v = _info.flashVersion; return (((((v.major + ".") + v.minor) + " r") + v.build)); }; return ("-"); } public function get utmcs():String{ return (_info.languageEncoding); } public function toVariables():Variables{ var variables:Variables = new Variables(); variables.URIencode = true; variables.utmcs = utmcs; variables.utmsr = utmsr; variables.utmsc = utmsc; variables.utmul = utmul; variables.utmje = utmje; variables.utmfl = utmfl; return (variables); } public function get utmsc():String{ return ((_info.screenColorDepth + "-bit")); } } }//package com.google.analytics.core
Section 10
//Buffer (com.google.analytics.core.Buffer) package com.google.analytics.core { import flash.events.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import flash.net.*; import com.google.analytics.data.*; public dynamic class Buffer { private var _SO:SharedObject; private var _data:Object; private var _OBJ:Object; private var _utmb:UTMB; private var _utmc:UTMC; private var _utma:UTMA; private var _debug:DebugConfiguration; private var _utmk:UTMK; private var _config:Configuration; private var _utmv:UTMV; private var _utmx:UTMX; private var _utmz:UTMZ; private var _volatile:Boolean; public function Buffer(config:Configuration, debug:DebugConfiguration, volatile:Boolean=false, data:Object=null){ var prop:String; super(); _config = config; _debug = debug; _data = data; _volatile = volatile; if (_volatile){ _OBJ = new Object(); if (_data){ for (prop in _data) { _OBJ[prop] = _data[prop]; }; }; }; } public function save():void{ var flushStatus:String; if (!isVolatile()){ flushStatus = null; flushStatus = _SO.flush(); //unresolved jump var _slot1 = e; _debug.warning("Error...Could not write SharedObject to disk"); switch (flushStatus){ case SharedObjectFlushStatus.PENDING: _debug.info("Requesting permission to save object..."); _SO.addEventListener(NetStatusEvent.NET_STATUS, _onFlushStatus); break; case SharedObjectFlushStatus.FLUSHED: _debug.info("Value flushed to disk."); break; }; }; } public function get utmv():UTMV{ if (!hasUTMV()){ _createUMTV(); }; return (_utmv); } public function get utmx():UTMX{ if (!hasUTMX()){ _createUMTX(); }; return (_utmx); } public function get utmz():UTMZ{ if (!hasUTMZ()){ _createUMTZ(); }; return (_utmz); } public function hasUTMA():Boolean{ if (_utma){ return (true); }; return (false); } public function hasUTMB():Boolean{ if (_utmb){ return (true); }; return (false); } public function hasUTMC():Boolean{ if (_utmc){ return (true); }; return (false); } public function clearCookies():void{ utma.reset(); utmb.reset(); utmc.reset(); utmz.reset(); utmv.reset(); utmk.reset(); } public function resetCurrentSession():void{ _clearUTMB(); _clearUTMC(); save(); } public function hasUTMK():Boolean{ if (_utmk){ return (true); }; return (false); } public function getLinkerUrl(targetUrl:String="", useHash:Boolean=false):String{ var linkerParams:String = toLinkerParams(); var formattedUrl:String = targetUrl; var urlFields:Array = targetUrl.split("#"); if (linkerParams){ if (useHash){ if (1 >= urlFields.length){ formattedUrl = (formattedUrl + ("#" + linkerParams)); } else { formattedUrl = (formattedUrl + ("&" + linkerParams)); }; } else { if (1 >= urlFields.length){ if (targetUrl.indexOf("?") > -1){ formattedUrl = (formattedUrl + "&"); } else { formattedUrl = (formattedUrl + "?"); }; formattedUrl = (formattedUrl + linkerParams); } else { formattedUrl = urlFields[0]; if (targetUrl.indexOf("?") > -1){ formattedUrl = (formattedUrl + "&"); } else { formattedUrl = (formattedUrl + "?"); }; formattedUrl = (formattedUrl + ((linkerParams + "#") + urlFields[1])); }; }; }; return (formattedUrl); } public function generateCookiesHash():Number{ var value:String = ""; value = (value + utma.valueOf()); value = (value + utmb.valueOf()); value = (value + utmc.valueOf()); value = (value + utmx.valueOf()); value = (value + utmz.valueOf()); value = (value + utmv.valueOf()); return (Utils.generateHash(value)); } private function _createUMTA():void{ _utma = new UTMA(); _utma.proxy = this; } private function _createUMTB():void{ _utmb = new UTMB(); _utmb.proxy = this; } private function _createUMTC():void{ _utmc = new UTMC(); } public function hasUTMV():Boolean{ if (_utmv){ return (true); }; return (false); } private function _createUMTK():void{ _utmk = new UTMK(); _utmk.proxy = this; } public function hasUTMX():Boolean{ if (_utmx){ return (true); }; return (false); } public function hasUTMZ():Boolean{ if (_utmz){ return (true); }; return (false); } private function _createUMTV():void{ _utmv = new UTMV(); _utmv.proxy = this; } private function _createUMTX():void{ _utmx = new UTMX(); _utmx.proxy = this; } private function _createUMTZ():void{ _utmz = new UTMZ(); _utmz.proxy = this; } public function updateUTMA(timestamp:Number):void{ if (_debug.verbose){ _debug.info((("updateUTMA( " + timestamp) + " )"), VisualDebugMode.advanced); }; if (!utma.isEmpty()){ if (isNaN(utma.sessionCount)){ utma.sessionCount = 1; } else { utma.sessionCount = (utma.sessionCount + 1); }; utma.lastTime = utma.currentTime; utma.currentTime = timestamp; }; } public function isGenuine():Boolean{ if (!hasUTMK()){ return (true); }; return ((utmk.hash == generateCookiesHash())); } private function _onFlushStatus(event:NetStatusEvent):void{ _debug.info("User closed permission dialog..."); switch (event.info.code){ case "SharedObject.Flush.Success": _debug.info("User granted permission -- value saved."); break; case "SharedObject.Flush.Failed": _debug.info("User denied permission -- value not saved."); break; }; _SO.removeEventListener(NetStatusEvent.NET_STATUS, _onFlushStatus); } public function toLinkerParams():String{ var output:String = ""; output = (output + utma.toURLString()); output = (output + ("&" + utmb.toURLString())); output = (output + ("&" + utmc.toURLString())); output = (output + ("&" + utmx.toURLString())); output = (output + ("&" + utmz.toURLString())); output = (output + ("&" + utmv.toURLString())); output = (output + ("&__utmk=" + generateCookiesHash())); return (output); } private function _clearUTMA():void{ _utma = null; if (!isVolatile()){ _SO.data.utma = null; delete _SO.data.utma; }; } private function _clearUTMC():void{ _utmc = null; } private function _clearUTMB():void{ _utmb = null; if (!isVolatile()){ _SO.data.utmb = null; delete _SO.data.utmb; }; } public function update(name:String, value):void{ if (isVolatile()){ _OBJ[name] = value; } else { _SO.data[name] = value; }; } public function createSO():void{ var saveSO:Boolean; UTMZ.defaultTimespan = _config.conversionTimeout; UTMB.defaultTimespan = _config.sessionTimeout; if (!_volatile){ _SO = SharedObject.getLocal(_config.cookieName, _config.cookiePath); //unresolved jump var _slot1 = e; if (_debug.active){ _debug.warning(((("Shared Object " + _config.cookieName) + " failed to be set\nreason: ") + _slot1.message)); }; saveSO = false; if (_SO.data.utma){ if (!hasUTMA()){ _createUMTA(); }; _utma.fromSharedObject(_SO.data.utma); if (_debug.verbose){ _debug.info(("found: " + _utma.toString(true)), VisualDebugMode.geek); }; if (_utma.isExpired()){ if (_debug.verbose){ _debug.warning("UTMA has expired", VisualDebugMode.advanced); }; _clearUTMA(); saveSO = true; }; }; if (_SO.data.utmb){ if (!hasUTMB()){ _createUMTB(); }; _utmb.fromSharedObject(_SO.data.utmb); if (_debug.verbose){ _debug.info(("found: " + _utmb.toString(true)), VisualDebugMode.geek); }; if (_utmb.isExpired()){ if (_debug.verbose){ _debug.warning("UTMB has expired", VisualDebugMode.advanced); }; _clearUTMB(); saveSO = true; }; }; if (_SO.data.utmc){ delete _SO.data.utmc; saveSO = true; }; if (_SO.data.utmk){ if (!hasUTMK()){ _createUMTK(); }; _utmk.fromSharedObject(_SO.data.utmk); if (_debug.verbose){ _debug.info(("found: " + _utmk.toString()), VisualDebugMode.geek); }; }; if (!hasUTMX()){ _createUMTX(); }; if (_SO.data.utmv){ if (!hasUTMV()){ _createUMTV(); }; _utmv.fromSharedObject(_SO.data.utmv); if (_debug.verbose){ _debug.info(("found: " + _utmv.toString(true)), VisualDebugMode.geek); }; if (_utmv.isExpired()){ if (_debug.verbose){ _debug.warning("UTMV has expired", VisualDebugMode.advanced); }; _clearUTMV(); saveSO = true; }; }; if (_SO.data.utmz){ if (!hasUTMZ()){ _createUMTZ(); }; _utmz.fromSharedObject(_SO.data.utmz); if (_debug.verbose){ _debug.info(("found: " + _utmz.toString(true)), VisualDebugMode.geek); }; if (_utmz.isExpired()){ if (_debug.verbose){ _debug.warning("UTMZ has expired", VisualDebugMode.advanced); }; _clearUTMZ(); saveSO = true; }; }; if (saveSO){ save(); }; }; } private function _clearUTMZ():void{ _utmz = null; if (!isVolatile()){ _SO.data.utmz = null; delete _SO.data.utmz; }; } private function _clearUTMV():void{ _utmv = null; if (!isVolatile()){ _SO.data.utmv = null; delete _SO.data.utmv; }; } public function isVolatile():Boolean{ return (_volatile); } public function get utma():UTMA{ if (!hasUTMA()){ _createUMTA(); }; return (_utma); } public function get utmb():UTMB{ if (!hasUTMB()){ _createUMTB(); }; return (_utmb); } public function get utmc():UTMC{ if (!hasUTMC()){ _createUMTC(); }; return (_utmc); } public function get utmk():UTMK{ if (!hasUTMK()){ _createUMTK(); }; return (_utmk); } } }//package com.google.analytics.core
Section 11
//DocumentInfo (com.google.analytics.core.DocumentInfo) package com.google.analytics.core { import com.google.analytics.v4.*; import com.google.analytics.external.*; import com.google.analytics.utils.*; public class DocumentInfo { private var _pageURL:String; private var _utmr:String; private var _config:Configuration; private var _adSense:AdSenseGlobals; private var _info:Environment; public function DocumentInfo(config:Configuration, info:Environment, formatedReferrer:String, pageURL:String=null, adSense:AdSenseGlobals=null){ super(); _config = config; _info = info; _utmr = formatedReferrer; _pageURL = pageURL; _adSense = adSense; } public function get utmr():String{ if (!_utmr){ return ("-"); }; return (_utmr); } public function toURLString():String{ var v:Variables = toVariables(); return (v.toString()); } private function _renderPageURL(pageURL:String=""):String{ var pathname:String = _info.locationPath; var search:String = _info.locationSearch; if (((!(pageURL)) || ((pageURL == "")))){ pageURL = (pathname + unescape(search)); if (pageURL == ""){ pageURL = "/"; }; }; return (pageURL); } public function get utmp():String{ return (_renderPageURL(_pageURL)); } public function get utmhid():String{ return (String(_generateHitId())); } private function _generateHitId():Number{ var hid:Number; if (((_adSense.hid) && (!((_adSense.hid == ""))))){ hid = Number(_adSense.hid); } else { hid = Math.round((Math.random() * 2147483647)); _adSense.hid = String(hid); }; return (hid); } public function toVariables():Variables{ var variables:Variables = new Variables(); variables.URIencode = true; if (((_config.detectTitle) && (!((utmdt == ""))))){ variables.utmdt = utmdt; }; variables.utmhid = utmhid; variables.utmr = utmr; variables.utmp = utmp; return (variables); } public function get utmdt():String{ return (_info.documentTitle); } } }//package com.google.analytics.core
Section 12
//Domain (com.google.analytics.core.Domain) package com.google.analytics.core { import com.google.analytics.debug.*; public class Domain { private var _mode:DomainNameMode; private var _debug:DebugConfiguration; private var _name:String; public function Domain(mode:DomainNameMode=null, name:String="", debug:DebugConfiguration=null){ super(); _debug = debug; if (mode == null){ mode = DomainNameMode.auto; }; _mode = mode; if (mode == DomainNameMode.custom){ this.name = name; } else { _name = name; }; } public function get mode():DomainNameMode{ return (_mode); } public function set mode(value:DomainNameMode):void{ _mode = value; if (_mode == DomainNameMode.none){ _name = ""; }; } public function get name():String{ return (_name); } public function set name(value:String):void{ if (((!((value.charAt(0) == "."))) && (_debug))){ _debug.warning(("missing leading period \".\", cookie will only be accessible on " + value), VisualDebugMode.geek); }; _name = value; } } }//package com.google.analytics.core
Section 13
//DomainNameMode (com.google.analytics.core.DomainNameMode) package com.google.analytics.core { public class DomainNameMode { private var _value:int; private var _name:String; public static const custom:DomainNameMode = new DomainNameMode(2, "custom"); ; public static const none:DomainNameMode = new DomainNameMode(0, "none"); ; public static const auto:DomainNameMode = new DomainNameMode(1, "auto"); ; public function DomainNameMode(value:int=0, name:String=""){ super(); _value = value; _name = name; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.core
Section 14
//Ecommerce (com.google.analytics.core.Ecommerce) package com.google.analytics.core { import com.google.analytics.debug.*; import com.google.analytics.ecommerce.*; public class Ecommerce { private var _debug:DebugConfiguration; private var _trans:Array; public function Ecommerce(debug:DebugConfiguration){ super(); this._debug = debug; _trans = new Array(); } public function getTransLength():Number{ return (_trans.length); } public function getTransFromArray(i:Number):Transaction{ return (_trans[i]); } public function addTransaction(id:String, affiliation:String, total:String, tax:String, shipping:String, city:String, state:String, country:String):Transaction{ var newTrans:Transaction; newTrans = getTransaction(id); if (newTrans == null){ newTrans = new Transaction(id, affiliation, total, tax, shipping, city, state, country); _trans.push(newTrans); } else { newTrans.affiliation = affiliation; newTrans.total = total; newTrans.tax = tax; newTrans.shipping = shipping; newTrans.city = city; newTrans.state = state; newTrans.country = country; }; return (newTrans); } public function getTransaction(orderId:String):Transaction{ var i:Number; i = 0; while (i < _trans.length) { if (_trans[i].id == orderId){ return (_trans[i]); }; i++; }; return (null); } } }//package com.google.analytics.core
Section 15
//EventInfo (com.google.analytics.core.EventInfo) package com.google.analytics.core { import com.google.analytics.data.*; import com.google.analytics.utils.*; public class EventInfo { private var _ext10:X10; private var _isEventHit:Boolean; private var _x10:X10; public function EventInfo(isEventHit:Boolean, xObject:X10, extObject:X10=null){ super(); _isEventHit = isEventHit; _x10 = xObject; _ext10 = extObject; } public function toURLString():String{ var v:Variables = toVariables(); return (v.toString()); } public function get utmt():String{ return ("event"); } public function get utme():String{ return (_x10.renderMergedUrlString(_ext10)); } public function toVariables():Variables{ var variables:Variables = new Variables(); variables.URIencode = true; if (_isEventHit){ variables.utmt = utmt; }; variables.utme = utme; return (variables); } } }//package com.google.analytics.core
Section 16
//EventTracker (com.google.analytics.core.EventTracker) package com.google.analytics.core { import com.google.analytics.v4.*; public class EventTracker { private var _parent:GoogleAnalyticsAPI; public var name:String; public function EventTracker(name:String, parent:GoogleAnalyticsAPI){ super(); this.name = name; _parent = parent; } public function trackEvent(action:String, label:String=null, value:Number=NaN):Boolean{ return (_parent.trackEvent(name, action, label, value)); } } }//package com.google.analytics.core
Section 17
//ga_internal (com.google.analytics.core.ga_internal) package com.google.analytics.core { public namespace ga_internal; }//package com.google.analytics.core
Section 18
//GIFRequest (com.google.analytics.core.GIFRequest) package com.google.analytics.core { import flash.display.*; import flash.events.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import flash.net.*; import com.google.analytics.utils.*; import flash.system.*; public class GIFRequest { private var _info:Environment; private var _count:int; private var _utmac:String; private var _alertcount:int; private var _debug:DebugConfiguration; private var _lastRequest:URLRequest; private var _buffer:Buffer; private var _config:Configuration; private var _requests:Array; public function GIFRequest(config:Configuration, debug:DebugConfiguration, buffer:Buffer, info:Environment){ super(); _config = config; _debug = debug; _buffer = buffer; _info = info; _count = 0; _alertcount = 0; _requests = []; } public function get utmn():String{ return ((Utils.generate32bitRandom() as String)); } public function onIOError(event:IOErrorEvent):void{ var url:String = _lastRequest.url; var id:String = String((_requests.length - 1)); var msg = (("Gif Request #" + id) + " failed"); if (_debug.GIFRequests){ if (!_debug.verbose){ if (url.indexOf("?") > -1){ url = url.split("?")[0]; }; url = _shortenURL(url); }; if (int(_debug.mode) > int(VisualDebugMode.basic)){ msg = (msg + ((" \"" + url) + "\" does not exists or is unreachable")); }; _debug.failure(msg); } else { _debug.warning(msg); }; _removeListeners(event.target); } public function send(account:String, variables:Variables=null, force:Boolean=false, rateLimit:Boolean=false):void{ var localPath:String; var localImage:URLRequest; var remoteImage:URLRequest; _utmac = account; if (!variables){ variables = new Variables(); }; variables.URIencode = false; variables.pre = ["utmwv", "utmn", "utmhn", "utmt", "utme", "utmcs", "utmsr", "utmsc", "utmul", "utmje", "utmfl", "utmdt", "utmhid", "utmr", "utmp"]; variables.post = ["utmcc"]; if (_debug.verbose){ _debug.info(((("tracking: " + _buffer.utmb.trackCount) + "/") + _config.trackingLimitPerSession), VisualDebugMode.geek); }; if ((((_buffer.utmb.trackCount < _config.trackingLimitPerSession)) || (force))){ if (rateLimit){ updateToken(); }; if (((((force) || (!(rateLimit)))) || ((_buffer.utmb.token >= 1)))){ if (((!(force)) && (rateLimit))){ _buffer.utmb.token = (_buffer.utmb.token - 1); }; _buffer.utmb.trackCount = (_buffer.utmb.trackCount + 1); if (_debug.verbose){ _debug.info(_buffer.utmb.toString(), VisualDebugMode.geek); }; variables.utmwv = utmwv; variables.utmn = Utils.generate32bitRandom(); if (_info.domainName != ""){ variables.utmhn = _info.domainName; }; if (_config.sampleRate < 1){ variables.utmsp = (_config.sampleRate * 100); }; if ((((_config.serverMode == ServerOperationMode.local)) || ((_config.serverMode == ServerOperationMode.both)))){ localPath = _info.locationSWFPath; if (localPath.lastIndexOf("/") > 0){ localPath = localPath.substring(0, localPath.lastIndexOf("/")); }; localImage = new URLRequest(); if (_config.localGIFpath.indexOf("http") == 0){ localImage.url = _config.localGIFpath; } else { localImage.url = (localPath + _config.localGIFpath); }; localImage.url = (localImage.url + ("?" + variables.toString())); if (((_debug.active) && (_debug.GIFRequests))){ _debugSend(localImage); } else { sendRequest(localImage); }; }; if ((((_config.serverMode == ServerOperationMode.remote)) || ((_config.serverMode == ServerOperationMode.both)))){ remoteImage = new URLRequest(); if (_info.protocol == Protocols.HTTPS){ remoteImage.url = _config.secureRemoteGIFpath; } else { if (_info.protocol == Protocols.HTTP){ remoteImage.url = _config.remoteGIFpath; } else { remoteImage.url = _config.remoteGIFpath; }; }; variables.utmac = utmac; variables.utmcc = encodeURIComponent(utmcc); remoteImage.url = (remoteImage.url + ("?" + variables.toString())); if (((_debug.active) && (_debug.GIFRequests))){ _debugSend(remoteImage); } else { sendRequest(remoteImage); }; }; }; }; } public function onSecurityError(event:SecurityErrorEvent):void{ if (_debug.GIFRequests){ _debug.failure(event.text); }; } public function get utmsp():String{ return (((_config.sampleRate * 100) as String)); } public function get utmcc():String{ var cookies:Array = []; if (_buffer.hasUTMA()){ cookies.push((_buffer.utma.toURLString() + ";")); }; if (_buffer.hasUTMZ()){ cookies.push((_buffer.utmz.toURLString() + ";")); }; if (_buffer.hasUTMV()){ cookies.push((_buffer.utmv.toURLString() + ";")); }; return (cookies.join("+")); } public function get utmac():String{ return (_utmac); } public function get utmwv():String{ return (_config.version); } public function sendRequest(request:URLRequest):void{ var request = request; var loader:Loader = new Loader(); loader.name = String(_count++); var context:LoaderContext = new LoaderContext(false); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete); _lastRequest = request; _requests[loader.name] = new RequestObject(request); loader.load(request, context); //unresolved jump var _slot1 = e; _debug.failure("\"Loader.load()\" could not instanciate Gif Request"); } private function _removeListeners(target:Object):void{ target.removeEventListener(IOErrorEvent.IO_ERROR, onIOError); target.removeEventListener(Event.COMPLETE, onComplete); } public function updateToken():void{ var tokenDelta:Number; var timestamp:Number = new Date().getTime(); tokenDelta = ((timestamp - _buffer.utmb.lastTime) * (_config.tokenRate / 1000)); if (_debug.verbose){ _debug.info(("tokenDelta: " + tokenDelta), VisualDebugMode.geek); }; if (tokenDelta >= 1){ _buffer.utmb.token = Math.min(Math.floor((_buffer.utmb.token + tokenDelta)), _config.bucketCapacity); _buffer.utmb.lastTime = timestamp; if (_debug.verbose){ _debug.info(_buffer.utmb.toString(), VisualDebugMode.geek); }; }; } public function get utmhn():String{ return (_info.domainName); } private function _shortenURL(url:String):String{ var paths:Array; if (url.length > 60){ paths = url.split("/"); while (url.length > 60) { paths.shift(); url = ("../" + paths.join("/")); }; }; return (url); } private function _debugSend(request:URLRequest):void{ var _local3:String; var data:String = ""; switch (_debug.mode){ case VisualDebugMode.geek: data = ((("Gif Request #" + _alertcount) + ":\n") + request.url); break; case VisualDebugMode.advanced: _local3 = request.url; if (_local3.indexOf("?") > -1){ _local3 = _local3.split("?")[0]; }; _local3 = _shortenURL(_local3); data = (((("Send Gif Request #" + _alertcount) + ":\n") + _local3) + " ?"); break; case VisualDebugMode.basic: default: data = (((("Send " + _config.serverMode.toString()) + " Gif Request #") + _alertcount) + " ?"); }; _debug.alertGifRequest(data, request, this); _alertcount++; } public function onComplete(event:Event):void{ var id:String = event.target.loader.name; _requests[id].complete(); var msg = (("Gif Request #" + id) + " sent"); var url:String = _requests[id].request.url; if (_debug.GIFRequests){ if (!_debug.verbose){ if (url.indexOf("?") > -1){ url = url.split("?")[0]; }; url = _shortenURL(url); }; if (int(_debug.mode) > int(VisualDebugMode.basic)){ msg = (msg + ((" to \"" + url) + "\"")); }; _debug.success(msg); } else { _debug.info(msg); }; _removeListeners(event.target); } } }//package com.google.analytics.core
Section 19
//IdleTimer (com.google.analytics.core.IdleTimer) package com.google.analytics.core { import flash.display.*; import flash.events.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import flash.utils.*; public class IdleTimer { private var _stage:Stage; private var _loop:Timer; private var _lastMove:int; private var _inactivity:Number; private var _debug:DebugConfiguration; private var _session:Timer; private var _buffer:Buffer; public function IdleTimer(config:Configuration, debug:DebugConfiguration, display:DisplayObject, buffer:Buffer){ super(); var delay:Number = config.idleLoop; var inactivity:Number = config.idleTimeout; var sessionTimeout:Number = config.sessionTimeout; _loop = new Timer((delay * 1000)); _session = new Timer((sessionTimeout * 1000), 1); _debug = debug; _stage = display.stage; _buffer = buffer; _lastMove = getTimer(); _inactivity = (inactivity * 1000); _loop.addEventListener(TimerEvent.TIMER, checkForIdle); _session.addEventListener(TimerEvent.TIMER_COMPLETE, endSession); _stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); _debug.info(((((("delay: " + delay) + "sec , inactivity: ") + inactivity) + "sec, sessionTimeout: ") + sessionTimeout), VisualDebugMode.geek); _loop.start(); } private function onMouseMove(event:MouseEvent):void{ _lastMove = getTimer(); if (_session.running){ _debug.info("session timer reset", VisualDebugMode.geek); _session.reset(); }; } public function endSession(event:TimerEvent):void{ _session.removeEventListener(TimerEvent.TIMER_COMPLETE, endSession); _debug.info("session timer end session", VisualDebugMode.geek); _session.reset(); _buffer.resetCurrentSession(); _debug.info(_buffer.utmb.toString(), VisualDebugMode.geek); _debug.info(_buffer.utmc.toString(), VisualDebugMode.geek); _session.addEventListener(TimerEvent.TIMER_COMPLETE, endSession); } public function checkForIdle(event:TimerEvent):void{ var current:int = getTimer(); if ((current - _lastMove) >= _inactivity){ if (!_session.running){ _debug.info("session timer start", VisualDebugMode.geek); _session.start(); }; }; } } }//package com.google.analytics.core
Section 20
//Organic (com.google.analytics.core.Organic) package com.google.analytics.core { import com.google.analytics.utils.*; public class Organic { private var _sourcesCache:Array; private var _sourcesEngine:Array; private var _ignoredKeywords:Array; private var _ignoredReferralsCache:Object; private var _ignoredReferrals:Array; private var _ignoredKeywordsCache:Object; private var _sources:Array; public static var throwErrors:Boolean = false; public function Organic(){ super(); _sources = []; _sourcesCache = []; _sourcesEngine = []; _ignoredReferrals = []; _ignoredReferralsCache = {}; _ignoredKeywords = []; _ignoredKeywordsCache = {}; } public function isIgnoredKeyword(keyword:String):Boolean{ if (_ignoredKeywordsCache.hasOwnProperty(keyword)){ return (true); }; return (false); } public function getKeywordValue(or:OrganicReferrer, path:String):String{ var keyword:String = or.keyword; return (getKeywordValueFromPath(keyword, path)); } public function isIgnoredReferral(referrer:String):Boolean{ if (_ignoredReferralsCache.hasOwnProperty(referrer)){ return (true); }; return (false); } public function clear():void{ clearEngines(); clearIgnoredReferrals(); clearIgnoredKeywords(); } public function get count():int{ return (_sources.length); } public function get ignoredKeywordsCount():int{ return (_ignoredKeywords.length); } public function match(name:String):Boolean{ if (name == ""){ return (false); }; name = name.toLowerCase(); if (_sourcesEngine[name] != undefined){ return (true); }; return (false); } public function clearIgnoredKeywords():void{ _ignoredKeywords = []; _ignoredKeywordsCache = {}; } public function addSource(engine:String, keyword:String):void{ var orgref:OrganicReferrer = new OrganicReferrer(engine, keyword); if (_sourcesCache[orgref.toString()] == undefined){ _sources.push(orgref); _sourcesCache[orgref.toString()] = (_sources.length - 1); if (_sourcesEngine[orgref.engine] == undefined){ _sourcesEngine[orgref.engine] = [(_sources.length - 1)]; } else { _sourcesEngine[orgref.engine].push((_sources.length - 1)); }; } else { if (throwErrors){ throw (new Error((orgref.toString() + " already exists, we don't add it."))); }; }; } public function clearEngines():void{ _sources = []; _sourcesCache = []; _sourcesEngine = []; } public function get ignoredReferralsCount():int{ return (_ignoredReferrals.length); } public function addIgnoredReferral(referrer:String):void{ if (_ignoredReferralsCache[referrer] == undefined){ _ignoredReferrals.push(referrer); _ignoredReferralsCache[referrer] = (_ignoredReferrals.length - 1); } else { if (throwErrors){ throw (new Error((("\"" + referrer) + "\" already exists, we don't add it."))); }; }; } public function clearIgnoredReferrals():void{ _ignoredReferrals = []; _ignoredReferralsCache = {}; } public function getReferrerByName(name:String):OrganicReferrer{ var index:int; if (match(name)){ index = _sourcesEngine[name][0]; return (_sources[index]); }; return (null); } public function addIgnoredKeyword(keyword:String):void{ if (_ignoredKeywordsCache[keyword] == undefined){ _ignoredKeywords.push(keyword); _ignoredKeywordsCache[keyword] = (_ignoredKeywords.length - 1); } else { if (throwErrors){ throw (new Error((("\"" + keyword) + "\" already exists, we don't add it."))); }; }; } public function get sources():Array{ return (_sources); } public static function getKeywordValueFromPath(keyword:String, path:String):String{ var value:String; var vars:Variables; if (path.indexOf((keyword + "=")) > -1){ if (path.charAt(0) == "?"){ path = path.substr(1); }; path = path.split("+").join("%20"); vars = new Variables(path); value = vars[keyword]; }; return (value); } } }//package com.google.analytics.core
Section 21
//OrganicReferrer (com.google.analytics.core.OrganicReferrer) package com.google.analytics.core { public class OrganicReferrer { private var _engine:String; private var _keyword:String; public function OrganicReferrer(engine:String, keyword:String){ super(); this.engine = engine; this.keyword = keyword; } public function get keyword():String{ return (_keyword); } public function get engine():String{ return (_engine); } public function set engine(value:String):void{ _engine = value.toLowerCase(); } public function toString():String{ return (((engine + "?") + keyword)); } public function set keyword(value:String):void{ _keyword = value.toLowerCase(); } } }//package com.google.analytics.core
Section 22
//RequestObject (com.google.analytics.core.RequestObject) package com.google.analytics.core { import flash.net.*; import flash.utils.*; public class RequestObject { public var start:int; public var end:int; public var request:URLRequest; public function RequestObject(request:URLRequest){ super(); start = getTimer(); this.request = request; } public function hasCompleted():Boolean{ return ((end > 0)); } public function toString():String{ var data:Array = []; data.push((("duration: " + duration) + "ms")); data.push(("url: " + request.url)); return ((("{ " + data.join(", ")) + " }")); } public function complete():void{ end = getTimer(); } public function get duration():int{ if (!hasCompleted()){ return (0); }; return ((end - start)); } } }//package com.google.analytics.core
Section 23
//ServerOperationMode (com.google.analytics.core.ServerOperationMode) package com.google.analytics.core { public class ServerOperationMode { private var _value:int; private var _name:String; public static const both:ServerOperationMode = new ServerOperationMode(2, "both"); ; public static const remote:ServerOperationMode = new ServerOperationMode(1, "remote"); ; public static const local:ServerOperationMode = new ServerOperationMode(0, "local"); ; public function ServerOperationMode(value:int=0, name:String=""){ super(); _value = value; _name = name; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.core
Section 24
//TrackerCache (com.google.analytics.core.TrackerCache) package com.google.analytics.core { import com.google.analytics.v4.*; import flash.errors.*; public class TrackerCache implements GoogleAnalyticsAPI { public var tracker:GoogleAnalyticsAPI; private var _ar:Array; public static var CACHE_THROW_ERROR:Boolean; public function TrackerCache(tracker:GoogleAnalyticsAPI=null){ super(); this.tracker = tracker; _ar = []; } public function size():uint{ return (_ar.length); } public function flush():void{ var o:Object; var name:String; var args:Array; var l:int; var i:int; if (tracker == null){ return; }; if (size() > 0){ l = _ar.length; while (i < l) { o = _ar.shift(); name = (o.name as String); args = (o.args as Array); if (((!((name == null))) && ((name in tracker)))){ (tracker[name] as Function).apply(tracker, args); }; i++; }; }; } public function enqueue(name:String, ... _args):Boolean{ if (name == null){ return (false); }; _ar.push({name:name, args:_args}); return (true); } public function link(targetUrl:String, useHash:Boolean=false):void{ enqueue("link", targetUrl, useHash); } public function addOrganic(newOrganicEngine:String, newOrganicKeyword:String):void{ enqueue("addOrganic", newOrganicEngine, newOrganicKeyword); } public function setAllowLinker(enable:Boolean):void{ enqueue("setAllowLinker", enable); } public function trackEvent(category:String, action:String, label:String=null, value:Number=NaN):Boolean{ enqueue("trackEvent", category, action, label, value); return (true); } public function getLinkerUrl(url:String="", useHash:Boolean=false):String{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getLinkerUrl' method for the moment.")); }; return (""); } public function getClientInfo():Boolean{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getClientInfo' method for the moment.")); }; return (false); } public function trackTrans():void{ enqueue("trackTrans"); } public function trackPageview(pageURL:String=""):void{ enqueue("trackPageview", pageURL); } public function setClientInfo(enable:Boolean):void{ enqueue("setClientInfo", enable); } public function linkByPost(formObject:Object, useHash:Boolean=false):void{ enqueue("linkByPost", formObject, useHash); } public function setCookieTimeout(newDefaultTimeout:int):void{ enqueue("setCookieTimeout", newDefaultTimeout); } public function isEmpty():Boolean{ return ((_ar.length == 0)); } public function getDetectTitle():Boolean{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getDetectTitle' method for the moment.")); }; return (false); } public function resetSession():void{ enqueue("resetSession"); } public function setDetectFlash(enable:Boolean):void{ enqueue("setDetectFlash", enable); } public function clear():void{ _ar = []; } public function setCampNameKey(newCampNameKey:String):void{ enqueue("setCampNameKey", newCampNameKey); } public function addItem(item:String, sku:String, name:String, category:String, price:Number, quantity:int):void{ enqueue("addItem", item, sku, name, category, price, quantity); } public function createEventTracker(objName:String):EventTracker{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'createEventTracker' method for the moment.")); }; return (null); } public function clearIgnoredOrganic():void{ enqueue("clearIgnoredOrganic"); } public function setVar(newVal:String):void{ enqueue("setVar", newVal); } public function setDomainName(newDomainName:String):void{ enqueue("setDomainName", newDomainName); } public function setCampSourceKey(newCampSrcKey:String):void{ enqueue("setCampSourceKey", newCampSrcKey); } public function addTrans(orderId:String, affiliation:String, total:Number, tax:Number, shipping:Number, city:String, state:String, country:String):void{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'addTrans' method for the moment.")); }; } public function setCampContentKey(newCampContentKey:String):void{ enqueue("setCampContentKey", newCampContentKey); } public function setLocalServerMode():void{ enqueue("setLocalServerMode"); } public function getLocalGifPath():String{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getLocalGifPath' method for the moment.")); }; return (""); } public function setAllowAnchor(enable:Boolean):void{ enqueue("setAllowAnchor", enable); } public function clearIgnoredRef():void{ enqueue("clearIgnoredRef"); } public function setLocalGifPath(newLocalGifPath:String):void{ enqueue("setLocalGifPath", newLocalGifPath); } public function getVersion():String{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getVersion' method for the moment.")); }; return (""); } public function setCookiePath(newCookiePath:String):void{ enqueue("setCookiePath", newCookiePath); } public function setSampleRate(newRate:Number):void{ enqueue("setSampleRate", newRate); } public function setDetectTitle(enable:Boolean):void{ enqueue("setDetectTitle", enable); } public function setAllowHash(enable:Boolean):void{ enqueue("setAllowHash", enable); } public function addIgnoredOrganic(newIgnoredOrganicKeyword:String):void{ enqueue("addIgnoredOrganic", newIgnoredOrganicKeyword); } public function setCampNOKey(newCampNOKey:String):void{ enqueue("setCampNOKey", newCampNOKey); } public function getServiceMode():ServerOperationMode{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getServiceMode' method for the moment.")); }; return (null); } public function setLocalRemoteServerMode():void{ enqueue("setLocalRemoteServerMode"); } public function cookiePathCopy(newPath:String):void{ enqueue("cookiePathCopy", newPath); } public function getDetectFlash():Boolean{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getDetectFlash' method for the moment.")); }; return (false); } public function setCampaignTrack(enable:Boolean):void{ enqueue("setCampaignTrack", enable); } public function clearOrganic():void{ enqueue("clearOrganic"); } public function setCampTermKey(newCampTermKey:String):void{ enqueue("setCampTermKey", newCampTermKey); } public function addIgnoredRef(newIgnoredReferrer:String):void{ enqueue("addIgnoredRef", newIgnoredReferrer); } public function setCampMediumKey(newCampMedKey:String):void{ enqueue("setCampMediumKey", newCampMedKey); } public function setSessionTimeout(newTimeout:int):void{ enqueue("setSessionTimeout", newTimeout); } public function setRemoteServerMode():void{ enqueue("setRemoteServerMode"); } public function element(){ return (_ar[0]); } public function getAccount():String{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getAccount' method for the moment.")); }; return (""); } } }//package com.google.analytics.core
Section 25
//TrackerMode (com.google.analytics.core.TrackerMode) package com.google.analytics.core { public class TrackerMode { public static const BRIDGE:String = "Bridge"; public static const AS3:String = "AS3"; public function TrackerMode(){ super(); } } }//package com.google.analytics.core
Section 26
//Utils (com.google.analytics.core.Utils) package com.google.analytics.core { public class Utils { public function Utils(){ super(); } public static function trim(raw:String, everything:Boolean=false):String{ var i:int; var iLeft:int; var iRight:int; if (raw == ""){ return (""); }; var whitespaces:Array = [" ", "\n", "\r", "\t"]; var str:String = raw; if (everything){ i = 0; while ((((i < whitespaces.length)) && ((str.indexOf(whitespaces[i]) > -1)))) { str = str.split(whitespaces[i]).join(""); i++; }; } else { iLeft = 0; while ((((iLeft < str.length)) && ((whitespaces.indexOf(str.charAt(iLeft)) > -1)))) { iLeft++; }; str = str.substr(iLeft); iRight = (str.length - 1); while ((((iRight >= 0)) && ((whitespaces.indexOf(str.charAt(iRight)) > -1)))) { iRight--; }; str = str.substring(0, (iRight + 1)); }; return (str); } public static function generateHash(input:String):int{ var pos:int; var current:int; var hash = 1; var leftMost7:int; if (((!((input == null))) && (!((input == ""))))){ hash = 0; pos = (input.length - 1); while (pos >= 0) { current = input.charCodeAt(pos); hash = ((((hash << 6) & 268435455) + current) + (current << 14)); leftMost7 = (hash & 266338304); if (leftMost7 != 0){ hash = (hash ^ (leftMost7 >> 21)); }; pos--; }; }; return (hash); } public static function generate32bitRandom():int{ return (Math.round((Math.random() * 2147483647))); } public static function validateAccount(account:String):Boolean{ var rel:RegExp = /^UA-[0-9]*-[0-9]*$/; return (rel.test(account)); } } }//package com.google.analytics.core
Section 27
//Cookie (com.google.analytics.data.Cookie) package com.google.analytics.data { public interface Cookie { function fromSharedObject(C:\JOBS\Seek\Space Agent\src;com\google\analytics\data;Cookie.as:Object):void; function toURLString():String; function get creation():Date; function toSharedObject():Object; function isExpired():Boolean; function set creation(C:\JOBS\Seek\Space Agent\src;com\google\analytics\data;Cookie.as:Date):void; function set expiration(C:\JOBS\Seek\Space Agent\src;com\google\analytics\data;Cookie.as:Date):void; function get expiration():Date; } }//package com.google.analytics.data
Section 28
//UTMA (com.google.analytics.data.UTMA) package com.google.analytics.data { import com.google.analytics.utils.*; public class UTMA extends UTMCookie { private var _sessionId:Number; private var _domainHash:Number; private var _firstTime:Number; private var _currentTime:Number; private var _lastTime:Number; private var _sessionCount:Number; public function UTMA(domainHash:Number=NaN, sessionId:Number=NaN, firstTime:Number=NaN, lastTime:Number=NaN, currentTime:Number=NaN, sessionCount:Number=NaN){ super("utma", "__utma", ["domainHash", "sessionId", "firstTime", "lastTime", "currentTime", "sessionCount"], (Timespan.twoyears * 1000)); this.domainHash = domainHash; this.sessionId = sessionId; this.firstTime = firstTime; this.lastTime = lastTime; this.currentTime = currentTime; this.sessionCount = sessionCount; } public function get lastTime():Number{ return (_lastTime); } public function set lastTime(value:Number):void{ _lastTime = value; update(); } public function set currentTime(value:Number):void{ _currentTime = value; update(); } public function get sessionId():Number{ return (_sessionId); } public function get sessionCount():Number{ return (_sessionCount); } public function get firstTime():Number{ return (_firstTime); } public function get currentTime():Number{ return (_currentTime); } public function set domainHash(value:Number):void{ _domainHash = value; update(); } public function set sessionId(value:Number):void{ _sessionId = value; update(); } public function set sessionCount(value:Number):void{ _sessionCount = value; update(); } public function get domainHash():Number{ return (_domainHash); } public function set firstTime(value:Number):void{ _firstTime = value; update(); } } }//package com.google.analytics.data
Section 29
//UTMB (com.google.analytics.data.UTMB) package com.google.analytics.data { import com.google.analytics.utils.*; public class UTMB extends UTMCookie { private var _trackCount:Number; private var _lastTime:Number; private var _domainHash:Number; private var _token:Number; public static var defaultTimespan:Number = Timespan.thirtyminutes; public function UTMB(domainHash:Number=NaN, trackCount:Number=NaN, token:Number=NaN, lastTime:Number=NaN){ super("utmb", "__utmb", ["domainHash", "trackCount", "token", "lastTime"], (defaultTimespan * 1000)); this.domainHash = domainHash; this.trackCount = trackCount; this.token = token; this.lastTime = lastTime; } public function set token(value:Number):void{ _token = value; update(); } public function set trackCount(value:Number):void{ _trackCount = value; update(); } public function get lastTime():Number{ return (_lastTime); } public function set domainHash(value:Number):void{ _domainHash = value; update(); } public function set lastTime(value:Number):void{ _lastTime = value; update(); } public function get domainHash():Number{ return (_domainHash); } public function get token():Number{ return (_token); } public function get trackCount():Number{ return (_trackCount); } } }//package com.google.analytics.data
Section 30
//UTMC (com.google.analytics.data.UTMC) package com.google.analytics.data { public class UTMC extends UTMCookie { private var _domainHash:Number; public function UTMC(domainHash:Number=NaN){ super("utmc", "__utmc", ["domainHash"]); this.domainHash = domainHash; } public function get domainHash():Number{ return (_domainHash); } public function set domainHash(value:Number):void{ _domainHash = value; update(); } } }//package com.google.analytics.data
Section 31
//UTMCookie (com.google.analytics.data.UTMCookie) package com.google.analytics.data { import com.google.analytics.core.*; public class UTMCookie implements Cookie { protected var inURL:String; protected var name:String; private var _creation:Date; private var _expiration:Date; public var proxy:Buffer; protected var fields:Array; private var _timespan:Number; public function UTMCookie(name:String, inURL:String, fields:Array, timespan:Number=0){ super(); this.name = name; this.inURL = inURL; this.fields = fields; _timestamp(timespan); } public function isEmpty():Boolean{ var field:String; var empty:int; var i:int; while (i < fields.length) { field = fields[i]; if ((((this[field] is Number)) && (isNaN(this[field])))){ empty++; } else { if ((((this[field] is String)) && ((this[field] == "")))){ empty++; }; }; i++; }; if (empty == fields.length){ return (true); }; return (false); } public function resetTimestamp(timespan:Number=NaN):void{ if (!isNaN(timespan)){ _timespan = timespan; }; _creation = null; _expiration = null; _timestamp(_timespan); } protected function update():void{ resetTimestamp(); if (proxy){ proxy.update(name, toSharedObject()); }; } public function reset():void{ var field:String; var i:int; while (i < fields.length) { field = fields[i]; if ((this[field] is Number)){ this[field] = NaN; } else { if ((this[field] is String)){ this[field] = ""; }; }; i++; }; resetTimestamp(); update(); } public function fromSharedObject(data:Object):void{ var field:String; var len:int = fields.length; var i:int; while (i < len) { field = fields[i]; if (data[field]){ this[field] = data[field]; }; i++; }; if (data.creation){ this.creation = data.creation; }; if (data.expiration){ this.expiration = data.expiration; }; } private function _timestamp(timespan:Number):void{ creation = new Date(); _timespan = timespan; if (timespan > 0){ expiration = new Date((creation.valueOf() + timespan)); }; } public function isExpired():Boolean{ var current:Date = new Date(); var diff:Number = (expiration.valueOf() - current.valueOf()); if (diff <= 0){ return (true); }; return (false); } public function set expiration(value:Date):void{ _expiration = value; } public function get creation():Date{ return (_creation); } public function valueOf():String{ var field:String; var value:*; var testData:Array; var data:Array = []; var testOut:String = ""; var i:int; while (i < fields.length) { field = fields[i]; value = this[field]; if ((value is String)){ if (value == ""){ value = "-"; data.push(value); } else { data.push(value); }; } else { if ((value is Number)){ if (value == 0){ data.push(value); } else { if (isNaN(value)){ value = "-"; data.push(value); } else { data.push(value); }; }; }; }; i++; }; if (isEmpty()){ return ("-"); }; return (("" + data.join("."))); } public function toURLString():String{ return (((inURL + "=") + valueOf())); } public function get expiration():Date{ if (_expiration){ return (_expiration); }; return (new Date((new Date().valueOf() + 1000))); } public function toSharedObject():Object{ var field:String; var value:*; var data:Object = {}; var i:int; for (;i < fields.length;i++) { field = fields[i]; value = this[field]; if ((value is String)){ data[field] = value; } else { if (value == 0){ data[field] = value; } else { if (isNaN(value)){ continue; } else { data[field] = value; }; }; }; }; data.creation = creation; data.expiration = expiration; return (data); } public function toString(showTimestamp:Boolean=false):String{ var field:String; var value:*; var data:Array = []; var len:int = fields.length; var i:int; for (;i < len;i++) { field = fields[i]; value = this[field]; if ((value is String)){ data.push((((field + ": \"") + value) + "\"")); } else { if (value == 0){ data.push(((field + ": ") + value)); } else { if (isNaN(value)){ continue; } else { data.push(((field + ": ") + value)); }; }; }; }; var str = (((name.toUpperCase() + " {") + data.join(", ")) + "}"); if (showTimestamp){ str = (str + (((" creation:" + creation) + ", expiration:") + expiration)); }; return (str); } public function set creation(value:Date):void{ _creation = value; } } }//package com.google.analytics.data
Section 32
//UTMK (com.google.analytics.data.UTMK) package com.google.analytics.data { public class UTMK extends UTMCookie { private var _hash:Number; public function UTMK(hash:Number=NaN){ super("utmk", "__utmk", ["hash"]); this.hash = hash; } public function set hash(value:Number):void{ _hash = value; update(); } public function get hash():Number{ return (_hash); } } }//package com.google.analytics.data
Section 33
//UTMV (com.google.analytics.data.UTMV) package com.google.analytics.data { import com.google.analytics.utils.*; public class UTMV extends UTMCookie { private var _domainHash:Number; private var _value:String; public function UTMV(domainHash:Number=NaN, value:String=""){ super("utmv", "__utmv", ["domainHash", "value"], (Timespan.twoyears * 1000)); this.domainHash = domainHash; this.value = value; } public function get value():String{ return (_value); } public function get domainHash():Number{ return (_domainHash); } public function set domainHash(value:Number):void{ _domainHash = value; update(); } public function set value(value:String):void{ _value = value; update(); } } }//package com.google.analytics.data
Section 34
//UTMX (com.google.analytics.data.UTMX) package com.google.analytics.data { public class UTMX extends UTMCookie { private var _value:String; public function UTMX(){ super("utmx", "__utmx", ["value"], 0); _value = "-"; } public function get value():String{ return (_value); } public function set value(value:String):void{ _value = value; } } }//package com.google.analytics.data
Section 35
//UTMZ (com.google.analytics.data.UTMZ) package com.google.analytics.data { import com.google.analytics.utils.*; public class UTMZ extends UTMCookie { private var _campaignTracking:String; private var _campaignCreation:Number; private var _responseCount:Number; private var _domainHash:Number; private var _campaignSessions:Number; public static var defaultTimespan:Number = Timespan.sixmonths; public function UTMZ(domainHash:Number=NaN, campaignCreation:Number=NaN, campaignSessions:Number=NaN, responseCount:Number=NaN, campaignTracking:String=""){ super("utmz", "__utmz", ["domainHash", "campaignCreation", "campaignSessions", "responseCount", "campaignTracking"], (defaultTimespan * 1000)); this.domainHash = domainHash; this.campaignCreation = campaignCreation; this.campaignSessions = campaignSessions; this.responseCount = responseCount; this.campaignTracking = campaignTracking; } public function set responseCount(value:Number):void{ _responseCount = value; update(); } public function set domainHash(value:Number):void{ _domainHash = value; update(); } public function set campaignCreation(value:Number):void{ _campaignCreation = value; update(); } public function get campaignTracking():String{ return (_campaignTracking); } public function get campaignSessions():Number{ return (_campaignSessions); } public function get domainHash():Number{ return (_domainHash); } public function get responseCount():Number{ return (_responseCount); } public function get campaignCreation():Number{ return (_campaignCreation); } public function set campaignSessions(value:Number):void{ _campaignSessions = value; update(); } public function set campaignTracking(value:String):void{ _campaignTracking = value; update(); } } }//package com.google.analytics.data
Section 36
//X10 (com.google.analytics.data.X10) package com.google.analytics.data { public class X10 { private var _delimEnd:String;// = ")" private var _minimum:int; private var _delimSet:String;// = "*" private var _escapeChar:String;// = "'" private var _delimBegin:String;// = "(" private var _delimNumValue:String;// = "!" private var _key:String;// = "k" private var _set:Array; private var _hasData:int; private var _escapeCharMap:Object; private var _projectData:Object; private var _value:String;// = "v" public function X10(){ _set = [_key, _value]; super(); _projectData = {}; _escapeCharMap = {}; _escapeCharMap[_escapeChar] = "'0"; _escapeCharMap[_delimEnd] = "'1"; _escapeCharMap[_delimSet] = "'2"; _escapeCharMap[_delimNumValue] = "'3"; _minimum = 1; } private function _setInternal(projectId:Number, type:String, num:Number, value:String):void{ if (!hasProject(projectId)){ _projectData[projectId] = {}; }; if (_projectData[projectId][type] == undefined){ _projectData[projectId][type] = []; }; _projectData[projectId][type][num] = value; _hasData = (_hasData + 1); } private function _renderProject(project:Object):String{ var i:int; var data:Array; var result:String = ""; var needTypeQualifier:Boolean; var l:int = _set.length; i = 0; while (i < l) { data = project[_set[i]]; if (data){ if (needTypeQualifier){ result = (result + _set[i]); }; result = (result + _renderDataType(data)); needTypeQualifier = false; } else { needTypeQualifier = true; }; i++; }; return (result); } public function hasProject(projectId:Number):Boolean{ return (_projectData[projectId]); } public function clearKey(projectId:Number):void{ _clearInternal(projectId, _key); } private function _renderDataType(data:Array):String{ var str:String; var i:int; var result:Array = []; i = 0; while (i < data.length) { if (data[i] != undefined){ str = ""; if (((!((i == _minimum))) && ((data[(i - 1)] == undefined)))){ str = (str + i.toString()); str = (str + _delimNumValue); }; str = (str + _escapeExtensibleValue(data[i])); result.push(str); }; i++; }; return (((_delimBegin + result.join(_delimSet)) + _delimEnd)); } public function getKey(projectId:Number, num:Number):String{ return ((_getInternal(projectId, _key, num) as String)); } public function hasData():Boolean{ return ((_hasData > 0)); } public function renderMergedUrlString(extObject:X10=null):String{ var projectId:String; if (!extObject){ return (renderUrlString()); }; var result:Array = [extObject.renderUrlString()]; for (projectId in _projectData) { if (((hasProject(Number(projectId))) && (!(extObject.hasProject(Number(projectId)))))){ result.push((projectId + _renderProject(_projectData[projectId]))); }; }; return (result.join("")); } public function setValue(projectId:Number, num:Number, value:Number):Boolean{ if (((((!((Math.round(value) == value))) || (isNaN(value)))) || ((value == Infinity)))){ return (false); }; _setInternal(projectId, _value, num, value.toString()); return (true); } public function renderUrlString():String{ var projectId:String; var result:Array = []; for (projectId in _projectData) { if (hasProject(Number(projectId))){ result.push((projectId + _renderProject(_projectData[projectId]))); }; }; return (result.join("")); } private function _getInternal(projectId:Number, type:String, num:Number):Object{ if (((hasProject(projectId)) && (!((_projectData[projectId][type] == undefined))))){ return (_projectData[projectId][type][num]); }; return (undefined); } public function setKey(projectId:Number, num:Number, value:String):Boolean{ _setInternal(projectId, _key, num, value); return (true); } public function clearValue(projectId:Number):void{ _clearInternal(projectId, _value); } private function _clearInternal(projectId:Number, type:String):void{ var isEmpty:Boolean; var i:int; var l:int; if (((hasProject(projectId)) && (!((_projectData[projectId][type] == undefined))))){ _projectData[projectId][type] = undefined; isEmpty = true; l = _set.length; i = 0; while (i < l) { if (_projectData[projectId][_set[i]] != undefined){ isEmpty = false; break; }; i++; }; if (isEmpty){ _projectData[projectId] = undefined; _hasData = (_hasData - 1); }; }; } public function getValue(projectId:Number, num:Number){ var value:* = _getInternal(projectId, _value, num); if (value == null){ return (null); }; return (Number(value)); } private function _escapeExtensibleValue(value:String):String{ var i:int; var c:String; var escaped:String; var result:String = ""; i = 0; while (i < value.length) { c = value.charAt(i); escaped = _escapeCharMap[c]; if (escaped){ result = (result + escaped); } else { result = (result + c); }; i++; }; return (result); } } }//package com.google.analytics.data
Section 37
//_Style (com.google.analytics.debug._Style) package com.google.analytics.debug { import flash.net.*; import flash.text.*; public class _Style { public var failureColor:uint; public var borderColor:uint; public var backgroundColor:uint; private var _sheet:StyleSheet; public var roundedCorner:uint; public var warningColor:uint; public var infoColor:uint; public var alertColor:uint; public var successColor:uint; private var _loader:URLLoader; private var _defaultSheet:String; public function _Style(){ super(); _sheet = new StyleSheet(); _loader = new URLLoader(); _init(); } private function _parseSheet(data:String):void{ _sheet.parseCSS(data); } public function get sheet():StyleSheet{ return (_sheet); } private function _init():void{ _defaultSheet = ""; _defaultSheet = (_defaultSheet + "a{text-decoration: underline;}\n"); _defaultSheet = (_defaultSheet + ".uiLabel{color: #000000;font-family: Arial;font-size: 12;margin-left: 2;margin-right: 2;}\n"); _defaultSheet = (_defaultSheet + ".uiWarning{color: #ffffff;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiAlert{color: #ffffff;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiInfo{color: #000000;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiSuccess{color: #ffffff;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiFailure{color: #ffffff;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiAlertAction{color: #ffffff;text-align: center;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiAlertTitle{color: #ffffff;font-family: Arial;font-size: 16;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + "\n"); roundedCorner = 6; backgroundColor = 0xCCCCCC; borderColor = 0x555555; infoColor = 16777113; alertColor = 0xFFCC00; warningColor = 0xCC0000; successColor = 0xFF00; failureColor = 0xFF0000; _parseSheet(_defaultSheet); } } }//package com.google.analytics.debug
Section 38
//Alert (com.google.analytics.debug.Alert) package com.google.analytics.debug { import flash.events.*; public class Alert extends Label { public var autoClose:Boolean;// = true public var actionOnNextLine:Boolean;// = true private var _actions:Array; public function Alert(text:String, actions:Array, tag:String="uiAlert", color:uint=0, alignement:Align=null, stickToEdge:Boolean=false, actionOnNextLine:Boolean=true){ if (color == 0){ color = Style.alertColor; }; if (alignement == null){ alignement = Align.center; }; super(text, tag, color, alignement, stickToEdge); this.selectable = true; super.mouseChildren = true; this.buttonMode = true; this.mouseEnabled = true; this.useHandCursor = true; this.actionOnNextLine = actionOnNextLine; _actions = []; var i:int; while (i < actions.length) { actions[i].container = this; _actions.push(actions[i]); i++; }; } private function _defineActions():void{ var action:AlertAction; var str:String = ""; if (actionOnNextLine){ str = (str + "\n"); } else { str = (str + " |"); }; str = (str + " "); var actions:Array = []; var i:int; while (i < _actions.length) { action = _actions[i]; actions.push((((("<a href=\"event:" + action.activator) + "\">") + action.name) + "</a>")); i++; }; str = (str + actions.join(" | ")); appendText(str, "uiAlertAction"); } protected function isValidAction(action:String):Boolean{ var i:int; while (i < _actions.length) { if (action == _actions[i].activator){ return (true); }; i++; }; return (false); } override protected function layout():void{ super.layout(); _defineActions(); } protected function getAction(name:String):AlertAction{ var i:int; while (i < _actions.length) { if (name == _actions[i].activator){ return (_actions[i]); }; i++; }; return (null); } protected function spaces(num:int):String{ var str:String = ""; var spc:String = " "; var i:int; while (i < (num + 1)) { str = (str + spc); i++; }; return (str); } override public function onLink(event:TextEvent):void{ var action:AlertAction; if (isValidAction(event.text)){ action = getAction(event.text); if (action){ action.execute(); }; }; if (autoClose){ close(); }; } public function close():void{ if (parent != null){ parent.removeChild(this); }; } } }//package com.google.analytics.debug
Section 39
//AlertAction (com.google.analytics.debug.AlertAction) package com.google.analytics.debug { public class AlertAction { public var container:Alert; private var _callback; public var activator:String; public var name:String; public function AlertAction(name:String, activator:String, callback){ super(); this.name = name; this.activator = activator; _callback = callback; } public function execute():void{ if (_callback){ if ((_callback is Function)){ (_callback as Function)(); } else { if ((_callback is String)){ var _local1 = container; _local1[_callback](); }; }; }; } } }//package com.google.analytics.debug
Section 40
//Align (com.google.analytics.debug.Align) package com.google.analytics.debug { public class Align { private var _value:int; private var _name:String; public static const bottomRight:Align = new Align(18, "bottomRight"); ; public static const right:Align = new Align(16, "right"); ; public static const left:Align = new Align(32, "left"); ; public static const topRight:Align = new Align(17, "topRight"); ; public static const bottom:Align = new Align(2, "bottom"); ; public static const bottomLeft:Align = new Align(34, "bottomLeft"); ; public static const topLeft:Align = new Align(33, "topLeft"); ; public static const center:Align = new Align(0x0100, "center"); ; public static const none:Align = new Align(0, "none"); ; public static const top:Align = new Align(1, "top"); ; public function Align(value:int=0, name:String=""){ super(); _value = value; _name = name; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.debug
Section 41
//Background (com.google.analytics.debug.Background) package com.google.analytics.debug { import flash.display.*; public class Background { public function Background(){ super(); } public static function drawRounded(target, g:Graphics, width:uint=0, height:uint=0):void{ var W:uint; var H:uint; var R:uint = Style.roundedCorner; if ((((width > 0)) && ((height > 0)))){ W = width; H = height; } else { W = target.width; H = target.height; }; if (((target.stickToEdge) && (!((target.alignement == Align.none))))){ switch (target.alignement){ case Align.top: g.drawRoundRectComplex(0, 0, W, H, 0, 0, R, R); break; case Align.topLeft: g.drawRoundRectComplex(0, 0, W, H, 0, 0, 0, R); break; case Align.topRight: g.drawRoundRectComplex(0, 0, W, H, 0, 0, R, 0); break; case Align.bottom: g.drawRoundRectComplex(0, 0, W, H, R, R, 0, 0); break; case Align.bottomLeft: g.drawRoundRectComplex(0, 0, W, H, 0, R, 0, 0); break; case Align.bottomRight: g.drawRoundRectComplex(0, 0, W, H, R, 0, 0, 0); break; case Align.left: g.drawRoundRectComplex(0, 0, W, H, 0, R, 0, R); break; case Align.right: g.drawRoundRectComplex(0, 0, W, H, R, 0, R, 0); break; case Align.center: g.drawRoundRect(0, 0, W, H, R, R); break; }; } else { g.drawRoundRect(0, 0, W, H, R, R); }; } } }//package com.google.analytics.debug
Section 42
//Debug (com.google.analytics.debug.Debug) package com.google.analytics.debug { import flash.events.*; import flash.ui.*; public class Debug extends Label { private var _lines:Array; private var _preferredForcedWidth:uint;// = 540 private var _linediff:int;// = 0 public var maxLines:uint;// = 16 public static var count:uint; public function Debug(color:uint=0, alignement:Align=null, stickToEdge:Boolean=false){ if (alignement == null){ alignement = Align.bottom; }; super("", "uiLabel", color, alignement, stickToEdge); this.name = ("Debug" + count++); _lines = []; selectable = true; addEventListener(KeyboardEvent.KEY_DOWN, onKey); } public function writeBold(message:String):void{ write(message, true); } private function _getLinesToDisplay(direction:int=0):Array{ var lines:Array; var start:uint; var end:uint; if ((_lines.length - 1) > maxLines){ if ((_linediff <= 0)){ _linediff = (_linediff + direction); } else { if ((((_linediff > 0)) && ((direction < 0)))){ _linediff = (_linediff + direction); }; }; start = ((_lines.length - maxLines) + _linediff); end = (start + maxLines); lines = _lines.slice(start, end); } else { lines = _lines; }; return (lines); } private function onKey(event:KeyboardEvent=null):void{ var lines:Array; switch (event.keyCode){ case Keyboard.DOWN: lines = _getLinesToDisplay(1); break; case Keyboard.UP: lines = _getLinesToDisplay(-1); break; default: lines = null; }; if (lines == null){ return; }; text = lines.join("\n"); } override public function get forcedWidth():uint{ if (this.parent){ if (UISprite(this.parent).forcedWidth > _preferredForcedWidth){ return (_preferredForcedWidth); }; return (UISprite(this.parent).forcedWidth); } else { }; return (!NULL!); } public function write(message:String, bold:Boolean=false):void{ var inputLines:Array; if (message.indexOf("") > -1){ inputLines = message.split("\n"); } else { inputLines = [message]; }; var pre:String = ""; var post:String = ""; if (bold){ pre = "<b>"; post = "</b>"; }; var i:int; while (i < inputLines.length) { _lines.push(((pre + inputLines[i]) + post)); i++; }; var lines:Array = _getLinesToDisplay(); text = lines.join("\n"); } public function close():void{ dispose(); } override protected function dispose():void{ removeEventListener(KeyboardEvent.KEY_DOWN, onKey); super.dispose(); } } }//package com.google.analytics.debug
Section 43
//DebugConfiguration (com.google.analytics.debug.DebugConfiguration) package com.google.analytics.debug { import com.google.analytics.core.*; import flash.net.*; import flash.utils.*; public class DebugConfiguration { public var showHideKey:Number;// = 32 private var _mode:VisualDebugMode; private var _verbose:Boolean;// = false public var destroyKey:Number;// = 8 public var GIFRequests:Boolean;// = false public var showInfos:Boolean;// = true public var infoTimeout:Number;// = 1000 public var minimizedOnStart:Boolean;// = false private var _active:Boolean;// = false public var traceOutput:Boolean;// = false public var layout:ILayout; public var warningTimeout:Number;// = 1500 public var javascript:Boolean;// = false public var showWarnings:Boolean;// = true private var _visualInitialized:Boolean;// = false public function DebugConfiguration(){ _mode = VisualDebugMode.basic; super(); } public function get verbose():Boolean{ return (_verbose); } public function set verbose(value:Boolean):void{ _verbose = value; } public function set mode(value):void{ if ((value is String)){ switch (value){ case "geek": value = VisualDebugMode.geek; break; case "advanced": value = VisualDebugMode.advanced; break; case "basic": default: value = VisualDebugMode.basic; }; }; _mode = value; } public function success(message:String):void{ if (layout){ layout.createSuccessAlert(message); }; if (traceOutput){ trace((("[+] " + message) + " !!")); }; } public function get active():Boolean{ return (_active); } private function _initializeVisual():void{ if (layout){ layout.init(); _visualInitialized = true; }; } private function _destroyVisual():void{ if (((layout) && (_visualInitialized))){ layout.destroy(); }; } public function warning(message:String, mode:VisualDebugMode=null):void{ if (_filter(mode)){ return; }; if (((layout) && (showWarnings))){ layout.createWarning(message); }; if (traceOutput){ trace((("## " + message) + " ##")); }; } private function _filter(mode:VisualDebugMode=null):Boolean{ return (((mode) && ((int(mode) >= int(this.mode))))); } public function failure(message:String):void{ if (layout){ layout.createFailureAlert(message); }; if (traceOutput){ trace((("[-] " + message) + " !!")); }; } public function get mode(){ return (_mode); } public function set active(value:Boolean):void{ _active = value; if (_active){ _initializeVisual(); } else { _destroyVisual(); }; } protected function trace(message:String):void{ var msgs:Array; var j:int; var messages:Array = []; var pre0:String = ""; var pre1:String = ""; if (this.mode == VisualDebugMode.geek){ pre0 = (getTimer() + " - "); pre1 = (new Array(pre0.length).join(" ") + " "); }; if (message.indexOf("\n") > -1){ msgs = message.split("\n"); j = 0; while (j < msgs.length) { if (msgs[j] == ""){ } else { if (j == 0){ messages.push((pre0 + msgs[j])); } else { messages.push((pre1 + msgs[j])); }; }; j++; }; } else { messages.push((pre0 + message)); }; var len:int = messages.length; var i:int; while (i < len) { trace(messages[i]); i++; }; } public function alert(message:String):void{ if (layout){ layout.createAlert(message); }; if (traceOutput){ trace((("!! " + message) + " !!")); }; } public function info(message:String, mode:VisualDebugMode=null):void{ if (_filter(mode)){ return; }; if (((layout) && (showInfos))){ layout.createInfo(message); }; if (traceOutput){ trace(message); }; } public function alertGifRequest(message:String, request:URLRequest, ref:GIFRequest):void{ if (layout){ layout.createGIFRequestAlert(message, request, ref); }; if (traceOutput){ trace(((">> " + message) + " <<")); }; } } }//package com.google.analytics.debug
Section 44
//FailureAlert (com.google.analytics.debug.FailureAlert) package com.google.analytics.debug { public class FailureAlert extends Alert { public function FailureAlert(debug:DebugConfiguration, text:String, actions:Array){ var alignement:Align = Align.bottomLeft; var stickToEdge:Boolean; var actionOnNextLine:Boolean; if (debug.verbose){ text = ((("<u><span class=\"uiAlertTitle\">Failure</span>" + spaces(18)) + "</u>\n\n") + text); alignement = Align.center; stickToEdge = false; actionOnNextLine = true; }; super(text, actions, "uiFailure", Style.failureColor, alignement, stickToEdge, actionOnNextLine); } } }//package com.google.analytics.debug
Section 45
//GIFRequestAlert (com.google.analytics.debug.GIFRequestAlert) package com.google.analytics.debug { public class GIFRequestAlert extends Alert { public function GIFRequestAlert(text:String, actions:Array){ super(text, actions); } } }//package com.google.analytics.debug
Section 46
//ILayout (com.google.analytics.debug.ILayout) package com.google.analytics.debug { import flash.display.*; import com.google.analytics.core.*; import flash.net.*; public interface ILayout { function createAlert(:String):void; function addToStage(:DisplayObject):void; function createGIFRequestAlert(_arg1:String, _arg2:URLRequest, _arg3:GIFRequest):void; function createWarning(:String):void; function createPanel(_arg1:String, _arg2:uint, _arg3:uint):void; function createInfo(:String):void; function createFailureAlert(:String):void; function addToPanel(_arg1:String, _arg2:DisplayObject):void; function init():void; function createSuccessAlert(:String):void; function createVisualDebug():void; function destroy():void; function bringToFront(:DisplayObject):void; function isAvailable():Boolean; } }//package com.google.analytics.debug
Section 47
//Info (com.google.analytics.debug.Info) package com.google.analytics.debug { import flash.events.*; import flash.utils.*; public class Info extends Label { private var _timer:Timer; public function Info(text:String="", timeout:uint=3000){ super(text, "uiInfo", Style.infoColor, Align.top, true); if (timeout > 0){ _timer = new Timer(timeout, 1); _timer.start(); _timer.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete, false, 0, true); }; } public function close():void{ if (parent != null){ parent.removeChild(this); }; } override public function onLink(event:TextEvent):void{ switch (event.text){ case "hide": close(); break; }; } public function onComplete(event:TimerEvent):void{ close(); } } }//package com.google.analytics.debug
Section 48
//Label (com.google.analytics.debug.Label) package com.google.analytics.debug { import flash.display.*; import flash.events.*; import flash.text.*; public class Label extends UISprite { private var _color:uint; private var _background:Shape; private var _textField:TextField; public var stickToEdge:Boolean; private var _text:String; protected var selectable:Boolean; private var _tag:String; public static var count:uint = 0; public function Label(text:String="", tag:String="uiLabel", color:uint=0, alignement:Align=null, stickToEdge:Boolean=false){ super(); this.name = ("Label" + count++); selectable = false; _background = new Shape(); _textField = new TextField(); _text = text; _tag = tag; if (alignement == null){ alignement = Align.none; }; this.alignement = alignement; this.stickToEdge = stickToEdge; if (color == 0){ color = Style.backgroundColor; }; _color = color; _textField.addEventListener(TextEvent.LINK, onLink); } public function get tag():String{ return (_tag); } private function _draw():void{ var g:Graphics = _background.graphics; g.clear(); g.beginFill(_color); var W:uint = _textField.width; var H:uint = _textField.height; if (forcedWidth > 0){ W = forcedWidth; }; Background.drawRounded(this, g, W, H); g.endFill(); } public function get text():String{ return (_textField.text); } public function appendText(value:String, newtag:String=""):void{ if (value == ""){ return; }; if (newtag == ""){ newtag = tag; }; _textField.htmlText = (_textField.htmlText + (((("<span class=\"" + newtag) + "\">") + value) + "</span>")); _text = (_text + value); _draw(); resize(); } public function set text(value:String):void{ if (value == ""){ value = _text; }; _textField.htmlText = (((("<span class=\"" + tag) + "\">") + value) + "</span>"); _text = value; _draw(); resize(); } override protected function layout():void{ _textField.type = TextFieldType.DYNAMIC; _textField.autoSize = TextFieldAutoSize.LEFT; _textField.background = false; _textField.selectable = selectable; _textField.multiline = true; _textField.styleSheet = Style.sheet; this.text = _text; addChild(_background); addChild(_textField); } public function set tag(value:String):void{ _tag = value; text = ""; } public function onLink(event:TextEvent):void{ } override protected function dispose():void{ _textField.removeEventListener(TextEvent.LINK, onLink); super.dispose(); } } }//package com.google.analytics.debug
Section 49
//Layout (com.google.analytics.debug.Layout) package com.google.analytics.debug { import flash.display.*; import flash.events.*; import com.google.analytics.core.*; import flash.net.*; import com.google.analytics.*; public class Layout implements ILayout { private var _display:DisplayObject; private var _infoQueue:Array; private var _maxCharPerLine:int;// = 85 private var _hasInfo:Boolean; private var _warningQueue:Array; private var _hasDebug:Boolean; private var _hasWarning:Boolean; private var _mainPanel:Panel; private var _GRAlertQueue:Array; private var _debug:DebugConfiguration; public var visualDebug:Debug; private var _hasGRAlert:Boolean; public function Layout(debug:DebugConfiguration, display:DisplayObject){ super(); _display = display; _debug = debug; _hasWarning = false; _hasInfo = false; _hasDebug = false; _hasGRAlert = false; _warningQueue = []; _infoQueue = []; _GRAlertQueue = []; } private function onKey(event:KeyboardEvent=null):void{ switch (event.keyCode){ case _debug.showHideKey: _mainPanel.visible = !(_mainPanel.visible); break; case _debug.destroyKey: destroy(); break; }; } public function createWarning(message:String):void{ if (((_hasWarning) || (!(isAvailable())))){ _warningQueue.push(message); return; }; message = _filterMaxChars(message); _hasWarning = true; var w:Warning = new Warning(message, _debug.warningTimeout); addToPanel("analytics", w); w.addEventListener(Event.REMOVED_FROM_STAGE, _clearWarning, false, 0, true); if (_hasDebug){ visualDebug.writeBold(message); }; } public function bringToFront(visual:DisplayObject):void{ _display.stage.setChildIndex(visual, (_display.stage.numChildren - 1)); } public function createFailureAlert(message:String):void{ var actionClose:AlertAction; if (_debug.verbose){ message = _filterMaxChars(message); actionClose = new AlertAction("Close", "close", "close"); } else { actionClose = new AlertAction("X", "close", "close"); }; var fa:Alert = new FailureAlert(_debug, message, [actionClose]); addToPanel("analytics", fa); if (_hasDebug){ if (_debug.verbose){ message = message.split("\n").join(""); message = _filterMaxChars(message, 66); }; visualDebug.writeBold(message); }; } public function init():void{ var spaces = 10; var W:uint = (_display.stage.stageWidth - (spaces * 2)); var H:uint = (_display.stage.stageHeight - (spaces * 2)); var mp:Panel = new Panel("analytics", W, H); mp.alignement = Align.top; mp.stickToEdge = false; mp.title = ("Google Analytics v" + GATracker.version); _mainPanel = mp; addToStage(mp); bringToFront(mp); if (_debug.minimizedOnStart){ _mainPanel.onToggle(); }; createVisualDebug(); _display.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKey, false, 0, true); } public function addToPanel(name:String, visual:DisplayObject):void{ var panel:Panel; var d:DisplayObject = _display.stage.getChildByName(name); if (d){ panel = (d as Panel); panel.addData(visual); } else { trace((("panel \"" + name) + "\" not found")); }; } private function _clearInfo(event:Event):void{ _hasInfo = false; if (_infoQueue.length > 0){ createInfo(_infoQueue.shift()); }; } private function _filterMaxChars(message:String, maxCharPerLine:int=0):String{ var line:String; var CRLF:String = "\n"; var output:Array = []; var lines:Array = message.split(CRLF); if (maxCharPerLine == 0){ maxCharPerLine = _maxCharPerLine; }; var i:int; while (i < lines.length) { line = lines[i]; while (line.length > maxCharPerLine) { output.push(line.substr(0, maxCharPerLine)); line = line.substring(maxCharPerLine); }; output.push(line); i++; }; return (output.join(CRLF)); } private function _clearGRAlert(event:Event):void{ _hasGRAlert = false; if (_GRAlertQueue.length > 0){ createGIFRequestAlert.apply(this, _GRAlertQueue.shift()); }; } public function createSuccessAlert(message:String):void{ var actionClose:AlertAction; if (_debug.verbose){ message = _filterMaxChars(message); actionClose = new AlertAction("Close", "close", "close"); } else { actionClose = new AlertAction("X", "close", "close"); }; var sa:Alert = new SuccessAlert(_debug, message, [actionClose]); addToPanel("analytics", sa); if (_hasDebug){ if (_debug.verbose){ message = message.split("\n").join(""); message = _filterMaxChars(message, 66); }; visualDebug.writeBold(message); }; } public function isAvailable():Boolean{ return (!((_display.stage == null))); } public function createAlert(message:String):void{ message = _filterMaxChars(message); var a:Alert = new Alert(message, [new AlertAction("Close", "close", "close")]); addToPanel("analytics", a); if (_hasDebug){ visualDebug.writeBold(message); }; } public function createInfo(message:String):void{ if (((_hasInfo) || (!(isAvailable())))){ _infoQueue.push(message); return; }; message = _filterMaxChars(message); _hasInfo = true; var i:Info = new Info(message, _debug.infoTimeout); addToPanel("analytics", i); i.addEventListener(Event.REMOVED_FROM_STAGE, _clearInfo, false, 0, true); if (_hasDebug){ visualDebug.write(message); }; } public function createGIFRequestAlert(message:String, request:URLRequest, ref:GIFRequest):void{ var message = message; var request = request; var ref = ref; if (_hasGRAlert){ _GRAlertQueue.push([message, request, ref]); return; }; _hasGRAlert = true; var f:Function = function ():void{ ref.sendRequest(request); }; message = _filterMaxChars(message); var gra:GIFRequestAlert = new GIFRequestAlert(message, [new AlertAction("OK", "ok", f), new AlertAction("Cancel", "cancel", "close")]); addToPanel("analytics", gra); gra.addEventListener(Event.REMOVED_FROM_STAGE, _clearGRAlert, false, 0, true); if (_hasDebug){ if (_debug.verbose){ message = message.split("\n").join(""); message = _filterMaxChars(message, 66); }; visualDebug.write(message); }; } public function createVisualDebug():void{ if (!visualDebug){ visualDebug = new Debug(); visualDebug.alignement = Align.bottom; visualDebug.stickToEdge = true; addToPanel("analytics", visualDebug); _hasDebug = true; }; } public function addToStage(visual:DisplayObject):void{ _display.stage.addChild(visual); } private function _clearWarning(event:Event):void{ _hasWarning = false; if (_warningQueue.length > 0){ createWarning(_warningQueue.shift()); }; } public function createPanel(name:String, width:uint, height:uint):void{ var p:Panel = new Panel(name, width, height); p.alignement = Align.center; p.stickToEdge = false; addToStage(p); bringToFront(p); } public function destroy():void{ _mainPanel.close(); _debug.layout = null; } } }//package com.google.analytics.debug
Section 50
//Margin (com.google.analytics.debug.Margin) package com.google.analytics.debug { public class Margin { public var top:int; public var left:int; public var bottom:int; public var right:int; public function Margin(top:int=0, bottom:int=0, left:int=0, right:int=0){ super(); this.top = top; this.bottom = bottom; this.left = left; this.right = right; } } }//package com.google.analytics.debug
Section 51
//Panel (com.google.analytics.debug.Panel) package com.google.analytics.debug { import flash.display.*; import flash.events.*; public class Panel extends UISprite { private var _savedH:uint; private var _data:UISprite; private var _mask:Sprite; private var _background:Shape; private var _savedW:uint; private var _stickToEdge:Boolean; private var _border:Shape; private var _borderColor:uint; protected var baseAlpha:Number; private var _backgroundColor:uint; private var _title:Label; private var _colapsed:Boolean; private var _name:String; public function Panel(name:String, width:uint, height:uint, backgroundColor:uint=0, borderColor:uint=0, baseAlpha:Number=0.3, alignement:Align=null, stickToEdge:Boolean=false){ super(); _name = name; this.name = name; this.mouseEnabled = false; _colapsed = false; forcedWidth = width; forcedHeight = height; this.baseAlpha = baseAlpha; _background = new Shape(); _data = new UISprite(); _data.forcedWidth = width; _data.forcedHeight = height; _data.mouseEnabled = false; _title = new Label(name, "uiLabel", 0xFFFFFF, Align.topLeft, stickToEdge); _title.buttonMode = true; _title.margin.top = 0.6; _title.margin.left = 0.6; _title.addEventListener(MouseEvent.CLICK, onToggle); _title.mouseChildren = false; _border = new Shape(); _mask = new Sprite(); _mask.useHandCursor = false; _mask.mouseEnabled = false; _mask.mouseChildren = false; if (alignement == null){ alignement = Align.none; }; this.alignement = alignement; this.stickToEdge = stickToEdge; if (backgroundColor == 0){ backgroundColor = Style.backgroundColor; }; _backgroundColor = backgroundColor; if (borderColor == 0){ borderColor = Style.borderColor; }; _borderColor = borderColor; } public function get stickToEdge():Boolean{ return (_stickToEdge); } public function onToggle(event:MouseEvent=null):void{ if (_colapsed){ _data.visible = true; } else { _data.visible = false; }; _colapsed = !(_colapsed); _update(); resize(); } public function set stickToEdge(value:Boolean):void{ _stickToEdge = value; _title.stickToEdge = value; } override protected function dispose():void{ _title.removeEventListener(MouseEvent.CLICK, onToggle); super.dispose(); } private function _draw():void{ var W:uint; var H:uint; if (((_savedW) && (_savedH))){ forcedWidth = _savedW; forcedHeight = _savedH; }; if (!_colapsed){ W = forcedWidth; H = forcedHeight; } else { W = _title.width; H = _title.height; _savedW = forcedWidth; _savedH = forcedHeight; forcedWidth = W; forcedHeight = H; }; var g0:Graphics = _background.graphics; g0.clear(); g0.beginFill(_backgroundColor); Background.drawRounded(this, g0, W, H); g0.endFill(); var g01:Graphics = _data.graphics; g01.clear(); g01.beginFill(_backgroundColor, 0); Background.drawRounded(this, g01, W, H); g01.endFill(); var g1:Graphics = _border.graphics; g1.clear(); g1.lineStyle(0.1, _borderColor); Background.drawRounded(this, g1, W, H); g1.endFill(); var g2:Graphics = _mask.graphics; g2.clear(); g2.beginFill(_backgroundColor); Background.drawRounded(this, g2, (W + 1), (H + 1)); g2.endFill(); } public function get title():String{ return (_title.text); } private function _update():void{ _draw(); if (baseAlpha < 1){ _background.alpha = baseAlpha; _border.alpha = baseAlpha; }; } public function addData(child:DisplayObject):void{ _data.addChild(child); } override protected function layout():void{ _update(); addChild(_background); addChild(_data); addChild(_title); addChild(_border); addChild(_mask); mask = _mask; } public function set title(value:String):void{ _title.text = value; } public function close():void{ dispose(); if (parent != null){ parent.removeChild(this); }; } } }//package com.google.analytics.debug
Section 52
//Style (com.google.analytics.debug.Style) package com.google.analytics.debug { public const Style:_Style = new _Style(); }//package com.google.analytics.debug
Section 53
//SuccessAlert (com.google.analytics.debug.SuccessAlert) package com.google.analytics.debug { public class SuccessAlert extends Alert { public function SuccessAlert(debug:DebugConfiguration, text:String, actions:Array){ var alignement:Align = Align.bottomLeft; var stickToEdge:Boolean; var actionOnNextLine:Boolean; if (debug.verbose){ text = ((("<u><span class=\"uiAlertTitle\">Success</span>" + spaces(18)) + "</u>\n\n") + text); alignement = Align.center; stickToEdge = false; actionOnNextLine = true; }; super(text, actions, "uiSuccess", Style.successColor, alignement, stickToEdge, actionOnNextLine); } } }//package com.google.analytics.debug
Section 54
//UISprite (com.google.analytics.debug.UISprite) package com.google.analytics.debug { import flash.display.*; import flash.events.*; public class UISprite extends Sprite { private var _forcedWidth:uint; public var margin:Margin; protected var alignTarget:DisplayObject; protected var listenResize:Boolean; public var alignement:Align; private var _forcedHeight:uint; public function UISprite(alignTarget:DisplayObject=null){ super(); listenResize = false; alignement = Align.none; this.alignTarget = alignTarget; margin = new Margin(); addEventListener(Event.ADDED_TO_STAGE, _onAddedToStage); addEventListener(Event.REMOVED_FROM_STAGE, _onRemovedFromStage); } public function get forcedHeight():uint{ if (_forcedHeight){ return (_forcedHeight); }; return (height); } private function _onAddedToStage(event:Event):void{ layout(); resize(); } protected function dispose():void{ var d:DisplayObject; var i:int; while (i < numChildren) { d = getChildAt(i); if (d){ removeChild(d); }; i++; }; } public function set forcedHeight(value:uint):void{ _forcedHeight = value; } public function set forcedWidth(value:uint):void{ _forcedWidth = value; } protected function layout():void{ } public function get forcedWidth():uint{ if (_forcedWidth){ return (_forcedWidth); }; return (width); } public function alignTo(alignement:Align, target:DisplayObject=null):void{ var H:uint; var W:uint; var X:uint; var Y:uint; var t:UISprite; if (target == null){ if ((parent is Stage)){ target = this.stage; } else { target = parent; }; }; if (target == this.stage){ if (this.stage == null){ return; }; H = this.stage.stageHeight; W = this.stage.stageWidth; X = 0; Y = 0; } else { t = (target as UISprite); if (t.forcedHeight){ H = t.forcedHeight; } else { H = t.height; }; if (t.forcedWidth){ W = t.forcedWidth; } else { W = t.width; }; X = 0; Y = 0; }; switch (alignement){ case Align.top: x = ((W / 2) - (forcedWidth / 2)); y = (Y + margin.top); break; case Align.bottom: x = ((W / 2) - (forcedWidth / 2)); y = (((Y + H) - forcedHeight) - margin.bottom); break; case Align.left: x = (X + margin.left); y = ((H / 2) - (forcedHeight / 2)); break; case Align.right: x = (((X + W) - forcedWidth) - margin.right); y = ((H / 2) - (forcedHeight / 2)); break; case Align.center: x = ((W / 2) - (forcedWidth / 2)); y = ((H / 2) - (forcedHeight / 2)); break; case Align.topLeft: x = (X + margin.left); y = (Y + margin.top); break; case Align.topRight: x = (((X + W) - forcedWidth) - margin.right); y = (Y + margin.top); break; case Align.bottomLeft: x = (X + margin.left); y = (((Y + H) - forcedHeight) - margin.bottom); break; case Align.bottomRight: x = (((X + W) - forcedWidth) - margin.right); y = (((Y + H) - forcedHeight) - margin.bottom); break; }; if (((!(listenResize)) && (!((alignement == Align.none))))){ target.addEventListener(Event.RESIZE, onResize, false, 0, true); listenResize = true; }; this.alignement = alignement; this.alignTarget = target; } private function _onRemovedFromStage(event:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, _onAddedToStage); removeEventListener(Event.REMOVED_FROM_STAGE, _onRemovedFromStage); dispose(); } public function resize():void{ if (alignement != Align.none){ alignTo(alignement, alignTarget); }; } protected function onResize(event:Event):void{ resize(); } } }//package com.google.analytics.debug
Section 55
//Warning (com.google.analytics.debug.Warning) package com.google.analytics.debug { import flash.events.*; import flash.utils.*; public class Warning extends Label { private var _timer:Timer; public function Warning(text:String="", timeout:uint=3000){ super(text, "uiWarning", Style.warningColor, Align.top, false); margin.top = 32; if (timeout > 0){ _timer = new Timer(timeout, 1); _timer.start(); _timer.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete, false, 0, true); }; } public function close():void{ if (parent != null){ parent.removeChild(this); }; } override public function onLink(event:TextEvent):void{ switch (event.text){ case "hide": close(); break; }; } public function onComplete(event:TimerEvent):void{ close(); } } }//package com.google.analytics.debug
Section 56
//VisualDebugMode (com.google.analytics.debug.VisualDebugMode) package com.google.analytics.debug { public class VisualDebugMode { private var _value:int; private var _name:String; public static const advanced:VisualDebugMode = new VisualDebugMode(1, "advanced"); ; public static const geek:VisualDebugMode = new VisualDebugMode(2, "geek"); ; public static const basic:VisualDebugMode = new VisualDebugMode(0, "basic"); ; public function VisualDebugMode(value:int=0, name:String=""){ super(); _value = value; _name = name; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.debug
Section 57
//Item (com.google.analytics.ecommerce.Item) package com.google.analytics.ecommerce { import com.google.analytics.utils.*; public class Item { private var _price:String; private var _id:String; private var _sku:String; private var _category:String; private var _quantity:String; private var _name:String; public function Item(id:String, sku:String, name:String, category:String, price:String, quantity:String){ super(); this._id = id; this._sku = sku; this._name = name; this._category = category; this._price = price; this._quantity = quantity; } public function set sku(value:String):void{ _sku = value; } public function get price():String{ return (_price); } public function get name():String{ return (_name); } public function get quantity():String{ return (_quantity); } public function set name(value:String):void{ _name = value; } public function set price(value:String):void{ _price = value; } public function get id():String{ return (_id); } public function get sku():String{ return (_sku); } public function set quantity(value:String):void{ _quantity = value; } public function toGifParams():Variables{ var vars:Variables = new Variables(); vars.URIencode = true; vars.post = ["utmt", "utmtid", "utmipc", "utmipn", "utmiva", "utmipr", "utmiqt"]; vars.utmt = "item"; vars.utmtid = _id; vars.utmipc = _sku; vars.utmipn = _name; vars.utmiva = _category; vars.utmipr = _price; vars.utmiqt = _quantity; return (vars); } public function set id(value:String):void{ _id = value; } public function set category(value:String):void{ _category = value; } public function get category():String{ return (_category); } } }//package com.google.analytics.ecommerce
Section 58
//Transaction (com.google.analytics.ecommerce.Transaction) package com.google.analytics.ecommerce { import com.google.analytics.utils.*; public class Transaction { private var _items:Array; private var _total:String; private var _vars:Variables; private var _shipping:String; private var _city:String; private var _state:String; private var _country:String; private var _tax:String; private var _affiliation:String; private var _id:String; public function Transaction(id:String, affiliation:String, total:String, tax:String, shipping:String, city:String, state:String, country:String){ super(); this._id = id; this._affiliation = affiliation; this._total = total; this._tax = tax; this._shipping = shipping; this._city = city; this._state = state; this._country = country; _items = new Array(); } public function get total():String{ return (_total); } public function getItemFromArray(i:Number):Item{ return (_items[i]); } public function set total(value:String):void{ _total = value; } public function getItem(sku:String):Item{ var i:Number; i = 0; while (i < _items.length) { if (_items[i].sku == sku){ return (_items[i]); }; i++; }; return (null); } public function getItemsLength():Number{ return (_items.length); } public function addItem(sku:String, name:String, category:String, price:String, quantity:String):void{ var newItem:Item; newItem = getItem(sku); if (newItem == null){ newItem = new Item(_id, sku, name, category, price, quantity); _items.push(newItem); } else { newItem.name = name; newItem.category = category; newItem.price = price; newItem.quantity = quantity; }; } public function set shipping(value:String):void{ _shipping = value; } public function get country():String{ return (_country); } public function get state():String{ return (_state); } public function set tax(value:String):void{ _tax = value; } public function set affiliation(value:String):void{ _affiliation = value; } public function set state(value:String):void{ _state = value; } public function get id():String{ return (_id); } public function get tax():String{ return (_tax); } public function toGifParams():Variables{ var vars:Variables = new Variables(); vars.URIencode = true; vars.utmt = "tran"; vars.utmtid = id; vars.utmtst = affiliation; vars.utmtto = total; vars.utmttx = tax; vars.utmtsp = shipping; vars.utmtci = city; vars.utmtrg = state; vars.utmtco = country; vars.post = ["utmtid", "utmtst", "utmtto", "utmttx", "utmtsp", "utmtci", "utmtrg", "utmtco"]; return (vars); } public function get affiliation():String{ return (_affiliation); } public function get city():String{ return (_city); } public function get shipping():String{ return (_shipping); } public function set id(value:String):void{ _id = value; } public function set city(value:String):void{ _city = value; } public function set country(value:String):void{ _country = value; } } }//package com.google.analytics.ecommerce
Section 59
//AnalyticsEvent (com.google.analytics.events.AnalyticsEvent) package com.google.analytics.events { import flash.events.*; import com.google.analytics.*; public class AnalyticsEvent extends Event { public var tracker:AnalyticsTracker; public static const READY:String = "ready"; public function AnalyticsEvent(type:String, tracker:AnalyticsTracker, bubbles:Boolean=false, cancelable:Boolean=false){ super(type, bubbles, cancelable); this.tracker = tracker; } override public function clone():Event{ return (new AnalyticsEvent(type, tracker, bubbles, cancelable)); } } }//package com.google.analytics.events
Section 60
//AdSenseGlobals (com.google.analytics.external.AdSenseGlobals) package com.google.analytics.external { import com.google.analytics.debug.*; public class AdSenseGlobals extends JavascriptProxy { private var _gaGlobalVerified:Boolean;// = false public static var gaGlobal_js:XML = <script> <![CDATA[ function() { try { gaGlobal } catch(e) { gaGlobal = {} ; } } ]]> </script> ; public function AdSenseGlobals(debug:DebugConfiguration){ super(debug); } public function set vid(value:String):void{ if (!isAvailable()){ return; }; _verify(); setProperty("gaGlobal.vid", value); } public function get hid():String{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal.hid")); } public function set hid(value:String):void{ if (!isAvailable()){ return; }; _verify(); setProperty("gaGlobal.hid", value); } public function get dh():String{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal.dh")); } public function get sid():String{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal.sid")); } public function get vid():String{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal.vid")); } private function _verify():void{ if (!_gaGlobalVerified){ executeBlock(gaGlobal_js); _gaGlobalVerified = true; }; } public function set sid(value:String):void{ if (!isAvailable()){ return; }; _verify(); setProperty("gaGlobal.sid", value); } public function get gaGlobal():Object{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal")); } } }//package com.google.analytics.external
Section 61
//HTMLDOM (com.google.analytics.external.HTMLDOM) package com.google.analytics.external { import com.google.analytics.debug.*; public class HTMLDOM extends JavascriptProxy { private var _referrer:String; private var _language:String; private var _host:String; private var _pathname:String; private var _location:String; private var _search:String; private var _characterSet:String; private var _title:String; private var _protocol:String; private var _colorDepth:String; public static var cache_properties_js:XML = <script> <![CDATA[ function() { var obj = {}; obj.host = document.location.host; obj.language = navigator.language ? navigator.language : navigator.browserLanguage; obj.characterSet = document.characterSet ? document.characterSet : document.charset; obj.colorDepth = window.screen.colorDepth; obj.location = document.location.toString(); obj.pathname = document.location.pathname; obj.protocol = document.location.protocol; obj.search = document.location.search; obj.referrer = document.referrer; obj.title = document.title; return obj; } ]]> </script> ; public function HTMLDOM(debug:DebugConfiguration){ super(debug); } public function get search():String{ if (_search){ return (_search); }; if (!isAvailable()){ return (null); }; _search = getProperty("document.location.search"); return (_search); } public function get location():String{ if (_location){ return (_location); }; if (!isAvailable()){ return (null); }; _location = getPropertyString("document.location"); return (_location); } public function get pathname():String{ if (_pathname){ return (_pathname); }; if (!isAvailable()){ return (null); }; _pathname = getProperty("document.location.pathname"); return (_pathname); } public function cacheProperties():void{ if (!isAvailable()){ return; }; var obj:Object = call(cache_properties_js); if (obj){ _host = obj.host; _language = obj.language; _characterSet = obj.characterSet; _colorDepth = obj.colorDepth; _location = obj.location; _pathname = obj.pathname; _protocol = obj.protocol; _search = obj.search; _referrer = obj.referrer; _title = obj.title; }; } public function get language():String{ if (_language){ return (_language); }; if (!isAvailable()){ return (null); }; var lang:String = getProperty("navigator.language"); if (lang == null){ lang = getProperty("navigator.browserLanguage"); }; _language = lang; return (_language); } public function get colorDepth():String{ if (_colorDepth){ return (_colorDepth); }; if (!isAvailable()){ return (null); }; _colorDepth = getProperty("window.screen.colorDepth"); return (_colorDepth); } public function get referrer():String{ if (_referrer){ return (_referrer); }; if (!isAvailable()){ return (null); }; _referrer = getProperty("document.referrer"); return (_referrer); } public function get protocol():String{ if (_protocol){ return (_protocol); }; if (!isAvailable()){ return (null); }; _protocol = getProperty("document.location.protocol"); return (_protocol); } public function get host():String{ if (_host){ return (_host); }; if (!isAvailable()){ return (null); }; _host = getProperty("document.location.host"); return (_host); } public function get characterSet():String{ if (_characterSet){ return (_characterSet); }; if (!isAvailable()){ return (null); }; var cs:String = getProperty("document.characterSet"); if (cs == null){ cs = getProperty("document.charset"); }; _characterSet = cs; return (_characterSet); } public function get title():String{ if (_title){ return (_title); }; if (!isAvailable()){ return (null); }; _title = getProperty("document.title"); return (_title); } } }//package com.google.analytics.external
Section 62
//JavascriptProxy (com.google.analytics.external.JavascriptProxy) package com.google.analytics.external { import com.google.analytics.debug.*; import flash.external.*; import flash.system.*; public class JavascriptProxy { private var _notAvailableWarning:Boolean;// = true private var _debug:DebugConfiguration; public static var setProperty_js:XML = <script> <![CDATA[ function( path , value ) { var paths; var prop; if( path.indexOf(".") > 0 ) { paths = path.split("."); prop = paths.pop() ; } else { paths = []; prop = path; } var target = window ; var len = paths.length ; for( var i = 0 ; i < len ; i++ ) { target = target[ paths[i] ] ; } target[ prop ] = value ; } ]]> </script> ; public static var hasProperty_js:XML = <script> <![CDATA[ function( path ) { var paths; if( path.indexOf(".") > 0 ) { paths = path.split("."); } else { paths = [path]; } var target = window ; var len = paths.length ; for( var i = 0 ; i < len ; i++ ) { target = target[ paths[i] ] ; } if( target ) { return true; } else { return false; } } ]]> </script> ; public static var setPropertyRef_js:XML = <script> <![CDATA[ function( path , target ) { var paths; var prop; if( path.indexOf(".") > 0 ) { paths = path.split("."); prop = paths.pop() ; } else { paths = []; prop = path; } alert( "paths:"+paths.length+", prop:"+prop ); var targets; var name; if( target.indexOf(".") > 0 ) { targets = target.split("."); name = targets.pop(); } else { targets = []; name = target; } alert( "targets:"+targets.length+", name:"+name ); var root = window; var len = paths.length; for( var i = 0 ; i < len ; i++ ) { root = root[ paths[i] ] ; } var ref = window; var depth = targets.length; for( var j = 0 ; j < depth ; j++ ) { ref = ref[ targets[j] ] ; } root[ prop ] = ref[name] ; } ]]> </script> ; public function JavascriptProxy(debug:DebugConfiguration){ super(); _debug = debug; } public function getProperty(name:String){ return (call((name + ".valueOf"))); } public function hasProperty(path:String):Boolean{ return (call(hasProperty_js, path)); } public function setProperty(path:String, value):void{ call(setProperty_js, path, value); } public function executeBlock(data:String):void{ var data = data; if (isAvailable()){ ExternalInterface.call(data); //unresolved jump var _slot1 = e; if (_debug.javascript){ _debug.warning("ExternalInterface is not allowed.\nEnsure that allowScriptAccess is set to \"always\" in the Flash embed HTML."); }; //unresolved jump var _slot1 = e; if (_debug.javascript){ _debug.warning(("ExternalInterface failed to make the call\nreason: " + _slot1.message)); }; }; } public function getPropertyString(name:String):String{ return (call((name + ".toString"))); } public function setPropertyByReference(path:String, target:String):void{ call(setPropertyRef_js, path, target); } public function call(functionName:String, ... _args){ var output:String; var functionName = functionName; var args = _args; if (isAvailable()){ if (((_debug.javascript) && (_debug.verbose))){ output = ""; output = ("Flash->JS: " + functionName); output = (output + "( "); if (args.length > 0){ output = (output + args.join(",")); }; output = (output + " )"); _debug.info(output); }; args.unshift(functionName); return (ExternalInterface.call.apply(ExternalInterface, args)); //unresolved jump var _slot1 = e; if (_debug.javascript){ _debug.warning("ExternalInterface is not allowed.\nEnsure that allowScriptAccess is set to \"always\" in the Flash embed HTML."); }; //unresolved jump var _slot1 = e; if (_debug.javascript){ _debug.warning(("ExternalInterface failed to make the call\nreason: " + _slot1.message)); }; }; return (null); } public function isAvailable():Boolean{ var available:Boolean = ExternalInterface.available; if (((available) && ((Capabilities.playerType == "External")))){ available = false; }; if (((((!(available)) && (_debug.javascript))) && (_notAvailableWarning))){ _debug.warning("ExternalInterface is not available."); _notAvailableWarning = false; }; return (available); } } }//package com.google.analytics.external
Section 63
//Environment (com.google.analytics.utils.Environment) package com.google.analytics.utils { import com.google.analytics.debug.*; import com.google.analytics.external.*; import flash.system.*; public class Environment { private var _dom:HTMLDOM; private var _appName:String; private var _debug:DebugConfiguration; private var _appVersion:Version; private var _url:String; private var _protocol:Protocols; private var _userAgent:UserAgent; public function Environment(url:String="", app:String="", version:String="", debug:DebugConfiguration=null, dom:HTMLDOM=null){ var v:Version; super(); if (app == ""){ if (isAIR()){ app = "AIR"; } else { app = "Flash"; }; }; if (version == ""){ v = flashVersion; } else { v = Version.fromString(version); }; _url = url; _appName = app; _appVersion = v; _debug = debug; _dom = dom; } public function isAIR():Boolean{ return ((((playerType == "Desktop")) && ((Security.sandboxType.toString() == "application")))); } public function get screenWidth():Number{ return (Capabilities.screenResolutionX); } public function get playerType():String{ return (Capabilities.playerType); } public function get locationSearch():String{ var _search:String = _dom.search; if (_search){ return (_search); }; return (""); } public function get protocol():Protocols{ if (!_protocol){ _findProtocol(); }; return (_protocol); } public function get flashVersion():Version{ var v:Version = Version.fromString(Capabilities.version.split(" ")[1], ","); return (v); } public function get userAgent():UserAgent{ if (!_userAgent){ _userAgent = new UserAgent(this, appName, appVersion.toString(4)); }; return (_userAgent); } public function get languageEncoding():String{ var _charset:String; if (System.useCodePage){ _charset = _dom.characterSet; if (_charset){ return (_charset); }; return ("-"); }; return ("UTF-8"); } public function get appName():String{ return (_appName); } public function get screenColorDepth():String{ var color:String; switch (Capabilities.screenColor){ case "bw": color = "1"; break; case "gray": color = "2"; break; case "color": default: color = "24"; }; var _colorDepth:String = _dom.colorDepth; if (_colorDepth){ color = _colorDepth; }; return (color); } private function _findProtocol():void{ var URL:String; var test:String; var p:Protocols = Protocols.none; if (_url != ""){ URL = _url.toLowerCase(); test = URL.substr(0, 5); switch (test){ case "file:": p = Protocols.file; break; case "http:": p = Protocols.HTTP; break; case "https": if (URL.charAt(5) == ":"){ p = Protocols.HTTPS; }; break; default: _protocol = Protocols.none; }; }; var _proto:String = _dom.protocol; var proto:String = (p.toString() + ":").toLowerCase(); if (((((_proto) && (!((_proto == proto))))) && (_debug))){ _debug.warning(((("Protocol mismatch: SWF=" + proto) + ", DOM=") + _proto)); }; _protocol = p; } public function get locationSWFPath():String{ return (_url); } public function get platform():String{ var p:String = Capabilities.manufacturer; return (p.split("Adobe ")[1]); } public function get operatingSystem():String{ return (Capabilities.os); } public function set appName(value:String):void{ _appName = value; userAgent.applicationProduct = value; } function set url(value:String):void{ _url = value; } public function get referrer():String{ var _referrer:String = _dom.referrer; if (_referrer){ return (_referrer); }; if (protocol == Protocols.file){ return ("localhost"); }; return (""); } public function isInHTML():Boolean{ return ((Capabilities.playerType == "PlugIn")); } public function get language():String{ var _lang:String = _dom.language; var lang:String = Capabilities.language; if (_lang){ if ((((_lang.length > lang.length)) && ((_lang.substr(0, lang.length) == lang)))){ lang = _lang; }; }; return (lang); } public function get domainName():String{ var URL:String; var str:String; var end:int; if ((((protocol == Protocols.HTTP)) || ((protocol == Protocols.HTTPS)))){ URL = _url.toLowerCase(); if (protocol == Protocols.HTTP){ str = URL.split("http://").join(""); } else { if (protocol == Protocols.HTTPS){ str = URL.split("https://").join(""); }; }; end = str.indexOf("/"); if (end > -1){ str = str.substring(0, end); }; return (str); }; if (protocol == Protocols.file){ return ("localhost"); }; return (""); } public function set userAgent(custom:UserAgent):void{ _userAgent = custom; } public function set appVersion(value:Version):void{ _appVersion = value; userAgent.applicationVersion = value.toString(4); } public function get screenHeight():Number{ return (Capabilities.screenResolutionY); } public function get locationPath():String{ var _pathname:String = _dom.pathname; if (_pathname){ return (_pathname); }; return (""); } public function get documentTitle():String{ var _title:String = _dom.title; if (_title){ return (_title); }; return (""); } public function get appVersion():Version{ return (_appVersion); } } }//package com.google.analytics.utils
Section 64
//Protocols (com.google.analytics.utils.Protocols) package com.google.analytics.utils { public class Protocols { private var _value:int; private var _name:String; public static const none:Protocols = new Protocols(0, "none"); ; public static const HTTPS:Protocols = new Protocols(3, "HTTPS"); ; public static const file:Protocols = new Protocols(1, "file"); ; public static const HTTP:Protocols = new Protocols(2, "HTTP"); ; public function Protocols(value:int=0, name:String=""){ super(); _value = value; _name = name; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.utils
Section 65
//Timespan (com.google.analytics.utils.Timespan) package com.google.analytics.utils { public class Timespan { public static var sixmonths:Number = 15768000; public static var twoyears:Number = 63072000; public static var thirtyminutes:Number = 1800; public function Timespan(){ super(); } } }//package com.google.analytics.utils
Section 66
//URL (com.google.analytics.utils.URL) package com.google.analytics.utils { public class URL { private var _url:String; public function URL(url:String=""){ super(); _url = url.toLowerCase(); } public function get domain():String{ var parts:Array; if (((!((hostName == ""))) && ((hostName.indexOf(".") > -1)))){ parts = hostName.split("."); switch (parts.length){ case 2: return (hostName); case 3: if (parts[1] == "co"){ return (hostName); }; parts.shift(); return (parts.join(".")); case 4: parts.shift(); return (parts.join(".")); }; }; return (""); } public function get path():String{ var _path:String = _url; if (_path.indexOf("://") > -1){ _path = _path.split("://")[1]; }; if (_path.indexOf(hostName) == 0){ _path = _path.substr(hostName.length); }; if (_path.indexOf("?") > -1){ _path = _path.split("?")[0]; }; if (_path.charAt(0) != "/"){ _path = ("/" + _path); }; return (_path); } public function get protocol():Protocols{ var proto:String = _url.split("://")[0]; switch (proto){ case "file": return (Protocols.file); case "http": return (Protocols.HTTP); case "https": return (Protocols.HTTPS); default: return (Protocols.none); }; } public function get hostName():String{ var hostname:String = _url; if (hostname.indexOf("://") > -1){ hostname = hostname.split("://")[1]; }; if (hostname.indexOf("/") > -1){ hostname = hostname.split("/")[0]; }; if (hostname.indexOf("?") > -1){ hostname = hostname.split("?")[0]; }; if ((((protocol == Protocols.file)) || ((protocol == Protocols.none)))){ return (""); }; return (hostname); } public function get subDomain():String{ if (((!((domain == ""))) && (!((domain == hostName))))){ return (hostName.split(("." + domain)).join("")); }; return (""); } public function get search():String{ var _search:String = _url; if (_search.indexOf("://") > -1){ _search = _search.split("://")[1]; }; if (_search.indexOf(hostName) == 0){ _search = _search.substr(hostName.length); }; if (_search.indexOf("?") > -1){ _search = _search.split("?")[1]; } else { _search = ""; }; return (_search); } } }//package com.google.analytics.utils
Section 67
//UserAgent (com.google.analytics.utils.UserAgent) package com.google.analytics.utils { import com.google.analytics.core.*; import flash.system.*; public class UserAgent { private var _localInfo:Environment; private var _applicationProduct:String; private var _version:Version; public static var minimal:Boolean = false; public function UserAgent(localInfo:Environment, product:String="", version:String=""){ super(); _localInfo = localInfo; applicationProduct = product; _version = Version.fromString(version); } public function get tamarinProductToken():String{ if (UserAgent.minimal){ return (""); }; if (System.vmVersion){ return (("Tamarin/" + Utils.trim(System.vmVersion, true))); }; return (""); } public function get applicationVersion():String{ return (_version.toString(2)); } public function get vendorProductToken():String{ var vp:String = ""; if (_localInfo.isAIR()){ vp = (vp + "AIR"); } else { vp = (vp + "FlashPlayer"); }; vp = (vp + "/"); vp = (vp + _version.toString(3)); return (vp); } public function toString():String{ var UA:String = ""; UA = (UA + applicationProductToken); if (applicationComment != ""){ UA = (UA + (" " + applicationComment)); }; if (tamarinProductToken != ""){ UA = (UA + (" " + tamarinProductToken)); }; if (vendorProductToken != ""){ UA = (UA + (" " + vendorProductToken)); }; return (UA); } public function get applicationComment():String{ var comment:Array = []; comment.push(_localInfo.platform); comment.push(_localInfo.playerType); if (!UserAgent.minimal){ comment.push(_localInfo.operatingSystem); comment.push(_localInfo.language); }; if (Capabilities.isDebugger){ comment.push("DEBUG"); }; if (comment.length > 0){ return ((("(" + comment.join("; ")) + ")")); }; return (""); } public function set applicationVersion(value:String):void{ _version = Version.fromString(value); } public function get applicationProductToken():String{ var token:String = applicationProduct; if (applicationVersion != ""){ token = (token + ("/" + applicationVersion)); }; return (token); } public function set applicationProduct(value:String):void{ _applicationProduct = value; } public function get applicationProduct():String{ return (_applicationProduct); } } }//package com.google.analytics.utils
Section 68
//Variables (com.google.analytics.utils.Variables) package com.google.analytics.utils { import flash.net.*; public dynamic class Variables { public var post:Array; public var URIencode:Boolean; public var pre:Array; public var sort:Boolean;// = true public function Variables(source:String=null, pre:Array=null, post:Array=null){ pre = []; post = []; super(); if (source){ decode(source); }; if (pre){ this.pre = pre; }; if (post){ this.post = post; }; } private function _join(vars:Variables):void{ var prop:String; if (!vars){ return; }; for (prop in vars) { this[prop] = vars[prop]; }; } public function join(... _args):void{ var l:int = _args.length; var i:int; while (i < l) { if (!(_args[i] is Variables)){ } else { _join(_args[i]); }; i++; }; } public function toString():String{ var value:String; var p:String; var component:String; var i:int; var j:int; var priority:String; var last:String; var data:Array = []; for (p in this) { value = this[p]; if (URIencode){ value = encodeURI(value); }; data.push(((p + "=") + value)); }; if (sort){ data.sort(); }; if (pre.length > 0){ pre.reverse(); i = 0; while (i < pre.length) { priority = pre[i]; j = 0; while (j < data.length) { component = data[j]; if (component.indexOf(priority) == 0){ data.unshift(data.splice(j, 1)[0]); }; j++; }; i++; }; pre.reverse(); }; if (post.length > 0){ i = 0; while (i < post.length) { last = post[i]; j = 0; while (j < data.length) { component = data[j]; if (component.indexOf(last) == 0){ data.push(data.splice(j, 1)[0]); }; j++; }; i++; }; }; return (data.join("&")); } public function decode(source:String):void{ var data:Array; var prop:String; var name:String; var value:String; var tmp:Array; if (source == ""){ return; }; if (source.charAt(0) == "?"){ source = source.substr(1, source.length); }; if (source.indexOf("&") > -1){ data = source.split("&"); } else { data = [source]; }; var i:int; while (i < data.length) { prop = data[i]; if (prop.indexOf("=") > -1){ tmp = prop.split("="); name = tmp[0]; value = decodeURI(tmp[1]); this[name] = value; }; i++; }; } public function toURLVariables():URLVariables{ var p:String; var urlvars:URLVariables = new URLVariables(); for (p in this) { urlvars[p] = this[p]; }; return (urlvars); } } }//package com.google.analytics.utils
Section 69
//Version (com.google.analytics.utils.Version) package com.google.analytics.utils { public class Version { private var _revision:uint; private var _maxBuild:uint;// = 0xFF private var _maxMinor:uint;// = 15 private var _maxMajor:uint;// = 15 private var _separator:String;// = "." private var _maxRevision:uint;// = 0xFFFF private var _build:uint; private var _major:uint; private var _minor:uint; public function Version(major:uint=0, minor:uint=0, build:uint=0, revision:uint=0){ var v:Version; super(); if ((((((((major > _maxMajor)) && ((minor == 0)))) && ((build == 0)))) && ((revision == 0)))){ v = Version.fromNumber(major); major = v.major; minor = v.minor; build = v.build; revision = v.revision; }; this.major = major; this.minor = minor; this.build = build; this.revision = revision; } public function toString(fields:int=0):String{ var arr:Array; if ((((fields <= 0)) || ((fields > 4)))){ fields = getFields(); }; switch (fields){ case 1: arr = [major]; break; case 2: arr = [major, minor]; break; case 3: arr = [major, minor, build]; break; case 4: default: arr = [major, minor, build, revision]; }; return (arr.join(_separator)); } public function set revision(value:uint):void{ _revision = Math.min(value, _maxRevision); } public function get revision():uint{ return (_revision); } public function set build(value:uint):void{ _build = Math.min(value, _maxBuild); } public function set minor(value:uint):void{ _minor = Math.min(value, _maxMinor); } public function get build():uint{ return (_build); } public function set major(value:uint):void{ _major = Math.min(value, _maxMajor); } public function get minor():uint{ return (_minor); } private function getFields():int{ var f = 4; if (revision == 0){ f--; }; if ((((f == 3)) && ((build == 0)))){ f--; }; if ((((f == 2)) && ((minor == 0)))){ f--; }; return (f); } public function valueOf():uint{ return (((((major << 28) | (minor << 24)) | (build << 16)) | revision)); } public function get major():uint{ return (_major); } public function equals(o):Boolean{ if (!(o is Version)){ return (false); }; if ((((((((o.major == major)) && ((o.minor == minor)))) && ((o.build == build)))) && ((o.revision == revision)))){ return (true); }; return (false); } public static function fromString(value:String="", separator:String="."):Version{ var values:Array; var v:Version = new (Version); if ((((value == "")) || ((value == null)))){ return (v); }; if (value.indexOf(separator) > -1){ values = value.split(separator); v.major = parseInt(values[0]); v.minor = parseInt(values[1]); v.build = parseInt(values[2]); v.revision = parseInt(values[3]); } else { v.major = parseInt(value); }; return (v); } public static function fromNumber(value:Number=0):Version{ var v:Version = new (Version); if (((((((((((isNaN(value)) || ((value == 0)))) || ((value < 0)))) || ((value == Number.MAX_VALUE)))) || ((value == Number.POSITIVE_INFINITY)))) || ((value == Number.NEGATIVE_INFINITY)))){ return (v); }; v.major = (value >>> 28); v.minor = ((value & 251658240) >>> 24); v.build = ((value & 0xFF0000) >>> 16); v.revision = (value & 0xFFFF); return (v); } } }//package com.google.analytics.utils
Section 70
//Bridge (com.google.analytics.v4.Bridge) package com.google.analytics.v4 { import com.google.analytics.core.*; import com.google.analytics.debug.*; import com.google.analytics.external.*; public class Bridge implements GoogleAnalyticsAPI { private var _debug:DebugConfiguration; private var _proxy:JavascriptProxy; private var _jsContainer:String;// = "_GATracker" private var _hasGATracker:Boolean;// = false private var _account:String; private static var _linkTrackingObject_js:XML = <script> <![CDATA[ function( container , target ) { var targets ; var name ; if( target.indexOf(".") > 0 ) { targets = target.split("."); name = targets.pop(); } else { targets = []; name = target; } var ref = window; var depth = targets.length; for( var j = 0 ; j < depth ; j++ ) { ref = ref[ targets[j] ] ; } window[container][target] = ref[name] ; } ]]> </script> ; private static var _createTrackingObject_js:XML = <script> <![CDATA[ function( acct ) { _GATracker[acct] = _gat._getTracker(acct); } ]]> </script> ; private static var _injectTrackingObject_js:XML = <script> <![CDATA[ function() { try { _GATracker } catch(e) { _GATracker = {}; } } ]]> </script> ; private static var _checkGAJS_js:XML = <script> <![CDATA[ function() { if( _gat && _gat._getTracker ) { return true; } return false; } ]]> </script> ; private static var _checkValidTrackingObject_js:XML = <script> <![CDATA[ function(acct) { if( _GATracker[acct] && (_GATracker[acct]._getAccount) ) { return true ; } else { return false; } } ]]> </script> ; public function Bridge(account:String, debug:DebugConfiguration, jsproxy:JavascriptProxy){ var msg0:String; var msg1:String; var msg2:String; super(); _account = account; _debug = debug; _proxy = jsproxy; if (!_checkGAJS()){ msg0 = ""; msg0 = (msg0 + "ga.js not found, be sure to check if\n"); msg0 = (msg0 + "<script src=\"http://www.google-analytics.com/ga.js\"></script>\n"); msg0 = (msg0 + "is included in the HTML."); _debug.warning(msg0); throw (new Error(msg0)); }; if (!_hasGATracker){ if (((_debug.javascript) && (_debug.verbose))){ msg1 = ""; msg1 = (msg1 + "The Google Analytics tracking code was not found on the container page\n"); msg1 = (msg1 + "we create it"); _debug.info(msg1, VisualDebugMode.advanced); }; _injectTrackingObject(); }; if (Utils.validateAccount(account)){ _createTrackingObject(account); } else { if (_checkTrackingObject(account)){ _linkTrackingObject(account); } else { msg2 = ""; msg2 = (msg2 + (("JS Object \"" + account) + "\" doesn't exist in DOM\n")); msg2 = (msg2 + "Bridge object not created."); _debug.warning(msg2); throw (new Error(msg2)); }; }; } public function link(targetUrl:String, useHash:Boolean=false):void{ _debug.info((((("link( " + targetUrl) + ", ") + useHash) + " )")); _call("_link", targetUrl, useHash); } public function addOrganic(newOrganicEngine:String, newOrganicKeyword:String):void{ _debug.info((("addOrganic( " + [newOrganicEngine, newOrganicKeyword].join(", ")) + " )")); _call("_addOrganic", newOrganicEngine); } public function setAllowLinker(enable:Boolean):void{ _debug.info((("setAllowLinker( " + enable) + " )")); _call("_setAllowLinker", enable); } public function getLinkerUrl(url:String="", useHash:Boolean=false):String{ _debug.info((((("getLinkerUrl(" + url) + ", ") + useHash) + ")")); return (_call("_getLinkerUrl", url, useHash)); } private function _linkTrackingObject(path:String):void{ _proxy.call(_linkTrackingObject_js, _jsContainer, path); } public function setClientInfo(enable:Boolean):void{ _debug.info((("setClientInfo( " + enable) + " )")); _call("_setClientInfo", enable); } public function trackTrans():void{ _debug.info("trackTrans()"); _call("_trackTrans"); } public function trackEvent(category:String, action:String, label:String=null, value:Number=NaN):Boolean{ var param = 2; if (((label) && (!((label == ""))))){ param = 3; }; if ((((param == 3)) && (!(isNaN(value))))){ param = 4; }; switch (param){ case 4: _debug.info((("trackEvent( " + [category, action, label, value].join(", ")) + " )")); return (_call("_trackEvent", category, action, label, value)); case 3: _debug.info((("trackEvent( " + [category, action, label].join(", ")) + " )")); return (_call("_trackEvent", category, action, label)); case 2: default: _debug.info((("trackEvent( " + [category, action].join(", ")) + " )")); return (_call("_trackEvent", category, action)); }; } public function setCookieTimeout(newDefaultTimeout:int):void{ _debug.info((("setCookieTimeout( " + newDefaultTimeout) + " )")); _call("_setCookieTimeout", newDefaultTimeout); } public function trackPageview(pageURL:String=""):void{ _debug.info((("trackPageview( " + pageURL) + " )")); _call("_trackPageview", pageURL); } private function _checkValidTrackingObject(account:String):Boolean{ return (_proxy.call(_checkValidTrackingObject_js, account)); } private function _checkGAJS():Boolean{ return (_proxy.call(_checkGAJS_js)); } public function linkByPost(formObject:Object, useHash:Boolean=false):void{ _debug.warning((((("linkByPost( " + formObject) + ", ") + useHash) + " ) not implemented")); } public function getClientInfo():Boolean{ _debug.info("getClientInfo()"); return (_call("_getClientInfo")); } private function _call(functionName:String, ... _args){ _args.unshift(((((("window." + _jsContainer) + "[\"") + _account) + "\"].") + functionName)); return (_proxy.call.apply(_proxy, _args)); } public function hasGAJS():Boolean{ return (_checkGAJS()); } private function _checkTrackingObject(account:String):Boolean{ var hasObj:Boolean = _proxy.hasProperty(account); var isTracker:Boolean = _proxy.hasProperty((account + "._getAccount")); return (((hasObj) && (isTracker))); } public function resetSession():void{ _debug.warning("resetSession() not implemented"); } public function getDetectTitle():Boolean{ _debug.info("getDetectTitle()"); return (_call("_getDetectTitle")); } public function setCampNameKey(newCampNameKey:String):void{ _debug.info((("setCampNameKey( " + newCampNameKey) + " )")); _call("_setCampNameKey", newCampNameKey); } public function setDetectFlash(enable:Boolean):void{ _debug.info((("setDetectFlash( " + enable) + " )")); _call("_setDetectFlash", enable); } public function createEventTracker(objName:String):EventTracker{ _debug.info((("createEventTracker( " + objName) + " )")); return (new EventTracker(objName, this)); } public function addItem(item:String, sku:String, name:String, category:String, price:Number, quantity:int):void{ _debug.info((("addItem( " + [item, sku, name, category, price, quantity].join(", ")) + " )")); _call("_addItem", item, sku, name, category, price, quantity); } public function clearIgnoredOrganic():void{ _debug.info("clearIgnoredOrganic()"); _call("_clearIgnoreOrganic"); } public function setVar(newVal:String):void{ _debug.info((("setVar( " + newVal) + " )")); _call("_setVar", newVal); } public function setDomainName(newDomainName:String):void{ _debug.info((("setDomainName( " + newDomainName) + " )")); _call("_setDomainName", newDomainName); } public function hasTrackingAccount(account:String):Boolean{ if (Utils.validateAccount(account)){ return (_checkValidTrackingObject(account)); }; return (_checkTrackingObject(account)); } public function setCampSourceKey(newCampSrcKey:String):void{ _debug.info((("setCampSourceKey( " + newCampSrcKey) + " )")); _call("_setCampSourceKey", newCampSrcKey); } public function addTrans(orderId:String, affiliation:String, total:Number, tax:Number, shipping:Number, city:String, state:String, country:String):void{ _debug.info((("addTrans( " + [orderId, affiliation, total, tax, shipping, city, state, country].join(", ")) + " )")); _call("_addTrans", orderId, affiliation, total, tax, shipping, city, state, country); } public function setCampContentKey(newCampContentKey:String):void{ _debug.info((("setCampContentKey( " + newCampContentKey) + " )")); _call("_setCampContentKey", newCampContentKey); } public function setLocalServerMode():void{ _debug.info("setLocalServerMode()"); _call("_setLocalServerMode"); } public function getLocalGifPath():String{ _debug.info("getLocalGifPath()"); return (_call("_getLocalGifPath")); } public function clearIgnoredRef():void{ _debug.info("clearIgnoredRef()"); _call("_clearIgnoreRef"); } public function setAllowAnchor(enable:Boolean):void{ _debug.info((("setAllowAnchor( " + enable) + " )")); _call("_setAllowAnchor", enable); } public function setLocalGifPath(newLocalGifPath:String):void{ _debug.info((("setLocalGifPath( " + newLocalGifPath) + " )")); _call("_setLocalGifPath", newLocalGifPath); } public function getVersion():String{ _debug.info("getVersion()"); return (_call("_getVersion")); } private function _injectTrackingObject():void{ _proxy.executeBlock(_injectTrackingObject_js); _hasGATracker = true; } public function setCookiePath(newCookiePath:String):void{ _debug.info((("setCookiePath( " + newCookiePath) + " )")); _call("_setCookiePath", newCookiePath); } public function setSampleRate(newRate:Number):void{ _debug.info((("setSampleRate( " + newRate) + " )")); _call("_setSampleRate", newRate); } public function setAllowHash(enable:Boolean):void{ _debug.info((("setAllowHash( " + enable) + " )")); _call("_setAllowHash", enable); } public function addIgnoredOrganic(newIgnoredOrganicKeyword:String):void{ _debug.info((("addIgnoredOrganic( " + newIgnoredOrganicKeyword) + " )")); _call("_addIgnoredOrganic", newIgnoredOrganicKeyword); } public function setCampNOKey(newCampNOKey:String):void{ _debug.info((("setCampNOKey( " + newCampNOKey) + " )")); _call("_setCampNOKey", newCampNOKey); } public function cookiePathCopy(newPath:String):void{ _debug.info((("cookiePathCopy( " + newPath) + " )")); _call("_cookiePathCopy", newPath); } public function setLocalRemoteServerMode():void{ _debug.info("setLocalRemoteServerMode()"); _call("_setLocalRemoteServerMode"); } public function getServiceMode():ServerOperationMode{ _debug.info("getServiceMode()"); return (_call("_getServiceMode")); } public function setDetectTitle(enable:Boolean):void{ _debug.info((("setDetectTitle( " + enable) + " )")); _call("_setDetectTitle", enable); } private function _createTrackingObject(account:String):void{ _proxy.call(_createTrackingObject_js, account); } public function setCampaignTrack(enable:Boolean):void{ _debug.info((("setCampaignTrack( " + enable) + " )")); _call("_setCampaignTrack", enable); } public function clearOrganic():void{ _debug.info("clearOrganic()"); _call("_clearOrganic"); } public function setCampTermKey(newCampTermKey:String):void{ _debug.info((("setCampTermKey( " + newCampTermKey) + " )")); _call("_setCampTermKey", newCampTermKey); } public function getDetectFlash():Boolean{ _debug.info("getDetectFlash()"); return (_call("_getDetectFlash")); } public function setCampMediumKey(newCampMedKey:String):void{ _debug.info((("setCampMediumKey( " + newCampMedKey) + " )")); _call("_setCampMediumKey", newCampMedKey); } public function addIgnoredRef(newIgnoredReferrer:String):void{ _debug.info((("addIgnoredRef( " + newIgnoredReferrer) + " )")); _call("_addIgnoredRef", newIgnoredReferrer); } public function setSessionTimeout(newTimeout:int):void{ _debug.info((("setSessionTimeout( " + newTimeout) + " )")); _call("_setSessionTimeout", newTimeout); } public function setRemoteServerMode():void{ _debug.info("setRemoteServerMode()"); _call("_setRemoteServerMode"); } public function getAccount():String{ _debug.info("getAccount()"); return (_call("_getAccount")); } } }//package com.google.analytics.v4
Section 71
//Configuration (com.google.analytics.v4.Configuration) package com.google.analytics.v4 { import com.google.analytics.core.*; import com.google.analytics.debug.*; import com.google.analytics.utils.*; import com.google.analytics.campaign.*; public class Configuration { public var serverMode:ServerOperationMode; public var detectFlash:Boolean;// = true public var hasSiteOverlay:Boolean;// = false public var allowLocalTracking:Boolean;// = true public var secureRemoteGIFpath:String;// = "https://ssl.google-analytics.com/__utm.gif" private var _version:String;// = "4.3as" public var allowDomainHash:Boolean;// = true public var detectClientInfo:Boolean;// = true public var idleLoop:Number;// = 30 public var isTrackOutboundSubdomains:Boolean;// = false public var cookiePath:String;// = "/" public var transactionFieldDelim:String;// = "|" private var _organic:Organic; private var _cookieName:String;// = "analytics" public var campaignKey:CampaignKey; public var google:String;// = "google" public var googleCsePath:String;// = "cse" public var bucketCapacity:Number;// = 10 private var _sampleRate:Number;// = 1 public var remoteGIFpath:String;// = "http://www.google-analytics.com/__utm.gif" public var googleSearchParam:String;// = "q" public var allowLinker:Boolean;// = false public var maxOutboundLinkExamined:Number;// = 1000 private var _debug:DebugConfiguration; public var allowAnchor:Boolean;// = false private var _domain:Domain; private var _trackingLimitPerSession:int;// = 500 public var tokenCliff:int;// = 10 public var sessionTimeout:Number; public var idleTimeout:Number;// = 60 public var campaignTracking:Boolean;// = true public var domainName:String;// = "" public var detectTitle:Boolean;// = true public var tokenRate:Number;// = 0.2 public var conversionTimeout:Number; public var localGIFpath:String;// = "/__utm.gif" public function Configuration(debug:DebugConfiguration=null){ _organic = new Organic(); conversionTimeout = Timespan.sixmonths; sessionTimeout = Timespan.thirtyminutes; campaignKey = new CampaignKey(); serverMode = ServerOperationMode.remote; super(); _debug = debug; _domain = new Domain(DomainNameMode.auto, "", _debug); serverMode = ServerOperationMode.remote; _initOrganicSources(); } public function get organic():Organic{ return (_organic); } public function get cookieName():String{ return (_cookieName); } public function get trackingLimitPerSession():int{ return (_trackingLimitPerSession); } private function _initOrganicSources():void{ addOrganicSource(google, googleSearchParam); addOrganicSource("yahoo", "p"); addOrganicSource("msn", "q"); addOrganicSource("aol", "query"); addOrganicSource("aol", "encquery"); addOrganicSource("lycos", "query"); addOrganicSource("ask", "q"); addOrganicSource("altavista", "q"); addOrganicSource("netscape", "query"); addOrganicSource("cnn", "query"); addOrganicSource("looksmart", "qt"); addOrganicSource("about", "terms"); addOrganicSource("mamma", "query"); addOrganicSource("alltheweb", "q"); addOrganicSource("gigablast", "q"); addOrganicSource("voila", "rdata"); addOrganicSource("virgilio", "qs"); addOrganicSource("live", "q"); addOrganicSource("baidu", "wd"); addOrganicSource("alice", "qs"); addOrganicSource("yandex", "text"); addOrganicSource("najdi", "q"); addOrganicSource("aol", "q"); addOrganicSource("club-internet", "q"); addOrganicSource("mama", "query"); addOrganicSource("seznam", "q"); addOrganicSource("search", "q"); addOrganicSource("wp", "szukaj"); addOrganicSource("onet", "qt"); addOrganicSource("netsprint", "q"); addOrganicSource("google.interia", "q"); addOrganicSource("szukacz", "q"); addOrganicSource("yam", "k"); addOrganicSource("pchome", "q"); addOrganicSource("kvasir", "searchExpr"); addOrganicSource("sesam", "q"); addOrganicSource("ozu", "q"); addOrganicSource("terra", "query"); addOrganicSource("nostrum", "query"); addOrganicSource("mynet", "q"); addOrganicSource("ekolay", "q"); addOrganicSource("search.ilse", "search_for"); } public function get sampleRate():Number{ return (_sampleRate); } public function addOrganicSource(engine:String, keyword:String):void{ var engine = engine; var keyword = keyword; _organic.addSource(engine, keyword); //unresolved jump var _slot1 = e; if (((_debug) && (_debug.active))){ _debug.warning(_slot1.message); }; } public function get domain():Domain{ return (_domain); } public function set sampleRate(value:Number):void{ if (value <= 0){ value = 0.1; }; if (value > 1){ value = 1; }; value = Number(value.toFixed(2)); _sampleRate = value; } public function get version():String{ return (_version); } } }//package com.google.analytics.v4
Section 72
//GoogleAnalyticsAPI (com.google.analytics.v4.GoogleAnalyticsAPI) package com.google.analytics.v4 { import com.google.analytics.core.*; public interface GoogleAnalyticsAPI { function setCampSourceKey(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:String):void; function setDetectTitle(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:Boolean):void; function setLocalRemoteServerMode():void; function resetSession():void; function setLocalServerMode():void; function setCampContentKey(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:String):void; function addOrganic(_arg1:String, _arg2:String):void; function setDetectFlash(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:Boolean):void; function setAllowLinker(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:Boolean):void; function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean; function setCampTermKey(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:String):void; function setCampNameKey(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:String):void; function getLinkerUrl(_arg1:String="", _arg2:Boolean=false):String; function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void; function clearIgnoredRef():void; function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):void; function getDetectFlash():Boolean; function setCampaignTrack(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:Boolean):void; function createEventTracker(void:String):EventTracker; function setCookieTimeout(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:int):void; function setAllowAnchor(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:Boolean):void; function trackTrans():void; function clearOrganic():void; function trackPageview(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:String=""):void; function setLocalGifPath(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:String):void; function getVersion():String; function getLocalGifPath():String; function getServiceMode():ServerOperationMode; function setVar(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:String):void; function clearIgnoredOrganic():void; function setCampMediumKey(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:String):void; function addIgnoredRef(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:String):void; function setClientInfo(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:Boolean):void; function setCookiePath(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:String):void; function setSampleRate(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:Number):void; function setSessionTimeout(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:int):void; function setRemoteServerMode():void; function setDomainName(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:String):void; function addIgnoredOrganic(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:String):void; function setAllowHash(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:Boolean):void; function getAccount():String; function linkByPost(_arg1:Object, _arg2:Boolean=false):void; function link(_arg1:String, _arg2:Boolean=false):void; function setCampNOKey(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:String):void; function getClientInfo():Boolean; function cookiePathCopy(C:\JOBS\Seek\Space Agent\src;com\google\analytics\v4;GoogleAnalyticsAPI.as:String):void; function getDetectTitle():Boolean; } }//package com.google.analytics.v4
Section 73
//Tracker (com.google.analytics.v4.Tracker) package com.google.analytics.v4 { import com.google.analytics.core.*; import com.google.analytics.debug.*; import flash.net.*; import com.google.analytics.data.*; import com.google.analytics.external.*; import com.google.analytics.utils.*; import com.google.analytics.ecommerce.*; import com.google.analytics.campaign.*; public class Tracker implements GoogleAnalyticsAPI { private const EVENT_TRACKER_LABEL_KEY_NUM:int = 3; private const EVENT_TRACKER_VALUE_VALUE_NUM:int = 1; private const EVENT_TRACKER_PROJECT_ID:int = 5; private const EVENT_TRACKER_OBJECT_NAME_KEY_NUM:int = 1; private const EVENT_TRACKER_TYPE_KEY_NUM:int = 2; private var _adSense:AdSenseGlobals; private var _eventTracker:X10; private var _noSessionInformation:Boolean;// = false private var _browserInfo:BrowserInfo; private var _debug:DebugConfiguration; private var _isNewVisitor:Boolean;// = false private var _buffer:Buffer; private var _config:Configuration; private var _x10Module:X10; private var _campaign:CampaignManager; private var _formatedReferrer:String; private var _timeStamp:Number; private var _info:Environment; private var _domainHash:Number; private var _campaignInfo:CampaignInfo; private var _gifRequest:GIFRequest; private var _hasInitData:Boolean;// = false private var _ecom:Ecommerce; private var _account:String; public function Tracker(account:String, config:Configuration, debug:DebugConfiguration, info:Environment, buffer:Buffer, gifRequest:GIFRequest, adSense:AdSenseGlobals, ecom:Ecommerce){ var msg:String; super(); _account = account; _config = config; _debug = debug; _info = info; _buffer = buffer; _gifRequest = gifRequest; _adSense = adSense; _ecom = ecom; if (!Utils.validateAccount(account)){ msg = (("Account \"" + account) + "\" is not valid."); _debug.warning(msg); throw (new Error(msg)); }; } private function _doTracking():Boolean{ if (((((!((_info.protocol == Protocols.file))) && (!((_info.protocol == Protocols.none))))) && (_isNotGoogleSearch()))){ return (true); }; if (_config.allowLocalTracking){ return (true); }; return (false); } public function addOrganic(newOrganicEngine:String, newOrganicKeyword:String):void{ _debug.info((("addOrganic( " + [newOrganicEngine, newOrganicKeyword].join(", ")) + " )")); _config.organic.addSource(newOrganicEngine, newOrganicKeyword); } public function setAllowLinker(enable:Boolean):void{ _config.allowLinker = enable; _debug.info((("setAllowLinker( " + _config.allowLinker) + " )")); } public function getLinkerUrl(targetUrl:String="", useHash:Boolean=false):String{ _initData(); _debug.info((((("getLinkerUrl( " + targetUrl) + ", ") + useHash.toString()) + " )")); return (_buffer.getLinkerUrl(targetUrl, useHash)); } public function trackEvent(category:String, action:String, label:String=null, value:Number=NaN):Boolean{ _initData(); var success:Boolean; var params = 2; if (((!((category == ""))) && (!((action == ""))))){ _eventTracker.clearKey(EVENT_TRACKER_PROJECT_ID); _eventTracker.clearValue(EVENT_TRACKER_PROJECT_ID); success = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_OBJECT_NAME_KEY_NUM, category); success = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_TYPE_KEY_NUM, action); if (((label) && (!((label == ""))))){ success = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_LABEL_KEY_NUM, label); params = 3; if (!isNaN(value)){ success = _eventTracker.setValue(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_VALUE_VALUE_NUM, value); params = 4; }; }; if (success){ _debug.info(((("valid event tracking call\ncategory: " + category) + "\naction: ") + action), VisualDebugMode.geek); _sendXEvent(_eventTracker); }; } else { _debug.warning(((("event tracking call is not valid, failed!\ncategory: " + category) + "\naction: ") + action), VisualDebugMode.geek); success = false; }; switch (params){ case 4: _debug.info((("trackEvent( " + [category, action, label, value].join(", ")) + " )")); break; case 3: _debug.info((("trackEvent( " + [category, action, label].join(", ")) + " )")); break; case 2: default: _debug.info((("trackEvent( " + [category, action].join(", ")) + " )")); }; return (success); } public function trackPageview(pageURL:String=""):void{ _debug.info((("trackPageview( " + pageURL) + " )")); if (_doTracking()){ _initData(); _trackMetrics(pageURL); _noSessionInformation = false; } else { _debug.warning((("trackPageview( " + pageURL) + " ) failed")); }; } public function setCookieTimeout(newDefaultTimeout:int):void{ _config.conversionTimeout = newDefaultTimeout; _debug.info((("setCookieTimeout( " + _config.conversionTimeout) + " )")); } public function trackTrans():void{ var i:Number; var j:Number; var curTrans:Transaction; _initData(); var searchStrings:Array = new Array(); if (_takeSample()){ i = 0; while (i < _ecom.getTransLength()) { curTrans = _ecom.getTransFromArray(i); searchStrings.push(curTrans.toGifParams()); j = 0; while (j < curTrans.getItemsLength()) { searchStrings.push(curTrans.getItemFromArray(j).toGifParams()); j++; }; i++; }; i = 0; while (i < searchStrings.length) { _gifRequest.send(_account, searchStrings[i]); i++; }; }; } public function setClientInfo(enable:Boolean):void{ _config.detectClientInfo = enable; _debug.info((("setClientInfo( " + _config.detectClientInfo) + " )")); } public function linkByPost(formObject:Object, useHash:Boolean=false):void{ _debug.warning("linkByPost not implemented in AS3 mode"); } private function _initData():void{ var data0:String; var data:String; if (!_hasInitData){ _updateDomainName(); _domainHash = _getDomainHash(); _timeStamp = Math.round((new Date().getTime() / 1000)); if (_debug.verbose){ data0 = ""; data0 = (data0 + "_initData 0"); data0 = (data0 + ("\ndomain name: " + _config.domainName)); data0 = (data0 + ("\ndomain hash: " + _domainHash)); data0 = (data0 + (((("\ntimestamp: " + _timeStamp) + " (") + new Date((_timeStamp * 1000))) + ")")); _debug.info(data0, VisualDebugMode.geek); }; }; if (_doTracking()){ _handleCookie(); }; if (!_hasInitData){ if (_doTracking()){ _formatedReferrer = _formatReferrer(); _browserInfo = new BrowserInfo(_config, _info); _debug.info(("browserInfo: " + _browserInfo.toURLString()), VisualDebugMode.advanced); if (_config.campaignTracking){ _campaign = new CampaignManager(_config, _debug, _buffer, _domainHash, _formatedReferrer, _timeStamp); _campaignInfo = _campaign.getCampaignInformation(_info.locationSearch, _noSessionInformation); _debug.info(("campaignInfo: " + _campaignInfo.toURLString()), VisualDebugMode.advanced); _debug.info(("Search: " + _info.locationSearch)); _debug.info(("CampaignTrackig: " + _buffer.utmz.campaignTracking)); }; }; _x10Module = new X10(); _eventTracker = new X10(); _hasInitData = true; }; if (_config.hasSiteOverlay){ _debug.warning("Site Overlay is not supported"); }; if (_debug.verbose){ data = ""; data = (data + "_initData (misc)"); data = (data + ("\nflash version: " + _info.flashVersion.toString(4))); data = (data + ("\nprotocol: " + _info.protocol)); data = (data + (("\ndefault domain name (auto): \"" + _info.domainName) + "\"")); data = (data + ("\nlanguage: " + _info.language)); data = (data + ("\ndomain hash: " + _getDomainHash())); data = (data + ("\nuser-agent: " + _info.userAgent)); _debug.info(data, VisualDebugMode.geek); }; } public function getDetectTitle():Boolean{ _debug.info("getDetectTitle()"); return (_config.detectTitle); } public function resetSession():void{ _debug.info("resetSession()"); _buffer.resetCurrentSession(); } public function getClientInfo():Boolean{ _debug.info("getClientInfo()"); return (_config.detectClientInfo); } private function _sendXEvent(opt_xObj:X10=null):void{ var searchVariables:Variables; var eventInfo:EventInfo; var eventvars:Variables; var generalvars:Variables; if (_takeSample()){ searchVariables = new Variables(); searchVariables.URIencode = true; eventInfo = new EventInfo(true, _x10Module, opt_xObj); eventvars = eventInfo.toVariables(); generalvars = _renderMetricsSearchVariables(); searchVariables.join(eventvars, generalvars); _gifRequest.send(_account, searchVariables, false, true); }; } public function setDetectFlash(enable:Boolean):void{ _config.detectFlash = enable; _debug.info((("setDetectFlash( " + _config.detectFlash) + " )")); } public function setCampNameKey(newCampNameKey:String):void{ _config.campaignKey.UCCN = newCampNameKey; var msg = (("setCampNameKey( " + _config.campaignKey.UCCN) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((msg + " [UCCN]")); } else { _debug.info(msg); }; } private function _formatReferrer():String{ var domainName:String; var ref:URL; var dom:URL; var referrer:String = _info.referrer; if ((((referrer == "")) || ((referrer == "localhost")))){ referrer = "-"; } else { domainName = _info.domainName; ref = new URL(referrer); dom = new URL(("http://" + domainName)); if (ref.hostName == domainName){ return ("-"); }; if (dom.domain == ref.domain){ if (dom.subDomain != ref.subDomain){ referrer = "0"; }; }; if ((((referrer.charAt(0) == "[")) && (referrer.charAt((referrer.length - 1))))){ referrer = "-"; }; }; _debug.info(("formated referrer: " + referrer), VisualDebugMode.advanced); return (referrer); } private function _visitCode():Number{ if (_debug.verbose){ _debug.info(("visitCode: " + _buffer.utma.sessionId), VisualDebugMode.geek); }; return (_buffer.utma.sessionId); } public function createEventTracker(objName:String):EventTracker{ _debug.info((("createEventTracker( " + objName) + " )")); return (new EventTracker(objName, this)); } public function addItem(id:String, sku:String, name:String, category:String, price:Number, quantity:int):void{ var parentTrans:Transaction; parentTrans = _ecom.getTransaction(id); if (parentTrans == null){ parentTrans = _ecom.addTransaction(id, "", "", "", "", "", "", ""); }; parentTrans.addItem(sku, name, category, price.toString(), quantity.toString()); if (_debug.active){ _debug.info((("addItem( " + [id, sku, name, category, price, quantity].join(", ")) + " )")); }; } public function clearIgnoredOrganic():void{ _debug.info("clearIgnoredOrganic()"); _config.organic.clearIgnoredKeywords(); } public function setVar(newVal:String):void{ var variables:Variables; if (((!((newVal == ""))) && (_isNotGoogleSearch()))){ _initData(); _buffer.utmv.domainHash = _domainHash; _buffer.utmv.value = encodeURI(newVal); if (_debug.verbose){ _debug.info(_buffer.utmv.toString(), VisualDebugMode.geek); }; _debug.info((("setVar( " + newVal) + " )")); if (_takeSample()){ variables = new Variables(); variables.utmt = "var"; _gifRequest.send(_account, variables); }; } else { _debug.warning((("setVar \"" + newVal) + "\" is ignored")); }; } public function setDomainName(newDomainName:String):void{ if (newDomainName == "auto"){ _config.domain.mode = DomainNameMode.auto; } else { if (newDomainName == "none"){ _config.domain.mode = DomainNameMode.none; } else { _config.domain.mode = DomainNameMode.custom; _config.domain.name = newDomainName; }; }; _updateDomainName(); _debug.info((("setDomainName( " + _config.domainName) + " )")); } private function _updateDomainName():void{ var domainName:String; if (_config.domain.mode == DomainNameMode.auto){ domainName = _info.domainName; if (domainName.substring(0, 4) == "www."){ domainName = domainName.substring(4); }; _config.domain.name = domainName; }; _config.domainName = _config.domain.name.toLowerCase(); _debug.info(("domain name: " + _config.domainName), VisualDebugMode.advanced); } public function addTrans(orderId:String, affiliation:String, total:Number, tax:Number, shipping:Number, city:String, state:String, country:String):void{ _ecom.addTransaction(orderId, affiliation, total.toString(), tax.toString(), shipping.toString(), city, state, country); if (_debug.active){ _debug.info((("addTrans( " + [orderId, affiliation, total, tax, shipping, city, state, country].join(", ")) + " );")); }; } private function _renderMetricsSearchVariables(pageURL:String=""):Variables{ var campvars:Variables; var variables:Variables = new Variables(); variables.URIencode = true; var docInfo:DocumentInfo = new DocumentInfo(_config, _info, _formatedReferrer, pageURL, _adSense); _debug.info(("docInfo: " + docInfo.toURLString()), VisualDebugMode.geek); if (_config.campaignTracking){ campvars = _campaignInfo.toVariables(); }; var browservars:Variables = _browserInfo.toVariables(); variables.join(docInfo.toVariables(), browservars, campvars); return (variables); } public function setCampContentKey(newCampContentKey:String):void{ _config.campaignKey.UCCT = newCampContentKey; var msg = (("setCampContentKey( " + _config.campaignKey.UCCT) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((msg + " [UCCT]")); } else { _debug.info(msg); }; } private function _handleCookie():void{ var data0:String; var data1:String; var vid:Array; var data2:String; if (_config.allowLinker){ }; _buffer.createSO(); if (((_buffer.hasUTMA()) && (!(_buffer.utma.isEmpty())))){ if (((!(_buffer.hasUTMB())) || (!(_buffer.hasUTMC())))){ _buffer.updateUTMA(_timeStamp); _noSessionInformation = true; }; if (_debug.verbose){ _debug.info(("from cookie " + _buffer.utma.toString()), VisualDebugMode.geek); }; } else { _debug.info("create a new utma", VisualDebugMode.advanced); _buffer.utma.domainHash = _domainHash; _buffer.utma.sessionId = _getUniqueSessionId(); _buffer.utma.firstTime = _timeStamp; _buffer.utma.lastTime = _timeStamp; _buffer.utma.currentTime = _timeStamp; _buffer.utma.sessionCount = 1; if (_debug.verbose){ _debug.info(_buffer.utma.toString(), VisualDebugMode.geek); }; _noSessionInformation = true; _isNewVisitor = true; }; if (((_adSense.gaGlobal) && ((_adSense.dh == String(_domainHash))))){ if (_adSense.sid){ _buffer.utma.currentTime = Number(_adSense.sid); if (_debug.verbose){ data0 = ""; data0 = (data0 + "AdSense sid found\n"); data0 = (data0 + (((("Override currentTime(" + _buffer.utma.currentTime) + ") from AdSense sid(") + Number(_adSense.sid)) + ")")); _debug.info(data0, VisualDebugMode.geek); }; }; if (_isNewVisitor){ if (_adSense.sid){ _buffer.utma.lastTime = Number(_adSense.sid); if (_debug.verbose){ data1 = ""; data1 = (data1 + "AdSense sid found (new visitor)\n"); data1 = (data1 + (((("Override lastTime(" + _buffer.utma.lastTime) + ") from AdSense sid(") + Number(_adSense.sid)) + ")")); _debug.info(data1, VisualDebugMode.geek); }; }; if (_adSense.vid){ vid = _adSense.vid.split("."); _buffer.utma.sessionId = Number(vid[0]); _buffer.utma.firstTime = Number(vid[1]); if (_debug.verbose){ data2 = ""; data2 = (data2 + "AdSense vid found (new visitor)\n"); data2 = (data2 + (((("Override sessionId(" + _buffer.utma.sessionId) + ") from AdSense vid(") + Number(vid[0])) + ")\n")); data2 = (data2 + (((("Override firstTime(" + _buffer.utma.firstTime) + ") from AdSense vid(") + Number(vid[1])) + ")")); _debug.info(data2, VisualDebugMode.geek); }; }; if (_debug.verbose){ _debug.info(("AdSense modified : " + _buffer.utma.toString()), VisualDebugMode.geek); }; }; }; _buffer.utmb.domainHash = _domainHash; if (isNaN(_buffer.utmb.trackCount)){ _buffer.utmb.trackCount = 0; }; if (isNaN(_buffer.utmb.token)){ _buffer.utmb.token = _config.tokenCliff; }; if (isNaN(_buffer.utmb.lastTime)){ _buffer.utmb.lastTime = _buffer.utma.currentTime; }; _buffer.utmc.domainHash = _domainHash; if (_debug.verbose){ _debug.info(_buffer.utmb.toString(), VisualDebugMode.advanced); _debug.info(_buffer.utmc.toString(), VisualDebugMode.advanced); }; } public function setLocalServerMode():void{ _config.serverMode = ServerOperationMode.local; _debug.info("setLocalServerMode()"); } public function clearIgnoredRef():void{ _debug.info("clearIgnoredRef()"); _config.organic.clearIgnoredReferrals(); } public function setCampSourceKey(newCampSrcKey:String):void{ _config.campaignKey.UCSR = newCampSrcKey; var msg = (("setCampSourceKey( " + _config.campaignKey.UCSR) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((msg + " [UCSR]")); } else { _debug.info(msg); }; } public function getLocalGifPath():String{ _debug.info("getLocalGifPath()"); return (_config.localGIFpath); } public function setLocalGifPath(newLocalGifPath:String):void{ _config.localGIFpath = newLocalGifPath; _debug.info((("setLocalGifPath( " + _config.localGIFpath) + " )")); } public function getVersion():String{ _debug.info("getVersion()"); return (_config.version); } public function setAllowAnchor(enable:Boolean):void{ _config.allowAnchor = enable; _debug.info((("setAllowAnchor( " + _config.allowAnchor) + " )")); } private function _isNotGoogleSearch():Boolean{ var domainName:String = _config.domainName; var g0 = (domainName.indexOf("www.google.") < 0); var g1 = (domainName.indexOf(".google.") < 0); var g2 = (domainName.indexOf("google.") < 0); var g4 = (domainName.indexOf("google.org") > -1); return (((((((((g0) || (g1))) || (g2))) || (!((_config.cookiePath == "/"))))) || (g4))); } public function setSampleRate(newRate:Number):void{ if (newRate < 0){ _debug.warning("sample rate can not be negative, ignoring value."); } else { _config.sampleRate = newRate; }; _debug.info((("setSampleRate( " + _config.sampleRate) + " )")); } private function _takeSample():Boolean{ if (_debug.verbose){ _debug.info((((("takeSample: (" + (_visitCode() % 10000)) + ") < (") + (_config.sampleRate * 10000)) + ")"), VisualDebugMode.geek); }; return (((_visitCode() % 10000) < (_config.sampleRate * 10000))); } public function setCookiePath(newCookiePath:String):void{ _config.cookiePath = newCookiePath; _debug.info((("setCookiePath( " + _config.cookiePath) + " )")); } public function setAllowHash(enable:Boolean):void{ _config.allowDomainHash = enable; _debug.info((("setAllowHash( " + _config.allowDomainHash) + " )")); } private function _generateUserDataHash():Number{ var hash:String = ""; hash = (hash + _info.appName); hash = (hash + _info.appVersion); hash = (hash + _info.language); hash = (hash + _info.platform); hash = (hash + _info.userAgent.toString()); hash = (hash + (((_info.screenWidth + "x") + _info.screenHeight) + _info.screenColorDepth)); hash = (hash + _info.referrer); return (Utils.generateHash(hash)); } public function setCampNOKey(newCampNOKey:String):void{ _config.campaignKey.UCNO = newCampNOKey; var msg = (("setCampNOKey( " + _config.campaignKey.UCNO) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((msg + " [UCNO]")); } else { _debug.info(msg); }; } public function addIgnoredOrganic(newIgnoredOrganicKeyword:String):void{ _debug.info((("addIgnoredOrganic( " + newIgnoredOrganicKeyword) + " )")); _config.organic.addIgnoredKeyword(newIgnoredOrganicKeyword); } public function setLocalRemoteServerMode():void{ _config.serverMode = ServerOperationMode.both; _debug.info("setLocalRemoteServerMode()"); } public function cookiePathCopy(newPath:String):void{ _debug.warning((("cookiePathCopy( " + newPath) + " ) not implemented")); } public function setDetectTitle(enable:Boolean):void{ _config.detectTitle = enable; _debug.info((("setDetectTitle( " + _config.detectTitle) + " )")); } public function setCampTermKey(newCampTermKey:String):void{ _config.campaignKey.UCTR = newCampTermKey; var msg = (("setCampTermKey( " + _config.campaignKey.UCTR) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((msg + " [UCTR]")); } else { _debug.info(msg); }; } public function getServiceMode():ServerOperationMode{ _debug.info("getServiceMode()"); return (_config.serverMode); } private function _trackMetrics(pageURL:String=""):void{ var searchVariables:Variables; var x10vars:Variables; var generalvars:Variables; var eventInfo:EventInfo; if (_takeSample()){ searchVariables = new Variables(); searchVariables.URIencode = true; if (((_x10Module) && (_x10Module.hasData()))){ eventInfo = new EventInfo(false, _x10Module); x10vars = eventInfo.toVariables(); }; generalvars = _renderMetricsSearchVariables(pageURL); searchVariables.join(x10vars, generalvars); _gifRequest.send(_account, searchVariables); }; } public function setCampaignTrack(enable:Boolean):void{ _config.campaignTracking = enable; _debug.info((("setCampaignTrack( " + _config.campaignTracking) + " )")); } public function addIgnoredRef(newIgnoredReferrer:String):void{ _debug.info((("addIgnoredRef( " + newIgnoredReferrer) + " )")); _config.organic.addIgnoredReferral(newIgnoredReferrer); } public function clearOrganic():void{ _debug.info("clearOrganic()"); _config.organic.clearEngines(); } public function getDetectFlash():Boolean{ _debug.info("getDetectFlash()"); return (_config.detectFlash); } public function setCampMediumKey(newCampMedKey:String):void{ _config.campaignKey.UCMD = newCampMedKey; var msg = (("setCampMediumKey( " + _config.campaignKey.UCMD) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((msg + " [UCMD]")); } else { _debug.info(msg); }; } private function _getUniqueSessionId():Number{ var sessionID:Number = ((Utils.generate32bitRandom() ^ _generateUserDataHash()) * 2147483647); _debug.info(("Session ID: " + sessionID), VisualDebugMode.geek); return (sessionID); } private function _getDomainHash():Number{ if (((((!(_config.domainName)) || ((_config.domainName == "")))) || ((_config.domain.mode == DomainNameMode.none)))){ _config.domainName = ""; return (1); }; _updateDomainName(); if (_config.allowDomainHash){ return (Utils.generateHash(_config.domainName)); }; return (1); } public function setSessionTimeout(newTimeout:int):void{ _config.sessionTimeout = newTimeout; _debug.info((("setSessionTimeout( " + _config.sessionTimeout) + " )")); } public function getAccount():String{ _debug.info("getAccount()"); return (_account); } public function link(targetUrl:String, useHash:Boolean=false):void{ var targetUrl = targetUrl; var useHash = useHash; _initData(); var out:String = _buffer.getLinkerUrl(targetUrl, useHash); var request:URLRequest = new URLRequest(out); _debug.info((("link( " + [targetUrl, useHash].join(",")) + " )")); navigateToURL(request, "_top"); //unresolved jump var _slot1 = e; _debug.warning(("An error occured in link() msg: " + _slot1.message)); } public function setRemoteServerMode():void{ _config.serverMode = ServerOperationMode.remote; _debug.info("setRemoteServerMode()"); } } }//package com.google.analytics.v4
Section 74
//AnalyticsTracker (com.google.analytics.AnalyticsTracker) package com.google.analytics { import flash.events.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; public interface AnalyticsTracker extends GoogleAnalyticsAPI, IEventDispatcher { function set account(C:\JOBS\Seek\Space Agent\src;com\google\analytics;AnalyticsTracker.as:String):void; function get config():Configuration; function get mode():String; function set config(C:\JOBS\Seek\Space Agent\src;com\google\analytics;AnalyticsTracker.as:Configuration):void; function set mode(C:\JOBS\Seek\Space Agent\src;com\google\analytics;AnalyticsTracker.as:String):void; function set debug(C:\JOBS\Seek\Space Agent\src;com\google\analytics;AnalyticsTracker.as:DebugConfiguration):void; function get visualDebug():Boolean; function get account():String; function set visualDebug(C:\JOBS\Seek\Space Agent\src;com\google\analytics;AnalyticsTracker.as:Boolean):void; function isReady():Boolean; function get debug():DebugConfiguration; } }//package com.google.analytics
Section 75
//API (com.google.analytics.API) package com.google.analytics { import com.google.analytics.utils.*; public class API { public static var version:Version = new Version(); public function API(){ super(); } version.major = 1; version.minor = 0; version.build = 1; version.revision = "$Rev: 319 $ ".split(" ")[1]; } }//package com.google.analytics
Section 76
//GATracker (com.google.analytics.GATracker) package com.google.analytics { import flash.display.*; import flash.events.*; import com.google.analytics.core.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import com.google.analytics.external.*; import com.google.analytics.utils.*; import com.google.analytics.events.*; public class GATracker implements AnalyticsTracker { private var _adSense:AdSenseGlobals; private var _env:Environment; private var _visualDebug:Boolean; private var _idleTimer:IdleTimer; private var _debug:DebugConfiguration; private var _buffer:Buffer; private var _config:Configuration; private var _mode:String; private var _display:DisplayObject; private var _jsproxy:JavascriptProxy; private var _dom:HTMLDOM; private var _eventDispatcher:EventDispatcher; private var _ready:Boolean;// = false private var _gifRequest:GIFRequest; private var _ecom:Ecommerce; private var _account:String; private var _tracker:GoogleAnalyticsAPI; public static var version:Version = API.version; public static var autobuild:Boolean = true; public function GATracker(display:DisplayObject, account:String, mode:String="AS3", visualDebug:Boolean=false, config:Configuration=null, debug:DebugConfiguration=null){ super(); _display = display; _eventDispatcher = new EventDispatcher(this); _tracker = new TrackerCache(); this.account = account; this.mode = mode; this.visualDebug = visualDebug; if (!debug){ this.debug = new DebugConfiguration(); }; if (!config){ this.config = new Configuration(debug); }; if (autobuild){ _factory(); }; } public function link(targetUrl:String, useHash:Boolean=false):void{ _tracker.link(targetUrl, useHash); } public function addOrganic(Layout:String, Layout:String):void{ _tracker.addOrganic(Layout, Layout); } public function setAllowLinker(enable:Boolean):void{ _tracker.setAllowLinker(enable); } public function trackEvent(TrackerCache:String, TrackerCache:String, TrackerCache:String=null, TrackerCache:Number=NaN):Boolean{ return (_tracker.trackEvent(TrackerCache, TrackerCache, TrackerCache, TrackerCache)); } public function getLinkerUrl(url:String="", useHash:Boolean=false):String{ return (_tracker.getLinkerUrl(url, useHash)); } public function setCookieTimeout(newDefaultTimeout:int):void{ _tracker.setCookieTimeout(newDefaultTimeout); } public function trackTrans():void{ _tracker.trackTrans(); } public function getClientInfo():Boolean{ return (_tracker.getClientInfo()); } public function trackPageview(pageURL:String=""):void{ _tracker.trackPageview(pageURL); } public function setClientInfo(Layout:Boolean):void{ _tracker.setClientInfo(Layout); } public function get account():String{ return (_account); } public function linkByPost(formObject:Object, useHash:Boolean=false):void{ _tracker.linkByPost(formObject, useHash); } public function getDetectTitle():Boolean{ return (_tracker.getDetectTitle()); } public function dispatchEvent(event:Event):Boolean{ return (_eventDispatcher.dispatchEvent(event)); } public function get config():Configuration{ return (_config); } public function set mode(value:String):void{ _mode = value; } public function removeEventListener(type:String, listener:Function, useCapture:Boolean=false):void{ _eventDispatcher.removeEventListener(type, listener, useCapture); } public function setDetectFlash(Layout:Boolean):void{ _tracker.setDetectFlash(Layout); } public function resetSession():void{ _tracker.resetSession(); } public function setCampNameKey(newCampNameKey:String):void{ _tracker.setCampNameKey(newCampNameKey); } public function get debug():DebugConfiguration{ return (_debug); } public function addItem(item:String, sku:String, name:String, category:String, price:Number, quantity:int):void{ _tracker.addItem(item, sku, name, category, price, quantity); } private function _bridgeFactory():GoogleAnalyticsAPI{ debug.info(((("GATracker (Bridge) v" + version) + "\naccount: ") + account)); return (new Bridge(account, _debug, _jsproxy)); } public function clearIgnoredOrganic():void{ _tracker.clearIgnoredOrganic(); } public function set account(value:String):void{ _account = value; } public function setVar(newVal:String):void{ _tracker.setVar(newVal); } public function build():void{ if (!isReady()){ _factory(); }; } public function addEventListener(type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void{ _eventDispatcher.addEventListener(type, listener, useCapture, priority, useWeakReference); } public function setDomainName(newDomainName:String):void{ _tracker.setDomainName(newDomainName); } public function createEventTracker(useCapture:String):EventTracker{ return (_tracker.createEventTracker(useCapture)); } public function setCampSourceKey(newCampSrcKey:String):void{ _tracker.setCampSourceKey(newCampSrcKey); } public function set config(value:Configuration):void{ _config = value; } public function addTrans(Layout:String, Layout:String, Layout:Number, Layout:Number, Layout:Number, Layout:String, Layout:String, Layout:String):void{ _tracker.addTrans(Layout, Layout, Layout, Layout, Layout, Layout, Layout, Layout); } public function setCampContentKey(newCampContentKey:String):void{ _tracker.setCampContentKey(newCampContentKey); } public function willTrigger(type:String):Boolean{ return (_eventDispatcher.willTrigger(type)); } public function setLocalServerMode():void{ _tracker.setLocalServerMode(); } public function isReady():Boolean{ return (_ready); } public function getLocalGifPath():String{ return (_tracker.getLocalGifPath()); } public function setAllowAnchor(enable:Boolean):void{ _tracker.setAllowAnchor(enable); } public function clearIgnoredRef():void{ _tracker.clearIgnoredRef(); } public function get mode():String{ return (_mode); } public function set debug(value:DebugConfiguration):void{ _debug = value; } public function setLocalGifPath(Layout:String):void{ _tracker.setLocalGifPath(Layout); } public function getVersion():String{ return (_tracker.getVersion()); } public function setSampleRate(newRate:Number):void{ _tracker.setSampleRate(newRate); } public function setCookiePath(newCookiePath:String):void{ _tracker.setCookiePath(newCookiePath); } public function setAllowHash(enable:Boolean):void{ _tracker.setAllowHash(enable); } public function addIgnoredOrganic(Layout:String):void{ _tracker.addIgnoredOrganic(Layout); } public function setLocalRemoteServerMode():void{ _tracker.setLocalRemoteServerMode(); } public function cookiePathCopy(newPath:String):void{ _tracker.cookiePathCopy(newPath); } private function _factory():void{ var activeTracker:GoogleAnalyticsAPI; _jsproxy = new JavascriptProxy(debug); if (visualDebug){ debug.layout = new Layout(debug, _display); debug.active = visualDebug; }; var cache:TrackerCache = (_tracker as TrackerCache); switch (mode){ case TrackerMode.BRIDGE: activeTracker = _bridgeFactory(); break; case TrackerMode.AS3: default: activeTracker = _trackerFactory(); }; if (!cache.isEmpty()){ cache.tracker = activeTracker; cache.flush(); }; _tracker = activeTracker; _ready = true; dispatchEvent(new AnalyticsEvent(AnalyticsEvent.READY, this)); } public function setCampTermKey(newCampTermKey:String):void{ _tracker.setCampTermKey(newCampTermKey); } private function _trackerFactory():GoogleAnalyticsAPI{ debug.info(((("GATracker (AS3) v" + version) + "\naccount: ") + account)); _adSense = new AdSenseGlobals(debug); _dom = new HTMLDOM(debug); _dom.cacheProperties(); _env = new Environment("", "", "", debug, _dom); _buffer = new Buffer(config, debug, false); _gifRequest = new GIFRequest(config, debug, _buffer, _env); _idleTimer = new IdleTimer(config, debug, _display, _buffer); _ecom = new Ecommerce(_debug); _env.url = _display.stage.loaderInfo.url; return (new Tracker(account, config, debug, _env, _buffer, _gifRequest, _adSense, _ecom)); } public function setCampNOKey(newCampNOKey:String):void{ _tracker.setCampNOKey(newCampNOKey); } public function setDetectTitle(Layout:Boolean):void{ _tracker.setDetectTitle(Layout); } public function clearOrganic():void{ _tracker.clearOrganic(); } public function setCampaignTrack(enable:Boolean):void{ _tracker.setCampaignTrack(enable); } public function addIgnoredRef(Layout:String):void{ _tracker.addIgnoredRef(Layout); } public function getServiceMode():ServerOperationMode{ return (_tracker.getServiceMode()); } public function set visualDebug(value:Boolean):void{ _visualDebug = value; } public function setCampMediumKey(newCampMedKey:String):void{ _tracker.setCampMediumKey(newCampMedKey); } public function getDetectFlash():Boolean{ return (_tracker.getDetectFlash()); } public function get visualDebug():Boolean{ return (_visualDebug); } public function hasEventListener(type:String):Boolean{ return (_eventDispatcher.hasEventListener(type)); } public function getAccount():String{ return (_tracker.getAccount()); } public function setSessionTimeout(newTimeout:int):void{ _tracker.setSessionTimeout(newTimeout); } public function setRemoteServerMode():void{ _tracker.setRemoteServerMode(); } } var _local1:* = ServerOperationMode; return (_local1); }//package com.google.analytics
Section 77
//PhysicsData (com.psiom.engine.data.PhysicsData) package com.psiom.engine.data { import com.psiom.engine.*; import com.spaceAgent.engine.gameObjects.*; import com.psiom.util.*; public class PhysicsData { private var _solidObjects:Array; private var NEAR_THRESHHOLD:Number;// = 175 private var _dormantObjects:Array; private static var _instance:PhysicsData; public function PhysicsData(){ super(); _instance = this; _solidObjects = new Array(); _dormantObjects = new Array(); } public function optimizeByCameraProximity(inCamera:EngineCamera, inThreshhold:Number):void{ var minDist:Number; var dist:Number; var i:int; var sObj:SolidObject; i = 0; while (i < _solidObjects.length) { sObj = _solidObjects[i]; dist = MathFunction.getDistance(inCamera.cx, inCamera.cy, sObj.x, sObj.y); if (dist > inThreshhold){ deregisterSolidObject(sObj); _dormantObjects.push(sObj); }; i++; }; i = 0; while (i < _dormantObjects.length) { sObj = _dormantObjects[i]; dist = MathFunction.getDistance(inCamera.cx, inCamera.cy, sObj.x, sObj.y); if (dist <= inThreshhold){ registerSolidObject(sObj); _dormantObjects.splice(i, 1); i--; if (_dormantObjects.length < 1){ break; }; }; i++; }; } public function registerSolidObject(inSolidObject:SolidObject):void{ if (!inSolidObject.Registered){ _solidObjects.push(inSolidObject); inSolidObject.Registered = true; } else { trace(("### WARNING: SolidObject is already registered in PhysicsData: " + inSolidObject)); }; } public function get SolidObjects():Array{ return (_solidObjects); } public function getCollisionTargetsByVelRay(sourceObj:SolidObject, inMaxDist:Number, typesOverride:Array):Array{ var dist:Number; var otherObj:SolidObject; var overrideByType:Boolean; var j:int; var radA:Number; var radB:Number; var compA:Number; var compB:Number; var targetsArray:Array = new Array(); var i:int; while (i < _solidObjects.length) { otherObj = _solidObjects[i]; if (otherObj != sourceObj){ if (!otherObj.purge){ dist = MathFunction.getDistance((sourceObj.x + (sourceObj.vx * 15)), (sourceObj.y + (sourceObj.vy * 15)), (otherObj.x + otherObj.vx), (otherObj.y + otherObj.vy)); if (dist < inMaxDist){ overrideByType = false; j = 0; while (j < typesOverride.length) { if ((otherObj is typesOverride[j])){ overrideByType = true; }; j++; }; radA = MathFunction.getRadians(sourceObj.x, sourceObj.y, otherObj.x, otherObj.y); radB = MathFunction.getRadians(0, 0, sourceObj.vx, sourceObj.vy); radA = (radA + (Math.PI * 2)); compA = radA; radB = (radB + (Math.PI * 2)); compB = radB; if ((((((((Math.abs((compA - compB)) <= (Math.PI / 8))) || ((Math.abs((compA - compB)) > ((Math.PI * 2) - (Math.PI / 8)))))) || (overrideByType))) || ((dist < 150)))){ targetsArray.push(otherObj); }; }; }; }; i++; }; return (targetsArray); } public function getCollisionTargets(sourceObj:SolidObject, includeFixedObjects:Boolean):Array{ var dist:Number; var otherObj:SolidObject; var fixedFilter:Boolean; var targetsArray:Array = new Array(); var i:int; while (i < _solidObjects.length) { otherObj = _solidObjects[i]; fixedFilter = true; if (((!(includeFixedObjects)) && (otherObj.fixed))){ fixedFilter = false; }; if (((!((otherObj == sourceObj))) && (fixedFilter))){ if (!otherObj.purge){ dist = MathFunction.getDistance((sourceObj.x + (sourceObj.vx * 15)), (sourceObj.y + (sourceObj.vy * 15)), (otherObj.x + otherObj.vx), (otherObj.y + otherObj.vy)); if (dist < sourceObj.NearThreshholdBase){ targetsArray.push(otherObj); }; } else { _solidObjects.splice(i, 1); i--; if (_solidObjects.length < 1){ break; }; }; }; i++; }; return (targetsArray); } public function reset():void{ _solidObjects = new Array(); _dormantObjects = new Array(); } public function deregisterSolidObject(inSolidObject:SolidObject):void{ var i:int; var sObj:SolidObject; if (inSolidObject.Registered){ i = 0; while (i < _solidObjects.length) { sObj = _solidObjects[i]; if (sObj == inSolidObject){ _solidObjects.splice(i, 1); i--; if (_solidObjects.length < 1){ break; }; }; i++; }; inSolidObject.Registered = false; } else { trace(("### WARNING: SolidObject removal attempted when not registered in PhysicsData: " + inSolidObject)); }; } public function getCollisionTargetsOfType(sourceObj:SolidObject, includeFixedObjects:Boolean, inTypesMask:Array):Array{ var obj:SolidObject; var j:int; var baseTargets:Array = getCollisionTargets(sourceObj, includeFixedObjects); var finalTargets:Array = new Array(); var i:int; while (i < baseTargets.length) { obj = baseTargets[i]; j = 0; while (j < inTypesMask.length) { if ((obj is inTypesMask[j])){ finalTargets.push(obj); }; j++; }; i++; }; return (finalTargets); } public function addSolidObject(inSolidObject:SolidObject):void{ var i:int; while (i < _solidObjects.length) { _solidObjects[i].appendToCollisionTargets(inSolidObject); i++; }; _solidObjects.push(inSolidObject); inSolidObject.Registered = true; } public static function get Instance():PhysicsData{ return (_instance); } } }//package com.psiom.engine.data
Section 78
//RenderableObject (com.psiom.engine.gameObject.RenderableObject) package com.psiom.engine.gameObject { import flash.display.*; import com.psiom.graphics.*; public class RenderableObject { public var y:Number;// = 0 public var vx:Number;// = 0 public var vy:Number;// = 0 public var visMeter:Number;// = 0 public var vz:Number;// = 0 public var purge:Boolean;// = false public var w:Number;// = 0 public var camVis:Boolean;// = false public var radius:Number;// = 1 public var floating:Boolean;// = false public var requiresUpdate:Boolean;// = true protected var _spriteModel:SpriteModel; public var h:Number;// = 0 public var r:Number;// = 0 public var s:Number;// = 1 public var allowBaseOptimize:Boolean;// = true public var x:Number;// = 0 public var z:Number;// = 1 protected var autoVel:Boolean;// = true public var pointsVal:Number;// = -1 public function RenderableObject(){ super(); _spriteModel = new SpriteModel(); } public function destroy():void{ if (sm.CustomBMD){ sm.CustomBMD.dispose(); }; } public function update():void{ if (autoVel){ x = (x + vx); y = (y + vy); z = (z + vz); }; _spriteModel.update(x, y, z, w, h, r, s); if (_spriteModel.CurrentFrame < 0){ trace(("### WARNING: _spriteModel.CurrentFrame<0: " + this)); }; } public function get sm():SpriteModel{ return (_spriteModel); } public function setCustomBMD(inBMD:BitmapData):void{ _spriteModel.initWithCustomBMD(inBMD); w = inBMD.width; h = inBMD.height; } public function setGraphicsTimelineAngleByDegrees(inDegrees:Number):void{ if (inDegrees < 0){ inDegrees = (inDegrees + 360); }; _spriteModel.CurrentFrame = Math.floor(((inDegrees / 360) * (_spriteModel.TotalFrames - 1))); } protected function forceSMUpdate():void{ _spriteModel.update(x, y, z, w, h, r, s); } public function clickInput(mx:Number, my:Number):void{ } } }//package com.psiom.engine.gameObject
Section 79
//EngineBase (com.psiom.engine.EngineBase) package com.psiom.engine { public class EngineBase { protected var _currentSpace:ObjectSpace; protected var _currentCamera:EngineCamera; public static var ENGINESTATE_LOADING:int = 4; public static var ENGINESTATE_LEVELCOMPLETE:int = 3; public static var ENGINESTATE_GAMEOVER:int = 5; public static var ENGINESTATE_INACTIVE:int = 0; public static var ENGINESTATE_GAMEPLAY:int = 1; public static var ENGINESTATE_PAUSED:int = 2; public function EngineBase(){ super(); } public function clickInput(x:Number, y:Number):void{ } public function get Camera():EngineCamera{ if (!_currentCamera){ trace("(EngineBase) WARNING: camera requested but not initialized."); }; return (_currentCamera); } public function getRenderData():Array{ if (!_currentSpace){ trace("(EngineBase) WARNING: objectSpace is NULL."); }; return (_currentSpace.generateRenderData(_currentCamera)); } public function update():void{ _currentCamera.update(); } public function keyboardInput(keyCode:int):void{ } public function get CurrentSpace():ObjectSpace{ if (!_currentSpace){ trace("(EngineBase) WARNING: objectSpace requested but not initialized."); }; return (_currentSpace); } } }//package com.psiom.engine
Section 80
//EngineCamera (com.psiom.engine.EngineCamera) package com.psiom.engine { import com.psiom.engine.gameObject.*; import com.psiom.util.*; public class EngineCamera { public var currentY:Number;// = 0 private var _ch:Number; private var _trackDiffY:Number;// = 0 private var _inverseOffetX:Number;// = 0 private var _inverseOffetY:Number;// = 0 private var _movementDirection:Number;// = 0 private var _cw:Number; private var _camShakeAmp:Number;// = 0 private var _constrained:Boolean;// = false private var _trackDiffX:Number;// = 0 private var _camShakeSin:Number;// = 0 private var _minX:Number;// = 0 public var baseX:Number;// = 0 public var baseY:Number;// = 0 private var _minY:Number;// = 0 private var _movementVel:Number;// = 0 private var _cropPadding:Number;// = 25 private var _zoomScale:Number;// = 1 private var _trackSubject:Boolean;// = false private var _cameraSubject:RenderableObject; private var _maxX:Number;// = 0 private var _maxY:Number;// = 0 private var _camShake:Number;// = 0 public var targetX:Number;// = 0 public var targetY:Number;// = 0 private var _zoomScaleTarget:Number;// = 1 public var x:Number;// = 0 public var y:Number;// = 0 private var _shakeTimer:Number;// = 0 public var currentX:Number;// = 0 private static var _instance:EngineCamera; public function EngineCamera(w:Number, h:Number){ super(); _instance = this; _cw = w; _ch = h; } public function shake(inForce:Number):void{ _shakeTimer = 10; _camShakeAmp = inForce; } public function get MovementDirection():Number{ return (_movementDirection); } public function setCameraSubject(obj:RenderableObject, snap:Boolean=true):void{ _trackSubject = true; _cameraSubject = obj; if (snap){ x = (_cameraSubject.x - (_cw / 2)); y = (_cameraSubject.y - (_ch / 2)); currentX = x; currentY = y; targetX = x; targetY = y; }; } public function snapToSubject():void{ if (_cameraSubject){ x = (_cameraSubject.x - (_cw / 2)); y = (_cameraSubject.y - (_ch / 2)); currentX = x; currentY = y; targetX = x; targetY = y; }; } public function checkObjectInView(obj:RenderableObject):Boolean{ if (!obj.sm.primaryVis){ return (false); }; var rX:Number = x; var rY:Number = y; if ((((((((((((obj.x * 1) - ((obj.w * obj.s) / 2)) < ((rX + _cw) + _cropPadding))) && ((((obj.x * 1) + ((obj.w * obj.s) / 2)) > (rX - _cropPadding))))) && ((((obj.y * 1) - ((obj.h * obj.s) / 2)) < ((rY + _ch) + _cropPadding))))) && ((((obj.y * 1) + ((obj.h * obj.s) / 2)) > (rY - _cropPadding))))) || (obj.floating))){ obj.camVis = true; obj.visMeter = 0; return (true); }; obj.camVis = false; obj.visMeter++; return (false); } public function update():void{ var tx:Number; var ty:Number; var ix:Number; var iy:Number; _shakeTimer--; _camShakeAmp = (_camShakeAmp * 0.825); _camShakeSin = (_camShakeSin + 0.7); _camShake = (Math.sin(_camShakeSin) * _camShakeAmp); if (_trackSubject){ tx = (_cameraSubject.x - (_cw / 2)); ty = (_cameraSubject.y - (_ch / 2)); targetX = (targetX + ((tx - targetX) * 0.1)); targetY = (targetY + ((ty - targetY) * 0.1)); currentX = (currentX + ((targetX - currentX) * 0.25)); currentY = (currentY + ((targetY - currentY) * 0.25)); ix = (-(_cameraSubject.vx) * -33); iy = (-(_cameraSubject.vy) * -26); _inverseOffetX = (_inverseOffetX + ((ix - _inverseOffetX) * 0.02)); _inverseOffetY = (_inverseOffetY + ((iy - _inverseOffetY) * 0.02)); _movementDirection = MathFunction.getRadians(x, y, (currentX + _inverseOffetX), ((currentY + _camShake) + _inverseOffetY)); _movementVel = MathFunction.getDistance(x, y, (currentX + _inverseOffetX), ((currentY + _camShake) + _inverseOffetY)); x = (currentX + _inverseOffetX); y = ((currentY + _camShake) + _inverseOffetY); }; } public function get CamVel():Number{ return (_movementVel); } public function setLocationConstraint(minX:Number, minY:Number, maxX:Number, maxY:Number):void{ _constrained = true; _minX = minX; _maxX = maxX; _minY = minY; _maxY = maxY; } public function get cx():Number{ return ((x + (_cw / 2))); } public function get cy():Number{ return ((y + (_ch / 2))); } public static function get Instance():EngineCamera{ return (_instance); } } }//package com.psiom.engine
Section 81
//ObjectSpace (com.psiom.engine.ObjectSpace) package com.psiom.engine { import com.psiom.engine.gameObject.*; import com.psiom.util.*; public class ObjectSpace { protected var _autoPurge:Boolean;// = false private var _dormantObjects:Array; protected var _objects:Array; private var _pendingObjects:Array; private var _uiObjects:Array; private var _purgeList:Array; protected var _autoPurgeMinY:Number;// = -250 protected var _globalTranslateX:Number;// = 0 protected var _globalTranslateY:Number;// = 0 private var _inputListeners:Array; public function ObjectSpace(){ super(); _dormantObjects = new Array(); _objects = new Array(); _pendingObjects = new Array(); _inputListeners = new Array(); _purgeList = new Array(); _uiObjects = new Array(); _autoPurge = false; _autoPurgeMinY = -250; } public function addObject(obj:RenderableObject):void{ _objects.push(obj); } public function destroy():void{ removeAllObjects(); } public function deregisterObject(inObj:RenderableObject):void{ var obj:RenderableObject; var i:int; while (i < _objects.length) { obj = _objects[i]; if (obj == inObj){ _objects.splice(i, 1); i--; if (_objects.length < 1){ break; }; }; i++; }; } public function registerObject(inObj:RenderableObject):void{ _objects.push(inObj); } public function purgeObject(obj:RenderableObject):void{ obj.purge = true; } public function init():void{ } public function addObjectAt(obj:RenderableObject, index:int):void{ _objects.splice(index, 0, obj); } public function addUIObject(obj:RenderableObject):void{ _uiObjects.push(obj); } public function removeAllObjects():void{ var i:int; while (i < _objects.length) { _objects[i].destroy(); i++; }; _objects.splice(0, _objects.length); _uiObjects.splice(0, _uiObjects.length); _pendingObjects.splice(0, _pendingObjects.length); _inputListeners.splice(0, _inputListeners.length); _purgeList.splice(0, _purgeList.length); } public function clickInput(x:Number, y:Number):void{ var i:int; while (i < _inputListeners.length) { _inputListeners[i].clickInput(x, y); i++; }; } public function optimizeByCameraProximity(inCamera:EngineCamera, inThreshhold:Number):void{ var minDist:Number; var dist:Number; var i:int; var obj:RenderableObject; i = 0; while (i < _objects.length) { obj = _objects[i]; if (((obj.allowBaseOptimize) && (!(obj.sm.floating)))){ dist = MathFunction.getDistance(inCamera.cx, inCamera.cy, obj.x, obj.y); if (dist > inThreshhold){ deregisterObject(obj); _dormantObjects.push(obj); }; }; i++; }; i = 0; while (i < _dormantObjects.length) { obj = _dormantObjects[i]; if (obj.purge){ _dormantObjects.splice(i, 1); i--; if (_dormantObjects.length < 1){ break; }; } else { dist = MathFunction.getDistance(inCamera.cx, inCamera.cy, obj.x, obj.y); if (dist <= inThreshhold){ registerObject(obj); _dormantObjects.splice(i, 1); i--; if (_dormantObjects.length < 1){ break; }; }; }; i++; }; zSort(); } public function generateRenderData(cam:EngineCamera):Array{ var i:int; var rd:Array = new Array(); i = 0; while (i < _objects.length) { if (((cam.checkObjectInView(_objects[i])) || (_objects[i].sm.floating))){ rd.push(_objects[i].sm); }; i++; }; i = 0; while (i < _uiObjects.length) { rd.push(_uiObjects[i].sm); i++; }; return (rd); } public function update():void{ var i:int; var j:int; var obj:RenderableObject; i = 0; while (i < _pendingObjects.length) { _objects.push(_pendingObjects[i]); i++; }; _pendingObjects = new Array(); i = 0; while (i < _objects.length) { obj = _objects[i]; if (_autoPurge){ if (obj.y < _autoPurgeMinY){ obj.purge = true; }; }; if (obj.requiresUpdate){ obj.update(); }; if ((((Math.abs(_globalTranslateX) > 0)) || ((Math.abs(_globalTranslateY) > 0)))){ obj.x = (obj.x + _globalTranslateX); obj.y = (obj.y + _globalTranslateY); }; if (obj.purge){ obj.destroy(); _objects.splice(i, 1); i--; }; i++; }; } public function zSort():void{ _objects.sortOn("z", Array.NUMERIC); } public function registerInputListener(obj:RenderableObject):void{ _inputListeners.push(obj); } public function addInputListener(obj:RenderableObject):void{ _inputListeners.push(obj); } } }//package com.psiom.engine
Section 82
//CustomRenderElement (com.psiom.graphics.CustomRenderElement) package com.psiom.graphics { import flash.display.*; import com.psiom.engine.*; public class CustomRenderElement { public var w:int;// = 0x0400 public var h:int;// = 660 protected var _bmd:BitmapData; public function CustomRenderElement(){ super(); _bmd = new BitmapData(w, h); } public function get BMD():BitmapData{ return (_bmd); } public function updateWithCamera(inCamera:EngineCamera):void{ } } }//package com.psiom.graphics
Section 83
//RenderManager (com.psiom.graphics.RenderManager) package com.psiom.graphics { import com.spaceAgent.*; import flash.display.*; import com.psiom.engine.*; import flash.geom.*; public class RenderManager { private var _canvasBMD:BitmapData; private var _matrix:Matrix; private var _canvas:Bitmap; private var _mainPoint:Point; private var _mainRect:Rectangle; private static var _bitmapLibrary:Array; private static var _instance:RenderManager; private static var _animationLibrary:Array; public function RenderManager(){ super(); _instance = this; _bitmapLibrary = new Array(); _animationLibrary = new Array(); RenderManager.addTexture({TexName:"AmmoBasic", Bmd:createStillFromMC(new gClip_ammoBasic()), w:1, h:1, count:1}); RenderManager.addTexture({TexName:"BGGradient", Bmd:createStillFromMC(new gClip_bgGradient()), w:1, h:1, count:1}); RenderManager.addTexture({TexName:"Hint1", Bmd:createStillFromMC(new gClip_hintClip1()), w:1, h:1, count:1}); RenderManager.addTexture({TexName:"Hint2", Bmd:createStillFromMC(new gClip_hintClip2()), w:1, h:1, count:1}); RenderManager.addTexture({TexName:"Hint3", Bmd:createStillFromMC(new gClip_hintClip3()), w:1, h:1, count:1}); RenderManager.addTexture({TexName:"Hint4", Bmd:createStillFromMC(new gClip_hintClip4()), w:1, h:1, count:1}); RenderManager.addTexture({TexName:"Hint5", Bmd:createStillFromMC(new gClip_hintClip5()), w:1, h:1, count:1}); RenderManager.addTexture({TexName:"Hint6", Bmd:createStillFromMC(new gClip_hintClip6()), w:1, h:1, count:1}); RenderManager.addTexture({TexName:"Hint7", Bmd:createStillFromMC(new gClip_hintClip7()), w:1, h:1, count:1}); var bmda:Array = generateAnimSet(new gClip_smokePuff()); RenderManager.addAnimation({TexName:"Anim_SmokePuff", BmdArray:generateAnimSet(new gClip_smokePuff()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AmmoSplode", BmdArray:generateAnimSet(new gClip_ammoSplode()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_TinySpark", BmdArray:generateAnimSet(new gClip_tinySpark()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_TinyPoisonPuff", BmdArray:generateAnimSet(new gClip_tinyPuff1()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AsteroidBig", BmdArray:generateAnimSet(new gClip_asteroidBig()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AsteroidMedium", BmdArray:generateAnimSet(new gClip_asteroidMedium()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_BonusItem", BmdArray:generateAnimSet(new gClip_bonusItems()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_StarFX", BmdArray:generateAnimSet(new gClip_star()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_BGAsteroids", BmdArray:generateAnimSet(new gClip_bgAsteroids()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_BGLargeObj", BmdArray:generateAnimSet(new gClip_bgLargeObj()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_ExhaustParticle", BmdArray:generateAnimSet(new gClip_exhaustParticle()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RocketShip", BmdArray:generateAnimSet(new gClip_rocketShip()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RoidParticle1", BmdArray:generateAnimSet(new gClip_roidParticle1()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RoidParticle2", BmdArray:generateAnimSet(new gClip_roidParticle2()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_SpaceDudes", BmdArray:generateAnimSet(new gClip_spaceDudes()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_BGStar", BmdArray:generateAnimSet(new gClip_starBG()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AmmoBasic", BmdArray:generateAnimSet(new gClip_ammoBasic()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AmmoHeavy", BmdArray:generateAnimSet(new gClip_ammoHeavy()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_MotionParticle", BmdArray:generateAnimSet(new gClip_motionParticle()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AmmoParticle", BmdArray:generateAnimSet(new gClip_ammoParticle1()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AmmoParticle2", BmdArray:generateAnimSet(new gClip_ammoParticle2()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AmmoPickup", BmdArray:generateAnimSet(new gClip_ammoPickup()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_Planet", BmdArray:generateAnimSet(new gClip_planet1()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AsteroidWallSmall", BmdArray:generateAnimSet(new gClip_asteroidWallSmall()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AsteroidWall", BmdArray:generateAnimSet(new gClip_asteroidWall()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AsteroidWallBig", BmdArray:generateAnimSet(new gClip_asteroidWallBig()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_Diamond", BmdArray:generateAnimSet(new gClip_diamond()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_FuelPickup", BmdArray:generateAnimSet(new gClip_fuel()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_DiamondRoid", BmdArray:generateAnimSet(new gClip_diamondRoid()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_TractorBeam", BmdArray:generateAnimSet(new gClip_tractorBeam()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AlienBumper", BmdArray:generateAnimSet(new gClip_alienBumper()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AlienShooter", BmdArray:generateAnimSet(new gClip_alienShooter()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_EnemyAmmo", BmdArray:generateAnimSet(new gClip_enemyAmmo()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_BlackHole", BmdArray:generateAnimSet(new gClip_blackHole()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_LaserNode", BmdArray:generateAnimSet(new gClip_laserNode()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_LaserBeam", BmdArray:generateAnimSet(new gClip_laserBeam()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_FixedTurret", BmdArray:generateAnimSet(new gClip_turretCannon()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_TurretBase", BmdArray:generateAnimSet(new gClip_turretBase()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_EnemyAmmoParticle", BmdArray:generateAnimSet(new gClip_enemyAmmoParticle()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_TentacleSegment", BmdArray:generateAnimSet(new gClip_TentacleSegment()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_TentacleTip", BmdArray:generateAnimSet(new gClip_TentacleTip()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AmmoSeeker", BmdArray:generateAnimSet(new gClip_ammoSeeker()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AmmoMedium", BmdArray:generateAnimSet(new gClip_ammoMedium()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AmmoSeekerHeavy", BmdArray:generateAnimSet(new gClip_ammoSeekerHeavy()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_SmokePuffSmall", BmdArray:generateAnimSet(new gClip_smokePuffSmall()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_SmokePuffTiny", BmdArray:generateAnimSet(new gClip_smokePuffTiny()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RocketShrapnel", BmdArray:generateAnimSet(new gClip_rocketShrap()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_PoisonBarrel", BmdArray:generateAnimSet(new gClip_poisonBarrel()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_GasCloud", BmdArray:generateAnimSet(new gClip_gasCloud()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_PoisonBubble", BmdArray:generateAnimSet(new gClip_poisonBubble()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_Sign", BmdArray:generateAnimSet(new gClip_signPost()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AlienShooterLite", BmdArray:generateAnimSet(new gClip_alienShooterLite()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_AlienBumperLite", BmdArray:generateAnimSet(new gClip_alienBumperLite()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RoidShard1", BmdArray:generateAnimSet(new gClip_roidShard_1()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RoidShard2", BmdArray:generateAnimSet(new gClip_roidShard_2()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RoidShard3", BmdArray:generateAnimSet(new gClip_roidShard_3()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RoidShard4", BmdArray:generateAnimSet(new gClip_roidShard_4()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RoidShard5", BmdArray:generateAnimSet(new gClip_roidShard_5()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RoidShard6", BmdArray:generateAnimSet(new gClip_roidShard_6()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RoidShard7", BmdArray:generateAnimSet(new gClip_roidShard_7()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RoidShard8", BmdArray:generateAnimSet(new gClip_roidShard_8()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RoidShard9", BmdArray:generateAnimSet(new gClip_roidShard_9()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RoidShard10", BmdArray:generateAnimSet(new gClip_roidShard_10()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RoidShard11", BmdArray:generateAnimSet(new gClip_roidShard_11()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RoidShard12", BmdArray:generateAnimSet(new gClip_roidShard_12()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RoidShard13", BmdArray:generateAnimSet(new gClip_roidShard_13()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RoidShard14", BmdArray:generateAnimSet(new gClip_roidShard_14()), w:1, h:1, count:1}); RenderManager.addAnimation({TexName:"Anim_RoidShard15", BmdArray:generateAnimSet(new gClip_roidShard_15()), w:1, h:1, count:1}); } public function renderSprites(spriteData:Array, cam:EngineCamera):void{ var sm:SpriteModel; var pt:Point; var sbmd:BitmapData; var mtx:Number; var mty:Number; var ox:Number; var oy:Number; _canvasBMD.lock(); var i:int; while (i < spriteData.length) { sm = spriteData[i]; if (sm.floating){ pt = new Point(sm.x, sm.y); } else { pt = new Point(Math.floor(((sm.x - cam.x) - (sm.w / 2))), Math.floor(((sm.y - cam.y) - (sm.h / 2)))); }; if (sm.CustomBMD){ sbmd = sm.CustomBMD; } else { if (!sm.animated){ sbmd = _bitmapLibrary[sm.TexRef].Bmd; } else { sbmd = _animationLibrary[sm.TexRef].BmdArray[sm.CurrentFrame]; }; }; if (sbmd){ if ((((sm.r == 0)) && ((sm.s == 1)))){ _canvasBMD.copyPixels(sbmd, sm.DrawRect, pt, null, null, true); } else { if (!_matrix){ _matrix = new Matrix(); }; _matrix.identity(); if (sm.r != 0){ ox = (-(sm.w) / 2); oy = (-(sm.h) / 2); _matrix.translate(ox, oy); _matrix.rotate(sm.r); _matrix.translate(-(ox), -(oy)); }; if (sm.s != 1){ _matrix.translate((-(sm.w) / 2), (-(sm.h) / 2)); _matrix.scale(sm.s, sm.s); _matrix.translate((sm.w / 2), (sm.h / 2)); }; _matrix.translate(pt.x, pt.y); _canvasBMD.draw(sbmd, _matrix, null, sm.BlendMode, null, true); }; } else { trace(((("### WARNING: RenderManager > renderSprites > supplied BitmapData is null. sm: " + sm) + " @frame: ") + sm.CurrentFrame)); }; i++; }; _canvas.bitmapData = _canvasBMD; _canvas.smoothing = true; _canvasBMD.unlock(); } public function init(cw:Number, ch:Number):Bitmap{ _canvasBMD = new BitmapData(cw, ch, false, 0); _canvas = new Bitmap(_canvasBMD, PixelSnapping.NEVER, true); _mainRect = new Rectangle(0, 0, cw, ch); _mainPoint = new Point(0, 0); return (_canvas); } public function clear():void{ _canvasBMD.fillRect(new Rectangle(0, 0, Main.sceneWidth, Main.sceneHeight), 11525090); } public function renderElements(inElements:Array):void{ var element:CustomRenderElement; var i:int; while (i < inElements.length) { element = inElements[i]; _canvasBMD.copyPixels(element.BMD, new Rectangle(0, 0, element.w, element.h), new Point(0, 0), null, null, true); i++; }; } public function get Canvas():Bitmap{ return (_canvas); } private static function addAnimation(inTexObj:Object):void{ _animationLibrary.push(inTexObj); } public static function get BitmapLibrary():Array{ return (_bitmapLibrary); } public static function getTexIDByName(inName:String):int{ var i:int; var texID:int; i = 0; while (i < _bitmapLibrary.length) { if (_bitmapLibrary[i].TexName == inName){ return (texID); }; texID++; i++; }; texID = 0; i = 0; while (i < _animationLibrary.length) { if (_animationLibrary[i].TexName == inName){ return (texID); }; texID++; i++; }; trace(("(renderManage) ### WARNING: texture does not exist: " + inName)); return (-1); } public static function get Instance():RenderManager{ return (_instance); } public static function get AnimationLibrary():Array{ return (_animationLibrary); } private static function addTexture(inTexObj:Object):void{ _bitmapLibrary.push(inTexObj); } public static function createStillFromMC(sourceClip:MovieClip, inScale:Number=1):BitmapData{ var matrix:Matrix; if (!sourceClip){ trace("### WARNING (RenderManager > createStillFromMC) sourceClip is nill"); }; if ((((sourceClip.width == 0)) || ((sourceClip.height == 0)))){ trace(("### WARNING (RenderManager > createStillFromMC) sourceClip is empty: " + sourceClip)); }; var sBMD:BitmapData = new BitmapData(sourceClip.width, sourceClip.height, true, 0xFFFFFF); if (inScale != 1){ matrix = new Matrix(); matrix.scale(inScale, inScale); sBMD.draw(sourceClip, matrix); } else { sBMD.draw(sourceClip); }; return (sBMD); } private static function generateAnimSet(sourceClip:MovieClip):Array{ var w:Number; var h:Number; var sBMD:BitmapData; if (sourceClip._sizeRef){ w = sourceClip._sizeRef.width; h = sourceClip._sizeRef.height; } else { w = sourceClip.width; h = sourceClip.height; }; if (sourceClip.totalFrames <= 1){ trace((("### WARNING: generateAnimSet > problem with sourceClip [sourceClip.totalFrames: " + sourceClip.totalFrames) + "]")); }; var bmdArray:Array = new Array(); var i = 1; while (i <= sourceClip.totalFrames) { sourceClip.gotoAndStop(i); sBMD = new BitmapData(w, h, true, 0); sBMD.draw(sourceClip); bmdArray.push(sBMD); i++; }; return (bmdArray); } } }//package com.psiom.graphics
Section 84
//SpriteModel (com.psiom.graphics.SpriteModel) package com.psiom.graphics { import flash.display.*; import flash.geom.*; public class SpriteModel { public var r:Number;// = 0 public var floating:Boolean;// = false private var _subHeight:Number;// = 0 private var _texRef:int;// = 0 private var _blendMode:String; public var animated:Boolean;// = false public var loop:Boolean;// = false private var _drawRect:Rectangle; public var primaryVis:Boolean;// = true private var _subWidth:Number;// = 0 private var _customBMD:BitmapData; private var _totalFrames:Number;// = 0 private var _currentFrame:Number;// = 0 public var h:Number;// = 1 public var s:Number;// = 1 private var _frameRate:Number;// = 0 public var w:Number;// = 1 public var x:Number;// = 0 public var y:Number;// = 0 public var z:Number;// = 1 public function SpriteModel(){ super(); } public function set BlendMode(val:String):void{ _blendMode = val; } public function get TexRef():int{ return (_texRef); } public function get CurrentFrame():Number{ return (_currentFrame); } public function init(inTexRef:int, inWidth:Number, inHeight:Number):void{ _blendMode = "normal"; _texRef = inTexRef; _drawRect = new Rectangle(0, 0, inWidth, inHeight); } public function set FrameRate(inVal:Number):void{ _frameRate = inVal; if (_totalFrames <= 0){ trace("(SpriteModel) ### WARNING: FrameSetter used but there are no frames."); }; } public function set CurrentFrame(inVal:Number):void{ _currentFrame = inVal; } public function setAnimProperties(inW:Number, inH:Number, inCount:Number):void{ _subWidth = inW; _subHeight = inH; _totalFrames = inCount; } public function get CustomBMD():BitmapData{ return (_customBMD); } public function get FrameRate():Number{ return (_frameRate); } public function set TotalFrames(inVal:Number):void{ _totalFrames = inVal; } public function update(inX:Number, inY:Number, inZ:Number, inWidth:Number, inHeight:Number, inRotation:Number, inScale:Number):void{ x = inX; y = inY; z = inZ; w = inWidth; h = inHeight; r = inRotation; s = inScale; if (_frameRate != 0){ _currentFrame = (_currentFrame + _frameRate); if (_currentFrame < 0){ if (loop){ _currentFrame = (_totalFrames - 1); } else { _currentFrame = 0; }; }; if (_currentFrame > (_totalFrames - 1)){ if (loop){ _currentFrame = 0; } else { _currentFrame = (_totalFrames - 1); }; }; }; } public function get TotalFrames():Number{ return (_totalFrames); } public function get DrawRect():Rectangle{ return (_drawRect); } public function initWithCustomBMD(inBMD:BitmapData):void{ _blendMode = "normal"; _customBMD = inBMD; _drawRect = new Rectangle(0, 0, inBMD.width, inBMD.height); } public function get BlendMode():String{ return (_blendMode); } } }//package com.psiom.graphics
Section 85
//MathFunction (com.psiom.util.MathFunction) package com.psiom.util { public class MathFunction { public function MathFunction(){ super(); } public static function degreesToRadians(inDegrees:Number):Number{ return ((inDegrees * (Math.PI / 180))); } public static function framesToTimeCode(inFramerate:Number, inFrameCount:Number):String{ var ts:String; var subSeconds:Number = (inFrameCount % inFramerate); var subSeconds100:Number = ((subSeconds / inFramerate) * 99); var seconds:Number = ((inFrameCount - subSeconds) / inFramerate); var minutes:Number = 0; while (seconds > 59) { seconds = (seconds - 60); minutes++; }; var minutesString:String = ""; if (minutes < 10){ minutesString = (minutesString + "0"); }; minutesString = (minutesString + String(minutes)); if (minutes > 99){ minutesString = "99"; }; var secondsString:String = ""; if (seconds < 10){ secondsString = (secondsString + "0"); }; secondsString = (secondsString + String(seconds)); var subSecondsString:String = ""; if (subSeconds < 10){ subSecondsString = (subSecondsString + "0"); }; subSecondsString = (subSecondsString + String(subSeconds)); return (((((minutesString + ":") + secondsString) + ":") + subSecondsString)); } public static function formatNumberStringWithCommas(inNumber:Number):String{ var k:Number; var d:Number; var nString:String = String(inNumber); var fieldPieces:Array = nString.split(""); fieldPieces.reverse(); var finalString:String = ""; k = 0; while (k < fieldPieces.length) { finalString = (fieldPieces[k] + finalString); d = (k % 3); if (k < (fieldPieces.length - 1)){ if (d == 2){ finalString = ("," + finalString); }; }; k++; }; return (finalString); } public static function get pnRand():Number{ return ((Math.random() - 0.5)); } public static function getVector(inRadians:Number, inVelocity:Number):Object{ var vX:Number = (inVelocity * Math.cos(inRadians)); var vY:Number = (inVelocity * Math.sin(inRadians)); return ({x:vX, y:vY}); } public static function radiansToDegrees(inRadians:Number):Number{ return ((inRadians * (180 / Math.PI))); } public static function getDistance(inSourceX:Number, inSourceY:Number, inTargetX:Number, inTargetY:Number):Number{ return (Math.sqrt(((Math.abs((inSourceX - inTargetX)) * Math.abs((inSourceX - inTargetX))) + (Math.abs((inSourceY - inTargetY)) * Math.abs((inSourceY - inTargetY)))))); } public static function getRadians(inSourceX:Number, inSourceY:Number, inTargetX:Number, inTargetY:Number):Number{ return (Math.atan2((inTargetY - inSourceY), (inTargetX - inSourceX))); } } }//package com.psiom.util
Section 86
//SharedObjectWrapper (com.psiom.util.SharedObjectWrapper) package com.psiom.util { import flash.events.*; import flash.net.*; public class SharedObjectWrapper { private var _avail:Boolean;// = false private var _so:SharedObject; private var _soDummy:Object; public function SharedObjectWrapper(){ super(); } public function get data():Object{ if (_avail){ return (_so.data); }; return (_soDummy.data); } public function flush():void{ if (_avail){ _so.flush(); //unresolved jump var _slot1 = error; _avail = false; }; } private function onFlushStatus(event:NetStatusEvent):void{ switch (event.info.code){ case "SharedObject.Flush.Success": break; case "SharedObject.Flush.Failed": _avail = false; break; }; _so.removeEventListener(NetStatusEvent.NET_STATUS, onFlushStatus); } public function init(inName:String, inLocalPath:String):void{ _so = SharedObject.getLocal(inName, inLocalPath); _so.addEventListener(NetStatusEvent.NET_STATUS, onFlushStatus); _soDummy = {data:new Object()}; _avail = true; } } }//package com.psiom.util
Section 87
//BaseButton (com.psiom.BaseButton) package com.psiom { import flash.events.*; import flash.display.*; public class BaseButton extends BaseElement { private var _rollHLStrength:Number;// = 1 private var _rollActive:Boolean;// = false public var _roll:MovieClip; private var _toggleState:int;// = -1 private var _vmodeArray:Array; private var _baseX:Number; private var _numStates:int;// = 2 private var _baseY:Number; private var _baseWidth:Number; private var _baseHeight:Number; private var _basePositionInit:Boolean;// = false public var _base:MovieClip; public function BaseButton(){ super(); _baseX = x; _baseY = y; _baseWidth = width; _baseHeight = height; if (_roll){ _roll.alpha = 0; addEventListener(MouseEvent.MOUSE_OVER, onRollOn); addEventListener(MouseEvent.MOUSE_OUT, onRollOut); _roll.mouseEnabled = false; _roll.mouseChildren = false; }; if (_base){ _base.mouseEnabled = false; _base.mouseChildren = false; }; buttonMode = true; visible = true; alpha = 1; } public function set VmodeArray(a:Array):void{ _vmodeArray = a; if (!a){ trace("### WARNING: VmodeArray is broken"); return; }; if (a.length == 0){ trace("### WARNING: VmodeArray is empty"); }; } public function set RollHLStrength(n:Number):void{ _rollHLStrength = n; } public function quickHide():void{ visible = false; alpha = 0; } private function onRollEnterFrame(event:Event):void{ if (!_basePositionInit){ _baseX = x; _baseY = y; _basePositionInit = true; }; if (alpha < 0.75){ _rollActive = false; }; if (_rollActive){ _roll.visible = true; if (_roll.alpha > (_rollHLStrength - 0.02)){ _roll.alpha = _rollHLStrength; removeEventListener("enterFrame", onRollEnterFrame); }; _roll.alpha = (_roll.alpha + ((_rollHLStrength - _roll.alpha) * 0.33)); } else { if (_roll.alpha < 0.02){ _roll.visible = false; removeEventListener("enterFrame", onRollEnterFrame); }; _roll.alpha = (_roll.alpha + ((0 - _roll.alpha) * 0.33)); }; width = (_baseWidth + (5 * _roll.alpha)); height = (_baseHeight * (width / _baseWidth)); x = (_baseX - ((width - _baseWidth) / 2)); y = (_baseY - ((height - _baseHeight) / 2)); } public function get CurrentState():int{ return (_toggleState); } public function toggleState():void{ if (_toggleState == -1){ trace(("### WARNING: toggleState() called on a button not initialized for toggling: " + name)); }; _toggleState++; if (_toggleState > (_numStates - 1)){ _toggleState = 0; }; if (_base){ _base.gotoAndStop((_toggleState + 1)); }; if (_roll){ _roll.gotoAndStop((_toggleState + 1)); }; } public function makeToggle(defaultState:int=0, numStates:int=2):void{ if (numStates < 2){ trace(((("### WARNING: number of states in toggle button is out of wack. numStates: " + numStates) + " on ") + name)); }; _numStates = numStates; if (defaultState < 0){ defaultState = 0; }; if (defaultState > (_numStates - 1)){ defaultState = (_numStates - 1); }; if (_base){ _base.gotoAndStop((defaultState + 1)); }; if (_roll){ _roll.gotoAndStop((defaultState + 1)); }; _toggleState = defaultState; } public function get VmodeArray():Array{ return (_vmodeArray); } private function onRollOut(event:Event):void{ _rollActive = false; addEventListener("enterFrame", onRollEnterFrame); } private function onRollOn(event:Event):void{ _rollActive = true; addEventListener("enterFrame", onRollEnterFrame); } } }//package com.psiom
Section 88
//BaseElement (com.psiom.BaseElement) package com.psiom { import flash.events.*; import flash.display.*; public class BaseElement extends MovieClip { protected var vismode:int;// = 0 private var _stageHeight:Number;// = 450 private var _stageWidth:Number;// = 700 private var _fadeUpDelayTicks:Number;// = 0 private var _fadeSpeed:Number;// = 0.33 private var _fadeUpDelayBase:Number;// = 0 public function BaseElement(){ super(); visible = false; alpha = 0; } public function positionInsetFromObjY(objRef:MovieClip, insetY:Number):void{ y = (objRef.y + insetY); } public function centerY(objRef:MovieClip=null):void{ var ry:Number; if (objRef){ ry = (objRef.y + ((objRef.height - height) / 2)); } else { ry = ((_stageHeight - height) / 2); }; y = ry; } public function centerX(objRef:MovieClip=null):void{ var rx:Number; if (objRef){ rx = (objRef.x + ((objRef.width - width) / 2)); } else { rx = ((_stageWidth - width) / 2); }; x = rx; } public function set VisMode(v:int):void{ if (vismode != v){ removeEventListener("enterFrame", onVisModeEnterFrame); addEventListener("enterFrame", onVisModeEnterFrame); }; vismode = v; } public function set FadeSpeed(n:Number):void{ _fadeSpeed = n; } private function onVisModeEnterFrame(event:Event):void{ if (vismode == 0){ mouseEnabled = false; mouseChildren = false; _fadeUpDelayTicks = 0; alpha = (alpha + ((0 - alpha) * _fadeSpeed)); if (alpha < 0.02){ visible = false; removeEventListener("enterFrame", onVisModeEnterFrame); }; } else { mouseEnabled = true; mouseChildren = true; if (_fadeUpDelayTicks < _fadeUpDelayBase){ _fadeUpDelayTicks++; } else { visible = true; alpha = (alpha + ((1 - alpha) * _fadeSpeed)); if (alpha > 0.98){ alpha = 1; removeEventListener("enterFrame", onVisModeEnterFrame); }; }; }; } public function get VisMode():int{ return (vismode); } public function set FadeUpDelay(n:Number):void{ _fadeUpDelayBase = n; } } }//package com.psiom
Section 89
//LevelData (com.spaceAgent.engine.engineComponents.LevelData) package com.spaceAgent.engine.engineComponents { import flash.events.*; import flash.net.*; import flash.system.*; public class LevelData extends EventDispatcher { private var _levelWidth:Number;// = 10000 private var _levelHeight:Number;// = 10000 private var _levelObjects:Array; public function LevelData(){ super(); } public function readData(inXML:XML):void{ var obj:Object; var levelObject:Object; _levelObjects = new Array(); var objects:XMLList = inXML.objects.object; _levelWidth = inXML.@width; _levelHeight = inXML.@height; for each (obj in objects) { levelObject = {Type:obj.type.toString(), x:Math.floor(obj.x), y:Math.floor(obj.y), rotation:obj.rotation, yOffset:obj.yOffset}; _levelObjects.push(levelObject); }; } public function getObjectsAtCurrentLocation(inYLoc:Number):Array{ var numReturned:int; var objYCheck:Number; var levelObject:Object; var objects:Array = new Array(); var i:int; while (i < _levelObjects.length) { objYCheck = (_levelObjects[i].y + Number((_levelObjects[i].yOffset * 1))); if (objYCheck <= -(inYLoc)){ numReturned++; levelObject = _levelObjects[i]; objects.push(levelObject); } else { break; }; i++; }; if (numReturned > 0){ _levelObjects.splice(0, numReturned); }; if (objects.length < 1){ return (null); }; return (objects); } public function getObjects():Array{ return (_levelObjects); } public function writeData(inObjectsArray:Array):String{ var levelString:String = ""; levelString = (levelString + "<level>"); levelString = (levelString + "\n \t<objects>"); var i:int; while (i < inObjectsArray.length) { levelString = (levelString + "\n \t \t<object>"); levelString = (levelString + (("\n \t \t \t<type>" + inObjectsArray[i].Type) + "</type>")); levelString = (levelString + (("\n \t \t \t<x>" + String(inObjectsArray[i].X)) + "</x>")); levelString = (levelString + (("\n \t \t \t<y>" + String(inObjectsArray[i].Y)) + "</y>")); levelString = (levelString + (("\n \t \t \t<rotation>" + String(inObjectsArray[i].R)) + "</rotation>")); levelString = (levelString + (("\n \t \t \t<yOffset>" + String(inObjectsArray[i].yOffset)) + "</yOffset>")); levelString = (levelString + "\n \t \t</object>"); i++; }; levelString = (levelString + "\n \t</objects>"); levelString = (levelString + "\n</level>"); trace(("levelString: \n" + levelString)); System.setClipboard(levelString); return (levelString); } public function get LevelHeight():Number{ return (_levelHeight); } public function loadData(inPath:String):void{ var xmlLoader:URLLoader = new URLLoader(); xmlLoader.addEventListener(Event.COMPLETE, onXMLLoaded); xmlLoader.load(new URLRequest(inPath)); } public function get LevelWidth():Number{ return (_levelWidth); } public function get LevelDataArray():Array{ return (_levelObjects); } private function onXMLLoaded(event:Event):void{ var xmlData:XML = new XML(event.target.data); readData(xmlData); dispatchEvent(new Event("levelLoaded")); } } }//package com.spaceAgent.engine.engineComponents
Section 90
//AlienBase (com.spaceAgent.engine.gameObjects.AlienBase) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.sound.*; import com.psiom.engine.gameObject.*; import com.spaceAgent.engine.*; import com.spaceAgent.engine.objectSpaces.*; import com.psiom.util.*; public class AlienBase extends SolidObject { protected var _mode:int; protected var _primaryMode:int; protected var _ramInterval:Number;// = 80 protected var _modeSwitchTimer:int;// = 0 protected var _hitMod:Number;// = 1 protected var _ramTimer:Number;// = 0 protected var _targetObj:RenderableObject; protected var _baseHealth:Number;// = 1250 protected var _alienHealth:Number; protected var _recovery:Number;// = 0 protected var _modeSwitchInterval:int;// = 75 private static var texID:int = -1; public static var MODE_HOVERCLOSE:int = 2; private static var totalFrames:int = -1; public static var MODE_CRASHPLAYER:int = 1; public static var MODE_AVOIDINGSOLIDS:int = 0; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function AlienBase(){ super(); _mode = MODE_HOVERCLOSE; _primaryMode = MODE_HOVERCLOSE; _collisionSounds = [SoundManager.SND_CLANKLIGHT1, SoundManager.SND_CLANKLIGHT2, SoundManager.SND_CLANKLIGHT3, SoundManager.SND_CLANKHEAVY1, SoundManager.SND_CLANKHEAVY2, SoundManager.SND_CLANKHEAVY3]; _destructionSounds = [SoundManager.SND_ALIENSPLODE]; _alienHealth = _baseHealth; radius = 50; _nearThreshholdOverride = 250; _nearThreshholdBase = 250; EngineMain.Instance.addToFinalPossibleScore(1500); } override public function update():void{ var dist:Number; var minDist:Number; var i:int; var cObj:SolidObject; var velP:Number; var cObjRad:Number; var avoidanceVec:Object; if (_alienHealth < 100){ _alienHealth = (_alienHealth + 0.1); }; if (Registered){ if (_targetObj){ dist = MathFunction.getDistance(x, y, _targetObj.x, _targetObj.y); if (dist < 700){ GameLevel.Instance.AlienAutoZoomFactor = 0.6; }; }; }; if (Registered){ if (_alienHealth > 0){ i = 0; while (i < _collisionTargets.length) { cObj = _collisionTargets[i]; if (cObj != _targetObj){ dist = MathFunction.getDistance(x, y, cObj.x, cObj.y); minDist = (cObj.radius + 120); if (dist < minDist){ velP = (1 - (dist / minDist)); cObjRad = MathFunction.getRadians(cObj.x, cObj.y, x, y); avoidanceVec = MathFunction.getVector(cObjRad, (3 * velP)); vx = (vx + avoidanceVec.x); vy = (vy + avoidanceVec.y); }; }; i++; }; }; if (_ramTimer > -1){ _ramTimer--; }; if (_modeSwitchTimer > -1){ _modeSwitchTimer--; }; if (_alienHealth > 0){ _maxVel = 15; if (_spriteModel.CurrentFrame > 9){ _spriteModel.CurrentFrame = 0; _spriteModel.FrameRate = 0; }; } else { _maxVel = 6; _spriteModel.FrameRate = 1; if (_spriteModel.CurrentFrame > (_spriteModel.TotalFrames - 2)){ _spriteModel.CurrentFrame = 9; }; }; }; r = (r + (((vx * 0.1) - r) * 0.05)); super.update(); _nearThreshholdOverride = 250; } public function set TargetObj(inTarget:RenderableObject):void{ _targetObj = inTarget; } override public function getDestructionParticles():Array{ var particles:Array; var roidParticle:EnemyAmmoParticle; var pVec:Object; var smokePuff:SmokePuff; particles = new Array(); var pCount:int = Math.floor((50 + (Math.random() * 10))); var p:int; while (p < pCount) { roidParticle = new EnemyAmmoParticle(); pVec = MathFunction.getVector(((Math.random() * Math.PI) * 2), (0.5 + (Math.random() * 5))); roidParticle.x = (x + ((Math.random() * 5) - 2.5)); roidParticle.y = (y + ((Math.random() * 5) - 2.5)); roidParticle.vx = pVec.x; roidParticle.vy = pVec.y; if ((((Math.random() > 0.6)) && (((Math.abs(roidParticle.vx) + Math.abs(roidParticle.vy)) > 4.9)))){ roidParticle.LeaveSmoke = true; }; particles.push(roidParticle); if (Math.random() > 0.85){ smokePuff = new SmokePuff(); smokePuff.x = (x + ((Math.random() - 0.5) * 60)); smokePuff.y = (y + ((Math.random() - 0.5) * 60)); smokePuff.vx = ((Math.random() - 0.5) * 5.5); smokePuff.vy = ((Math.random() - 0.5) * 5.5); smokePuff.startRandom(); particles.push(smokePuff); }; p++; }; var smokePuff2:SmokePuff = new SmokePuff(); smokePuff2.x = x; smokePuff2.y = y; particles.push(smokePuff2); return (particles); } override public function hit(inDamage:Number, inHitBy:RenderableObject=null, inForce:Number=1):void{ super.hit(inDamage, inHitBy, inForce); _spriteModel.FrameRate = 1; if ((((((inHitBy is AsteroidWall)) || ((inHitBy is AsteroidWallBig)))) || ((inHitBy is AsteroidWallSmall)))){ inDamage = (inDamage * 0.01); }; if ((inHitBy is SolidObject)){ vx = 0; vy = 0; } else { if (_alienHealth > 0){ vx = (vx + ((inHitBy.vx * 0.05) * _hitMod)); vy = (vy + ((inHitBy.vy * 0.05) * _hitMod)); } else { vx = (vx + ((inHitBy.vx * 0.01) * _hitMod)); vy = (vy + ((inHitBy.vy * 0.01) * _hitMod)); }; _ramTimer = (25 + Math.floor((Math.random() * 25))); }; _alienHealth = (_alienHealth - inDamage); if (_alienHealth < (-(_baseHealth) * 0.18)){ health = -1; }; if (inHitBy == _targetObj){ _ramTimer = _ramInterval; }; if ((inHitBy is PlayerAmmo)){ if (health < 0){ EngineMain.Instance.triggerScoreBlip((750 + Math.abs(health))); }; }; } override public function getDestructionSpawnItems():Array{ var rvx:Number; var rvy:Number; var diamond:Diamond; var dsItems:Array = super.getDestructionSpawnItems(); var pCount = 2; var p:int; while (p < pCount) { rvx = ((Math.random() - 0.5) * 4); rvy = ((Math.random() - 0.5) * 4); diamond = new Diamond(); diamond.x = (x + ((Math.random() * 20) - 10)); diamond.y = (y + ((Math.random() * 20) - 10)); diamond.vx = rvx; diamond.vy = rvy; diamond.Torque = ((Math.random() - 0.5) * 0.2); dsItems.push(diamond); p++; }; return (dsItems); } override public function damage(inDamage:Number, inDamagedBy:RenderableObject=null):void{ super.damage(inDamage); _spriteModel.FrameRate = 1; torque = ((Math.random() - 0.5) * 0.3); r = (r + ((Math.random() - 0.5) * 0.15)); _alienHealth = (_alienHealth - inDamage); if (_alienHealth < (-(_baseHealth) * 0.1)){ health = -1; }; } } }//package com.spaceAgent.engine.gameObjects
Section 91
//AlienBumper (com.spaceAgent.engine.gameObjects.AlienBumper) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; import com.psiom.util.*; public class AlienBumper extends AlienBase { private var _avoidanceCrashTurnInterval:Number;// = 150 private var _avoidanceCrashTurnTimer:Number;// = 0 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function AlienBumper(){ super(); if (AlienBumper.texID == -1){ AlienBumper.texID = RenderManager.getTexIDByName("Anim_AlienBumper"); }; if (AlienBumper.baseWidth == -1){ AlienBumper.baseWidth = RenderManager.AnimationLibrary[AlienBumper.texID].BmdArray[0].width; AlienBumper.baseHeight = RenderManager.AnimationLibrary[AlienBumper.texID].BmdArray[0].height; }; _spriteModel.init(AlienBumper.texID, AlienBumper.baseWidth, AlienBumper.baseHeight); _spriteModel.animated = true; if (AlienBumper.totalFrames == -1){ AlienBumper.totalFrames = RenderManager.AnimationLibrary[AlienBumper.texID].BmdArray.length; }; _spriteModel.TotalFrames = AlienBumper.totalFrames; x = 0; y = 0; w = AlienBumper.baseWidth; h = AlienBumper.baseHeight; s = 1; r = 0; _primaryMode = AlienBase.MODE_CRASHPLAYER; mass = 75; bounceDamp = 0.5; bounceMod = 3; _maxVel = 16; } override public function update():void{ var dist:Number; var minDist:Number; var mP:Number; var maxVel:Number; var dRad:Number; var dVec:Object; var cVel:Number; var dir:Number; var vec:Object; if (Registered){ dist = MathFunction.getDistance(x, y, _targetObj.x, _targetObj.y); if (_mode == AlienBase.MODE_CRASHPLAYER){ if ((((((dist < 600)) && ((_alienHealth > 0)))) && ((_ramTimer < 0)))){ mP = 0; maxVel = 16; if (dist > 10){ mP = 25; maxVel = 16; }; if (dist > 120){ mP = 0.4; maxVel = 10; }; if (dist > 180){ mP = 0.8; }; if (dist > 220){ mP = 1.5; }; if (dist > 300){ mP = 1.8; }; dRad = MathFunction.getRadians(x, y, _targetObj.x, _targetObj.y); dVec = MathFunction.getVector(dRad, mP); if (dist > 350){ vx = (vx + (((dVec.x * 25) - vx) * 0.05)); vy = (vy + (((dVec.y * 25) - vy) * 0.05)); }; vx = (vx + dVec.x); vy = (vy + dVec.y); cVel = MathFunction.getDistance(0, 0, vx, vy); if (cVel > maxVel){ dir = MathFunction.getRadians(0, 0, vx, vy); vec = MathFunction.getVector(dir, maxVel); vx = vec.x; vy = vec.y; }; }; }; if (_modeSwitchTimer < 0){ _mode = _primaryMode; }; if (camVis){ if (Math.random() > 0.3){ GameLevel.Instance.addExhaustParticle(this); }; }; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 92
//AlienBumperLite (com.spaceAgent.engine.gameObjects.AlienBumperLite) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; import com.psiom.util.*; public class AlienBumperLite extends AlienBase { private var _avoidanceCrashTurnInterval:Number;// = 150 private var _avoidanceCrashTurnTimer:Number;// = 0 private var _radOffset:Number;// = 0 private var _radOffsetInterval:Number;// = 60 private var _radOffsetSin:Number; private var _radOffsetSinF:Number;// = 0.03 private var _radOffsetSinA:Number;// = 1.5 private var _radOffsetTimer:Number;// = 0 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function AlienBumperLite(){ _radOffsetSin = ((Math.random() * Math.PI) * 2); super(); if (AlienBumperLite.texID == -1){ AlienBumperLite.texID = RenderManager.getTexIDByName("Anim_AlienBumperLite"); }; if (AlienBumperLite.baseWidth == -1){ AlienBumperLite.baseWidth = RenderManager.AnimationLibrary[AlienBumperLite.texID].BmdArray[0].width; AlienBumperLite.baseHeight = RenderManager.AnimationLibrary[AlienBumperLite.texID].BmdArray[0].height; }; _spriteModel.init(AlienBumperLite.texID, AlienBumperLite.baseWidth, AlienBumperLite.baseHeight); _spriteModel.animated = true; if (AlienBumperLite.totalFrames == -1){ AlienBumperLite.totalFrames = RenderManager.AnimationLibrary[AlienBumperLite.texID].BmdArray.length; }; _spriteModel.TotalFrames = AlienBumperLite.totalFrames; x = 0; y = 0; w = AlienBumperLite.baseWidth; h = AlienBumperLite.baseHeight; s = 1; r = 0; _primaryMode = AlienBase.MODE_CRASHPLAYER; mass = 80; _baseHealth = 600; _alienHealth = 600; radius = 40; } override public function update():void{ var dist:Number; var minDist:Number; var mP:Number; var dRad:Number; var dVec:Object; var cVel:Number; var dir:Number; var vec:Object; if (Registered){ _radOffsetSin = (_radOffsetSin + _radOffsetSinF); _radOffset = (Math.sin(_radOffsetSin) * _radOffsetSinA); dist = MathFunction.getDistance(x, y, _targetObj.x, _targetObj.y); if (_mode == AlienBase.MODE_CRASHPLAYER){ if ((((((dist < 600)) && ((_alienHealth > 0)))) && ((_ramTimer < 0)))){ mP = 0; if (dist > 50){ mP = 2.5; }; if (dist > 100){ mP = 0.5; }; if (dist > 150){ mP = 0.7; }; if (dist > 200){ mP = 0.9; }; if (dist > 250){ mP = 1.1; }; if (dist > 300){ mP = 1.3; }; dRad = MathFunction.getRadians(x, y, _targetObj.x, _targetObj.y); dVec = MathFunction.getVector((dRad + _radOffset), mP); vx = (vx + dVec.x); vy = (vy + dVec.y); cVel = MathFunction.getDistance(0, 0, vx, vy); if (cVel > 7){ dir = MathFunction.getRadians(0, 0, vx, vy); vec = MathFunction.getVector(dir, 7); vx = vec.x; vy = vec.y; }; }; }; if (_modeSwitchTimer < 0){ _mode = _primaryMode; }; if (camVis){ if (Math.random() > 0.3){ GameLevel.Instance.addExhaustParticle(this); }; }; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 93
//AlienShooter (com.spaceAgent.engine.gameObjects.AlienShooter) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.sound.*; import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; import com.psiom.util.*; public class AlienShooter extends AlienBase { private var _avoidanceCrashTurnTimer:Number;// = 0 private var _radOffset:Number;// = 0 private var _ammoDelay:Number;// = 8 private var _radOffsetSinF:Number;// = 0.04 private var _ammoTimer:Number;// = 0 private var _radOffsetSinA:Number;// = 1.8 private var _burstDelay:Number;// = 60 private var _avoidanceCrashTurnInterval:Number;// = 150 private var _radOffsetSin:Number; private var _burstTimer:Number;// = 0 private var _burstCount:Number;// = 2 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function AlienShooter(){ _radOffsetSin = ((Math.random() * Math.PI) * 2); super(); if (AlienShooter.texID == -1){ AlienShooter.texID = RenderManager.getTexIDByName("Anim_AlienShooter"); }; if (AlienShooter.baseWidth == -1){ AlienShooter.baseWidth = RenderManager.AnimationLibrary[AlienShooter.texID].BmdArray[0].width; AlienShooter.baseHeight = RenderManager.AnimationLibrary[AlienShooter.texID].BmdArray[0].height; }; _spriteModel.init(AlienShooter.texID, AlienShooter.baseWidth, AlienShooter.baseHeight); _spriteModel.animated = true; if (AlienShooter.totalFrames == -1){ AlienShooter.totalFrames = RenderManager.AnimationLibrary[AlienShooter.texID].BmdArray.length; }; _spriteModel.TotalFrames = AlienShooter.totalFrames; x = 0; y = 0; w = AlienShooter.baseWidth; h = AlienShooter.baseHeight; s = 1; r = 0; _primaryMode = AlienBase.MODE_HOVERCLOSE; mass = 80; _hitMod = 12; } override public function update():void{ var dist:Number; var minDist:Number; var mP:Number; var dRad:Number; var dVec:Object; if (Registered){ _radOffsetSin = (_radOffsetSin + _radOffsetSinF); _radOffset = (Math.sin(_radOffsetSin) * _radOffsetSinA); dist = MathFunction.getDistance(x, y, _targetObj.x, _targetObj.y); _ammoTimer--; _burstTimer--; if ((((_alienHealth > 0)) && ((dist < 300)))){ if (_burstTimer < 0){ if (_ammoTimer < 0){ _ammoTimer = _ammoDelay; fireWeapon(); }; }; if (_burstTimer < (0 - (_burstCount * _ammoDelay))){ _burstTimer = _burstDelay; }; } else { if (_burstTimer < 0){ _burstTimer = 0; }; }; if (_mode == AlienBase.MODE_HOVERCLOSE){ if ((((dist < 800)) && ((_alienHealth > 0)))){ if (dist < 175){ mP = -0.2; } else { mP = 0.25; }; dRad = MathFunction.getRadians(x, y, _targetObj.x, _targetObj.y); dVec = MathFunction.getVector((dRad + _radOffset), mP); if (dist > 200){ vx = (vx + (((dVec.x * 25) - vx) * 0.2)); vy = (vy + (((dVec.y * 25) - vy) * 0.2)); }; vx = (vx + dVec.x); vy = (vy + dVec.y); }; }; if (_modeSwitchTimer < 0){ _mode = _primaryMode; }; if (camVis){ if (Math.random() > 0.3){ GameLevel.Instance.addExhaustParticle(this); }; }; }; super.update(); } private function createAmmo(inAmmo:EnemyAmmo, inX:Number, inY:Number, inR:Number, inVX:Number, inVY:Number):void{ var ammoVec:Object; ammoVec = MathFunction.getVector(inR, 6.2); inAmmo.x = inX; inAmmo.y = inY; inAmmo.vx = (inVX + ammoVec.x); inAmmo.vy = (inVY + ammoVec.y); GameLevel.Instance.createEnemyAmmo(inAmmo); } private function fireWeapon():void{ var ammo:EnemyAmmo; SoundManager.Instance.playSoundID(SoundManager.SND_ENEMYFIRE, 0.4); var ax:Number = x; var ay:Number = y; var ammoRadians:Number = MathFunction.getRadians(x, y, _targetObj.x, _targetObj.y); if (Math.random() > 0.5){ ammoRadians = (ammoRadians + ((Math.random() - 0.5) * 0.3)); }; ammo = new EnemyAmmo(); createAmmo(ammo, ax, ay, ammoRadians, 0, 0); } } }//package com.spaceAgent.engine.gameObjects
Section 94
//AlienShooterLite (com.spaceAgent.engine.gameObjects.AlienShooterLite) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.sound.*; import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; import com.psiom.util.*; public class AlienShooterLite extends AlienBase { private var _avoidanceCrashTurnTimer:Number;// = 0 private var _radOffset:Number;// = 0 private var _ammoDelay:Number;// = 8 private var _radOffsetSinF:Number;// = 0.04 private var _ammoTimer:Number;// = 0 private var _radOffsetSinA:Number;// = 1.8 private var _burstDelay:Number;// = 90 private var _avoidanceCrashTurnInterval:Number;// = 150 private var _radOffsetSin:Number; private var _burstTimer:Number;// = 0 private var _burstCount:Number;// = 1 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function AlienShooterLite(){ _radOffsetSin = ((Math.random() * Math.PI) * 2); super(); if (AlienShooterLite.texID == -1){ AlienShooterLite.texID = RenderManager.getTexIDByName("Anim_AlienShooterLite"); }; if (AlienShooterLite.baseWidth == -1){ AlienShooterLite.baseWidth = RenderManager.AnimationLibrary[AlienShooterLite.texID].BmdArray[0].width; AlienShooterLite.baseHeight = RenderManager.AnimationLibrary[AlienShooterLite.texID].BmdArray[0].height; }; _spriteModel.init(AlienShooterLite.texID, AlienShooterLite.baseWidth, AlienShooterLite.baseHeight); _spriteModel.animated = true; if (AlienShooterLite.totalFrames == -1){ AlienShooterLite.totalFrames = RenderManager.AnimationLibrary[AlienShooterLite.texID].BmdArray.length; }; _spriteModel.TotalFrames = AlienShooterLite.totalFrames; x = 0; y = 0; w = AlienShooterLite.baseWidth; h = AlienShooterLite.baseHeight; s = 1; r = 0; _primaryMode = AlienBase.MODE_HOVERCLOSE; mass = 80; _hitMod = 12; _baseHealth = 600; _alienHealth = 600; radius = 40; } override public function update():void{ var dist:Number; var minDist:Number; var mP:Number; var dRad:Number; var dVec:Object; if (Registered){ _radOffsetSin = (_radOffsetSin + _radOffsetSinF); _radOffset = (Math.sin(_radOffsetSin) * _radOffsetSinA); dist = MathFunction.getDistance(x, y, _targetObj.x, _targetObj.y); _ammoTimer--; _burstTimer--; if ((((_alienHealth > 0)) && ((dist < 300)))){ if (_burstTimer < 0){ if (_ammoTimer < 0){ _ammoTimer = _ammoDelay; fireWeapon(); }; }; if (_burstTimer < (0 - (_burstCount * _ammoDelay))){ _burstTimer = _burstDelay; }; } else { if (_burstTimer < 0){ _burstTimer = 0; }; }; if (_mode == AlienBase.MODE_HOVERCLOSE){ if ((((dist < 800)) && ((_alienHealth > 0)))){ if (dist < 175){ mP = -0.2; } else { mP = 0.2; }; dRad = MathFunction.getRadians(x, y, _targetObj.x, _targetObj.y); dVec = MathFunction.getVector((dRad + _radOffset), mP); if (dist > 230){ vx = (vx + (((dVec.x * 25) - vx) * 0.1)); vy = (vy + (((dVec.y * 25) - vy) * 0.1)); }; vx = (vx + dVec.x); vy = (vy + dVec.y); }; }; if (_modeSwitchTimer < 0){ _mode = _primaryMode; }; if (camVis){ if (Math.random() > 0.3){ GameLevel.Instance.addExhaustParticle(this); }; }; }; super.update(); } private function createAmmo(inAmmo:EnemyAmmo, inX:Number, inY:Number, inR:Number, inVX:Number, inVY:Number):void{ var ammoVec:Object; ammoVec = MathFunction.getVector((inR + ((Math.random() - 0.5) * 0.5)), 5); inAmmo.x = inX; inAmmo.y = inY; inAmmo.vx = (inVX + ammoVec.x); inAmmo.vy = (inVY + ammoVec.y); GameLevel.Instance.createEnemyAmmo(inAmmo); } private function fireWeapon():void{ var ammo:EnemyAmmo; SoundManager.Instance.playSoundID(SoundManager.SND_ENEMYFIRE, 0.3); var ax:Number = x; var ay:Number = y; var ammoRadians:Number = MathFunction.getRadians(x, y, _targetObj.x, _targetObj.y); if (Math.random() > 0.5){ ammoRadians = (ammoRadians + ((Math.random() - 0.5) * 0.3)); }; ammo = new EnemyAmmo(); createAmmo(ammo, ax, ay, ammoRadians, 0, 0); } } }//package com.spaceAgent.engine.gameObjects
Section 95
//AmmoBase (com.spaceAgent.engine.gameObjects.AmmoBase) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.util.*; public class AmmoBase extends RenderableObject { public var forwardMode:Boolean;// = true private var _ammoTargets:Array; private var _pLifeSpan:int;// = 300 public var purgeTimer:Number;// = 25 public var payload:Number;// = 240 public static var TYPE_TRIPLE:int = 2; public static var TYPE_DOUBLE:int = 1; public static var TYPE_RAPID:int = 0; public static var TYPE_BASIC:int = -1; public static var TYPE_SEEKER:int = 3; public function AmmoBase(){ _ammoTargets = new Array(); super(); } public function setTargets(inTargets:Array):void{ _ammoTargets = inTargets; } public function get Targets():Array{ return (_ammoTargets); } override public function update():void{ if (!camVis){ purgeTimer--; }; if ((((purgeTimer < 0)) || ((_pLifeSpan < 0)))){ purge = true; }; _pLifeSpan--; super.update(); } public function boostPayload(inLevel:int):void{ payload = (payload + (inLevel * 40)); } public function setAngle(inRadians:Number):void{ var td:Number = Math.floor(MathFunction.radiansToDegrees(inRadians)); if (td < 0){ td = (td + 360); }; if (td >= 360){ td = (td - 360); }; _spriteModel.CurrentFrame = td; } } }//package com.spaceAgent.engine.gameObjects
Section 96
//AmmoBasic (com.spaceAgent.engine.gameObjects.AmmoBasic) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; public class AmmoBasic extends PlayerAmmo { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function AmmoBasic(){ super(); if (AmmoBasic.texID == -1){ AmmoBasic.texID = RenderManager.getTexIDByName("Anim_AmmoBasic"); }; if (AmmoBasic.baseWidth == -1){ AmmoBasic.baseWidth = RenderManager.AnimationLibrary[AmmoBasic.texID].BmdArray[0].width; AmmoBasic.baseHeight = RenderManager.AnimationLibrary[AmmoBasic.texID].BmdArray[0].height; }; _spriteModel.init(AmmoBasic.texID, AmmoBasic.baseWidth, AmmoBasic.baseHeight); _spriteModel.animated = true; if (AmmoBasic.totalFrames == -1){ AmmoBasic.totalFrames = RenderManager.AnimationLibrary[AmmoBasic.texID].BmdArray.length; }; _spriteModel.TotalFrames = AmmoBasic.totalFrames; payload = 200; x = 0; y = 0; w = AmmoBasic.baseWidth; h = AmmoBasic.baseHeight; s = 1; r = 0; } override public function update():void{ if (Math.random() > 0.5){ GameLevel.Instance.addAmmoParticle(0, this); }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 97
//AmmoHeavy (com.spaceAgent.engine.gameObjects.AmmoHeavy) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; public class AmmoHeavy extends PlayerAmmo { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function AmmoHeavy(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Anim_AmmoHeavy"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].width; _slot1.baseHeight = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.animated = true; if (_slot1.totalFrames == -1){ _slot1.totalFrames = RenderManager.AnimationLibrary[_slot1.texID].BmdArray.length; }; payload = 340; _spriteModel.TotalFrames = _slot1.totalFrames; x = 0; y = 0; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ if (Math.random() > 0.3){ GameLevel.Instance.addAmmoParticle(1, this); }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 98
//AmmoMedium (com.spaceAgent.engine.gameObjects.AmmoMedium) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; public class AmmoMedium extends PlayerAmmo { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function AmmoMedium(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Anim_AmmoMedium"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].width; _slot1.baseHeight = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.animated = true; if (_slot1.totalFrames == -1){ _slot1.totalFrames = RenderManager.AnimationLibrary[_slot1.texID].BmdArray.length; }; _spriteModel.TotalFrames = _slot1.totalFrames; payload = 260; x = 0; y = 0; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ if (Math.random() > 0.4){ if (Math.random() > 0.5){ GameLevel.Instance.addAmmoParticle(0, this); } else { GameLevel.Instance.addAmmoParticle(1, this); }; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 99
//AmmoParticle (com.spaceAgent.engine.gameObjects.AmmoParticle) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class AmmoParticle extends RenderableObject { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function AmmoParticle(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Anim_AmmoParticle"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].width; _slot1.baseHeight = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.animated = true; if (_slot1.totalFrames == -1){ _slot1.totalFrames = RenderManager.AnimationLibrary[_slot1.texID].BmdArray.length; }; _spriteModel.setAnimProperties(_slot1.baseWidth, _slot1.baseHeight, _slot1.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 45)); x = 0; y = 0; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 100
//AmmoParticle2 (com.spaceAgent.engine.gameObjects.AmmoParticle2) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class AmmoParticle2 extends RenderableObject { private var _sustainTimer:Number;// = 0 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function AmmoParticle2(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Anim_AmmoParticle2"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].width; _slot1.baseHeight = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.animated = true; if (_slot1.totalFrames == -1){ _slot1.totalFrames = RenderManager.AnimationLibrary[_slot1.texID].BmdArray.length; }; _spriteModel.setAnimProperties(_slot1.baseWidth, _slot1.baseHeight, _slot1.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 45)); x = 0; y = 0; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ if (_sustainTimer > 0){ _spriteModel.CurrentFrame = 0; }; _sustainTimer--; if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; super.update(); } public function set Sustain(val:int):void{ _sustainTimer = val; } } }//package com.spaceAgent.engine.gameObjects
Section 101
//AmmoSeeker (com.spaceAgent.engine.gameObjects.AmmoSeeker) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; import com.psiom.util.*; public class AmmoSeeker extends PlayerAmmo { private var _targetInfluence:Number;// = 0 private var _targetObj:SolidObject; private var _collidablesUpdateTimer:Number;// = 41 private var _targetTimer:Number;// = -1 private var _collidablesUpdatesInterval:Number;// = 41 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function AmmoSeeker(){ super(); if (AmmoSeeker.texID == -1){ AmmoSeeker.texID = RenderManager.getTexIDByName("Anim_AmmoSeeker"); }; if (AmmoSeeker.baseWidth == -1){ AmmoSeeker.baseWidth = RenderManager.AnimationLibrary[AmmoSeeker.texID].BmdArray[0].width; AmmoSeeker.baseHeight = RenderManager.AnimationLibrary[AmmoSeeker.texID].BmdArray[0].height; }; _spriteModel.init(AmmoSeeker.texID, AmmoSeeker.baseWidth, AmmoSeeker.baseHeight); _spriteModel.animated = true; if (AmmoSeeker.totalFrames == -1){ AmmoSeeker.totalFrames = RenderManager.AnimationLibrary[AmmoSeeker.texID].BmdArray.length; }; payload = 450; _spriteModel.TotalFrames = AmmoSeeker.totalFrames; x = 0; y = 0; w = AmmoSeeker.baseWidth; h = AmmoSeeker.baseHeight; s = 1; r = 0; } public function get NearThreshholdOverride():Number{ return (350); } override public function update():void{ var tObj:SolidObject; var vMod:Number; var aimRadians:Number; var aimVec:Object; var pShip:RocketShip; var aimRadiansShip:Number; var aimVecShip:Object; var dir:Number; var vec:Object; _collidablesUpdateTimer--; if (_collidablesUpdateTimer < 0){ _collidablesUpdateTimer = _collidablesUpdatesInterval; setTargets(GameLevel.Instance.getAmmoCollidables(this)); }; if (Math.random() > 0.33){ GameLevel.Instance.addAmmoParticle(1, this); } else { GameLevel.Instance.addSmallSmokeTiny(x, y, 1, 0); }; _targetTimer--; if (_targetTimer < 0){ _targetTimer = 30; tObj = GameLevel.Instance.getNearestSeekerTarget(this); if (tObj){ _targetObj = tObj; }; }; if (_targetObj){ vMod = (0.9 + (1 - _targetInfluence)); if (vMod > 1){ vMod = 1; }; vx = (vx * vMod); vy = (vy * vMod); }; if (_targetInfluence < 1){ _targetInfluence = (_targetInfluence + 0.05); }; if (_targetObj){ if (!_targetObj.purge){ aimRadians = MathFunction.getRadians(x, y, _targetObj.x, _targetObj.y); aimVec = MathFunction.getVector(aimRadians, 1.5); vx = (vx + (aimVec.x * _targetInfluence)); vy = (vy + (aimVec.y * _targetInfluence)); } else { pShip = GameLevel.Instance.PlayerShip; aimRadiansShip = MathFunction.getRadians(x, y, (pShip.x - (pShip.vx * 5)), (pShip.y - (pShip.vy * 5))); aimVecShip = MathFunction.getVector(aimRadiansShip, 1.5); vx = (vx + (aimVecShip.x * _targetInfluence)); vy = (vy + (aimVecShip.y * _targetInfluence)); }; }; var cVel:Number = MathFunction.getDistance(0, 0, vx, vy); if (cVel > 16){ dir = MathFunction.getRadians(0, 0, vx, vy); vec = MathFunction.getVector(dir, 16); vx = vec.x; vy = vec.y; }; var newAngle:Number = MathFunction.getRadians(0, 0, vx, vy); setAngle(newAngle); super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 102
//AmmoSeekerHeavy (com.spaceAgent.engine.gameObjects.AmmoSeekerHeavy) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; import com.psiom.util.*; public class AmmoSeekerHeavy extends PlayerAmmo { private var _targetInfluence:Number;// = 0 private var _targetObj:SolidObject; private var _collidablesUpdateTimer:Number;// = 41 private var _targetTimer:Number;// = -1 private var _collidablesUpdatesInterval:Number;// = 41 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function AmmoSeekerHeavy(){ super(); if (AmmoSeekerHeavy.texID == -1){ AmmoSeekerHeavy.texID = RenderManager.getTexIDByName("Anim_AmmoSeekerHeavy"); }; if (AmmoSeekerHeavy.baseWidth == -1){ AmmoSeekerHeavy.baseWidth = RenderManager.AnimationLibrary[AmmoSeekerHeavy.texID].BmdArray[0].width; AmmoSeekerHeavy.baseHeight = RenderManager.AnimationLibrary[AmmoSeekerHeavy.texID].BmdArray[0].height; }; _spriteModel.init(AmmoSeekerHeavy.texID, AmmoSeekerHeavy.baseWidth, AmmoSeekerHeavy.baseHeight); _spriteModel.animated = true; if (AmmoSeekerHeavy.totalFrames == -1){ AmmoSeekerHeavy.totalFrames = RenderManager.AnimationLibrary[AmmoSeekerHeavy.texID].BmdArray.length; }; payload = 750; _spriteModel.TotalFrames = AmmoSeekerHeavy.totalFrames; x = 0; y = 0; w = AmmoSeekerHeavy.baseWidth; h = AmmoSeekerHeavy.baseHeight; s = 1; r = 0; } public function get NearThreshholdOverride():Number{ return (350); } override public function update():void{ var tObj:SolidObject; var vMod:Number; var aimRadians:Number; var aimVec:Object; var pShip:RocketShip; var aimRadiansShip:Number; var aimVecShip:Object; var dir:Number; var vec:Object; _collidablesUpdateTimer--; if (_collidablesUpdateTimer < 0){ _collidablesUpdateTimer = _collidablesUpdatesInterval; setTargets(GameLevel.Instance.getAmmoCollidables(this)); }; if (Math.random() > 0.5){ GameLevel.Instance.addAmmoParticle(1, this); }; if (Math.random() > 0.5){ GameLevel.Instance.addSmallSmokeTiny(x, y, 1, 0); } else { GameLevel.Instance.addSmallSmokePuff((x - (vx * 3)), (y - (vy * 3)), 1, 0); }; _targetTimer--; if (_targetTimer < 0){ _targetTimer = 30; tObj = GameLevel.Instance.getNearestSeekerTarget(this); if (tObj){ _targetObj = tObj; }; }; if (_targetObj){ vMod = (0.95 + (1 - _targetInfluence)); if (vMod > 1){ vMod = 1; }; vx = (vx * vMod); vy = (vy * vMod); }; if (_targetInfluence < 1){ _targetInfluence = (_targetInfluence + 0.035); }; if (_targetObj){ if (!_targetObj.purge){ aimRadians = MathFunction.getRadians(x, y, _targetObj.x, _targetObj.y); aimVec = MathFunction.getVector(aimRadians, 1.75); vx = (vx * 0.96); vy = (vy * 0.96); vx = (vx + (aimVec.x * _targetInfluence)); vy = (vy + (aimVec.y * _targetInfluence)); } else { pShip = GameLevel.Instance.PlayerShip; aimRadiansShip = MathFunction.getRadians(x, y, (pShip.x - (pShip.vx * 5)), (pShip.y - (pShip.vy * 5))); aimVecShip = MathFunction.getVector(aimRadiansShip, 2.5); vx = (vx + (aimVecShip.x * _targetInfluence)); vy = (vy + (aimVecShip.y * _targetInfluence)); }; }; var cVel:Number = MathFunction.getDistance(0, 0, vx, vy); if (cVel > 20){ dir = MathFunction.getRadians(0, 0, vx, vy); vec = MathFunction.getVector(dir, 20); vx = vec.x; vy = vec.y; }; var newAngle:Number = MathFunction.getRadians(0, 0, vx, vy); setAngle(newAngle); super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 103
//AmmoSplosion (com.spaceAgent.engine.gameObjects.AmmoSplosion) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class AmmoSplosion extends RenderableObject { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function AmmoSplosion(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Anim_AmmoSplode"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].width; _slot1.baseHeight = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.animated = true; if (_slot1.totalFrames == -1){ _slot1.totalFrames = RenderManager.AnimationLibrary[_slot1.texID].BmdArray.length; }; _spriteModel.setAnimProperties(_slot1.baseWidth, _slot1.baseHeight, _slot1.totalFrames); _spriteModel.FrameRate = 1; x = 0; y = 0; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 104
//Asteroid (com.spaceAgent.engine.gameObjects.Asteroid) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.sound.*; import com.psiom.engine.gameObject.*; import com.spaceAgent.engine.*; import com.psiom.graphics.*; import com.psiom.util.*; public class Asteroid extends AsteroidBase { public var _purgeCount:Number;// = 500 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function Asteroid(){ super(); torque = (Math.random() - 0.5); Asteroid.texID = RenderManager.getTexIDByName("Anim_AsteroidMedium"); radius = 49; torque = (torque * 0.12); if (Asteroid.baseWidth == -1){ Asteroid.baseWidth = RenderManager.AnimationLibrary[Asteroid.texID].BmdArray[0].width; Asteroid.baseHeight = RenderManager.AnimationLibrary[Asteroid.texID].BmdArray[0].height; }; _spriteModel.init(Asteroid.texID, Asteroid.baseWidth, Asteroid.baseHeight); _spriteModel.animated = true; if (Asteroid.totalFrames == -1){ Asteroid.totalFrames = RenderManager.AnimationLibrary[Asteroid.texID].BmdArray.length; }; _spriteModel.setAnimProperties(Asteroid.baseWidth, Asteroid.baseHeight, Asteroid.totalFrames); health = 800; x = 0; y = 0; w = Asteroid.baseWidth; h = Asteroid.baseHeight; mass = 75; subR = ((Math.random() * Math.PI) * 2); s = 1; _destructionSounds = [SoundManager.SND_ASTEROIDSPLODE1, SoundManager.SND_ASTEROIDSPLODE2]; EngineMain.Instance.addToFinalPossibleScore(100); } override public function getDestructionSpawnItems():Array{ var rvx:Number; var rvy:Number; var roidShard:SolidObject; var rnum:Number; var dsItems:Array = super.getDestructionSpawnItems(); if (!camVis){ return (dsItems); }; var pCount:int = Math.floor((2 + (Math.random() * 3))); var p:int; while (p < pCount) { rvx = ((Math.random() * 2) - 1); rvy = ((Math.random() * 2) - 1); rnum = Math.floor((Math.random() * 14.999)); if (rnum == 0){ roidShard = new RoidShard1(); }; if (rnum == 1){ roidShard = new RoidShard2(); }; if (rnum == 2){ roidShard = new RoidShard3(); }; if (rnum == 3){ roidShard = new RoidShard4(); }; if (rnum == 4){ roidShard = new RoidShard5(); }; if (rnum == 5){ roidShard = new RoidShard6(); }; if (rnum == 6){ roidShard = new RoidShard7(); }; if (rnum == 7){ roidShard = new RoidShard8(); }; if (rnum == 8){ roidShard = new RoidShard9(); }; if (rnum == 9){ roidShard = new RoidShard10(); }; if (rnum == 10){ roidShard = new RoidShard11(); }; if (rnum == 11){ roidShard = new RoidShard12(); }; if (rnum == 12){ roidShard = new RoidShard13(); }; if (rnum == 13){ roidShard = new RoidShard14(); }; if (rnum == 14){ roidShard = new RoidShard15(); }; if (roidShard){ roidShard.torque = ((Math.random() - 0.5) * 0.2); roidShard.x = (x + ((Math.random() * 20) - 10)); roidShard.y = (y + ((Math.random() * 20) - 10)); roidShard.vx = rvx; roidShard.vy = rvy; dsItems.push(roidShard); } else { trace("### WARNING: FAILED TO CREATE A ROID SHARD"); }; p++; }; return (dsItems); } override public function hit(inDamage:Number, inHitBy:RenderableObject=null, inForce:Number=1):void{ inDamage = (inDamage * 0.8); super.hit(inDamage, inHitBy, inForce); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = 201; r = subR; forceSMUpdate(); if ((((inHitBy is Asteroid)) || ((inHitBy is AsteroidBig)))){ inDamage = (inDamage * 0.25); inDamage = (inDamage * inForce); }; health = (health - inDamage); if ((inHitBy is PlayerAmmo)){ inDamage = (inDamage * 1.5); if (health < 0){ EngineMain.Instance.triggerScoreBlip(100); }; }; } override public function getDestructionParticles():Array{ var particles:Array; var rvx:Number; var rvy:Number; var roidParticle:RenderableObject; particles = new Array(); if (!camVis){ return (particles); }; var pCount:int = Math.floor((60 + (Math.random() * 20))); var p:int; while (p < pCount) { rvx = ((Math.random() - 0.5) * 6); rvy = ((Math.random() - 0.5) * 6); if (Math.random() > 0.66){ roidParticle = new RoidParticle1(); } else { if (Math.random() > 0.5){ roidParticle = new RoidParticle2(); } else { roidParticle = new TinySpark(); }; }; roidParticle.x = (x + ((Math.random() * 5) - 2.5)); roidParticle.y = (y + ((Math.random() * 5) - 2.5)); roidParticle.vx = rvx; roidParticle.vy = rvy; particles.push(roidParticle); p++; }; var smokePuff:SmokePuff = new SmokePuff(); smokePuff.x = x; smokePuff.y = y; particles.push(smokePuff); return (particles); } override public function update():void{ var rFrameInt:int; var dir:Number; var vec:Object; if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ _spriteModel.CurrentFrame = 0; _spriteModel.FrameRate = 0; }; if (_spriteModel.CurrentFrame > 200){ r = subR; ignoreTorque = false; } else { r = 0; ignoreTorque = true; rFrameInt = int(Math.floor(((subR / (Math.PI * 2)) * 200))); _spriteModel.CurrentFrame = rFrameInt; }; subR = (subR + torque); if (subR > (Math.PI * 2)){ subR = (subR - (Math.PI * 2)); }; if (subR < 0){ subR = (subR + (Math.PI * 2)); }; var maxVel:Number = 5; if (MathFunction.getDistance(0, 0, vx, vy) > maxVel){ dir = MathFunction.getRadians(0, 0, vx, vy); vec = MathFunction.getVector(dir, maxVel); vx = vec.x; vy = vec.y; }; super.update(); } override public function damage(inDamage:Number, inDamagedBy:RenderableObject=null):void{ super.damage(inDamage); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = 201; torque = ((Math.random() - 0.5) * 0.3); r = (r + ((Math.random() - 0.5) * 0.15)); r = subR; forceSMUpdate(); health = (health - inDamage); } } }//package com.spaceAgent.engine.gameObjects
Section 105
//AsteroidBase (com.spaceAgent.engine.gameObjects.AsteroidBase) package com.spaceAgent.engine.gameObjects { public class AsteroidBase extends SolidObject { protected var subR:Number;// = 0 protected var _containsObj:int;// = -1 public static var CONTAINSOBJ_AMMO1:int = 1; public static var CONTAINSOBJ_FUEL:int = 0; public static var CONTAINSOBJ_AMMO3:int = 3; public static var CONTAINSOBJ_DIAMOND:int = 4; public static var CONTAINSOBJ_AMMO2:int = 2; public static var CONTAINSOBJ_AMMO4:int = 5; public function AsteroidBase(){ super(); } override public function getDestructionSpawnItems():Array{ var dsItems:Array; var _local2:FuelPickup; var _local3:UpgradeAmmo; var _local4:UpgradeAmmo; var _local5:UpgradeAmmo; var _local6:UpgradeAmmo; var _local7:DiamondRoid; dsItems = super.getDestructionSpawnItems(); switch (_containsObj){ case AsteroidBase.CONTAINSOBJ_FUEL: _local2 = new FuelPickup(); _local2.x = (x + ((Math.random() - 0.5) * 25)); _local2.y = (y + ((Math.random() - 0.5) * 25)); _local2.vx = ((Math.random() - 0.5) * 4); _local2.vy = ((Math.random() - 0.5) * 4); dsItems.push(_local2); break; case AsteroidBase.CONTAINSOBJ_AMMO1: _local3 = new UpgradeAmmo(); _local3.setTypeID(AmmoBase.TYPE_RAPID); _local3.x = (x + ((Math.random() - 0.5) * 25)); _local3.y = (y + ((Math.random() - 0.5) * 25)); _local3.vx = ((Math.random() - 0.5) * 4); _local3.vy = ((Math.random() - 0.5) * 4); dsItems.push(_local3); break; case AsteroidBase.CONTAINSOBJ_AMMO2: _local4 = new UpgradeAmmo(); _local4.setTypeID(AmmoBase.TYPE_DOUBLE); _local4.x = (x + ((Math.random() - 0.5) * 25)); _local4.y = (y + ((Math.random() - 0.5) * 25)); _local4.vx = ((Math.random() - 0.5) * 4); _local4.vy = ((Math.random() - 0.5) * 4); dsItems.push(_local4); break; case AsteroidBase.CONTAINSOBJ_AMMO4: _local5 = new UpgradeAmmo(); _local5.setTypeID(AmmoBase.TYPE_SEEKER); _local5.x = (x + ((Math.random() - 0.5) * 25)); _local5.y = (y + ((Math.random() - 0.5) * 25)); _local5.vx = ((Math.random() - 0.5) * 4); _local5.vy = ((Math.random() - 0.5) * 4); dsItems.push(_local5); break; case AsteroidBase.CONTAINSOBJ_AMMO3: _local6 = new UpgradeAmmo(); _local6.setTypeID(AmmoBase.TYPE_TRIPLE); _local6.x = (x + ((Math.random() - 0.5) * 25)); _local6.y = (y + ((Math.random() - 0.5) * 25)); _local6.vx = ((Math.random() - 0.5) * 4); _local6.vy = ((Math.random() - 0.5) * 4); dsItems.push(_local6); break; case AsteroidBase.CONTAINSOBJ_DIAMOND: _local7 = new DiamondRoid(); _local7.x = (x + ((Math.random() - 0.5) * 50)); _local7.y = (y + ((Math.random() - 0.5) * 50)); _local7.vx = ((Math.random() - 0.5) * 4); _local7.vy = ((Math.random() - 0.5) * 4); dsItems.push(_local7); break; }; return (dsItems); } public function setAsContainer(typeID:int):void{ _containsObj = typeID; } } }//package com.spaceAgent.engine.gameObjects
Section 106
//AsteroidBig (com.spaceAgent.engine.gameObjects.AsteroidBig) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.sound.*; import com.psiom.engine.gameObject.*; import com.spaceAgent.engine.*; import com.psiom.graphics.*; import com.psiom.util.*; public class AsteroidBig extends AsteroidBase { public var _purgeCount:Number;// = 500 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function AsteroidBig(){ super(); torque = (Math.random() - 0.5); AsteroidBig.texID = RenderManager.getTexIDByName("Anim_AsteroidBig"); radius = 105; torque = (torque * 0.08); if (AsteroidBig.baseWidth == -1){ AsteroidBig.baseWidth = RenderManager.AnimationLibrary[AsteroidBig.texID].BmdArray[0].width; AsteroidBig.baseHeight = RenderManager.AnimationLibrary[AsteroidBig.texID].BmdArray[0].height; }; _spriteModel.init(AsteroidBig.texID, AsteroidBig.baseWidth, AsteroidBig.baseHeight); _spriteModel.animated = true; if (AsteroidBig.totalFrames == -1){ AsteroidBig.totalFrames = RenderManager.AnimationLibrary[AsteroidBig.texID].BmdArray.length; }; _spriteModel.setAnimProperties(AsteroidBig.baseWidth, AsteroidBig.baseHeight, AsteroidBig.totalFrames); x = 0; y = 0; w = AsteroidBig.baseWidth; h = AsteroidBig.baseHeight; subR = ((Math.random() * Math.PI) * 2); mass = 110; health = 1400; s = 1; _destructionSounds = [SoundManager.SND_ASTEROIDSPLODE1, SoundManager.SND_ASTEROIDSPLODE2]; EngineMain.Instance.addToFinalPossibleScore(200); } override public function getDestructionSpawnItems():Array{ var asteroid:SolidObject; var rvx:Number; var rvy:Number; var roidShard:SolidObject; var rnum:Number; var dsItems:Array = super.getDestructionSpawnItems(); if (!camVis){ return (dsItems); }; var pCount:int = Math.floor((2 + (Math.random() * 3))); var p:int; while (p < pCount) { rvx = ((Math.random() * 2) - 1); rvy = ((Math.random() * 2) - 1); rnum = Math.floor((Math.random() * 14.999)); if (rnum == 0){ roidShard = new RoidShard1(); }; if (rnum == 1){ roidShard = new RoidShard2(); }; if (rnum == 2){ roidShard = new RoidShard3(); }; if (rnum == 3){ roidShard = new RoidShard4(); }; if (rnum == 4){ roidShard = new RoidShard5(); }; if (rnum == 5){ roidShard = new RoidShard6(); }; if (rnum == 6){ roidShard = new RoidShard7(); }; if (rnum == 7){ roidShard = new RoidShard8(); }; if (rnum == 8){ roidShard = new RoidShard9(); }; if (rnum == 9){ roidShard = new RoidShard10(); }; if (rnum == 10){ roidShard = new RoidShard11(); }; if (rnum == 11){ roidShard = new RoidShard12(); }; if (rnum == 12){ roidShard = new RoidShard13(); }; if (rnum == 13){ roidShard = new RoidShard14(); }; if (rnum == 14){ roidShard = new RoidShard15(); }; if (roidShard){ roidShard.torque = ((Math.random() - 0.5) * 0.2); roidShard.x = (x + ((Math.random() * 20) - 10)); roidShard.y = (y + ((Math.random() * 20) - 10)); roidShard.vx = rvx; roidShard.vy = rvy; dsItems.push(roidShard); } else { trace("### WARNING: FAILED TO CREATE A ROID SHARD"); }; p++; }; asteroid = new Asteroid(); asteroid.x = (x + ((Math.random() - 0.5) * 40)); asteroid.y = (y + ((Math.random() - 0.5) * 40)); dsItems.push(asteroid); asteroid = new Asteroid(); asteroid.x = (x + ((Math.random() - 0.5) * 40)); asteroid.y = (y + ((Math.random() - 0.5) * 40)); dsItems.push(asteroid); return (dsItems); } override public function hit(inDamage:Number, inHitBy:RenderableObject=null, inForce:Number=1):void{ inDamage = (inDamage * 0.8); super.hit(inDamage, inHitBy, inForce); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = 201; r = subR; forceSMUpdate(); if ((((inHitBy is Asteroid)) || ((inHitBy is AsteroidBig)))){ inDamage = (inDamage * 0.25); inDamage = (inDamage * inForce); }; if ((inHitBy is PlayerAmmo)){ inDamage = (inDamage * 1.5); if (health < 0){ EngineMain.Instance.triggerScoreBlip(200); }; }; health = (health - inDamage); } override public function getDestructionParticles():Array{ var rvx:Number; var rvy:Number; var roidParticle:RenderableObject; var particles:Array = new Array(); if (!camVis){ return (particles); }; var pCount:int = Math.floor((60 + (Math.random() * 20))); var p:int; while (p < pCount) { rvx = ((Math.random() - 0.5) * 8); rvy = ((Math.random() - 0.5) * 8); if (Math.random() > 0.66){ roidParticle = new RoidParticle1(); } else { if (Math.random() > 0.5){ roidParticle = new RoidParticle2(); } else { roidParticle = new TinySpark(); }; }; roidParticle.x = (x + ((Math.random() * 5) - 2.5)); roidParticle.y = (y + ((Math.random() * 5) - 2.5)); roidParticle.vx = rvx; roidParticle.vy = rvy; particles.push(roidParticle); p++; }; var smokePuff:SmokePuff = new SmokePuff(); smokePuff.x = x; smokePuff.y = y; particles.push(smokePuff); return (particles); } override public function update():void{ var rFrameInt:int; var dir:Number; var vec:Object; if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ _spriteModel.CurrentFrame = 0; _spriteModel.FrameRate = 0; }; if (_spriteModel.CurrentFrame > 200){ r = subR; ignoreTorque = false; } else { r = 0; ignoreTorque = true; rFrameInt = int(Math.floor(((subR / (Math.PI * 2)) * 200))); _spriteModel.CurrentFrame = rFrameInt; }; subR = (subR + torque); if (subR > (Math.PI * 2)){ subR = (subR - (Math.PI * 2)); }; if (subR < 0){ subR = (subR + (Math.PI * 2)); }; var maxVel:Number = 5; if (MathFunction.getDistance(0, 0, vx, vy) > maxVel){ dir = MathFunction.getRadians(0, 0, vx, vy); vec = MathFunction.getVector(dir, maxVel); vx = vec.x; vy = vec.y; }; super.update(); } override public function damage(inDamage:Number, inDamagedBy:RenderableObject=null):void{ super.damage(inDamage); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = 201; torque = ((Math.random() - 0.5) * 0.3); r = (r + ((Math.random() - 0.5) * 0.15)); r = subR; forceSMUpdate(); health = (health - inDamage); } } }//package com.spaceAgent.engine.gameObjects
Section 107
//AsteroidWall (com.spaceAgent.engine.gameObjects.AsteroidWall) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class AsteroidWall extends SolidObject { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function AsteroidWall(){ super(); if (AsteroidWall.texID == -1){ AsteroidWall.texID = RenderManager.getTexIDByName("Anim_AsteroidWall"); }; if (AsteroidWall.baseWidth == -1){ AsteroidWall.baseWidth = RenderManager.AnimationLibrary[AsteroidWall.texID].BmdArray[0].width; AsteroidWall.baseHeight = RenderManager.AnimationLibrary[AsteroidWall.texID].BmdArray[0].height; }; _spriteModel.init(AsteroidWall.texID, AsteroidWall.baseWidth, AsteroidWall.baseHeight); _spriteModel.animated = true; if (AsteroidWall.totalFrames == -1){ AsteroidWall.totalFrames = RenderManager.AnimationLibrary[AsteroidWall.texID].BmdArray.length; }; _spriteModel.setAnimProperties(AsteroidWall.baseWidth, AsteroidWall.baseHeight, AsteroidWall.totalFrames); _spriteModel.CurrentFrame = Math.floor((Math.random() * 36)); _spriteModel.FrameRate = 0; x = 0; y = 0; w = AsteroidWall.baseWidth; h = AsteroidWall.baseHeight; radius = 65; s = 1; r = 0; fixed = true; mass = 100; } override public function update():void{ super.update(); requiresUpdate = false; } } }//package com.spaceAgent.engine.gameObjects
Section 108
//AsteroidWallBig (com.spaceAgent.engine.gameObjects.AsteroidWallBig) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class AsteroidWallBig extends SolidObject { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function AsteroidWallBig(){ super(); if (AsteroidWallBig.texID == -1){ AsteroidWallBig.texID = RenderManager.getTexIDByName("Anim_AsteroidWallBig"); }; if (AsteroidWallBig.baseWidth == -1){ AsteroidWallBig.baseWidth = RenderManager.AnimationLibrary[AsteroidWallBig.texID].BmdArray[0].width; AsteroidWallBig.baseHeight = RenderManager.AnimationLibrary[AsteroidWallBig.texID].BmdArray[0].height; }; _spriteModel.init(AsteroidWallBig.texID, AsteroidWallBig.baseWidth, AsteroidWallBig.baseHeight); _spriteModel.animated = true; if (AsteroidWallBig.totalFrames == -1){ AsteroidWallBig.totalFrames = RenderManager.AnimationLibrary[AsteroidWallBig.texID].BmdArray.length; }; _spriteModel.setAnimProperties(AsteroidWallBig.baseWidth, AsteroidWallBig.baseHeight, AsteroidWallBig.totalFrames); _spriteModel.CurrentFrame = Math.floor((Math.random() * 36)); _spriteModel.FrameRate = 0; x = 0; y = 0; w = AsteroidWallBig.baseWidth; h = AsteroidWallBig.baseHeight; radius = 121; s = 1; r = 0; fixed = true; mass = 100; } override public function update():void{ super.update(); requiresUpdate = false; } } }//package com.spaceAgent.engine.gameObjects
Section 109
//AsteroidWallSmall (com.spaceAgent.engine.gameObjects.AsteroidWallSmall) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class AsteroidWallSmall extends SolidObject { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function AsteroidWallSmall(){ super(); if (AsteroidWallSmall.texID == -1){ AsteroidWallSmall.texID = RenderManager.getTexIDByName("Anim_AsteroidWallSmall"); }; if (AsteroidWallSmall.baseWidth == -1){ AsteroidWallSmall.baseWidth = RenderManager.AnimationLibrary[AsteroidWallSmall.texID].BmdArray[0].width; AsteroidWallSmall.baseHeight = RenderManager.AnimationLibrary[AsteroidWallSmall.texID].BmdArray[0].height; }; _spriteModel.init(AsteroidWallSmall.texID, AsteroidWallSmall.baseWidth, AsteroidWallSmall.baseHeight); _spriteModel.animated = true; if (AsteroidWallSmall.totalFrames == -1){ AsteroidWallSmall.totalFrames = RenderManager.AnimationLibrary[AsteroidWallSmall.texID].BmdArray.length; }; _spriteModel.setAnimProperties(AsteroidWallSmall.baseWidth, AsteroidWallSmall.baseHeight, AsteroidWallSmall.totalFrames); _spriteModel.FrameRate = 0; _spriteModel.CurrentFrame = Math.floor((Math.random() * 36)); x = 0; y = 0; w = AsteroidWallSmall.baseWidth; h = AsteroidWallSmall.baseHeight; radius = 35; s = 1; r = 0; fixed = true; mass = 100; } override public function update():void{ super.update(); requiresUpdate = false; } } }//package com.spaceAgent.engine.gameObjects
Section 110
//BGGradient (com.spaceAgent.engine.gameObjects.BGGradient) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class BGGradient extends RenderableObject { private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function BGGradient(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("BGGradient"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.BitmapLibrary[_slot1.texID].Bmd.width; _slot1.baseHeight = RenderManager.BitmapLibrary[_slot1.texID].Bmd.height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.floating = true; x = 0; y = 0; z = 0; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ super.update(); requiresUpdate = false; } } }//package com.spaceAgent.engine.gameObjects
Section 111
//BGLargeObj (com.spaceAgent.engine.gameObjects.BGLargeObj) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class BGLargeObj extends ParalaxObject { public static var G_INVADER:int = 2; private static var texID:int = -1; public static var G_SPACESTATION:int = 0; private static var totalFrames:int = -1; public static var G_DEATHSTAR:int = 1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function BGLargeObj(){ super(); if (BGLargeObj.texID == -1){ BGLargeObj.texID = RenderManager.getTexIDByName("Anim_BGLargeObj"); }; if (BGLargeObj.baseWidth == -1){ BGLargeObj.baseWidth = RenderManager.AnimationLibrary[BGLargeObj.texID].BmdArray[0].width; BGLargeObj.baseHeight = RenderManager.AnimationLibrary[BGLargeObj.texID].BmdArray[0].height; }; _spriteModel.init(BGLargeObj.texID, BGLargeObj.baseWidth, BGLargeObj.baseHeight); _spriteModel.animated = true; if (BGLargeObj.totalFrames == -1){ BGLargeObj.totalFrames = RenderManager.AnimationLibrary[BGLargeObj.texID].BmdArray.length; }; _spriteModel.TotalFrames = BGLargeObj.totalFrames; x = 0; y = 0; z = 0.88; w = BGLargeObj.baseWidth; h = BGLargeObj.baseHeight; s = 1; r = 0; } public function setGraphicByID(inID:int):void{ _spriteModel.CurrentFrame = inID; } override public function update():void{ super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 112
//BGRoid (com.spaceAgent.engine.gameObjects.BGRoid) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class BGRoid extends RenderableObject { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function BGRoid(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Anim_BGAsteroids"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].width; _slot1.baseHeight = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.animated = true; if (_slot1.totalFrames == -1){ _slot1.totalFrames = RenderManager.AnimationLibrary[_slot1.texID].BmdArray.length; }; _spriteModel.TotalFrames = _slot1.totalFrames; x = 0; y = 0; z = (0.3 + (Math.random() * 0.3)); w = _slot1.baseWidth; h = _slot1.baseHeight; _spriteModel.CurrentFrame = Math.floor((Math.random() * (_slot1.totalFrames - 1))); s = 1; r = 0; } override public function update():void{ super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 113
//BGStar (com.spaceAgent.engine.gameObjects.BGStar) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class BGStar extends RenderableObject { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function BGStar(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Anim_BGStar"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].width; _slot1.baseHeight = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.animated = true; if (_slot1.totalFrames == -1){ _slot1.totalFrames = RenderManager.AnimationLibrary[_slot1.texID].BmdArray.length; }; _spriteModel.TotalFrames = _slot1.totalFrames; x = 0; y = 0; z = (0.025 + (Math.random() * 0.175)); w = _slot1.baseWidth; h = _slot1.baseHeight; _spriteModel.CurrentFrame = Math.floor((((z / 0.2) * _slot1.totalFrames) - 1)); s = 1; r = 0; } override public function update():void{ super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 114
//BlackHole (com.spaceAgent.engine.gameObjects.BlackHole) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class BlackHole extends SolidObject { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function BlackHole(){ super(); if (BlackHole.texID == -1){ BlackHole.texID = RenderManager.getTexIDByName("Anim_BlackHole"); }; if (BlackHole.baseWidth == -1){ BlackHole.baseWidth = RenderManager.AnimationLibrary[BlackHole.texID].BmdArray[0].width; BlackHole.baseHeight = RenderManager.AnimationLibrary[BlackHole.texID].BmdArray[0].height; }; _spriteModel.init(BlackHole.texID, BlackHole.baseWidth, BlackHole.baseHeight); _spriteModel.animated = true; if (BlackHole.totalFrames == -1){ BlackHole.totalFrames = RenderManager.AnimationLibrary[BlackHole.texID].BmdArray.length; }; _spriteModel.TotalFrames = BlackHole.totalFrames; _spriteModel.CurrentFrame = Math.floor((Math.random() * 25)); _spriteModel.FrameRate = 1; x = 0; y = 0; w = BlackHole.baseWidth; h = BlackHole.baseHeight; z = 0.9; s = 1; r = 0; _forcePassiveSubsetContainer = true; _nearThreshholdOverride = 510; _registerFixedObjects = false; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ _spriteModel.CurrentFrame = 0; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 115
//Diamond (com.spaceAgent.engine.gameObjects.Diamond) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.spaceAgent.engine.*; import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; public class Diamond extends RenderableObject { private var rSinF:Number;// = 0.05 private var rSin:Number; public var torque:Number;// = 0 private var _willExpire:Boolean;// = true private var _pLifeSpan:Number; private var rSinA:Number;// = 0.5 public var tr:Number;// = 0 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function Diamond(isPlayer:Boolean=false){ rSin = (Math.random() * 3); _pLifeSpan = (200 + (Math.random() * 50)); super(); pointsVal = 1100; if (Diamond.texID == -1){ Diamond.texID = RenderManager.getTexIDByName("Anim_Diamond"); }; if (Diamond.baseWidth == -1){ Diamond.baseWidth = RenderManager.AnimationLibrary[Diamond.texID].BmdArray[0].width; Diamond.baseHeight = RenderManager.AnimationLibrary[Diamond.texID].BmdArray[0].height; }; _spriteModel.init(Diamond.texID, Diamond.baseWidth, Diamond.baseHeight); _spriteModel.animated = true; if (Diamond.totalFrames == -1){ Diamond.totalFrames = RenderManager.AnimationLibrary[Diamond.texID].BmdArray.length; }; radius = 20; _spriteModel.TotalFrames = Diamond.totalFrames; _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 10)); x = 0; y = 0; w = Diamond.baseWidth; h = Diamond.baseHeight; r = ((Math.random() * Math.PI) * 2); s = 1; r = 0; EngineMain.Instance.addToFinalPossibleScore(250); } public function set Torque(inVal:Number):void{ torque = ((Math.random() - 0.5) * 0.2); } public function kill():void{ purge = true; } override public function update():void{ if (pointsVal > 250){ pointsVal--; }; r = (r + torque); if ((((_spriteModel.CurrentFrame == 1)) || ((_spriteModel.CurrentFrame == 12)))){ _spriteModel.FrameRate = 0; }; if (_spriteModel.FrameRate == 0){ if (Math.random() > 0.97){ _spriteModel.FrameRate = 1; }; }; if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ _spriteModel.CurrentFrame = 0; }; if (_willExpire){ _pLifeSpan--; if (_pLifeSpan < 0){ GameLevel.Instance.generateCollectableParticles(this, 5); purge = true; }; }; super.update(); } public function neverExpire():void{ _willExpire = false; } } }//package com.spaceAgent.engine.gameObjects
Section 116
//DiamondRoid (com.spaceAgent.engine.gameObjects.DiamondRoid) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.sound.*; import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; import com.psiom.util.*; public class DiamondRoid extends SolidObject { public var _purgeCount:Number;// = 500 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function DiamondRoid(){ super(); torque = (Math.random() - 0.5); DiamondRoid.texID = RenderManager.getTexIDByName("Anim_DiamondRoid"); radius = 45; torque = (torque * 0.12); if (DiamondRoid.baseWidth == -1){ DiamondRoid.baseWidth = RenderManager.AnimationLibrary[DiamondRoid.texID].BmdArray[0].width; DiamondRoid.baseHeight = RenderManager.AnimationLibrary[DiamondRoid.texID].BmdArray[0].height; }; _spriteModel.init(DiamondRoid.texID, DiamondRoid.baseWidth, DiamondRoid.baseHeight); _spriteModel.animated = true; if (DiamondRoid.totalFrames == -1){ DiamondRoid.totalFrames = RenderManager.AnimationLibrary[DiamondRoid.texID].BmdArray.length; }; _spriteModel.setAnimProperties(DiamondRoid.baseWidth, DiamondRoid.baseHeight, DiamondRoid.totalFrames); health = 800; x = 0; y = 0; w = DiamondRoid.baseWidth; h = DiamondRoid.baseHeight; mass = 75; r = ((Math.random() * Math.PI) * 2); s = 1; _collisionSounds = [SoundManager.SND_METAL1, SoundManager.SND_METAL2, SoundManager.SND_METAL3, SoundManager.SND_METAL4]; _destructionSounds = [SoundManager.SND_DIAMONDROIDSPLODE1, SoundManager.SND_DIAMONDROIDSPLODE2]; } override public function getDestructionSpawnItems():Array{ var dsItems:Array; var rvx:Number; var rvy:Number; var diamond:Diamond; dsItems = super.getDestructionSpawnItems(); var pCount = 3; var p:int; while (p < pCount) { rvx = ((Math.random() - 0.5) * 4); rvy = ((Math.random() - 0.5) * 4); diamond = new Diamond(); diamond.x = (x + ((Math.random() * 20) - 10)); diamond.y = (y + ((Math.random() * 20) - 10)); diamond.vx = rvx; diamond.vy = rvy; diamond.Torque = ((Math.random() - 0.5) * 0.2); dsItems.push(diamond); p++; }; return (dsItems); } override public function hit(inDamage:Number, inHitBy:RenderableObject=null, inForce:Number=1):void{ if ((inHitBy is AmmoBase)){ super.hit(inDamage, inHitBy, (inForce * 5)); } else { super.hit(inDamage, inHitBy, (inForce * 2)); }; _spriteModel.FrameRate = 1; health = (health - inDamage); } override public function getDestructionParticles():Array{ var particles:Array; var rvx:Number; var rvy:Number; var roidParticle:RenderableObject; particles = new Array(); var pCount:int = Math.floor((60 + (Math.random() * 20))); var p:int; while (p < pCount) { rvx = ((Math.random() - 0.5) * 6); rvy = ((Math.random() - 0.5) * 6); if (Math.random() > 0.5){ roidParticle = new RoidParticle1(); } else { roidParticle = new RoidParticle2(); }; roidParticle.x = (x + ((Math.random() * 5) - 2.5)); roidParticle.y = (y + ((Math.random() * 5) - 2.5)); roidParticle.vx = rvx; roidParticle.vy = rvy; particles.push(roidParticle); p++; }; return (particles); } override public function update():void{ var dir:Number; var vec:Object; if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ _spriteModel.CurrentFrame = 0; _spriteModel.FrameRate = 0; }; var maxVel:Number = 4; if (MathFunction.getDistance(0, 0, vx, vy) > maxVel){ dir = MathFunction.getRadians(0, 0, vx, vy); vec = MathFunction.getVector(dir, maxVel); vx = vec.x; vy = vec.y; }; super.update(); } override public function damage(inDamage:Number, inDamagedBy:RenderableObject=null):void{ super.damage(inDamage); _spriteModel.FrameRate = 1; torque = ((Math.random() - 0.5) * 0.3); r = (r + ((Math.random() - 0.5) * 0.15)); health = (health - inDamage); } } }//package com.spaceAgent.engine.gameObjects
Section 117
//EnemyAmmo (com.spaceAgent.engine.gameObjects.EnemyAmmo) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; public class EnemyAmmo extends AmmoBase { private var _ammoLifeSpan:Number;// = 150 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function EnemyAmmo(){ super(); if (EnemyAmmo.texID == -1){ EnemyAmmo.texID = RenderManager.getTexIDByName("Anim_EnemyAmmo"); }; if (EnemyAmmo.baseWidth == -1){ EnemyAmmo.baseWidth = RenderManager.AnimationLibrary[EnemyAmmo.texID].BmdArray[0].width; EnemyAmmo.baseHeight = RenderManager.AnimationLibrary[EnemyAmmo.texID].BmdArray[0].height; }; _spriteModel.init(EnemyAmmo.texID, EnemyAmmo.baseWidth, EnemyAmmo.baseHeight); _spriteModel.animated = true; if (EnemyAmmo.totalFrames == -1){ EnemyAmmo.totalFrames = RenderManager.AnimationLibrary[EnemyAmmo.texID].BmdArray.length; }; _spriteModel.TotalFrames = EnemyAmmo.totalFrames; _spriteModel.CurrentFrame = Math.floor((Math.random() * 25)); _spriteModel.FrameRate = 1; x = 0; y = 0; w = EnemyAmmo.baseWidth; h = EnemyAmmo.baseHeight; vx = ((Math.random() - 0.5) * 6); vy = ((Math.random() - 0.5) * 6); s = 1; r = 0; payload = 150; radius = 20; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ _spriteModel.CurrentFrame = 0; }; if (Math.random() > 0.3){ GameLevel.Instance.addEnemyAmmoParticle(0, this); }; _ammoLifeSpan--; if (_ammoLifeSpan < 0){ if (camVis){ GameLevel.Instance.addEnemyAmmoExpiryCloud(this); }; purge = true; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 118
//EnemyAmmoParticle (com.spaceAgent.engine.gameObjects.EnemyAmmoParticle) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; public class EnemyAmmoParticle extends RenderableObject { private var _leaveSmoke:Boolean;// = false private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function EnemyAmmoParticle(){ super(); if (EnemyAmmoParticle.texID == -1){ EnemyAmmoParticle.texID = RenderManager.getTexIDByName("Anim_EnemyAmmoParticle"); }; if (EnemyAmmoParticle.baseWidth == -1){ EnemyAmmoParticle.baseWidth = RenderManager.AnimationLibrary[EnemyAmmoParticle.texID].BmdArray[0].width; EnemyAmmoParticle.baseHeight = RenderManager.AnimationLibrary[EnemyAmmoParticle.texID].BmdArray[0].height; }; _spriteModel.init(EnemyAmmoParticle.texID, EnemyAmmoParticle.baseWidth, EnemyAmmoParticle.baseHeight); _spriteModel.animated = true; if (EnemyAmmoParticle.totalFrames == -1){ EnemyAmmoParticle.totalFrames = RenderManager.AnimationLibrary[EnemyAmmoParticle.texID].BmdArray.length; }; _spriteModel.setAnimProperties(EnemyAmmoParticle.baseWidth, EnemyAmmoParticle.baseHeight, EnemyAmmoParticle.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 45)); x = 0; y = 0; w = EnemyAmmoParticle.baseWidth; h = EnemyAmmoParticle.baseHeight; s = 1; r = 0; } public function set LeaveSmoke(inVal:Boolean):void{ _leaveSmoke = inVal; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; if (((_leaveSmoke) && ((Math.random() > 0.8)))){ GameLevel.Instance.addSmokePuff(x, y, 1, 15); }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 119
//ExhaustParticle (com.spaceAgent.engine.gameObjects.ExhaustParticle) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class ExhaustParticle extends RenderableObject { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function ExhaustParticle(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Anim_ExhaustParticle"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].width; _slot1.baseHeight = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.animated = true; if (_slot1.totalFrames == -1){ _slot1.totalFrames = RenderManager.AnimationLibrary[_slot1.texID].BmdArray.length; }; _spriteModel.setAnimProperties(_slot1.baseWidth, _slot1.baseHeight, _slot1.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 10)); x = 0; y = 0; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 120
//FixedTurret (com.spaceAgent.engine.gameObjects.FixedTurret) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.sound.*; import com.psiom.engine.gameObject.*; import com.spaceAgent.engine.*; import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; import com.psiom.util.*; public class FixedTurret extends SolidObject { private var _baseAimDistance:Number;// = 325 private var _ammoDelay:Number;// = 8 private var _ammoTimer:Number;// = 0 private var _radiusNodeBaseLoc:Object; private var _burstDelay:Number;// = 60 private var _burstTimer:Number;// = 0 private var _targetObj:RenderableObject; private var _baseObj:TurretBase; private var _burstCount:Number;// = 2 private var _aimNodeLoc:Object; private var _constrainedAngle:Number;// = 0 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function FixedTurret(){ _radiusNodeBaseLoc = {x:0, y:0}; _aimNodeLoc = {x:0, y:0}; super(); if (FixedTurret.texID == -1){ FixedTurret.texID = RenderManager.getTexIDByName("Anim_FixedTurret"); }; if (FixedTurret.baseWidth == -1){ FixedTurret.baseWidth = RenderManager.AnimationLibrary[FixedTurret.texID].BmdArray[0].width; FixedTurret.baseHeight = RenderManager.AnimationLibrary[FixedTurret.texID].BmdArray[0].height; }; _spriteModel.init(FixedTurret.texID, FixedTurret.baseWidth, FixedTurret.baseHeight); _spriteModel.animated = true; if (FixedTurret.totalFrames == -1){ FixedTurret.totalFrames = RenderManager.AnimationLibrary[FixedTurret.texID].BmdArray.length; }; _spriteModel.TotalFrames = FixedTurret.totalFrames; x = 0; y = 0; z = 1.1; w = FixedTurret.baseWidth; h = FixedTurret.baseHeight; s = 1; r = 0; mass = 80; health = 650; radius = 35; fixed = true; _collisionSounds = [SoundManager.SND_CLANKLIGHT1, SoundManager.SND_CLANKLIGHT2, SoundManager.SND_CLANKLIGHT3]; _destructionSounds = [SoundManager.SND_ALIENSPLODE]; EngineMain.Instance.addToFinalPossibleScore(800); } override public function update():void{ var dist:Number; var minDist:Number; var aimDist:Number; var aimRadians:Number; var aimVec:Object; var cDist:Number; if (Registered){ dist = MathFunction.getDistance(x, y, _targetObj.x, _targetObj.y); _ammoTimer--; _burstTimer--; aimDist = MathFunction.getDistance(_radiusNodeBaseLoc.x, _radiusNodeBaseLoc.y, _targetObj.x, _targetObj.y); if (aimDist < (_baseAimDistance * 0.65)){ GameLevel.Instance.AlienAutoZoomFactor = 0.7; }; if ((((((health > 0)) && ((aimDist < (_baseAimDistance / 2))))) && (_targetObj))){ aimRadians = MathFunction.getRadians(_radiusNodeBaseLoc.x, _radiusNodeBaseLoc.y, _targetObj.x, _targetObj.y); aimVec = MathFunction.getVector(aimRadians, aimDist); _aimNodeLoc.x = (_aimNodeLoc.x + (((_radiusNodeBaseLoc.x + aimVec.x) - _aimNodeLoc.x) * 0.1)); _aimNodeLoc.y = (_aimNodeLoc.y + (((_radiusNodeBaseLoc.y + aimVec.y) - _aimNodeLoc.y) * 0.1)); cDist = MathFunction.getDistance(_aimNodeLoc.x, _aimNodeLoc.y, _targetObj.x, _targetObj.y); r = MathFunction.getRadians(x, y, _aimNodeLoc.x, _aimNodeLoc.y); if (_burstTimer < 0){ if (_ammoTimer < 0){ if (cDist < (_baseAimDistance * 0.25)){ _ammoTimer = _ammoDelay; fireWeapon(); }; }; }; if (_burstTimer < (0 - (_burstCount * _ammoDelay))){ if (cDist < (_baseAimDistance * 0.25)){ _burstTimer = _burstDelay; }; }; } else { if (_burstTimer < 0){ _burstTimer = 0; }; }; }; super.update(); } public function set TargetObj(inTarget:RenderableObject):void{ _targetObj = inTarget; } override public function getDestructionParticles():Array{ var particles:Array; var roidParticle:RenderableObject; var pVec:Object; particles = new Array(); var pCount:int = Math.floor((100 + (Math.random() * 10))); var p:int; while (p < pCount) { roidParticle = new EnemyAmmoParticle(); pVec = MathFunction.getVector(((Math.random() * Math.PI) * 2), (0.5 + (Math.random() * 2))); roidParticle.x = (x + ((Math.random() * 5) - 2.5)); roidParticle.y = (y + ((Math.random() * 5) - 2.5)); roidParticle.vx = pVec.x; roidParticle.vy = pVec.y; particles.push(roidParticle); p++; }; var smokePuff:SmokePuff = new SmokePuff(); smokePuff.x = x; smokePuff.y = y; particles.push(smokePuff); return (particles); } public function set BaseObj(inBase:TurretBase):void{ _baseObj = inBase; } override public function hit(inDamage:Number, inHitBy:RenderableObject=null, inForce:Number=1):void{ super.hit(inDamage, inHitBy, (inForce * 2)); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = 1; health = (health - inDamage); if (_baseObj){ _baseObj.hit(inDamage); }; forceSMUpdate(); if ((inHitBy is PlayerAmmo)){ if (health < 0){ EngineMain.Instance.triggerScoreBlip((350 + Math.abs(health))); }; }; } public function setAngleContraint(inVal:Number):void{ var rnlVec:Object = MathFunction.getVector(inVal, (_baseAimDistance * 0.3)); _radiusNodeBaseLoc.x = (x + rnlVec.x); _radiusNodeBaseLoc.y = (y + rnlVec.y); _aimNodeLoc.x = (x + rnlVec.x); _aimNodeLoc.y = (y + rnlVec.y); } override public function destroyLinkedObjects():void{ if (_baseObj){ _baseObj.purge = true; _baseObj = null; }; super.destroyLinkedObjects(); } private function createAmmo(inAmmo:EnemyAmmo, inX:Number, inY:Number, inR:Number, inVX:Number, inVY:Number):void{ var ammoVec:Object; ammoVec = MathFunction.getVector(inR, 4.5); inAmmo.x = inX; inAmmo.y = inY; inAmmo.vx = (inVX + ammoVec.x); inAmmo.vy = (inVY + ammoVec.y); GameLevel.Instance.createEnemyAmmo(inAmmo); } override public function damage(inDamage:Number, inDamagedBy:RenderableObject=null):void{ super.damage(inDamage); if (_baseObj){ _baseObj.hit(inDamage); }; _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = 1; forceSMUpdate(); health = (health - inDamage); } private function fireWeapon():void{ var ammo:EnemyAmmo; SoundManager.Instance.playSoundID(SoundManager.SND_ENEMYFIRE, 0.3); var ax:Number = x; var ay:Number = y; var ammoRadians:Number = MathFunction.getRadians(x, y, _targetObj.x, _targetObj.y); if (Math.random() > 0.5){ ammoRadians = (ammoRadians + ((Math.random() - 0.5) * 0.3)); }; ammo = new EnemyAmmo(); createAmmo(ammo, ax, ay, ammoRadians, 0, 0); } } }//package com.spaceAgent.engine.gameObjects
Section 121
//FuelPickup (com.spaceAgent.engine.gameObjects.FuelPickup) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class FuelPickup extends RenderableObject { private var rSinF:Number;// = 0.05 public var tr:Number;// = 0 private var rSin:Number; public var torque:Number;// = 0 private var rSinA:Number;// = 0.5 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function FuelPickup(isPlayer:Boolean=false){ rSin = (Math.random() * 3); super(); pointsVal = 1100; if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Anim_FuelPickup"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].width; _slot1.baseHeight = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.animated = true; if (_slot1.totalFrames == -1){ _slot1.totalFrames = RenderManager.AnimationLibrary[_slot1.texID].BmdArray.length; }; radius = 40; _spriteModel.TotalFrames = _slot1.totalFrames; _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 10)); x = 0; y = 0; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ _spriteModel.CurrentFrame = 0; }; super.update(); } public function kill():void{ purge = true; } } }//package com.spaceAgent.engine.gameObjects
Section 122
//GasCloud (com.spaceAgent.engine.gameObjects.GasCloud) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class GasCloud extends RenderableObject { private var _parentBarrel:PoisonBarrel; private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function GasCloud(isPlayer:Boolean=false){ super(); if (GasCloud.texID == -1){ GasCloud.texID = RenderManager.getTexIDByName("Anim_GasCloud"); }; if (GasCloud.baseWidth == -1){ GasCloud.baseWidth = RenderManager.AnimationLibrary[GasCloud.texID].BmdArray[0].width; GasCloud.baseHeight = RenderManager.AnimationLibrary[GasCloud.texID].BmdArray[0].height; }; _spriteModel.init(GasCloud.texID, GasCloud.baseWidth, GasCloud.baseHeight); _spriteModel.animated = true; if (GasCloud.totalFrames == -1){ GasCloud.totalFrames = RenderManager.AnimationLibrary[GasCloud.texID].BmdArray.length; }; _spriteModel.TotalFrames = GasCloud.totalFrames; _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * (_spriteModel.TotalFrames - 2))); x = 0; y = 0; w = GasCloud.baseWidth; h = GasCloud.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ _spriteModel.CurrentFrame = 0; }; if (_parentBarrel){ x = _parentBarrel.x; y = _parentBarrel.y; }; super.update(); } public function attachToBarrel(inBarrel:PoisonBarrel):void{ _parentBarrel = inBarrel; } } }//package com.spaceAgent.engine.gameObjects
Section 123
//Hint1 (com.spaceAgent.engine.gameObjects.Hint1) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class Hint1 extends RenderableObject { private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function Hint1(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Hint1"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.BitmapLibrary[_slot1.texID].Bmd.width; _slot1.baseHeight = RenderManager.BitmapLibrary[_slot1.texID].Bmd.height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); x = 0; y = 0; z = 0.8; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ super.update(); requiresUpdate = false; } } }//package com.spaceAgent.engine.gameObjects
Section 124
//Hint2 (com.spaceAgent.engine.gameObjects.Hint2) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class Hint2 extends RenderableObject { private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function Hint2(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Hint2"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.BitmapLibrary[_slot1.texID].Bmd.width; _slot1.baseHeight = RenderManager.BitmapLibrary[_slot1.texID].Bmd.height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); x = 0; y = 0; z = 0.8; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ super.update(); requiresUpdate = false; } } }//package com.spaceAgent.engine.gameObjects
Section 125
//Hint3 (com.spaceAgent.engine.gameObjects.Hint3) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class Hint3 extends RenderableObject { private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function Hint3(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Hint3"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.BitmapLibrary[_slot1.texID].Bmd.width; _slot1.baseHeight = RenderManager.BitmapLibrary[_slot1.texID].Bmd.height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); x = 0; y = 0; z = 0.8; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ super.update(); requiresUpdate = false; } } }//package com.spaceAgent.engine.gameObjects
Section 126
//Hint4 (com.spaceAgent.engine.gameObjects.Hint4) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class Hint4 extends RenderableObject { private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function Hint4(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Hint4"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.BitmapLibrary[_slot1.texID].Bmd.width; _slot1.baseHeight = RenderManager.BitmapLibrary[_slot1.texID].Bmd.height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); x = 0; y = 0; z = 0.8; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ super.update(); requiresUpdate = false; } } }//package com.spaceAgent.engine.gameObjects
Section 127
//Hint5 (com.spaceAgent.engine.gameObjects.Hint5) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class Hint5 extends RenderableObject { private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function Hint5(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Hint5"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.BitmapLibrary[_slot1.texID].Bmd.width; _slot1.baseHeight = RenderManager.BitmapLibrary[_slot1.texID].Bmd.height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); x = 0; y = 0; z = 0.8; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ super.update(); requiresUpdate = false; } } }//package com.spaceAgent.engine.gameObjects
Section 128
//Hint6 (com.spaceAgent.engine.gameObjects.Hint6) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class Hint6 extends RenderableObject { private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function Hint6(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Hint6"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.BitmapLibrary[_slot1.texID].Bmd.width; _slot1.baseHeight = RenderManager.BitmapLibrary[_slot1.texID].Bmd.height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); x = 0; y = 0; z = 0.8; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ super.update(); requiresUpdate = false; } } }//package com.spaceAgent.engine.gameObjects
Section 129
//Hint7 (com.spaceAgent.engine.gameObjects.Hint7) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class Hint7 extends RenderableObject { private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function Hint7(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Hint7"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.BitmapLibrary[_slot1.texID].Bmd.width; _slot1.baseHeight = RenderManager.BitmapLibrary[_slot1.texID].Bmd.height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); x = 0; y = 0; z = 0.8; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ super.update(); requiresUpdate = false; } } }//package com.spaceAgent.engine.gameObjects
Section 130
//LaserBeam (com.spaceAgent.engine.gameObjects.LaserBeam) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; import com.psiom.util.*; public class LaserBeam extends SolidObject { private var _beamRadians:Number;// = 0 private var _targetObj:LaserNode; private var _beamLength:Number;// = 0 private var _source:LaserNode; private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function LaserBeam(isPlayer:Boolean=false){ super(); autoVel = false; if (LaserBeam.texID == -1){ LaserBeam.texID = RenderManager.getTexIDByName("Anim_LaserBeam"); }; if (LaserBeam.baseWidth == -1){ LaserBeam.baseWidth = RenderManager.AnimationLibrary[LaserBeam.texID].BmdArray[0].width; LaserBeam.baseHeight = RenderManager.AnimationLibrary[LaserBeam.texID].BmdArray[0].height; }; _spriteModel.init(LaserBeam.texID, LaserBeam.baseWidth, LaserBeam.baseHeight); _spriteModel.animated = true; if (LaserBeam.totalFrames == -1){ LaserBeam.totalFrames = RenderManager.AnimationLibrary[LaserBeam.texID].BmdArray.length; }; radius = 40; _spriteModel.TotalFrames = LaserBeam.totalFrames; _spriteModel.loop = true; _spriteModel.FrameRate = 1; x = 0; y = 0; w = LaserBeam.baseWidth; h = LaserBeam.baseHeight; s = 1; r = 0; _forcePassiveSubsetContainer = true; } public function kill():void{ purge = true; } override public function update():void{ if (!_source.Firing){ purge = true; }; super.update(); } public function get BeamAngle():Number{ return (_beamRadians); } public function setSourceAndTarget(inSource:LaserNode, intarget:LaserNode):void{ var tVec:Object; _source = inSource; _targetObj = intarget; _beamRadians = MathFunction.getRadians(_source.x, _source.y, _targetObj.x, _targetObj.y); _beamLength = MathFunction.getDistance(_source.x, _source.y, _targetObj.x, _targetObj.y); r = _beamRadians; var dMod:Number = (_beamLength / w); s = dMod; tVec = MathFunction.getVector(r, ((w / 2) * s)); x = (_source.x + tVec.x); y = (_source.y + tVec.y); _nearThreshholdOverride = 510; } public function get BeamLength():Number{ return (_beamLength); } public function get SourceX():Number{ return (_source.x); } public function get SourceY():Number{ return (_source.y); } } }//package com.spaceAgent.engine.gameObjects
Section 131
//LaserNode (com.spaceAgent.engine.gameObjects.LaserNode) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.sound.*; import com.psiom.engine.gameObject.*; import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; import com.psiom.util.*; public class LaserNode extends RenderableObject { private var _targetAngle:Number; private var _firingDuration:int;// = 75 private var _dischargeTimer:int; private var _smallestRayDist:Number;// = 10000 private var _charge:int;// = 0 private var _targetNodes:Array; private var _firingTimer:int;// = 0 private var _dischargeInterval:int;// = 120 private var _rayMode:Boolean;// = false private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function LaserNode(){ _dischargeTimer = (10 + Math.floor((Math.random() * 50))); _targetAngle = ((Math.random() * Math.PI) * 2); super(); if (LaserNode.texID == -1){ LaserNode.texID = RenderManager.getTexIDByName("Anim_LaserNode"); }; if (LaserNode.baseWidth == -1){ LaserNode.baseWidth = RenderManager.AnimationLibrary[LaserNode.texID].BmdArray[0].width; LaserNode.baseHeight = RenderManager.AnimationLibrary[LaserNode.texID].BmdArray[0].height; }; _spriteModel.init(LaserNode.texID, LaserNode.baseWidth, LaserNode.baseHeight); _spriteModel.animated = true; if (LaserNode.totalFrames == -1){ LaserNode.totalFrames = RenderManager.AnimationLibrary[LaserNode.texID].BmdArray.length; }; _spriteModel.TotalFrames = LaserNode.totalFrames; x = 0; y = 0; z = 1.5; w = LaserNode.baseWidth; h = LaserNode.baseHeight; s = 1; r = _targetAngle; _targetNodes = new Array(); } public function setBaseAngle(inRadians:Number):void{ if (inRadians == 0){ inRadians = (inRadians + 0.0005); }; r = inRadians; _targetAngle = inRadians; } public function get Charge():int{ return (_charge); } public function findTargets(inNodes:Array):void{ var i:int; var node:LaserNode; var dist:Number; var minDist:Number; var startIndex:int; i = 0; while (i < inNodes.length) { node = inNodes[i]; if (node == this){ startIndex = (i + 1); }; i++; }; i = startIndex; while (i < inNodes.length) { node = inNodes[i]; if (node != this){ checkValidTargetNode(node); }; i++; }; i = 0; while (i < startIndex) { node = inNodes[i]; if (node != this){ checkValidTargetNode(node); }; i++; }; } public function get Firing():Boolean{ return ((_firingTimer > 0)); } public function powerup():void{ _spriteModel.CurrentFrame = 0; _spriteModel.FrameRate = 1; Charge = 1; } public function checkValidTargetNode(inNode:LaserNode):void{ var dist:Number; var minDist:Number; var tAngle:Number; var compAngle:Number; var tVec:Object; var tDist:Number; dist = MathFunction.getDistance(x, y, inNode.x, inNode.y); minDist = 360; if (dist < minDist){ if (_rayMode){ tAngle = MathFunction.getRadians(x, y, inNode.x, inNode.y); compAngle = r; tVec = MathFunction.getVector(r, dist); tDist = MathFunction.getDistance((x + tVec.x), (y + tVec.y), inNode.x, inNode.y); if ((((tDist < 27.5)) && ((tDist < _smallestRayDist)))){ _smallestRayDist = tDist; _targetNodes.push(inNode); }; } else { _targetNodes.push(inNode); }; }; } public function setRayMode(inVal:Boolean):void{ _rayMode = inVal; } public function set Charge(inVal:int):void{ _charge = inVal; _dischargeTimer = _dischargeInterval; } override public function update():void{ var i:int; var node:LaserNode; if (_charge > 0){ if (_dischargeTimer > 0){ _dischargeTimer--; } else { if (camVis){ if (_targetNodes.length > 0){ i = 0; while (i < _targetNodes.length) { node = _targetNodes[i]; if (node.Charge == 0){ _targetAngle = MathFunction.getRadians(x, y, node.x, node.y); if (Math.abs((_targetAngle - r)) < 0.01){ GameLevel.Instance.fireNodeLaser(this, node); if (Math.random() > 0.5){ SoundManager.Instance.playSoundID(SoundManager.SND_LASERBEAM, 0.5); } else { SoundManager.Instance.playSoundID(SoundManager.SND_LASERBEAM2, 0.5); }; _charge = 0; node.powerup(); _firingTimer = _firingDuration; _targetNodes = _targetNodes.reverse(); }; }; i++; }; }; }; }; }; if (_firingTimer > 0){ _firingTimer--; _spriteModel.CurrentFrame = (21 + Math.floor((Math.random() * 5.999))); } else { r = (r + ((_targetAngle - r) * 0.1)); if (_charge <= 0){ _spriteModel.FrameRate = -1; }; }; if (_charge > 0){ if (_spriteModel.CurrentFrame > 22){ _spriteModel.CurrentFrame = 22; }; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 132
//MotionParticle (com.spaceAgent.engine.gameObjects.MotionParticle) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class MotionParticle extends RenderableObject { public var lifespan:Number; private var _tFrame:Number;// = 0 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function MotionParticle(){ lifespan = (50 + (Math.random() * 50)); super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Anim_MotionParticle"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].width; _slot1.baseHeight = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.animated = true; if (_slot1.totalFrames == -1){ _slot1.totalFrames = RenderManager.AnimationLibrary[_slot1.texID].BmdArray.length; }; _spriteModel.TotalFrames = _slot1.totalFrames; x = 0; y = 0; z = (Math.random() * 0.5); w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } public function setBrightness(inP:Number):void{ _tFrame = Math.floor(((sm.TotalFrames - 1) * inP)); if (_tFrame < sm.CurrentFrame){ sm.CurrentFrame = _tFrame; }; } override public function update():void{ lifespan--; if (lifespan > 25){ if (sm.CurrentFrame < _tFrame){ sm.CurrentFrame++; }; } else { if (sm.CurrentFrame > 0){ sm.CurrentFrame--; }; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 133
//ParalaxObject (com.spaceAgent.engine.gameObjects.ParalaxObject) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.engine.*; import com.spaceAgent.engine.*; import com.psiom.util.*; public class ParalaxObject extends RenderableObject { protected var _pZ:Number;// = 0 protected var _baseX:Number;// = 0 protected var _baseY:Number;// = 0 public function ParalaxObject(){ super(); } public function initParalax(inZ:Number, inBaseX:Number, inBaseY:Number):void{ z = inZ; _pZ = inZ; _baseX = inBaseX; _baseY = inBaseY; floating = true; allowBaseOptimize = false; } override public function update():void{ updateParalaxFinalPos(EngineMain.Instance.Camera); super.update(); } public function updateParalaxFinalPos(inCamera:EngineCamera):void{ var pVec:Object; var pDist:Number = MathFunction.getDistance(_baseX, _baseY, inCamera.cx, inCamera.cy); var pRad:Number = MathFunction.getRadians(_baseX, _baseY, inCamera.cx, inCamera.cy); pVec = MathFunction.getVector(pRad, pDist); x = (_baseX + (pVec.x * (1 - (z / 1)))); y = (_baseY + (pVec.y * (1 - (z / 1)))); } } }//package com.spaceAgent.engine.gameObjects
Section 134
//Planet (com.spaceAgent.engine.gameObjects.Planet) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class Planet extends ParalaxObject { public static var G_INVADER:int = 2; private static var texID:int = -1; public static var G_SPACESTATION:int = 0; private static var totalFrames:int = -1; public static var G_DEATHSTAR:int = 1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function Planet(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Anim_Planet"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].width; _slot1.baseHeight = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.animated = true; if (_slot1.totalFrames == -1){ _slot1.totalFrames = RenderManager.AnimationLibrary[_slot1.texID].BmdArray.length; }; _spriteModel.TotalFrames = _slot1.totalFrames; x = 0; y = 0; z = 0.88; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } public function setGraphicByID(inID:int):void{ _spriteModel.CurrentFrame = inID; } override public function update():void{ super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 135
//PlayerAmmo (com.spaceAgent.engine.gameObjects.PlayerAmmo) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.engine.objectSpaces.*; public class PlayerAmmo extends AmmoBase { private var _lifespan:Number;// = 200 public function PlayerAmmo(){ super(); } override public function update():void{ _lifespan--; if (_lifespan < 0){ purge = true; if (camVis){ GameLevel.Instance.addEnemyAmmoExpiryCloud(this); }; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 136
//PoisonBarrel (com.spaceAgent.engine.gameObjects.PoisonBarrel) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; public class PoisonBarrel extends SolidObject { private var _emitTimer:Number;// = 0 private var _emitInterval:Number;// = 20 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function PoisonBarrel(){ super(); if (PoisonBarrel.texID == -1){ PoisonBarrel.texID = RenderManager.getTexIDByName("Anim_PoisonBarrel"); }; if (PoisonBarrel.baseWidth == -1){ PoisonBarrel.baseWidth = RenderManager.AnimationLibrary[PoisonBarrel.texID].BmdArray[0].width; PoisonBarrel.baseHeight = RenderManager.AnimationLibrary[PoisonBarrel.texID].BmdArray[0].height; }; _spriteModel.init(PoisonBarrel.texID, PoisonBarrel.baseWidth, PoisonBarrel.baseHeight); _spriteModel.animated = true; if (PoisonBarrel.totalFrames == -1){ PoisonBarrel.totalFrames = RenderManager.AnimationLibrary[PoisonBarrel.texID].BmdArray.length; }; _spriteModel.setAnimProperties(PoisonBarrel.baseWidth, PoisonBarrel.baseHeight, PoisonBarrel.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); x = 0; y = 0; w = PoisonBarrel.baseWidth; h = PoisonBarrel.baseHeight; radius = 35; s = 1; r = 0; ammoVelDamp = 0.08; bounceDamp = 0.75; _forceActive = true; } override public function update():void{ vx = (vx * 0.98); vy = (vy * 0.98); if (camVis){ _emitTimer--; if (_emitTimer < 0){ _emitTimer = _emitInterval; GameLevel.Instance.createPoisonBubble(this); }; }; super.update(); _nearThreshholdOverride = 250; } } }//package com.spaceAgent.engine.gameObjects
Section 137
//PoisonBubble (com.spaceAgent.engine.gameObjects.PoisonBubble) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; import com.psiom.util.*; public class PoisonBubble extends RenderableObject { private var _parentBarrel:PoisonBarrel; private var _combusted:Boolean;// = false private var _canPassChain:Boolean;// = false private var _targetRadians:Number; private var _floatSinA:Number;// = 0.1 private var _floatSinF:Number;// = 0.048 private var _vel:Number;// = 0 private var _combustTimer:Number;// = 0 private var _passedChain:Boolean;// = false private var _velRadians:Number; private var _pLifeSpan:Number; private var _maxVel:Number;// = 0.065 private var _floatSin:Number; private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function PoisonBubble(isPlayer:Boolean=false){ _velRadians = ((Math.random() * Math.PI) * 2); _targetRadians = ((Math.random() * Math.PI) * 2); _floatSin = ((Math.random() * Math.PI) * 2); _pLifeSpan = (220 + (Math.random() * 100)); super(); if (PoisonBubble.texID == -1){ PoisonBubble.texID = RenderManager.getTexIDByName("Anim_PoisonBubble"); }; if (PoisonBubble.baseWidth == -1){ PoisonBubble.baseWidth = RenderManager.AnimationLibrary[PoisonBubble.texID].BmdArray[0].width; PoisonBubble.baseHeight = RenderManager.AnimationLibrary[PoisonBubble.texID].BmdArray[0].height; }; _spriteModel.init(PoisonBubble.texID, PoisonBubble.baseWidth, PoisonBubble.baseHeight); _spriteModel.animated = true; if (PoisonBubble.totalFrames == -1){ PoisonBubble.totalFrames = RenderManager.AnimationLibrary[PoisonBubble.texID].BmdArray.length; }; _spriteModel.TotalFrames = PoisonBubble.totalFrames; _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * (_spriteModel.TotalFrames - 2))); x = 0; y = 0; w = PoisonBubble.baseWidth; h = PoisonBubble.baseHeight; s = 1; r = 0; } public function get Combusting():Boolean{ return (_combusted); } override public function update():void{ _combustTimer--; if ((((_spriteModel.CurrentFrame >= 26)) && ((_pLifeSpan > 0)))){ if (!_combusted){ _spriteModel.CurrentFrame = 0; }; }; if (((_combusted) && ((_combustTimer < 5)))){ _canPassChain = true; }; if (_vel < _maxVel){ _vel = (_vel + 0.002); }; _floatSin = (_floatSin + _floatSinF); _velRadians = (_velRadians + ((Math.sin(_floatSin) * _floatSinA) * _vel)); var mVec:Object = MathFunction.getVector(_velRadians, (Math.sin(_floatSin) * _vel)); vx = (vx + mVec.x); vy = (vy + mVec.y); vx = (vx * 0.99); vy = (vy * 0.99); _pLifeSpan--; if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 2)){ purge = true; }; if (((_combusted) && ((_combustTimer < 0)))){ purge = true; }; super.update(); } public function get ParentBarrel():PoisonBarrel{ return (_parentBarrel); } public function get PassedChain():Boolean{ return (_passedChain); } public function startRandom():void{ _spriteModel.CurrentFrame = Math.floor((Math.random() * (PoisonBubble.totalFrames * 0.5))); } public function get CanPassChain():Boolean{ return (_canPassChain); } public function set ParentBarrel(barrel:PoisonBarrel):void{ _parentBarrel = barrel; } public function set PassedChain(val:Boolean):void{ _passedChain = val; } public function combust():void{ if (((!(purge)) && (!(_combusted)))){ _combusted = true; _combustTimer = 10; if (_spriteModel.CurrentFrame < 27){ _spriteModel.CurrentFrame = 27; }; }; } } }//package com.spaceAgent.engine.gameObjects
Section 138
//RocketShip (com.spaceAgent.engine.gameObjects.RocketShip) package com.spaceAgent.engine.gameObjects { import flash.events.*; import com.spaceAgent.*; import com.spaceAgent.sound.*; import com.psiom.engine.gameObject.*; import com.psiom.engine.*; import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; import com.psiom.util.*; import flash.ui.*; public class RocketShip extends SolidObject { private var _fpProfile:int;// = 0 private var _stunTorque:Number;// = 0 private var _stunMax:Number;// = 25 private var _queueAmmo:Boolean;// = false private var _shakeVel:Number;// = 0.75 private var _restockTimer:int;// = 0 private var _ammoMax_triple:int;// = 3 private var _decel:Boolean;// = false private var _healthWarnTimer:Number;// = 0 private var _ammoMax_rapid:int;// = 3 private var _ammoLevel_double:int;// = -1 private var _dead:Boolean;// = false private var _fuelWarnTimer:Number;// = 0 private var _poisonSounds:Array; private var _bulletsReady:int;// = 0 private var _tVec:Object; private var _mouseMode:Boolean;// = true private var _splutter:Number;// = 1 private var _burstCount:Number;// = 4 private var _health:Number;// = 100 private var _currentAmmoType:int;// = 0 private var _hitDamageBuffer:Number;// = 1 private var _ammoLevel_seeker:int;// = -1 private var _firing:Boolean;// = false private var _fuel:Number;// = 100 private var _ammoTimer:Number;// = 0 private var _stun:Number;// = 0 private var _ammoLevel_rapid:int;// = -1 private var _mouseThrust:Boolean;// = false private var _burstTimer:Number;// = 0 private var _ammoMax_double:int;// = 3 private var _targetR:Number;// = 0 private var _ammoLevel_triple:int;// = -1 private var _turnByC:Number;// = 0 private var _velSound:Number;// = 0 private var _velBy:Number;// = 0 private var _ammoDelay:Number;// = 3 private var _velTFrame:int;// = 0 private var _sentHealthWarn:Boolean;// = false private var _life:Number;// = 100 private var _velVec:Object; private var _vel:Number;// = 0 private var _turnByT:Number;// = 0 private var _burstDelay:Number;// = 15 private var _tractoring:Boolean;// = false private var _ammoMax_seeker:int;// = 1 private var _sentFuelWarn:Boolean;// = false private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RocketShip(){ _tVec = {x:0, y:0}; _velVec = {x:0, y:0}; super(); if (RocketShip.texID == -1){ RocketShip.texID = RenderManager.getTexIDByName("Anim_RocketShip"); }; if (RocketShip.baseWidth == -1){ RocketShip.baseWidth = RenderManager.AnimationLibrary[RocketShip.texID].BmdArray[0].width; RocketShip.baseHeight = RenderManager.AnimationLibrary[RocketShip.texID].BmdArray[0].height; }; _spriteModel.init(RocketShip.texID, RocketShip.baseWidth, RocketShip.baseHeight); _spriteModel.animated = true; if (RocketShip.totalFrames == -1){ RocketShip.totalFrames = RenderManager.AnimationLibrary[RocketShip.texID].BmdArray.length; }; _spriteModel.TotalFrames = RocketShip.totalFrames; _spriteModel.FrameRate = 0; radius = 40; x = 0; y = 0; w = RocketShip.baseWidth; h = RocketShip.baseHeight; torque = 0; s = 1; r = 0; bounceMod = 3; bounceDamp = 0.5; _nearThreshholdOverride = 200; mass = 30; setBasicAmmo(); _forceActive = true; _collisionSounds = [SoundManager.SND_CLANKMEDIUM1, SoundManager.SND_CLANKMEDIUM2, SoundManager.SND_CLANKMEDIUM3, SoundManager.SND_CLANKMEDIUM4]; _destructionSounds = [SoundManager.SND_SHIPBOOM]; _poisonSounds = [SoundManager.SND_POISONBUBBLE1, SoundManager.SND_POISONBUBBLE2, SoundManager.SND_POISONBUBBLE3]; } public function upgradeAmmo(ammoObj:UpgradeAmmo):void{ var inType:int = ammoObj.AmmoTypeID; switch (inType){ case AmmoBase.TYPE_RAPID: _ammoLevel_rapid++; setRapidAmmo(); break; case AmmoBase.TYPE_DOUBLE: _ammoLevel_double++; setDoubleAmmo(); break; case AmmoBase.TYPE_TRIPLE: _ammoLevel_triple++; setTripleAmmo(); break; case AmmoBase.TYPE_SEEKER: _ammoLevel_seeker++; setSeekerAmmo(); break; }; } override public function clickInput(mx:Number, my:Number):void{ fireWeapon(); } public function mouseInput(inMX:Number, inMY:Number):void{ var velDist:Number; var fDist:Number; if (_mouseMode){ setTargetAim(MathFunction.getRadians(x, y, inMX, inMY)); velDist = MathFunction.getDistance(x, y, inMX, inMY); if (velDist > 50){ fDist = (velDist - 50); if (Main.Instance.MainMouseDown){ decel(); } else { if (_mouseThrust){ applyVel((fDist * 0.0028)); }; }; } else { decel(); }; }; } public function decel():void{ _vel = (_vel * 0.95); } private function setTripleAmmo():void{ _currentAmmoType = AmmoBase.TYPE_TRIPLE; trace(("setTripleAmmo: " + _ammoLevel_triple)); if (_ammoLevel_triple == 0){ _burstCount = 4; _burstDelay = 28; _ammoDelay = 2; }; if (_ammoLevel_triple == 1){ _burstCount = 4; _burstDelay = 25; _ammoDelay = 2; }; if (_ammoLevel_triple == 2){ _burstCount = 4; _burstDelay = 22; _ammoDelay = 2; }; if (_ammoLevel_triple >= 3){ _burstCount = 2; _burstDelay = 12; _ammoDelay = 2; }; } private function setDoubleAmmo():void{ _currentAmmoType = AmmoBase.TYPE_DOUBLE; trace(("setDoubleAmmo: " + _ammoLevel_double)); if (_ammoLevel_double == 0){ _burstCount = 3; _burstDelay = 16; _ammoDelay = 4; }; if (_ammoLevel_double == 1){ _burstCount = 3; _burstDelay = 13; _ammoDelay = 4; }; if (_ammoLevel_double == 2){ _burstCount = 3; _burstDelay = 9; _ammoDelay = 4; }; if (_ammoLevel_double >= 3){ _burstCount = 3; _burstDelay = 6; _ammoDelay = 4; }; } public function get MovementVel():Number{ return (MathFunction.getDistance(x, y, (x + vx), (y + vy))); } public function applyVel(inVal:Number):void{ if ((((_stun <= 0)) || (true))){ _vel = (_vel + inVal); if (_vel > Constants.MaxShipVel){ _vel = Constants.MaxShipVel; }; _fuel = (_fuel - (inVal * 0.1)); vx = (vx + ((_tVec.x - vx) * 0.05)); vy = (vy + ((_tVec.y - vy) * 0.05)); }; } public function addHealth(amount:Number):void{ _health = (_health + amount); if (_health > 100){ _health = 100; }; } override public function damage(inDamage:Number, inDamagedBy:RenderableObject=null):void{ var runSuperHit:Boolean; if (((!(_dead)) && (GameLevel.Instance.LevelRunning))){ runSuperHit = true; if ((inDamagedBy is PoisonBubble)){ runSuperHit = false; SoundManager.Instance.playSoundID(_poisonSounds[Math.floor((Math.random() * (_poisonSounds.length - 0.001)))], 0.5); }; if (runSuperHit){ super.damage(inDamage); }; x = (x + ((Math.random() - 0.5) * 3.5)); y = (y + ((Math.random() - 0.5) * 3.5)); _health = (_health - ((inDamage * 0.1) * _hitDamageBuffer)); _stun = inDamage; if (_stun > _stunMax){ _stun = _stunMax; }; _spriteModel.CurrentFrame = 30; _spriteModel.FrameRate = 1; _hitDamageBuffer = 0.05; EngineCamera.Instance.shake(((inDamage * 0.35) * _shakeVel)); }; } public function get Tractoring():Boolean{ return (_tractoring); } public function get Health():Number{ return (_health); } public function get Vel():Number{ return (_vel); } public function get Dead():Boolean{ return (_dead); } public function keyUpInput(e:KeyboardEvent):void{ switch (e.keyCode){ case Keyboard.LEFT: _turnByT = 0; _mouseMode = false; break; case Keyboard.RIGHT: _turnByT = 0; _mouseMode = false; break; case Keyboard.UP: _velBy = 0; _tVec.x = 0; _tVec.y = 0; _vel = 0; break; case Keyboard.DOWN: _velBy = 0; _tVec.x = 0; _tVec.y = 0; _vel = 0; break; case Keyboard.SPACE: _firing = false; break; }; switch (String.fromCharCode(e.keyCode)){ case "A": _velBy = 0; _tVec.x = 0; _tVec.y = 0; break; case "Z": _velBy = 0; _tVec.x = 0; _tVec.y = 0; _vel = 0; break; case "a": _velBy = 0; _tVec.x = 0; _tVec.y = 0; _vel = 0; break; case "z": _velBy = 0; _tVec.x = 0; _tVec.y = 0; _vel = 0; break; }; } override public function hit(inDamage:Number, inHitBy:RenderableObject=null, inForce:Number=1):void{ var runSuperHit:Boolean; if (((!(_dead)) && (GameLevel.Instance.LevelRunning))){ runSuperHit = true; if ((inHitBy is PoisonBubble)){ runSuperHit = false; SoundManager.Instance.playSoundID(_poisonSounds[Math.floor((Math.random() * (_poisonSounds.length - 0.001)))], 0.5); }; if ((inHitBy is TentaclePiece)){ inDamage = (inDamage * 1.9); }; if ((inHitBy is EnemyAmmo)){ inDamage = (inDamage * 1.5); }; if ((inHitBy is AlienBumper)){ inDamage = (inDamage * 0.75); }; if ((((((inHitBy is AsteroidWall)) || ((inHitBy is AsteroidWallSmall)))) || ((inHitBy is AsteroidWallBig)))){ inDamage = (inDamage * 1.4); inDamage = (inDamage * (_actualVel / _maxVel)); }; if ((((((inHitBy is Asteroid)) || ((inHitBy is AsteroidBig)))) || ((inHitBy is DiamondRoid)))){ inDamage = (inDamage * 1.9); inDamage = (inDamage * (inForce / _maxVel)); }; if (runSuperHit){ super.hit(inDamage, inHitBy, inForce); }; EngineCamera.Instance.shake(((inDamage * 0.16) * _shakeVel)); _health = (_health - ((inDamage * 0.08) * _hitDamageBuffer)); _stun = inDamage; if (_stun > _stunMax){ _stun = _stunMax; }; vx = 0; vy = 0; _hitDamageBuffer = 0.05; _spriteModel.CurrentFrame = 30; _spriteModel.FrameRate = 1; }; } private function setSeekerAmmo():void{ _currentAmmoType = AmmoBase.TYPE_SEEKER; trace(("setSeekerAmmo: " + _ammoLevel_seeker)); if (_ammoLevel_seeker == 0){ _burstCount = 3; _burstDelay = 40; _ammoDelay = 4; }; if (_ammoLevel_seeker >= 1){ _burstCount = 3; _burstDelay = 40; _ammoDelay = 4; }; } private function setRapidAmmo():void{ _currentAmmoType = AmmoBase.TYPE_RAPID; trace(("setRapidAmmo: " + _ammoLevel_rapid)); if (_ammoLevel_rapid == 0){ _burstCount = 16; _burstDelay = 25; _ammoDelay = 1; }; if (_ammoLevel_rapid == 1){ _burstCount = 17; _burstDelay = 23; _ammoDelay = 1; }; if (_ammoLevel_rapid == 2){ _burstCount = 18; _burstDelay = 21; _ammoDelay = 1; }; if (_ammoLevel_rapid >= 3){ _burstCount = 19; _burstDelay = 19; _ammoDelay = 1; }; } public function keyDownInput(e:KeyboardEvent):void{ switch (e.keyCode){ case Keyboard.LEFT: _mouseMode = false; _turnByT = -0.11; break; case Keyboard.RIGHT: _mouseMode = false; _turnByT = 0.11; break; case Keyboard.UP: _velBy = 0.6; _mouseThrust = false; break; case Keyboard.DOWN: _velBy = -0.6; _mouseThrust = false; break; case Keyboard.SPACE: _firing = true; break; }; switch (String.fromCharCode(e.keyCode)){ case "A": _velBy = 0.6; break; case "Z": _velBy = -0.6; break; case "a": _velBy = 0.6; break; case "z": _velBy = -0.6; break; }; } public function set ShakeVel(inVal:Number):void{ _shakeVel = inVal; } public function setTargetAim(inR:Number):void{ _targetR = inR; _targetR = (_targetR + (Math.PI * 2)); _targetR = (_targetR % (Math.PI * 2)); } public function releaseKeys():void{ _turnByT = 0; _velBy = 0; _tVec.x = 0; _tVec.y = 0; _firing = false; } override public function update():void{ if (_hitDamageBuffer < 1){ _hitDamageBuffer = (_hitDamageBuffer + 0.05); }; torque = 0; if (_velBy > 0){ _velSound = (_velSound + 0.01); } else { _velSound = (_velSound * 0.95); }; if (_velSound > 1){ _velSound = 1; }; if (_velSound > 0.01){ }; if (_turnByC < _turnByT){ _turnByC = (_turnByC + 0.02); }; if (_turnByC > _turnByT){ _turnByC = (_turnByC - 0.02); }; if (_turnByT == 0){ _turnByC = 0; }; _targetR = (_targetR + _turnByC); if (Math.abs(_velBy) > 0){ applyVel(_velBy); } else { decel(); }; _velVec = MathFunction.getVector(r, _vel); _tVec.x = (_tVec.x + ((_velVec.x - _tVec.x) * 0.15)); _tVec.y = (_tVec.y + ((_velVec.y - _tVec.y) * 0.15)); if (Main.Instance.MainMouseDown){ _mouseMode = true; }; if (_ammoTimer >= 0){ _ammoTimer--; }; if (_burstTimer >= 0){ _burstTimer--; }; if (((Main.Instance.MainMouseDown) || (_firing))){ if ((((_ammoTimer < 0)) && ((_burstTimer < 0)))){ _ammoTimer = _ammoDelay; fireWeapon(); }; _burstTimer--; if (_burstTimer < (0 - (_burstCount * _ammoDelay))){ _burstTimer = _burstDelay; }; } else { if (_burstTimer < -1){ _burstTimer++; }; }; if (_stun > 0){ _stun--; }; var velP:Number = (_vel / 10); if (velP < 0){ velP = 0; }; if (velP > 1){ velP = 1; }; _splutter = (_splutter + ((1.1 - _splutter) * 0.1)); if (_splutter > 1){ _splutter = 1; }; if (_velBy > 0){ if (_fuel < 15){ if (Math.random() > 0.95){ _splutter = ((Math.random() * 0.75) * velP); if (Math.random() > 0.25){ GameLevel.Instance.addSmallSmokePuff(x, y, 1, 0); } else { GameLevel.Instance.addSmokePuff(x, y, 1, 0); }; _spriteModel.CurrentFrame = Math.floor((30 - ((velP * 29) * _splutter))); }; }; }; if (_stun <= 0){ _velTFrame = Math.floor((30 - ((velP * 29) * _splutter))); if (_spriteModel.CurrentFrame < _velTFrame){ _spriteModel.CurrentFrame++; }; if (_spriteModel.CurrentFrame > _velTFrame){ _spriteModel.CurrentFrame--; }; _spriteModel.FrameRate = 0; }; var controlP:Number = (1 - (_stun / _stunMax)); if (_mouseMode){ r = (_targetR * 1); }; r = (r + ((_targetR - r) * 0.3)); if (r > (Math.PI * 2)){ r = (r - (Math.PI * 2)); _targetR = (_targetR - (Math.PI * 2)); }; if (r < 0){ r = (r + (Math.PI * 2)); _targetR = (_targetR + (Math.PI * 2)); }; if (_health < 100){ _health = (_health + 0.025); }; if (!_dead){ if (_health < 0){ _fuel = -1; trace("gameovering"); _dead = true; GameLevel.Instance.gameover(); GameLevel.Instance.generateMegaSplosion(this); GameLevel.Instance.addSmokePuff(x, y, 25, (radius * 3.5)); SoundManager.Instance.playSoundID(SoundManager.SND_SHIPBOOM, 0.75); EngineCamera.Instance.shake(100); Registered = false; radius = 0; }; }; if (_fuel < 0){ _health = (_health - 0.3); if (Math.random() > 0.5){ _splutter = ((Math.random() * 0.5) * velP); if (Math.random() > 0.15){ GameLevel.Instance.addSmallSmokePuff(x, y, 1, 50); } else { GameLevel.Instance.addSmokePuff(x, y, 1, 50); }; _spriteModel.CurrentFrame = Math.floor((30 - ((velP * 29) * _splutter))); }; }; if (_dead){ sm.primaryVis = false; fixed = true; vx = 0; vy = 0; radius = 0; }; vx = (vx * 0.985); vy = (vy * 0.985); _vel = (_vel * 0.985); _actualVel = MathFunction.getDistance(0, 0, vx, vy); _stunTorque = (_stunTorque * 0.95); if (_health < 20){ if (!_sentHealthWarn){ _sentHealthWarn = true; if (_fuelWarnTimer < 0){ _fuelWarnTimer = 250; SoundManager.Instance.playSoundID(SoundManager.SND_LOWHEALTH, 0.5); }; }; } else { _sentHealthWarn = false; }; if (_fuel < 20){ if (!_sentFuelWarn){ _sentFuelWarn = true; if (_fuelWarnTimer < 0){ _fuelWarnTimer = 250; SoundManager.Instance.playSoundID(SoundManager.SND_LOWFUEL, 0.5); }; }; } else { _sentFuelWarn = false; }; _healthWarnTimer--; _fuelWarnTimer--; super.update(); } public function set Tractoring(inVal:Boolean):void{ _tractoring = inVal; } private function setBasicAmmo():void{ _currentAmmoType = AmmoBase.TYPE_BASIC; _burstCount = 5; _burstDelay = 10; _ammoDelay = 4; } public function get Fuel():Number{ return (_fuel); } private function createAmmo(inAmmo:AmmoBase, inX:Number, inY:Number, inR:Number, inVX:Number, inVY:Number):void{ var ammoVec:Object = MathFunction.getVector(inR, 12); inAmmo.x = inX; inAmmo.y = inY; inAmmo.setAngle(inR); inAmmo.vx = (inVX + ammoVec.x); inAmmo.vy = (inVY + ammoVec.y); GameLevel.Instance.createAmmo(inAmmo); } private function fireWeapon():void{ var ammo:AmmoBase; var ax:Number; var ay:Number; var avx:Number; var avy:Number; var ar:Number; var offsetSideAVec:Object; var offsetSideBVec:Object; if (!_dead){ SoundManager.Instance.playSoundID(SoundManager.SND_LASER, 0.4); ax = x; ay = y; avx = (vx * 0.5); avy = (vy * 0.5); ar = r; if (ar >= (Math.PI * 2)){ ar = (ar - (Math.PI * 2)); }; if (ar < 0){ ar = (ar + (Math.PI * 2)); }; offsetSideAVec = MathFunction.getVector((r - (Math.PI / 2)), 10); offsetSideBVec = MathFunction.getVector((r + (Math.PI / 2)), 10); switch (_currentAmmoType){ case AmmoBase.TYPE_BASIC: ammo = new AmmoBasic(); createAmmo(ammo, ax, ay, ar, avx, avy); break; case AmmoBase.TYPE_RAPID: if (_ammoLevel_rapid == 0){ ammo = new AmmoBasic(); ammo.boostPayload(1); createAmmo(ammo, ax, ay, ar, avx, avy); }; if (_ammoLevel_rapid == 1){ ammo = new AmmoMedium(); ammo.boostPayload(1); createAmmo(ammo, ax, ay, ar, avx, avy); }; if (_ammoLevel_rapid == 2){ ammo = new AmmoHeavy(); ammo.boostPayload(1); createAmmo(ammo, ax, ay, ar, avx, avy); }; if (_ammoLevel_rapid >= 3){ ammo = new AmmoHeavy(); ammo.boostPayload(_ammoLevel_rapid); createAmmo(ammo, ax, ay, ar, avx, avy); }; break; case AmmoBase.TYPE_DOUBLE: if (_ammoLevel_double == 0){ ammo = new AmmoBasic(); createAmmo(ammo, (ax + offsetSideAVec.x), (ay + offsetSideAVec.y), ar, avx, avy); ammo = new AmmoBasic(); createAmmo(ammo, (ax + offsetSideBVec.x), (ay + offsetSideBVec.y), ar, avx, avy); }; if (_ammoLevel_double == 1){ ammo = new AmmoMedium(); createAmmo(ammo, (ax + offsetSideAVec.x), (ay + offsetSideAVec.y), ar, avx, avy); ammo = new AmmoMedium(); createAmmo(ammo, (ax + offsetSideBVec.x), (ay + offsetSideBVec.y), ar, avx, avy); }; if (_ammoLevel_double == 2){ ammo = new AmmoHeavy(); createAmmo(ammo, (ax + offsetSideAVec.x), (ay + offsetSideAVec.y), ar, avx, avy); ammo = new AmmoHeavy(); createAmmo(ammo, (ax + offsetSideBVec.x), (ay + offsetSideBVec.y), ar, avx, avy); }; if (_ammoLevel_double >= 3){ ammo = new AmmoHeavy(); ammo.boostPayload(_ammoLevel_double); createAmmo(ammo, (ax + offsetSideAVec.x), (ay + offsetSideAVec.y), ar, avx, avy); ammo = new AmmoHeavy(); ammo.boostPayload(_ammoLevel_double); createAmmo(ammo, (ax + offsetSideBVec.x), (ay + offsetSideBVec.y), ar, avx, avy); }; break; case AmmoBase.TYPE_TRIPLE: if (_ammoLevel_triple == 0){ ammo = new AmmoBasic(); createAmmo(ammo, ax, ay, (ar - 0.2), avx, avy); ammo = new AmmoBasic(); createAmmo(ammo, ax, ay, ar, avx, avy); ammo = new AmmoBasic(); createAmmo(ammo, ax, ay, (ar + 0.2), avx, avy); }; if (_ammoLevel_triple == 1){ ammo = new AmmoMedium(); createAmmo(ammo, ax, ay, (ar - 0.21), avx, avy); ammo = new AmmoMedium(); createAmmo(ammo, ax, ay, ar, avx, avy); ammo = new AmmoMedium(); createAmmo(ammo, ax, ay, (ar + 0.21), avx, avy); }; if (_ammoLevel_triple == 2){ ammo = new AmmoHeavy(); createAmmo(ammo, ax, ay, (ar - 0.22), avx, avy); ammo = new AmmoHeavy(); createAmmo(ammo, ax, ay, ar, avx, avy); ammo = new AmmoHeavy(); createAmmo(ammo, ax, ay, (ar + 0.22), avx, avy); }; if (_ammoLevel_triple >= 3){ ammo = new AmmoHeavy(); ammo.boostPayload(_ammoLevel_triple); createAmmo(ammo, ax, ay, (ar - 0.23), avx, avy); ammo = new AmmoHeavy(); ammo.boostPayload(_ammoLevel_triple); createAmmo(ammo, ax, ay, ar, avx, avy); ammo = new AmmoHeavy(); ammo.boostPayload(_ammoLevel_triple); createAmmo(ammo, ax, ay, (ar + 0.23), avx, avy); }; break; case AmmoBase.TYPE_SEEKER: if (_ammoLevel_seeker == 0){ ammo = new AmmoSeeker(); createAmmo(ammo, ax, ay, ar, avx, avy); }; if (_ammoLevel_seeker == 1){ ammo = new AmmoSeekerHeavy(); createAmmo(ammo, ax, ay, ar, avx, avy); }; if (_ammoLevel_seeker > 1){ ammo = new AmmoSeekerHeavy(); ammo.boostPayload(_ammoLevel_seeker); createAmmo(ammo, ax, ay, ar, avx, avy); }; break; }; }; } public function addFuel(amount:Number):void{ _fuel = (_fuel + amount); if (_fuel > 100){ _fuel = 100; }; } } }//package com.spaceAgent.engine.gameObjects
Section 139
//RocketShrapnel (com.spaceAgent.engine.gameObjects.RocketShrapnel) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; import com.psiom.util.*; public class RocketShrapnel extends RoidShard { private var _baseFrame:int;// = 0 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RocketShrapnel(){ super(); if (RocketShrapnel.texID == -1){ RocketShrapnel.texID = RenderManager.getTexIDByName("Anim_RocketShrapnel"); }; if (RocketShrapnel.baseWidth == -1){ RocketShrapnel.baseWidth = RenderManager.AnimationLibrary[RocketShrapnel.texID].BmdArray[0].width; RocketShrapnel.baseHeight = RenderManager.AnimationLibrary[RocketShrapnel.texID].BmdArray[0].height; }; _spriteModel.init(RocketShrapnel.texID, RocketShrapnel.baseWidth, RocketShrapnel.baseHeight); _spriteModel.animated = true; if (RocketShrapnel.totalFrames == -1){ RocketShrapnel.totalFrames = RenderManager.AnimationLibrary[RocketShrapnel.texID].BmdArray.length; }; _spriteModel.setAnimProperties(RocketShrapnel.baseWidth, RocketShrapnel.baseHeight, RocketShrapnel.totalFrames); _spriteModel.FrameRate = 0; _baseFrame = Math.floor((Math.random() * (_spriteModel.TotalFrames - 1))); torque = ((Math.random() - 0.5) * 2); radius = 15; mass = 300; bounceDamp = 0.88; health = 6000; plifespan = (plifespan + (Math.random() * 150)); _maxVel = 15; _nearThreshholdOverride = 250; x = 0; y = 0; w = RocketShrapnel.baseWidth; h = RocketShrapnel.baseHeight; s = 1; r = 0; } override public function hit(inDamage:Number, inHitBy:RenderableObject=null, inForce:Number=1):void{ super.hit(inDamage, inHitBy, inForce); _spriteModel.FrameRate = 0; health = (health - inDamage); } override public function update():void{ r = (r + torque); _spriteModel.CurrentFrame = _baseFrame; var vel:Number = MathFunction.getDistance(0, 0, vx, vy); if (vel > 0.25){ if (Math.random() > 0.5){ GameLevel.Instance.addAmmoParticle(1, this); }; }; if ((((vel > 1.5)) && ((Math.random() > 0.5)))){ if (Math.random() > 0.25){ GameLevel.Instance.addSmallSmokeTiny(x, y, 1, 0); } else { GameLevel.Instance.addSmallSmokePuff((x - (vx * 3)), (y - (vy * 3)), 1, 0); }; }; if ((((vel > 2.5)) && ((Math.random() > 0.5)))){ if (Math.random() > 0.25){ GameLevel.Instance.addSmallSmokePuff((x - (vx * 3)), (y - (vy * 3)), 1, 0); } else { GameLevel.Instance.addSmallSmokeTiny(x, y, 1, 0); }; }; vx = (vx * 0.98); vy = (vy * 0.98); super.update(); } override public function damage(inDamage:Number, inDamagedBy:RenderableObject=null):void{ super.damage(inDamage); _spriteModel.FrameRate = 0; health = (health - inDamage); } } }//package com.spaceAgent.engine.gameObjects
Section 140
//RoidParticle1 (com.spaceAgent.engine.gameObjects.RoidParticle1) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class RoidParticle1 extends RenderableObject { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RoidParticle1(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Anim_RoidParticle1"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].width; _slot1.baseHeight = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.animated = true; if (_slot1.totalFrames == -1){ _slot1.totalFrames = RenderManager.AnimationLibrary[_slot1.texID].BmdArray.length; }; _spriteModel.setAnimProperties(_slot1.baseWidth, _slot1.baseHeight, _slot1.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); x = 0; y = 0; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 141
//RoidParticle2 (com.spaceAgent.engine.gameObjects.RoidParticle2) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class RoidParticle2 extends RenderableObject { private var torque:Number; private var plifespan:Number; private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RoidParticle2(){ plifespan = (10 + (Math.random() * 30)); super(); if (RoidParticle2.texID == -1){ RoidParticle2.texID = RenderManager.getTexIDByName("Anim_RoidParticle2"); }; if (RoidParticle2.baseWidth == -1){ RoidParticle2.baseWidth = RenderManager.AnimationLibrary[RoidParticle2.texID].BmdArray[0].width; RoidParticle2.baseHeight = RenderManager.AnimationLibrary[RoidParticle2.texID].BmdArray[0].height; }; _spriteModel.init(RoidParticle2.texID, RoidParticle2.baseWidth, RoidParticle2.baseHeight); _spriteModel.animated = true; if (RoidParticle2.totalFrames == -1){ RoidParticle2.totalFrames = RenderManager.AnimationLibrary[RoidParticle2.texID].BmdArray.length; }; _spriteModel.setAnimProperties(RoidParticle2.baseWidth, RoidParticle2.baseHeight, RoidParticle2.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); x = 0; y = 0; w = RoidParticle2.baseWidth; h = RoidParticle2.baseHeight; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; plifespan--; if ((((plifespan > 0)) && ((_spriteModel.CurrentFrame > 5)))){ _spriteModel.CurrentFrame = 5; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 142
//RoidShard (com.spaceAgent.engine.gameObjects.RoidShard) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; public class RoidShard extends SolidObject { protected var plifespan:Number; public function RoidShard(){ plifespan = (200 + (Math.random() * 50)); super(); mass = 13; } override public function getDestructionParticles():Array{ var particles:Array; var rvx:Number; var rvy:Number; var roidParticle:RenderableObject; particles = new Array(); var pCount:int = Math.floor((20 + (Math.random() * 10))); var p:int; while (p < pCount) { rvx = ((Math.random() - 0.5) * 4); rvy = ((Math.random() - 0.5) * 4); roidParticle = new RoidParticle1(); roidParticle.x = (x + ((Math.random() * 5) - 2.5)); roidParticle.y = (y + ((Math.random() * 5) - 2.5)); roidParticle.vx = rvx; roidParticle.vy = rvy; particles.push(roidParticle); p++; }; return (particles); } override public function hit(inDamage:Number, inHitBy:RenderableObject=null, inForce:Number=1):void{ super.hit(inDamage, inHitBy, inForce); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = 0; health = (health - inDamage); } override public function update():void{ plifespan--; if (plifespan > 0){ if (_spriteModel.CurrentFrame > 5){ _spriteModel.CurrentFrame = 5; }; } else { if (camVis){ health = -1; } else { purge = true; }; }; super.update(); } override public function damage(inDamage:Number, inDamagedBy:RenderableObject=null):void{ super.damage(inDamage); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = 0; health = (health - inDamage); } } }//package com.spaceAgent.engine.gameObjects
Section 143
//RoidShard1 (com.spaceAgent.engine.gameObjects.RoidShard1) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class RoidShard1 extends RoidShard { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RoidShard1(){ super(); if (RoidShard1.texID == -1){ RoidShard1.texID = RenderManager.getTexIDByName("Anim_RoidShard1"); }; if (RoidShard1.baseWidth == -1){ RoidShard1.baseWidth = RenderManager.AnimationLibrary[RoidShard1.texID].BmdArray[0].width; RoidShard1.baseHeight = RenderManager.AnimationLibrary[RoidShard1.texID].BmdArray[0].height; }; _spriteModel.init(RoidShard1.texID, RoidShard1.baseWidth, RoidShard1.baseHeight); _spriteModel.animated = true; if (RoidShard1.totalFrames == -1){ RoidShard1.totalFrames = RenderManager.AnimationLibrary[RoidShard1.texID].BmdArray.length; }; _spriteModel.setAnimProperties(RoidShard1.baseWidth, RoidShard1.baseHeight, RoidShard1.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); x = 0; y = 0; w = RoidShard1.baseWidth; h = RoidShard1.baseHeight; radius = 25; s = 1; r = 0; } } }//package com.spaceAgent.engine.gameObjects
Section 144
//RoidShard10 (com.spaceAgent.engine.gameObjects.RoidShard10) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class RoidShard10 extends RoidShard { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RoidShard10(){ super(); if (RoidShard10.texID == -1){ RoidShard10.texID = RenderManager.getTexIDByName("Anim_RoidShard10"); }; if (RoidShard10.baseWidth == -1){ RoidShard10.baseWidth = RenderManager.AnimationLibrary[RoidShard10.texID].BmdArray[0].width; RoidShard10.baseHeight = RenderManager.AnimationLibrary[RoidShard10.texID].BmdArray[0].height; }; _spriteModel.init(RoidShard10.texID, RoidShard10.baseWidth, RoidShard10.baseHeight); _spriteModel.animated = true; if (RoidShard10.totalFrames == -1){ RoidShard10.totalFrames = RenderManager.AnimationLibrary[RoidShard10.texID].BmdArray.length; }; _spriteModel.setAnimProperties(RoidShard10.baseWidth, RoidShard10.baseHeight, RoidShard10.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); radius = 21; x = 0; y = 0; w = RoidShard10.baseWidth; h = RoidShard10.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; plifespan--; if ((((plifespan > 0)) && ((_spriteModel.CurrentFrame > 5)))){ _spriteModel.CurrentFrame = 5; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 145
//RoidShard11 (com.spaceAgent.engine.gameObjects.RoidShard11) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class RoidShard11 extends RoidShard { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RoidShard11(){ super(); if (RoidShard11.texID == -1){ RoidShard11.texID = RenderManager.getTexIDByName("Anim_RoidShard11"); }; if (RoidShard11.baseWidth == -1){ RoidShard11.baseWidth = RenderManager.AnimationLibrary[RoidShard11.texID].BmdArray[0].width; RoidShard11.baseHeight = RenderManager.AnimationLibrary[RoidShard11.texID].BmdArray[0].height; }; _spriteModel.init(RoidShard11.texID, RoidShard11.baseWidth, RoidShard11.baseHeight); _spriteModel.animated = true; if (RoidShard11.totalFrames == -1){ RoidShard11.totalFrames = RenderManager.AnimationLibrary[RoidShard11.texID].BmdArray.length; }; _spriteModel.setAnimProperties(RoidShard11.baseWidth, RoidShard11.baseHeight, RoidShard11.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); radius = 11; x = 0; y = 0; w = RoidShard11.baseWidth; h = RoidShard11.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; plifespan--; if ((((plifespan > 0)) && ((_spriteModel.CurrentFrame > 5)))){ _spriteModel.CurrentFrame = 5; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 146
//RoidShard12 (com.spaceAgent.engine.gameObjects.RoidShard12) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class RoidShard12 extends RoidShard { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RoidShard12(){ super(); if (RoidShard12.texID == -1){ RoidShard12.texID = RenderManager.getTexIDByName("Anim_RoidShard12"); }; if (RoidShard12.baseWidth == -1){ RoidShard12.baseWidth = RenderManager.AnimationLibrary[RoidShard12.texID].BmdArray[0].width; RoidShard12.baseHeight = RenderManager.AnimationLibrary[RoidShard12.texID].BmdArray[0].height; }; _spriteModel.init(RoidShard12.texID, RoidShard12.baseWidth, RoidShard12.baseHeight); _spriteModel.animated = true; if (RoidShard12.totalFrames == -1){ RoidShard12.totalFrames = RenderManager.AnimationLibrary[RoidShard12.texID].BmdArray.length; }; _spriteModel.setAnimProperties(RoidShard12.baseWidth, RoidShard12.baseHeight, RoidShard12.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); radius = 16; x = 0; y = 0; w = RoidShard12.baseWidth; h = RoidShard12.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; plifespan--; if ((((plifespan > 0)) && ((_spriteModel.CurrentFrame > 5)))){ _spriteModel.CurrentFrame = 5; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 147
//RoidShard13 (com.spaceAgent.engine.gameObjects.RoidShard13) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class RoidShard13 extends RoidShard { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RoidShard13(){ super(); if (RoidShard13.texID == -1){ RoidShard13.texID = RenderManager.getTexIDByName("Anim_RoidShard13"); }; if (RoidShard13.baseWidth == -1){ RoidShard13.baseWidth = RenderManager.AnimationLibrary[RoidShard13.texID].BmdArray[0].width; RoidShard13.baseHeight = RenderManager.AnimationLibrary[RoidShard13.texID].BmdArray[0].height; }; _spriteModel.init(RoidShard13.texID, RoidShard13.baseWidth, RoidShard13.baseHeight); _spriteModel.animated = true; if (RoidShard13.totalFrames == -1){ RoidShard13.totalFrames = RenderManager.AnimationLibrary[RoidShard13.texID].BmdArray.length; }; _spriteModel.setAnimProperties(RoidShard13.baseWidth, RoidShard13.baseHeight, RoidShard13.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); radius = 11; x = 0; y = 0; w = RoidShard13.baseWidth; h = RoidShard13.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; plifespan--; if ((((plifespan > 0)) && ((_spriteModel.CurrentFrame > 5)))){ _spriteModel.CurrentFrame = 5; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 148
//RoidShard14 (com.spaceAgent.engine.gameObjects.RoidShard14) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class RoidShard14 extends RoidShard { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RoidShard14(){ super(); if (RoidShard14.texID == -1){ RoidShard14.texID = RenderManager.getTexIDByName("Anim_RoidShard14"); }; if (RoidShard14.baseWidth == -1){ RoidShard14.baseWidth = RenderManager.AnimationLibrary[RoidShard14.texID].BmdArray[0].width; RoidShard14.baseHeight = RenderManager.AnimationLibrary[RoidShard14.texID].BmdArray[0].height; }; _spriteModel.init(RoidShard14.texID, RoidShard14.baseWidth, RoidShard14.baseHeight); _spriteModel.animated = true; if (RoidShard14.totalFrames == -1){ RoidShard14.totalFrames = RenderManager.AnimationLibrary[RoidShard14.texID].BmdArray.length; }; _spriteModel.setAnimProperties(RoidShard14.baseWidth, RoidShard14.baseHeight, RoidShard14.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); radius = 14; x = 0; y = 0; w = RoidShard14.baseWidth; h = RoidShard14.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; plifespan--; if ((((plifespan > 0)) && ((_spriteModel.CurrentFrame > 5)))){ _spriteModel.CurrentFrame = 5; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 149
//RoidShard15 (com.spaceAgent.engine.gameObjects.RoidShard15) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class RoidShard15 extends RoidShard { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RoidShard15(){ super(); if (RoidShard15.texID == -1){ RoidShard15.texID = RenderManager.getTexIDByName("Anim_RoidShard15"); }; if (RoidShard15.baseWidth == -1){ RoidShard15.baseWidth = RenderManager.AnimationLibrary[RoidShard15.texID].BmdArray[0].width; RoidShard15.baseHeight = RenderManager.AnimationLibrary[RoidShard15.texID].BmdArray[0].height; }; _spriteModel.init(RoidShard15.texID, RoidShard15.baseWidth, RoidShard15.baseHeight); _spriteModel.animated = true; if (RoidShard15.totalFrames == -1){ RoidShard15.totalFrames = RenderManager.AnimationLibrary[RoidShard15.texID].BmdArray.length; }; _spriteModel.setAnimProperties(RoidShard15.baseWidth, RoidShard15.baseHeight, RoidShard15.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); radius = 9; x = 0; y = 0; w = RoidShard15.baseWidth; h = RoidShard15.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; plifespan--; if ((((plifespan > 0)) && ((_spriteModel.CurrentFrame > 5)))){ _spriteModel.CurrentFrame = 5; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 150
//RoidShard2 (com.spaceAgent.engine.gameObjects.RoidShard2) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class RoidShard2 extends RoidShard { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RoidShard2(){ super(); if (RoidShard2.texID == -1){ RoidShard2.texID = RenderManager.getTexIDByName("Anim_RoidShard2"); }; if (RoidShard2.baseWidth == -1){ RoidShard2.baseWidth = RenderManager.AnimationLibrary[RoidShard2.texID].BmdArray[0].width; RoidShard2.baseHeight = RenderManager.AnimationLibrary[RoidShard2.texID].BmdArray[0].height; }; _spriteModel.init(RoidShard2.texID, RoidShard2.baseWidth, RoidShard2.baseHeight); _spriteModel.animated = true; if (RoidShard2.totalFrames == -1){ RoidShard2.totalFrames = RenderManager.AnimationLibrary[RoidShard2.texID].BmdArray.length; }; _spriteModel.setAnimProperties(RoidShard2.baseWidth, RoidShard2.baseHeight, RoidShard2.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); radius = 24; x = 0; y = 0; w = RoidShard2.baseWidth; h = RoidShard2.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; plifespan--; if ((((plifespan > 0)) && ((_spriteModel.CurrentFrame > 5)))){ _spriteModel.CurrentFrame = 5; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 151
//RoidShard3 (com.spaceAgent.engine.gameObjects.RoidShard3) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class RoidShard3 extends RoidShard { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RoidShard3(){ super(); if (RoidShard3.texID == -1){ RoidShard3.texID = RenderManager.getTexIDByName("Anim_RoidShard3"); }; if (RoidShard3.baseWidth == -1){ RoidShard3.baseWidth = RenderManager.AnimationLibrary[RoidShard3.texID].BmdArray[0].width; RoidShard3.baseHeight = RenderManager.AnimationLibrary[RoidShard3.texID].BmdArray[0].height; }; _spriteModel.init(RoidShard3.texID, RoidShard3.baseWidth, RoidShard3.baseHeight); _spriteModel.animated = true; if (RoidShard3.totalFrames == -1){ RoidShard3.totalFrames = RenderManager.AnimationLibrary[RoidShard3.texID].BmdArray.length; }; _spriteModel.setAnimProperties(RoidShard3.baseWidth, RoidShard3.baseHeight, RoidShard3.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); radius = 23; x = 0; y = 0; w = RoidShard3.baseWidth; h = RoidShard3.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; plifespan--; if ((((plifespan > 0)) && ((_spriteModel.CurrentFrame > 5)))){ _spriteModel.CurrentFrame = 5; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 152
//RoidShard4 (com.spaceAgent.engine.gameObjects.RoidShard4) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class RoidShard4 extends RoidShard { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RoidShard4(){ super(); if (RoidShard4.texID == -1){ RoidShard4.texID = RenderManager.getTexIDByName("Anim_RoidShard4"); }; if (RoidShard4.baseWidth == -1){ RoidShard4.baseWidth = RenderManager.AnimationLibrary[RoidShard4.texID].BmdArray[0].width; RoidShard4.baseHeight = RenderManager.AnimationLibrary[RoidShard4.texID].BmdArray[0].height; }; _spriteModel.init(RoidShard4.texID, RoidShard4.baseWidth, RoidShard4.baseHeight); _spriteModel.animated = true; if (RoidShard4.totalFrames == -1){ RoidShard4.totalFrames = RenderManager.AnimationLibrary[RoidShard4.texID].BmdArray.length; }; _spriteModel.setAnimProperties(RoidShard4.baseWidth, RoidShard4.baseHeight, RoidShard4.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); radius = 32; x = 0; y = 0; w = RoidShard4.baseWidth; h = RoidShard4.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; plifespan--; if ((((plifespan > 0)) && ((_spriteModel.CurrentFrame > 5)))){ _spriteModel.CurrentFrame = 5; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 153
//RoidShard5 (com.spaceAgent.engine.gameObjects.RoidShard5) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class RoidShard5 extends RoidShard { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RoidShard5(){ super(); if (RoidShard5.texID == -1){ RoidShard5.texID = RenderManager.getTexIDByName("Anim_RoidShard5"); }; if (RoidShard5.baseWidth == -1){ RoidShard5.baseWidth = RenderManager.AnimationLibrary[RoidShard5.texID].BmdArray[0].width; RoidShard5.baseHeight = RenderManager.AnimationLibrary[RoidShard5.texID].BmdArray[0].height; }; _spriteModel.init(RoidShard5.texID, RoidShard5.baseWidth, RoidShard5.baseHeight); _spriteModel.animated = true; if (RoidShard5.totalFrames == -1){ RoidShard5.totalFrames = RenderManager.AnimationLibrary[RoidShard5.texID].BmdArray.length; }; _spriteModel.setAnimProperties(RoidShard5.baseWidth, RoidShard5.baseHeight, RoidShard5.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); radius = 34; x = 0; y = 0; w = RoidShard5.baseWidth; h = RoidShard5.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; plifespan--; if ((((plifespan > 0)) && ((_spriteModel.CurrentFrame > 5)))){ _spriteModel.CurrentFrame = 5; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 154
//RoidShard6 (com.spaceAgent.engine.gameObjects.RoidShard6) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class RoidShard6 extends RoidShard { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RoidShard6(){ super(); if (RoidShard6.texID == -1){ RoidShard6.texID = RenderManager.getTexIDByName("Anim_RoidShard6"); }; if (RoidShard6.baseWidth == -1){ RoidShard6.baseWidth = RenderManager.AnimationLibrary[RoidShard6.texID].BmdArray[0].width; RoidShard6.baseHeight = RenderManager.AnimationLibrary[RoidShard6.texID].BmdArray[0].height; }; _spriteModel.init(RoidShard6.texID, RoidShard6.baseWidth, RoidShard6.baseHeight); _spriteModel.animated = true; if (RoidShard6.totalFrames == -1){ RoidShard6.totalFrames = RenderManager.AnimationLibrary[RoidShard6.texID].BmdArray.length; }; _spriteModel.setAnimProperties(RoidShard6.baseWidth, RoidShard6.baseHeight, RoidShard6.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); radius = 22; x = 0; y = 0; w = RoidShard6.baseWidth; h = RoidShard6.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; plifespan--; if ((((plifespan > 0)) && ((_spriteModel.CurrentFrame > 5)))){ _spriteModel.CurrentFrame = 5; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 155
//RoidShard7 (com.spaceAgent.engine.gameObjects.RoidShard7) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class RoidShard7 extends RoidShard { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RoidShard7(){ super(); if (RoidShard7.texID == -1){ RoidShard7.texID = RenderManager.getTexIDByName("Anim_RoidShard7"); }; if (RoidShard7.baseWidth == -1){ RoidShard7.baseWidth = RenderManager.AnimationLibrary[RoidShard7.texID].BmdArray[0].width; RoidShard7.baseHeight = RenderManager.AnimationLibrary[RoidShard7.texID].BmdArray[0].height; }; _spriteModel.init(RoidShard7.texID, RoidShard7.baseWidth, RoidShard7.baseHeight); _spriteModel.animated = true; if (RoidShard7.totalFrames == -1){ RoidShard7.totalFrames = RenderManager.AnimationLibrary[RoidShard7.texID].BmdArray.length; }; _spriteModel.setAnimProperties(RoidShard7.baseWidth, RoidShard7.baseHeight, RoidShard7.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); radius = 16; x = 0; y = 0; w = RoidShard7.baseWidth; h = RoidShard7.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; plifespan--; if ((((plifespan > 0)) && ((_spriteModel.CurrentFrame > 5)))){ _spriteModel.CurrentFrame = 5; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 156
//RoidShard8 (com.spaceAgent.engine.gameObjects.RoidShard8) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class RoidShard8 extends RoidShard { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RoidShard8(){ super(); if (RoidShard8.texID == -1){ RoidShard8.texID = RenderManager.getTexIDByName("Anim_RoidShard8"); }; if (RoidShard8.baseWidth == -1){ RoidShard8.baseWidth = RenderManager.AnimationLibrary[RoidShard8.texID].BmdArray[0].width; RoidShard8.baseHeight = RenderManager.AnimationLibrary[RoidShard8.texID].BmdArray[0].height; }; _spriteModel.init(RoidShard8.texID, RoidShard8.baseWidth, RoidShard8.baseHeight); _spriteModel.animated = true; if (RoidShard8.totalFrames == -1){ RoidShard8.totalFrames = RenderManager.AnimationLibrary[RoidShard8.texID].BmdArray.length; }; _spriteModel.setAnimProperties(RoidShard8.baseWidth, RoidShard8.baseHeight, RoidShard8.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); radius = 28; x = 0; y = 0; w = RoidShard8.baseWidth; h = RoidShard8.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; plifespan--; if ((((plifespan > 0)) && ((_spriteModel.CurrentFrame > 5)))){ _spriteModel.CurrentFrame = 5; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 157
//RoidShard9 (com.spaceAgent.engine.gameObjects.RoidShard9) package com.spaceAgent.engine.gameObjects { import com.psiom.graphics.*; public class RoidShard9 extends RoidShard { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function RoidShard9(){ super(); if (RoidShard9.texID == -1){ RoidShard9.texID = RenderManager.getTexIDByName("Anim_RoidShard9"); }; if (RoidShard9.baseWidth == -1){ RoidShard9.baseWidth = RenderManager.AnimationLibrary[RoidShard9.texID].BmdArray[0].width; RoidShard9.baseHeight = RenderManager.AnimationLibrary[RoidShard9.texID].BmdArray[0].height; }; _spriteModel.init(RoidShard9.texID, RoidShard9.baseWidth, RoidShard9.baseHeight); _spriteModel.animated = true; if (RoidShard9.totalFrames == -1){ RoidShard9.totalFrames = RenderManager.AnimationLibrary[RoidShard9.texID].BmdArray.length; }; _spriteModel.setAnimProperties(RoidShard9.baseWidth, RoidShard9.baseHeight, RoidShard9.totalFrames); _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = Math.floor((Math.random() * 18)); radius = 27; x = 0; y = 0; w = RoidShard9.baseWidth; h = RoidShard9.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; plifespan--; if ((((plifespan > 0)) && ((_spriteModel.CurrentFrame > 5)))){ _spriteModel.CurrentFrame = 5; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 158
//Sign (com.spaceAgent.engine.gameObjects.Sign) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.*; import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class Sign extends RenderableObject { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function Sign(isPlayer:Boolean=false){ super(); if (Sign.texID == -1){ Sign.texID = RenderManager.getTexIDByName("Anim_Sign"); }; if (Sign.baseWidth == -1){ Sign.baseWidth = RenderManager.AnimationLibrary[Sign.texID].BmdArray[0].width; Sign.baseHeight = RenderManager.AnimationLibrary[Sign.texID].BmdArray[0].height; }; _spriteModel.init(Sign.texID, Sign.baseWidth, Sign.baseHeight); _spriteModel.animated = true; if (Sign.totalFrames == -1){ Sign.totalFrames = RenderManager.AnimationLibrary[Sign.texID].BmdArray.length; }; _spriteModel.TotalFrames = Sign.totalFrames; _spriteModel.FrameRate = 0; _spriteModel.CurrentFrame = Main.Instance.RegionMode; x = 0; y = 0; z = 1.01; w = Sign.baseWidth; h = Sign.baseHeight; s = 1; r = 0; } override public function update():void{ super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 159
//SmokePuff (com.spaceAgent.engine.gameObjects.SmokePuff) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class SmokePuff extends RenderableObject { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function SmokePuff(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Anim_SmokePuff"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].width; _slot1.baseHeight = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.animated = true; if (_slot1.totalFrames == -1){ _slot1.totalFrames = RenderManager.AnimationLibrary[_slot1.texID].BmdArray.length; }; _spriteModel.TotalFrames = _slot1.totalFrames; _spriteModel.FrameRate = 1; x = 0; y = 0; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 2)){ purge = true; }; super.update(); } public function startRandom():void{ _spriteModel.CurrentFrame = Math.floor((Math.random() * (_slot1.totalFrames * 0.75))); } } }//package com.spaceAgent.engine.gameObjects
Section 160
//SmokePuffSmall (com.spaceAgent.engine.gameObjects.SmokePuffSmall) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class SmokePuffSmall extends RenderableObject { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function SmokePuffSmall(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Anim_SmokePuffSmall"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].width; _slot1.baseHeight = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.animated = true; if (_slot1.totalFrames == -1){ _slot1.totalFrames = RenderManager.AnimationLibrary[_slot1.texID].BmdArray.length; }; _spriteModel.TotalFrames = _slot1.totalFrames; _spriteModel.FrameRate = 1; x = 0; y = 0; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 2)){ purge = true; }; super.update(); } public function startRandom():void{ _spriteModel.CurrentFrame = Math.floor((Math.random() * (_slot1.totalFrames * 0.75))); } } }//package com.spaceAgent.engine.gameObjects
Section 161
//SmokePuffTiny (com.spaceAgent.engine.gameObjects.SmokePuffTiny) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class SmokePuffTiny extends RenderableObject { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function SmokePuffTiny(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Anim_SmokePuffTiny"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].width; _slot1.baseHeight = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.animated = true; if (_slot1.totalFrames == -1){ _slot1.totalFrames = RenderManager.AnimationLibrary[_slot1.texID].BmdArray.length; }; _spriteModel.TotalFrames = _slot1.totalFrames; _spriteModel.FrameRate = 1; x = 0; y = 0; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 2)){ purge = true; }; super.update(); } public function startRandom():void{ _spriteModel.CurrentFrame = Math.floor((Math.random() * (_slot1.totalFrames * 0.75))); } } }//package com.spaceAgent.engine.gameObjects
Section 162
//SolidObject (com.spaceAgent.engine.gameObjects.SolidObject) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.sound.*; import com.psiom.engine.gameObject.*; import com.spaceAgent.engine.objectSpaces.*; import com.psiom.engine.data.*; import com.psiom.util.*; public class SolidObject extends RenderableObject { private var _mode:int; public var bounceDamp:Number;// = 1 public var torque:Number;// = 0 protected var _forceActive:Boolean;// = false protected var _destructionSounds:Array; private var _registered:Boolean;// = false protected var _registerFixedObjects:Boolean;// = true private var _collisionTargetsUpdateTimer:int; protected var _actualVel:Number;// = 0 protected var _useTypeMask:Boolean;// = false protected var _maxVel:Number;// = 8 protected var _nearThreshholdOverride:int;// = -1 protected var _collisionTargets:Array; protected var _nearThreshholdBase:int;// = 100 protected var _collisionSounds:Array; protected var _collidableTypes:Array; public var bounceMod:Number;// = 1 private var _collisionTargetsUpdateInterval:Number;// = 25 public var health:Number;// = 1000 protected var _forcePassiveSubsetContainer:Boolean;// = false public var ammoVelDamp:Number;// = 0.15 public var fixed:Boolean;// = false public var mass:Number;// = 3 public var ignoreTorque:Boolean;// = false public static var MODE_ACTIVE:int = 2; public static var MODE_STATIC:int = 0; public static var MODE_PASSIVE:int = 1; public static var MODE_IGNORE:int = 3; public function SolidObject(){ super(); _collisionSounds = [SoundManager.SND_SMALLHIT, SoundManager.SND_SMALLHIT2, SoundManager.SND_SMALLHIT3, SoundManager.SND_SMALLHIT4, SoundManager.SND_SMALLHIT5]; _destructionSounds = [SoundManager.SND_SMALLHIT, SoundManager.SND_SMALLHIT2, SoundManager.SND_SMALLHIT3, SoundManager.SND_SMALLHIT4, SoundManager.SND_SMALLHIT5]; _collidableTypes = new Array(); _collisionTargets = new Array(); _collisionTargetsUpdateTimer = (1 + Math.floor((Math.random() * _collisionTargetsUpdateInterval))); if (!_useTypeMask){ _collisionTargets = PhysicsData.Instance.getCollisionTargets(this, _registerFixedObjects); } else { _collisionTargets = PhysicsData.Instance.getCollisionTargetsOfType(this, _registerFixedObjects, _collidableTypes); }; _mode = MODE_PASSIVE; } public function getDestructionParticles():Array{ return (new Array()); } public function hit(inDamage:Number, inHitBy:RenderableObject=null, inForce:Number=7.5):void{ var vMod:Number = (0.15 + (0.6 * (inForce / 10))); if (vMod > 0.8){ vMod = 0.8; }; SoundManager.Instance.playSoundID(_collisionSounds[Math.floor((Math.random() * (_collisionSounds.length - 0.001)))], vMod); } public function get CollisionTargets():Array{ return (_collisionTargets); } public function set NearThreshholdOverride(inVal:int):void{ _nearThreshholdOverride = inVal; } public function set NearThreshholdBase(inVal:int):void{ _nearThreshholdBase = inVal; } public function get Registered():Boolean{ return (_registered); } public function getDestructionSpawnItems():Array{ return (new Array()); } private function resolveCollision(otherSolidObj:SolidObject):void{ var minDist:Number; var dist:Number; var velA:Number; var velB:Number; var velAngleA:Number; var velAngleB:Number; var collisionVectorA:Object; var collisionVectorB:Object; var collisionForce:Number; var deflectionAngle:Number; var deflectionVector:Object; var normalizedVector:Object; var transferance1:Number; var transferance2:Number; var dBase:Number; minDist = (((radius * s) / 2) + ((otherSolidObj.radius * otherSolidObj.s) / 2)); dist = MathFunction.getDistance((x + vx), (y + vy), (otherSolidObj.x + otherSolidObj.vx), (otherSolidObj.y + otherSolidObj.vy)); if (dist < minDist){ velA = MathFunction.getDistance(0, 0, vx, vy); velB = MathFunction.getDistance(0, 0, otherSolidObj.vx, otherSolidObj.vy); velAngleA = MathFunction.getRadians(0, 0, vx, vy); velAngleB = MathFunction.getRadians(0, 0, otherSolidObj.vx, otherSolidObj.vy); collisionVectorA = MathFunction.getVector(velAngleA, velA); collisionVectorB = MathFunction.getVector(velAngleB, velB); collisionForce = MathFunction.getDistance(collisionVectorA.x, collisionVectorA.y, collisionVectorB.x, collisionVectorA.y); deflectionAngle = MathFunction.getRadians(x, y, otherSolidObj.x, otherSolidObj.y); deflectionVector = MathFunction.getVector(deflectionAngle, (1.5 + collisionForce)); normalizedVector = MathFunction.getVector(deflectionAngle, 1.05); transferance1 = (otherSolidObj.mass / mass); transferance2 = (mass / otherSolidObj.mass); if (transferance1 > 1.4){ transferance1 = 1.4; }; if (transferance2 > 1.4){ transferance2 = 1.4; }; if (otherSolidObj.fixed){ transferance1 = 1.4; transferance2 = 0; }; dBase = 0.65; hit((otherSolidObj.mass * 2), otherSolidObj, collisionForce); vx = (vx + (((-(deflectionVector.x) * (dBase * transferance1)) * otherSolidObj.bounceMod) * bounceDamp)); vy = (vy + (((-(deflectionVector.y) * (dBase * transferance1)) * otherSolidObj.bounceMod) * bounceDamp)); resetCollisionTargets(); torque = ((Math.random() * 0.1) - 0.05); if (!otherSolidObj.fixed){ if (!fixed){ x = (x + (-(normalizedVector.x) * ((minDist - dist) / 2))); y = (y + (-(normalizedVector.y) * ((minDist - dist) / 2))); }; } else { if (!fixed){ x = (x + (-(normalizedVector.x) * ((minDist - dist) / 1))); y = (y + (-(normalizedVector.y) * ((minDist - dist) / 1))); }; }; if (!otherSolidObj.fixed){ otherSolidObj.hit(mass, this, collisionForce); otherSolidObj.vx = (otherSolidObj.vx + (((deflectionVector.x * (dBase * transferance2)) * otherSolidObj.bounceDamp) * bounceDamp)); otherSolidObj.vy = (otherSolidObj.vy + (((deflectionVector.y * (dBase * transferance2)) * otherSolidObj.bounceDamp) * bounceDamp)); otherSolidObj.x = (otherSolidObj.x + (normalizedVector.x * ((minDist - dist) / 2))); otherSolidObj.y = (otherSolidObj.y + (normalizedVector.y * ((minDist - dist) / 2))); otherSolidObj.torque = ((Math.random() * 0.1) - 0.05); otherSolidObj.resetCollisionTargets(); }; if (collisionForce > 2){ if (((camVis) || (otherSolidObj.camVis))){ GameLevel.Instance.addSmokePuff((x + (normalizedVector.x * (dist / 2))), (y + (normalizedVector.y * (dist / 2)))); }; }; }; } public function appendToCollisionTargets(inNewObject:SolidObject):void{ if (!fixed){ _collisionTargets.push(inNewObject); }; } override public function update():void{ var cVel:Number; var dir:Number; var vec:Object; var i:int; if (((!(fixed)) || (_forceActive))){ if (!ignoreTorque){ r = (r + torque); }; if (_registered){ if (!fixed){ autoVel = true; }; } else { autoVel = false; }; cVel = MathFunction.getDistance(0, 0, vx, vy); if (cVel > 0.01){ if (_mode == MODE_PASSIVE){ _collisionTargetsUpdateTimer = -1; }; _mode = MODE_ACTIVE; } else { vx = 0; vy = 0; _mode = MODE_PASSIVE; }; if (cVel > _maxVel){ dir = MathFunction.getRadians(0, 0, vx, vy); vec = MathFunction.getVector(dir, _maxVel); vx = vec.x; vy = vec.y; }; if ((((((_mode == MODE_ACTIVE)) || (_forcePassiveSubsetContainer))) || (_forceActive))){ _collisionTargetsUpdateTimer--; if (_collisionTargetsUpdateTimer < 0){ _collisionTargetsUpdateTimer = _collisionTargetsUpdateInterval; if (!_useTypeMask){ _collisionTargets = PhysicsData.Instance.getCollisionTargets(this, _registerFixedObjects); } else { _collisionTargets = PhysicsData.Instance.getCollisionTargetsOfType(this, _registerFixedObjects, _collidableTypes); }; }; } else { _collisionTargets = new Array(); }; if ((((_mode == MODE_ACTIVE)) || (_forceActive))){ i = 0; while (i < _collisionTargets.length) { if (!_collisionTargets[i].purge){ resolveCollision(_collisionTargets[i]); } else { _collisionTargets.splice(i, 1); i--; if (_collisionTargets.length < 1){ break; }; }; i++; }; }; }; _actualVel = MathFunction.getDistance(0, 0, vx, vy); _nearThreshholdBase = ((_collisionTargetsUpdateInterval * _actualVel) + (radius * 2)); if (_nearThreshholdOverride > _nearThreshholdBase){ _nearThreshholdBase = _nearThreshholdOverride; }; super.update(); } public function set Registered(inVal:Boolean):void{ _registered = inVal; } public function get NearThreshholdBase():int{ return (_nearThreshholdBase); } public function get NearThreshholdOverride():int{ return (_nearThreshholdOverride); } public function resetCollisionTargets():void{ _collisionTargetsUpdateTimer = _collisionTargetsUpdateInterval; if (!_useTypeMask){ _collisionTargets = PhysicsData.Instance.getCollisionTargets(this, _registerFixedObjects); } else { _collisionTargets = PhysicsData.Instance.getCollisionTargetsOfType(this, _registerFixedObjects, _collidableTypes); }; } public function damage(inDamage:Number, inDamagedBy:RenderableObject=null):void{ SoundManager.Instance.playSoundID(_collisionSounds[Math.floor((Math.random() * (_collisionSounds.length - 0.001)))], 0.3); } public function destroyLinkedObjects():void{ SoundManager.Instance.playSoundID(_destructionSounds[Math.floor((Math.random() * (_destructionSounds.length - 0.001)))], 0.85); } } }//package com.spaceAgent.engine.gameObjects
Section 163
//Spacedude (com.spaceAgent.engine.gameObjects.Spacedude) package com.spaceAgent.engine.gameObjects { import flash.display.*; import com.psiom.engine.gameObject.*; import com.spaceAgent.engine.*; import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; import com.psiom.util.*; public class Spacedude extends RenderableObject { private var _tractorSource:RocketShip; private var _tractored:Boolean;// = false private var _radarBlipRef:MovieClip; private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function Spacedude(){ super(); if (Spacedude.texID == -1){ Spacedude.texID = RenderManager.getTexIDByName("Anim_SpaceDudes"); }; if (Spacedude.baseWidth == -1){ Spacedude.baseWidth = RenderManager.AnimationLibrary[Spacedude.texID].BmdArray[0].width; Spacedude.baseHeight = RenderManager.AnimationLibrary[Spacedude.texID].BmdArray[0].height; }; _spriteModel.init(Spacedude.texID, Spacedude.baseWidth, Spacedude.baseHeight); _spriteModel.animated = true; if (Spacedude.totalFrames == -1){ Spacedude.totalFrames = RenderManager.AnimationLibrary[Spacedude.texID].BmdArray.length; }; _spriteModel.TotalFrames = Spacedude.totalFrames; x = 0; y = 0; w = Spacedude.baseWidth; h = Spacedude.baseHeight; _spriteModel.CurrentFrame = Math.floor((Math.random() * (Spacedude.totalFrames - 1))); s = 1; r = 0; EngineMain.Instance.addToFinalPossibleScore(1000); } public function tractorToShip(inShip:RocketShip):void{ _tractorSource = inShip; _tractored = true; } public function set RadarBlipRef(inVal:MovieClip):void{ _radarBlipRef = inVal; } override public function update():void{ var dist:Number; var dRad:Number; var dVec:Object; if (_tractored){ dist = MathFunction.getDistance(x, y, _tractorSource.x, _tractorSource.y); dRad = MathFunction.getRadians(x, y, _tractorSource.x, _tractorSource.y); dVec = MathFunction.getVector(dRad, 0.25); if (dist > 250){ vx = (vx + (((dVec.x * 25) - vx) * 0.1)); vy = (vy + (((dVec.y * 25) - vy) * 0.1)); }; if (dist > 50){ vx = (vx + dVec.x); vy = (vy + dVec.y); } else { vx = 0; vy = 0; x = (x + ((_tractorSource.x - x) * 0.25)); y = (y + ((_tractorSource.y - y) * 0.25)); s = (s * 0.92); }; if (s < 0.1){ _tractored = false; _tractorSource = null; purge = true; RadarBlipRef.visible = false; RadarBlipRef = null; EngineMain.Instance.triggerScoreBlip(1000); GameLevel.Instance.collectTraveller(); }; }; vx = (vx * 0.99); vy = (vy * 0.99); super.update(); } public function get RadarBlipRef():MovieClip{ return (_radarBlipRef); } } }//package com.spaceAgent.engine.gameObjects
Section 164
//StarFX (com.spaceAgent.engine.gameObjects.StarFX) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class StarFX extends RenderableObject { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function StarFX(){ super(); if (_slot1.texID == -1){ _slot1.texID = RenderManager.getTexIDByName("Anim_StarFX"); }; if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].width; _slot1.baseHeight = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.animated = true; if (_slot1.totalFrames == -1){ _slot1.totalFrames = RenderManager.AnimationLibrary[_slot1.texID].BmdArray.length; }; _spriteModel.TotalFrames = _slot1.totalFrames; _spriteModel.CurrentFrame = Math.floor((Math.random() * 25)); _spriteModel.FrameRate = 1; x = 0; y = 0; w = _slot1.baseWidth; h = _slot1.baseHeight; vx = ((Math.random() - 0.5) * 6); vy = ((Math.random() - 0.5) * 6); s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ purge = true; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 165
//TentaclePiece (com.spaceAgent.engine.gameObjects.TentaclePiece) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.sound.*; import com.psiom.engine.gameObject.*; import com.psiom.util.*; public class TentaclePiece extends SolidObject { private var _mode:int; private var _lastX:Number; private var _lastY:Number; private var _hideTime:Number;// = 0 private var _segmentTurn:Number;// = 0 private var _outPerc:Number;// = 0 private var _baseFrame:int;// = 0 private var _shock:Number;// = 0 private var _targetObj:RenderableObject; private var _tentacleHealth:Number;// = 650 private var _parentSegment:TentaclePiece; private var _shockMax:Number;// = 90 private var _waveSinTargetA:Number;// = 0.5 private var _baseRotation:Number;// = 0 private var _childSegment:TentaclePiece; private var _waveSin:Number; private var _waveSinA:Number;// = 0.5 private var _waveSinF:Number;// = 0.05 private var _hideTimeMax:Number;// = 250 private var _tentacleHealthMax:Number;// = 650 private var _emergeSounds:Array; public static var TENCTACLEMODE_ATTACK:int = 3; public static var TENCTACLEMODE_HIDE:int = 0; public static var TENCTACLEMODE_AMBUSH:int = 1; public static var TENCTACLEMODE_FLAIL:int = 2; public function TentaclePiece(){ _waveSin = (Math.random() * 5); super(); _mode = TENCTACLEMODE_AMBUSH; fixed = true; ignoreTorque = true; _waveSinTargetA = (0.1 + (Math.random() * 1.1)); _waveSinF = (0.025 + (Math.random() * 0.05)); x = 0; y = 0; _lastX = 0; _lastY = 0; _useTypeMask = true; _collidableTypes = [RocketShip, Asteroid, AsteroidBig, DiamondRoid, AlienBase, FixedTurret]; autoVel = false; _emergeSounds = [SoundManager.SND_TENTACLEEMERGE1, SoundManager.SND_TENTACLEEMERGE2, SoundManager.SND_TENTACLEEMERGE3]; } public function set TargetObj(inTarget:RenderableObject):void{ _targetObj = inTarget; } public function recursiveShock(inDamage:Number):void{ if (_parentSegment){ _parentSegment.recursiveShock(inDamage); }; _shock = (inDamage * 0.55); if (_shock > _shockMax){ _shock = _shockMax; }; } override public function hit(inDamage:Number, inHitBy:RenderableObject=null, inForce:Number=1):void{ super.hit(inDamage, inHitBy, inForce); if (TargetOutPerc > 0.9){ _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = 21; }; recursiveShock(inDamage); _tentacleHealth = (_tentacleHealth - inDamage); if (_tentacleHealth < 0){ recursiveHide(); }; forceSMUpdate(); } public function recursiveHide():void{ _mode = TENCTACLEMODE_HIDE; if (_parentSegment){ _parentSegment.recursiveHide(); }; _hideTime = ((_hideTimeMax / 2) + (Math.random() * (_hideTimeMax / 2))); } public function setRecursiveAttackMode():void{ if (_mode != TENCTACLEMODE_ATTACK){ if (Math.random() > 0.5){ SoundManager.Instance.playSoundID(_emergeSounds[Math.floor((Math.random() * (_emergeSounds.length - 0.001)))], 0.5); }; _mode = TENCTACLEMODE_ATTACK; if (_parentSegment){ _parentSegment.setRecursiveAttackMode(); }; if (_childSegment){ _childSegment.setRecursiveAttackMode(); }; }; } public function get OutPerc():Number{ var op:Number = (_baseFrame / 20.999); if (op > 0.95){ op = 1; }; return (op); } override public function update():void{ var pDir:Number; var pVec:Object; _waveSin = (_waveSin + _waveSinF); if (Math.random() > 0.97){ _waveSinTargetA = (0.1 + (Math.random() * 1.1)); }; if (Math.random() > 0.98){ _waveSinF = (0.025 + (Math.random() * 0.05)); }; _waveSinA = (_waveSinA + ((_waveSinTargetA - _waveSinA) * 0.1)); _segmentTurn = (Math.sin(_waveSin) * _waveSinA); if (_parentSegment){ pDir = MathFunction.getRadians(_parentSegment.x, _parentSegment.y, x, y); pVec = MathFunction.getVector(_parentSegment.r, ((50 * s) * _parentSegment.OutPerc)); _lastX = x; _lastY = y; x = (_parentSegment.x + pVec.x); y = (_parentSegment.y + pVec.y); }; r = (_baseRotation + _segmentTurn); var dist:Number = 0; var minDist:Number = 0; if (_targetObj){ dist = MathFunction.getDistance(x, y, _targetObj.x, _targetObj.y); minDist = 250; }; var moveDist:Number = MathFunction.getDistance(_lastX, _lastY, x, y); var moveRad:Number = MathFunction.getDistance(_lastX, _lastY, x, y); var moveVec:Object = MathFunction.getVector(moveRad, (moveDist * 3)); vx = moveVec.x; vy = moveVec.y; var tFrame:int = Math.floor((_outPerc * 19.999)); if ((((_mode == TENCTACLEMODE_FLAIL)) || ((_mode == TENCTACLEMODE_ATTACK)))){ _tentacleHealth = (_tentacleHealth + 0.5); if ((((_parentSegment == null)) || ((_parentSegment.OutPerc < 0.1)))){ if (_shock > 1){ OutPerc = (1 - (_shock / _shockMax)); } else { OutPerc = 1; }; }; if (_mode == TENCTACLEMODE_ATTACK){ }; }; if (dist > minDist){ if (Math.random() > 0.95){ _mode = TENCTACLEMODE_AMBUSH; }; }; _shock = (_shock * 0.7); if (_mode == TENCTACLEMODE_HIDE){ if (_parentSegment){ if (_parentSegment.OutPerc < 0.1){ OutPerc = 0; }; } else { OutPerc = 0; }; _hideTime--; if ((((_hideTime < 0)) && ((_tentacleHealth > 200)))){ _mode = TENCTACLEMODE_AMBUSH; }; _tentacleHealth = (_tentacleHealth + 5); }; if (_tentacleHealth > _tentacleHealthMax){ _tentacleHealth = _tentacleHealthMax; }; if (_mode == TENCTACLEMODE_AMBUSH){ if (_parentSegment){ if (_parentSegment.OutPerc < 0.1){ OutPerc = 0; }; } else { OutPerc = 0; }; if (dist < minDist){ setRecursiveAttackMode(); }; _tentacleHealth = (_tentacleHealth + 2); }; if (_baseFrame < tFrame){ _baseFrame++; }; if (_baseFrame > tFrame){ _baseFrame--; }; if ((((_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1))) || ((_spriteModel.CurrentFrame < 20)))){ _spriteModel.CurrentFrame = _baseFrame; _spriteModel.FrameRate = 0; }; if (OutPerc > 0.9){ _forceActive = true; } else { _forceActive = false; }; super.update(); } public function get TargetOutPerc():Number{ return (_outPerc); } public function setParentSegment(inSegment:TentaclePiece):void{ _parentSegment = inSegment; inSegment.setChildSegment(this); } public function set OutPerc(inVal:Number):void{ _outPerc = inVal; if (_outPerc > 1){ _outPerc = 1; }; if (_outPerc < 0){ _outPerc = 0; }; } override public function damage(inDamage:Number, inDamagedBy:RenderableObject=null):void{ super.damage(inDamage); if (TargetOutPerc > 0.9){ _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = 21; }; recursiveShock(inDamage); _tentacleHealth = (_tentacleHealth - inDamage); if (_tentacleHealth < 0){ recursiveHide(); }; forceSMUpdate(); } public function setBaseRotation(inVal:Number):void{ r = inVal; _baseRotation = inVal; } public function setChildSegment(inSegment:TentaclePiece):void{ _childSegment = inSegment; } } }//package com.spaceAgent.engine.gameObjects
Section 166
//TentacleSegment (com.spaceAgent.engine.gameObjects.TentacleSegment) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class TentacleSegment extends TentaclePiece { private var _targetObj:RenderableObject; private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function TentacleSegment(){ super(); if (TentacleSegment.texID == -1){ TentacleSegment.texID = RenderManager.getTexIDByName("Anim_TentacleSegment"); }; if (TentacleSegment.baseWidth == -1){ TentacleSegment.baseWidth = RenderManager.AnimationLibrary[TentacleSegment.texID].BmdArray[0].width; TentacleSegment.baseHeight = RenderManager.AnimationLibrary[TentacleSegment.texID].BmdArray[0].height; }; _spriteModel.init(TentacleSegment.texID, TentacleSegment.baseWidth, TentacleSegment.baseHeight); _spriteModel.animated = true; if (TentacleSegment.totalFrames == -1){ TentacleSegment.totalFrames = RenderManager.AnimationLibrary[TentacleSegment.texID].BmdArray.length; }; _spriteModel.TotalFrames = TentacleSegment.totalFrames; x = 0; y = 0; w = TentacleSegment.baseWidth; h = TentacleSegment.baseHeight; s = 1; r = 0; mass = 80; health = 650; radius = 40; } override public function update():void{ super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 167
//TentacleTip (com.spaceAgent.engine.gameObjects.TentacleTip) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class TentacleTip extends TentaclePiece { private var _targetObj:RenderableObject; private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function TentacleTip(){ super(); if (TentacleTip.texID == -1){ TentacleTip.texID = RenderManager.getTexIDByName("Anim_TentacleTip"); }; if (TentacleTip.baseWidth == -1){ TentacleTip.baseWidth = RenderManager.AnimationLibrary[TentacleTip.texID].BmdArray[0].width; TentacleTip.baseHeight = RenderManager.AnimationLibrary[TentacleTip.texID].BmdArray[0].height; }; _spriteModel.init(TentacleTip.texID, TentacleTip.baseWidth, TentacleTip.baseHeight); _spriteModel.animated = true; if (TentacleTip.totalFrames == -1){ TentacleTip.totalFrames = RenderManager.AnimationLibrary[TentacleTip.texID].BmdArray.length; }; _spriteModel.TotalFrames = TentacleTip.totalFrames; x = 0; y = 0; w = TentacleTip.baseWidth; h = TentacleTip.baseHeight; s = 1; r = 0; mass = 80; health = 650; radius = 40; } override public function update():void{ super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 168
//TinySpark (com.spaceAgent.engine.gameObjects.TinySpark) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class TinySpark extends RenderableObject { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function TinySpark(){ super(); if (TinySpark.texID == -1){ TinySpark.texID = RenderManager.getTexIDByName("Anim_TinySpark"); }; if (TinySpark.baseWidth == -1){ TinySpark.baseWidth = RenderManager.AnimationLibrary[TinySpark.texID].BmdArray[0].width; TinySpark.baseHeight = RenderManager.AnimationLibrary[TinySpark.texID].BmdArray[0].height; }; _spriteModel.init(TinySpark.texID, TinySpark.baseWidth, TinySpark.baseHeight); _spriteModel.animated = true; if (TinySpark.totalFrames == -1){ TinySpark.totalFrames = RenderManager.AnimationLibrary[TinySpark.texID].BmdArray.length; }; _spriteModel.TotalFrames = TinySpark.totalFrames; _spriteModel.FrameRate = 3; x = 0; y = 0; w = TinySpark.baseWidth; h = TinySpark.baseHeight; vx = ((Math.random() * 6) - 3); vy = ((Math.random() * 6) - 3); s = 1; r = 0; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 4)){ purge = true; }; super.update(); } } }//package com.spaceAgent.engine.gameObjects
Section 169
//TractorBeam (com.spaceAgent.engine.gameObjects.TractorBeam) package com.spaceAgent.engine.gameObjects { import com.spaceAgent.sound.*; import com.psiom.engine.gameObject.*; import com.spaceAgent.engine.*; import com.psiom.graphics.*; import com.psiom.util.*; public class TractorBeam extends RenderableObject { private var _bonusScore:Number;// = 5 private var _life:int;// = 15 private var _targetObj:RenderableObject; private var _source:RocketShip; private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function TractorBeam(isPlayer:Boolean=false){ super(); autoVel = false; if (TractorBeam.texID == -1){ TractorBeam.texID = RenderManager.getTexIDByName("Anim_TractorBeam"); }; if (TractorBeam.baseWidth == -1){ TractorBeam.baseWidth = RenderManager.AnimationLibrary[TractorBeam.texID].BmdArray[0].width; TractorBeam.baseHeight = RenderManager.AnimationLibrary[TractorBeam.texID].BmdArray[0].height; }; _spriteModel.init(TractorBeam.texID, TractorBeam.baseWidth, TractorBeam.baseHeight); _spriteModel.animated = true; if (TractorBeam.totalFrames == -1){ TractorBeam.totalFrames = RenderManager.AnimationLibrary[TractorBeam.texID].BmdArray.length; }; radius = 40; _spriteModel.TotalFrames = TractorBeam.totalFrames; _spriteModel.FrameRate = 1; x = 0; y = 0; w = TractorBeam.baseWidth; h = TractorBeam.baseHeight; s = 1; r = 0; } public function kill():void{ purge = true; SoundManager.Instance.endLoopByID(SoundManager.SND_TRACTORBEAM); } override public function update():void{ if (Math.round(_bonusScore) > 0){ _bonusScore = (_bonusScore - 0.005); EngineMain.Instance.triggerScoreBlip(Math.round(_bonusScore)); }; if (_targetObj.purge){ _source.Tractoring = false; kill(); }; if (_spriteModel.CurrentFrame > 6){ _spriteModel.CurrentFrame = 0; }; if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ _spriteModel.CurrentFrame = 0; }; r = MathFunction.getRadians(_source.x, _source.y, _targetObj.x, _targetObj.y); var tDist:Number = MathFunction.getDistance(_source.x, _source.y, _targetObj.x, _targetObj.y); var dMod:Number = (tDist / w); var tVec:Object = MathFunction.getVector(r, ((w / 2) * s)); s = (dMod * 1.5); if (s > 1.75){ s = 1.75; }; x = (_source.x + tVec.x); y = (_source.y + tVec.y); super.update(); } public function setSourceAndTarget(inSource:RocketShip, intarget:RenderableObject):void{ _source = inSource; _targetObj = intarget; SoundManager.Instance.playSoundID(SoundManager.SND_TRACTORBEAM, 0.8, true); } } }//package com.spaceAgent.engine.gameObjects
Section 170
//TurretBase (com.spaceAgent.engine.gameObjects.TurretBase) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class TurretBase extends RenderableObject { private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function TurretBase(){ super(); _slot1.texID = RenderManager.getTexIDByName("Anim_TurretBase"); if (_slot1.baseWidth == -1){ _slot1.baseWidth = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].width; _slot1.baseHeight = RenderManager.AnimationLibrary[_slot1.texID].BmdArray[0].height; }; _spriteModel.init(_slot1.texID, _slot1.baseWidth, _slot1.baseHeight); _spriteModel.animated = true; if (_slot1.totalFrames == -1){ _slot1.totalFrames = RenderManager.AnimationLibrary[_slot1.texID].BmdArray.length; }; _spriteModel.setAnimProperties(_slot1.baseWidth, _slot1.baseHeight, _slot1.totalFrames); x = 0; y = 0; z = 1.1; w = _slot1.baseWidth; h = _slot1.baseHeight; s = 1; } override public function update():void{ if (_spriteModel.CurrentFrame >= (_spriteModel.TotalFrames - 1)){ _spriteModel.CurrentFrame = 0; _spriteModel.FrameRate = 0; }; super.update(); } public function hit(inDamage:Number, inHitBy:RenderableObject=null):void{ _spriteModel.FrameRate = 1; _spriteModel.CurrentFrame = 1; forceSMUpdate(); } } }//package com.spaceAgent.engine.gameObjects
Section 171
//UpgradeAmmo (com.spaceAgent.engine.gameObjects.UpgradeAmmo) package com.spaceAgent.engine.gameObjects { import com.psiom.engine.gameObject.*; import com.psiom.graphics.*; public class UpgradeAmmo extends RenderableObject { private var _ammoTypeID:int;// = 0 private static var totalFrames:int = -1; private static var texID:int = -1; private static var baseWidth:int = -1; private static var baseHeight:int = -1; public function UpgradeAmmo(isPlayer:Boolean=false){ super(); autoVel = false; pointsVal = 1100; if (UpgradeAmmo.texID == -1){ UpgradeAmmo.texID = RenderManager.getTexIDByName("Anim_AmmoPickup"); }; if (UpgradeAmmo.baseWidth == -1){ UpgradeAmmo.baseWidth = RenderManager.AnimationLibrary[UpgradeAmmo.texID].BmdArray[0].width; UpgradeAmmo.baseHeight = RenderManager.AnimationLibrary[UpgradeAmmo.texID].BmdArray[0].height; }; _spriteModel.init(UpgradeAmmo.texID, UpgradeAmmo.baseWidth, UpgradeAmmo.baseHeight); _spriteModel.animated = true; if (UpgradeAmmo.totalFrames == -1){ UpgradeAmmo.totalFrames = RenderManager.AnimationLibrary[UpgradeAmmo.texID].BmdArray.length; }; radius = 40; _spriteModel.TotalFrames = UpgradeAmmo.totalFrames; x = 0; y = 0; w = UpgradeAmmo.baseWidth; h = UpgradeAmmo.baseHeight; s = 1; r = 0; } override public function update():void{ r = (r + 0.05); if (r > (Math.PI * 2)){ r = (r - (Math.PI * 2)); }; super.update(); } public function get AmmoTypeID():int{ return (_ammoTypeID); } public function setTypeID(inTypeID:int):void{ _spriteModel.CurrentFrame = inTypeID; _ammoTypeID = inTypeID; } } }//package com.spaceAgent.engine.gameObjects
Section 172
//GameLevel (com.spaceAgent.engine.objectSpaces.GameLevel) package com.spaceAgent.engine.objectSpaces { import flash.events.*; import com.spaceAgent.*; import com.spaceAgent.sound.*; import com.psiom.engine.gameObject.*; import com.psiom.engine.*; import com.spaceAgent.engine.*; import com.spaceAgent.engine.engineComponents.*; import com.spaceAgent.engine.gameObjects.*; import com.psiom.graphics.*; import com.psiom.engine.data.*; import com.psiom.util.*; public class GameLevel extends ObjectSpace { private var _targetTrackingScale:Number;// = 1 private var _pendingTravellers:int;// = 0 private var _renderWidth:Number;// = 700 private var _trackingMovementInertia:Number;// = 0 private var _optimizeRenderableObjectDistanceBuffer:Number;// = 200 private var _camDistSinceSolidObjectOptimize:Number;// = 0 private var _optimizeSolidObjectDistanceBuffer:Number;// = 150 private var _dormantRenderableObjectThreshhold:Number;// = 800 private var _laserBeams:Array; private var _spacedudes:Array; private var _renderHeight:Number;// = 450 private var _laserNodes:Array; private var _poisonBubbles:Array; private var _debugRocket:RocketShip; private var _gameOverLeadOut:Number;// = 120 private var _collectables:Array; private var _motionParticles:Array; private var _trackingScaleInertia:Number;// = 0 private var _camDistSinceRenderableObjectOptimize:Number;// = 0 private var _mode:int; private var _blackHoles:Array; private var _bgObjects:Array; private var _worldHeight:Number;// = 643 private var _dormantSolidObjectThreshhold:Number;// = 750 private var _sOffset:Number;// = 0 private var _ammo:Array; private var _totalTravellers:int;// = 0 private var _currentTrackingScale:Number;// = 1 private var _levelData:LevelData; private var _physicsData:PhysicsData; private var _worldWidth:Number;// = 1000 private var _playerRocket:RocketShip; private var _diffY:Number;// = 0 private var _alienAutoZoomFactor:Number;// = 1 private var _diffX:Number;// = 0 public static var LEVELMODE_WIN:int = 3; public static var LEVELMODE_INPROGRESS:int = 2; public static var LEVELMODE_LOADING:int = 1; public static var LEVELMODE_IDLE:int = 0; private static var _instance:GameLevel; public static var LEVELMODE_FAIL:int = 4; public function GameLevel(){ _mode = LEVELMODE_IDLE; _levelData = new LevelData(); _instance = this; resetObjectArrays(); _ammo = new Array(); _blackHoles = new Array(); _bgObjects = new Array(); super(); } public function addDamageParticle(sourceObj:RenderableObject):void{ var eParticle:ExhaustParticle; var i:int; while (i < 10) { eParticle = new ExhaustParticle(); eParticle.x = ((sourceObj.x + ((Math.random() * 16) - 8)) - sourceObj.vx); eParticle.y = ((sourceObj.y + ((Math.random() * 16) - 8)) - sourceObj.vy); eParticle.vx = ((Math.random() - 0.5) * 10); eParticle.vy = ((Math.random() - 0.5) * 10); addObject(eParticle); i++; }; } public function set AlienAutoZoomFactor(inVal:Number):void{ _alienAutoZoomFactor = inVal; } public function spawnBonusDiamonds():void{ var diamond:Diamond; var i:int; while (i < 20) { diamond = new Diamond(); diamond.x = (_playerRocket.x + ((Math.random() - 0.5) * 5)); diamond.y = (_playerRocket.y + ((Math.random() - 0.5) * 5)); diamond.vx = (_playerRocket.x + ((Math.random() - 0.5) * 2.5)); diamond.vy = (_playerRocket.y + ((Math.random() - 0.5) * 2.5)); addObject(diamond); i++; }; } public function get WorldHeight():Number{ return (_worldHeight); } private function onLevelLoaded(e:Event):void{ var levelObject:Object; var asteroid:Asteroid; var asteroidBig:AsteroidBig; var bgObj:BGLargeObj; var planetID:int; var zMod:Number; var _local12:DiamondRoid; var _local13:FuelPickup; var _local14:Diamond; var _local15:UpgradeAmmo; var _local16:UpgradeAmmo; var _local17:UpgradeAmmo; var _local18:UpgradeAmmo; var _local19:Planet; var _local20:Spacedude; var _local21:AsteroidWallSmall; var _local22:AsteroidWall; var _local23:AsteroidWallBig; var _local24:AlienBumper; var _local25:AlienShooter; var _local26:AlienBumperLite; var _local27:AlienShooterLite; var _local28:BlackHole; var _local29:LaserNode; var _local30:LaserNode; var _local31:LaserNode; var _local32:LaserNode; var _local33:FixedTurret; var _local34:TurretBase; var _local35:Hint1; var _local36:Hint2; var _local37:Hint3; var _local38:Hint4; var _local39:Hint5; var _local40:Hint6; var _local41:Hint7; var _local42:int; var _local43:Number; var _local44:Array; var _local45:PoisonBarrel; var _local46:GasCloud; var _local47:Sign; var t:int; var tentacle:TentaclePiece; trace("arrays: ", _collectables.length, _motionParticles.length, _spacedudes.length, _ammo.length, _blackHoles.length, _laserNodes.length, _laserBeams.length, _poisonBubbles.length, _bgObjects.length, "objects num:", _objects.length); _mode = LEVELMODE_INPROGRESS; if (_physicsData){ _physicsData.reset(); }; _physicsData = new PhysicsData(); _levelData.removeEventListener("levelLoaded", onLevelLoaded); _pendingTravellers = 0; var i:int; _playerRocket = new RocketShip(); _playerRocket.x = 0; _playerRocket.y = 0; var levelObjects:Array = _levelData.getObjects(); for each (levelObject in levelObjects) { if (levelObject){ if (levelObject.Type == "roid6"){ levelObject.Type = "roid7"; }; planetID = 0; zMod = 0.75; if (levelObject.Type == "planet2"){ levelObject.Type = "planet"; planetID = 1; zMod = 0.81; }; if (levelObject.Type == "planet3"){ levelObject.Type = "planet"; planetID = 2; zMod = 0.85; }; if (levelObject.Type == "planet4"){ levelObject.Type = "planet"; planetID = 3; zMod = 0.68; }; if (levelObject.Type == "planet5"){ levelObject.Type = "planet"; planetID = 4; zMod = 0.88; }; if (levelObject.Type == "planet6"){ levelObject.Type = "planet"; planetID = 5; zMod = 0.7; }; switch (levelObject.Type){ case "rocketShip": _playerRocket.x = levelObject.x; _playerRocket.y = levelObject.y; _playerRocket.r = MathFunction.degreesToRadians(levelObject.rotation); break; case "roid": asteroid = new Asteroid(); asteroid.x = levelObject.x; asteroid.y = levelObject.y; asteroid.r = MathFunction.degreesToRadians(levelObject.rotation); addObject(asteroid); _physicsData.addSolidObject(asteroid); break; case "roid2": asteroid = new Asteroid(); asteroid.x = levelObject.x; asteroid.y = levelObject.y; asteroid.r = MathFunction.degreesToRadians(levelObject.rotation); asteroid.setAsContainer(AsteroidBase.CONTAINSOBJ_FUEL); addObject(asteroid); _physicsData.addSolidObject(asteroid); break; case "roid3": asteroid = new Asteroid(); asteroid.x = levelObject.x; asteroid.y = levelObject.y; asteroid.r = MathFunction.degreesToRadians(levelObject.rotation); asteroid.setAsContainer(AsteroidBase.CONTAINSOBJ_AMMO1); addObject(asteroid); _physicsData.addSolidObject(asteroid); break; case "roid4": asteroid = new Asteroid(); asteroid.x = levelObject.x; asteroid.y = levelObject.y; asteroid.r = MathFunction.degreesToRadians(levelObject.rotation); asteroid.setAsContainer(AsteroidBase.CONTAINSOBJ_AMMO2); addObject(asteroid); _physicsData.addSolidObject(asteroid); break; case "roid5": asteroid = new Asteroid(); asteroid.x = levelObject.x; asteroid.y = levelObject.y; asteroid.r = MathFunction.degreesToRadians(levelObject.rotation); asteroid.setAsContainer(AsteroidBase.CONTAINSOBJ_AMMO3); addObject(asteroid); _physicsData.addSolidObject(asteroid); break; case "roid6": break; case "roid7": _local12 = new DiamondRoid(); _local12.x = levelObject.x; _local12.y = levelObject.y; _local12.r = MathFunction.degreesToRadians(levelObject.rotation); addObject(_local12); _physicsData.addSolidObject(_local12); break; case "roid8": asteroid = new Asteroid(); asteroid.x = levelObject.x; asteroid.y = levelObject.y; asteroid.r = MathFunction.degreesToRadians(levelObject.rotation); asteroid.setAsContainer(AsteroidBase.CONTAINSOBJ_AMMO4); addObject(asteroid); _physicsData.addSolidObject(asteroid); break; case "roidBig": asteroidBig = new AsteroidBig(); asteroidBig.x = levelObject.x; asteroidBig.y = levelObject.y; asteroidBig.r = MathFunction.degreesToRadians(levelObject.rotation); addObject(asteroidBig); _physicsData.addSolidObject(asteroidBig); break; case "roidBig2": asteroidBig = new AsteroidBig(); asteroidBig.x = levelObject.x; asteroidBig.y = levelObject.y; asteroidBig.r = MathFunction.degreesToRadians(levelObject.rotation); asteroidBig.setAsContainer(AsteroidBase.CONTAINSOBJ_FUEL); addObject(asteroidBig); _physicsData.addSolidObject(asteroidBig); break; case "roidBig3": asteroidBig = new AsteroidBig(); asteroidBig.x = levelObject.x; asteroidBig.y = levelObject.y; asteroidBig.r = MathFunction.degreesToRadians(levelObject.rotation); asteroidBig.setAsContainer(AsteroidBase.CONTAINSOBJ_AMMO1); addObject(asteroidBig); _physicsData.addSolidObject(asteroidBig); break; case "roidBig4": asteroidBig = new AsteroidBig(); asteroidBig.x = levelObject.x; asteroidBig.y = levelObject.y; asteroidBig.r = MathFunction.degreesToRadians(levelObject.rotation); asteroidBig.setAsContainer(AsteroidBase.CONTAINSOBJ_AMMO2); addObject(asteroidBig); _physicsData.addSolidObject(asteroidBig); break; case "roidBig5": asteroidBig = new AsteroidBig(); asteroidBig.x = levelObject.x; asteroidBig.y = levelObject.y; asteroidBig.r = MathFunction.degreesToRadians(levelObject.rotation); asteroidBig.setAsContainer(AsteroidBase.CONTAINSOBJ_AMMO3); addObject(asteroidBig); _physicsData.addSolidObject(asteroidBig); break; case "roidBig6": asteroidBig = new AsteroidBig(); asteroidBig.x = levelObject.x; asteroidBig.y = levelObject.y; asteroidBig.r = MathFunction.degreesToRadians(levelObject.rotation); asteroidBig.setAsContainer(AsteroidBase.CONTAINSOBJ_DIAMOND); addObject(asteroidBig); _physicsData.addSolidObject(asteroidBig); break; case "fuel": _local13 = new FuelPickup(); _local13.x = levelObject.x; _local13.y = levelObject.y; _collectables.push(_local13); addObject(_local13); break; case "bgObj": bgObj = new BGLargeObj(); bgObj.setGraphicByID(BGLargeObj.G_SPACESTATION); bgObj.x = levelObject.x; bgObj.y = levelObject.y; bgObj.initParalax((0.6 + (Math.random() * 0.1)), levelObject.x, levelObject.y); addObject(bgObj); break; case "bgObj2": bgObj = new BGLargeObj(); bgObj.setGraphicByID(BGLargeObj.G_DEATHSTAR); bgObj.x = levelObject.x; bgObj.y = levelObject.y; bgObj.initParalax((0.6 + (Math.random() * 0.1)), levelObject.x, levelObject.y); addObject(bgObj); break; case "bgObj3": bgObj = new BGLargeObj(); bgObj.setGraphicByID(BGLargeObj.G_INVADER); bgObj.x = levelObject.x; bgObj.y = levelObject.y; bgObj.initParalax((0.6 + (Math.random() * 0.1)), levelObject.x, levelObject.y); addObject(bgObj); break; case "diamond": _local14 = new Diamond(); _local14.x = levelObject.x; _local14.y = levelObject.y; if (levelObject.rotation != 0){ _local14.r = MathFunction.degreesToRadians(levelObject.rotation); } else { _local14.r = ((Math.random() * Math.PI) * 2); }; _local14.neverExpire(); addObject(_local14); _collectables.push(_local14); break; case "ammo": _local15 = new UpgradeAmmo(); _local15.setTypeID(AmmoBase.TYPE_RAPID); _local15.x = levelObject.x; _local15.y = levelObject.y; _collectables.push(_local15); addObject(_local15); break; case "ammo2": _local16 = new UpgradeAmmo(); _local16.setTypeID(AmmoBase.TYPE_DOUBLE); _local16.x = levelObject.x; _local16.y = levelObject.y; _collectables.push(_local16); addObject(_local16); break; case "ammo3": _local17 = new UpgradeAmmo(); _local17.setTypeID(AmmoBase.TYPE_TRIPLE); _local17.x = levelObject.x; _local17.y = levelObject.y; _collectables.push(_local17); addObject(_local17); break; case "ammo4": _local18 = new UpgradeAmmo(); _local18.setTypeID(AmmoBase.TYPE_SEEKER); _local18.x = levelObject.x; _local18.y = levelObject.y; _collectables.push(_local18); addObject(_local18); break; case "planet": _local19 = new Planet(); _local19.setGraphicByID(planetID); _local19.x = levelObject.x; _local19.y = levelObject.y; _local19.initParalax(zMod, levelObject.x, levelObject.y); addObject(_local19); break; case "spacedude": _local20 = new Spacedude(); _local20.x = levelObject.x; _local20.y = levelObject.y; _spacedudes.push(_local20); addObject(_local20); _totalTravellers++; _pendingTravellers++; break; case "roidWall": _local21 = new AsteroidWallSmall(); _local21.x = levelObject.x; _local21.y = levelObject.y; _local21.setGraphicsTimelineAngleByDegrees(levelObject.rotation); addObject(_local21); _physicsData.addSolidObject(_local21); break; case "roidWall2": _local22 = new AsteroidWall(); _local22.x = levelObject.x; _local22.y = levelObject.y; if (levelObject.rotation != 0){ _local22.setGraphicsTimelineAngleByDegrees(levelObject.rotation); } else { _local22.setGraphicsTimelineAngleByDegrees((Math.random() * 360)); }; addObject(_local22); _physicsData.addSolidObject(_local22); break; case "roidWall3": _local23 = new AsteroidWallBig(); _local23.x = levelObject.x; _local23.y = levelObject.y; _local23.setGraphicsTimelineAngleByDegrees(levelObject.rotation); addObject(_local23); _physicsData.addSolidObject(_local23); break; case "alien": _local24 = new AlienBumper(); _local24.x = levelObject.x; _local24.y = levelObject.y; _local24.TargetObj = _playerRocket; addObject(_local24); _physicsData.addSolidObject(_local24); break; case "alien2": _local25 = new AlienShooter(); _local25.x = levelObject.x; _local25.y = levelObject.y; _local25.TargetObj = _playerRocket; addObject(_local25); _physicsData.addSolidObject(_local25); break; case "alien3": _local26 = new AlienBumperLite(); _local26.x = levelObject.x; _local26.y = levelObject.y; _local26.TargetObj = _playerRocket; addObject(_local26); _physicsData.addSolidObject(_local26); break; case "alien4": _local27 = new AlienShooterLite(); _local27.x = levelObject.x; _local27.y = levelObject.y; _local27.TargetObj = _playerRocket; addObject(_local27); _physicsData.addSolidObject(_local27); break; case "blackHole": _local28 = new BlackHole(); _local28.x = levelObject.x; _local28.y = levelObject.y; addObject(_local28); _blackHoles.push(_local28); break; case "laserNode": _local29 = new LaserNode(); _local29.x = levelObject.x; _local29.y = levelObject.y; _local29.setBaseAngle(MathFunction.degreesToRadians(levelObject.rotation)); addObject(_local29); _laserNodes.push(_local29); break; case "laserNode2": _local30 = new LaserNode(); _local30.x = levelObject.x; _local30.y = levelObject.y; _local30.setBaseAngle(MathFunction.degreesToRadians(levelObject.rotation)); _local30.powerup(); addObject(_local30); _laserNodes.push(_local30); break; case "laserNode3": _local31 = new LaserNode(); _local31.x = levelObject.x; _local31.y = levelObject.y; _local31.setBaseAngle(MathFunction.degreesToRadians(levelObject.rotation)); _local31.setRayMode(true); addObject(_local31); _laserNodes.push(_local31); break; case "laserNode4": _local32 = new LaserNode(); _local32.x = levelObject.x; _local32.y = levelObject.y; _local32.setBaseAngle(MathFunction.degreesToRadians(levelObject.rotation)); _local32.setRayMode(true); _local32.powerup(); addObject(_local32); _laserNodes.push(_local32); break; case "fixedTurret": _local33 = new FixedTurret(); _local33.x = levelObject.x; _local33.y = levelObject.y; _local33.z = 1.1; _local33.r = MathFunction.degreesToRadians((levelObject.rotation - 90)); _local33.setAngleContraint(_local33.r); _local33.TargetObj = _playerRocket; addObject(_local33); _physicsData.addSolidObject(_local33); _local34 = new TurretBase(); _local34.x = levelObject.x; _local34.y = levelObject.y; _local34.z = 1.1; _local34.r = MathFunction.degreesToRadians(levelObject.rotation); addObject(_local34); _local33.BaseObj = _local34; break; case "hint1": _local35 = new Hint1(); _local35.x = (levelObject.x + (_local35.w / 2)); _local35.y = (levelObject.y + (_local35.h / 2)); addObject(_local35); break; case "hint2": _local36 = new Hint2(); _local36.x = (levelObject.x + (_local36.w / 2)); _local36.y = (levelObject.y + (_local36.h / 2)); addObject(_local36); break; case "hint3": _local37 = new Hint3(); _local37.x = (levelObject.x + (_local37.w / 2)); _local37.y = (levelObject.y + (_local37.h / 2)); addObject(_local37); break; case "hint4": _local38 = new Hint4(); _local38.x = (levelObject.x + (_local38.w / 2)); _local38.y = (levelObject.y + (_local38.h / 2)); addObject(_local38); break; case "hint5": _local39 = new Hint5(); _local39.x = (levelObject.x + (_local39.w / 2)); _local39.y = (levelObject.y + (_local39.h / 2)); addObject(_local39); break; case "hint6": _local40 = new Hint6(); _local40.x = (levelObject.x + (_local40.w / 2)); _local40.y = (levelObject.y + (_local40.h / 2)); addObject(_local40); break; case "hint7": _local41 = new Hint7(); _local41.x = (levelObject.x + (_local41.w / 2)); _local41.y = (levelObject.y + (_local41.h / 2)); addObject(_local41); break; case "tentacle": _local42 = 5; _local43 = 1; _local44 = new Array(); t = 0; while (t < _local42) { if (t != (_local42 - 1)){ tentacle = new TentacleSegment(); } else { tentacle = new TentacleTip(); }; tentacle.setBaseRotation(MathFunction.degreesToRadians(levelObject.rotation)); tentacle.x = levelObject.x; tentacle.y = levelObject.y; tentacle.z = 1.1; if (t > 0){ tentacle.setParentSegment(_local44[(_local44.length - 1)]); }; tentacle.s = _local43; _local43 = (_local43 * 0.96); tentacle.TargetObj = _playerRocket; _local44.push(tentacle); addObject(tentacle); _physicsData.addSolidObject(tentacle); t++; }; break; case "poisonBarrel": _local45 = new PoisonBarrel(); _local45.x = levelObject.x; _local45.y = levelObject.y; _local45.r = MathFunction.degreesToRadians(levelObject.rotation); _physicsData.addSolidObject(_local45); _local46 = new GasCloud(); _local46.x = levelObject.x; _local46.y = levelObject.y; _local46.attachToBarrel(_local45); addObject(_local45); addObject(_local46); break; case "sign": _local47 = new Sign(); _local47.x = levelObject.x; _local47.y = levelObject.y; _local47.r = MathFunction.degreesToRadians(levelObject.rotation); addObject(_local47); break; default: trace(("levelObject.Type unrecognized. levelObject.Type: " + levelObject.Type)); }; }; }; i = 0; while (i < _laserNodes.length) { _laserNodes[i].findTargets(_laserNodes); i++; }; addObject(_playerRocket); _physicsData.addSolidObject(_playerRocket); _debugRocket = new RocketShip(); _debugRocket.x = 0; _debugRocket.y = 0; EngineMain.Instance.Camera.setCameraSubject(_playerRocket, true); zSort(); optimizeByCameraProximity(EngineMain.Instance.Camera, _dormantRenderableObjectThreshhold); PhysicsData.Instance.optimizeByCameraProximity(EngineMain.Instance.Camera, _dormantSolidObjectThreshhold); EngineMain.Instance.setHudTravellersDisplay(0, _totalTravellers); } public function addSmallSmokePuff(inX:Number, inY:Number, inCount:Number=1, inSpread:Number=0):void{ var sp:SmokePuffSmall; var i:int; while (i < inCount) { sp = new SmokePuffSmall(); sp.x = (inX + ((Math.random() * inSpread) - (inSpread / 2))); sp.y = (inY + ((Math.random() * inSpread) - (inSpread / 2))); sp.startRandom(); addObject(sp); i++; }; } private function resetObjectArrays():void{ _collectables = new Array(); _motionParticles = new Array(); _spacedudes = new Array(); _laserNodes = new Array(); _laserBeams = new Array(); _poisonBubbles = new Array(); _bgObjects = new Array(); _blackHoles = new Array(); _ammo = new Array(); } public function fireNodeLaser(sourceNode:LaserNode, targetNode:LaserNode):void{ var laserBeam:LaserBeam = new LaserBeam(); laserBeam.setSourceAndTarget(sourceNode, targetNode); addObject(laserBeam); _laserBeams.push(laserBeam); } public function get TScale():Number{ return (_targetTrackingScale); } public function initLevel(filePath:String):void{ var bgStar:BGStar; var bgRoid:BGRoid; _mode = LEVELMODE_LOADING; removeAllObjects(); resetObjectArrays(); _levelData.loadData((Constants.BASE_URL + filePath)); _levelData.addEventListener("levelLoaded", onLevelLoaded); trace("GameLevel > initLevel > SETTING ENGINE MODE TO LOADING > file: ", filePath); var bgGradient:BGGradient = new BGGradient(); addObject(bgGradient); var i:int; i = 0; while (i < 50) { bgStar = new BGStar(); bgStar.x = (Math.random() * _worldWidth); bgStar.y = (Math.random() * _worldHeight); bgStar.sm.floating = true; addObject(bgStar); _bgObjects.push(bgStar); i++; }; i = 0; while (i < 20) { bgRoid = new BGRoid(); bgRoid.x = (Math.random() * _worldWidth); bgRoid.y = (Math.random() * _worldHeight); bgRoid.sm.floating = true; addObject(bgRoid); _bgObjects.push(bgRoid); i++; }; } public function get GameLevelData():LevelData{ return (_levelData); } public function get ShipFuelP():Number{ var fp:Number; if (_playerRocket){ fp = (_playerRocket.Fuel / 100); if (fp > 1){ fp = 1; }; return (fp); //unresolved jump }; return (1); } public function getNearestSeekerTarget(inSeeker:RenderableObject):SolidObject{ var returnObjPrimary:SolidObject; var returnObjSecondary:SolidObject; var returnObj:SolidObject; var cObj:SolidObject; var dist:Number; var dummyObj:SolidObject = new SolidObject(); dummyObj.x = _playerRocket.x; dummyObj.y = _playerRocket.y; dummyObj.NearThreshholdOverride = 450; dummyObj.NearThreshholdBase = 450; var possibleTargets:Array = _physicsData.getCollisionTargets(dummyObj, true); var smallestPrimaryDist:Number = 10000; var smallestSecondaryDist:Number = 10000; var smallestDist:Number = 10000; var i:int; while (i < possibleTargets.length) { cObj = possibleTargets[i]; if (cObj != _playerRocket){ dist = MathFunction.getDistance(dummyObj.x, dummyObj.y, cObj.x, cObj.y); if ((((cObj is FixedTurret)) || ((cObj is AlienBase)))){ if (dist < smallestPrimaryDist){ smallestPrimaryDist = dist; returnObjPrimary = cObj; }; }; if ((((((cObj is Asteroid)) || ((cObj is AsteroidBase)))) || ((cObj is DiamondRoid)))){ if (dist < smallestSecondaryDist){ smallestSecondaryDist = dist; returnObjSecondary = cObj; }; }; }; i++; }; if (returnObjPrimary){ return (returnObjPrimary); }; if (returnObjSecondary){ return (returnObjSecondary); }; return (returnObj); } public function get WorldWidth():Number{ return (_worldWidth); } public function addEnemyAmmoParticle(typeID:int, sourceObj:RenderableObject):void{ var ap:RenderableObject; ap = new EnemyAmmoParticle(); ap.x = sourceObj.x; ap.y = sourceObj.y; ap.vx = ((Math.random() - 0.5) * 1); ap.vy = ((Math.random() - 0.5) * 1); addObject(ap); } public function addCollisionPuffs(sourceObj:RenderableObject, strikingObj:RenderableObject):void{ var colRadians:Number; var colVec:Object; var sp:SmokePuffSmall; var i:int; while (i < 10) { colRadians = MathFunction.getRadians(sourceObj.x, sourceObj.y, strikingObj.x, strikingObj.y); colVec = MathFunction.getVector((colRadians + ((Math.random() - 0.5) * 1.9)), (1 + (Math.random() * 3.5))); sp = new SmokePuffSmall(); sp.x = sourceObj.x; sp.y = sourceObj.y; sp.vx = colVec.x; sp.vy = colVec.y; sp.startRandom(); addObject(sp); i++; }; } public function get ShipHealthP():Number{ var fp:Number; if (_playerRocket){ fp = (_playerRocket.Health / 100); if (fp > 1){ fp = 1; }; return (fp); //unresolved jump }; return (1); } public function setShipBH():void{ _playerRocket.NearThreshholdBase = 700; _playerRocket.NearThreshholdOverride = 700; _blackHoles.push(_playerRocket); _blackHoles.push(_playerRocket); } private function destroySolidObject(inObj:SolidObject):void{ var i:int; var spawnItems:Array = inObj.getDestructionSpawnItems(); var particles:Array = inObj.getDestructionParticles(); i = 0; while (i < spawnItems.length) { addObject(spawnItems[i]); if ((spawnItems[i] is SolidObject)){ _physicsData.addSolidObject(spawnItems[i]); }; if ((((((spawnItems[i] is FuelPickup)) || ((spawnItems[i] is UpgradeAmmo)))) || ((spawnItems[i] is Diamond)))){ _collectables.push(spawnItems[i]); }; i++; }; i = 0; while (i < particles.length) { addObject(particles[i]); i++; }; inObj.purge; inObj.destroyLinkedObjects(); } public function keyUpInput(e:KeyboardEvent):void{ if (_playerRocket){ _playerRocket.keyUpInput(e); }; } public function setCameraShakeLevel(inVal:Number):void{ if (_playerRocket){ _playerRocket.ShakeVel = inVal; }; } private function poisonBubbleCombust(pb:PoisonBubble):void{ var blastObj:SolidObject; var dist:Number; var blastDist:Number; var dPerc:Number; var dDir:Number; var dVec:Object; pb.combust(); addSmokePuff(pb.x, pb.y, 1, 0); addSmallSmokePuff(pb.x, pb.y, 5, 65); SoundManager.Instance.playSoundID(SoundManager.SND_COMBUST, 0.9); var s:int; while (s < pb.ParentBarrel.CollisionTargets.length) { blastObj = pb.ParentBarrel.CollisionTargets[s]; dist = MathFunction.getDistance(blastObj.x, blastObj.y, pb.x, pb.y); blastDist = 115; if (dist < blastDist){ dPerc = (1 - (dist / blastDist)); dDir = MathFunction.getRadians(blastObj.x, blastObj.y, pb.x, pb.y); dVec = MathFunction.getVector(dDir, (-15 * dPerc)); if (!blastObj.fixed){ blastObj.vx = (blastObj.vx + dVec.x); blastObj.vy = (blastObj.vy + dVec.y); }; blastObj.hit((750 * dPerc), pb); }; s++; }; } public function keyDownInput(e:KeyboardEvent):void{ if (_playerRocket){ _playerRocket.keyDownInput(e); }; } public function addEnemyAmmoExpiryCloud(sourceObj:RenderableObject):void{ var sp:EnemyAmmoParticle; var i:int; while (i < 25) { sp = new EnemyAmmoParticle(); sp.x = sourceObj.x; sp.y = sourceObj.y; sp.vx = ((Math.random() - 0.5) * 2.5); sp.vy = ((Math.random() - 0.5) * 2.5); addObject(sp); i++; }; } public function addAmmoParticle(typeID:int, sourceObj:RenderableObject):void{ var ap:RenderableObject; if (typeID == 0){ ap = new AmmoParticle(); }; if (typeID == 1){ ap = new AmmoParticle2(); }; if (typeID == 2){ ap = new EnemyAmmoParticle(); }; ap.x = sourceObj.x; ap.y = sourceObj.y; ap.vx = ((Math.random() - 0.5) * 0.6); ap.vy = ((Math.random() - 0.5) * 0.6); addObject(ap); } public function generateCollectableParticles(sourceObj:RenderableObject, countOverride:int=15):void{ var stfx:StarFX; var pVec:Object; var i:int; while (i < countOverride) { stfx = new StarFX(); pVec = MathFunction.getVector(((Math.random() * Math.PI) * 2), (0.5 + (Math.random() * 1.5))); stfx.x = (sourceObj.x + ((Math.random() - 0.5) * 5)); stfx.y = (sourceObj.y + ((Math.random() - 0.5) * 5)); stfx.vx = pVec.x; stfx.vy = pVec.y; addObject(stfx); i++; }; } public function get LevelRunning():Boolean{ return ((_mode == LEVELMODE_INPROGRESS)); } public function collectTraveller():void{ _pendingTravellers--; EngineMain.Instance.setHudTravellersDisplay((_totalTravellers - _pendingTravellers), _totalTravellers); } public function get Spacedudes():Array{ return (_spacedudes); } public function get SOffset():Number{ return (_sOffset); } public function get CScale():Number{ return (_currentTrackingScale); } public function addSmallSmokeTiny(inX:Number, inY:Number, inCount:Number=1, inSpread:Number=0):void{ var sp:SmokePuffTiny; var i:int; while (i < inCount) { sp = new SmokePuffTiny(); sp.x = (inX + ((Math.random() * inSpread) - (inSpread / 2))); sp.y = (inY + ((Math.random() * inSpread) - (inSpread / 2))); sp.startRandom(); addObject(sp); i++; }; } public function gameover():void{ trace("@@ gameover"); if (_mode == LEVELMODE_INPROGRESS){ trace("@@ setting FAIL mode"); _mode = LEVELMODE_FAIL; _gameOverLeadOut = 150; }; } public function getAmmoCollidables(inAmmo:AmmoBase):Array{ var dummyObj:SolidObject = new SolidObject(); dummyObj.x = inAmmo.x; dummyObj.y = inAmmo.y; dummyObj.vx = inAmmo.vx; dummyObj.vy = inAmmo.vy; dummyObj.NearThreshholdBase = 550; dummyObj.NearThreshholdOverride = 550; if ((((inAmmo is AmmoSeeker)) || ((inAmmo is AmmoSeekerHeavy)))){ return (_physicsData.getCollisionTargets(dummyObj, true)); }; return (_physicsData.getCollisionTargetsByVelRay(dummyObj, 650, [AlienBase])); } public function createPoisonBubble(sourceObj:PoisonBarrel):void{ var pb:PoisonBubble = new PoisonBubble(); pb.x = sourceObj.x; pb.y = sourceObj.y; pb.startRandom(); addObject(pb); pb.ParentBarrel = sourceObj; _poisonBubbles.push(pb); } public function generatePowerupParticles(sourceObj:RenderableObject):void{ var _local3:AmmoParticle2; generateCollectableParticles(sourceObj); return; } public function get DiffX():Number{ return (_diffX); } public function get DiffY():Number{ return (_diffY); } override public function update():void{ var minDist:Number; var ammo:AmmoBase; var movementDist:Number; var movementAngle:Number; var movementVec:Object; var deflectionVel:Number; var finalRadians:Number; var finalVel:Object; var solidObj:SolidObject; var dPerc:Number; var dDir:Number; var dVec:Object; var gravDist:Number; var star:RenderableObject; var bObj:SolidObject; var velP:Number; var blackRadians:Number; var blackVec:Object; var dummyObj:SolidObject; var newAngle:Number; var poisonObj:RenderableObject; var colObj:RenderableObject; var mp:MotionParticle; var pb:PoisonBubble; var otherPB:PoisonBubble; var beam:LaserBeam; var objAngle:Number; var angleDiff:Number; var maxDiff:Number; var lengthMod:Number; var spaceDude:Spacedude; var tBeam:TractorBeam; var cObj:RenderableObject; var excludeCollision:Boolean; var ammoMod:Number; var deflectionRadians:Number; var pCount:int; var p:int; var roidParticle:RoidParticle1; var deflectionVec:Object; var ammoSplode:AmmoSplosion; var everythingThatNeedsDoingHasBeenDone:Boolean; var rVel:Number; var i:int; var j:int; var wcDiffX:Number = ((1000 - 700) / 2); var wcDiffY:Number = ((643 - 450) / 2); var minScale:Number = 0.7; var minScaleDiff:Number = (1 - minScale); var offsetScale:Number = ((RenderManager.Instance.Canvas.scaleX - minScale) / minScaleDiff); var cxBase:Number = ((Main.Instance.mouseX - (_renderWidth / 2)) + (RenderManager.Instance.Canvas.x * 1)); var cyBase:Number = ((Main.Instance.mouseY - (_renderHeight / 2)) + (RenderManager.Instance.Canvas.y * 1)); var cxFin:Number = (((EngineMain.Instance.Camera.x + (_worldWidth / 2)) + cxBase) + (wcDiffX * offsetScale)); var cyFin:Number = (((EngineMain.Instance.Camera.y + (_worldHeight / 2)) + cyBase) + (wcDiffY * offsetScale)); var pDir:Number = MathFunction.getRadians(_playerRocket.x, _playerRocket.y, (_playerRocket.x + _playerRocket.vx), (_playerRocket.y + _playerRocket.vy)); var pVel:Number = MathFunction.getDistance(_playerRocket.x, _playerRocket.y, (_playerRocket.x + _playerRocket.vx), (_playerRocket.y + _playerRocket.vy)); var spawnVec:Object = MathFunction.getVector(pDir, 1250); var camDir:Number = EngineCamera.Instance.MovementDirection; var camVel:Number = EngineCamera.Instance.CamVel; var paralaxVec:Object = MathFunction.getVector(camDir, -(camVel)); var dist:Number = 0; _camDistSinceRenderableObjectOptimize = (_camDistSinceRenderableObjectOptimize + camVel); _camDistSinceSolidObjectOptimize = (_camDistSinceSolidObjectOptimize + camVel); if (_camDistSinceRenderableObjectOptimize >= _optimizeRenderableObjectDistanceBuffer){ _camDistSinceRenderableObjectOptimize = 0; optimizeByCameraProximity(EngineMain.Instance.Camera, _dormantRenderableObjectThreshhold); }; if (_camDistSinceSolidObjectOptimize >= _optimizeSolidObjectDistanceBuffer){ _camDistSinceSolidObjectOptimize = 0; PhysicsData.Instance.optimizeByCameraProximity(EngineMain.Instance.Camera, _dormantSolidObjectThreshhold); }; var sdthresh:Number = 1500; i = 0; while (i < _bgObjects.length) { star = _bgObjects[i]; star.vx = (paralaxVec.x * star.z); star.vy = (paralaxVec.y * star.z); if (star.x < -75){ star.x = (_worldWidth + 75); }; if (star.y < -75){ star.y = (_worldHeight + 75); }; if (star.x > (_worldWidth + 75)){ star.x = -75; }; if (star.y > (_worldHeight + 75)){ star.y = -75; }; i++; }; i = 0; while (i < _blackHoles.length) { bObj = _blackHoles[i]; if (bObj.camVis){ minDist = 500; dist = MathFunction.getDistance(bObj.x, bObj.y, _playerRocket.x, _playerRocket.y); if (bObj == _playerRocket){ dist = 10000; }; if (dist < minDist){ velP = (1 - (dist / minDist)); if (velP > 0.4){ velP = 0.4; }; blackRadians = MathFunction.getRadians(_playerRocket.x, _playerRocket.y, bObj.x, bObj.y); blackVec = MathFunction.getVector(blackRadians, (1 * velP)); _playerRocket.vx = (_playerRocket.vx + blackVec.x); _playerRocket.vy = (_playerRocket.vy + blackVec.y); if (dist < (_playerRocket.radius / 1.5)){ _playerRocket.damage(10); if (Math.random() > 0.75){ addSmokePuff(_playerRocket.x, _playerRocket.y, 1, 60); }; if (Math.random() > 0.9){ addDamageParticle(_playerRocket); }; }; }; j = 0; while (j < bObj.CollisionTargets.length) { solidObj = bObj.CollisionTargets[j]; if (((!((solidObj == _playerRocket))) && (!(solidObj.fixed)))){ dist = MathFunction.getDistance(bObj.x, bObj.y, solidObj.x, solidObj.y); if (dist < minDist){ velP = (1 - (dist / minDist)); if (velP > 0.5){ velP = 0.5; }; blackRadians = MathFunction.getRadians(solidObj.x, solidObj.y, bObj.x, bObj.y); blackVec = MathFunction.getVector(blackRadians, (0.25 * velP)); solidObj.vx = (solidObj.vx + blackVec.x); solidObj.vy = (solidObj.vy + blackVec.y); if (dist < (solidObj.radius / 1.5)){ solidObj.hit(200, bObj); if (Math.random() > 0.9){ addSmokePuff(solidObj.x, solidObj.y, 1, 60); }; }; }; }; j++; }; }; j = 0; while (j < _ammo.length) { ammo = _ammo[j]; dist = MathFunction.getDistance(bObj.x, bObj.y, ammo.x, ammo.y); if (dist < minDist){ if (ammo.forwardMode){ ammo.forwardMode = false; dummyObj = new SolidObject(); dummyObj.x = ammo.x; dummyObj.y = ammo.y; dummyObj.NearThreshholdBase = 1000; ammo.setTargets(_physicsData.getCollisionTargets(dummyObj, true)); }; velP = (1 - (dist / minDist)); if (velP > 0.4){ velP = 0.4; }; blackRadians = MathFunction.getRadians(ammo.x, ammo.y, bObj.x, bObj.y); blackVec = MathFunction.getVector(blackRadians, (1.1 * velP)); ammo.vx = (ammo.vx + blackVec.x); ammo.vy = (ammo.vy + blackVec.y); if ((ammo is PlayerAmmo)){ newAngle = MathFunction.getRadians(0, 0, ammo.vx, ammo.vy); ammo.setAngle(newAngle); }; if (dist < (_playerRocket.radius / 1.5)){ ammo.purge = true; }; }; j++; }; j = 0; while (j < _poisonBubbles.length) { poisonObj = _poisonBubbles[j]; dist = MathFunction.getDistance(bObj.x, bObj.y, poisonObj.x, poisonObj.y); if ((((dist < minDist)) && ((dist > 30)))){ velP = (1 - (dist / minDist)); if (velP > 0.4){ velP = 0.4; }; blackRadians = MathFunction.getRadians(poisonObj.x, poisonObj.y, bObj.x, bObj.y); blackVec = MathFunction.getVector(blackRadians, (1.1 * velP)); poisonObj.vx = (poisonObj.vx + blackVec.x); poisonObj.vy = (poisonObj.vy + blackVec.y); }; j++; }; j = 0; while (j < _collectables.length) { colObj = _collectables[j]; dist = MathFunction.getDistance(bObj.x, bObj.y, colObj.x, colObj.y); if ((((dist < minDist)) && ((dist > 5)))){ velP = (1 - (dist / minDist)); if (velP > 0.4){ velP = 0.4; }; blackRadians = MathFunction.getRadians(colObj.x, colObj.y, bObj.x, bObj.y); blackVec = MathFunction.getVector(blackRadians, (0.75 * velP)); colObj.vx = (colObj.vx + blackVec.x); colObj.vy = (colObj.vy + blackVec.y); }; j++; }; i++; }; var brightnessP:Number = (camVel / Constants.MaxShipVel); if (brightnessP > 1){ brightnessP = 1; }; if ((((_motionParticles.length < 17)) && ((camVel > (Constants.MaxShipVel / 25))))){ mp = new MotionParticle(); mp.x = ((_playerRocket.x + ((spawnVec.x * brightnessP) * 0.5)) + ((Math.random() * 550) - 275)); mp.y = ((_playerRocket.y + ((spawnVec.y * brightnessP) * 0.5)) + ((Math.random() * 400) - 200)); _motionParticles.push(mp); addObject(mp); }; i = 0; while (i < _motionParticles.length) { _motionParticles[i].setBrightness(brightnessP); _motionParticles[i].r = camDir; _motionParticles[i].vx = (paralaxVec.x * _motionParticles[i].z); _motionParticles[i].vy = (paralaxVec.y * _motionParticles[i].z); if (_motionParticles[i].lifespan < 0){ _motionParticles[i].purge = true; _motionParticles.splice(i, 1); i--; if (_motionParticles.length < 1){ break; }; }; i++; }; i = 0; while (i < _poisonBubbles.length) { pb = _poisonBubbles[i]; if (!pb.Combusting){ dist = MathFunction.getDistance(_playerRocket.x, _playerRocket.y, pb.x, pb.y); gravDist = 165; if (dist < gravDist){ dPerc = (1 - (dist / gravDist)); dDir = MathFunction.getRadians(pb.x, pb.y, _playerRocket.x, _playerRocket.y); dVec = MathFunction.getVector(dDir, (0.3 * dPerc)); pb.vx = (pb.vx + dVec.x); pb.vy = (pb.vy + dVec.y); }; if (dist < 25){ _playerRocket.damage(22, pb); }; j = 0; while (j < _ammo.length) { ammo = _ammo[j]; dist = MathFunction.getDistance(ammo.x, ammo.y, pb.x, pb.y); if (dist < 25){ ammo.purge = true; poisonBubbleCombust(pb); }; j++; }; } else { j = 0; while (j < _poisonBubbles.length) { if (((!(pb.PassedChain)) && (pb.CanPassChain))){ otherPB = _poisonBubbles[j]; dist = MathFunction.getDistance(otherPB.x, otherPB.y, pb.x, pb.y); if (((!(otherPB.Combusting)) && ((dist < 85)))){ pb.PassedChain = true; poisonBubbleCombust(otherPB); }; }; j++; }; }; if (pb.purge){ _poisonBubbles.splice(i, 1); i--; if (_poisonBubbles.length < 1){ break; }; }; i++; }; i = 0; while (i < _ammo.length) { ammo = _ammo[i]; if (ammo.purge){ _ammo.splice(i, 1); i--; if (_ammo.length < 1){ break; }; }; i++; }; _playerRocket.mouseInput(cxFin, cyFin); var emitExhaust:Boolean; if (_playerRocket.Vel > 0.5){ if (Math.random() > 0.9){ emitExhaust = true; }; }; if (_playerRocket.Vel > 2){ if (Math.random() > 0.7){ emitExhaust = true; }; }; if (_playerRocket.Vel > 4){ if (Math.random() > 0.5){ emitExhaust = true; }; }; if (emitExhaust){ addExhaustParticle(_playerRocket); }; i = 0; while (i < _laserBeams.length) { beam = _laserBeams[i]; dist = MathFunction.getDistance(beam.SourceX, beam.SourceY, _playerRocket.x, _playerRocket.y); if (dist < beam.BeamLength){ objAngle = MathFunction.getRadians(beam.SourceX, beam.SourceY, _playerRocket.x, _playerRocket.y); angleDiff = Math.abs((beam.BeamAngle - objAngle)); maxDiff = (0.08 + (_playerRocket.radius * 0.002)); lengthMod = (beam.BeamLength / dist); maxDiff = (maxDiff * lengthMod); if (angleDiff < maxDiff){ if (Math.random() > 0.6){ addSmokePuff(_playerRocket.x, _playerRocket.y, 1, 25); }; if (Math.random() > 0.6){ addDamageParticle(_playerRocket); }; _playerRocket.damage(125); }; }; j = 0; while (j < beam.CollisionTargets.length) { solidObj = beam.CollisionTargets[j]; if (((!((solidObj == _playerRocket))) && (!(solidObj.fixed)))){ dist = MathFunction.getDistance(beam.SourceX, beam.SourceY, solidObj.x, solidObj.y); if (dist < beam.BeamLength){ objAngle = MathFunction.getRadians(beam.SourceX, beam.SourceY, solidObj.x, solidObj.y); angleDiff = Math.abs((beam.BeamAngle - objAngle)); maxDiff = (0.08 + (solidObj.radius * 0.001)); lengthMod = (beam.BeamLength / dist); maxDiff = (maxDiff * lengthMod); if (angleDiff < maxDiff){ if (Math.random() > 0.6){ addSmokePuff(solidObj.x, solidObj.y, 1, 25); }; if (Math.random() > 0.8){ addDamageParticle(solidObj); }; solidObj.damage(150); }; }; }; j++; }; if (beam.purge){ _laserBeams.splice(i, 1); i--; if (_laserBeams.length < 1){ break; }; }; i++; }; if (!_playerRocket.Dead){ i = 0; while (i < _spacedudes.length) { spaceDude = _spacedudes[i]; dist = MathFunction.getDistance(spaceDude.x, spaceDude.y, _playerRocket.x, _playerRocket.y); minDist = 150; if ((((dist < minDist)) && (!(_playerRocket.Tractoring)))){ tBeam = new TractorBeam(); _playerRocket.Tractoring = true; tBeam.setSourceAndTarget(_playerRocket, spaceDude); spaceDude.tractorToShip(_playerRocket); addObject(tBeam); _spacedudes.splice(i, 1); i--; if (_spacedudes.length < 1){ break; }; }; i++; }; i = 0; while (i < _collectables.length) { cObj = _collectables[i]; dist = MathFunction.getDistance(cObj.x, cObj.y, _playerRocket.x, _playerRocket.y); minDist = (((cObj.radius * cObj.s) / 2) + ((_playerRocket.radius * _playerRocket.s) / 2)); if ((cObj is Diamond)){ gravDist = 135; if (dist < gravDist){ cObj.vx = (cObj.vx * 0.99); cObj.vy = (cObj.vy * 0.99); dPerc = (1 - (dist / gravDist)); dDir = MathFunction.getRadians(cObj.x, cObj.y, _playerRocket.x, _playerRocket.y); dVec = MathFunction.getVector(dDir, (0.6 * dPerc)); cObj.vx = (cObj.vx + dVec.x); cObj.vy = (cObj.vy + dVec.y); }; }; if (dist < minDist){ SoundManager.Instance.playSoundID(SoundManager.SND_COLLECT); if ((cObj is UpgradeAmmo)){ _playerRocket.upgradeAmmo((cObj as UpgradeAmmo)); generatePowerupParticles(cObj); cObj.purge = true; }; if ((cObj is FuelPickup)){ _playerRocket.addFuel(50); generatePowerupParticles(cObj); cObj.purge = true; }; if ((cObj is Diamond)){ EngineMain.Instance.triggerScoreBlip(cObj.pointsVal); generateCollectableParticles(cObj); _playerRocket.addFuel(3.5); _playerRocket.addHealth(3.5); cObj.purge = true; }; }; if (cObj.purge){ _collectables.splice(i, 1); i--; if (_collectables.length < 1){ break; }; }; i++; }; }; i = 0; while (i < _physicsData.SolidObjects.length) { solidObj = _physicsData.SolidObjects[i]; if (solidObj.health < 0){ destroySolidObject(solidObj); solidObj.purge = true; }; if (solidObj.purge){ _physicsData.deregisterSolidObject(solidObj); }; i++; }; i = 0; while (i < _ammo.length) { ammo = _ammo[i]; j = 0; while (j < ammo.Targets.length) { solidObj = ammo.Targets[j]; excludeCollision = false; if ((((solidObj == _playerRocket)) && ((ammo is PlayerAmmo)))){ excludeCollision = true; }; if ((((solidObj is AlienBase)) && ((ammo is EnemyAmmo)))){ excludeCollision = true; }; if ((((solidObj is FixedTurret)) && ((ammo is EnemyAmmo)))){ excludeCollision = true; }; if (!excludeCollision){ dist = MathFunction.getDistance((solidObj.x + solidObj.vx), (solidObj.y + solidObj.vy), (ammo.x + ammo.vx), (ammo.y + ammo.vy)); minDist = (solidObj.radius / 2); if ((((dist < minDist)) && ((ammo.payload > 0)))){ if (solidObj == _playerRocket){ addCollisionPuffs(_playerRocket, ammo); }; solidObj.hit(ammo.payload, ammo); ammoMod = (1 - (solidObj.mass / 100)); if (ammoMod < 0.1){ ammoMod = 0.1; }; if ((solidObj is RocketShip)){ ammoMod = 5.5; }; if (!solidObj.fixed){ solidObj.vx = (solidObj.vx + ((ammo.vx * solidObj.ammoVelDamp) * ammoMod)); solidObj.vy = (solidObj.vy + ((ammo.vy * solidObj.ammoVelDamp) * ammoMod)); solidObj.torque = (solidObj.torque + ((Math.random() * 0.06) - 0.03)); }; ammo.purge = true; deflectionRadians = MathFunction.getRadians((solidObj.x + solidObj.vx), (solidObj.y + solidObj.vy), (ammo.x + ammo.vx), (ammo.y + ammo.vy)); if (solidObj.camVis){ pCount = Math.floor((4 + (Math.random() * 4))); p = 0; while (p < pCount) { roidParticle = new RoidParticle1(); roidParticle.x = (ammo.x + ammo.vx); roidParticle.y = (ammo.y + ammo.vy); deflectionVec = MathFunction.getVector((deflectionRadians + ((Math.random() * 0.6) - 0.3)), (0.5 + (Math.random() * 3))); roidParticle.vx = deflectionVec.x; roidParticle.vy = deflectionVec.y; addObject(roidParticle); p++; }; }; ammo.payload = 0; if (ammo.camVis){ ammoSplode = new AmmoSplosion(); ammoSplode.x = (ammo.x + ammo.vx); ammoSplode.y = (ammo.y + ammo.vy); addObject(ammoSplode); }; }; }; j++; }; i++; }; if (_mode == LEVELMODE_INPROGRESS){ everythingThatNeedsDoingHasBeenDone = true; if (_pendingTravellers > 0){ everythingThatNeedsDoingHasBeenDone = false; }; if (everythingThatNeedsDoingHasBeenDone){ _mode = LEVELMODE_WIN; EngineMain.Instance.levelComplete(); }; }; if (_mode == LEVELMODE_FAIL){ _gameOverLeadOut--; if (_gameOverLeadOut < 0){ _mode = LEVELMODE_IDLE; EngineMain.Instance.gameover(); SoundManager.Instance.playSoundID(SoundManager.SND_GAMEOVER, 0.6); }; }; super.update(); var zoomScale:Number = 1; var zoomThreshholdVel:Number = 5; if (_playerRocket.MovementVel > zoomThreshholdVel){ rVel = (_playerRocket.MovementVel - zoomThreshholdVel); zoomScale = (1 - (rVel / zoomThreshholdVel)); if (zoomScale > 1){ zoomScale = 1; }; if (zoomScale < minScale){ zoomScale = minScale; }; }; if (_alienAutoZoomFactor < minScale){ _alienAutoZoomFactor = minScale; }; if (_alienAutoZoomFactor < zoomScale){ zoomScale = _alienAutoZoomFactor; }; _alienAutoZoomFactor = (_alienAutoZoomFactor + ((1.1 - _alienAutoZoomFactor) * 0.1)); _targetTrackingScale = (_targetTrackingScale + ((zoomScale - _targetTrackingScale) * 0.2)); _currentTrackingScale = (_currentTrackingScale + (((_targetTrackingScale * 1) - _currentTrackingScale) * 0.01)); if ((((_currentTrackingScale > 0.95)) && ((_targetTrackingScale > 0.95)))){ _currentTrackingScale = (_currentTrackingScale * 1.001); }; if (_currentTrackingScale > 1){ _currentTrackingScale = 1; }; _sOffset = (zoomScale - RenderManager.Instance.Canvas.scaleX); if (_sOffset < 0.001){ _sOffset = 0; }; RenderManager.Instance.Canvas.scaleX = _currentTrackingScale; RenderManager.Instance.Canvas.scaleY = _currentTrackingScale; RenderManager.Instance.Canvas.x = (0 - (((1000 - 700) / 2) * ((RenderManager.Instance.Canvas.scaleX - minScale) / minScaleDiff))); RenderManager.Instance.Canvas.y = (0 - (((643 - 450) / 2) * ((RenderManager.Instance.Canvas.scaleY - minScale) / minScaleDiff))); } public function createEnemyAmmo(inObj:AmmoBase):void{ addObject(inObj); _ammo.push(inObj); var dummyObj:SolidObject = new SolidObject(); dummyObj.x = inObj.x; dummyObj.y = inObj.y; dummyObj.vx = inObj.vx; dummyObj.vy = inObj.vy; inObj.setTargets(_physicsData.getCollisionTargetsByVelRay(dummyObj, 650, [RocketShip])); } public function get PlayerShip():RocketShip{ return (_playerRocket); } public function createAmmo(inObj:AmmoBase):void{ addObject(inObj); _ammo.push(inObj); inObj.setTargets(getAmmoCollidables(inObj)); } public function addExhaustParticle(sourceObj:RenderableObject):void{ var eParticle:ExhaustParticle = new ExhaustParticle(); eParticle.x = ((sourceObj.x + ((Math.random() * 16) - 8)) - sourceObj.vx); eParticle.y = ((sourceObj.y + ((Math.random() * 16) - 8)) - sourceObj.vy); eParticle.vx = (-(sourceObj.vx) * 0.1); eParticle.vy = (-(sourceObj.vy) * 0.1); addObject(eParticle); } public function addSmokePuff(inX:Number, inY:Number, inCount:Number=1, inSpread:Number=0):void{ var sp:SmokePuff; var i:int; while (i < inCount) { sp = new SmokePuff(); sp.x = (inX + ((Math.random() * inSpread) - (inSpread / 2))); sp.y = (inY + ((Math.random() * inSpread) - (inSpread / 2))); addObject(sp); i++; }; } public function generateMegaSplosion(sourceObj:RenderableObject):void{ var shrapVecVec:Object; var shrap:RocketShrapnel; var roidParticle:EnemyAmmoParticle; var pVec:Object; var i:int; while (i < 16) { shrapVecVec = MathFunction.getVector(((Math.random() * Math.PI) * 2), (1 + (Math.random() * 8))); shrap = new RocketShrapnel(); shrap.x = (sourceObj.x + ((Math.random() - 0.5) * 60)); shrap.y = (sourceObj.y + ((Math.random() - 0.5) * 60)); shrap.vx = shrapVecVec.x; shrap.vy = shrapVecVec.y; addObject(shrap); _physicsData.addSolidObject(shrap); roidParticle = new EnemyAmmoParticle(); pVec = MathFunction.getVector(((Math.random() * Math.PI) * 2), (5 + (Math.random() * 10))); roidParticle.x = (sourceObj.x + ((Math.random() * 5) - 2.5)); roidParticle.y = (sourceObj.y + ((Math.random() * 5) - 2.5)); roidParticle.vx = pVec.x; roidParticle.vy = pVec.y; addObject(roidParticle); if ((Math.abs(roidParticle.vx) + Math.abs(roidParticle.vy)) > 2.5){ roidParticle.LeaveSmoke = true; }; i++; }; } public static function get Instance():GameLevel{ return (_instance); } } }//package com.spaceAgent.engine.objectSpaces
Section 173
//EngineMain (com.spaceAgent.engine.EngineMain) package com.spaceAgent.engine { import flash.events.*; import com.spaceAgent.*; import flash.display.*; import com.psiom.*; import com.spaceAgent.sound.*; import com.psiom.engine.*; import com.spaceAgent.engine.objectSpaces.*; import com.spaceAgent.engine.gameObjects.*; import com.psiom.util.*; public class EngineMain extends EngineBase { private var _levelCompleteDisplay:MovieClip; private var _oldState:int;// = 0 private var _levelScore:Number;// = 0 private var _bonusTime:Number;// = 0 private var _initialized:Boolean;// = false private var _confirmationBox:MovieClip; private var _debugView:Boolean;// = false private var _levelLeadOut:Number;// = 115 private var _cursorOX:Number;// = 0 private var _cursorOY:Number;// = 0 private var _scoreBlip:MovieClip; private var _currentLevelFile:String; private var _mainMenuButton:BaseButton; private var _gameLevel:GameLevel; private var _levelNumDisplayTicks:Number;// = 0 private var _hud:MovieClip; private var _totalScore:Number;// = 0 private var _bonusScore:Number;// = 0 private var _totalPossibleScore:Number;// = 0 private var _gameplayLeadInTimer:Number;// = 87 private var _soundButton:MovieClip; private var _UILayer_gameplay:MovieClip; private var _levelNumDisplayBaseY:Number;// = 0 private var _initialSetup:Boolean;// = false private var _lastTimeDisplay:String; private var _cursorX:Number;// = 0 private var _cursorY:Number;// = 0 private var _hintTimer:Number;// = 200 private var _state:Number;// = 0 private var _playedOnce:Boolean;// = false private var _secondaryState:Number;// = 0 private var _scoreStack:Number;// = 0 private var _gameOverDisplay:MovieClip; private var _levelNumDisplay:MovieClip; private var _controlHint:MovieClip; private var _mainScore:MovieClip; private var _radarBlips:Array; private var _levelTime:int;// = 0 public static var STATE_GAMEOVER:int = 5; public static var STATE_LOADING:int = 4; public static var STATE_LEVELCOMPLETE:int = 3; public static var STATE_GAMEPLAY:int = 1; public static var STATE_INACTIVE:int = 0; private static var _instance:EngineMain; public static var STATE_PAUSED:int = 2; public function EngineMain(){ super(); _instance = this; _gameLevel = new GameLevel(); setRestState(); _radarBlips = new Array(); init(); } public function closeGame():void{ _state = EngineMain.STATE_INACTIVE; } public function init():void{ _initialized = true; _UILayer_gameplay = new MovieClip(); Main.Instance.EngineUI.addChild(_UILayer_gameplay); _mainMenuButton = new ui_mainMenuButton(); _UILayer_gameplay.addChild(_mainMenuButton); _mainMenuButton.x = 114; _mainMenuButton.y = 13; _mainMenuButton.cacheAsBitmap = true; _hud = new gClip_HUD(); _hud.x = 108; _hud.y = 386; _UILayer_gameplay.addChild(_hud); _hud.mouseEnabled = false; _hud.mouseChildren = false; _hud._fuelBar._warning.visible = false; _hud._healthBar._warning.visible = false; _levelCompleteDisplay = new ui_levelComplete(); _levelCompleteDisplay.x = 135; _levelCompleteDisplay.y = 175; _levelCompleteDisplay.alpha = 0; _levelCompleteDisplay.visible = false; _levelCompleteDisplay.mouseEnabled = false; _levelCompleteDisplay.mouseChildren = false; _UILayer_gameplay.addChild(_levelCompleteDisplay); _gameOverDisplay = new ui_gameOver(); _gameOverDisplay.x = 342; _gameOverDisplay.y = 220; _gameOverDisplay.alpha = 0; _gameOverDisplay.visible = false; _gameOverDisplay.mouseEnabled = false; _gameOverDisplay.mouseChildren = false; _UILayer_gameplay.addChild(_gameOverDisplay); _levelNumDisplay = new ui_roundNumber(); _levelNumDisplay.x = 335; _levelNumDisplayBaseY = 220; _levelNumDisplay.y = 220; _levelNumDisplay.gotoAndStop(1); _levelNumDisplay.alpha = 0; _levelNumDisplay.visible = false; _levelNumDisplay.mouseEnabled = false; _levelNumDisplay.mouseChildren = false; _UILayer_gameplay.addChild(_levelNumDisplay); _scoreBlip = new ui_scoreBlip(); _UILayer_gameplay.addChild(_scoreBlip); _confirmationBox = new uimain_confirmQuit(); _confirmationBox.visible = false; _UILayer_gameplay.addChild(_confirmationBox); _scoreBlip.x = 610; _scoreBlip.y = 25; _scoreBlip.visible = true; _scoreBlip.alpha = 0; _UILayer_gameplay.mouseEnabled = false; _currentCamera = new EngineCamera(Main.sceneWidth, Main.sceneHeight); _currentSpace = new ObjectSpace(); } public function get PlayerScore():Number{ return (_levelScore); } public function get ConfirmQuit():MovieClip{ return (_confirmationBox); } public function get huntLeadIn():Number{ return (_gameplayLeadInTimer); } public function get UILayer():MovieClip{ return (_UILayer_gameplay); } override public function clickInput(x:Number, y:Number):void{ _currentSpace.clickInput(x, y); if (_state == EngineMain.STATE_GAMEPLAY){ _cursorX = Main.Instance.mouseX; _cursorY = Main.Instance.mouseY; _cursorOX = EngineCamera.Instance.x; _cursorOY = EngineCamera.Instance.y; }; } private function setNextLevel():void{ LevelSelect.Instance.advanceLevel(); } public function generateRandomSeed(inArray:Array):void{ inArray = [Math.random(), Math.random(), Math.random(), Math.random(), Math.random(), Math.random(), Math.random(), Math.random(), Math.random(), Math.random()]; } public function get MainMenuButton():BaseButton{ return (_mainMenuButton); } public function addBonusScore(val:Number):void{ _bonusScore = (_bonusScore + val); } public function showQuitConfirmation():void{ _confirmationBox.visible = true; _oldState = _state; _state = STATE_PAUSED; } private function onHintClick(e:Event):void{ onSpacePressed(); } public function setLevelNumDisplay(yOffset:Number, scaleOffset:Number):void{ _levelNumDisplayTicks = 95; var lnumstr:String = String((LevelSelect.Instance.LevelNum + 1)); if (lnumstr.length < 2){ lnumstr = ("0" + lnumstr); }; _levelNumDisplay._num.text = lnumstr; _levelNumDisplay._nameField.text = LevelSelect.Instance.LevelName; _levelNumDisplay.y = (_levelNumDisplayBaseY + yOffset); } public function get huntLeadOut():Number{ return (_levelLeadOut); } public function reset():void{ _secondaryState = 0; _state = 0; } public function startNewLevel(filePath:String):void{ var blip:MovieClip; _confirmationBox.visible = false; var lnameOffsetY:Number = 0; var lnameOffsetScale:Number = 1; if (!Main.Instance.ShownControlHint){ _controlHint = new gClip_controlHint(); _controlHint.x = 352; _controlHint.y = 225; _UILayer_gameplay.addChild(_controlHint); _controlHint.mouseChildren = false; _controlHint.buttonMode = true; _controlHint.cacheAsBitmap = true; _controlHint.addEventListener(MouseEvent.CLICK, onHintClick); lnameOffsetY = -190; lnameOffsetScale = 0.85; }; _bonusTime = 25000; addToFinalPossibleScore(Math.round(((_bonusTime * 0.6) * (1 + (Number((LevelSelect.Instance.LevelNum * 4)) * 0.1))))); setLevelNumDisplay(lnameOffsetY, lnameOffsetScale); var i:int; while (i < _radarBlips.length) { blip = _radarBlips[i]; _hud._radar.removeChild(blip); i++; }; _radarBlips = new Array(); _hud._travellersField.text = ""; _hud._timeField.text = "00:00"; _levelCompleteDisplay.visible = false; _levelCompleteDisplay.alpha = 0; _gameOverDisplay.visible = false; _gameOverDisplay.alpha = 0; _levelTime = 0; _currentLevelFile = filePath; trace("SoundManager.Instance.setMusicLoop(1);"); SoundManager.Instance.setMusicLoop(1); _levelScore = 0; var lnum:int = (LevelSelect.Instance.LevelNum + 1); var lnumstr:String = String(lnum); if (lnumstr.length < 2){ lnumstr = ("0" + lnumstr); }; Main.Instance.ga_trackEvent("spacePioneer", ("level" + lnumstr), "start"); Main.Instance.ga_trackPageView((("spacePioneer/game/level" + lnumstr) + "/start")); _levelLeadOut = 115; _currentSpace.removeAllObjects(); _currentSpace = new GameLevel(); GameLevel.Instance.initLevel(filePath); GameLevel.Instance.GameLevelData.addEventListener("levelLoaded", onGameLevelLoaded); _state = EngineMain.STATE_LOADING; _gameplayLeadInTimer = 87; _playedOnce = true; } public function resetTotalScore():void{ trace("resetting total score"); _totalScore = 0; trace(("_hud: " + _hud)); _hud._scoreField.text = _totalScore; } public function get State():Number{ return (_state); } private function onGameLevelLoaded(e:Event):void{ _state = EngineMain.STATE_GAMEPLAY; } public function get Initialized():Boolean{ return (_initialized); } public function resumeGame():void{ _state = _oldState; _confirmationBox.visible = false; } public function setHudTimeDisplay(inTime:Number):void{ var ts:String = MathFunction.framesToTimeCode(41, inTime); if (_lastTimeDisplay != ts){ _lastTimeDisplay = ts; }; _hud._timeField.text = ts; } public function onSpacePressed():void{ if (_controlHint){ _controlHint.alpha = (_controlHint.alpha - 0.1); Main.Instance.releaseKeys(); Main.Instance.StageRef.stageFocusRect = false; Main.Instance.StageRef.focus = Main.Instance; }; } public function gameover():void{ trace("@@@ EngineMain > GAMEOVER"); _state = EngineMain.STATE_GAMEOVER; } override public function update():void{ var blip:MovieClip; var i:int; var sd:Spacedude; var sDist:Number; var sRad:Number; var blipVec:Object; super.update(); if (_gameplayLeadInTimer >= 0){ _gameplayLeadInTimer--; }; if (_controlHint){ if (_controlHint.alpha < 1){ _controlHint.alpha = (_controlHint.alpha * 0.9); }; if (_controlHint.alpha < 0.02){ _controlHint.visible = false; _UILayer_gameplay.removeChild(_controlHint); Main.Instance.controlHintDone(); _controlHint = null; }; }; _hud._fuelBar.gotoAndStop(Math.floor((GameLevel.Instance.ShipFuelP * 100))); _hud._healthBar.gotoAndStop(Math.floor((GameLevel.Instance.ShipHealthP * 100))); if (GameLevel.Instance.ShipHealthP < 0.2){ _hud._healthBar._warning.gotoAndPlay((_hud._healthBar._warning.currentFrame + 1)); if (_hud._healthBar._warning.currentFrame > (_hud._healthBar._warning.totalFrames - 2)){ _hud._healthBar._warning.gotoAndPlay(1); }; _hud._healthBar._warning.alpha = (_hud._healthBar._warning.alpha + ((1 - _hud._healthBar._warning.alpha) * 0.1)); _hud._healthBar._warning.visible = true; } else { _hud._healthBar._warning.alpha = (_hud._healthBar._warning.alpha * 0.9); if (_hud._healthBar._warning.alpha < 0.05){ _hud._healthBar._warning.visible = false; }; }; if (GameLevel.Instance.ShipFuelP < 0.2){ _hud._fuelBar._warning.gotoAndPlay((_hud._fuelBar._warning.currentFrame + 1)); if (_hud._fuelBar._warning.currentFrame > (_hud._fuelBar._warning.totalFrames - 2)){ _hud._fuelBar._warning.gotoAndPlay(1); }; _hud._fuelBar._warning.alpha = (_hud._fuelBar._warning.alpha + ((1 - _hud._fuelBar._warning.alpha) * 0.1)); _hud._fuelBar._warning.visible = true; } else { _hud._fuelBar._warning.alpha = (_hud._fuelBar._warning.alpha * 0.9); if (_hud._fuelBar._warning.alpha < 0.05){ _hud._fuelBar._warning.visible = false; }; }; if (GameLevel.Instance.PlayerShip){ _hud._hudPointer.rotation = MathFunction.radiansToDegrees(GameLevel.Instance.PlayerShip.r); i = 0; while (i < GameLevel.Instance.Spacedudes.length) { sd = GameLevel.Instance.Spacedudes[i]; if (!sd.RadarBlipRef){ blip = new gClip_radarBlip(); sd.RadarBlipRef = blip; _hud._radar.addChild(blip); _radarBlips.push(blip); } else { blip = sd.RadarBlipRef; if (blip.visible){ sDist = MathFunction.getDistance(GameLevel.Instance.PlayerShip.x, GameLevel.Instance.PlayerShip.y, sd.x, sd.y); sRad = MathFunction.getRadians(GameLevel.Instance.PlayerShip.x, GameLevel.Instance.PlayerShip.y, sd.x, sd.y); sDist = (sDist * 0.035); if (sDist > 38){ sDist = 38; }; blipVec = MathFunction.getVector(sRad, sDist); blip.x = blipVec.x; blip.y = blipVec.y; }; }; i++; }; }; if (_state == EngineMain.STATE_LEVELCOMPLETE){ _levelCompleteDisplay.alpha = (_levelCompleteDisplay.alpha + ((1 - _levelCompleteDisplay.alpha) * 0.2)); if (_levelCompleteDisplay.alpha > 0.98){ _levelCompleteDisplay.alpha = 1; }; _levelLeadOut--; if (_levelLeadOut < 0){ setNextLevel(); }; } else { _levelCompleteDisplay.alpha = (_levelCompleteDisplay.alpha * 0.9); }; if (_levelCompleteDisplay.alpha < 0.02){ _levelCompleteDisplay.visible = false; } else { _levelCompleteDisplay.visible = true; }; if (_state == EngineMain.STATE_GAMEOVER){ _levelLeadOut--; if (_levelLeadOut < 0){ closeGame(); Main.Instance.gameover(); }; _gameOverDisplay.alpha = (_gameOverDisplay.alpha + ((1 - _gameOverDisplay.alpha) * 0.2)); if (_gameOverDisplay.alpha > 0.98){ _gameOverDisplay.alpha = 1; }; } else { _gameOverDisplay.alpha = (_gameOverDisplay.alpha * 0.9); }; if (_gameOverDisplay.alpha < 0.02){ _gameOverDisplay.visible = false; } else { _gameOverDisplay.visible = true; }; if ((((((_state == EngineMain.STATE_GAMEPLAY)) || ((_state == EngineMain.STATE_GAMEOVER)))) || ((_state == EngineMain.STATE_LEVELCOMPLETE)))){ if (_bonusTime > 0){ _bonusTime--; }; _currentSpace.update(); _levelTime++; setHudTimeDisplay(_levelTime); }; _levelNumDisplayTicks--; if (_levelNumDisplayTicks > 40){ _levelNumDisplay.scaleX = 1; } else { if (_levelNumDisplay.scaleX > 0){ _levelNumDisplay.scaleX = (_levelNumDisplay.scaleX - 0.0002); }; _levelNumDisplay.scaleX = (_levelNumDisplay.scaleX * (1 - ((1 - _levelNumDisplay.scaleX) * 0.5))); }; if (_levelNumDisplayTicks > 20){ _levelNumDisplay.alpha = 1; } else { _levelNumDisplay.alpha = (_levelNumDisplay.alpha * 0.9); }; if (_levelNumDisplayTicks < 0){ _levelNumDisplay.alpha = 0; _levelNumDisplay.visible = false; } else { _levelNumDisplay.visible = true; }; _levelNumDisplay.scaleY = _levelNumDisplay.scaleX; if (_scoreBlip._base.currentFrame < (_scoreBlip._base.totalFrames - 1)){ _scoreBlip._base.gotoAndStop((_scoreBlip._base.currentFrame + 1)); }; if (_scoreBlip._base.currentFrame > 20){ _scoreBlip.alpha = (_scoreBlip.alpha * 0.94); _scoreBlip.scaleX = (_scoreBlip.scaleX * 0.94); _scoreBlip.scaleY = (_scoreBlip.scaleY * 0.94); }; if (_scoreBlip.alpha < 0.75){ _scoreStack = 0; }; if (_scoreBlip.alpha < 0.1){ _scoreBlip.visible = false; _scoreBlip._base.gotoAndStop(0); }; } public function triggerScoreBlip(val:Number):void{ val = Math.round(val); _levelScore = (_levelScore + val); _totalScore = (_totalScore + val); _scoreStack = (_scoreStack + val); _scoreBlip.visible = true; _scoreBlip._points.text = ("+" + String(_scoreStack)); _scoreBlip.alpha = 1; _scoreBlip.scaleX = 1; _scoreBlip.scaleY = 1; _hud._scoreField.text = _totalScore; _scoreBlip._base.gotoAndStop(0); } public function setHudTravellersDisplay(inPending:Number, inTotal:Number):void{ _hud._travellersField.text = ((String(inPending) + " / ") + String(inTotal)); } public function get FinalScore():Number{ return (Math.floor(_totalScore)); } public function levelComplete():void{ var bonusScore:Number; var lname:String; if (_state != EngineMain.STATE_LEVELCOMPLETE){ _levelLeadOut = 210; _state = EngineMain.STATE_LEVELCOMPLETE; bonusScore = Math.round((_bonusTime * (1 + (Number((LevelSelect.Instance.LevelNum * 4)) * 0.1)))); _totalScore = (_totalScore + bonusScore); _levelScore = (_levelScore + bonusScore); lname = _currentLevelFile.substr(0, (_currentLevelFile.length - 4)); lname = lname.substr(7, _currentLevelFile.length); Main.Instance.checkAndSetLevelBest(lname, _levelScore); Main.Instance.setUnlockLevel((LevelSelect.Instance.LevelNum + 1)); trace("EngineMain > levelComplete"); Main.Instance.trackLevelComplete((LevelSelect.Instance.LevelNum + 1)); _levelCompleteDisplay._levelScore.text = MathFunction.formatNumberStringWithCommas(_levelScore); _levelCompleteDisplay._totalScore.text = MathFunction.formatNumberStringWithCommas(_totalScore); _levelCompleteDisplay._levelTime.text = MathFunction.framesToTimeCode(41, _levelTime); _levelCompleteDisplay._levelBonus.text = MathFunction.formatNumberStringWithCommas(bonusScore); _hud._scoreField.text = _totalScore; SoundManager.Instance.playSoundID(SoundManager.SND_WIN, 0.75); }; } public function set State(inState:Number):void{ _state = inState; } public function addToFinalPossibleScore(inVal:Number):void{ _totalPossibleScore = (_totalPossibleScore + inVal); } public function setRestState():void{ _state = EngineMain.STATE_INACTIVE; } public function get FinalPossibleScore():Number{ return (_totalPossibleScore); } public static function get Instance():EngineMain{ return (_instance); } } }//package com.spaceAgent.engine
Section 174
//SoundManager (com.spaceAgent.sound.SoundManager) package com.spaceAgent.sound { import flash.media.*; import com.psiom.engine.gameObject.*; public class SoundManager { private var _ambienceEffects:Array; private var _frameID:int;// = 0 private var _musicLoop:Sound; private var _loops:Array; private var _volume:Number;// = 1 private var _musicChannel:SoundChannel; public static var DTHRESH_BALOON:Number = 1000; public static var SND_LOWFUEL:int; public static var AMB_SPACE:int = 4; public static var SND_GAMEOVER:int; private static var _instance:SoundManager; public static var SND_SMALLHIT2:int; public static var SND_SMALLHIT3:int; public static var SND_SMALLHIT4:int; public static var SND_SMALLHIT5:int; public static var SND_COLLECT:int; public static var SND_DIAMONDROIDSPLODE1:int; public static var SND_DIAMONDROIDSPLODE2:int; public static var SND_ASTEROIDSPLODE1:int; public static var SND_ASTEROIDSPLODE2:int; public static var SND_LOWHEALTH:int; private static var _forcedSoundDelays:Array; public static var SND_ENEMYFIRE:int; public static var AMB_THRUST:int = 0; public static var SND_LASER:int; public static var SND_CLANKMEDIUM1:int; public static var SND_CLANKMEDIUM3:int; public static var SND_CLANKMEDIUM2:int; public static var SND_CLANKMEDIUM4:int; public static var SND_SHIPTHRUST:int; public static var AMB_PLANE:int = 3; public static var SND_LASERBEAM2:int; public static var SND_TRACTORBEAM:int; public static var SND_SHIPBOOM:int; public static var SND_SMALLHIT:int; public static var SND_LASERBEAM:int; public static var DTHRESH_SPACE:Number = 2500; public static var SND_CLANKHEAVY1:int; public static var SND_CLANKHEAVY3:int; public static var AMB_BALLOON:int = 1; public static var SND_CLANKHEAVY2:int; public static var SND_ALIENSPLODE:int; public static var DTHRESH_UFO:Number = 500; public static var SND_POISONBUBBLE1:int; public static var SND_POISONBUBBLE2:int; public static var SND_POISONBUBBLE3:int; public static var AMB_UFO:int = 2; public static var DTHRESH_PLANE:Number = 700; private static var _sfx:Array; public static var SND_WIN:int; public static var SND_TENTACLEEMERGE1:int; public static var SND_TENTACLEEMERGE2:int; public static var SND_TENTACLEEMERGE3:int; public static var SND_TENTACLEEMERGE4:int; public static var SND_COMBUST:int; public static var SND_METAL1:int; public static var SND_METAL2:int; public static var SND_METAL3:int; public static var SND_METAL4:int; private static var _currentSoundIndex:int = 0; public static var SND_CLANKLIGHT1:int; public static var SND_CLANKLIGHT2:int; public static var SND_CLANKLIGHT3:int; public static var DTHRESH_TREE:Number = 660; public function SoundManager(){ _ambienceEffects = [{LifeSpan:0, Sound:new Thrust_1(), Channel:new SoundChannel(), Trans:new SoundTransform(), Distance:10000, VMod:1, LastObj:null, DThresh:0}]; super(); _instance = this; _loops = new Array(); _sfx = new Array(); _forcedSoundDelays = new Array(); SND_COLLECT = prepSound(new snd_collect(), 3); SND_WIN = prepSound(new win4(), 3); SND_ALIENSPLODE = prepSound(new alienSplode(), 3); SND_SHIPBOOM = prepSound(new shipBoom(), 3); SND_SHIPTHRUST = prepSound(new shipthrust(), 3); SND_ASTEROIDSPLODE1 = prepSound(new asteroidSplode(), 3); SND_ASTEROIDSPLODE2 = prepSound(new asteroidSplode2(), 3); SND_DIAMONDROIDSPLODE1 = prepSound(new diamondRoidSplode1(), 3); SND_DIAMONDROIDSPLODE2 = prepSound(new diamondRoidSplode2(), 3); SND_ENEMYFIRE = prepSound(new laser2(), 3); SND_LASER = prepSound(new enemyFire_00(), 0); SND_LASERBEAM = prepSound(new swarm_gun_07(), 3); SND_LASERBEAM2 = prepSound(new swarm_gun_08(), 3); SND_TRACTORBEAM = prepSound(new tractorBeam(), 3); SND_TENTACLEEMERGE1 = prepSound(new tentacle1(), 20); SND_TENTACLEEMERGE2 = prepSound(new tentacle2(), 20); SND_TENTACLEEMERGE3 = prepSound(new tentacle3(), 20); SND_TENTACLEEMERGE4 = prepSound(new tentacle4(), 20); SND_GAMEOVER = prepSound(new gameover(), 3); SND_LOWFUEL = prepSound(new lowFuel(), 3); SND_LOWHEALTH = prepSound(new lowHealth(), 3); SND_COMBUST = prepSound(new combust(), 3); SND_POISONBUBBLE1 = prepSound(new bubble1(), 3); SND_POISONBUBBLE2 = prepSound(new bubble2(), 3); SND_POISONBUBBLE3 = prepSound(new bubble3(), 3); SND_CLANKHEAVY1 = prepSound(new heavyMetalThud1(), 6); SND_CLANKHEAVY2 = prepSound(new heavyMetalThud2(), 6); SND_CLANKHEAVY3 = prepSound(new heavyMetalThud3(), 6); SND_CLANKMEDIUM1 = prepSound(new mediumMetalThud1(), 6); SND_CLANKMEDIUM2 = prepSound(new mediumMetalThud2(), 6); SND_CLANKMEDIUM3 = prepSound(new mediumMetalThud3(), 6); SND_CLANKMEDIUM4 = prepSound(new mediumMetalThud4(), 6); SND_CLANKLIGHT1 = prepSound(new lightMetalThud1(), 6); SND_CLANKLIGHT2 = prepSound(new lightMetalthud2(), 6); SND_CLANKLIGHT3 = prepSound(new lightMetalThud3(), 6); SND_METAL1 = prepSound(new metal1(), 6); SND_METAL2 = prepSound(new metal2(), 6); SND_METAL3 = prepSound(new metal3(), 6); SND_METAL4 = prepSound(new metal4(), 6); SND_SMALLHIT = prepSound(new smallHit(), 3); SND_SMALLHIT2 = prepSound(new snd_smallHit2(), 3); SND_SMALLHIT3 = prepSound(new snd_smallhit3(), 3); SND_SMALLHIT4 = prepSound(new snd_smallhit4(), 3); SND_SMALLHIT5 = prepSound(new snd_smallhit5(), 3); } public function fullReset():void{ var i:int; while (i < _ambienceEffects.length) { _ambienceEffects[i].Trans.volume = 0; _ambienceEffects[i].LifeSpan = -1; if (_ambienceEffects[i].Channel){ _ambienceEffects[i].Channel.stop(); _ambienceEffects[i].Channel = null; }; i++; }; } public function iterate():void{ var sndtrns:SoundTransform; var i:int; i = 0; while (i < _ambienceEffects.length) { if ((((_ambienceEffects[i].Trans.volume >= 0.05)) && (_ambienceEffects[i].Channel))){ _ambienceEffects[i].Channel.soundTransform = _ambienceEffects[i].Trans; } else { _ambienceEffects[i].Trans.volume = 0; if (_ambienceEffects[i].Channel){ _ambienceEffects[i].Channel.stop(); _ambienceEffects[i].Channel = null; }; }; if (_volume == 0){ _ambienceEffects[i].Trans.volume = 0; }; i++; }; i = 0; while (i < _forcedSoundDelays.length) { if (_forcedSoundDelays[i].Current > 0){ _forcedSoundDelays[i].Current--; }; i++; }; _frameID++; } public function setMusicLoop(id:int=0):void{ trace("### SoundManager: setMusicLoop method disabled"); if (_musicChannel){ _musicChannel.stop(); }; var vMod2:Number = 1; if (id == 0){ _musicLoop = new menuloop(); vMod2 = 0.5; } else { _musicLoop = new gameloop(); }; var sndtrns:SoundTransform = new SoundTransform(); sndtrns.volume = ((0.2 * _volume) * vMod2); _musicChannel = _musicLoop.play(0, int.MAX_VALUE, sndtrns); } public function triggerAmbience(id:int, inPan:Number, sourceObj:RenderableObject, volumeMod:Number=1):void{ _ambienceEffects[id].LastObj = sourceObj; _ambienceEffects[id].Pan = inPan; if (_ambienceEffects[id].Pan < -1){ _ambienceEffects[id].Pan = -1; }; if (_ambienceEffects[id].Pan > 1){ _ambienceEffects[id].Pan = 1; }; if (_ambienceEffects[id].Trans.volume < 0.05){ if (_ambienceEffects[id].Channel){ _ambienceEffects[id].Channel.stop(); _ambienceEffects[id].Trans.volume = (0.06 * volumeMod); }; _ambienceEffects[id].Channel = _ambienceEffects[id].Sound.play(0, int.MAX_VALUE, _ambienceEffects[id].Trans); }; _ambienceEffects[id].Trans.volume = (_ambienceEffects[id].Trans.volume + ((((_ambienceEffects[id].VMod * _volume) - _ambienceEffects[id].Trans.volume) * 0.25) * volumeMod)); _ambienceEffects[id].Trans.pan = _ambienceEffects[id].Pan; } public function playSoundID(id:Number, vmod:Number=-1, loop:Boolean=false):void{ var sndtrns:SoundTransform; var snd:Sound; var loopcount:int; var chan:SoundChannel; if (_forcedSoundDelays[id].Current <= 0){ sndtrns = new SoundTransform(); sndtrns.volume = _volume; _forcedSoundDelays[id].Current = _forcedSoundDelays[id].Base; if ((((vmod > 0)) && ((vmod <= 1)))){ sndtrns.volume = (sndtrns.volume * vmod); }; snd = _sfx[id]; loopcount = 0; if (loop){ loopcount = int.MAX_VALUE; chan = snd.play(0, loopcount, sndtrns); _loops.push({SNDCHAN:chan, ID:id}); } else { snd.play(0, loopcount, sndtrns); }; }; } public function setVolume(val:int):void{ trace(("setting volume to: " + val)); _volume = val; var sndtrns:SoundTransform = new SoundTransform(); sndtrns.volume = _volume; var musicVol:SoundTransform = new SoundTransform(); musicVol.volume = (_volume * 0.2); if (_musicChannel){ _musicChannel.soundTransform = musicVol; }; } public function endLoopByID(id:Number):void{ var i:int; while (i < _loops.length) { if (_loops[i].ID == id){ if (_loops[i].SNDCHAN){ _loops[i].SNDCHAN.stop(); } else { trace("### WARNING: cannot stop loop, SNDCHAN is null"); }; }; i++; }; } public static function get Instance():SoundManager{ return (_instance); } public static function prepSound(soundObj:Sound, dVal:int=0):int{ _sfx.push(soundObj); _forcedSoundDelays.push({Base:dVal, Current:0}); _currentSoundIndex++; return ((_currentSoundIndex - 1)); } } }//package com.spaceAgent.sound
Section 175
//Constants (com.spaceAgent.Constants) package com.spaceAgent { public class Constants { public static var BASE_URL:String = "http://games.seek.com.au/spacerescue/"; public function Constants(){ super(); } public static function get MaxShipVel():Number{ return (11.5); } } }//package com.spaceAgent
Section 176
//LeaderBoard (com.spaceAgent.LeaderBoard) package com.spaceAgent { import flash.events.*; import flash.display.*; import com.psiom.*; import flash.net.*; public class LeaderBoard extends BaseElement { private var _pageIndex:Number;// = 0 public var _row10:MovieClip; public var _row01:MovieClip; public var _row02:MovieClip; public var _row03:MovieClip; public var _row04:MovieClip; public var _row05:MovieClip; public var _row06:MovieClip; public var _row08:MovieClip; public var _right:MovieClip; public var _left:MovieClip; public var _row07:MovieClip; public var _row09:MovieClip; private var _scoreData:XML; private var _entryList:Array; private var _rows:Array; public function LeaderBoard(){ super(); _rows = [_row01, _row02, _row03, _row04, _row05, _row06, _row07, _row08, _row09, _row10]; var i:int; while (i < _rows.length) { _rows[i].visible = false; _rows[i]._flag.gotoAndStop(1); i++; }; _left.visible = false; _left.addEventListener(MouseEvent.CLICK, onLeft); _right.addEventListener(MouseEvent.CLICK, onRight); } private function onXMLLoad(e:Event):void{ var e = e; _scoreData = new XML(URLLoader(e.target).data); trace("scores loaded"); //unresolved jump var _slot1 = e; trace("error loading"); onParseError(_slot1); parseXML(); } private function onLeft(event:Event):void{ _right.visible = true; _pageIndex--; setScoresDisplay(); } private function parseXML():void{ var i:int; var hsr:MovieClip; var entry:Object; _entryList = new Array(); trace("updating display"); var scoreList:XMLList = _scoreData.entry; for each (entry in scoreList) { _entryList.push({Name:unescape(entry.@pname.toString()), Score:entry.@score.toString(), Country:entry.@miscellaneous1.toString()}); trace(("entry.@score.toString(): " + entry.@score.toString())); trace(("entry.@miscellaneous4.toString(): " + entry.@miscellaneous4.toString())); trace(("entry.@miscellaneous5.toString(): " + entry.@miscellaneous5.toString())); trace("---"); }; setScoresDisplay(); } private function onParseError(e:TypeError):void{ trace(e.toString()); } private function onReadError(e:ErrorEvent):void{ trace(((e.type + ": ") + e.text)); } public function loadScores():void{ var u:URLRequest; var vars:URLVariables; var nocache:uint; _pageIndex = 0; trace("load scores"); var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE, onXMLLoad); loader.addEventListener(IOErrorEvent.IO_ERROR, onReadError); loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onReadError); u = new URLRequest("http://stats.soap.com.au/highscore/highscoreXML.php"); nocache = uint((Math.random() * uint.MAX_VALUE)); vars = new URLVariables(); vars["gameid"] = 44; vars["start"] = 0; vars["count"] = 101; vars["nocache"] = nocache.toString(36); u.method = URLRequestMethod.GET; u.data = vars; loader.load(u); } private function setScoresDisplay():void{ var j:Number; var k:Number; var fieldPieces:Array; var finalScore:String; var d:Number; _right.visible = true; if (_pageIndex >= 9){ _pageIndex = 9; _right.visible = false; }; if (_pageIndex <= 0){ _pageIndex = 0; _left.visible = false; }; var i:int; while (i < 10) { j = (i + (_pageIndex * 10)); if (_entryList){ if (_entryList[j]){ _rows[i]._nameField.text = _entryList[j].Name.substr(0, 16); if (_entryList[j].Country == "AU"){ _rows[i]._flag.gotoAndStop(1); } else { _rows[i]._flag.gotoAndStop(2); }; fieldPieces = _entryList[j].Score.split(""); fieldPieces.reverse(); finalScore = ""; k = 0; while (k < fieldPieces.length) { finalScore = (fieldPieces[k] + finalScore); d = (k % 3); if (k < (fieldPieces.length - 1)){ if (d == 2){ finalScore = ("," + finalScore); }; }; k++; }; _rows[i]._scoreField.text = finalScore; _rows[i]._rankField.text = String((j + 1)); _rows[i].visible = true; } else { _rows[i].visible = false; }; } else { _rows[i].visible = false; }; i++; }; } private function onRight(event:Event):void{ _left.visible = true; _pageIndex++; setScoresDisplay(); } } }//package com.spaceAgent
Section 177
//LevelSelect (com.spaceAgent.LevelSelect) package com.spaceAgent { import flash.events.*; import flash.display.*; import com.psiom.*; import com.psiom.util.*; import flash.text.*; public class LevelSelect extends BaseElement { private var _levelList:Array; private var _pageIndex:Number;// = 0 private var _levelScores:Array; public var _right:MovieClip; public var _levelType:TextField; public var _left:MovieClip; public var _ls01:MovieClip; public var _ls02:MovieClip; public var _ls03:MovieClip; public var _ls04:MovieClip; public var _ls05:MovieClip; public var _ls06:MovieClip; private var _currentLevel:int;// = -1 private var _levelTypeDescriptions:Array; private static var _instance:LevelSelect; public function LevelSelect(){ _levelTypeDescriptions = ["BEGINNER MISSIONS", "INTERMEDIATE MISSIONS", "CHALLENGING MISSIONS", "HARD MISSIONS", "VETERAN MISSIONS"]; super(); _instance = this; _levelScores = new Array(); _levelList = ["sp_pilot_training_i.xml", "sp_pilot_training_ii.xml", "sp_first_run.xml", "sp_rookie_tunnel_i.xml", "sp_stellar_novice.xml", "sp_rookie_tunnel_ii.xml", "sp_meteroidz.xml", "sp_medium_bang.xml", "sp_spacehopper.xml", "sp_clustercuss.xml", "sp_space_frontier.xml", "sp_descent.xml", "sp_clover.xml", "sp_crop_circles.xml", "sp_asteroid_grid.xml", "sp_laser_slalom.xml", "sp_the_shell.xml", "sp_solar_fossil.xml", "sp_dark_orbit.xml", "sp_hexapod.xml", "sp_hostage.xml", "sp_octoroid.xml", "sp_gridlocked.xml", "sp_cosmic_circuit.xml", "sp_badlands.xml", "sp_circular.xml", "sp_junkyard_X4-9.xml", "sp_gamma_complex.xml", "sp_stronghold.xml", "sp_doom_cactus.xml"]; _left.addEventListener(MouseEvent.CLICK, onLeft); _right.addEventListener(MouseEvent.CLICK, onRight); _ls01.addEventListener(MouseEvent.CLICK, on01Click); _ls02.addEventListener(MouseEvent.CLICK, on02Click); _ls03.addEventListener(MouseEvent.CLICK, on03Click); _ls04.addEventListener(MouseEvent.CLICK, on04Click); _ls05.addEventListener(MouseEvent.CLICK, on05Click); _ls06.addEventListener(MouseEvent.CLICK, on06Click); _ls01._levelNum.mouseEnabled = false; _ls02._levelNum.mouseEnabled = false; _ls03._levelNum.mouseEnabled = false; _ls04._levelNum.mouseEnabled = false; _ls05._levelNum.mouseEnabled = false; _ls06._levelNum.mouseEnabled = false; _ls01._bg.gotoAndStop(1); _ls02._bg.gotoAndStop(1); _ls03._bg.gotoAndStop(1); _ls04._bg.gotoAndStop(1); _ls05._bg.gotoAndStop(1); _ls06._bg.gotoAndStop(1); _ls01._lock.gotoAndStop(1); _ls02._lock.gotoAndStop(1); _ls03._lock.gotoAndStop(1); _ls04._lock.gotoAndStop(1); _ls05._lock.gotoAndStop(1); _ls06._lock.gotoAndStop(1); } public function get BestScores():Array{ return (_levelScores); } public function get LevelNum():int{ return (_currentLevel); } public function set BestScores(inVal:Array):void{ _levelScores = inVal.slice(); } private function on05Click(e:Event):void{ var lnum:int = ((_pageIndex * 6) + 4); if (!_ls05._lock.visible){ selectLevel(_levelList[lnum], lnum); } else { _ls05._lock.gotoAndPlay(2); }; } public function get LevelName():String{ return (generateNameString(_levelList[LevelNum])); } public function generateNameString(inFilename:String):String{ var n:int; if (inFilename == "test.xml"){ return ("TEST"); }; var nameString:String = inFilename; nameString = nameString.substr(0, (nameString.length - 4)); nameString = nameString.substr(3, (nameString.length - 3)); nameString = nameString.toLocaleUpperCase(); var nameSplit:Array = nameString.split("_"); if (nameSplit.length > 1){ nameString = ""; n = 0; while (n < nameSplit.length) { if (n > 0){ nameString = (nameString + (" " + nameSplit[n])); } else { nameString = (nameString + nameSplit[n]); }; n++; }; }; return (nameString); } public function advanceLevel():void{ _currentLevel++; if (_currentLevel <= (_levelList.length - 1)){ selectLevel(_levelList[_currentLevel], _currentLevel); } else { trace("ALL LEVELS COMPLETE"); Main.Instance.allLevelsComplete(); }; } private function on01Click(e:Event):void{ var lnum:int = ((_pageIndex * 6) + 0); if (!_ls01._lock.visible){ selectLevel(_levelList[lnum], lnum); } else { _ls01._lock.gotoAndPlay(2); }; } private function on03Click(e:Event):void{ var lnum:int = ((_pageIndex * 6) + 2); if (!_ls03._lock.visible){ selectLevel(_levelList[lnum], lnum); } else { _ls03._lock.gotoAndPlay(2); }; } public function get LevelList():Array{ return (_levelList); } private function on06Click(e:Event):void{ var lnum:int = ((_pageIndex * 6) + 5); if (!_ls06._lock.visible){ selectLevel(_levelList[lnum], lnum); } else { _ls06._lock.gotoAndPlay(2); }; } public function setLevelNum(inVal:int):void{ trace("@@@ WARNING: natural level progression order has been altered"); _currentLevel = inVal; } private function on04Click(e:Event):void{ var lnum:int = ((_pageIndex * 6) + 3); if (!_ls04._lock.visible){ selectLevel(_levelList[lnum], lnum); } else { _ls04._lock.gotoAndPlay(2); }; } private function on02Click(e:Event):void{ var lnum:int = ((_pageIndex * 6) + 1); if (!_ls02._lock.visible){ selectLevel(_levelList[lnum], lnum); } else { _ls02._lock.gotoAndPlay(2); }; } private function selectLevel(fileName:String, levelNum:int):void{ _currentLevel = levelNum; Main.Instance.launchLevel(("levels/" + fileName)); } public function setSelectDisplay():void{ var ldis:String; var lsBtn:MovieClip; var maxPage:int = Math.floor(((_levelList.length - 1) / 6)); _right.visible = true; if (_pageIndex >= maxPage){ _pageIndex = maxPage; _right.visible = false; }; if (_pageIndex <= 0){ _pageIndex = 0; _left.visible = false; }; _levelType.text = _levelTypeDescriptions[_pageIndex]; var unlockLevel:int = Main.Instance.getUnlockLevel(); var lBtns:Array = [_ls01, _ls02, _ls03, _ls04, _ls05, _ls06]; var j:int; while (j < lBtns.length) { lsBtn = lBtns[j]; if (_levelList.length > ((_pageIndex * 6) + j)){ lsBtn.visible = true; ldis = String(((_pageIndex * 6) + (j + 1))); if (ldis.length < 2){ ldis = ("0" + ldis); }; lsBtn._levelNum.text = ldis; lsBtn._levelName.text = generateNameString(_levelList[((_pageIndex * 6) + j)]); lsBtn._lock.visible = false; lsBtn._bestScore.text = MathFunction.formatNumberStringWithCommas(_levelScores[((_pageIndex * 6) + j)]); if (lsBtn._bestScore.text == "0"){ lsBtn._bg.gotoAndStop(2); } else { lsBtn._bg.gotoAndStop(1); }; } else { lsBtn.visible = false; }; j++; }; } private function onRight(event:Event):void{ _left.visible = true; _pageIndex++; setSelectDisplay(); } private function onLeft(event:Event):void{ _right.visible = true; _pageIndex--; setSelectDisplay(); } public static function get Instance():LevelSelect{ return (_instance); } } }//package com.spaceAgent
Section 178
//Main (com.spaceAgent.Main) package com.spaceAgent { import flash.events.*; import flash.display.*; import com.psiom.*; import com.spaceAgent.sound.*; import com.spaceAgent.engine.*; import com.spaceAgent.engine.objectSpaces.*; import com.psiom.graphics.*; import flash.geom.*; import com.google.analytics.*; import com.psiom.util.*; import flash.utils.*; import flash.net.*; import flash.system.*; import flash.ui.*; public class Main extends MovieClip { private var _keyBuffer:Number; private var _uiNavBar:uimain_navBar; private var _uiJobOp:uimain_jobOp; private var _shownControlHint:int;// = 0 private var _uiFlags:uimain_flags; private var _dossierDelayLength:Number;// = 100 private var _uiSoundBtn:BaseButton; private var _uiGameSummary:uimain_gamesummary; private var _uiLoader:uimain_loader; private var _uiSubmitScore:uimain_submitscore; private var _uiBgGradient:uimain_bggradient; private var _mainMouseDown:Boolean;// = false private var R_AUS:int;// = 0 private var PAR_SCORE:Number;// = 1000000 private var _renderManager:RenderManager; private var _gigyaLoader:Loader; private var _keyBufferMax:Number;// = 21 private var _gameplayVModeBitMask:String; private var _uiElements:Array; private var _regionMode:int;// = 0 private var _cheatActivationDisplay:MovieClip; private var _uiLeaderboard:uimain_leaderboard; private var _dossierDelayTicks:Number;// = 0 private var _engine:EngineMain; private var cfg:Object; private var _uiLevelSelect:uimain_levelSelect; private var _gaTracker:GATracker; private var _uiSeekLogoCorner:BaseButton; private var _mainNavStarted:Boolean;// = false private var _upgradeHintTimer:Number;// = 0 private var _uiBase:uimain_base; private var _submitting:Boolean;// = false private var _hintedOnce:Boolean;// = false private var _introLeadInTicks:Number;// = 0 private var _trackingRegion:String;// = "other" private var _introLength:Number;// = 75 private var _uiLeadIn:uimain_leadin; private var _engineUI:MovieClip; private var _uiIntroScreen:uimain_introscreen; private var _gameplayLayer:BaseElement; private var _spacePioneerSO:SharedObjectWrapper; private var _keyString:String; private var _vModeID:String; private var R_NZ:int;// = 1 private var _autoPlay:Boolean;// = false public var mcWF:MovieClip; private var _uiHowToPlay2:uimain_howtoplay2; private var _uiCredits:uimain_credits; private var _uiHowToPlay1:uimain_howtoplay1; private var _uiHowToPlay3:uimain_howtoplay3; private var _gameTimer:Timer; public var wfAlreadyLoaded:Boolean;// = false private static var CHEATSENABLED:int = 0; private static var _instance:Main; public function Main(){ super(); _instance = this; _keyString = ""; _keyBuffer = 0; _spacePioneerSO = new SharedObjectWrapper(); _spacePioneerSO.init("seek_spacePioneer", "/"); scrollRect = new Rectangle(0, 0, 700, 450); addEventListener("enterFrame", onMainEnterFrame); new SoundManager(); addEventListener(Event.ADDED_TO_STAGE, onMainAdded); _gameTimer = new Timer(1000, Number.POSITIVE_INFINITY); _uiBgGradient = new uimain_bggradient(); _uiFlags = new uimain_flags(); _uiFlags.centerX(); _uiFlags.centerY(); _uiFlags.FadeSpeed = 0.25; _uiFlags.FadeUpDelay = 20; registerNavButton(_uiFlags._ausFlag, UIVModes.MainBlank, setRegionAus); registerNavButton(_uiFlags._nzFlag, UIVModes.MainBlank, setRegionNZ); _uiLeadIn = new uimain_leadin(); _uiLeadIn.centerX(); _uiLeadIn.centerY(); _uiLeadIn.FadeSpeed = 0.25; _uiLeadIn.FadeUpDelay = 15; _uiIntroScreen = new uimain_introscreen(); _uiBase = new uimain_base(); _uiBase.centerX(); _uiBase.centerY(); _uiBase.y = (_uiBase.y - 10); registerNavButton(_uiBase._closeButton, UIVModes.MainBlank); _uiJobOp = new uimain_jobOp(); _uiJobOp.centerX(_uiBase); _uiJobOp.centerY(_uiBase); _uiSoundBtn = new uimain_soundBtn(); _uiSoundBtn.x = 661; _uiSoundBtn.y = 9; _uiSoundBtn.makeToggle(); _uiSoundBtn.quickHide(); _uiSoundBtn.FadeUpDelay = 21; registerNavButton(_uiSoundBtn, null, toggleSound); _uiNavBar = new uimain_navBar(); _uiNavBar.centerX(); _uiNavBar.y = 366; registerNavButton(_uiNavBar._howToPlay, UIVModes.HowToPlay1, trackHowToPlay); registerNavButton(_uiNavBar._highScores, UIVModes.HighScores, loadScores); registerNavButton(_uiNavBar._startGame, null, onMainStart); registerNavButton(_uiNavBar._sendToFriend, null, csSTF); registerNavButton(_uiNavBar._embed, null, csEmbed); registerNavButton(_uiNavBar._seekMoreGames, null, linkoutSeekMoreGames); registerNavButton(_uiNavBar._visitSeekSite, null, linkoutVisitSeek2); registerNavButton(_uiNavBar._credits, UIVModes.Credits, trackCredits); _uiSeekLogoCorner = new uimain_seeklogocorner(); _uiSeekLogoCorner.x = 5; _uiSeekLogoCorner.y = 5; _uiSeekLogoCorner.FadeUpDelay = 2; registerNavButton(_uiSeekLogoCorner, null, linkoutVisitSeekLogo); _uiSeekLogoCorner.quickHide(); _uiSeekLogoCorner.cacheAsBitmap = true; _uiLevelSelect = new uimain_levelSelect(); _uiLevelSelect.centerX(_uiBase); _uiLevelSelect.positionInsetFromObjY(_uiBase, 12); _uiLevelSelect.FadeUpDelay = 6; readBestScores(); _uiGameSummary = new uimain_gamesummary(); _uiGameSummary.centerX(_uiBase); _uiGameSummary.positionInsetFromObjY(_uiBase, 12); _uiGameSummary.FadeUpDelay = 6; registerNavButton(_uiGameSummary._submitScore, UIVModes.SubmitScore, resetSubmitForm); registerNavButton(_uiGameSummary._playAgain, UIVModes.SpaceAgentRepair, playAgain); _uiGameSummary._summaryCopy.gotoAndStop(1); _uiHowToPlay1 = new uimain_howtoplay1(); _uiHowToPlay1.centerX(_uiBase); _uiHowToPlay1.positionInsetFromObjY(_uiBase, 12); _uiHowToPlay1.FadeUpDelay = 6; registerNavButton(_uiHowToPlay1._nextButton, UIVModes.HowToPlay2); _uiHowToPlay2 = new uimain_howtoplay2(); _uiHowToPlay2.centerX(_uiBase); _uiHowToPlay2.positionInsetFromObjY(_uiBase, 12); _uiHowToPlay2.FadeUpDelay = 6; registerNavButton(_uiHowToPlay2._nextButton, UIVModes.HowToPlay3); registerNavButton(_uiHowToPlay2._prevButton, UIVModes.HowToPlay1); _uiHowToPlay3 = new uimain_howtoplay3(); _uiHowToPlay3.centerX(_uiBase); _uiHowToPlay3.positionInsetFromObjY(_uiBase, 12); _uiHowToPlay3.FadeUpDelay = 6; registerNavButton(_uiHowToPlay3._prevButton, UIVModes.HowToPlay2); _uiLeaderboard = new uimain_leaderboard(); _uiLeaderboard.centerX(_uiBase); _uiLeaderboard.positionInsetFromObjY(_uiBase, 12); _uiLeaderboard.FadeUpDelay = 6; _uiSubmitScore = new uimain_submitscore(); _uiSubmitScore.centerX(_uiBase); _uiSubmitScore.positionInsetFromObjY(_uiBase, 12); _uiSubmitScore.FadeUpDelay = 6; _uiSubmitScore._optInBox.makeToggle(1); _uiSubmitScore._optInBox.RollHLStrength = 0.5; registerNavButton(_uiSubmitScore._optInBox, null, toggleOptIn); registerNavButton(_uiSubmitScore._submitScore, null, onSubmitScorePost); registerNavButton(_uiSubmitScore._privacyPolicy, null, linkoutPrivacyPolicy); registerNavButton(_uiSubmitScore._tsandcs, null, linkoutTermsAndConditions); _uiSubmitScore._firstname.visible = false; _uiSubmitScore._surname.visible = false; _uiSubmitScore._optNameBases.visible = false; _uiSubmitScore._username.restrict = "a-z A-Z 0-9 \\- \\'"; _uiSubmitScore._emailaddress.restrict = "a-z A-Z 0-9 \\- \\@ \\."; _uiSubmitScore._firstname.restrict = "a-z A-Z 0-9 \\- \\'"; _uiSubmitScore._surname.restrict = "a-z A-Z 0-9 \\- \\'"; _uiCredits = new uimain_credits(); _uiCredits.centerX(_uiBase); _uiCredits.positionInsetFromObjY(_uiBase, 12); _uiCredits.FadeUpDelay = 6; registerNavButton(_uiCredits._soapButton, null, linkoutSoap); registerNavButton(_uiCredits._seekButton, null, linkoutVisitSeekLogo); addChild(_uiBgGradient); addChild(_uiIntroScreen); _gameplayLayer = new BaseElement(); addChild(_gameplayLayer); _renderManager = new RenderManager(); _renderManager.init(1000, 643); _engineUI = new MovieClip(); _engine = new EngineMain(); _gameplayLayer.addChild(_renderManager.Canvas); _gameplayLayer.addChild(_engineUI); registerNavButton(_engine.MainMenuButton, null, quitGame); registerNavButton(_engine.ConfirmQuit.btnYes, null, quitConfirmed); registerNavButton(_engine.ConfirmQuit.btnNo, null, resumeGame); addChild(_uiBase); addChild(_uiCredits); addChild(_uiJobOp); addChild(_uiFlags); addChild(_uiGameSummary); addChild(_uiHowToPlay1); addChild(_uiHowToPlay2); addChild(_uiHowToPlay3); addChild(_uiLeaderboard); addChild(_uiLeadIn); addChild(_uiNavBar); addChild(_uiSeekLogoCorner); addChild(_uiLevelSelect); addChild(_uiSubmitScore); addChild(_uiSoundBtn); _uiElements = [_uiBgGradient, new BaseElement(), _uiLeadIn, _uiFlags, _uiIntroScreen, _uiJobOp, _uiBase, _uiNavBar, _uiSeekLogoCorner, _uiSoundBtn, _uiHowToPlay3, _uiHowToPlay1, _uiHowToPlay2, _uiLevelSelect, new BaseElement(), new BaseElement(), _uiGameSummary, _uiSubmitScore, _uiLeaderboard, _uiCredits, _gameplayLayer]; if (!_autoPlay){ setVMode(UIVModes.LeadIn); }; _gameplayVModeBitMask = modeArrayToBitMaskString(UIVModes.Game); addEventListener(MouseEvent.CLICK, onMainClick); addEventListener(MouseEvent.MOUSE_DOWN, onMainMouseDown); addEventListener(MouseEvent.MOUSE_UP, onMainMouseUp); if (readSoundPref() == 1){ toggleSound(new Event("")); }; _cheatActivationDisplay = new g_cheat(); _cheatActivationDisplay.blendMode = BlendMode.ADD; _cheatActivationDisplay.alpha = 0; _cheatActivationDisplay.mouseEnabled = false; _cheatActivationDisplay.mouseChildren = false; addChild(_cheatActivationDisplay); Security.allowDomain("cdn.gigya.com"); Security.allowInsecureDomain("cdn.gigya.com"); setUnlockLevel(24); trace(("_spacePioneerSO.data.shownControlHint: " + _spacePioneerSO.data.shownControlHint)); if (_spacePioneerSO.data.shownControlHint){ _shownControlHint = _spacePioneerSO.data.shownControlHint; }; } private function onMainKeyUp(e:KeyboardEvent):void{ switch (e.keyCode){ case Keyboard.LEFT: GameLevel.Instance.keyUpInput(e); break; case Keyboard.RIGHT: GameLevel.Instance.keyUpInput(e); break; case Keyboard.UP: GameLevel.Instance.keyUpInput(e); break; case Keyboard.DOWN: GameLevel.Instance.keyUpInput(e); break; case Keyboard.SPACE: GameLevel.Instance.keyUpInput(e); break; }; switch (String.fromCharCode(e.keyCode)){ case "A": GameLevel.Instance.keyUpInput(e); break; case "Z": GameLevel.Instance.keyUpInput(e); break; case "a": GameLevel.Instance.keyUpInput(e); break; case "z": GameLevel.Instance.keyUpInput(e); break; }; } private function linkoutTermsAndConditions(event:Event):void{ trace("@@@@@@@ IMPLEMENT @@@@@@@ linkout Terms and Consitions"); if (_regionMode == R_AUS){ navigateToURL(new URLRequest("http://seek.com.au/general_id_items/content/terms.ascx"), "_blank"); } else { navigateToURL(new URLRequest("http://seek.co.nz/general_id_items/content/terms.ascx"), "_blank"); }; } private function onMainStart(e:Event=null):void{ _dossierDelayTicks = (_dossierDelayLength + 1); LevelSelect.Instance.setSelectDisplay(); setVMode(UIVModes.LevelSelect); Main.Instance.ga_trackEvent("spacePioneer", "game", "start"); Main.Instance.ga_trackPageView("spacePioneer/game/start"); _engine.resetTotalScore(); } private function loadWildfire(evt:Event, justEmail:Boolean=false):void{ var gameURL:String; var url:String; var urlReq:URLRequest; var evt = evt; var justEmail = justEmail; if (!mcWF){ mcWF = new MovieClip(); addChild(mcWF); mcWF.name = "mcWF"; }; mcWF.visible = true; mcWF.x = ((700 / 2) - (300 / 2)); mcWF.y = (((450 / 2) - (300 / 2)) - 40); var ModuleID = "PostModule1"; cfg = {}; cfg["width"] = "300"; cfg["height"] = "300"; cfg["widgetTitle"] = "Seek_Space_Rescue"; cfg["useFacebookMystuff"] = "false"; cfg["partner"] = "1085901"; var configString = ""; configString = (configString + "<config baseTheme=\"v2\"><display "); if (justEmail){ configString = (configString + "showPost=\"false\" "); configString = (configString + "showEmail=\"true\" "); configString = (configString + "showBookmark=\"false\" "); } else { configString = (configString + "showPost=\"true\" "); configString = (configString + "showEmail=\"false\" "); configString = (configString + "showBookmark=\"true\" "); }; configString = (configString + "showCodeBox=\"false\" "); configString = (configString + "showCloseButton=\"true\""); configString = (configString + ">"); configString = (configString + "</display><body>"); configString = (configString + "<background corner-roundness=\"10\"></background>"); configString = (configString + "<controls>"); configString = (configString + "<snbuttons iconsOnly=\"false\"></snbuttons>"); configString = (configString + "</controls></body></config>"); trace(("configString: " + configString)); cfg["UIConfig"] = configString; cfg["CID"] = "Space Rescue"; if (_regionMode == R_AUS){ gameURL = (("http://games.seek.com.au/spacerescue/?cid=sk:" + _trackingRegion) + ":games:space:emailfriend"); } else { gameURL = (("http://games.seek.co.nz/spacerescue/?cid=sk:" + _trackingRegion) + ":games:space:emailfriend"); }; cfg["emailSubject"] = "Your friend $sender$ thinks you should Play the SEEK Space Rescue game"; cfg["emailBody"] = (((("Hi there,\n\n<br>" + "You’ll be excited to know that I’ve just completed an employment trial as a Space Rescue Commander. I know what you’re thinking – you want to steal the job from me don’t you? Well, give it a go! I bet you can’t beat my score…\n\n<br>") + "<a href = '") + gameURL) + "'>Play SEEK Space Rescue</a>"); cfg["defaultContent"] = "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0\" width=\"700\" height=\"450\" id=\"WFHost\"><param name=\"FlashVars\" value=\"Partner=1085901&theme=New Classic&widgetW=700&widgetH=450&widgetX=0&widgetY=0&stickyType=bottom&WFBtnX=313&WFBtnY=450&defaultPreviewURL=http%3A%2F%2Fgames.seek.com.au%2Fspacerescue%2F90x57_thumb.jpg&useFacebookMystuff=false&URL=http%3A%2F%2Fgames.seek.com.au%2Fspacerescue%2FSeek_Space_Agent.swf\"/><param name=\"wmode\" value=\"transparent\"/><param name=\"allowScriptAccess\" value=\"always\" /><param name=\"movie\" value=\"http://games.seek.com.au/spacerescue/Seek_Space_Agent.swf\" /> <embed name=\"WFHost\" id=\"WFHost\" width=\"700\" height=\"450\" src=\"http://games.seek.com.au/spacerescue/Seek_Space_Agent.swf\" flashvars=\"Partner=1085901&theme=New Classic&widgetW=700&widgetH=450&widgetX=0&widgetY=0&stickyType=bottom&WFBtnX=313&WFBtnY=450&defaultPreviewURL=http%3A%2F%2Fgames.seek.com.au%2Fspacerescue%2F90x57_thumb.jpg&useFacebookMystuff=false&URL=http%3A%2F%2Fgames.seek.com.au%2Fspacerescue%2FSeek_Space_Agent.swf\" AllowScriptAccess=\"always\" quality=\"high\" wmode=\"transparent\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" /></object>"; if (!_gigyaLoader){ _gigyaLoader = new Loader(); mcWF.addChild(_gigyaLoader); }; cfg["onClose"] = function (eventObj:Object):void{ mcWF.visible = false; var _local2 = _gigyaLoader.content; _local2["INIT"](); }; if (!wfAlreadyLoaded){ wfAlreadyLoaded = true; url = ("http://cdn.gigya.com/WildFire/swf/wildfireInAS3.swf?ModuleID=" + ModuleID); urlReq = new URLRequest(url); mcWF[ModuleID] = cfg; _gigyaLoader.load(urlReq); _gigyaLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onGigyaLoaded); _gigyaLoader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, onGigyaError); } else { mcWF["PostModule1"] = cfg; var _local4 = _gigyaLoader.content; _local4["INIT"](); }; } public function get MainMouseDown():Boolean{ return (_mainMouseDown); } public function setVMode(inMode:Array):void{ var i:int; var bmstring:String = modeArrayToBitMaskString(inMode); if (((inMode) && (!((_vModeID == bmstring))))){ if (((!((inMode.length == _uiElements.length))) || (!(inMode)))){ trace(("### VMODE ARRAY ERROR: " + inMode)); }; i = 0; while (i < inMode.length) { _uiElements[i].VisMode = inMode[i]; i++; }; }; _vModeID = bmstring; } private function setFlagsScreen():void{ var bypassFlags:Boolean; var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters; if (paramObj.country){ if (paramObj.country == "au"){ _trackingRegion = "au"; bypassFlags = true; setRegionAus(new Event("")); setVMode(UIVModes.MainBlank); }; if (paramObj.country == "nz"){ _trackingRegion = "nz"; bypassFlags = true; setRegionNZ(new Event("")); setVMode(UIVModes.MainBlank); }; }; if (!bypassFlags){ setVMode(UIVModes.Flags); }; } private function closeGame():void{ SoundManager.Instance.setMusicLoop(0); SoundManager.Instance.fullReset(); EngineMain.Instance.closeGame(); _engine.setRestState(); _submitting = false; if (CHEATSENABLED == 1){ _uiGameSummary._submitScore.visible = false; } else { _uiGameSummary._submitScore.visible = true; }; _uiGameSummary._score.text = MathFunction.formatNumberStringWithCommas(EngineMain.Instance.FinalScore); var parScore:Number = _engine.FinalPossibleScore; parScore = (parScore * 0.75); trace(((("parScore: " + parScore) + " _engine.FinalScore: ") + _engine.FinalScore)); if (_engine.FinalScore <= (parScore * 0.2)){ _uiGameSummary._summaryCopy.gotoAndStop((10 + Math.floor((Math.random() * 2.99)))); }; if ((((_engine.FinalScore > (parScore * 0.2))) && ((_engine.FinalScore <= (parScore * 0.5))))){ _uiGameSummary._summaryCopy.gotoAndStop((7 + Math.floor((Math.random() * 2.99)))); }; if ((((_engine.FinalScore > (parScore * 0.5))) && ((_engine.FinalScore <= (parScore * 0.75))))){ _uiGameSummary._summaryCopy.gotoAndStop((4 + Math.floor((Math.random() * 2.99)))); }; if (_engine.FinalScore > (parScore * 0.75)){ _uiGameSummary._summaryCopy.gotoAndStop((1 + Math.floor((Math.random() * 2.99)))); }; _uiSubmitScore._score.text = String(_engine.FinalScore); _uiSubmitScore._username.text = ""; _uiSubmitScore._emailaddress.text = ""; _uiSubmitScore._firstname.text = ""; _uiSubmitScore._surname.text = ""; _uiSubmitScore._usernameX.visible = false; _uiSubmitScore._emailaddressX.visible = false; _uiSubmitScore._progress.visible = false; setVMode(UIVModes.GameSummary); _gameTimer.stop(); } private function toggleSound(event:Event):void{ _uiSoundBtn.toggleState(); SoundManager.Instance.setVolume(Number((1 - _uiSoundBtn.CurrentState))); setSoundPref(); } public function controlHintDone():void{ _shownControlHint = 1; _spacePioneerSO.data.shownControlHint = 1; _spacePioneerSO.flush(); } private function onMainClick(e:Event):void{ _engine.clickInput(mouseX, mouseY); } private function onSubmitScoreDone(event:Event):void{ _uiLeaderboard.loadScores(); setVMode(UIVModes.HighScores); } private function onSubmitScorePost(event:Event):void{ var usernameString:String; var emailString:String; var firstNameString:String; var lastNameString:String; var pReg:RegExp; var aReg:RegExp; var formState:URLVariables; var req:URLRequest; var loader:URLLoader; var validEntryCheck:Boolean; if (!SwearWordTester.testWordForErrors(_uiSubmitScore._username.text)){ validEntryCheck = false; _uiSubmitScore._usernameX.visible = true; } else { _uiSubmitScore._usernameX.visible = false; }; var validAddress:Boolean; var foundAtSymb:Boolean; var foundDotSymb:Boolean; var atSymbIndex = -1; var dotSymbIndex = -1; var t:int; while (t < _uiSubmitScore._emailaddress.text.length) { if ((((_uiSubmitScore._emailaddress.text.substr(t, 1) == "@")) && ((t > 0)))){ foundAtSymb = true; atSymbIndex = t; }; if (_uiSubmitScore._emailaddress.text.substr(t, 1) == "."){ foundDotSymb = true; dotSymbIndex = t; }; t++; }; if (((foundAtSymb) && (foundDotSymb))){ if (dotSymbIndex > atSymbIndex){ validAddress = true; trace("EMAIL ADDRESS IS VALID"); }; }; if ((((_uiSubmitScore._emailaddress.text.length < 3)) || (!(validAddress)))){ validEntryCheck = false; _uiSubmitScore._emailaddressX.visible = true; } else { _uiSubmitScore._emailaddressX.visible = false; }; if (((validEntryCheck) && (!(_submitting)))){ _submitting = true; _uiSubmitScore._progress.visible = true; usernameString = _uiSubmitScore._username.text; emailString = _uiSubmitScore._emailaddress.text; firstNameString = _uiSubmitScore._firstname.text; lastNameString = _uiSubmitScore._surname.text; pReg = /%+/g; aReg = /'+/g; trace(("usernameString: " + usernameString)); trace(("usernameString: " + usernameString)); formState = new URLVariables(); formState["intGameId"] = 44; formState["intScore"] = _engine.FinalScore; formState["strName"] = escape(usernameString); formState["strEmail"] = emailString; formState["intOptIn"] = (1 - _uiSubmitScore._optInBox.CurrentState); if (_regionMode == R_AUS){ formState["strMisc1"] = "AU"; }; if (_regionMode == R_NZ){ formState["strMisc1"] = "NZ"; }; formState["strMisc2"] = escape(firstNameString); formState["strMisc3"] = escape(lastNameString); req = new URLRequest("http://stats.soap.com.au/highscore/engine_mofo.php"); req.method = URLRequestMethod.POST; req.data = formState; loader = new URLLoader(); loader.dataFormat = URLLoaderDataFormat.VARIABLES; loader.addEventListener(Event.COMPLETE, onSubmitScoreDone); loader.addEventListener(IOErrorEvent.IO_ERROR, onSubmitScoreDone); loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSubmitScoreDone); loader.load(req); ga_trackPageView("spacePioneer/game/submit"); ga_trackEvent("spacePioneer", "game", "submit", _engine.FinalScore); } else { _uiSubmitScore._progress.visible = false; }; } private function linkoutPrivacyPolicy(event:Event):void{ trace("@@@@@@@ IMPLEMENT @@@@@@@ linkout PrivacyPolicy"); if (_regionMode == R_AUS){ navigateToURL(new URLRequest("http://seek.com.au/general_id_items/content/privacy.ascx"), "_blank"); } else { navigateToURL(new URLRequest("http://seek.co.nz/general_id_items/content/privacy.ascx"), "_blank"); }; } private function toggleOptIn(event:Event):void{ _uiSubmitScore._optInBox.toggleState(); if (_uiSubmitScore._optInBox.CurrentState == 0){ _uiSubmitScore._firstname.visible = true; _uiSubmitScore._surname.visible = true; _uiSubmitScore._optNameBases.visible = true; } else { _uiSubmitScore._firstname.visible = false; _uiSubmitScore._surname.visible = false; _uiSubmitScore._optNameBases.visible = false; }; } private function linkoutSeekMoreGames(event:Event):void{ trace("@@@@@@@ IMPLEMENT @@@@@@@ linkout SeekMoreGames"); ga_trackEvent("spacePioneer", "linkOut", "moreGames"); if (_regionMode == R_AUS){ navigateToURL(new URLRequest((("http://games.seek.com.au/index.html?cid=sk:" + _trackingRegion) + ":games:space:more")), "_blank"); } else { navigateToURL(new URLRequest((("http://games.seek.co.nz/index.html?cid=sk:" + _trackingRegion) + ":games:space:more")), "_blank"); }; } public function trackLevelComplete(levelNum:int):void{ var lnum:int = levelNum; var lnumstr:String = String(lnum); if (lnumstr.length < 2){ lnumstr = ("0" + lnumstr); }; Main.Instance.ga_trackEvent("spacePioneer", ("level" + lnumstr), "complete", _gameTimer.currentCount); Main.Instance.ga_trackPageView((("spacePioneer/game/level" + lnumstr) + "/complete")); } private function onGameBySoap(e:Event):void{ linkoutSoap(new Event("")); } private function readBestScores():void{ var lname:String; var scoreVal:Number; var levelScores:Array = new Array(); var i:int; while (i < LevelSelect.Instance.LevelList.length) { lname = LevelSelect.Instance.LevelList[i]; lname = lname.substr(0, (lname.length - 4)); scoreVal = Number(_spacePioneerSO.data[lname]); if (!isFinite(scoreVal)){ scoreVal = 0; }; levelScores.push(scoreVal); i++; }; LevelSelect.Instance.BestScores = levelScores; } private function linkoutVisitSeek2(event:Event):void{ ga_trackEvent("spacePioneer", "linkOut", "seek"); if (_regionMode == R_AUS){ navigateToURL(new URLRequest((("http://www.seek.com.au?cid=sk:" + _trackingRegion) + ":games:space:link")), "_blank"); } else { navigateToURL(new URLRequest((("http://www.seek.co.nz?cid=sk:" + _trackingRegion) + ":games:space:link")), "_blank"); }; } public function getUnlockLevel():int{ if (!_spacePioneerSO.data.LevelUnlocked){ _spacePioneerSO.data.LevelUnlocked = 0; _spacePioneerSO.flush(); }; return (int(_spacePioneerSO.data.LevelUnlocked)); } public function endGame(e:Event=null):void{ ga_trackEvent("spacePioneer", "level01", "complete", _gameTimer.currentCount); closeGame(); } public function get EngineUI():MovieClip{ return (_engineUI); } private function onNavBtnClick(event:Event):void{ setVMode(event.target.VmodeArray); } private function setRegionNZ(event:Event):void{ ga_trackPageView("spacePioneer/locale/NZ"); _regionMode = R_NZ; _mainNavStarted = true; _uiIntroScreen._main.gotoAndPlay(1); _uiIntroScreen._main._sign._signHover.gotoAndStop(2); startMusic(); } private function playAgain(event:Event):void{ var lnum:int = (LevelSelect.Instance.LevelNum + 1); var lnumstr:String = String(lnum); if (lnumstr.length < 2){ lnumstr = ("0" + lnumstr); }; ga_trackPageView(((("spacePioneer/game/" + "level") + lnumstr) + "/replay")); ga_trackEvent("spacePioneer", ("level" + lnumstr), "replay"); onMainStart(); } private function onMainKeyDown(e:KeyboardEvent):void{ switch (e.keyCode){ case Keyboard.LEFT: GameLevel.Instance.keyDownInput(e); break; case Keyboard.RIGHT: GameLevel.Instance.keyDownInput(e); break; case Keyboard.UP: GameLevel.Instance.keyDownInput(e); break; case Keyboard.DOWN: GameLevel.Instance.keyDownInput(e); break; case Keyboard.SPACE: GameLevel.Instance.keyDownInput(e); EngineMain.Instance.onSpacePressed(); break; }; switch (String.fromCharCode(e.keyCode)){ case "A": GameLevel.Instance.keyDownInput(e); break; case "Z": GameLevel.Instance.keyDownInput(e); break; case "a": GameLevel.Instance.keyDownInput(e); break; case "z": GameLevel.Instance.keyDownInput(e); break; }; _keyBuffer = _keyBufferMax; _keyString = (_keyString + String.fromCharCode(e.keyCode)); if (_keyString == "CLEANUPCREW"){ if (GameLevel.Instance.PlayerShip){ GameLevel.Instance.setShipBH(); _cheatActivationDisplay.alpha = 1; }; }; if (_keyString == "NONONO"){ GameLevel.Instance.setCameraShakeLevel(0.75); _cheatActivationDisplay.alpha = 1; }; if (_keyString == "YESYESYES"){ GameLevel.Instance.setCameraShakeLevel(5); _cheatActivationDisplay.alpha = 1; }; if (_keyString == "THEFENNELSPECIAL"){ GameLevel.Instance.setCameraShakeLevel(30); _cheatActivationDisplay.alpha = 1; }; if (_keyString == "MAYBE"){ GameLevel.Instance.setCameraShakeLevel(1); _cheatActivationDisplay.alpha = 1; }; if (CHEATSENABLED == 1){ _uiGameSummary._submitScore.visible = false; } else { _uiGameSummary._submitScore.visible = true; }; } public function setSoundPref():void{ _spacePioneerSO.data.SoundPref = _uiSoundBtn.CurrentState; _spacePioneerSO.flush(); } private function onGigyaLoaded(e:Event):void{ trace("GIGYA LOADED"); } public function checkAndSetLevelBest(inLevelName:String, inLevelScore:int):void{ var comparativeScore:Number = Number(_spacePioneerSO.data[inLevelName]); if (!isFinite(comparativeScore)){ comparativeScore = 0; }; if (Number(inLevelScore) > Number(comparativeScore)){ _spacePioneerSO.data[inLevelName] = inLevelScore; _spacePioneerSO.flush(); readBestScores(); }; } public function ga_trackPageView(pv:String):void{ trace(("@@@ tracking page view: " + pv)); _gaTracker.trackPageview(pv); } private function csSTF(event:Event):void{ loadWildfire(new Event(""), true); ga_trackEvent("spacePioneer", "menu", "sendtofriend"); } private function csEmbed(event:Event):void{ loadWildfire(new Event("")); ga_trackEvent("spacePioneer", "menu", "embed"); } public function launchLevel(filePath:String):void{ trace(("LAUNCH LEVEL: " + filePath)); setVMode(UIVModes.Game); startNewGame(filePath); } public function ga_trackEvent(category:String, action:String, label:String=null, value:Number=-12345654321):void{ if (value == -12345654321){ trace(((((("@@@ --- tracking event: " + category) + " | ") + action) + " | ") + label)); _gaTracker.trackEvent(category, action, label); } else { trace(((((((("@@@ --- tracking event: " + category) + " | ") + action) + " | ") + label) + " | ") + value)); _gaTracker.trackEvent(category, action, label, value); }; } private function onMainMouseDown(e:Event):void{ _mainMouseDown = true; } private function resetSubmitForm(event:Event):void{ _uiSubmitScore._progress.visible = false; } private function loadScores(event:Event):void{ ga_trackEvent("spacePioneer", "menu", "leaderboard"); _uiLeaderboard.loadScores(); } private function onMainAdded(event:Event):void{ stage.addEventListener(MouseEvent.MOUSE_UP, onMainMouseUpOutside); _gaTracker = new GATracker(this, "UA-6368558-35", "AS3", false); removeEventListener(Event.ADDED_TO_STAGE, onMainAdded); stage.addEventListener(KeyboardEvent.KEY_DOWN, onMainKeyDown); stage.addEventListener(KeyboardEvent.KEY_UP, onMainKeyUp); ga_trackPageView("spacePioneer/game/mainMenu"); ga_trackEvent("spacePioneer", "game", "mainMenu"); var myContextMenu:ContextMenu = new ContextMenu(); myContextMenu.hideBuiltInItems(); var defaultItems:ContextMenuBuiltInItems = myContextMenu.builtInItems; defaultItems.print = true; var item:ContextMenuItem = new ContextMenuItem("Game by Soap"); item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, onGameBySoap, false, 0, true); myContextMenu.customItems.push(item); this.contextMenu = myContextMenu; if (_autoPlay){ _introLeadInTicks = _introLength; onMainStart(); } else { setVMode(UIVModes.LeadIn); }; } private function linkoutVisitSeek(event:Event):void{ ga_trackEvent("spacePioneer", "linkOut", "seek"); if (_regionMode == R_AUS){ navigateToURL(new URLRequest((("http://www.seek.com.au?cid=sk:" + _trackingRegion) + ":games:space:link")), "_blank"); } else { navigateToURL(new URLRequest((("http://www.seek.co.nz?cid=sk:" + _trackingRegion) + ":games:space:link")), "_blank"); }; } private function onGigyaError(e:Event):void{ trace("GIGYA LOAD ERROR"); } private function trackHowToPlay(event:Event):void{ ga_trackEvent("spacePioneer", "menu", "instructions"); } public function releaseKeys():void{ if (GameLevel.Instance){ if (GameLevel.Instance.PlayerShip){ GameLevel.Instance.PlayerShip.releaseKeys(); }; }; } public function resumeGame(e:Event):void{ _engine.resumeGame(); } public function gameover(e:Event=null):void{ var lnum:int = (LevelSelect.Instance.LevelNum + 1); var lnumstr:String = String(lnum); if (lnumstr.length < 2){ lnumstr = ("0" + lnumstr); }; ga_trackEvent("spacePioneer", ("level" + lnumstr), "gameover", _gameTimer.currentCount); closeGame(); } public function allLevelsComplete():void{ closeGame(); } private function onMainEnterFrame(event:Event):void{ SoundManager.Instance.iterate(); if (_cheatActivationDisplay.alpha < 0.02){ _cheatActivationDisplay.visible = false; } else { _cheatActivationDisplay.visible = true; _cheatActivationDisplay.alpha = (_cheatActivationDisplay.alpha * 0.95); }; if (_keyBuffer > 0){ _keyBuffer--; } else { _keyString = ""; }; if (_vModeID == _gameplayVModeBitMask){ _engine.update(); _renderManager.clear(); _renderManager.renderSprites(_engine.getRenderData(), _engine.Camera); }; if (_introLeadInTicks < (_introLength + 1)){ _introLeadInTicks++; }; if (_introLeadInTicks < _introLength){ setVMode(UIVModes.LeadIn); }; if (_introLeadInTicks == _introLength){ setFlagsScreen(); }; if (_mainNavStarted){ if (_dossierDelayTicks < (_dossierDelayLength + 1)){ _dossierDelayTicks++; }; if (_dossierDelayTicks == _dossierDelayLength){ if (_vModeID == modeArrayToBitMaskString(UIVModes.MainBlank)){ setVMode(UIVModes.Dossier); }; }; }; if (_dossierDelayTicks > _dossierDelayLength){ }; } public function quitConfirmed(e:Event):void{ var lnum:int = (LevelSelect.Instance.LevelNum + 1); var lnumstr:String = String(lnum); if (lnumstr.length < 2){ lnumstr = ("0" + lnumstr); }; ga_trackEvent("spacePioneer", ("level" + lnumstr), "quit", _gameTimer.currentCount); setVMode(UIVModes.MainBlank); SoundManager.Instance.setMusicLoop(0); SoundManager.Instance.fullReset(); EngineMain.Instance.closeGame(); _engine.setRestState(); } private function registerNavButton(btn:BaseButton, vmode:Array, functionCallback:Function=null):void{ if (vmode){ if (vmode.length > 0){ btn.addEventListener(MouseEvent.CLICK, onNavBtnClick); btn.VmodeArray = vmode; }; }; if (functionCallback != null){ btn.addEventListener(MouseEvent.CLICK, functionCallback); }; } private function trackCredits(event:Event):void{ ga_trackEvent("spacePioneer", "menu", "credits"); } public function get RegionMode():int{ return (_regionMode); } public function setUnlockLevel(level:int):void{ var unlockLevel:Number = Number(_spacePioneerSO.data.LevelUnlocked); if (!isFinite(unlockLevel)){ unlockLevel = 0; }; if (Number(level) > Number(unlockLevel)){ _spacePioneerSO.data.LevelUnlocked = level; _spacePioneerSO.flush(); }; } private function onMainMouseUpOutside(e:Event):void{ _mainMouseDown = false; } private function onMainMouseUp(e:Event):void{ _mainMouseDown = false; } public function quitGame(e:Event):void{ _engine.showQuitConfirmation(); } public function readSoundPref():int{ if (!_spacePioneerSO.data.SoundPref){ _spacePioneerSO.data.SoundPref = _uiSoundBtn.CurrentState; _spacePioneerSO.flush(); }; return (_spacePioneerSO.data.SoundPref); } public function get StageRef():Stage{ return (stage); } private function setRegionAus(event:Event):void{ ga_trackPageView("spacePioneer/locale/AU"); _regionMode = R_AUS; _mainNavStarted = true; _uiIntroScreen._main.gotoAndPlay(1); _uiIntroScreen._main._sign._signHover.gotoAndStop(1); startMusic(); } public function startMusic():void{ SoundManager.Instance.setMusicLoop(); } public function get ShownControlHint():int{ return (_shownControlHint); } private function startNewGame(filePath:String):void{ _engine.startNewLevel(filePath); _gameTimer.reset(); _gameTimer.start(); } private function linkoutSoap(event:Event):void{ ga_trackEvent("spacePioneer", "linkOut", "soap"); navigateToURL(new URLRequest("http://www.soapcreative.com"), "_blank"); } private function modeArrayToBitMaskString(a:Array):String{ var bmstring:String = ""; var i:int; while (i < a.length) { bmstring = (bmstring + String(a[i])); i++; }; return (bmstring); } private function linkoutVisitSeekLogo(event:Event):void{ ga_trackEvent("spacePioneer", "linkOut", "seek"); if (_regionMode == R_AUS){ navigateToURL(new URLRequest((("http://www.seek.com.au?cid=sk:" + _trackingRegion) + ":games:space:logo")), "_blank"); } else { navigateToURL(new URLRequest((("http://www.seek.co.nz?cid=sk:" + _trackingRegion) + ":games:space:logo")), "_blank"); }; } public static function get mainHeight():Number{ return (450); } public static function get mainWidth():Number{ return (700); } public static function retrieveSpaceAgentAttributes():void{ } public static function get sceneHeight():Number{ return (643); } public static function get RMODE_AUS():int{ return (0); } public static function get RMODE_NZ():int{ return (1); } public static function setSpaceAgentAttributes():void{ } public static function get sceneWidth():Number{ return (1000); } public static function get Instance():Main{ return (_instance); } } }//package com.spaceAgent
Section 179
//SwearWordTester (com.spaceAgent.SwearWordTester) package com.spaceAgent { public class SwearWordTester { private static var isBadword:int; private static var isLegal:Boolean; private static var testWordLC:String; private static var si:int; private static var swearwordList:Array = new Array("co ck", "c unt", "cu nt", "fu ck", "f uck", "fuk", "fuc", "cnt", "knt", "ass", "dic", "fag", "d1k", "4q", "cun", "pis", "nig", "gay", "fu", "as5", "a55", "p1s", "fu2", "BJ", "BJU", "bum", "cok", "cum", "tit", "t1t", "coc", "koc", "f4g", "c0k", "c0c", "twt", "pus", "dyk", "tlt", "sac", "sak", "s4c", "s4k", "arse", "fuck", "shit", "cunt"); private static var swearWord:String; public function SwearWordTester(){ super(); } public static function testWordForErrors(testWord:String):Boolean{ if (testWord.length < 1){ trace("word not long enough"); return (false); }; si = 0; while (si < swearwordList.length) { swearWord = swearwordList[si]; testWordLC = testWord.toLowerCase(); isBadword = testWordLC.indexOf(swearWord); if (isBadword != -1){ return (false); }; si++; }; return (true); } } }//package com.spaceAgent
Section 180
//UIVModes (com.spaceAgent.UIVModes) package com.spaceAgent { public class UIVModes { public function UIVModes(){ super(); } public static function get LevelSelect():Array{ var rA:Array = [0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]; return (rA); } public static function get LeadIn():Array{ var rA:Array = [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; return (rA); } public static function get HighScores():Array{ var rA:Array = [0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0]; return (rA); } public static function get CustomFace2():Array{ var rA:Array = [0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]; return (rA); } public static function get Flags():Array{ var rA:Array = [1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; return (rA); } public static function get Credits():Array{ var rA:Array = [0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0]; return (rA); } public static function get MainBlank():Array{ var rA:Array = [0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; return (rA); } public static function get Dossier():Array{ var rA:Array = [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; return (rA); } public static function get SpaceAgentRepair():Array{ var rA:Array = [0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0]; return (rA); } public static function get HowToPlay1():Array{ var rA:Array = [0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]; return (rA); } public static function get HowToPlay2():Array{ var rA:Array = [0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]; return (rA); } public static function get HowToPlay3():Array{ var rA:Array = [0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; return (rA); } public static function get Game():Array{ var rA:Array = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]; return (rA); } public static function get SubmitScore():Array{ var rA:Array = [0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0]; return (rA); } public static function get GameSummary():Array{ var rA:Array = [0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]; return (rA); } public static function get Loading():Array{ var rA:Array = [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; return (rA); } public static function get LevelComplete():Array{ var rA:Array = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]; return (rA); } } }//package com.spaceAgent
Section 181
//AbstractPreloader (preloader.AbstractPreloader) package preloader { import flash.display.*; import flash.events.*; import com.google.analytics.*; import flash.utils.*; public class AbstractPreloader extends MovieClip { private var _tracker:AnalyticsTracker; private var m_firstEnterFrame:Boolean; private var _timer:Timer; protected var m_adLoaded:Boolean;// = false private var _api:Object; private var USE_EXTERNAL:Boolean;// = true private var m_loadTime:int; protected var VALID_URL:Array; private var _loadTime:Number;// = 0 private static var _instance:MovieClip; public function AbstractPreloader(){ super(); _instance = this; addEventListener(Event.ADDED_TO_STAGE, handleOnAddedToStage); stop(); } protected function run():void{ startMain(); } public function get CSAPI():Object{ return (_api); } protected function beginLoading():void{ } private function startMain():void{ var MainClass:Class = (getDefinitionByName(mainClassName) as Class); if (MainClass == null){ throw (new Error("AbstractPreloader:initialize. There was no class matching that name. Did you remember to override mainClassName?")); }; var main:DisplayObject = (new (MainClass) as DisplayObject); if (main == null){ throw (new Error("AbstractPreloader:initialize. Main class needs to inherit from Sprite or MovieClip.")); }; MainClass.loadTime = int(((getTimer() - m_loadTime) / 1000)); addChild(main); _timer.stop(); _tracker.trackEvent("spacePioneer", "game", "load", (_timer.currentCount * 0.25)); } protected function endLoading():void{ } public function start():void{ m_firstEnterFrame = true; addEventListener(Event.ENTER_FRAME, onEnterFrame); } private function handleOnAddedToStage(event:Event):void{ stage.scaleMode = StageScaleMode.EXACT_FIT; stage.align = StageAlign.TOP_LEFT; m_loadTime = getTimer(); _tracker = new GATracker(this, "UA-6368558-35", "AS3", false); _tracker.trackPageview("spacePioneer/game/index"); _tracker.trackEvent("spacePioneer", "game", "index"); _timer = new Timer(250, Number.POSITIVE_INFINITY); _timer.start(); } protected function get mainClassName():String{ return (""); } protected function updateLoading(a_percent:Number):void{ } private function onEnterFrame(event:Event):void{ var percent:Number; if (m_firstEnterFrame){ m_firstEnterFrame = false; if (root.loaderInfo.bytesLoaded >= root.loaderInfo.bytesTotal){ removeEventListener(Event.ENTER_FRAME, onEnterFrame); nextFrame(); run(); } else { beginLoading(); }; return; }; if (root.loaderInfo.bytesLoaded >= root.loaderInfo.bytesTotal){ removeEventListener(Event.ENTER_FRAME, onEnterFrame); nextFrame(); run(); endLoading(); } else { percent = (root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal); updateLoading(percent); }; } public static function get Instance():MovieClip{ return (_instance); } } }//package preloader
Section 182
//AbstractPreloaderView (preloader.AbstractPreloaderView) package preloader { public class AbstractPreloaderView extends AbstractPreloader { private var _loaderGraphic:uimain_loader; public function AbstractPreloaderView(){ super(); stop(); trace("@@preloader view"); _loaderGraphic = new uimain_loader(); _loaderGraphic.x = 291; _loaderGraphic.y = 167; addChild(_loaderGraphic); super.start(); } override protected function run():void{ removeChild(_loaderGraphic); _loaderGraphic = null; super.run(); } override protected function get mainClassName():String{ return ("Seek_Space_Agent"); } override protected function updateLoading(a_percent:Number):void{ var frame:int; if (_loaderGraphic._pField){ frame = (1 + int((a_percent * (_loaderGraphic.totalFrames - 1)))); _loaderGraphic._pField.text = (String(Math.floor((a_percent * 100))) + "%"); trace(("_loaderGraphic._pField.text: " + _loaderGraphic._pField.text)); }; } } }//package preloader
Section 183
//alienSplode (alienSplode) package { import flash.media.*; public dynamic class alienSplode extends Sound { } }//package
Section 184
//asteroidSplode (asteroidSplode) package { import flash.media.*; public dynamic class asteroidSplode extends Sound { } }//package
Section 185
//asteroidSplode2 (asteroidSplode2) package { import flash.media.*; public dynamic class asteroidSplode2 extends Sound { } }//package
Section 186
//ausFlag (ausFlag) package { import com.psiom.*; public dynamic class ausFlag extends BaseButton { } }//package
Section 187
//bubble1 (bubble1) package { import flash.media.*; public dynamic class bubble1 extends Sound { } }//package
Section 188
//bubble2 (bubble2) package { import flash.media.*; public dynamic class bubble2 extends Sound { } }//package
Section 189
//bubble3 (bubble3) package { import flash.media.*; public dynamic class bubble3 extends Sound { } }//package
Section 190
//buttonBlueGeneric (buttonBlueGeneric) package { import com.psiom.*; public dynamic class buttonBlueGeneric extends BaseButton { } }//package
Section 191
//buttonPinkGeneric (buttonPinkGeneric) package { import com.psiom.*; public dynamic class buttonPinkGeneric extends BaseButton { } }//package
Section 192
//buttonPinkGenericLarge (buttonPinkGenericLarge) package { import com.psiom.*; public dynamic class buttonPinkGenericLarge extends BaseButton { } }//package
Section 193
//buttonPinkGenericSmaller (buttonPinkGenericSmaller) package { import com.psiom.*; public dynamic class buttonPinkGenericSmaller extends BaseButton { } }//package
Section 194
//buttonSeek (buttonSeek) package { import com.psiom.*; public dynamic class buttonSeek extends BaseButton { } }//package
Section 195
//closeButtonMain (closeButtonMain) package { import com.psiom.*; public dynamic class closeButtonMain extends BaseButton { } }//package
Section 196
//combust (combust) package { import flash.media.*; public dynamic class combust extends Sound { } }//package
Section 197
//diamondRoidSplode1 (diamondRoidSplode1) package { import flash.media.*; public dynamic class diamondRoidSplode1 extends Sound { } }//package
Section 198
//diamondRoidSplode2 (diamondRoidSplode2) package { import flash.media.*; public dynamic class diamondRoidSplode2 extends Sound { } }//package
Section 199
//enemyFire_00 (enemyFire_00) package { import flash.media.*; public dynamic class enemyFire_00 extends Sound { } }//package
Section 200
//g_cheat (g_cheat) package { import flash.display.*; public dynamic class g_cheat extends MovieClip { } }//package
Section 201
//gameloop (gameloop) package { import flash.media.*; public dynamic class gameloop extends Sound { } }//package
Section 202
//gameover (gameover) package { import flash.media.*; public dynamic class gameover extends Sound { } }//package
Section 203
//gClip_alienBumper (gClip_alienBumper) package { import flash.display.*; public dynamic class gClip_alienBumper extends MovieClip { } }//package
Section 204
//gClip_alienBumperLite (gClip_alienBumperLite) package { import flash.display.*; public dynamic class gClip_alienBumperLite extends MovieClip { } }//package
Section 205
//gClip_alienShooter (gClip_alienShooter) package { import flash.display.*; public dynamic class gClip_alienShooter extends MovieClip { } }//package
Section 206
//gClip_alienShooterLite (gClip_alienShooterLite) package { import flash.display.*; public dynamic class gClip_alienShooterLite extends MovieClip { } }//package
Section 207
//gClip_ammoBasic (gClip_ammoBasic) package { import flash.display.*; public dynamic class gClip_ammoBasic extends MovieClip { } }//package
Section 208
//gClip_ammoHeavy (gClip_ammoHeavy) package { import flash.display.*; public dynamic class gClip_ammoHeavy extends MovieClip { } }//package
Section 209
//gClip_ammoMedium (gClip_ammoMedium) package { import flash.display.*; public dynamic class gClip_ammoMedium extends MovieClip { } }//package
Section 210
//gClip_ammoParticle1 (gClip_ammoParticle1) package { import flash.display.*; public dynamic class gClip_ammoParticle1 extends MovieClip { } }//package
Section 211
//gClip_ammoParticle2 (gClip_ammoParticle2) package { import flash.display.*; public dynamic class gClip_ammoParticle2 extends MovieClip { } }//package
Section 212
//gClip_ammoPickup (gClip_ammoPickup) package { import flash.display.*; public dynamic class gClip_ammoPickup extends MovieClip { } }//package
Section 213
//gClip_ammoSeeker (gClip_ammoSeeker) package { import flash.display.*; public dynamic class gClip_ammoSeeker extends MovieClip { } }//package
Section 214
//gClip_ammoSeekerHeavy (gClip_ammoSeekerHeavy) package { import flash.display.*; public dynamic class gClip_ammoSeekerHeavy extends MovieClip { } }//package
Section 215
//gClip_ammoSplode (gClip_ammoSplode) package { import flash.display.*; public dynamic class gClip_ammoSplode extends MovieClip { } }//package
Section 216
//gClip_asteroidBig (gClip_asteroidBig) package { import flash.display.*; public dynamic class gClip_asteroidBig extends MovieClip { } }//package
Section 217
//gClip_asteroidMedium (gClip_asteroidMedium) package { import flash.display.*; public dynamic class gClip_asteroidMedium extends MovieClip { } }//package
Section 218
//gClip_asteroidWall (gClip_asteroidWall) package { import flash.display.*; public dynamic class gClip_asteroidWall extends MovieClip { } }//package
Section 219
//gClip_asteroidWallBig (gClip_asteroidWallBig) package { import flash.display.*; public dynamic class gClip_asteroidWallBig extends MovieClip { } }//package
Section 220
//gClip_asteroidWallSmall (gClip_asteroidWallSmall) package { import flash.display.*; public dynamic class gClip_asteroidWallSmall extends MovieClip { } }//package
Section 221
//gClip_bgAsteroids (gClip_bgAsteroids) package { import flash.display.*; public dynamic class gClip_bgAsteroids extends MovieClip { } }//package
Section 222
//gClip_bgGradient (gClip_bgGradient) package { import flash.display.*; public dynamic class gClip_bgGradient extends MovieClip { } }//package
Section 223
//gClip_bgLargeObj (gClip_bgLargeObj) package { import flash.display.*; public dynamic class gClip_bgLargeObj extends MovieClip { } }//package
Section 224
//gClip_blackHole (gClip_blackHole) package { import flash.display.*; public dynamic class gClip_blackHole extends MovieClip { } }//package
Section 225
//gClip_bonusItems (gClip_bonusItems) package { import flash.display.*; public dynamic class gClip_bonusItems extends MovieClip { } }//package
Section 226
//gClip_controlHint (gClip_controlHint) package { import flash.display.*; public dynamic class gClip_controlHint extends MovieClip { } }//package
Section 227
//gClip_diamond (gClip_diamond) package { import flash.display.*; public dynamic class gClip_diamond extends MovieClip { } }//package
Section 228
//gClip_diamondRoid (gClip_diamondRoid) package { import flash.display.*; public dynamic class gClip_diamondRoid extends MovieClip { } }//package
Section 229
//gClip_enemyAmmo (gClip_enemyAmmo) package { import flash.display.*; public dynamic class gClip_enemyAmmo extends MovieClip { } }//package
Section 230
//gClip_enemyAmmoParticle (gClip_enemyAmmoParticle) package { import flash.display.*; public dynamic class gClip_enemyAmmoParticle extends MovieClip { } }//package
Section 231
//gClip_exhaustParticle (gClip_exhaustParticle) package { import flash.display.*; public dynamic class gClip_exhaustParticle extends MovieClip { } }//package
Section 232
//gClip_fuel (gClip_fuel) package { import flash.display.*; public dynamic class gClip_fuel extends MovieClip { } }//package
Section 233
//gClip_gasCloud (gClip_gasCloud) package { import flash.display.*; public dynamic class gClip_gasCloud extends MovieClip { } }//package
Section 234
//gClip_hintClip1 (gClip_hintClip1) package { import flash.display.*; public dynamic class gClip_hintClip1 extends MovieClip { } }//package
Section 235
//gClip_hintClip2 (gClip_hintClip2) package { import flash.display.*; public dynamic class gClip_hintClip2 extends MovieClip { } }//package
Section 236
//gClip_hintClip3 (gClip_hintClip3) package { import flash.display.*; public dynamic class gClip_hintClip3 extends MovieClip { } }//package
Section 237
//gClip_hintClip4 (gClip_hintClip4) package { import flash.display.*; public dynamic class gClip_hintClip4 extends MovieClip { } }//package
Section 238
//gClip_hintClip5 (gClip_hintClip5) package { import flash.display.*; public dynamic class gClip_hintClip5 extends MovieClip { } }//package
Section 239
//gClip_hintClip6 (gClip_hintClip6) package { import flash.display.*; public dynamic class gClip_hintClip6 extends MovieClip { } }//package
Section 240
//gClip_hintClip7 (gClip_hintClip7) package { import flash.display.*; public dynamic class gClip_hintClip7 extends MovieClip { } }//package
Section 241
//gClip_HUD (gClip_HUD) package { import flash.display.*; import flash.text.*; public dynamic class gClip_HUD extends MovieClip { public var _hudPointer:MovieClip; public var _timeField:TextField; public var _radar:MovieClip; public var _scoreField:TextField; public var _healthBar:MovieClip; public var _fuelBar:MovieClip; public var _travellersField:TextField; } }//package
Section 242
//gClip_laserBeam (gClip_laserBeam) package { import flash.display.*; public dynamic class gClip_laserBeam extends MovieClip { } }//package
Section 243
//gClip_laserNode (gClip_laserNode) package { import flash.display.*; public dynamic class gClip_laserNode extends MovieClip { } }//package
Section 244
//gClip_motionParticle (gClip_motionParticle) package { import flash.display.*; public dynamic class gClip_motionParticle extends MovieClip { } }//package
Section 245
//gClip_planet1 (gClip_planet1) package { import flash.display.*; public dynamic class gClip_planet1 extends MovieClip { } }//package
Section 246
//gClip_poisonBarrel (gClip_poisonBarrel) package { import flash.display.*; public dynamic class gClip_poisonBarrel extends MovieClip { } }//package
Section 247
//gClip_poisonBubble (gClip_poisonBubble) package { import flash.display.*; public dynamic class gClip_poisonBubble extends MovieClip { } }//package
Section 248
//gClip_radarBlip (gClip_radarBlip) package { import flash.display.*; public dynamic class gClip_radarBlip extends MovieClip { } }//package
Section 249
//gClip_rocketShip (gClip_rocketShip) package { import flash.display.*; public dynamic class gClip_rocketShip extends MovieClip { } }//package
Section 250
//gClip_rocketShrap (gClip_rocketShrap) package { import flash.display.*; public dynamic class gClip_rocketShrap extends MovieClip { } }//package
Section 251
//gClip_roidParticle1 (gClip_roidParticle1) package { import flash.display.*; public dynamic class gClip_roidParticle1 extends MovieClip { } }//package
Section 252
//gClip_roidParticle2 (gClip_roidParticle2) package { import flash.display.*; public dynamic class gClip_roidParticle2 extends MovieClip { } }//package
Section 253
//gClip_roidShard_1 (gClip_roidShard_1) package { import flash.display.*; public dynamic class gClip_roidShard_1 extends MovieClip { } }//package
Section 254
//gClip_roidShard_10 (gClip_roidShard_10) package { import flash.display.*; public dynamic class gClip_roidShard_10 extends MovieClip { } }//package
Section 255
//gClip_roidShard_11 (gClip_roidShard_11) package { import flash.display.*; public dynamic class gClip_roidShard_11 extends MovieClip { } }//package
Section 256
//gClip_roidShard_12 (gClip_roidShard_12) package { import flash.display.*; public dynamic class gClip_roidShard_12 extends MovieClip { } }//package
Section 257
//gClip_roidShard_13 (gClip_roidShard_13) package { import flash.display.*; public dynamic class gClip_roidShard_13 extends MovieClip { } }//package
Section 258
//gClip_roidShard_14 (gClip_roidShard_14) package { import flash.display.*; public dynamic class gClip_roidShard_14 extends MovieClip { } }//package
Section 259
//gClip_roidShard_15 (gClip_roidShard_15) package { import flash.display.*; public dynamic class gClip_roidShard_15 extends MovieClip { } }//package
Section 260
//gClip_roidShard_2 (gClip_roidShard_2) package { import flash.display.*; public dynamic class gClip_roidShard_2 extends MovieClip { } }//package
Section 261
//gClip_roidShard_3 (gClip_roidShard_3) package { import flash.display.*; public dynamic class gClip_roidShard_3 extends MovieClip { } }//package
Section 262
//gClip_roidShard_4 (gClip_roidShard_4) package { import flash.display.*; public dynamic class gClip_roidShard_4 extends MovieClip { } }//package
Section 263
//gClip_roidShard_5 (gClip_roidShard_5) package { import flash.display.*; public dynamic class gClip_roidShard_5 extends MovieClip { } }//package
Section 264
//gClip_roidShard_6 (gClip_roidShard_6) package { import flash.display.*; public dynamic class gClip_roidShard_6 extends MovieClip { } }//package
Section 265
//gClip_roidShard_7 (gClip_roidShard_7) package { import flash.display.*; public dynamic class gClip_roidShard_7 extends MovieClip { } }//package
Section 266
//gClip_roidShard_8 (gClip_roidShard_8) package { import flash.display.*; public dynamic class gClip_roidShard_8 extends MovieClip { } }//package
Section 267
//gClip_roidShard_9 (gClip_roidShard_9) package { import flash.display.*; public dynamic class gClip_roidShard_9 extends MovieClip { } }//package
Section 268
//gClip_signPost (gClip_signPost) package { import flash.display.*; public dynamic class gClip_signPost extends MovieClip { } }//package
Section 269
//gClip_smokePuff (gClip_smokePuff) package { import flash.display.*; public dynamic class gClip_smokePuff extends MovieClip { } }//package
Section 270
//gClip_smokePuffSmall (gClip_smokePuffSmall) package { import flash.display.*; public dynamic class gClip_smokePuffSmall extends MovieClip { } }//package
Section 271
//gClip_smokePuffTiny (gClip_smokePuffTiny) package { import flash.display.*; public dynamic class gClip_smokePuffTiny extends MovieClip { } }//package
Section 272
//gClip_spaceDudes (gClip_spaceDudes) package { import flash.display.*; public dynamic class gClip_spaceDudes extends MovieClip { } }//package
Section 273
//gClip_star (gClip_star) package { import flash.display.*; public dynamic class gClip_star extends MovieClip { } }//package
Section 274
//gClip_starBG (gClip_starBG) package { import flash.display.*; public dynamic class gClip_starBG extends MovieClip { } }//package
Section 275
//gClip_TentacleSegment (gClip_TentacleSegment) package { import flash.display.*; public dynamic class gClip_TentacleSegment extends MovieClip { public var _sizeRef:MovieClip; } }//package
Section 276
//gClip_TentacleTip (gClip_TentacleTip) package { import flash.display.*; public dynamic class gClip_TentacleTip extends MovieClip { public var _sizeRef:MovieClip; } }//package
Section 277
//gClip_tinyPuff1 (gClip_tinyPuff1) package { import flash.display.*; public dynamic class gClip_tinyPuff1 extends MovieClip { } }//package
Section 278
//gClip_tinySpark (gClip_tinySpark) package { import flash.display.*; public dynamic class gClip_tinySpark extends MovieClip { } }//package
Section 279
//gClip_tractorBeam (gClip_tractorBeam) package { import flash.display.*; public dynamic class gClip_tractorBeam extends MovieClip { } }//package
Section 280
//gClip_turretBase (gClip_turretBase) package { import flash.display.*; public dynamic class gClip_turretBase extends MovieClip { } }//package
Section 281
//gClip_turretCannon (gClip_turretCannon) package { import flash.display.*; public dynamic class gClip_turretCannon extends MovieClip { } }//package
Section 282
//heavyMetalThud1 (heavyMetalThud1) package { import flash.media.*; public dynamic class heavyMetalThud1 extends Sound { } }//package
Section 283
//heavyMetalThud2 (heavyMetalThud2) package { import flash.media.*; public dynamic class heavyMetalThud2 extends Sound { } }//package
Section 284
//heavyMetalThud3 (heavyMetalThud3) package { import flash.media.*; public dynamic class heavyMetalThud3 extends Sound { } }//package
Section 285
//htpNextButton (htpNextButton) package { import com.psiom.*; public dynamic class htpNextButton extends BaseButton { } }//package
Section 286
//htpPrevButton (htpPrevButton) package { import com.psiom.*; public dynamic class htpPrevButton extends BaseButton { } }//package
Section 287
//invisBlockButton (invisBlockButton) package { import com.psiom.*; public dynamic class invisBlockButton extends BaseButton { } }//package
Section 288
//laser2 (laser2) package { import flash.media.*; public dynamic class laser2 extends Sound { } }//package
Section 289
//levelSelecButton (levelSelecButton) package { import com.psiom.*; public dynamic class levelSelecButton extends BaseButton { } }//package
Section 290
//lightMetalThud1 (lightMetalThud1) package { import flash.media.*; public dynamic class lightMetalThud1 extends Sound { } }//package
Section 291
//lightMetalthud2 (lightMetalthud2) package { import flash.media.*; public dynamic class lightMetalthud2 extends Sound { } }//package
Section 292
//lightMetalThud3 (lightMetalThud3) package { import flash.media.*; public dynamic class lightMetalThud3 extends Sound { } }//package
Section 293
//lowFuel (lowFuel) package { import flash.media.*; public dynamic class lowFuel extends Sound { } }//package
Section 294
//lowHealth (lowHealth) package { import flash.media.*; public dynamic class lowHealth extends Sound { } }//package
Section 295
//mediumMetalThud1 (mediumMetalThud1) package { import flash.media.*; public dynamic class mediumMetalThud1 extends Sound { } }//package
Section 296
//mediumMetalThud2 (mediumMetalThud2) package { import flash.media.*; public dynamic class mediumMetalThud2 extends Sound { } }//package
Section 297
//mediumMetalThud3 (mediumMetalThud3) package { import flash.media.*; public dynamic class mediumMetalThud3 extends Sound { } }//package
Section 298
//mediumMetalThud4 (mediumMetalThud4) package { import flash.media.*; public dynamic class mediumMetalThud4 extends Sound { } }//package
Section 299
//menuloop (menuloop) package { import flash.media.*; public dynamic class menuloop extends Sound { } }//package
Section 300
//metal1 (metal1) package { import flash.media.*; public dynamic class metal1 extends Sound { } }//package
Section 301
//metal2 (metal2) package { import flash.media.*; public dynamic class metal2 extends Sound { } }//package
Section 302
//metal3 (metal3) package { import flash.media.*; public dynamic class metal3 extends Sound { } }//package
Section 303
//metal4 (metal4) package { import flash.media.*; public dynamic class metal4 extends Sound { } }//package
Section 304
//nzFlag (nzFlag) package { import com.psiom.*; public dynamic class nzFlag extends BaseButton { } }//package
Section 305
//Seek_Space_Agent (Seek_Space_Agent) package { import flash.events.*; import com.spaceAgent.*; import flash.display.*; public class Seek_Space_Agent extends Sprite { private var _main:Main; public function Seek_Space_Agent(){ super(); _main = new Main(); addChild(_main); addEventListener(Event.ADDED_TO_STAGE, onAdded); } private function onAdded(event:Event):void{ } private function initHandler(event:Event):void{ } } }//package
Section 306
//shipBoom (shipBoom) package { import flash.media.*; public dynamic class shipBoom extends Sound { } }//package
Section 307
//shipthrust (shipthrust) package { import flash.media.*; public dynamic class shipthrust extends Sound { } }//package
Section 308
//smallHit (smallHit) package { import flash.media.*; public dynamic class smallHit extends Sound { } }//package
Section 309
//snd_collect (snd_collect) package { import flash.media.*; public dynamic class snd_collect extends Sound { } }//package
Section 310
//snd_smallHit2 (snd_smallHit2) package { import flash.media.*; public dynamic class snd_smallHit2 extends Sound { } }//package
Section 311
//snd_smallhit3 (snd_smallhit3) package { import flash.media.*; public dynamic class snd_smallhit3 extends Sound { } }//package
Section 312
//snd_smallhit4 (snd_smallhit4) package { import flash.media.*; public dynamic class snd_smallhit4 extends Sound { } }//package
Section 313
//snd_smallhit5 (snd_smallhit5) package { import flash.media.*; public dynamic class snd_smallhit5 extends Sound { } }//package
Section 314
//soapButton (soapButton) package { import com.psiom.*; public dynamic class soapButton extends BaseButton { } }//package
Section 315
//swarm_gun_07 (swarm_gun_07) package { import flash.media.*; public dynamic class swarm_gun_07 extends Sound { } }//package
Section 316
//swarm_gun_08 (swarm_gun_08) package { import flash.media.*; public dynamic class swarm_gun_08 extends Sound { } }//package
Section 317
//tentacle1 (tentacle1) package { import flash.media.*; public dynamic class tentacle1 extends Sound { } }//package
Section 318
//tentacle2 (tentacle2) package { import flash.media.*; public dynamic class tentacle2 extends Sound { } }//package
Section 319
//tentacle3 (tentacle3) package { import flash.media.*; public dynamic class tentacle3 extends Sound { } }//package
Section 320
//tentacle4 (tentacle4) package { import flash.media.*; public dynamic class tentacle4 extends Sound { } }//package
Section 321
//Thrust_1 (Thrust_1) package { import flash.media.*; public dynamic class Thrust_1 extends Sound { } }//package
Section 322
//tickBox (tickBox) package { import com.psiom.*; public dynamic class tickBox extends BaseButton { } }//package
Section 323
//tractorBeam (tractorBeam) package { import flash.media.*; public dynamic class tractorBeam extends Sound { } }//package
Section 324
//ui_gameOver (ui_gameOver) package { import flash.display.*; public dynamic class ui_gameOver extends MovieClip { } }//package
Section 325
//ui_levelComplete (ui_levelComplete) package { import flash.display.*; import flash.text.*; public dynamic class ui_levelComplete extends MovieClip { public var _levelBonus:TextField; public var _levelTime:TextField; public var _totalScore:TextField; public var _levelScore:TextField; } }//package
Section 326
//ui_mainMenuButton (ui_mainMenuButton) package { import com.psiom.*; public dynamic class ui_mainMenuButton extends BaseButton { } }//package
Section 327
//ui_roundNumber (ui_roundNumber) package { import flash.display.*; import flash.text.*; public dynamic class ui_roundNumber extends MovieClip { public var _nameField:TextField; public var _num:TextField; } }//package
Section 328
//ui_scoreBlip (ui_scoreBlip) package { import flash.display.*; import flash.text.*; public dynamic class ui_scoreBlip extends MovieClip { public var _base:MovieClip; public var _points:TextField; } }//package
Section 329
//uimain_base (uimain_base) package { import com.psiom.*; public dynamic class uimain_base extends BaseElement { } }//package
Section 330
//uimain_bggradient (uimain_bggradient) package { import com.psiom.*; public dynamic class uimain_bggradient extends BaseElement { } }//package
Section 331
//uimain_confirmQuit (uimain_confirmQuit) package { import flash.display.*; public dynamic class uimain_confirmQuit extends MovieClip { public var btnYes:buttonBlueGeneric; public var btnNo:buttonBlueGeneric; } }//package
Section 332
//uimain_credits (uimain_credits) package { import com.psiom.*; public dynamic class uimain_credits extends BaseElement { } }//package
Section 333
//uimain_flags (uimain_flags) package { import com.psiom.*; public dynamic class uimain_flags extends BaseElement { } }//package
Section 334
//uimain_gamesummary (uimain_gamesummary) package { import com.psiom.*; public dynamic class uimain_gamesummary extends BaseElement { } }//package
Section 335
//uimain_howtoplay1 (uimain_howtoplay1) package { import com.psiom.*; public dynamic class uimain_howtoplay1 extends BaseElement { } }//package
Section 336
//uimain_howtoplay2 (uimain_howtoplay2) package { import com.psiom.*; public dynamic class uimain_howtoplay2 extends BaseElement { } }//package
Section 337
//uimain_howtoplay3 (uimain_howtoplay3) package { import com.psiom.*; public dynamic class uimain_howtoplay3 extends BaseElement { } }//package
Section 338
//uimain_introscreen (uimain_introscreen) package { import com.psiom.*; public dynamic class uimain_introscreen extends BaseElement { } }//package
Section 339
//uimain_jobOp (uimain_jobOp) package { import com.psiom.*; public dynamic class uimain_jobOp extends BaseElement { } }//package
Section 340
//uimain_leaderboard (uimain_leaderboard) package { import com.spaceAgent.*; public dynamic class uimain_leaderboard extends LeaderBoard { } }//package
Section 341
//uimain_leadin (uimain_leadin) package { import com.psiom.*; public dynamic class uimain_leadin extends BaseElement { } }//package
Section 342
//uimain_levelSelect (uimain_levelSelect) package { import com.spaceAgent.*; public dynamic class uimain_levelSelect extends LevelSelect { } }//package
Section 343
//uimain_loader (uimain_loader) package { import flash.display.*; import flash.text.*; public dynamic class uimain_loader extends MovieClip { public var _pField:TextField; } }//package
Section 344
//uimain_navBar (uimain_navBar) package { import com.psiom.*; public dynamic class uimain_navBar extends BaseElement { } }//package
Section 345
//uimain_seeklogocorner (uimain_seeklogocorner) package { import com.psiom.*; public dynamic class uimain_seeklogocorner extends BaseButton { } }//package
Section 346
//uimain_soundBtn (uimain_soundBtn) package { import com.psiom.*; public dynamic class uimain_soundBtn extends BaseButton { } }//package
Section 347
//uimain_submitscore (uimain_submitscore) package { import com.psiom.*; public dynamic class uimain_submitscore extends BaseElement { } }//package
Section 348
//win4 (win4) package { import flash.media.*; public dynamic class win4 extends Sound { } }//package

Library Items

Symbol 1 GraphicUsed by:5
Symbol 2 FontUsed by:3 4 6 7 8 9 10 32 39 40 46 57 58 59 60 61 62 72 73 87 88 89 90 95 98 100 101 114 115 119 124 125 126 127 145 146 154 155 156 185 186 194 196 197 208 209 220 224 226 229 230 232 233 236 237 238 243 244 251 256 257 263 264 424 425 430 431 432 433 434 435 436 437 438 459 460 461 469 470 471 477 679 682 699 700 743 744 745 796 797 798 801 802 872 873 874 938 939
Symbol 3 TextUses:2Used by:5
Symbol 4 EditableTextUses:2 33Used by:5
Symbol 5 MovieClip {uimain_loader} [uimain_loader]Uses:1 3 4
Symbol 6 TextUses:2Used by:27
Symbol 7 TextUses:2Used by:27
Symbol 8 TextUses:2Used by:27
Symbol 9 TextUses:2Used by:27
Symbol 10 TextUses:2Used by:27
Symbol 11 FontUsed by:12 13 14 96 97 102 108 117 118 504
Symbol 12 EditableTextUses:11Used by:20
Symbol 13 EditableTextUses:11Used by:20
Symbol 14 EditableTextUses:11Used by:20
Symbol 15 GraphicUsed by:19
Symbol 16 GraphicUsed by:17
Symbol 17 MovieClipUses:16Used by:18 38
Symbol 18 MovieClipUses:17Used by:19
Symbol 19 MovieClipUses:15 18Used by:20
Symbol 20 MovieClipUses:12 13 14 19Used by:27
Symbol 21 GraphicUsed by:22
Symbol 22 MovieClipUses:21Used by:23 26
Symbol 23 MovieClip {htpNextButton} [htpNextButton]Uses:22Used by:27 184 215 281
Symbol 24 GraphicUsed by:25
Symbol 25 MovieClipUses:24Used by:26
Symbol 26 MovieClip {htpPrevButton} [htpPrevButton]Uses:22 25Used by:27 215 252 281
Symbol 27 MovieClip {uimain_leaderboard} [uimain_leaderboard]Uses:6 7 8 9 10 20 23 26
Symbol 28 GraphicUsed by:31
Symbol 29 GraphicUsed by:30
Symbol 30 MovieClipUses:29Used by:31
Symbol 31 MovieClip {uimain_seeklogocorner} [uimain_seeklogocorner]Uses:28 30
Symbol 32 TextUses:2Used by:41
Symbol 33 FontUsed by:4 34 74 75 76 77 78 79 80 81 82 83 84 85 88 93 112 209 216 459 460 461
Symbol 34 TextUses:33Used by:41
Symbol 35 GraphicUsed by:36
Symbol 36 MovieClipUses:35Used by:37
Symbol 37 MovieClip {ausFlag} [ausFlag]Uses:36Used by:41
Symbol 38 MovieClip {nzFlag} [nzFlag]Uses:17Used by:41
Symbol 39 TextUses:2Used by:41
Symbol 40 TextUses:2Used by:41
Symbol 41 MovieClip {uimain_flags} [uimain_flags]Uses:32 34 37 38 39 40
Symbol 42 GraphicUsed by:45
Symbol 43 GraphicUsed by:44
Symbol 44 MovieClipUses:43Used by:45
Symbol 45 MovieClip {buttonBlueGeneric} [buttonBlueGeneric]Uses:42 44Used by:63 91 120 472
Symbol 46 TextUses:2Used by:63
Symbol 47 GraphicUsed by:48 1021
Symbol 48 MovieClip {invisBlockButton} [invisBlockButton]Uses:47Used by:63 120
Symbol 49 GraphicUsed by:52
Symbol 50 GraphicUsed by:51
Symbol 51 MovieClipUses:50Used by:52
Symbol 52 MovieClip {buttonPinkGeneric} [buttonPinkGeneric]Uses:49 51Used by:63
Symbol 53 GraphicUsed by:56
Symbol 54 GraphicUsed by:55
Symbol 55 MovieClipUses:54Used by:56
Symbol 56 MovieClip {buttonPinkGenericLarge} [buttonPinkGenericLarge]Uses:53 55Used by:63
Symbol 57 TextUses:2Used by:63
Symbol 58 TextUses:2Used by:63
Symbol 59 TextUses:2Used by:63
Symbol 60 TextUses:2Used by:63
Symbol 61 TextUses:2Used by:63
Symbol 62 TextUses:2Used by:63
Symbol 63 MovieClip {uimain_navBar} [uimain_navBar]Uses:45 46 48 52 56 57 58 59 60 61 62
Symbol 64 GraphicUsed by:65
Symbol 65 MovieClip {uimain_jobOp} [uimain_jobOp]Uses:64
Symbol 66 GraphicUsed by:70 221 271
Symbol 67 GraphicUsed by:68
Symbol 68 MovieClipUses:67Used by:70
Symbol 69 GraphicUsed by:70
Symbol 70 MovieClipUses:66 68 69Used by:71
Symbol 71 MovieClip {uimain_soundBtn} [uimain_soundBtn]Uses:70
Symbol 72 TextUses:2Used by:91
Symbol 73 TextUses:2Used by:91
Symbol 74 TextUses:33Used by:86
Symbol 75 TextUses:33Used by:86
Symbol 76 TextUses:33Used by:86
Symbol 77 TextUses:33Used by:86
Symbol 78 TextUses:33Used by:86
Symbol 79 TextUses:33Used by:86
Symbol 80 TextUses:33Used by:86
Symbol 81 TextUses:33Used by:86
Symbol 82 TextUses:33Used by:86
Symbol 83 TextUses:33Used by:86
Symbol 84 TextUses:33Used by:86
Symbol 85 TextUses:33Used by:86
Symbol 86 MovieClipUses:74 75 76 77 78 79 80 81 82 83 84 85Used by:91
Symbol 87 TextUses:2Used by:91
Symbol 88 EditableTextUses:2 33Used by:91
Symbol 89 TextUses:2Used by:91
Symbol 90 TextUses:2Used by:91 120
Symbol 91 MovieClip {uimain_gamesummary} [uimain_gamesummary]Uses:45 72 73 86 87 88 89 90
Symbol 92 GraphicUsed by:120
Symbol 93 TextUses:33Used by:120
Symbol 94 GraphicUsed by:104 120
Symbol 95 TextUses:2Used by:120
Symbol 96 EditableTextUses:11Used by:120
Symbol 97 EditableTextUses:11Used by:120
Symbol 98 TextUses:2Used by:120
Symbol 99 GraphicUsed by:120
Symbol 100 TextUses:2Used by:120
Symbol 101 TextUses:2Used by:120
Symbol 102 EditableTextUses:11Used by:120
Symbol 103 GraphicUsed by:104
Symbol 104 MovieClipUses:103 94Used by:105
Symbol 105 MovieClip {tickBox} [tickBox]Uses:104Used by:120
Symbol 106 GraphicUsed by:107
Symbol 107 MovieClipUses:106Used by:109
Symbol 108 TextUses:11Used by:109
Symbol 109 MovieClipUses:107 108Used by:120
Symbol 110 GraphicUsed by:111
Symbol 111 MovieClipUses:110Used by:120
Symbol 112 TextUses:33Used by:120
Symbol 113 GraphicUsed by:116
Symbol 114 TextUses:2Used by:116
Symbol 115 TextUses:2Used by:116
Symbol 116 MovieClipUses:113 114 115Used by:120
Symbol 117 EditableTextUses:11Used by:120
Symbol 118 EditableTextUses:11Used by:120
Symbol 119 TextUses:2Used by:120
Symbol 120 MovieClip {uimain_submitscore} [uimain_submitscore]Uses:92 93 45 94 95 96 97 98 99 100 101 102 90 105 109 111 112 116 117 118 48 119
Symbol 121 GraphicUsed by:122
Symbol 122 MovieClip {uimain_bggradient} [uimain_bggradient]Uses:121
Symbol 123 GraphicUsed by:184 252 281
Symbol 124 TextUses:2Used by:184 281
Symbol 125 TextUses:2Used by:184 252 281
Symbol 126 TextUses:2Used by:184
Symbol 127 TextUses:2Used by:184
Symbol 128 GraphicUsed by:184 252 281
Symbol 129 GraphicUsed by:144 262 266
Symbol 130 GraphicUsed by:144
Symbol 131 GraphicUsed by:132
Symbol 132 MovieClipUses:131Used by:144 262 266
Symbol 133 GraphicUsed by:144 262 266
Symbol 134 GraphicUsed by:135
Symbol 135 MovieClipUses:134Used by:144 262 266
Symbol 136 GraphicUsed by:144
Symbol 137 GraphicUsed by:138 260
Symbol 138 MovieClipUses:137Used by:144
Symbol 139 GraphicUsed by:144
Symbol 140 GraphicUsed by:141
Symbol 141 MovieClipUses:140Used by:144 262 266
Symbol 142 GraphicUsed by:143
Symbol 143 MovieClipUses:142Used by:144 262 266
Symbol 144 MovieClipUses:129 130 132 133 135 136 138 139 141 143Used by:184
Symbol 145 TextUses:2Used by:184
Symbol 146 TextUses:2Used by:184
Symbol 147 GraphicUsed by:148
Symbol 148 MovieClipUses:147Used by:184
Symbol 149 GraphicUsed by:150
Symbol 150 MovieClipUses:149Used by:184
Symbol 151 GraphicUsed by:184
Symbol 152 GraphicUsed by:153
Symbol 153 MovieClipUses:152Used by:184
Symbol 154 TextUses:2Used by:184
Symbol 155 TextUses:2Used by:184
Symbol 156 TextUses:2Used by:184
Symbol 157 GraphicUsed by:184
Symbol 158 GraphicUsed by:159
Symbol 159 MovieClipUses:158Used by:184
Symbol 160 GraphicUsed by:161 457
Symbol 161 MovieClipUses:160Used by:184
Symbol 162 GraphicUsed by:163 453
Symbol 163 MovieClipUses:162Used by:184
Symbol 164 GraphicUsed by:165
Symbol 165 MovieClipUses:164Used by:184
Symbol 166 GraphicUsed by:167
Symbol 167 MovieClipUses:166Used by:184
Symbol 168 GraphicUsed by:169
Symbol 169 MovieClipUses:168Used by:184
Symbol 170 GraphicUsed by:171
Symbol 171 MovieClipUses:170Used by:184
Symbol 172 GraphicUsed by:184
Symbol 173 GraphicUsed by:174 181 949
Symbol 174 MovieClipUses:173Used by:184
Symbol 175 GraphicUsed by:176 177 182 950 955 963
Symbol 176 MovieClipUses:175Used by:184
Symbol 177 MovieClipUses:175Used by:184
Symbol 178 GraphicUsed by:179 958
Symbol 179 MovieClipUses:178Used by:184
Symbol 180 GraphicUsed by:184
Symbol 181 MovieClipUses:173Used by:184
Symbol 182 MovieClipUses:175Used by:184
Symbol 183 GraphicUsed by:184
Symbol 184 MovieClip {uimain_howtoplay1} [uimain_howtoplay1]Uses:123 23 124 125 126 127 128 144 145 146 148 150 151 153 154 155 156 157 159 161 163 165 167 169 171 172 174 176 177 179 180 181 182 183
Symbol 185 TextUses:2Used by:195
Symbol 186 TextUses:2Used by:195
Symbol 187 GraphicUsed by:188 189
Symbol 188 MovieClipUses:187Used by:189
Symbol 189 MovieClip {soapButton} [soapButton]Uses:187 188Used by:195
Symbol 190 GraphicUsed by:193
Symbol 191 GraphicUsed by:192
Symbol 192 MovieClipUses:191Used by:193
Symbol 193 MovieClip {buttonSeek} [buttonSeek]Uses:190 192Used by:195
Symbol 194 TextUses:2Used by:195
Symbol 195 MovieClip {uimain_credits} [uimain_credits]Uses:185 186 189 193 194
Symbol 196 TextUses:2Used by:215
Symbol 197 EditableTextUses:2Used by:215
Symbol 198 GraphicUsed by:214 561 604
Symbol 199 GraphicUsed by:203
Symbol 200 GraphicUsed by:203
Symbol 201 GraphicUsed by:202
Symbol 202 MovieClipUses:201Used by:203
Symbol 203 MovieClipUses:199 200 202Used by:214
Symbol 204 GraphicUsed by:205
Symbol 205 MovieClipUses:204Used by:214
Symbol 206 GraphicUsed by:207
Symbol 207 MovieClipUses:206Used by:214
Symbol 208 TextUses:2Used by:214
Symbol 209 EditableTextUses:2 33Used by:214
Symbol 210 FontUsed by:211 212 465 466
Symbol 211 EditableTextUses:210Used by:214
Symbol 212 EditableTextUses:210Used by:214
Symbol 213 MovieClip {assets_fla.mc_415} [assets_fla.mc_415]Used by:214
Symbol 214 MovieClip {levelSelecButton} [levelSelecButton]Uses:198 203 205 207 208 209 211 212 213Used by:215
Symbol 215 MovieClip {uimain_levelSelect} [uimain_levelSelect]Uses:196 197 214 23 26
Symbol 216 TextUses:33Used by:218
Symbol 217 GraphicUsed by:218
Symbol 218 MovieClip {uimain_leadin} [uimain_leadin]Uses:216 217
Symbol 219 GraphicUsed by:223
Symbol 220 TextUses:2Used by:221
Symbol 221 MovieClipUses:66 220Used by:222
Symbol 222 MovieClip {closeButtonMain} [closeButtonMain]Uses:221Used by:223
Symbol 223 MovieClip {uimain_base} [uimain_base]Uses:219 222
Symbol 224 TextUses:2Used by:252
Symbol 225 GraphicUsed by:252
Symbol 226 TextUses:2Used by:252 428
Symbol 227 GraphicUsed by:228 231 245 248
Symbol 228 MovieClipUses:227Used by:252 428
Symbol 229 TextUses:2Used by:252 428
Symbol 230 TextUses:2Used by:252 428
Symbol 231 MovieClipUses:227Used by:252 428
Symbol 232 TextUses:2Used by:252 428
Symbol 233 TextUses:2Used by:252 428
Symbol 234 GraphicUsed by:235
Symbol 235 MovieClipUses:234Used by:252 428
Symbol 236 TextUses:2Used by:252 428
Symbol 237 TextUses:2Used by:252 428
Symbol 238 TextUses:2Used by:252 428
Symbol 239 GraphicUsed by:252 428
Symbol 240 GraphicUsed by:241
Symbol 241 MovieClipUses:240Used by:252 428
Symbol 242 GraphicUsed by:252
Symbol 243 TextUses:2Used by:252 428
Symbol 244 TextUses:2Used by:252 428
Symbol 245 MovieClipUses:227Used by:252 428
Symbol 246 GraphicUsed by:252 428
Symbol 247 GraphicUsed by:252 428
Symbol 248 MovieClipUses:227Used by:252 428
Symbol 249 GraphicUsed by:252 428
Symbol 250 GraphicUsed by:252 428
Symbol 251 TextUses:2Used by:252 281
Symbol 252 MovieClip {uimain_howtoplay3} [uimain_howtoplay3]Uses:123 125 128 224 225 226 228 229 230 231 232 233 235 236 237 238 239 241 242 243 244 245 246 247 248 249 250 26 251
Symbol 253 BitmapUsed by:254
Symbol 254 GraphicUses:253Used by:255
Symbol 255 MovieClip {g_cheat} [g_cheat]Uses:254
Symbol 256 TextUses:2Used by:281
Symbol 257 TextUses:2Used by:281
Symbol 258 GraphicUsed by:262 266
Symbol 259 GraphicUsed by:262
Symbol 260 MovieClipUses:137Used by:262 266
Symbol 261 GraphicUsed by:262 266
Symbol 262 MovieClipUses:129 258 132 133 135 259 260 261 141 143Used by:281
Symbol 263 TextUses:2Used by:281
Symbol 264 TextUses:2Used by:281
Symbol 265 GraphicUsed by:266
Symbol 266 MovieClipUses:129 258 132 133 135 265 260 261 141 143Used by:281
Symbol 267 GraphicUsed by:281
Symbol 268 GraphicUsed by:269
Symbol 269 MovieClipUses:268Used by:281
Symbol 270 GraphicUsed by:281
Symbol 271 MovieClipUses:66Used by:281
Symbol 272 GraphicUsed by:281
Symbol 273 GraphicUsed by:274
Symbol 274 MovieClipUses:273Used by:281
Symbol 275 GraphicUsed by:276 703
Symbol 276 MovieClipUses:275Used by:281
Symbol 277 GraphicUsed by:281
Symbol 278 GraphicUsed by:279
Symbol 279 MovieClipUses:278Used by:281
Symbol 280 GraphicUsed by:281
Symbol 281 MovieClip {uimain_howtoplay2} [uimain_howtoplay2]Uses:123 125 26 256 257 128 262 263 264 266 267 269 270 271 272 274 276 277 279 280 251 23 124
Symbol 282 BitmapUsed by:283
Symbol 283 GraphicUses:282Used by:284
Symbol 284 MovieClipUses:283Used by:285
Symbol 285 MovieClipUses:284Used by:373
Symbol 286 BitmapUsed by:287
Symbol 287 GraphicUses:286Used by:288
Symbol 288 MovieClipUses:287Used by:289
Symbol 289 MovieClipUses:288Used by:373
Symbol 290 GraphicUsed by:291
Symbol 291 MovieClipUses:290Used by:298
Symbol 292 GraphicUsed by:293
Symbol 293 MovieClipUses:292Used by:298
Symbol 294 GraphicUsed by:295
Symbol 295 MovieClipUses:294Used by:298
Symbol 296 GraphicUsed by:297
Symbol 297 MovieClipUses:296Used by:298
Symbol 298 MovieClipUses:291 293 295 297Used by:373
Symbol 299 GraphicUsed by:305
Symbol 300 GraphicUsed by:301
Symbol 301 MovieClipUses:300Used by:302
Symbol 302 MovieClipUses:301Used by:305
Symbol 303 GraphicUsed by:305
Symbol 304 GraphicUsed by:305
Symbol 305 MovieClipUses:299 302 303 304Used by:306
Symbol 306 MovieClipUses:305Used by:373
Symbol 307 BitmapUsed by:308
Symbol 308 GraphicUses:307Used by:309
Symbol 309 MovieClipUses:308Used by:317 372
Symbol 310 BitmapUsed by:311
Symbol 311 GraphicUses:310Used by:312
Symbol 312 MovieClipUses:311Used by:313
Symbol 313 MovieClipUses:312Used by:317
Symbol 314 BitmapUsed by:315
Symbol 315 GraphicUses:314Used by:316
Symbol 316 MovieClipUses:315Used by:317 372
Symbol 317 MovieClipUses:309 313 316Used by:373
Symbol 318 ShapeTweeningUsed by:373
Symbol 319 GraphicUsed by:321
Symbol 320 GraphicUsed by:321
Symbol 321 MovieClipUses:319 320Used by:340
Symbol 322 GraphicUsed by:340
Symbol 323 GraphicUsed by:324 325
Symbol 324 MovieClipUses:323Used by:340
Symbol 325 MovieClipUses:323Used by:340
Symbol 326 BitmapUsed by:327
Symbol 327 GraphicUses:326Used by:340
Symbol 328 GraphicUsed by:329 330 336 491 492 493 494 495 496 621 622 627 628 662 836
Symbol 329 MovieClipUses:328Used by:340
Symbol 330 MovieClipUses:328Used by:340
Symbol 331 GraphicUsed by:332
Symbol 332 MovieClipUses:331Used by:340
Symbol 333 GraphicUsed by:334
Symbol 334 MovieClipUses:333Used by:340
Symbol 335 GraphicUsed by:340
Symbol 336 MovieClipUses:328Used by:337
Symbol 337 MovieClipUses:336Used by:340
Symbol 338 GraphicUsed by:340
Symbol 339 GraphicUsed by:340
Symbol 340 MovieClipUses:321 322 324 325 327 329 330 332 334 335 337 338 339Used by:341
Symbol 341 MovieClip {assets_fla.ui_259} [assets_fla.ui_259]Uses:340Used by:373
Symbol 342 ShapeTweeningUsed by:373
Symbol 343 GraphicUsed by:370
Symbol 344 GraphicUsed by:346
Symbol 345 GraphicUsed by:346
Symbol 346 MovieClipUses:344 345Used by:370
Symbol 347 GraphicUsed by:348
Symbol 348 MovieClipUses:347Used by:370
Symbol 349 BitmapUsed by:350
Symbol 350 GraphicUses:349Used by:351
Symbol 351 MovieClipUses:350Used by:370
Symbol 352 BitmapUsed by:353
Symbol 353 GraphicUses:352Used by:370
Symbol 354 GraphicUsed by:355
Symbol 355 MovieClipUses:354Used by:370
Symbol 356 GraphicUsed by:357 360 363
Symbol 357 MovieClipUses:356Used by:359
Symbol 358 GraphicUsed by:359
Symbol 359 MovieClipUses:357 358Used by:370
Symbol 360 MovieClipUses:356Used by:362
Symbol 361 GraphicUsed by:362
Symbol 362 MovieClipUses:360 361Used by:370
Symbol 363 MovieClipUses:356Used by:365 367 369
Symbol 364 GraphicUsed by:365
Symbol 365 MovieClipUses:363 364Used by:370
Symbol 366 GraphicUsed by:367
Symbol 367 MovieClipUses:363 366Used by:370
Symbol 368 GraphicUsed by:369
Symbol 369 MovieClipUses:363 368Used by:370
Symbol 370 MovieClipUses:343 346 348 351 353 355 359 362 365 367 369Used by:373
Symbol 371 GraphicUsed by:373
Symbol 372 MovieClip {assets_fla.ui_285} [assets_fla.ui_285]Uses:316 309Used by:373
Symbol 373 MovieClip {assets_fla.ui_240} [assets_fla.ui_240]Uses:285 289 298 306 317 318 341 342 370 371 372Used by:375
Symbol 374 GraphicUsed by:375
Symbol 375 MovieClip {uimain_introscreen} [uimain_introscreen]Uses:373 374
Symbol 376 Sound {snd_collect} [snd_collect]
Symbol 377 Sound {shipthrust} [shipthrust]
Symbol 378 Sound {metal1} [metal1]
Symbol 379 Sound {mediumMetalThud1} [mediumMetalThud1]
Symbol 380 Sound {snd_smallHit2} [snd_smallHit2]
Symbol 381 Sound {snd_smallhit4} [snd_smallhit4]
Symbol 382 Sound {win4} [win4]
Symbol 383 Sound {bubble2} [bubble2]
Symbol 384 Sound {combust} [combust]
Symbol 385 Sound {tentacle3} [tentacle3]
Symbol 386 Sound {snd_smallhit3} [snd_smallhit3]
Symbol 387 Sound {bubble1} [bubble1]
Symbol 388 Sound {diamondRoidSplode1} [diamondRoidSplode1]
Symbol 389 Sound {shipBoom} [shipBoom]
Symbol 390 Sound {tentacle4} [tentacle4]
Symbol 391 Sound {tentacle2} [tentacle2]
Symbol 392 Sound {snd_smallhit5} [snd_smallhit5]
Symbol 393 Sound {swarm_gun_07} [swarm_gun_07]
Symbol 394 Sound {heavyMetalThud2} [heavyMetalThud2]
Symbol 395 Sound {lightMetalThud3} [lightMetalThud3]
Symbol 396 Sound {tentacle1} [tentacle1]
Symbol 397 Sound {smallHit} [smallHit]
Symbol 398 Sound {gameover} [gameover]
Symbol 399 Sound {asteroidSplode} [asteroidSplode]
Symbol 400 Sound {mediumMetalThud4} [mediumMetalThud4]
Symbol 401 Sound {lightMetalThud1} [lightMetalThud1]
Symbol 402 Sound {alienSplode} [alienSplode]
Symbol 403 Sound {enemyFire_00} [enemyFire_00]
Symbol 404 Sound {asteroidSplode2} [asteroidSplode2]
Symbol 405 Sound {lowFuel} [lowFuel]
Symbol 406 Sound {menuloop} [menuloop]
Symbol 407 Sound {heavyMetalThud3} [heavyMetalThud3]
Symbol 408 Sound {gameloop} [gameloop]
Symbol 409 Sound {metal3} [metal3]
Symbol 410 Sound {heavyMetalThud1} [heavyMetalThud1]
Symbol 411 Sound {lowHealth} [lowHealth]
Symbol 412 Sound {diamondRoidSplode2} [diamondRoidSplode2]
Symbol 413 Sound {lightMetalthud2} [lightMetalthud2]
Symbol 414 Sound {bubble3} [bubble3]
Symbol 415 Sound {laser2} [laser2]
Symbol 416 Sound {swarm_gun_08} [swarm_gun_08]
Symbol 417 Sound {metal2} [metal2]
Symbol 418 Sound {mediumMetalThud2} [mediumMetalThud2]
Symbol 419 Sound {Thrust_1} [Thrust_1]
Symbol 420 Sound {mediumMetalThud3} [mediumMetalThud3]
Symbol 421 Sound {metal4} [metal4]
Symbol 422 Sound {tractorBeam} [tractorBeam]
Symbol 423 GraphicUsed by:428
Symbol 424 TextUses:2Used by:428
Symbol 425 TextUses:2Used by:428
Symbol 426 GraphicUsed by:428
Symbol 427 GraphicUsed by:428
Symbol 428 MovieClip {gClip_controlHint} [gClip_controlHint]Uses:423 424 425 426 226 228 229 230 231 232 233 235 236 237 238 239 241 427 243 244 245 246 247 248 249 250
Symbol 429 GraphicUsed by:439
Symbol 430 TextUses:2Used by:439
Symbol 431 TextUses:2Used by:439
Symbol 432 EditableTextUses:2Used by:439
Symbol 433 TextUses:2Used by:439
Symbol 434 EditableTextUses:2Used by:439
Symbol 435 TextUses:2Used by:439
Symbol 436 EditableTextUses:2Used by:439
Symbol 437 TextUses:2Used by:439
Symbol 438 EditableTextUses:2Used by:439
Symbol 439 MovieClip {ui_levelComplete} [ui_levelComplete]Uses:429 430 431 432 433 434 435 436 437 438
Symbol 440 BitmapUsed by:441
Symbol 441 GraphicUses:440Used by:442
Symbol 442 MovieClip {gClip_radarBlip} [gClip_radarBlip]Uses:441
Symbol 443 BitmapUsed by:444
Symbol 444 GraphicUses:443Used by:462
Symbol 445 BitmapUsed by:446
Symbol 446 GraphicUses:445Used by:447
Symbol 447 MovieClipUses:446Used by:462
Symbol 448 GraphicUsed by:449
Symbol 449 MovieClipUses:448Used by:453 457
Symbol 450 GraphicUsed by:451
Symbol 451 MovieClipUses:450Used by:452
Symbol 452 MovieClipUses:451Used by:453
Symbol 453 MovieClipUses:449 162 452Used by:462
Symbol 454 GraphicUsed by:455
Symbol 455 MovieClipUses:454Used by:456
Symbol 456 MovieClipUses:455Used by:457
Symbol 457 MovieClipUses:449 160 456Used by:462
Symbol 458 MovieClipUsed by:462
Symbol 459 EditableTextUses:2 33Used by:462
Symbol 460 EditableTextUses:2 33Used by:462
Symbol 461 EditableTextUses:2 33Used by:462
Symbol 462 MovieClip {gClip_HUD} [gClip_HUD]Uses:444 447 453 457 458 459 460 461
Symbol 463 BitmapUsed by:464
Symbol 464 GraphicUses:463Used by:467
Symbol 465 EditableTextUses:210Used by:467
Symbol 466 EditableTextUses:210Used by:467
Symbol 467 MovieClip {ui_roundNumber} [ui_roundNumber]Uses:464 465 466
Symbol 468 GraphicUsed by:472
Symbol 469 TextUses:2Used by:472
Symbol 470 TextUses:2Used by:472
Symbol 471 TextUses:2Used by:472
Symbol 472 MovieClip {uimain_confirmQuit} [uimain_confirmQuit]Uses:468 469 45 470 471
Symbol 473 GraphicUsed by:476
Symbol 474 GraphicUsed by:475
Symbol 475 MovieClipUses:474Used by:476
Symbol 476 MovieClip {buttonPinkGenericSmaller} [buttonPinkGenericSmaller]Uses:473 475Used by:478
Symbol 477 TextUses:2Used by:478
Symbol 478 MovieClip {ui_mainMenuButton} [ui_mainMenuButton]Uses:476 477
Symbol 479 GraphicUsed by:499
Symbol 480 GraphicUsed by:481
Symbol 481 MovieClipUses:480Used by:499
Symbol 482 GraphicUsed by:499
Symbol 483 GraphicUsed by:484
Symbol 484 MovieClipUses:483Used by:485
Symbol 485 MovieClipUses:484Used by:499
Symbol 486 GraphicUsed by:499
Symbol 487 GraphicUsed by:489
Symbol 488 GraphicUsed by:489
Symbol 489 MovieClipUses:487 488Used by:499
Symbol 490 GraphicUsed by:499
Symbol 491 MovieClipUses:328Used by:499
Symbol 492 MovieClipUses:328Used by:499
Symbol 493 MovieClipUses:328Used by:499
Symbol 494 MovieClipUses:328Used by:499
Symbol 495 MovieClipUses:328Used by:499
Symbol 496 MovieClipUses:328Used by:499
Symbol 497 GraphicUsed by:498
Symbol 498 MovieClipUses:497Used by:499
Symbol 499 MovieClip {ui_gameOver} [ui_gameOver]Uses:479 481 482 485 486 489 490 491 492 493 494 495 496 498
Symbol 500 GraphicUsed by:503
Symbol 501 ShapeTweeningUsed by:503
Symbol 502 GraphicUsed by:503
Symbol 503 MovieClipUses:500 501 502Used by:505
Symbol 504 EditableTextUses:11Used by:505
Symbol 505 MovieClip {ui_scoreBlip} [ui_scoreBlip]Uses:503 504
Symbol 506 ShapeTweeningUsed by:509
Symbol 507 ShapeTweeningUsed by:509
Symbol 508 GraphicUsed by:509
Symbol 509 MovieClip {gClip_roidParticle1} [gClip_roidParticle1]Uses:506 507 508
Symbol 510 ShapeTweeningUsed by:513
Symbol 511 ShapeTweeningUsed by:513
Symbol 512 GraphicUsed by:513
Symbol 513 MovieClip {gClip_roidParticle2} [gClip_roidParticle2]Uses:510 511 512
Symbol 514 GraphicUsed by:517
Symbol 515 GraphicUsed by:517
Symbol 516 GraphicUsed by:517
Symbol 517 MovieClip {gClip_signPost} [gClip_signPost]Uses:514 515 516
Symbol 518 ShapeTweeningUsed by:521
Symbol 519 ShapeTweeningUsed by:521
Symbol 520 GraphicUsed by:521
Symbol 521 MovieClip {gClip_motionParticle} [gClip_motionParticle]Uses:518 519 520
Symbol 522 GraphicUsed by:523
Symbol 523 MovieClip {gClip_bgGradient} [gClip_bgGradient]Uses:522
Symbol 524 GraphicUsed by:525
Symbol 525 MovieClipUses:524Used by:526
Symbol 526 MovieClip {gClip_roidShard_10} [gClip_roidShard_10]Uses:525
Symbol 527 GraphicUsed by:538
Symbol 528 GraphicUsed by:538
Symbol 529 GraphicUsed by:538
Symbol 530 GraphicUsed by:538
Symbol 531 GraphicUsed by:538
Symbol 532 GraphicUsed by:538
Symbol 533 GraphicUsed by:538
Symbol 534 GraphicUsed by:538
Symbol 535 GraphicUsed by:538
Symbol 536 GraphicUsed by:538
Symbol 537 GraphicUsed by:538
Symbol 538 MovieClip {gClip_bonusItems} [gClip_bonusItems]Uses:527 528 529 530 531 532 533 534 535 536 537
Symbol 539 GraphicUsed by:555
Symbol 540 GraphicUsed by:541
Symbol 541 MovieClipUses:540Used by:555
Symbol 542 GraphicUsed by:555
Symbol 543 GraphicUsed by:545
Symbol 544 GraphicUsed by:545
Symbol 545 MovieClipUses:543 544Used by:555
Symbol 546 GraphicUsed by:547
Symbol 547 MovieClipUses:546Used by:555
Symbol 548 GraphicUsed by:549
Symbol 549 MovieClipUses:548Used by:555
Symbol 550 GraphicUsed by:551
Symbol 551 MovieClipUses:550Used by:555
Symbol 552 GraphicUsed by:553
Symbol 553 MovieClipUses:552Used by:555
Symbol 554 GraphicUsed by:555
Symbol 555 MovieClipUses:539 541 542 545 547 549 551 553 554Used by:561
Symbol 556 GraphicUsed by:557 559
Symbol 557 MovieClipUses:556Used by:558
Symbol 558 MovieClipUses:557Used by:561
Symbol 559 MovieClipUses:556Used by:560
Symbol 560 MovieClipUses:559Used by:561
Symbol 561 MovieClip {gClip_rocketShip} [gClip_rocketShip]Uses:198 555 558 560
Symbol 562 ShapeTweeningUsed by:566
Symbol 563 GraphicUsed by:566 902 909
Symbol 564 ShapeTweeningUsed by:566
Symbol 565 GraphicUsed by:566
Symbol 566 MovieClip {gClip_enemyAmmoParticle} [gClip_enemyAmmoParticle]Uses:562 563 564 565
Symbol 567 GraphicUsed by:597 752 780 981
Symbol 568 GraphicUsed by:597
Symbol 569 GraphicUsed by:597
Symbol 570 GraphicUsed by:597
Symbol 571 GraphicUsed by:597
Symbol 572 GraphicUsed by:597
Symbol 573 GraphicUsed by:597
Symbol 574 GraphicUsed by:597
Symbol 575 GraphicUsed by:597
Symbol 576 GraphicUsed by:597
Symbol 577 GraphicUsed by:597
Symbol 578 GraphicUsed by:597
Symbol 579 GraphicUsed by:597
Symbol 580 GraphicUsed by:597
Symbol 581 GraphicUsed by:597
Symbol 582 GraphicUsed by:597
Symbol 583 GraphicUsed by:597
Symbol 584 GraphicUsed by:597
Symbol 585 GraphicUsed by:597
Symbol 586 GraphicUsed by:597
Symbol 587 GraphicUsed by:597
Symbol 588 GraphicUsed by:597
Symbol 589 GraphicUsed by:597
Symbol 590 GraphicUsed by:597
Symbol 591 GraphicUsed by:597
Symbol 592 GraphicUsed by:597
Symbol 593 GraphicUsed by:597
Symbol 594 GraphicUsed by:597
Symbol 595 GraphicUsed by:597
Symbol 596 GraphicUsed by:597
Symbol 597 MovieClip {gClip_bgAsteroids} [gClip_bgAsteroids]Uses:567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596
Symbol 598 GraphicUsed by:599
Symbol 599 MovieClipUses:598Used by:604
Symbol 600 GraphicUsed by:601
Symbol 601 MovieClipUses:600Used by:604
Symbol 602 GraphicUsed by:603
Symbol 603 MovieClipUses:602Used by:604
Symbol 604 MovieClip {gClip_diamond} [gClip_diamond]Uses:198 599 601 603
Symbol 605 GraphicUsed by:662
Symbol 606 GraphicUsed by:607
Symbol 607 MovieClipUses:606Used by:662
Symbol 608 GraphicUsed by:662
Symbol 609 GraphicUsed by:610 830 832
Symbol 610 MovieClipUses:609Used by:662
Symbol 611 GraphicUsed by:612
Symbol 612 MovieClipUses:611Used by:662
Symbol 613 GraphicUsed by:620
Symbol 614 GraphicUsed by:615
Symbol 615 MovieClipUses:614Used by:620
Symbol 616 GraphicUsed by:617
Symbol 617 MovieClipUses:616Used by:620
Symbol 618 GraphicUsed by:619
Symbol 619 MovieClipUses:618Used by:620
Symbol 620 MovieClipUses:613 615 617 619Used by:662
Symbol 621 MovieClipUses:328Used by:662
Symbol 622 MovieClipUses:328Used by:662
Symbol 623 GraphicUsed by:625
Symbol 624 GraphicUsed by:625
Symbol 625 MovieClipUses:623 624Used by:626
Symbol 626 MovieClipUses:625Used by:662
Symbol 627 MovieClipUses:328Used by:662
Symbol 628 MovieClipUses:328Used by:662
Symbol 629 GraphicUsed by:662
Symbol 630 GraphicUsed by:639
Symbol 631 GraphicUsed by:632
Symbol 632 MovieClipUses:631Used by:639
Symbol 633 GraphicUsed by:634
Symbol 634 MovieClipUses:633Used by:639
Symbol 635 GraphicUsed by:636
Symbol 636 MovieClipUses:635Used by:639
Symbol 637 GraphicUsed by:638
Symbol 638 MovieClipUses:637Used by:639
Symbol 639 MovieClipUses:630 632 634 636 638Used by:662
Symbol 640 GraphicUsed by:641
Symbol 641 MovieClipUses:640Used by:662
Symbol 642 GraphicUsed by:662
Symbol 643 GraphicUsed by:644
Symbol 644 MovieClipUses:643Used by:662
Symbol 645 GraphicUsed by:646
Symbol 646 MovieClipUses:645Used by:662
Symbol 647 GraphicUsed by:648
Symbol 648 MovieClipUses:647Used by:662
Symbol 649 GraphicUsed by:662
Symbol 650 GraphicUsed by:651
Symbol 651 MovieClipUses:650Used by:662
Symbol 652 GraphicUsed by:653
Symbol 653 MovieClipUses:652Used by:662
Symbol 654 GraphicUsed by:655
Symbol 655 MovieClipUses:654Used by:662
Symbol 656 GraphicUsed by:662
Symbol 657 GraphicUsed by:658
Symbol 658 MovieClipUses:657Used by:662
Symbol 659 GraphicUsed by:660
Symbol 660 MovieClipUses:659Used by:662
Symbol 661 GraphicUsed by:662
Symbol 662 MovieClip {gClip_planet1} [gClip_planet1]Uses:605 607 608 610 612 620 621 622 328 626 627 628 629 639 641 642 644 646 648 649 651 653 655 656 658 660 661
Symbol 663 GraphicUsed by:664
Symbol 664 MovieClipUses:663Used by:665
Symbol 665 MovieClip {gClip_roidShard_1} [gClip_roidShard_1]Uses:664
Symbol 666 GraphicUsed by:675 686 724 749 783 818 879 912 924 1027
Symbol 667 GraphicUsed by:675
Symbol 668 GraphicUsed by:675
Symbol 669 GraphicUsed by:675
Symbol 670 GraphicUsed by:675
Symbol 671 GraphicUsed by:675
Symbol 672 GraphicUsed by:675
Symbol 673 GraphicUsed by:675
Symbol 674 GraphicUsed by:675
Symbol 675 MovieClip {gClip_rocketShrap} [gClip_rocketShrap]Uses:666 667 668 669 670 671 672 673 674
Symbol 676 GraphicUsed by:683
Symbol 677 GraphicUsed by:678
Symbol 678 MovieClipUses:677Used by:683 701 746 799 875 940
Symbol 679 TextUses:2Used by:683
Symbol 680 GraphicUsed by:681
Symbol 681 MovieClipUses:680Used by:683 701 746 799 803 875
Symbol 682 TextUses:2Used by:683
Symbol 683 MovieClip {gClip_hintClip3} [gClip_hintClip3]Uses:676 678 679 681 682
Symbol 684 GraphicUsed by:685
Symbol 685 MovieClipUses:684Used by:686
Symbol 686 MovieClip {gClip_ammoSeeker} [gClip_ammoSeeker]Uses:666 685
Symbol 687 GraphicUsed by:688
Symbol 688 MovieClipUses:687Used by:689
Symbol 689 MovieClip {gClip_roidShard_8} [gClip_roidShard_8]Uses:688
Symbol 690 GraphicUsed by:693 838
Symbol 691 GraphicUsed by:692
Symbol 692 MovieClipUses:691Used by:693
Symbol 693 MovieClip {gClip_laserBeam} [gClip_laserBeam]Uses:690 692
Symbol 694 GraphicUsed by:697
Symbol 695 GraphicUsed by:696
Symbol 696 MovieClipUses:695Used by:697
Symbol 697 MovieClip {gClip_fuel} [gClip_fuel]Uses:694 696
Symbol 698 GraphicUsed by:701
Symbol 699 TextUses:2Used by:701
Symbol 700 TextUses:2Used by:701
Symbol 701 MovieClip {gClip_hintClip4} [gClip_hintClip4]Uses:698 678 699 700 681
Symbol 702 GraphicUsed by:706
Symbol 703 MovieClipUses:275Used by:705
Symbol 704 GraphicUsed by:705
Symbol 705 MovieClipUses:703 704Used by:706
Symbol 706 MovieClip {gClip_turretBase} [gClip_turretBase]Uses:702 705
Symbol 707 GraphicUsed by:721 733
Symbol 708 GraphicUsed by:709 712
Symbol 709 MovieClipUses:708Used by:721
Symbol 710 GraphicUsed by:712
Symbol 711 GraphicUsed by:712
Symbol 712 MovieClipUses:708 710 711Used by:721 733
Symbol 713 GraphicUsed by:721
Symbol 714 GraphicUsed by:721
Symbol 715 GraphicUsed by:721
Symbol 716 GraphicUsed by:721
Symbol 717 GraphicUsed by:721
Symbol 718 GraphicUsed by:721
Symbol 719 GraphicUsed by:721
Symbol 720 GraphicUsed by:721
Symbol 721 MovieClip {gClip_alienShooterLite} [gClip_alienShooterLite]Uses:707 709 712 713 714 715 716 717 718 719 720
Symbol 722 GraphicUsed by:723
Symbol 723 MovieClipUses:722Used by:724
Symbol 724 MovieClip {gClip_ammoSeekerHeavy} [gClip_ammoSeekerHeavy]Uses:666 723
Symbol 725 GraphicUsed by:733 770
Symbol 726 GraphicUsed by:733
Symbol 727 GraphicUsed by:733
Symbol 728 GraphicUsed by:733
Symbol 729 GraphicUsed by:733
Symbol 730 GraphicUsed by:733
Symbol 731 GraphicUsed by:733
Symbol 732 GraphicUsed by:733
Symbol 733 MovieClip {gClip_alienShooter} [gClip_alienShooter]Uses:707 712 725 726 727 728 729 730 731 732
Symbol 734 GraphicUsed by:740 870
Symbol 735 GraphicUsed by:739
Symbol 736 GraphicUsed by:737
Symbol 737 MovieClipUses:736Used by:738
Symbol 738 MovieClipUses:737Used by:739
Symbol 739 MovieClipUses:735 738Used by:740
Symbol 740 MovieClip {gClip_asteroidWall} [gClip_asteroidWall]Uses:734 739
Symbol 741 GraphicUsed by:746
Symbol 742 GraphicUsed by:746
Symbol 743 TextUses:2Used by:746
Symbol 744 TextUses:2Used by:746
Symbol 745 TextUses:2Used by:746
Symbol 746 MovieClip {gClip_hintClip2} [gClip_hintClip2]Uses:741 678 742 743 744 745 681
Symbol 747 GraphicUsed by:748
Symbol 748 MovieClipUses:747Used by:749
Symbol 749 MovieClip {gClip_poisonBubble} [gClip_poisonBubble]Uses:666 748
Symbol 750 GraphicUsed by:751
Symbol 751 MovieClipUses:750Used by:752
Symbol 752 MovieClip {gClip_starBG} [gClip_starBG]Uses:567 751
Symbol 753 ShapeTweeningUsed by:756
Symbol 754 ShapeTweeningUsed by:756
Symbol 755 GraphicUsed by:756
Symbol 756 MovieClip {gClip_ammoParticle1} [gClip_ammoParticle1]Uses:753 754 755
Symbol 757 ShapeTweeningUsed by:760
Symbol 758 ShapeTweeningUsed by:760
Symbol 759 GraphicUsed by:760
Symbol 760 MovieClip {gClip_tinyPuff1} [gClip_tinyPuff1]Uses:757 758 759
Symbol 761 GraphicUsed by:762
Symbol 762 MovieClipUses:761Used by:770 829
Symbol 763 GraphicUsed by:770
Symbol 764 GraphicUsed by:770
Symbol 765 GraphicUsed by:770
Symbol 766 GraphicUsed by:770
Symbol 767 GraphicUsed by:770
Symbol 768 GraphicUsed by:770
Symbol 769 GraphicUsed by:770
Symbol 770 MovieClip {gClip_alienBumper} [gClip_alienBumper]Uses:762 725 763 764 765 766 767 768 769
Symbol 771 GraphicUsed by:772
Symbol 772 MovieClip {gClip_poisonBarrel} [gClip_poisonBarrel]Uses:771
Symbol 773 GraphicUsed by:780
Symbol 774 GraphicUsed by:775
Symbol 775 MovieClipUses:774Used by:780
Symbol 776 GraphicUsed by:777
Symbol 777 MovieClipUses:776Used by:780
Symbol 778 GraphicUsed by:780
Symbol 779 GraphicUsed by:780
Symbol 780 MovieClip {gClip_bgLargeObj} [gClip_bgLargeObj]Uses:567 773 775 777 778 779
Symbol 781 GraphicUsed by:782
Symbol 782 MovieClipUses:781Used by:783
Symbol 783 MovieClip {gClip_ammoMedium} [gClip_ammoMedium]Uses:666 782
Symbol 784 ShapeTweeningUsed by:788
Symbol 785 ShapeTweeningUsed by:788
Symbol 786 ShapeTweeningUsed by:788
Symbol 787 GraphicUsed by:788
Symbol 788 MovieClip {gClip_ammoParticle2} [gClip_ammoParticle2]Uses:784 785 786 787
Symbol 789 GraphicUsed by:794
Symbol 790 GraphicUsed by:791
Symbol 791 MovieClipUses:790Used by:794
Symbol 792 ShapeTweeningUsed by:794
Symbol 793 GraphicUsed by:794
Symbol 794 MovieClip {gClip_tractorBeam} [gClip_tractorBeam]Uses:789 791 792 793
Symbol 795 GraphicUsed by:799
Symbol 796 TextUses:2Used by:799
Symbol 797 TextUses:2Used by:799
Symbol 798 TextUses:2Used by:799
Symbol 799 MovieClip {gClip_hintClip1} [gClip_hintClip1]Uses:795 678 796 797 798 681
Symbol 800 GraphicUsed by:803
Symbol 801 TextUses:2Used by:803
Symbol 802 TextUses:2Used by:803
Symbol 803 MovieClip {gClip_hintClip6} [gClip_hintClip6]Uses:800 801 802 681
Symbol 804 GraphicUsed by:805
Symbol 805 MovieClipUses:804Used by:806
Symbol 806 MovieClip {gClip_roidShard_6} [gClip_roidShard_6]Uses:805
Symbol 807 GraphicUsed by:808
Symbol 808 MovieClipUses:807Used by:809
Symbol 809 MovieClip {gClip_roidShard_13} [gClip_roidShard_13]Uses:808
Symbol 810 GraphicUsed by:811
Symbol 811 MovieClipUses:810Used by:812
Symbol 812 MovieClip {gClip_roidShard_3} [gClip_roidShard_3]Uses:811
Symbol 813 GraphicUsed by:817
Symbol 814 GraphicUsed by:815
Symbol 815 MovieClipUses:814Used by:817
Symbol 816 GraphicUsed by:817
Symbol 817 MovieClipUses:813 815 816Used by:818
Symbol 818 MovieClip {gClip_asteroidBig} [gClip_asteroidBig]Uses:666 817
Symbol 819 GraphicUsed by:820
Symbol 820 MovieClipUses:819Used by:829
Symbol 821 GraphicUsed by:829
Symbol 822 GraphicUsed by:829
Symbol 823 GraphicUsed by:829
Symbol 824 GraphicUsed by:829
Symbol 825 GraphicUsed by:829
Symbol 826 GraphicUsed by:829
Symbol 827 GraphicUsed by:829
Symbol 828 GraphicUsed by:829
Symbol 829 MovieClip {gClip_alienBumperLite} [gClip_alienBumperLite]Uses:820 762 821 822 823 824 825 826 827 828
Symbol 830 MovieClipUses:609Used by:838
Symbol 831 GraphicUsed by:838
Symbol 832 MovieClipUses:609Used by:838
Symbol 833 GraphicUsed by:834
Symbol 834 MovieClipUses:833Used by:837
Symbol 835 GraphicUsed by:837
Symbol 836 MovieClipUses:328Used by:837
Symbol 837 MovieClipUses:834 835 836Used by:838
Symbol 838 MovieClip {gClip_laserNode} [gClip_laserNode]Uses:690 830 831 832 837
Symbol 839 GraphicUsed by:840
Symbol 840 MovieClipUses:839Used by:841
Symbol 841 MovieClip {gClip_roidShard_15} [gClip_roidShard_15]Uses:840
Symbol 842 ShapeTweeningUsed by:844
Symbol 843 GraphicUsed by:844
Symbol 844 MovieClip {gClip_exhaustParticle} [gClip_exhaustParticle]Uses:842 843
Symbol 845 GraphicUsed by:858 998
Symbol 846 GraphicUsed by:847
Symbol 847 MovieClipUses:846Used by:858
Symbol 848 GraphicUsed by:849
Symbol 849 MovieClipUses:848Used by:858
Symbol 850 GraphicUsed by:851
Symbol 851 MovieClipUses:850Used by:858
Symbol 852 GraphicUsed by:853
Symbol 853 MovieClipUses:852Used by:858
Symbol 854 GraphicUsed by:855
Symbol 855 MovieClipUses:854Used by:858
Symbol 856 GraphicUsed by:857
Symbol 857 MovieClipUses:856Used by:858
Symbol 858 MovieClip {gClip_blackHole} [gClip_blackHole]Uses:845 847 849 851 853 855 857
Symbol 859 GraphicUsed by:860
Symbol 860 MovieClipUses:859Used by:864 987
Symbol 861 GraphicUsed by:864 987
Symbol 862 GraphicUsed by:863
Symbol 863 MovieClipUses:862Used by:864
Symbol 864 MovieClip {gClip_TentacleTip} [gClip_TentacleTip]Uses:860 861 863
Symbol 865 GraphicUsed by:869
Symbol 866 GraphicUsed by:867
Symbol 867 MovieClipUses:866Used by:868
Symbol 868 MovieClipUses:867Used by:869
Symbol 869 MovieClipUses:865 868Used by:870
Symbol 870 MovieClip {gClip_asteroidWallSmall} [gClip_asteroidWallSmall]Uses:734 869
Symbol 871 GraphicUsed by:875
Symbol 872 TextUses:2Used by:875
Symbol 873 TextUses:2Used by:875
Symbol 874 TextUses:2Used by:875
Symbol 875 MovieClip {gClip_hintClip5} [gClip_hintClip5]Uses:871 678 872 873 874 681
Symbol 876 ShapeTweeningUsed by:879
Symbol 877 ShapeTweeningUsed by:879
Symbol 878 GraphicUsed by:879
Symbol 879 MovieClip {gClip_star} [gClip_star]Uses:666 876 877 878
Symbol 880 ShapeTweeningUsed by:897
Symbol 881 ShapeTweeningUsed by:897
Symbol 882 ShapeTweeningUsed by:897
Symbol 883 ShapeTweeningUsed by:897
Symbol 884 ShapeTweeningUsed by:897
Symbol 885 ShapeTweeningUsed by:897
Symbol 886 ShapeTweeningUsed by:897
Symbol 887 ShapeTweeningUsed by:897
Symbol 888 ShapeTweeningUsed by:897
Symbol 889 ShapeTweeningUsed by:897
Symbol 890 ShapeTweeningUsed by:897
Symbol 891 ShapeTweeningUsed by:897
Symbol 892 ShapeTweeningUsed by:897
Symbol 893 ShapeTweeningUsed by:897
Symbol 894 ShapeTweeningUsed by:897
Symbol 895 ShapeTweeningUsed by:897
Symbol 896 GraphicUsed by:897
Symbol 897 MovieClip {gClip_smokePuff} [gClip_smokePuff]Uses:880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896
Symbol 898 GraphicUsed by:899
Symbol 899 MovieClipUses:898Used by:902 909
Symbol 900 GraphicUsed by:901
Symbol 901 MovieClipUses:900Used by:902 909
Symbol 902 MovieClip {gClip_smokePuffSmall} [gClip_smokePuffSmall]Uses:563 899 901
Symbol 903 GraphicUsed by:904
Symbol 904 MovieClipUses:903Used by:905
Symbol 905 MovieClip {gClip_roidShard_14} [gClip_roidShard_14]Uses:904
Symbol 906 GraphicUsed by:907
Symbol 907 MovieClipUses:906Used by:908
Symbol 908 MovieClip {gClip_roidShard_9} [gClip_roidShard_9]Uses:907
Symbol 909 MovieClip {gClip_smokePuffTiny} [gClip_smokePuffTiny]Uses:563 901 899
Symbol 910 GraphicUsed by:911
Symbol 911 MovieClipUses:910Used by:912
Symbol 912 MovieClip {gClip_ammoHeavy} [gClip_ammoHeavy]Uses:666 911
Symbol 913 GraphicUsed by:914
Symbol 914 MovieClipUses:913Used by:915
Symbol 915 MovieClip {gClip_roidShard_2} [gClip_roidShard_2]Uses:914
Symbol 916 ShapeTweeningUsed by:921
Symbol 917 ShapeTweeningUsed by:921
Symbol 918 ShapeTweeningUsed by:921
Symbol 919 ShapeTweeningUsed by:921
Symbol 920 GraphicUsed by:921
Symbol 921 MovieClip {gClip_tinySpark} [gClip_tinySpark]Uses:916 917 918 919 920
Symbol 922 GraphicUsed by:923
Symbol 923 MovieClipUses:922Used by:924
Symbol 924 MovieClip {gClip_ammoBasic} [gClip_ammoBasic]Uses:666 923
Symbol 925 GraphicUsed by:926
Symbol 926 MovieClipUses:925Used by:927
Symbol 927 MovieClip {gClip_roidShard_12} [gClip_roidShard_12]Uses:926
Symbol 928 GraphicUsed by:936
Symbol 929 GraphicUsed by:936
Symbol 930 GraphicUsed by:931 932
Symbol 931 MovieClipUses:930Used by:932
Symbol 932 MovieClipUses:930 931Used by:936
Symbol 933 GraphicUsed by:936
Symbol 934 GraphicUsed by:936
Symbol 935 GraphicUsed by:936
Symbol 936 MovieClip {gClip_ammoPickup} [gClip_ammoPickup]Uses:928 929 932 933 934 935
Symbol 937 GraphicUsed by:940
Symbol 938 TextUses:2Used by:940
Symbol 939 TextUses:2Used by:940
Symbol 940 MovieClip {gClip_hintClip7} [gClip_hintClip7]Uses:937 678 938 939
Symbol 941 GraphicUsed by:942
Symbol 942 MovieClipUses:941Used by:943
Symbol 943 MovieClip {gClip_roidShard_7} [gClip_roidShard_7]Uses:942
Symbol 944 GraphicUsed by:947
Symbol 945 GraphicUsed by:946
Symbol 946 MovieClipUses:945Used by:947
Symbol 947 MovieClip {gClip_turretCannon} [gClip_turretCannon]Uses:944 946
Symbol 948 GraphicUsed by:981
Symbol 949 MovieClipUses:173Used by:981
Symbol 950 MovieClipUses:175Used by:981
Symbol 951 GraphicUsed by:981
Symbol 952 GraphicUsed by:981
Symbol 953 GraphicUsed by:954 962
Symbol 954 MovieClipUses:953Used by:981
Symbol 955 MovieClipUses:175Used by:981
Symbol 956 GraphicUsed by:957
Symbol 957 MovieClipUses:956Used by:981
Symbol 958 MovieClipUses:178Used by:981
Symbol 959 GraphicUsed by:981
Symbol 960 GraphicUsed by:981
Symbol 961 GraphicUsed by:981
Symbol 962 MovieClipUses:953Used by:981
Symbol 963 MovieClipUses:175Used by:981
Symbol 964 GraphicUsed by:981
Symbol 965 GraphicUsed by:966 979
Symbol 966 MovieClipUses:965Used by:981
Symbol 967 GraphicUsed by:981
Symbol 968 GraphicUsed by:981
Symbol 969 GraphicUsed by:970
Symbol 970 MovieClipUses:969Used by:981
Symbol 971 GraphicUsed by:972
Symbol 972 MovieClipUses:971Used by:981
Symbol 973 GraphicUsed by:981
Symbol 974 GraphicUsed by:981
Symbol 975 GraphicUsed by:976
Symbol 976 MovieClipUses:975Used by:981
Symbol 977 GraphicUsed by:978
Symbol 978 MovieClipUses:977Used by:981
Symbol 979 MovieClipUses:965Used by:981
Symbol 980 GraphicUsed by:981
Symbol 981 MovieClip {gClip_spaceDudes} [gClip_spaceDudes]Uses:567 948 949 950 951 952 954 955 957 958 959 960 961 962 963 964 966 967 968 970 972 973 974 976 978 979 980
Symbol 982 GraphicUsed by:983
Symbol 983 MovieClipUses:982Used by:984
Symbol 984 MovieClip {gClip_enemyAmmo} [gClip_enemyAmmo]Uses:983
Symbol 985 GraphicUsed by:986
Symbol 986 MovieClipUses:985Used by:987
Symbol 987 MovieClip {gClip_TentacleSegment} [gClip_TentacleSegment]Uses:860 861 986
Symbol 988 GraphicUsed by:989
Symbol 989 MovieClipUses:988Used by:990
Symbol 990 MovieClip {gClip_roidShard_11} [gClip_roidShard_11]Uses:989
Symbol 991 GraphicUsed by:992
Symbol 992 MovieClipUses:991Used by:993
Symbol 993 MovieClip {gClip_roidShard_4} [gClip_roidShard_4]Uses:992
Symbol 994 GraphicUsed by:995
Symbol 995 MovieClipUses:994Used by:998
Symbol 996 GraphicUsed by:997
Symbol 997 MovieClipUses:996Used by:998
Symbol 998 MovieClip {gClip_gasCloud} [gClip_gasCloud]Uses:845 995 997
Symbol 999 GraphicUsed by:1005
Symbol 1000 GraphicUsed by:1004
Symbol 1001 GraphicUsed by:1002
Symbol 1002 MovieClipUses:1001Used by:1004
Symbol 1003 GraphicUsed by:1004
Symbol 1004 MovieClipUses:1000 1002 1003Used by:1005
Symbol 1005 MovieClip {gClip_asteroidWallBig} [gClip_asteroidWallBig]Uses:999 1004
Symbol 1006 GraphicUsed by:1007
Symbol 1007 MovieClipUses:1006Used by:1008
Symbol 1008 MovieClip {gClip_roidShard_5} [gClip_roidShard_5]Uses:1007
Symbol 1009 ShapeTweeningUsed by:1021
Symbol 1010 ShapeTweeningUsed by:1021
Symbol 1011 ShapeTweeningUsed by:1021
Symbol 1012 ShapeTweeningUsed by:1021
Symbol 1013 GraphicUsed by:1021
Symbol 1014 GraphicUsed by:1021
Symbol 1015 GraphicUsed by:1021
Symbol 1016 GraphicUsed by:1021
Symbol 1017 GraphicUsed by:1021
Symbol 1018 GraphicUsed by:1021
Symbol 1019 GraphicUsed by:1021
Symbol 1020 GraphicUsed by:1021
Symbol 1021 MovieClip {gClip_ammoSplode} [gClip_ammoSplode]Uses:47 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020
Symbol 1022 GraphicUsed by:1026
Symbol 1023 GraphicUsed by:1024
Symbol 1024 MovieClipUses:1023Used by:1025
Symbol 1025 MovieClipUses:1024Used by:1026
Symbol 1026 MovieClipUses:1022 1025Used by:1027
Symbol 1027 MovieClip {gClip_asteroidMedium} [gClip_asteroidMedium]Uses:666 1026
Symbol 1028 GraphicUsed by:1032
Symbol 1029 GraphicUsed by:1030
Symbol 1030 MovieClipUses:1029Used by:1032
Symbol 1031 GraphicUsed by:1032
Symbol 1032 MovieClipUses:1028 1030 1031Used by:1033
Symbol 1033 MovieClip {gClip_diamondRoid} [gClip_diamondRoid]Uses:1032

Instance Names

"_pField"Symbol 5 MovieClip {uimain_loader} [uimain_loader] Frame 1Symbol 4 EditableText
"_base"Symbol 18 MovieClip Frame 1Symbol 17 MovieClip
"_nameField"Symbol 20 MovieClip Frame 1Symbol 12 EditableText
"_rankField"Symbol 20 MovieClip Frame 1Symbol 13 EditableText
"_scoreField"Symbol 20 MovieClip Frame 1Symbol 14 EditableText
"_flag"Symbol 20 MovieClip Frame 1Symbol 19 MovieClip
"_base"Symbol 23 MovieClip {htpNextButton} [htpNextButton] Frame 1Symbol 22 MovieClip
"_roll"Symbol 23 MovieClip {htpNextButton} [htpNextButton] Frame 1Symbol 22 MovieClip
"_base"Symbol 26 MovieClip {htpPrevButton} [htpPrevButton] Frame 1Symbol 22 MovieClip
"_roll"Symbol 26 MovieClip {htpPrevButton} [htpPrevButton] Frame 1Symbol 25 MovieClip
"_row01"Symbol 27 MovieClip {uimain_leaderboard} [uimain_leaderboard] Frame 1Symbol 20 MovieClip
"_row02"Symbol 27 MovieClip {uimain_leaderboard} [uimain_leaderboard] Frame 1Symbol 20 MovieClip
"_row03"Symbol 27 MovieClip {uimain_leaderboard} [uimain_leaderboard] Frame 1Symbol 20 MovieClip
"_row04"Symbol 27 MovieClip {uimain_leaderboard} [uimain_leaderboard] Frame 1Symbol 20 MovieClip
"_row05"Symbol 27 MovieClip {uimain_leaderboard} [uimain_leaderboard] Frame 1Symbol 20 MovieClip
"_row06"Symbol 27 MovieClip {uimain_leaderboard} [uimain_leaderboard] Frame 1Symbol 20 MovieClip
"_row07"Symbol 27 MovieClip {uimain_leaderboard} [uimain_leaderboard] Frame 1Symbol 20 MovieClip
"_row08"Symbol 27 MovieClip {uimain_leaderboard} [uimain_leaderboard] Frame 1Symbol 20 MovieClip
"_row09"Symbol 27 MovieClip {uimain_leaderboard} [uimain_leaderboard] Frame 1Symbol 20 MovieClip
"_row10"Symbol 27 MovieClip {uimain_leaderboard} [uimain_leaderboard] Frame 1Symbol 20 MovieClip
"_right"Symbol 27 MovieClip {uimain_leaderboard} [uimain_leaderboard] Frame 1Symbol 23 MovieClip {htpNextButton} [htpNextButton]
"_left"Symbol 27 MovieClip {uimain_leaderboard} [uimain_leaderboard] Frame 1Symbol 26 MovieClip {htpPrevButton} [htpPrevButton]
"_base"Symbol 31 MovieClip {uimain_seeklogocorner} [uimain_seeklogocorner] Frame 1Symbol 30 MovieClip
"_roll"Symbol 31 MovieClip {uimain_seeklogocorner} [uimain_seeklogocorner] Frame 1Symbol 30 MovieClip
"_base"Symbol 37 MovieClip {ausFlag} [ausFlag] Frame 1Symbol 36 MovieClip
"_roll"Symbol 37 MovieClip {ausFlag} [ausFlag] Frame 1Symbol 36 MovieClip
"_base"Symbol 38 MovieClip {nzFlag} [nzFlag] Frame 1Symbol 17 MovieClip
"_roll"Symbol 38 MovieClip {nzFlag} [nzFlag] Frame 1Symbol 17 MovieClip
"_ausFlag"Symbol 41 MovieClip {uimain_flags} [uimain_flags] Frame 1Symbol 37 MovieClip {ausFlag} [ausFlag]
"_nzFlag"Symbol 41 MovieClip {uimain_flags} [uimain_flags] Frame 1Symbol 38 MovieClip {nzFlag} [nzFlag]
"_roll"Symbol 45 MovieClip {buttonBlueGeneric} [buttonBlueGeneric] Frame 1Symbol 44 MovieClip
"_roll"Symbol 52 MovieClip {buttonPinkGeneric} [buttonPinkGeneric] Frame 1Symbol 51 MovieClip
"_roll"Symbol 56 MovieClip {buttonPinkGenericLarge} [buttonPinkGenericLarge] Frame 1Symbol 55 MovieClip
"_seekMoreGames"Symbol 63 MovieClip {uimain_navBar} [uimain_navBar] Frame 1Symbol 45 MovieClip {buttonBlueGeneric} [buttonBlueGeneric]
"_credits"Symbol 63 MovieClip {uimain_navBar} [uimain_navBar] Frame 1Symbol 48 MovieClip {invisBlockButton} [invisBlockButton]
"_visitSeekSite"Symbol 63 MovieClip {uimain_navBar} [uimain_navBar] Frame 1Symbol 48 MovieClip {invisBlockButton} [invisBlockButton]
"_howToPlay"Symbol 63 MovieClip {uimain_navBar} [uimain_navBar] Frame 1Symbol 52 MovieClip {buttonPinkGeneric} [buttonPinkGeneric]
"_highScores"Symbol 63 MovieClip {uimain_navBar} [uimain_navBar] Frame 1Symbol 52 MovieClip {buttonPinkGeneric} [buttonPinkGeneric]
"_embed"Symbol 63 MovieClip {uimain_navBar} [uimain_navBar] Frame 1Symbol 52 MovieClip {buttonPinkGeneric} [buttonPinkGeneric]
"_sendToFriend"Symbol 63 MovieClip {uimain_navBar} [uimain_navBar] Frame 1Symbol 52 MovieClip {buttonPinkGeneric} [buttonPinkGeneric]
"_startGame"Symbol 63 MovieClip {uimain_navBar} [uimain_navBar] Frame 1Symbol 56 MovieClip {buttonPinkGenericLarge} [buttonPinkGenericLarge]
"_base"Symbol 71 MovieClip {uimain_soundBtn} [uimain_soundBtn] Frame 1Symbol 70 MovieClip
"_roll"Symbol 71 MovieClip {uimain_soundBtn} [uimain_soundBtn] Frame 1Symbol 70 MovieClip
"_playAgain"Symbol 91 MovieClip {uimain_gamesummary} [uimain_gamesummary] Frame 1Symbol 45 MovieClip {buttonBlueGeneric} [buttonBlueGeneric]
"_submitScore"Symbol 91 MovieClip {uimain_gamesummary} [uimain_gamesummary] Frame 1Symbol 45 MovieClip {buttonBlueGeneric} [buttonBlueGeneric]
"_summaryCopy"Symbol 91 MovieClip {uimain_gamesummary} [uimain_gamesummary] Frame 1Symbol 86 MovieClip
"_score"Symbol 91 MovieClip {uimain_gamesummary} [uimain_gamesummary] Frame 1Symbol 88 EditableText
"_base"Symbol 105 MovieClip {tickBox} [tickBox] Frame 1Symbol 104 MovieClip
"_roll"Symbol 105 MovieClip {tickBox} [tickBox] Frame 1Symbol 104 MovieClip
"_submitScore"Symbol 120 MovieClip {uimain_submitscore} [uimain_submitscore] Frame 1Symbol 45 MovieClip {buttonBlueGeneric} [buttonBlueGeneric]
"_username"Symbol 120 MovieClip {uimain_submitscore} [uimain_submitscore] Frame 1Symbol 96 EditableText
"_emailaddress"Symbol 120 MovieClip {uimain_submitscore} [uimain_submitscore] Frame 1Symbol 97 EditableText
"_score"Symbol 120 MovieClip {uimain_submitscore} [uimain_submitscore] Frame 1Symbol 102 EditableText
"_optInBox"Symbol 120 MovieClip {uimain_submitscore} [uimain_submitscore] Frame 1Symbol 105 MovieClip {tickBox} [tickBox]
"_progress"Symbol 120 MovieClip {uimain_submitscore} [uimain_submitscore] Frame 1Symbol 109 MovieClip
"_usernameX"Symbol 120 MovieClip {uimain_submitscore} [uimain_submitscore] Frame 1Symbol 111 MovieClip
"_emailaddressX"Symbol 120 MovieClip {uimain_submitscore} [uimain_submitscore] Frame 1Symbol 111 MovieClip
"_optNameBases"Symbol 120 MovieClip {uimain_submitscore} [uimain_submitscore] Frame 1Symbol 116 MovieClip
"_firstname"Symbol 120 MovieClip {uimain_submitscore} [uimain_submitscore] Frame 1Symbol 117 EditableText
"_surname"Symbol 120 MovieClip {uimain_submitscore} [uimain_submitscore] Frame 1Symbol 118 EditableText
"_tsandcs"Symbol 120 MovieClip {uimain_submitscore} [uimain_submitscore] Frame 1Symbol 48 MovieClip {invisBlockButton} [invisBlockButton]
"_privacyPolicy"Symbol 120 MovieClip {uimain_submitscore} [uimain_submitscore] Frame 1Symbol 48 MovieClip {invisBlockButton} [invisBlockButton]
"_nextButton"Symbol 184 MovieClip {uimain_howtoplay1} [uimain_howtoplay1] Frame 1Symbol 23 MovieClip {htpNextButton} [htpNextButton]
"_roll"Symbol 189 MovieClip {soapButton} [soapButton] Frame 1Symbol 188 MovieClip
"_roll"Symbol 193 MovieClip {buttonSeek} [buttonSeek] Frame 1Symbol 192 MovieClip
"_soapButton"Symbol 195 MovieClip {uimain_credits} [uimain_credits] Frame 1Symbol 189 MovieClip {soapButton} [soapButton]
"_seekButton"Symbol 195 MovieClip {uimain_credits} [uimain_credits] Frame 1Symbol 193 MovieClip {buttonSeek} [buttonSeek]
"_bg"Symbol 214 MovieClip {levelSelecButton} [levelSelecButton] Frame 1Symbol 203 MovieClip
"_base"Symbol 214 MovieClip {levelSelecButton} [levelSelecButton] Frame 1Symbol 205 MovieClip
"_roll"Symbol 214 MovieClip {levelSelecButton} [levelSelecButton] Frame 1Symbol 207 MovieClip
"_bestScore"Symbol 214 MovieClip {levelSelecButton} [levelSelecButton] Frame 1Symbol 209 EditableText
"_levelNum"Symbol 214 MovieClip {levelSelecButton} [levelSelecButton] Frame 1Symbol 211 EditableText
"_levelName"Symbol 214 MovieClip {levelSelecButton} [levelSelecButton] Frame 1Symbol 212 EditableText
"_lock"Symbol 214 MovieClip {levelSelecButton} [levelSelecButton] Frame 1Symbol 213 MovieClip {assets_fla.mc_415} [assets_fla.mc_415]
"_levelType"Symbol 215 MovieClip {uimain_levelSelect} [uimain_levelSelect] Frame 1Symbol 197 EditableText
"_ls01"Symbol 215 MovieClip {uimain_levelSelect} [uimain_levelSelect] Frame 1Symbol 214 MovieClip {levelSelecButton} [levelSelecButton]
"_ls02"Symbol 215 MovieClip {uimain_levelSelect} [uimain_levelSelect] Frame 1Symbol 214 MovieClip {levelSelecButton} [levelSelecButton]
"_ls03"Symbol 215 MovieClip {uimain_levelSelect} [uimain_levelSelect] Frame 1Symbol 214 MovieClip {levelSelecButton} [levelSelecButton]
"_ls04"Symbol 215 MovieClip {uimain_levelSelect} [uimain_levelSelect] Frame 1Symbol 214 MovieClip {levelSelecButton} [levelSelecButton]
"_ls05"Symbol 215 MovieClip {uimain_levelSelect} [uimain_levelSelect] Frame 1Symbol 214 MovieClip {levelSelecButton} [levelSelecButton]
"_ls06"Symbol 215 MovieClip {uimain_levelSelect} [uimain_levelSelect] Frame 1Symbol 214 MovieClip {levelSelecButton} [levelSelecButton]
"_right"Symbol 215 MovieClip {uimain_levelSelect} [uimain_levelSelect] Frame 1Symbol 23 MovieClip {htpNextButton} [htpNextButton]
"_left"Symbol 215 MovieClip {uimain_levelSelect} [uimain_levelSelect] Frame 1Symbol 26 MovieClip {htpPrevButton} [htpPrevButton]
"_base"Symbol 222 MovieClip {closeButtonMain} [closeButtonMain] Frame 1Symbol 221 MovieClip
"_roll"Symbol 222 MovieClip {closeButtonMain} [closeButtonMain] Frame 1Symbol 221 MovieClip
"_closeButton"Symbol 223 MovieClip {uimain_base} [uimain_base] Frame 1Symbol 222 MovieClip {closeButtonMain} [closeButtonMain]
"_prevButton"Symbol 252 MovieClip {uimain_howtoplay3} [uimain_howtoplay3] Frame 1Symbol 26 MovieClip {htpPrevButton} [htpPrevButton]
"_prevButton"Symbol 281 MovieClip {uimain_howtoplay2} [uimain_howtoplay2] Frame 1Symbol 26 MovieClip {htpPrevButton} [htpPrevButton]
"_nextButton"Symbol 281 MovieClip {uimain_howtoplay2} [uimain_howtoplay2] Frame 1Symbol 23 MovieClip {htpNextButton} [htpNextButton]
"_signHover"Symbol 306 MovieClip Frame 1Symbol 305 MovieClip
"_sign"Symbol 373 MovieClip {assets_fla.ui_240} [assets_fla.ui_240] Frame 1Symbol 306 MovieClip
"_main"Symbol 375 MovieClip {uimain_introscreen} [uimain_introscreen] Frame 1Symbol 373 MovieClip {assets_fla.ui_240} [assets_fla.ui_240]
"_levelScore"Symbol 439 MovieClip {ui_levelComplete} [ui_levelComplete] Frame 1Symbol 432 EditableText
"_totalScore"Symbol 439 MovieClip {ui_levelComplete} [ui_levelComplete] Frame 1Symbol 434 EditableText
"_levelTime"Symbol 439 MovieClip {ui_levelComplete} [ui_levelComplete] Frame 1Symbol 436 EditableText
"_levelBonus"Symbol 439 MovieClip {ui_levelComplete} [ui_levelComplete] Frame 1Symbol 438 EditableText
"_warning"Symbol 453 MovieClip Frame 1Symbol 452 MovieClip
"_warning"Symbol 457 MovieClip Frame 1Symbol 456 MovieClip
"_hudPointer"Symbol 462 MovieClip {gClip_HUD} [gClip_HUD] Frame 1Symbol 447 MovieClip
"_fuelBar"Symbol 462 MovieClip {gClip_HUD} [gClip_HUD] Frame 1Symbol 453 MovieClip
"_healthBar"Symbol 462 MovieClip {gClip_HUD} [gClip_HUD] Frame 1Symbol 457 MovieClip
"_radar"Symbol 462 MovieClip {gClip_HUD} [gClip_HUD] Frame 1Symbol 458 MovieClip
"_timeField"Symbol 462 MovieClip {gClip_HUD} [gClip_HUD] Frame 1Symbol 459 EditableText
"_travellersField"Symbol 462 MovieClip {gClip_HUD} [gClip_HUD] Frame 1Symbol 460 EditableText
"_scoreField"Symbol 462 MovieClip {gClip_HUD} [gClip_HUD] Frame 1Symbol 461 EditableText
"_num"Symbol 467 MovieClip {ui_roundNumber} [ui_roundNumber] Frame 1Symbol 465 EditableText
"_nameField"Symbol 467 MovieClip {ui_roundNumber} [ui_roundNumber] Frame 1Symbol 466 EditableText
"btnYes"Symbol 472 MovieClip {uimain_confirmQuit} [uimain_confirmQuit] Frame 1Symbol 45 MovieClip {buttonBlueGeneric} [buttonBlueGeneric]
"btnNo"Symbol 472 MovieClip {uimain_confirmQuit} [uimain_confirmQuit] Frame 1Symbol 45 MovieClip {buttonBlueGeneric} [buttonBlueGeneric]
"_roll"Symbol 476 MovieClip {buttonPinkGenericSmaller} [buttonPinkGenericSmaller] Frame 1Symbol 475 MovieClip
"_embed"Symbol 478 MovieClip {ui_mainMenuButton} [ui_mainMenuButton] Frame 1Symbol 476 MovieClip {buttonPinkGenericSmaller} [buttonPinkGenericSmaller]
"_base"Symbol 505 MovieClip {ui_scoreBlip} [ui_scoreBlip] Frame 1Symbol 503 MovieClip
"_points"Symbol 505 MovieClip {ui_scoreBlip} [ui_scoreBlip] Frame 1Symbol 504 EditableText
"_sizeRef"Symbol 864 MovieClip {gClip_TentacleTip} [gClip_TentacleTip] Frame 1Symbol 860 MovieClip
"_sizeRef"Symbol 987 MovieClip {gClip_TentacleSegment} [gClip_TentacleSegment] Frame 1Symbol 860 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1456 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 1Symbol 5 as "uimain_loader"
ExportAssets (56)Timeline Frame 2Symbol 27 as "uimain_leaderboard"
ExportAssets (56)Timeline Frame 2Symbol 31 as "uimain_seeklogocorner"
ExportAssets (56)Timeline Frame 2Symbol 41 as "uimain_flags"
ExportAssets (56)Timeline Frame 2Symbol 63 as "uimain_navBar"
ExportAssets (56)Timeline Frame 2Symbol 65 as "uimain_jobOp"
ExportAssets (56)Timeline Frame 2Symbol 71 as "uimain_soundBtn"
ExportAssets (56)Timeline Frame 2Symbol 91 as "uimain_gamesummary"
ExportAssets (56)Timeline Frame 2Symbol 120 as "uimain_submitscore"
ExportAssets (56)Timeline Frame 2Symbol 122 as "uimain_bggradient"
ExportAssets (56)Timeline Frame 2Symbol 184 as "uimain_howtoplay1"
ExportAssets (56)Timeline Frame 2Symbol 195 as "uimain_credits"
ExportAssets (56)Timeline Frame 2Symbol 215 as "uimain_levelSelect"
ExportAssets (56)Timeline Frame 2Symbol 218 as "uimain_leadin"
ExportAssets (56)Timeline Frame 2Symbol 223 as "uimain_base"
ExportAssets (56)Timeline Frame 2Symbol 252 as "uimain_howtoplay3"
ExportAssets (56)Timeline Frame 2Symbol 255 as "g_cheat"
ExportAssets (56)Timeline Frame 2Symbol 281 as "uimain_howtoplay2"
ExportAssets (56)Timeline Frame 2Symbol 375 as "uimain_introscreen"
ExportAssets (56)Timeline Frame 2Symbol 23 as "htpNextButton"
ExportAssets (56)Timeline Frame 2Symbol 26 as "htpPrevButton"
ExportAssets (56)Timeline Frame 2Symbol 38 as "nzFlag"
ExportAssets (56)Timeline Frame 2Symbol 37 as "ausFlag"
ExportAssets (56)Timeline Frame 2Symbol 45 as "buttonBlueGeneric"
ExportAssets (56)Timeline Frame 2Symbol 48 as "invisBlockButton"
ExportAssets (56)Timeline Frame 2Symbol 52 as "buttonPinkGeneric"
ExportAssets (56)Timeline Frame 2Symbol 56 as "buttonPinkGenericLarge"
ExportAssets (56)Timeline Frame 2Symbol 376 as "snd_collect"
ExportAssets (56)Timeline Frame 2Symbol 377 as "shipthrust"
ExportAssets (56)Timeline Frame 2Symbol 378 as "metal1"
ExportAssets (56)Timeline Frame 2Symbol 379 as "mediumMetalThud1"
ExportAssets (56)Timeline Frame 2Symbol 380 as "snd_smallHit2"
ExportAssets (56)Timeline Frame 2Symbol 381 as "snd_smallhit4"
ExportAssets (56)Timeline Frame 2Symbol 382 as "win4"
ExportAssets (56)Timeline Frame 2Symbol 383 as "bubble2"
ExportAssets (56)Timeline Frame 2Symbol 384 as "combust"
ExportAssets (56)Timeline Frame 2Symbol 385 as "tentacle3"
ExportAssets (56)Timeline Frame 2Symbol 386 as "snd_smallhit3"
ExportAssets (56)Timeline Frame 2Symbol 387 as "bubble1"
ExportAssets (56)Timeline Frame 2Symbol 388 as "diamondRoidSplode1"
ExportAssets (56)Timeline Frame 2Symbol 389 as "shipBoom"
ExportAssets (56)Timeline Frame 2Symbol 390 as "tentacle4"
ExportAssets (56)Timeline Frame 2Symbol 391 as "tentacle2"
ExportAssets (56)Timeline Frame 2Symbol 392 as "snd_smallhit5"
ExportAssets (56)Timeline Frame 2Symbol 393 as "swarm_gun_07"
ExportAssets (56)Timeline Frame 2Symbol 394 as "heavyMetalThud2"
ExportAssets (56)Timeline Frame 2Symbol 395 as "lightMetalThud3"
ExportAssets (56)Timeline Frame 2Symbol 396 as "tentacle1"
ExportAssets (56)Timeline Frame 2Symbol 397 as "smallHit"
ExportAssets (56)Timeline Frame 2Symbol 398 as "gameover"
ExportAssets (56)Timeline Frame 2Symbol 399 as "asteroidSplode"
ExportAssets (56)Timeline Frame 2Symbol 400 as "mediumMetalThud4"
ExportAssets (56)Timeline Frame 2Symbol 401 as "lightMetalThud1"
ExportAssets (56)Timeline Frame 2Symbol 402 as "alienSplode"
ExportAssets (56)Timeline Frame 2Symbol 403 as "enemyFire_00"
ExportAssets (56)Timeline Frame 2Symbol 404 as "asteroidSplode2"
ExportAssets (56)Timeline Frame 2Symbol 405 as "lowFuel"
ExportAssets (56)Timeline Frame 2Symbol 406 as "menuloop"
ExportAssets (56)Timeline Frame 2Symbol 407 as "heavyMetalThud3"
ExportAssets (56)Timeline Frame 2Symbol 408 as "gameloop"
ExportAssets (56)Timeline Frame 2Symbol 409 as "metal3"
ExportAssets (56)Timeline Frame 2Symbol 410 as "heavyMetalThud1"
ExportAssets (56)Timeline Frame 2Symbol 411 as "lowHealth"
ExportAssets (56)Timeline Frame 2Symbol 412 as "diamondRoidSplode2"
ExportAssets (56)Timeline Frame 2Symbol 413 as "lightMetalthud2"
ExportAssets (56)Timeline Frame 2Symbol 414 as "bubble3"
ExportAssets (56)Timeline Frame 2Symbol 415 as "laser2"
ExportAssets (56)Timeline Frame 2Symbol 416 as "swarm_gun_08"
ExportAssets (56)Timeline Frame 2Symbol 417 as "metal2"
ExportAssets (56)Timeline Frame 2Symbol 418 as "mediumMetalThud2"
ExportAssets (56)Timeline Frame 2Symbol 419 as "Thrust_1"
ExportAssets (56)Timeline Frame 2Symbol 420 as "mediumMetalThud3"
ExportAssets (56)Timeline Frame 2Symbol 421 as "metal4"
ExportAssets (56)Timeline Frame 2Symbol 422 as "tractorBeam"
ExportAssets (56)Timeline Frame 2Symbol 105 as "tickBox"
ExportAssets (56)Timeline Frame 2Symbol 189 as "soapButton"
ExportAssets (56)Timeline Frame 2Symbol 193 as "buttonSeek"
ExportAssets (56)Timeline Frame 2Symbol 428 as "gClip_controlHint"
ExportAssets (56)Timeline Frame 2Symbol 439 as "ui_levelComplete"
ExportAssets (56)Timeline Frame 2Symbol 442 as "gClip_radarBlip"
ExportAssets (56)Timeline Frame 2Symbol 462 as "gClip_HUD"
ExportAssets (56)Timeline Frame 2Symbol 467 as "ui_roundNumber"
ExportAssets (56)Timeline Frame 2Symbol 472 as "uimain_confirmQuit"
ExportAssets (56)Timeline Frame 2Symbol 478 as "ui_mainMenuButton"
ExportAssets (56)Timeline Frame 2Symbol 499 as "ui_gameOver"
ExportAssets (56)Timeline Frame 2Symbol 505 as "ui_scoreBlip"
ExportAssets (56)Timeline Frame 2Symbol 214 as "levelSelecButton"
ExportAssets (56)Timeline Frame 2Symbol 222 as "closeButtonMain"
ExportAssets (56)Timeline Frame 2Symbol 509 as "gClip_roidParticle1"
ExportAssets (56)Timeline Frame 2Symbol 513 as "gClip_roidParticle2"
ExportAssets (56)Timeline Frame 2Symbol 517 as "gClip_signPost"
ExportAssets (56)Timeline Frame 2Symbol 521 as "gClip_motionParticle"
ExportAssets (56)Timeline Frame 2Symbol 523 as "gClip_bgGradient"
ExportAssets (56)Timeline Frame 2Symbol 526 as "gClip_roidShard_10"
ExportAssets (56)Timeline Frame 2Symbol 538 as "gClip_bonusItems"
ExportAssets (56)Timeline Frame 2Symbol 561 as "gClip_rocketShip"
ExportAssets (56)Timeline Frame 2Symbol 566 as "gClip_enemyAmmoParticle"
ExportAssets (56)Timeline Frame 2Symbol 597 as "gClip_bgAsteroids"
ExportAssets (56)Timeline Frame 2Symbol 604 as "gClip_diamond"
ExportAssets (56)Timeline Frame 2Symbol 662 as "gClip_planet1"
ExportAssets (56)Timeline Frame 2Symbol 665 as "gClip_roidShard_1"
ExportAssets (56)Timeline Frame 2Symbol 675 as "gClip_rocketShrap"
ExportAssets (56)Timeline Frame 2Symbol 683 as "gClip_hintClip3"
ExportAssets (56)Timeline Frame 2Symbol 686 as "gClip_ammoSeeker"
ExportAssets (56)Timeline Frame 2Symbol 689 as "gClip_roidShard_8"
ExportAssets (56)Timeline Frame 2Symbol 693 as "gClip_laserBeam"
ExportAssets (56)Timeline Frame 2Symbol 697 as "gClip_fuel"
ExportAssets (56)Timeline Frame 2Symbol 701 as "gClip_hintClip4"
ExportAssets (56)Timeline Frame 2Symbol 706 as "gClip_turretBase"
ExportAssets (56)Timeline Frame 2Symbol 721 as "gClip_alienShooterLite"
ExportAssets (56)Timeline Frame 2Symbol 724 as "gClip_ammoSeekerHeavy"
ExportAssets (56)Timeline Frame 2Symbol 733 as "gClip_alienShooter"
ExportAssets (56)Timeline Frame 2Symbol 740 as "gClip_asteroidWall"
ExportAssets (56)Timeline Frame 2Symbol 746 as "gClip_hintClip2"
ExportAssets (56)Timeline Frame 2Symbol 749 as "gClip_poisonBubble"
ExportAssets (56)Timeline Frame 2Symbol 752 as "gClip_starBG"
ExportAssets (56)Timeline Frame 2Symbol 756 as "gClip_ammoParticle1"
ExportAssets (56)Timeline Frame 2Symbol 760 as "gClip_tinyPuff1"
ExportAssets (56)Timeline Frame 2Symbol 770 as "gClip_alienBumper"
ExportAssets (56)Timeline Frame 2Symbol 772 as "gClip_poisonBarrel"
ExportAssets (56)Timeline Frame 2Symbol 780 as "gClip_bgLargeObj"
ExportAssets (56)Timeline Frame 2Symbol 783 as "gClip_ammoMedium"
ExportAssets (56)Timeline Frame 2Symbol 788 as "gClip_ammoParticle2"
ExportAssets (56)Timeline Frame 2Symbol 794 as "gClip_tractorBeam"
ExportAssets (56)Timeline Frame 2Symbol 799 as "gClip_hintClip1"
ExportAssets (56)Timeline Frame 2Symbol 803 as "gClip_hintClip6"
ExportAssets (56)Timeline Frame 2Symbol 806 as "gClip_roidShard_6"
ExportAssets (56)Timeline Frame 2Symbol 809 as "gClip_roidShard_13"
ExportAssets (56)Timeline Frame 2Symbol 812 as "gClip_roidShard_3"
ExportAssets (56)Timeline Frame 2Symbol 818 as "gClip_asteroidBig"
ExportAssets (56)Timeline Frame 2Symbol 829 as "gClip_alienBumperLite"
ExportAssets (56)Timeline Frame 2Symbol 838 as "gClip_laserNode"
ExportAssets (56)Timeline Frame 2Symbol 841 as "gClip_roidShard_15"
ExportAssets (56)Timeline Frame 2Symbol 844 as "gClip_exhaustParticle"
ExportAssets (56)Timeline Frame 2Symbol 858 as "gClip_blackHole"
ExportAssets (56)Timeline Frame 2Symbol 864 as "gClip_TentacleTip"
ExportAssets (56)Timeline Frame 2Symbol 870 as "gClip_asteroidWallSmall"
ExportAssets (56)Timeline Frame 2Symbol 875 as "gClip_hintClip5"
ExportAssets (56)Timeline Frame 2Symbol 879 as "gClip_star"
ExportAssets (56)Timeline Frame 2Symbol 897 as "gClip_smokePuff"
ExportAssets (56)Timeline Frame 2Symbol 902 as "gClip_smokePuffSmall"
ExportAssets (56)Timeline Frame 2Symbol 905 as "gClip_roidShard_14"
ExportAssets (56)Timeline Frame 2Symbol 908 as "gClip_roidShard_9"
ExportAssets (56)Timeline Frame 2Symbol 909 as "gClip_smokePuffTiny"
ExportAssets (56)Timeline Frame 2Symbol 912 as "gClip_ammoHeavy"
ExportAssets (56)Timeline Frame 2Symbol 915 as "gClip_roidShard_2"
ExportAssets (56)Timeline Frame 2Symbol 921 as "gClip_tinySpark"
ExportAssets (56)Timeline Frame 2Symbol 924 as "gClip_ammoBasic"
ExportAssets (56)Timeline Frame 2Symbol 927 as "gClip_roidShard_12"
ExportAssets (56)Timeline Frame 2Symbol 936 as "gClip_ammoPickup"
ExportAssets (56)Timeline Frame 2Symbol 940 as "gClip_hintClip7"
ExportAssets (56)Timeline Frame 2Symbol 943 as "gClip_roidShard_7"
ExportAssets (56)Timeline Frame 2Symbol 947 as "gClip_turretCannon"
ExportAssets (56)Timeline Frame 2Symbol 981 as "gClip_spaceDudes"
ExportAssets (56)Timeline Frame 2Symbol 984 as "gClip_enemyAmmo"
ExportAssets (56)Timeline Frame 2Symbol 987 as "gClip_TentacleSegment"
ExportAssets (56)Timeline Frame 2Symbol 990 as "gClip_roidShard_11"
ExportAssets (56)Timeline Frame 2Symbol 993 as "gClip_roidShard_4"
ExportAssets (56)Timeline Frame 2Symbol 998 as "gClip_gasCloud"
ExportAssets (56)Timeline Frame 2Symbol 1005 as "gClip_asteroidWallBig"
ExportAssets (56)Timeline Frame 2Symbol 1008 as "gClip_roidShard_5"
ExportAssets (56)Timeline Frame 2Symbol 1021 as "gClip_ammoSplode"
ExportAssets (56)Timeline Frame 2Symbol 1027 as "gClip_asteroidMedium"
ExportAssets (56)Timeline Frame 2Symbol 1033 as "gClip_diamondRoid"
ExportAssets (56)Timeline Frame 2Symbol 373 as "assets_fla.ui_240"
ExportAssets (56)Timeline Frame 2Symbol 476 as "buttonPinkGenericSmaller"
ExportAssets (56)Timeline Frame 2Symbol 213 as "assets_fla.mc_415"
ExportAssets (56)Timeline Frame 2Symbol 341 as "assets_fla.ui_259"
ExportAssets (56)Timeline Frame 2Symbol 372 as "assets_fla.ui_285"
EnableDebugger2 (64)Timeline Frame 131 bytes "u.$1$68$G3aSWh67PoD9vBGbMRQOW/."
DebugMX1 (63)Timeline Frame 1
SerialNumber (41)Timeline Frame 1

Labels

"preloader_AbstractPreloaderView"Frame 1
"Seek_Space_Agent"Frame 2
"loop"Symbol 341 MovieClip {assets_fla.ui_259} [assets_fla.ui_259] Frame 57




http://swfchan.com/23/111216/info.shtml
Created: 13/3 -2019 09:05:09 Last modified: 13/3 -2019 09:05:09 Server time: 22/12 -2024 03:51:15