Frame 3
stop();
Frame 4
function doLoading() {
t_ratio = getBytesLoaded() / getBytesTotal();
trace(t_ratio);
loader_bar_mc.gotoAndStop(Math.floor(t_ratio * 100));
if (t_ratio == 1) {
clearInterval(loader);
gotoAndStop ("outro");
}
}
loader = setInterval(doLoading, 5);
var t_ratio;
Frame 5
tv.gotoAndPlay("outro");
Frame 6
var PROJECT_CLIP = project;
PROJECT_CLIP.tabChildren = false;
PROJECT_CLIP.init();
gotoAndStop ("game");
Instance of Symbol 458 MovieClip "comHighscores" in Frame 8
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.score";
gamename = "doctorcompactor";
saveScore = true;
scoreIsTime = false;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 27 MovieClip Frame 8
stop();
Symbol 28 MovieClip [powerup_rocket] Frame 1
stop();
Symbol 32 MovieClip Frame 8
stop();
Symbol 33 MovieClip [powerup_slowmo] Frame 1
stop();
Symbol 37 MovieClip Frame 8
stop();
Symbol 38 MovieClip [powerup_spread] Frame 1
stop();
Symbol 42 MovieClip Frame 8
stop();
Symbol 43 MovieClip [powerup_shield] Frame 1
stop();
Symbol 47 MovieClip Frame 8
stop();
Symbol 48 MovieClip [powerup_ric] Frame 1
stop();
Symbol 52 MovieClip Frame 8
stop();
Symbol 53 MovieClip [powerup_beam] Frame 1
stop();
Symbol 94 MovieClip Frame 1
stop();
Symbol 94 MovieClip Frame 9
stop();
Symbol 94 MovieClip Frame 17
stop();
Symbol 94 MovieClip Frame 24
stop();
Symbol 94 MovieClip Frame 31
stop();
Symbol 96 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 10
stop();
Symbol 114 MovieClip Frame 1
stop();
Symbol 118 MovieClip Frame 11
stop();
Symbol 119 MovieClip Frame 8
stop();
Symbol 123 MovieClip Frame 3
_parent.gotoAndStop("idle");
stop();
Symbol 124 MovieClip Frame 4
stop();
Symbol 130 MovieClip Frame 3
_parent.gotoAndStop("idle");
stop();
Symbol 131 MovieClip Frame 4
stop();
Symbol 135 MovieClip Frame 3
_parent.gotoAndStop("idle");
stop();
Symbol 136 MovieClip Frame 4
stop();
Symbol 140 MovieClip Frame 13
stop();
Symbol 141 MovieClip Frame 15
stop();
Symbol 145 MovieClip Frame 15
stop();
Symbol 149 MovieClip Frame 15
stop();
Symbol 153 MovieClip Frame 15
stop();
Symbol 157 MovieClip Frame 15
stop();
Symbol 161 MovieClip Frame 15
stop();
Symbol 165 MovieClip Frame 15
stop();
Symbol 170 MovieClip Frame 15
stop();
Symbol 175 MovieClip Frame 15
stop();
Symbol 179 MovieClip Frame 5
stop();
Symbol 194 MovieClip [effect_beamSparks] Frame 16
stop();
Symbol 212 Button
on (release) {
clickPlay();
sound_press();
}
on (rollOver) {
sound_rollover();
}
Symbol 214 Button
on (release) {
clickControls();
sound_press();
}
on (rollOver) {
sound_rollover();
}
Symbol 216 Button
on (release) {
clickHelp();
sound_press();
}
on (rollOver) {
sound_rollover();
}
Symbol 219 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 233 MovieClip Frame 2
stop();
Symbol 233 MovieClip Frame 5
txt.txt_level.text = "LEVEL " + levelNum;
Symbol 233 MovieClip Frame 27
_parent.completeLevelTransition();
Symbol 237 MovieClip Frame 1
stop();
Symbol 240 MovieClip Frame 1
stop();
Symbol 240 MovieClip Frame 7
gotoAndStop ("hidden");
Symbol 240 MovieClip Frame 12
gotoAndStop (1);
Symbol 244 MovieClip Frame 1
stop();
Symbol 254 Button
on (release) {
clickPlay();
sound_press();
}
on (rollOver) {
sound_rollover();
}
Symbol 256 Button
on (release) {
clickMenu();
sound_press();
}
on (rollOver) {
sound_rollover();
}
Symbol 266 MovieClip Frame 15
stop();
Symbol 277 Button
on (release) {
clickHighscore();
sound_press();
}
on (rollOver) {
sound_rollover();
}
Symbol 284 Button
on (release) {
leaveHighscore();
clickPlay();
sound_press();
}
on (rollOver) {
sound_rollover();
}
Symbol 285 Button
on (release) {
leaveHighscore();
clickMenu();
sound_press();
}
on (rollOver) {
sound_rollover();
}
Symbol 289 Button
on (release) {
getURL ("http://www.smashingideas.com", "_blank");
}
Symbol 290 MovieClip [Project] Frame 1
#initclip 37
Object.registerClass("Project", thebluerobot.doctorCompactor.Engine);
#endinitclip
stop();
Symbol 459 MovieClip [__Packages.thebluerobot.doctorCompactor.Project] Frame 0
class thebluerobot.doctorCompactor.Project extends MovieClip
{
var _visible, __controller, helpBtn;
function Project () {
super();
_visible = false;
}
function init() {
trace("project init");
_visible = true;
__controller = new thebluerobot.doctorCompactor.Controller();
helpBtn.onRelease = __controller.onReleaseHelp;
__inited = true;
}
var __inited = false;
}
Symbol 460 MovieClip [__Packages.thebluerobot.doctorCompactor.Controller] Frame 0
class thebluerobot.doctorCompactor.Controller extends MovieClip
{
function Controller () {
super();
}
function onReleaseHelp() {
_level0.help._visible = true;
}
}
Symbol 461 MovieClip [__Packages.thebluerobot.doctorCompactor.Engine] Frame 0
class thebluerobot.doctorCompactor.Engine extends thebluerobot.doctorCompactor.Project
{
var interval, sound, viewport_mc, ui, viewport, activeWorld, a_levelData, __score, __lives, state, __levelNum, __updateUI, isPaused, pause_mc, isUILocked, isMouseDown, _parent, gotoAndStop, mouse, transition_mc, key, mute_mc;
function Engine () {
super();
}
function init() {
super.init();
interval = new smashing.IntervalEngine(this, "update");
interval.startFast();
sound = new smashing.SoundEngine(viewport_mc, 10);
sound.createGroup("music");
sound.createGroup("beam");
sound.createSound("music", "doctorCompactor_loop.wav", "music");
sound.createSound("musicSlowmo", "doctorCompactor_loop_slowmo.wav", "music");
sound.changeVolume(40, "music");
sound.createSound("rollover", "BTN_over.wav");
sound.createSound("press", "BTN_press.wav");
sound.createSound("playerDamage", "doc_hit.wav");
sound.createSound("playerDie", "end_hit.wav");
sound.createSound("pickup", "star_hit.wav");
sound.createSound("changeGun", "gun_change.wav");
sound.createSound("enemyHit", "object_hit.wav");
sound.createSound("slowmoHit", "sloMo_hit.wav");
sound.createSound("shield", "shield.wav");
sound.createSound("fire", "shot_main.wav");
sound.createSound("rico", "shot_bounce.wav");
sound.createSound("beam", "shot_laser.wav", "beam");
sound.createSound("fireRocket", "shot_rocket.wav");
sound.createSound("explodeRocket", "rocket_explode.wav");
ui = new thebluerobot.doctorCompactor.UI(this);
viewport = new smashing.keithm.Viewport(viewport_mc, 1);
viewport.createGroup({name:"scenery", index:0, slots:30});
viewport.createGroup({name:"enemy", index:1, slots:100});
viewport.createGroup({name:"projectile", index:2, slots:200});
viewport.createGroup({name:"beam", index:3, slots:1});
viewport.createGroup({name:"player", index:4, slots:1});
viewport.createGroup({name:"effect", index:5, slots:100});
viewport.init({screenWidth:thebluerobot.doctorCompactor.Dimensions.__get__screenWidth(), screenHeight:thebluerobot.doctorCompactor.Dimensions.__get__screenHeight(), sc:thebluerobot.doctorCompactor.Dimensions.__get__sc()});
activeWorld = new thebluerobot.doctorCompactor.World();
activeWorld.init(this);
a_levelData = [];
hardLevels();
__initMouse();
__initKey();
reset();
ui.goTitle();
}
function get score() {
return(__score);
}
function get lives() {
return(__lives);
}
function state_game() {
state = "g";
playMusic();
}
function state_menu() {
state = "m";
silence();
}
function reset() {
__levelNum = 0;
__lives = __STARTLIVES;
__score = 0;
__updateUI = true;
}
function startGame() {
reset();
ui.goGameplay();
state_game();
startLevel();
}
function startLevel() {
activeWorld.generate(a_levelData[__levelNum]);
setViewportToWorld();
viewport.newView();
unlockUI();
unpause();
activeWorld.start();
}
function restartLevel() {
viewport.newView();
activeWorld.reset();
resetCamera();
unlockUI();
unpause();
activeWorld.start();
}
function nextLevel() {
__levelNum++;
if (__levelNum > (a_levelData.length - 1)) {
winGame();
} else {
startLevel();
}
}
function endLevel() {
pause();
ui.goNextLevel();
}
function stopGame() {
viewport.newView();
pause();
}
function winGame() {
}
function silence() {
stopSound("shield");
stopSound("beam");
stopMusic();
}
function gameOver() {
ui.goGameOver();
}
function togglePause() {
if (isPaused) {
unpause();
playMusic();
pause_mc.gotoAndStop("off");
} else {
pause();
stopMusic();
pause_mc.gotoAndStop("on");
}
}
function pause() {
isPaused = true;
}
function unpause() {
isPaused = false;
}
function lockUI() {
isUILocked = true;
}
function unlockUI() {
isUILocked = false;
}
function setViewportToWorld() {
viewport.setTargetWorld(activeWorld);
}
function resetCamera() {
viewport.camera.reset();
}
function setCameraTrack(t_data) {
viewport.setCameraTrack(t_data);
}
function clearCameraTrack() {
viewport.clearCameraTrack();
}
function update(el) {
if (el > 0.2) {
el = 0.2;
}
if (!isPaused) {
if (isMouseDown) {
activeWorld.playerFire();
}
activeWorld.update(el);
if (__updateUI) {
ui.update();
__updateUI = false;
}
}
viewport.update(el);
updateAfterEvent();
}
function addScore(t_score) {
__score = __score + t_score;
__updateUI = true;
}
function loseLife() {
__lives--;
if (__lives <= 0) {
gameOver();
}
__updateUI = true;
}
function updateUI() {
__updateUI = true;
}
function leaveHighscore() {
_parent.gotoAndStop("game");
}
function clickPlay() {
startGame();
}
function clickHighscore() {
_parent.gotoAndStop("highscore");
_root.score = finalScore;
(gotoAndStop("highscore"));// not popped
}
function clickPlayAgain() {
ui.goGameplay();
reset();
restartLevel();
}
function clickMenu() {
ui.goTitle();
}
function clickControls() {
ui.goControls();
}
function clickHelp() {
ui.goHelp();
}
function sound_rollover() {
playSound("rollover");
}
function sound_press() {
playSound("press");
}
function get accuracy() {
var _local2 = Math.ceil((activeWorld.shotsHit / activeWorld.shotsFired) * 100);
if ((_local2 == undefined) || (isNaN(_local2))) {
_local2 = 0;
}
if (_local2 > 100) {
_local2 = 100;
}
return(_local2);
}
function get finalScore() {
return(Math.ceil(score + (score * (accuracy / 100))));
}
function __initMouse() {
mouse = {};
mouse.owner = this;
mouse.onMouseUp = function () {
this.owner.mouse_up();
};
mouse.onMouseDown = function () {
this.owner.mouse_down();
};
Mouse.addListener(mouse);
}
function mouse_up() {
isMouseDown = false;
}
function mouse_down() {
isMouseDown = true;
}
function runLevelTransition(t_levelNum) {
activeWorld.suspendSpawning();
transition_mc.levelNum = t_levelNum;
transition_mc.gotoAndPlay("play");
}
function completeLevelTransition() {
activeWorld.reinstateSpawning();
}
function __initKey() {
key = {};
key.owner = this;
key.onKeyDown = function () {
this.owner.key_down();
};
Key.addListener(key);
}
function key_down() {
if (Key.getCode() == 80) {
togglePause();
} else if (Key.getCode() == 77) {
toggleMute();
} else if (Key.getCode() == 81) {
}
}
function playSound(t_name, t_loops) {
if (t_loops == undefined) {
sound.playSound(t_name);
} else {
sound.playSound(t_name, t_loops);
}
}
function stopSound(t_name) {
sound.stopSound(t_name);
}
function playMusic() {
if (state == "g") {
if (activeWorld.__get__powerupName() == "slowmo") {
sound.playSound("musicSlowmo", 0);
} else {
sound.playSound("music", 0);
}
}
}
function toggleSlowMusic(t_on) {
if (t_on) {
sound.stopSound("music");
sound.playSound("musicSlowmo", 0);
} else {
sound.stopSound("musicSlowmo");
sound.playSound("music", 0);
}
}
function stopMusic() {
sound.stopSound("music");
}
function toggleMute() {
if (sound.toggleSound()) {
playMusic();
mute_mc.gotoAndStop("off");
} else {
silence();
mute_mc.gotoAndStop("on");
}
}
function addLevel(t_data) {
t_data.engine = this;
var _local2 = new thebluerobot.doctorCompactor.levels.Level1();
_local2.loadData(t_data);
a_levelData.push(_local2);
}
function loadLevels(t_data) {
}
function hardLevels() {
var _local2 = new thebluerobot.doctorCompactor.LevelData();
_local2.loadData();
addLevel(_local2);
}
function parseMainXML() {
}
var __STARTLIVES = 3;
}
Symbol 462 MovieClip [__Packages.smashing.IntervalEngine] Frame 0
class smashing.IntervalEngine
{
var _uo, _uf, _update_interval, _i, _last_update, _ft, _el;
function IntervalEngine (update_object, update_function) {
_uo = update_object;
_uf = update_function;
}
function startFlat(FPS) {
_FPS = FPS;
_update_interval = 1 / FPS;
_i = setInterval(this, "_flat_step", 0);
}
function startFlex() {
_last_update = getTimer() * 0.001;
_i = setInterval(this, "_flex_step", 0);
}
function startFast() {
_last_update = getTimer();
_i = setInterval(this, "_fast_step", 0);
}
function pause(Void) {
_is_paused = true;
}
function unpause(Void) {
_is_paused = false;
}
function reset(Void) {
if (_i != undefined) {
clearInterval(_i);
}
_ft = 0;
_last_update = getTimer() * 0.001;
_lel = _MAX_FRAMETIME / 2;
pause();
}
function _flex_step(Void) {
if (_is_paused) {
_last_update = getTimer() * 0.001;
return(undefined);
}
_el = Math.min(_MAX_FRAMETIME, (-_last_update) + ((_last_update = getTimer() * 0.001)));
_lel = _lel - Math.max(-_MAX_TIMEDIFF, Math.min(_MAX_TIMEDIFF, _lel - _el));
_uo[_uf](_lel);
}
function _flat_step(Void) {
if (_is_paused) {
return(undefined);
}
_ft = _ft + ((-_last_update) + ((_last_update = getTimer() * 0.001)));
if (_ft < _update_interval) {
return(undefined);
}
_uo[_uf](_ft);
_ft = 0;
}
function _fast_step(Void) {
_el = (-_last_update) + ((_last_update = getTimer()));
_uo[_uf](_el * 0.001);
}
function clear() {
clearInterval(_i);
}
var _MAX_TIMEDIFF = 0.005;
var _MIN_FPS = 5;
var _MAX_FRAMETIME = 1 / smashing.IntervalEngine.prototype._MIN_FPS;
var _lel = 0.2;
var _FPS = 0;
var _is_paused = false;
}
Symbol 463 MovieClip [__Packages.thebluerobot.doctorCompactor.UI] Frame 0
class thebluerobot.doctorCompactor.UI
{
var engine;
function UI (t_engine) {
engine = t_engine;
}
function goTitle() {
engine.pause();
engine.gotoAndStop("title");
engine.state_menu();
}
function goStartLevel(t_levelName) {
engine.pause();
engine.gotoAndStop("startLevel");
engine.txt_level.text = t_levelName;
engine.state_menu();
}
function goControls() {
engine.pause();
engine.gotoAndStop("controls");
engine.state_menu();
}
function goHelp() {
engine.pause();
engine.gotoAndStop("help");
engine.state_menu();
}
function goGameplay() {
engine.gotoAndStop("game");
engine.state_game();
update();
}
function goGameOver() {
engine.pause();
engine.state_menu();
engine.gotoAndStop("lose");
engine.txt_kills.text = engine.activeWorld.kills;
engine.txt_acc.text = String(engine.accuracy) + "%";
engine.txt_final.text = engine.finalScore;
update();
}
function goGameWin() {
engine.pause();
engine.state_menu();
engine.gotoAndStop("win");
}
function goNextLevel() {
engine.pause();
engine.state_menu();
engine.gotoAndStop("nextLevel");
}
function leaveHighscore() {
trace("Leave highscore");
_parent.gotoAndStop("game");
}
function update() {
engine.health_mc.gotoAndStop(engine.activeWorld.player_HP + 1);
engine.txt_score.text = engine.score;
}
}
Symbol 464 MovieClip [__Packages.smashing.keithm.Viewport] Frame 0
class smashing.keithm.Viewport
{
var __a_groups, __o_groups, __viewportPath, __viewportDepth, camera, l, screenWidth, screenHeight, sc, __vWorld, mc, a, aa, ll, fl, cam, e, onsc, zdiff, scale, xdiff, ydiff;
function Viewport (t_path, t_depth) {
__a_groups = [];
__o_groups = {};
__viewportPath = t_path;
__viewportDepth = t_depth;
}
function init(t_data) {
camera = new smashing.keithm.VCamera();
setDimensions(t_data);
var _local5 = __a_groups.length;
var _local4 = [];
var _local2 = 0;
while (_local4.length < _local5) {
l = __a_groups.length;
while (l--) {
if (__a_groups[l].index < __a_groups[_local2].index) {
_local2 = l;
}
}
_local4.push(__a_groups[_local2]);
__a_groups.splice(_local2, 1);
}
__a_groups = _local4;
var _local3 = __defaultMCDepth;
l = 0;
while (l < __a_groups.length) {
_local3 = __a_groups[l].init(_local3);
_local3++;
l++;
}
newView();
}
function setDimensions(t_data) {
screenWidth = t_data.screenWidth;
screenHeight = t_data.screenHeight;
sc = t_data.sc;
camera.setDimensions({screenWidth:screenWidth, screenHeight:screenHeight, sc:sc});
}
function setTargetWorld(t_world) {
__vWorld = t_world;
camera.init(t_world.cameraData);
}
function setCameraTrack(t_data) {
camera.setTrack(t_data);
}
function clearCameraTrack(t_data) {
camera.clearTrack();
}
function setCameraTarget(t_point) {
camera.setTarget(t_point.x, t_point.y, t_point.z);
}
function setCameraMovement(t_point) {
camera.setMoveRate(t_point.x, t_point.y, t_point.z);
}
function newView() {
var _local3 = __a_groups.length;
while (_local3--) {
__a_groups[_local3].reset();
}
if (mc != undefined) {
mc.removeMovieClip();
}
mc = __viewportPath.createEmptyMovieClip("viewport" + __viewportDepth, __viewportDepth);
if (__vWorld != undefined) {
a = __vWorld.a_renderOnceArray;
l = a.length;
while (l--) {
aa = a[l];
ll = aa.length;
while (ll--) {
draw({element:aa[ll]});
aa[ll].renderDirect();
}
}
}
}
function clearGroup(t_group) {
var _local2 = __o_groups[t_group].mcs;
while (_local2.length > 0) {
__eraseAsset(_local2[0].mc, t_group);
}
}
function update(el) {
camera.update(el);
fl = camera.fl;
cam = camera.edges;
a = __vWorld.a_renderArray;
l = a.length;
while (l--) {
aa = a[l];
ll = aa.length;
while (ll--) {
e = aa[ll];
if (e.flag_eraseMe) {
erase({element:e});
continue;
}
if ((!e.isSpawned) || ((!e.isAlive) && (!e.drawWhenKilled))) {
continue;
}
onsc = false;
zdiff = e.z - camera.z;
if (e.CUSTOMDRAW) {
onsc = true;
} else if (zdiff > 0) {
scale = fl / (fl + e.z);
xdiff = Math.abs((e.x + (-camera.x)) * scale);
ydiff = Math.abs((e.y + (-camera.y)) * scale);
if (((xdiff < (sc.x + e.baseWidth)) && (ydiff < (sc.y + e.baseHeight))) && (zdiff < camera.farClip)) {
onsc = true;
}
}
if (onsc) {
if (!e.isDrawn) {
draw({element:e});
}
e.render(camera, scale);
} else if (e.isDrawn) {
erase({element:e});
}
}
}
}
function draw(t_data) {
var _local4;
if (t_data.element != undefined) {
var _local3 = t_data.element;
if (!_local3.isSpawned) {
trace(("WARNING: despawned entity " + _local3.assetID) + " received draw request.");
return(undefined);
}
_local4 = __drawElement(_local3);
if (_local4 != undefined) {
_local3.onDraw(_local4, this);
// unexpected jump
}
trace("ERROR DRAWING ASSET " + _local3.assetID);
return(undefined);
}
if (t_data.assetID == "_empty") {
return(__drawEmpty(t_data.groupName, t_data.z + t_data.zInfluence));
}
return(__drawAsset(t_data.assetID, t_data.groupName, t_data.z + t_data.zInfluence));
}
function erase(t_data) {
if (t_data.element != undefined) {
__eraseAsset(t_data.element.mc, t_data.element.DRAWTYPE);
t_data.element.onErase(this);
} else {
__eraseAsset(t_data.mc, t_data.groupName);
}
}
function createGroup(t_data) {
__a_groups.push((__o_groups[t_data.name] = new smashing.keithm.ViewportGroup(t_data)));
}
function __drawElement(t_element) {
var _local4 = __o_groups[t_element.DRAWTYPE];
var _local5 = _local4.getDepth(t_element.z + t_element.zInfluence);
if (t_element.assetID == "_empty") {
var _local3 = mc.createEmptyMovieClip(t_element.DRAWTYPE + _local5, _local5);
} else {
var _local3 = mc.attachMovie(t_element.assetID, t_element.assetID + _local5, _local5);
}
_local4.mcs.push({mc:_local3, depth:_local5, z:t_element.z});
e.initScale(camera);
return(_local3);
}
function __drawAsset(t_asset, t_groupName, t_z) {
var _local3 = __o_groups[t_groupName];
var _local6 = _local3.getDepth(t_z);
var _local2 = mc.attachMovie(t_asset, t_asset + _local6, _local6);
_local3.mcs.push({mc:_local2, depth:_local6, z:t_z});
return(_local2);
}
function __drawEmpty(t_groupName, t_z) {
var _local4 = __o_groups[t_groupName];
var _local6 = _local4.getDepth(t_z);
var _local2 = mc.createEmptyMovieClip(t_groupName + _local6, _local6);
__o_groups[t_groupName].mcs.push({mc:_local2, depth:_local6, z:t_z});
return(_local2);
}
function __eraseAsset(t_mc, t_groupName) {
var _local3 = __o_groups[t_groupName];
var _local2 = _local3.mcs.length;
while (_local2--) {
if (_local3.mcs[_local2].mc == t_mc) {
_local3.mcs[_local2].mc.removeMovieClip();
_local3.mcs.splice(_local2, 1);
return(undefined);
}
}
}
var __defaultMCDepth = 100;
}
Symbol 465 MovieClip [__Packages.smashing.keithm.VCamera] Frame 0
class smashing.keithm.VCamera
{
var startX, sc, startY, startZ, remoteScale, xMult, yMult, zMult, fl, farClip, edges, screenWidth, screenHeight, baseVisWidth, baseVisHeight, isTrack, targetX, offset, te, targetY, targetZ, isTarget, doScrollX, xdiff, x, enforceXpad, padding, easeCushion, mr, ydiff, doScrollY, y, enforceYpad, doScrollZ, zdiff, z, enforceZpad, visWidth, visHeight, limit;
function VCamera () {
}
function init(t_data) {
if (t_data.x == undefined) {
startX = sc.x;
} else {
startX = t_data.x;
}
if (t_data.y == undefined) {
startY = sc.y;
} else {
startY = t_data.y;
}
if (t_data.z == undefined) {
startZ = 0;
} else {
startY = t_data.z;
}
remoteScale = false;
setMoveRate(0, 0, 0);
if (t_data.xmult != undefined) {
xMult = t_data.xmult;
} else {
xMult = 1;
}
if (t_data.ymult != undefined) {
yMult = t_data.ymult;
} else {
yMult = 1;
}
if (t_data.zmult != undefined) {
yMult = t_data.zmult;
} else {
zMult = 1;
}
if (t_data.fl != undefined) {
fl = t_data.fl;
} else {
fl = DEF_FL;
}
if (t_data.farClipping != undefined) {
farClip = t_data.farClipping;
} else {
farClip = 100000 /* 0x0186A0 */;
}
edges = {};
reset();
}
function setDimensions(t_data) {
screenWidth = t_data.screenWidth;
screenHeight = t_data.screenHeight;
sc = t_data.sc;
baseVisWidth = (screenWidth / 2) + VISCUSHION;
baseVisHeight = (screenHeight / 2) + VISCUSHION;
}
function update(el) {
if (isTrack) {
targetX = te.x + offset.x;
targetY = te.y + offset.y;
targetZ = te.z + offset.z;
}
if (isTarget) {
if (doScrollX) {
xdiff = targetX - x;
if (enforceXpad) {
if (xdiff > padding.r) {
x = targetX - padding.r;
} else if ((-xdiff) > padding.l) {
x = targetX + padding.l;
}
}
if (Math.abs(xdiff) > easeCushion.x) {
mr.x = xdiff + (xdiff - (xdiff * Math.pow(el, 1)));
} else {
mr.x = 0;
}
if (Math.abs(mr.x) > Math.abs(ydiff)) {
mr.x = xdiff;
}
} else {
mr.x = 0;
}
if (doScrollY) {
ydiff = targetY - y;
if (enforceYpad) {
if (ydiff > padding.b) {
y = targetY - padding.b;
} else if ((-ydiff) > padding.t) {
y = targetY + padding.t;
}
}
if (Math.abs(ydiff) > easeCushion.y) {
mr.y = ydiff;
mr.y = mr.y + (mr.y - (mr.y * Math.pow(el, 1)));
} else {
mr.y = 0;
}
if (Math.abs(mr.y) > Math.abs(ydiff)) {
mr.y = ydiff;
}
} else {
mr.y = 0;
}
if (doScrollZ) {
zdiff = targetZ - z;
if (enforceZpad) {
if (zdiff > padding.f) {
z = targetZ - padding.f;
} else if ((-zdiff) > padding.n) {
z = targetZ + padding.n;
}
}
mr.z = zdiff;
} else {
mr.z = 0;
}
}
x = x + ((xMult * (Math.floor(mr.x * 100) / 100)) * el);
y = y + ((yMult * (Math.floor(mr.y * 100) / 100)) * el);
z = z + ((zMult * (Math.floor(mr.z * 100) / 100)) * el);
visWidth = baseVisWidth - (z * 3);
visHeight = baseVisHeight - z;
if (limit.left != null) {
if (((x - visWidth) - limit.left) < 0) {
x = limit.left + visWidth;
}
}
if (limit.right != null) {
if ((limit.right - (x + visWidth)) < 0) {
x = limit.right - visWidth;
}
}
if (limit.top != null) {
if (((y - visHeight) - limit.top) < 0) {
y = limit.top + visHeight;
}
}
if (limit.bottom != null) {
if ((limit.bottom - (y + visHeight)) < 0) {
y = limit.bottom - visHeight;
}
}
if (limit.near != null) {
if ((z - limit.near) < 0) {
z = limit.near;
}
}
if (limit.far != null) {
if ((limit.far - z) < 0) {
z = limit.far;
}
}
edges.r = x + visWidth;
edges.l = x - visWidth;
edges.t = y - visHeight;
edges.b = y + visHeight;
}
function setMoveRate(t_x, t_y, t_z) {
if (t_x == undefined) {
t_x = 0;
}
if (t_y == undefined) {
t_y = 0;
}
if (t_z == undefined) {
t_z = 0;
}
mr = {x:t_x, y:t_y, z:t_z};
}
function setTarget(t_x, t_y, t_z) {
setTrack({doxpad:false, doypad:false, dozpad:false});
isTrack = false;
targetX = t_x;
targetY = t_y;
targetZ = t_z;
}
function setTrack(t_data) {
te = t_data.element;
if (t_data.scrollx != undefined) {
doScrollX = t_data.scrollx;
} else {
doScrollX = true;
}
if (t_data.scrolly != undefined) {
doScrollY = t_data.scrolly;
} else {
doScrollY = true;
}
if (t_data.scrollz != undefined) {
doScrollZ = t_data.scrollz;
} else {
doScrollZ = false;
}
offset = {x:0, y:0, z:0};
if (t_data.xoffset != undefined) {
offset.x = t_data.xoffset;
}
if (t_data.yoffset != undefined) {
offset.y = t_data.yoffset;
}
if (t_data.zoffset != undefined) {
offset.z = t_data.zoffset;
}
if (t_data.doxpad != undefined) {
enforceXpad = t_data.doxpad;
} else {
enforceXpad = true;
}
if (t_data.doypad != undefined) {
enforceYpad = t_data.doypad;
} else {
enforceYpad = true;
}
if (t_data.dozpad != undefined) {
enforceZpad = t_data.dozpad;
} else {
enforceZpad = true;
}
padding = {t:0, b:0, l:0, r:0, f:0, n:0};
if (t_data.topPad != undefined) {
padding.t = t_data.topPad;
}
if (t_data.bottomPad != undefined) {
padding.b = t_data.bottomPad;
}
if (t_data.leftPad != undefined) {
padding.l = t_data.leftPad;
}
if (t_data.rightPad != undefined) {
padding.r = t_data.rightPad;
}
if (t_data.nearPad != undefined) {
padding.n = t_data.nearPad;
}
if (t_data.farPad != undefined) {
padding.f = t_data.farPad;
}
limit = {left:null, right:null, top:null, bottom:null, near:null, far:null};
if (t_data.leftlimit != undefined) {
limit.left = t_data.leftlimit;
}
if (t_data.rightlimit != undefined) {
limit.right = t_data.rightlimit;
}
if (t_data.toplimit != undefined) {
limit.top = t_data.toplimit;
}
if (t_data.bottomlimit != undefined) {
limit.bottom = t_data.bottomlimit;
}
if (t_data.farlimit != undefined) {
limit.far = t_data.farlimit;
}
if (t_data.nearlimit != undefined) {
limit.near = t_data.nearlimit;
}
easeCushion = {x:DEFCUSHION_X, y:DEFCUSHION_Y, z:DEFCUSHION_Z};
if (t_data.easex != undefined) {
easeCushion.x = t_data.easex;
}
if (t_data.easey != undefined) {
easeCushion.y = t_data.easey;
}
if (t_data.easez != undefined) {
easeCushion.z = t_data.easez;
}
if (t_data.xmult != undefined) {
xMult = t_data.xmult;
}
if (t_data.ymult != undefined) {
yMult = t_data.ymult;
}
if (t_data.zmult != undefined) {
zMult = t_data.zmult;
}
isTrack = true;
isTarget = true;
}
function clearTrack() {
te = {};
isTrack = false;
clearTarget();
}
function clearTarget() {
targetX = x;
targetY = y;
targetZ = z;
isTarget = false;
}
function reset() {
moveTo(startX, startY, startZ);
}
function moveTo(t_x, t_y, t_z) {
x = t_x;
y = t_y;
z = t_z;
}
function clear() {
reset();
clearTrack();
}
function toString() {
return((((((((((("Camera : focus : " + x) + " , ") + y) + " , ") + z) + " : scroll : ") + mr.x) + " , ") + mr.y) + " , ") + mr.z);
}
var DEF_FL = 100;
var VISCUSHION = 0;
var DEFCUSHION_X = 2;
var DEFCUSHION_Y = 2;
var DEFCUSHION_Z = 1;
}
Symbol 466 MovieClip [__Packages.smashing.Point3D] Frame 0
class smashing.Point3D
{
var x, y, z;
function Point3D (x, y, z) {
this.x = Number(x);
this.y = Number(y);
this.z = Number(z);
}
function get length() {
return(Math.sqrt(((x * x) + (y * y)) + (z * z)));
}
function set length(newLength) {
if (length != 0) {
var _local2 = newLength / length;
x = x * _local2;
y = y * _local2;
z = z * _local2;
}
//return(length);
}
function get lengthSqu() {
return(((x * x) + (y * y)) + (z * z));
}
function copy() {
return(new smashing.Point3D(x, y, z));
}
function addPoint(p) {
return(new smashing.Point3D(p.x + x, p.y + y, p.z + z));
}
function subtractPoint(p) {
return(new smashing.Point3D(x - p.x, y - p.y, z - p.z));
}
function addScalar(n) {
return(new smashing.Point3D(x + n, y + n, z + n));
}
function subtractScalar(n) {
return(new smashing.Point3D(x - n, y - n, z - n));
}
function addPointMe(p) {
x = x + p.x;
y = y + p.y;
z = z + p.z;
}
function subtractPointMe(p) {
x = x - p.x;
y = y - p.y;
z = z - p.z;
}
function addScalarMe(n) {
x = x + n;
y = y + n;
z = z + n;
}
function subtractScalarMe(n) {
x = x - n;
y = y - n;
z = z - n;
}
function multiply(n) {
var _local2 = copy();
_local2.x = _local2.x * n;
_local2.y = _local2.y * n;
_local2.z = _local2.z * n;
return(_local2);
}
function divide(n) {
var _local2 = copy();
if (n == 0) {
_local2.x = 0;
_local2.y = 0;
_local2.z = 0;
return(undefined);
}
_local2.x = _local2.x / n;
_local2.y = _local2.y / n;
_local2.z = _local2.z / n;
return(_local2);
}
function multiplyMe(n) {
x = x * n;
y = y * n;
z = z * n;
}
function divideMe(n) {
x = x / n;
y = y / n;
z = z / n;
}
function dot(p) {
return(((x * p.x) + (y * p.y)) + (z * p.z));
}
function cross(p) {
return(new smashing.Point3D((y * p.z) - (z * p.y), (z * p.x) - (x * p.z), (x * p.y) - (y * p.x)));
}
function pseudoCross() {
return(new smashing.Point3D(y, -x, z));
}
function normalize() {
if (((!x) && (!y)) && (!z)) {
return(undefined);
}
var _local2 = length;
return(new smashing.Point3D(x / _local2, y / _local2, z / _local2));
}
function normalizeMe() {
if ((!x) && (!y)) {
return(undefined);
}
var _local2 = length;
x = x / _local2;
y = y / _local2;
z = z / _local2;
}
function reverse() {
var _local2 = new smashing.Point3D(x * -1, y * -1, z * -1);
return(_local2);
}
function reverseMe() {
x = x * -1;
y = y * -1;
z = z * -1;
}
function findCosine(vOther) {
var _local3 = dot(vOther);
var _local4 = length * vOther.__get__length();
var _local2 = _local3 / _local4;
return(_local2);
}
function equals(p) {
if (((x == p.x) && (y == p.y)) && (z == p.z)) {
return(true);
}
return(false);
}
function zero() {
x = 0;
y = 0;
z = 0;
}
function distSqu(p) {
var _local4 = p.x - x;
var _local3 = p.y - y;
var _local2 = p.z - z;
return(((_local4 * _local4) + (_local3 * _local3)) + (_local2 * _local2));
}
function toString() {
var _local2 = ((((("Point3D (" + x) + ",") + y) + ",") + z) + ")";
return(_local2);
}
}
Symbol 467 MovieClip [__Packages.smashing.keithm.ViewportGroup] Frame 0
class smashing.keithm.ViewportGroup
{
var name, mcs, index, numSlots, depthsort, zsort, reverse, min, max, current, isSearching, loop;
function ViewportGroup (t_data) {
name = t_data.name;
mcs = [];
index = t_data.index;
numSlots = t_data.slots;
if (t_data.zsort == true) {
t_data.depthsort = true;
} else if (t_data.zsort == undefined) {
t_data.zsort = false;
}
if (t_data.depthsort == undefined) {
t_data.depthsort = false;
}
depthsort = t_data.depthsort;
zsort = t_data.zsort;
if (t_data.reverse == undefined) {
t_data.reverse = false;
}
reverse = t_data.reverse;
}
function init(t_depth) {
min = t_depth;
max = t_depth + numSlots;
reset();
return(max);
}
function reset() {
mcs = [];
if (reverse) {
current = max;
} else {
current = min;
}
}
function getDepth(t_z) {
if (depthsort) {
return(__getNewDepth(t_z));
}
increment();
return(current);
}
function increment() {
isSearching = true;
while (isSearching) {
if (reverse) {
current--;
if (current < min) {
current = max;
}
} else {
current++;
if (current > max) {
current = min;
}
}
isSearching = false;
loop = mcs.length;
while (loop--) {
if (mcs[loop].depth == current) {
isSearching = true;
loop = 0;
}
}
}
}
function __getNewDepth(t_z) {
var _local6;
var _local2;
var _local4 = 1000000 /* 0x0F4240 */;
var _local3;
loop = mcs.length;
while (loop--) {
_local3 = t_z - mcs[loop].z;
if ((_local3 <= _local4) && (_local3 >= 0)) {
_local6 = loop;
if (_local4 == _local3) {
if (reverse) {
if (mcs[loop].depth > _local2) {
_local2 = mcs[loop].depth;
}
} else if (mcs[loop].depth < _local2) {
_local2 = mcs[loop].depth;
}
} else {
_local4 = _local3;
_local2 = mcs[loop].depth;
}
}
}
var _local5 = _local2;
if (_local5 == undefined) {
_local5 = max;
} else if (!reverse) {
_local5--;
}
if (_local5 < min) {
_local5 = __resortDepths();
}
__displaceDepth(_local5);
return(_local5);
}
function __displaceDepth(t_depth) {
var _local3 = t_depth - 1;
if (_local3 < min) {
_local3 = __resortDepths();
}
var _local2 = mcs.length;
while (_local2--) {
if (mcs[_local2].depth == t_depth) {
__displaceDepth(_local3);
mcs[_local2].depth = _local3;
mcs[_local2].mc.swapDepths(_local3);
return(undefined);
}
}
}
function __resortDepths() {
var _local3;
var _local4 = 1000000 /* 0x0F4240 */;
loop = mcs.length;
while (loop--) {
if (mcs[loop].z < _local4) {
_local3 = loop;
_local4 = mcs[loop].z;
}
}
mcs[_local3].depth = max;
loop = 1;
var _local2;
var _local5;
while (loop <= mcs.length) {
_local4 = 1000000 /* 0x0F4240 */;
_local2 = mcs.length;
while (_local2--) {
if (((_local2 != _local3) && (mcs[_local2].depth < mcs[_local3].depth)) && ((mcs[_local2].z - mcs[_local3].z) < _local4)) {
_local5 = _local2;
_local4 = mcs[_local2].z - mcs[_local3].z;
}
}
mcs[_local5].depth = mcs[_local3].depth - 1;
_local3 = _local5;
loop++;
}
loop = mcs.length;
while (loop--) {
mcs[loop].mc.swapDepths(mcs[loop].depth);
}
return(mcs[_local3].depth - 1);
}
}
Symbol 468 MovieClip [__Packages.smashing.SoundEngine] Frame 0
class smashing.SoundEngine
{
var __mc, o_sounds, o_groups, flag_muted, flag_overwrite, __groupCount, __a_soundQueue;
function SoundEngine (t_path, t_depth, t_overwrite) {
__mc = t_path.createEmptyMovieClip(__DEFAULTMCNAME, t_depth);
o_sounds = new Object();
o_groups = new Object();
flag_muted = false;
if (t_overwrite == undefined) {
t_overwrite = false;
}
flag_overwrite = t_overwrite;
__groupCount = 0;
createGroup(__DEFAULTGROUPNAME);
trace("-- Init Sound Engine -- ");
}
function createGroup(t_name) {
__groupCount++;
var _local2 = __mc.createEmptyMovieClip(t_name, __groupCount);
_local2.soundObject = new Sound(_local2);
o_groups[t_name] = _local2;
}
function createSound(t_name, t_assetID, t_groupName) {
var _local3;
if (t_groupName == undefined) {
_local3 = o_groups[__DEFAULTGROUPNAME];
} else {
_local3 = o_groups[t_groupName];
}
if (_local3 != undefined) {
var _local2 = {};
_local2.soundEffect = new Sound(_local3);
_local2.soundEffect.attachSound(t_assetID);
o_sounds[t_name] = _local2;
} else {
trace(("Error Locating Group " + t_groupName) + " for create Sound");
}
}
function playSound(t_soundName, t_loops) {
if (flag_muted) {
return(undefined);
}
var _local2 = o_sounds[t_soundName];
if (_local2 != undefined) {
if (t_loops == undefined) {
t_loops = 1;
} else if (t_loops == 0) {
t_loops = 100000 /* 0x0186A0 */;
}
if (flag_overwrite) {
_local2.SoundEffect.stop(_local2.idName);
}
_local2.soundEffect.start(0, t_loops);
} else {
trace(("Error - sound " + t_soundName) + " not found");
}
}
function stopSound(t_soundName) {
o_sounds[t_soundName].soundEffect.stop();
}
function stopAll() {
stopAllSounds();
}
function changeVolume(t_vol, t_groupName) {
if (t_groupName == undefined) {
t_groupName = __DEFAULTGROUPNAME;
}
o_groups[t_groupName].soundObject.setVolume(t_vol);
}
function toggleSound() {
if (flag_muted) {
soundOn();
} else {
soundOff();
}
return(!flag_muted);
}
function soundOff() {
flag_muted = true;
}
function soundOn() {
flag_muted = false;
}
function queueSound(t_soundName) {
__a_soundQueue.push({sound:t_soundName, isPlaying:false});
__playQueue();
}
function __playQueue() {
if (__a_soundQueue.length == 0) {
return(undefined);
}
if (!__a_soundQueue[0].isPlaying) {
playSound(__a_soundQueue[0].sound, 1, true);
__a_soundQueue[0].isPlaying = true;
}
}
function onQueuedSoundComplete() {
__a_soundQueue.splice(0, 1);
__playQueue();
}
function get queueLength() {
return(__a_soundQueue.length);
}
function isQueuePlaying() {
if (__a_soundQueue.length == 0) {
return(false);
}
return(true);
}
var __DEFAULTMCNAME = "soundEngine_MC";
var __DEFAULTGROUPNAME = "sound";
}
Symbol 469 MovieClip [__Packages.thebluerobot.doctorCompactor.World] Frame 0
class thebluerobot.doctorCompactor.World
{
var engine, gravity, __enemyCount, __isGameOver, fireTimer, __levelNum, __powerup_timer, __powerup, et, __isSpawning, player, mouseAngle, __useBeam, loop, a_projectiles, loopb, a_entitys, obj, shotsHit, __beam_oldSource, __beam_oldTarget, shotsFired, a_effects, __beam_mc, __beamLength, __beamSpark_timer, __lastPowerup, player_HP, __p_scoreSpawnChance, __POWERUP_CHANCE, __levelupCounter, __et_currentMax, __LEVELUP_ET_MAX_CHANGE, __ET_MAX_MINCAP, __ET_MAX_MAXCAP, __et_currentMin, __LEVELUP_ET_MIN_CHANGE, __ET_MIN_MINCAP, __ET_MIN_MAXCAP, __e_spawnSideSwitchChance, __LEVELUP_SSC_CHANGE, __SSC_MINCAP, __SSC_MAXCAP, __e_spawnTopChance, __LEVELUP_STC_CHANGE, __STC_MINCAP, __STC_MAXCAP, __e_spawnHardChance, __LEVELUP_HARDC_CHANGE, __HARDC_MINCAP, __HARDC_MAXCAP, __e_spawnMediumChance, __LEVELUP_MEDIUMC_CHANGE, __MEDIUMC_MINCAP, __MEDIUMC_MAXCAP, __LEVELUP_SCOREC_CHANGE, __SCOREC_MINCAP, __SCOREC_MAXCAP, __e_spawnLeft, bg, cameraData, __START_ET_MAX, __START_ET_MIN, __START_SSC, __START_STC, __START_HARDC, __START_MEDIUMC, __START_SCOREC, __SUPERSCORE_CHANCE, a_renderArray, a_renderOnceArray;
function World () {
}
function init(t_engine) {
engine = t_engine;
gravity = new smashing.Point3D(0, 200, 0);
}
function get kills() {
return(__enemyCount);
}
function stateGameOver() {
__isGameOver = true;
fireTimer = 99;
}
function start() {
engine.runLevelTransition(__levelNum);
}
function update(el) {
if (__powerup_timer > 0) {
__powerup_timer = __powerup_timer - el;
if (__powerup_timer <= 0) {
powerDown();
}
}
if (__powerup == "slowmo") {
el = el / 3;
}
et = et - el;
if ((et <= 0) && (__isSpawning)) {
spawnEnemy();
}
if (__isGameOver) {
if (player.mc.anim._currentFrame == player.mc.anim._totalFrames) {
engine.gameOver();
}
} else {
mouseAngle = Math.atan((player.absoluteJointy - _ymouse) / (player.absoluteJointx - _xmouse)) * 57.2957795130823;
fireTimer = fireTimer - el;
}
player.fullUpdate(el, mouseAngle);
if (__useBeam) {
updateBeam(el);
}
loop = a_projectiles.length;
var _local2;
while (loop--) {
_local2 = a_projectiles[loop];
_local2.fullUpdate(el);
if (_local2.isAlive) {
loopb = a_entitys.length;
while (loopb--) {
obj = a_entitys[loopb];
if (obj.isAlive && (obj.doUpdate)) {
if (_local2.runHD_entity_radius(obj, el)) {
shotsHit++;
_local2.hitReact();
if (obj.hitReact(_local2)) {
if (obj.TYPE == "enemy") {
killEnemy(obj);
}
}
loopb = 0;
}
}
}
}
if (!_local2.isSpawned) {
if (!_local2.isDrawn) {
a_projectiles[loop].deleteMe();
a_projectiles.splice(loop, 1);
}
}
}
loop = a_entitys.length;
while (loop--) {
obj = a_entitys[loop];
obj.fullUpdate(el);
if (obj.isAlive) {
if (__useBeam && (obj.runHD_line_sphere(__beam_oldSource, {x:__beam_oldSource.x + __beam_oldTarget.x, y:__beam_oldSource.y + __beam_oldTarget.y}, el))) {
if (obj.hitReact(_local2)) {
if (obj.TYPE == "enemy") {
killEnemy(obj);
shotsFired++;
shotsHit++;
}
}
}
if (player.runHD_entity_box(obj, el)) {
obj.hitReact(player);
playerDamage();
}
}
if (!obj.isSpawned) {
if (!obj.isDrawn) {
a_entitys[loop].deleteMe();
a_entitys.splice(loop, 1);
}
}
}
loop = a_effects.length;
while (loop--) {
obj = a_effects[loop];
if (!obj.isAlive) {
a_effects[loop].deleteMe();
a_effects.splice(loop, 1);
}
obj.fullUpdate(el);
}
}
function updateBeam(el) {
if (!engine.isMouseDown) {
beamOff();
return(undefined);
}
if (__beam_mc != undefined) {
engine.viewport.erase({mc:__beam_mc, groupName:"beam"});
}
__beam_mc = engine.viewport.draw({assetID:"_empty", groupName:"beam", z:1});
if (__beam_oldTarget != null) {
__beam_mc.lineStyle(11, __BEAM_COLOR, 30);
__beam_mc.moveTo(__beam_oldSource.x, __beam_oldSource.y);
__beam_mc.lineTo((__beam_oldSource.x + __beam_oldTarget.x) + (20 - (Math.random() * 10)), (__beam_oldSource.y + __beam_oldTarget.y) + (20 - (Math.random() * 10)));
}
__beam_oldTarget = new smashing.Point3D(_xmouse - player.absoluteJointx, _ymouse - player.absoluteJointy, 0);
__beam_oldTarget.__set__length(__beamLength);
if (__beamLength < __BEAM_MAX_LENGTH) {
__beamLength = __beamLength + (__BEAM_RATE * el);
}
__beam_oldSource = player.getGunTip(__beam_oldTarget.copy());
__beam_mc.lineStyle(7, __BEAM_COLOR, 100);
__beam_mc.moveTo(__beam_oldSource.x, __beam_oldSource.y);
__beam_mc.lineTo((__beam_oldSource.x + __beam_oldTarget.x) + (20 - (Math.random() * 10)), (__beam_oldSource.y + __beam_oldTarget.y) + (20 - (Math.random() * 10)));
__beamSpark_timer = __beamSpark_timer - el;
if (__beamSpark_timer <= 0) {
var _local2 = createEffect({asset:"effect_beamSparks", x:__beam_oldSource.x, y:__beam_oldSource.y, grav:true});
if (Math.random() > 0.5) {
_local2.rotation = 180;
}
__beamSpark_timer = __BEAMSPARK_RATE - (Math.random() / 2);
}
}
function powerUp(t_type) {
if ((__powerup != "none") && (!((__powerup == "shield") && (t_type == "shield")))) {
powerDown();
}
if ((t_type == "shield") && (__powerup != "shield")) {
player.shieldUp();
}
__powerup = t_type;
__lastPowerup = t_type;
__powerup_timer = __POWERUP_DURATION;
if (__powerup == "slowmo") {
engine.slowmo_mc.gotoAndPlay("on");
engine.toggleSlowMusic(true);
engine.playSound("slowmoHit");
}
player.changePowerup(__powerup);
}
function powerDown() {
if (__powerup == "shield") {
player.shieldDown();
} else if (__powerup == "slowmo") {
engine.slowmo_mc.gotoAndPlay("off");
engine.toggleSlowMusic(false);
}
__powerup = "none";
__powerup_timer = 0;
beamOff();
player.changePowerup("none");
}
function playerFire() {
if (__powerup == "beam") {
beamOn();
return(undefined);
}
if (fireTimer <= 0) {
shotsFired++;
player.fire();
createProjectile();
fireTimer = FIRE_RATE;
if (__powerup == "spread") {
createProjectile(-15);
createProjectile(15);
fireTimer = fireTimer * 1.6;
engine.playSound("fire");
} else if (__powerup == "rocket") {
fireTimer = fireTimer * 1.4;
engine.playSound("fireRocket");
} else if (__powerup != "beam") {
engine.playSound("fire");
}
}
}
function playerRelease() {
if (__powerup == "beam") {
beamOff();
}
}
function beamOn() {
if (__useBeam) {
return(undefined);
}
__beamSpark_timer = 0.1;
__useBeam = true;
engine.playSound("beam", 0);
}
function beamOff() {
__useBeam = false;
__beamLength = 10;
__beam_oldTarget = null;
engine.viewport.erase({mc:__beam_mc, groupName:"beam"});
engine.stopSound("beam");
}
function playerDamage() {
if (__powerup == "shield") {
powerDown();
return(undefined);
}
player_HP--;
if (player_HP == 0) {
engine.playSound("playerDie");
player.die();
stateGameOver();
} else {
player.takeDamage();
engine.playSound("playerDamage");
}
engine.updateUI();
}
function killEnemy(t_enemy) {
engine.addScore(t_enemy.value);
if (Math.random() < __p_scoreSpawnChance) {
if ((__powerup == "none") && (Math.random() < __POWERUP_CHANCE)) {
spawnPowerup(t_enemy);
} else {
spawnPickup(t_enemy);
}
}
__enemyCount++;
__levelupCounter++;
if (__levelupCounter == __ENEMYS_DEAD_FOR_LEVELUP) {
__levelupCounter = 0;
__levelNum++;
levelupEnemys();
engine.runLevelTransition(__levelNum);
}
}
function levelupEnemys() {
__et_currentMax = __et_currentMax + __LEVELUP_ET_MAX_CHANGE;
if (__et_currentMax < __ET_MAX_MINCAP) {
__et_currentMax = __ET_MAX_MINCAP;
} else if (__et_currentMax > __ET_MAX_MAXCAP) {
__et_currentMax = __ET_MAX_MAXCAP;
}
__et_currentMin = __et_currentMin + __LEVELUP_ET_MIN_CHANGE;
if (__et_currentMin < __ET_MIN_MINCAP) {
__et_currentMin = __ET_MIN_MINCAP;
} else if (__et_currentMin > __ET_MIN_MAXCAP) {
__et_currentMin = __ET_MIN_MAXCAP;
}
__e_spawnSideSwitchChance = __e_spawnSideSwitchChance + __LEVELUP_SSC_CHANGE;
if (__e_spawnSideSwitchChance < __SSC_MINCAP) {
__e_spawnSideSwitchChance = __SSC_MINCAP;
} else if (__e_spawnSideSwitchChance > __SSC_MAXCAP) {
__e_spawnSideSwitchChance = __SSC_MAXCAP;
}
__e_spawnTopChance = __e_spawnTopChance + __LEVELUP_STC_CHANGE;
if (__e_spawnTopChance < __STC_MINCAP) {
__e_spawnTopChance = __STC_MINCAP;
} else if (__e_spawnTopChance > __STC_MAXCAP) {
__e_spawnTopChance = __STC_MAXCAP;
}
__e_spawnHardChance = __e_spawnHardChance + __LEVELUP_HARDC_CHANGE;
if (__e_spawnHardChance < __HARDC_MINCAP) {
__e_spawnHardChance = __HARDC_MINCAP;
} else if (__e_spawnHardChance > __HARDC_MAXCAP) {
__e_spawnHardChance = __HARDC_MAXCAP;
}
__e_spawnMediumChance = __e_spawnMediumChance + __LEVELUP_MEDIUMC_CHANGE;
if (__e_spawnMediumChance < __MEDIUMC_MINCAP) {
__e_spawnMediumChance = __MEDIUMC_MINCAP;
} else if (__e_spawnMediumChance > __MEDIUMC_MAXCAP) {
__e_spawnMediumChance = __MEDIUMC_MAXCAP;
}
__p_scoreSpawnChance = __p_scoreSpawnChance + __LEVELUP_SCOREC_CHANGE;
if (__p_scoreSpawnChance < __SCOREC_MINCAP) {
__p_scoreSpawnChance = __SCOREC_MINCAP;
} else if (__p_scoreSpawnChance > __SCOREC_MAXCAP) {
__p_scoreSpawnChance = __SCOREC_MAXCAP;
}
}
function createProjectile(t_angle) {
if (t_angle == undefined) {
t_angle = 0;
}
if (t_angle < 0) {
t_angle = t_angle + 360;
}
if (__powerup == "ricochet") {
var _local2 = new thebluerobot.doctorCompactor.ents.Projectile_Ricochet();
} else if (__powerup == "rocket") {
var _local2 = new thebluerobot.doctorCompactor.ents.Projectile_Rocket();
} else if (__powerup == "spread") {
var _local2 = new thebluerobot.doctorCompactor.ents.Projectile_Spread();
} else {
var _local2 = new thebluerobot.doctorCompactor.ents.Projectile();
}
var _local5 = new smashing.Point3D(_xmouse - player.absoluteJointx, _ymouse - player.absoluteJointy, 0);
var _local4 = player.getGunTip(_local5.copy());
_local2.init({owner:this, x:_local4.x, y:_local4.y, fireVector:_local5.normalize()});
_local2.spawn();
a_projectiles.push(_local2);
}
function spawnEnemy() {
var _local3;
var _local4;
var _local5;
var _local2;
et = __et_currentMin + (Math.random() * (__et_currentMax - __et_currentMin));
_local5 = Math.random();
if (_local5 < __e_spawnHardChance) {
_local2 = new thebluerobot.doctorCompactor.ents.Enemy_Type3();
} else if (_local5 < __e_spawnMediumChance) {
_local2 = new thebluerobot.doctorCompactor.ents.Enemy_Type2();
} else {
_local2 = new thebluerobot.doctorCompactor.ents.Enemy_Type1();
}
if (Math.random() < __e_spawnSideSwitchChance) {
if (__e_spawnLeft) {
__e_spawnLeft = false;
} else {
__e_spawnLeft = true;
}
}
if (__enemyCount == 0) {
__e_spawnLeft = true;
}
if (Math.random() < __e_spawnTopChance) {
_local4 = -_local2.baseHeight;
if (__e_spawnLeft) {
_local3 = player.absoluteJointx - (_local2.baseWidth + (Math.random() * player.absoluteJointx));
} else {
_local3 = player.absoluteJointx + (_local2.baseWidth + (Math.random() * (thebluerobot.doctorCompactor.Dimensions.__get__screenWidth() - player.absoluteJointx)));
}
} else {
if (__e_spawnLeft) {
_local3 = -_local2.baseWidth;
} else {
_local3 = thebluerobot.doctorCompactor.Dimensions.__get__screenWidth() + _local2.baseWidth;
}
_local4 = Math.random() * (player.y + player.baseHeight);
}
var _local6 = new smashing.Point3D(player.absoluteJointx - _local3, player.absoluteJointy - _local4, 0);
if (__levelNum == 1) {
_local2.slowSpeed();
} else if (__levelNum == 2) {
_local2.medSpeed();
}
_local2.init({x:_local3, y:_local4, move:_local6.normalize(), owner:this});
_local2.spawn();
a_entitys.push(_local2);
}
function spawnPickup(t_enemy) {
var _local2 = new thebluerobot.doctorCompactor.ents.Pickup();
_local2.init({x:t_enemy.x, y:t_enemy.y, owner:this});
_local2.spawn();
a_entitys.push(_local2);
}
function spawnPowerup(t_enemy) {
var _local3 = ["beam", "slowmo", "rocket", "shield", "ricochet"];
var _local2 = Math.ceil(Math.random() * _local3.length) - 1;
if (_local3[_local2] == __lastPowerup) {
_local2++;
}
if (_local2 < 0) {
_local2 = 0;
}
if (_local2 > (_local3.length - 1)) {
_local2 = 0;
}
var _local4;
if (_local3[_local2] == "beam") {
_local4 = new thebluerobot.doctorCompactor.ents.PowerUp_Beam();
} else if (_local3[_local2] == "shield") {
_local4 = new thebluerobot.doctorCompactor.ents.PowerUp_Shield();
} else if (_local3[_local2] == "ricochet") {
_local4 = new thebluerobot.doctorCompactor.ents.PowerUp_Ricochet();
} else if (_local3[_local2] == "rocket") {
_local4 = new thebluerobot.doctorCompactor.ents.PowerUp_Rocket();
} else if (_local3[_local2] == "spread") {
_local4 = new thebluerobot.doctorCompactor.ents.PowerUp_Spread();
} else if (_local3[_local2] == "slowmo") {
_local4 = new thebluerobot.doctorCompactor.ents.PowerUp_Slowmo();
}
_local4.init({x:t_enemy.x, y:t_enemy.y, owner:this});
_local4.spawn();
a_entitys.push(_local4);
}
function suspendSpawning() {
__isSpawning = false;
}
function reinstateSpawning() {
__isSpawning = true;
}
function createEffect(t_data) {
if (t_data.grav) {
t_data.grav = gravity;
}
t_data.owner = this;
var _local2 = new smashing.keithm.Effect();
_local2.init(t_data);
_local2.spawn();
a_effects.push(_local2);
return(_local2);
}
function generate(t_levelData) {
var _local3 = t_levelData.ldata;
_local3.player.owner = this;
player = new thebluerobot.doctorCompactor.ents.Player();
player.init(_local3.player);
player.spawn();
_local3.bg.owner = this;
bg = new thebluerobot.doctorCompactor.ents.Scenery();
bg.init(_local3.bg);
bg.spawn();
a_entitys = [];
a_effects = [];
a_projectiles = [];
cameraData = _local3.cameraData;
var _local2 = _local3.spawningData;
__ENEMYS_DEAD_FOR_LEVELUP = _local2.__ENEMYS_DEAD_FOR_LEVELUP;
__START_ET_MAX = _local2.__START_ET_MAX;
__LEVELUP_ET_MAX_CHANGE = _local2.__LEVELUP_ET_MAX_CHANGE;
__ET_MAX_MINCAP = _local2.__ET_MAX_MINCAP;
__ET_MAX_MAXCAP = _local2.__ET_MAX_MAXCAP;
__START_ET_MIN = _local2.__START_ET_MIN;
__LEVELUP_ET_MIN_CHANGE = _local2.__LEVELUP_ET_MIN_CHANGE;
__ET_MIN_MINCAP = _local2.__ET_MIN_MINCAP;
__ET_MIN_MAXCAP = _local2.__ET_MIN_MAXCAP;
__START_SSC = _local2.__START_SSC;
__LEVELUP_SSC_CHANGE = _local2.__LEVELUP_SSC_CHANGE;
__SSC_MINCAP = _local2.__SSC_MINCAP;
__SSC_MAXCAP = _local2.__SSC_MAXCAP;
__START_STC = _local2.__START_STC;
__LEVELUP_STC_CHANGE = _local2.__LEVELUP_STC_CHANGE;
__STC_MINCAP = _local2.__STC_MINCAP;
__STC_MAXCAP = _local2.__STC_MAXCAP;
__START_HARDC = _local2.__START_HARDC;
__LEVELUP_HARDC_CHANGE = _local2.__LEVELUP_HARDC_CHANGE;
__HARDC_MINCAP = _local2.__HARDC_MINCAP;
__HARDC_MAXCAP = _local2.__HARDC_MAXCAP;
__START_MEDIUMC = _local2.__START_MEDIUMC;
__LEVELUP_MEDIUMC_CHANGE = _local2.__LEVELUP_MEDIUMC_CHANGE;
__MEDIUMC_MINCAP = _local2.__MEDIUMC_MINCAP;
__MEDIUMC_MAXCAP = _local2.__MEDIUMC_MAXCAP;
__START_SCOREC = _local2.__START_SCOREC;
__LEVELUP_SCOREC_CHANGE = _local2.__LEVELUP_SCOREC_CHANGE;
__SCOREC_MINCAP = _local2.__SCOREC_MINCAP;
__SCOREC_MAXCAP = _local2.__SCOREC_MAXCAP;
__SUPERSCORE_CHANCE = _local2.__SUPERSCORE_CHANCE;
__POWERUP_CHANCE = _local2.__POWERUP_CHANCE;
refreshRenderArray();
reset(false);
}
function refreshRenderArray() {
a_renderArray = [a_entitys, a_effects, a_projectiles, [player]];
a_renderOnceArray = [[bg]];
}
function reset(t_resetObjects) {
if (t_resetObjects == undefined) {
t_resetObjects = true;
}
__lastPowerup = "none";
__useBeam = false;
powerDown();
__isSpawning = true;
__isGameOver = false;
__enemyCount = 0;
__levelupCounter = 0;
__levelNum = 1;
shotsFired = 0;
shotsHit = 0;
player_HP = __PLAYER_MAXHP;
__et_currentMax = __START_ET_MAX;
__et_currentMin = __START_ET_MIN;
__e_spawnSideSwitchChance = __START_SSC;
__e_spawnTopChance = __START_STC;
__e_spawnHardChance = __START_HARDC;
__e_spawnMediumChance = __START_MEDIUMC;
__p_scoreSpawnChance = __START_SCOREC;
__e_spawnLeft = true;
fireTimer = 0;
et = __et_currentMax;
player.reset();
bg.reset();
if (t_resetObjects) {
loop = a_entitys.length;
while (loop--) {
a_entitys.splice(loop, 1);
}
loop = a_effects.length;
while (loop--) {
a_effects.splice(loop, 1);
}
loop = a_projectiles.length;
while (loop--) {
a_projectiles[loop].splice(loop, 1);
}
}
}
function get powerupName() {
return(__powerup);
}
function get powerupChangesGun() {
if ((__powerup != "shield") && (__powerup != "slowmo")) {
return(true);
}
return(false);
}
var FIRE_RATE = 0.22;
var __PLAYER_MAXHP = 5;
var __ENEMYS_DEAD_FOR_LEVELUP = 10;
var __POWERUP_DURATION = 10;
var __BEAM_COLOR = 13369344;
var __BEAM_MAX_LENGTH = 300;
var __BEAM_RATE = 3500;
var __BEAMSPARK_RATE = 0.7;
}
Symbol 470 MovieClip [__Packages.smashing.keithm.Renderable] Frame 0
class smashing.keithm.Renderable
{
var baseWidth, baseHeight, hdWidth, hdHeight, radius, assetID, owner, __DEF_ASSET, startX, startY, startZ, zInfluence, isSpawned, x, y, z, mc, isDrawn, isAlive, isHidden, flag_eraseMe, __flag_scaleChanged, scale, startScale, hdReg;
function Renderable () {
baseWidth = __DEF_WIDTH;
baseHeight = __DEF_HEIGHT;
if (__USE_DIMENSIONS_AS_HD) {
hdWidth = baseWidth / 2;
hdHeight = baseHeight / 2;
radius = hdWidth;
} else {
hdWidth = __DEF_HD_WIDTH;
hdHeight = __DEF_HD_HEIGHT;
radius = __DEF_HD_WIDTH;
}
setHDRegistration();
}
function init(t_data) {
if (t_data.owner == undefined) {
trace("ERROR! NO OWNER SENT TO ELEMENT: " + assetID);
}
owner = t_data.owner;
if (t_data.asset == undefined) {
t_data.asset = __DEF_ASSET;
}
assetID = t_data.asset;
if (t_data.x == undefined) {
t_data.x = 0;
}
startX = t_data.x;
if (t_data.y == undefined) {
t_data.y = 0;
}
startY = t_data.y;
if (t_data.z == undefined) {
t_data.z = __DEF_Z;
}
startZ = t_data.z;
if (t_data.zInfluence == undefined) {
t_data.zInfluence = 0;
}
zInfluence = t_data.zInfluence;
isSpawned = false;
}
function get doUpdate() {
return(__DO_UPDATE);
}
function get drawWhenKilled() {
return(__DRAW_WHEN_KILLED);
}
function spawn() {
isSpawned = true;
reset();
}
function reset() {
x = startX;
y = startY;
z = startZ;
if (((mc == undefined) || (mc == Void)) || (mc == "")) {
isDrawn = false;
}
isAlive = true;
isHidden = false;
flag_eraseMe = false;
}
function onDraw(t_newmc, t_viewport) {
isDrawn = true;
mc = t_newmc;
if (isHidden) {
mc._visible = false;
}
if (__USE_ACTUAL_DIMENSIONS) {
baseWidth = mc._width;
baseHeight = mc._height;
setHDRegistration();
}
if (__USE_DIMENSIONS_AS_HD) {
hdWidth = baseWidth / 2;
hdHeight = baseHeight / 2;
radius = hdWidth;
}
__flag_scaleChanged = true;
mc._x = -1000 - baseWidth;
mc._y = -1000 - baseHeight;
}
function update(el) {
}
function move(el) {
}
function fullUpdate(el) {
}
function render(camera, t_scale) {
if (t_scale == undefined) {
t_scale = camera.fl / (z - camera.z);
}
mc._x = ((x - camera.x) * scale) + camera.sc.x;
mc._y = ((y - camera.y) * scale) + camera.sc.y;
if (__3D_SCALE) {
if (z < camera.z) {
return(undefined);
}
if (scale != t_scale) {
scale = t_scale;
mc._xscale = (mc._yscale = 100 * (1 + (scale - startScale)));
}
}
}
function renderDirect() {
mc._x = x;
mc._y = y;
}
function initScale(camera) {
startScale = (scale = camera.fl / (startZ - camera.startZ));
}
function onErase(t_viewport) {
flag_eraseMe = false;
isDrawn = false;
mc = undefined;
if (!isSpawned) {
return(undefined);
}
if (__KILL_ON_ERASE) {
kill();
}
}
function despawn() {
isAlive = false;
isSpawned = false;
flag_eraseMe = true;
}
function deleteMe() {
}
function kill() {
isAlive = false;
if ((!__DRAW_WHEN_KILLED) && (isDrawn)) {
flag_eraseMe = true;
}
}
function hide() {
mc._visible = false;
isHidden = true;
}
function show() {
mc._visible = true;
isHidden = false;
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = 0;
}
function animate(t_frame, t_subFrame) {
mc.gotoAndStop(t_frame);
if (t_subFrame != undefined) {
mc.anim.gotoAndStop(t_subFrame);
}
}
function toString() {
return("Renderable: " + TYPE);
}
function drawHitBox() {
var _local3 = hdReg.x;
var _local4 = hdReg.y;
var _local2 = mc.createEmptyMovieClip("hitbox", 1);
_local2.beginFill(16751103, 50);
_local2.lineStyle(2, 16751103, 100);
_local2.moveTo(_local3 - hdWidth, _local4 - hdHeight);
_local2.lineTo(_local3 + hdWidth, _local4 - hdHeight);
_local2.lineTo(_local3 + hdWidth, _local4 + hdHeight);
_local2.lineTo(_local3 - hdWidth, _local4 + hdHeight);
_local2.lineTo(_local3 - hdWidth, _local4 - hdHeight);
_local2.endFill();
}
function drawReg() {
var _local2 = mc.createEmptyMovieClip("hitbox", 1);
_local2.beginFill(16751103, 50);
_local2.lineStyle(2, 16751103, 100);
_local2.moveTo(-5, -5);
_local2.lineTo(5, -5);
_local2.lineTo(5, 5);
_local2.lineTo(-5, 5);
_local2.lineTo(-5, -5);
}
var TYPE = "element";
var DRAWTYPE = "element";
var CUSTOMDRAW = false;
var __DEF_Z = 100;
var __3D_SCALE = false;
var __DEF_WIDTH = 50;
var __DEF_HEIGHT = 50;
var __USE_ACTUAL_DIMENSIONS = true;
var __DEF_HD_WIDTH = 25;
var __DEF_HD_HEIGHT = 25;
var __USE_DIMENSIONS_AS_HD = true;
var __DRAW_WHEN_KILLED = true;
var __KILL_ON_ERASE = false;
var __DO_UPDATE = true;
}
Symbol 471 MovieClip [__Packages.smashing.keithm.Element] Frame 0
class smashing.keithm.Element extends smashing.keithm.Renderable
{
var mass, bounciness, startSpin, startVelocity, owner, startGravity, velocity, gravityVector, rotation, spin, isSpinning, nextX, x, nextY, y, nextZ, z, mc, hdReg, radius, hdWidth, hdHeight, TYPE;
function Element () {
super();
}
function init(t_data) {
super.init(t_data);
if (t_data.mass == undefined) {
mass = __DEF_MASS;
} else {
mass = t_data.mass;
}
if (t_data.bounce == undefined) {
bounciness = __DEF_BOUNCY;
} else {
bounciness = t_data.bounce;
}
if (t_data.spin != undefined) {
startSpin = t_data.spin;
} else {
startSpin = 0;
}
if (t_data.move != undefined) {
startVelocity = t_data.move;
} else {
startVelocity = new smashing.Point3D(0, 0, 0);
}
if (owner.gravity != undefined) {
startGravity = owner.gravity;
} else {
startGravity = new smashing.Point3D(0, 0, 0);
}
}
function reset() {
velocity = startVelocity;
gravityVector = startGravity;
rotation = 0;
spin = startSpin;
if (startSpin == 0) {
isSpinning = false;
} else {
isSpinning = true;
}
super.reset();
}
function update(el) {
if (__USE_GRAVITY) {
addVelocity(gravityVector, el);
}
if (spin != 0) {
isSpinning = true;
}
rotation = rotation + (spin * el);
nextX = x + (velocity.x * el);
nextY = y + (velocity.y * el);
nextZ = z + (velocity.z * el);
}
function move(el) {
x = x + (velocity.x * el);
y = y + (velocity.y * el);
z = z + (velocity.z * el);
}
function fullUpdate(el) {
if (__USE_GRAVITY) {
addVelocity(gravityVector, el);
}
if (spin != 0) {
isSpinning = true;
}
rotation = rotation + (spin * el);
nextX = (x = x + (velocity.x * el));
nextY = (y = y + (velocity.y * el));
nextZ = (z = z + (velocity.z * el));
}
function render(camera) {
super.render(camera);
if (isSpinning) {
mc._rotation = rotation;
isSpinning = false;
}
}
function runHD_entity_radius(t_target, el) {
var _local4 = (nextX + hdReg.x) - ((t_target.x + (t_target.velocity.x * el)) + t_target.hdReg.x);
var _local3 = (nextY + hdReg.y) - ((t_target.y + (t_target.velocity.y * el)) + t_target.hdReg.y);
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local5 <= (t_target.radius + radius)) {
return(true);
}
return(false);
}
function runHD_entity_box(t_target, el) {
var _local3 = {x:false, y:false};
if (Math.abs((nextX + hdReg.x) - ((t_target.x + (t_target.velocity.x * el)) + t_target.hdReg.x)) < (hdWidth + t_target.hdWidth)) {
_local3.x = true;
}
if (Math.abs((nextY + hdReg.y) - ((t_target.y + (t_target.velocity.y * el)) + t_target.hdReg.y)) < (hdHeight + t_target.hdHeight)) {
_local3.y = true;
}
if (_local3.x && (_local3.y)) {
return(true);
}
return(false);
}
function runHD_entity_3D(t_target, el) {
var _local3 = z - t_target.z;
var _local2 = (nextZ + radius) - t_target.z;
if ((_local3 * _local2) <= 0) {
return(runHD_entity_radius(t_target, el));
}
return(false);
}
function runHD_line_sphere(t_lineStart, t_lineEnd, el) {
var _local4 = new smashing.Point3D(t_lineStart.x, t_lineStart.y, 0);
var _local3 = new smashing.Point3D(t_lineEnd.x, t_lineEnd.y, 0);
var _local6 = _local4.x - _local3.x;
var _local7 = _local4.y - _local3.y;
var _local2 = getLineSeperation(_local3, {x:x, y:y}, _local6, _local7);
var _local5;
if (_local2.distance <= radius) {
_local5 = new smashing.Point3D(x + _local2.xSeparation, y + _local2.ySeparation);
return(true);
}
_local5.x = (_local5.y = 0);
return(false);
}
function runHD_line_sphere_complex(t_lineStart, t_lineEnd, el) {
var _local5 = new smashing.Point3D(t_lineStart.x, t_lineStart.y, 0);
var _local7 = new smashing.Point3D(t_lineEnd.x, t_lineEnd.y, 0);
var _local8;
var _local16 = getDistBetween(_local5, {x:x, y:y});
var _local15 = getDistBetween(_local7, {x:x, y:y});
var _local11 = getDistBetween(_local5, _local7);
var _local4 = new smashing.Point3D(_local5.x, _local5.y);
var _local9 = new smashing.Point3D(_local7.x, _local7.y);
var _local12 = _local9.x - _local4.x;
var _local13 = _local9.y - _local4.y;
var _local3 = _local12 / _local11;
var _local2 = _local13 / _local11;
var _local10;
_local4.subtractScalarMe(_local3 * radius, _local2 * radius);
_local9.addScalarMe(_local3 * radius, _local2 * radius);
var _local6 = getLineSeperation(_local5, {x:x, y:y}, _local12, _local13);
_local12 = _local9.x - _local4.x;
_local13 = _local9.y - _local4.y;
var _local14 = getLineSeperation(_local4, {x:x, y:y}, _local12, _local13);
if (_local6.distance <= radius) {
if (_local15 > _local11) {
_local8 = Math.sqrt((radius * radius) - (_local14.distance * _local14.distance));
_local3 = _local3 * _local8;
_local2 = _local2 * _local8;
(x + _local14.xSeparation) + _local3;
_local10 = (y + _local14.ySeparation) + _local2;
} else {
_local8 = Math.sqrt((radius * radius) - (_local6.distance * _local6.distance));
_local3 = _local3 * _local8;
_local2 = _local2 * _local8;
(x + _local6.xSeparation) + _local3;
_local10 = (y + _local6.ySeparation) + _local2;
if (getDistBetween(_local5, _local10) >= _local11) {
_local10.copy(_local7);
}
}
return(true);
}
_local10.x = (_local10.y = 0);
return(false);
}
function getLineSeperation(p0, s, dx, dy) {
var _local1 = new Object();
var _local5 = p0.x - s.x;
var _local6 = p0.y - s.y;
var _local7 = (dx * dx) + (dy * dy);
var _local2 = (-((_local5 * dx) + (_local6 * dy))) / _local7;
_local2 = Math.min(Math.max(_local2, 0), 1);
_local1.xSeparation = _local5 + (_local2 * dx);
_local1.ySeparation = _local6 + (_local2 * dy);
_local1.distance = Math.sqrt((_local1.xSeparation * _local1.xSeparation) + (_local1.ySeparation * _local1.ySeparation));
return(_local1);
}
function getDistBetween(p0, p1) {
return(Math.sqrt((p1.x - p0.x) * (p1.x - p0.x)) + ((p1.y - p0.y) * (p1.y - p0.y)));
}
function hitReact(t_target) {
}
function replaceVelocity(t_vector) {
velocity = t_vector.copy();
}
function inputVelocity(t_vector) {
velocity.x = velocity.x + t_vector.x;
velocity.y = velocity.y + t_vector.y;
velocity.z = velocity.z + t_vector.z;
}
function addVelocity(t_vector, el, maxVelocity, xMult, yMult, zMult) {
if (maxVelocity == undefined) {
maxVelocity = __MAX_VELOCITY;
}
zMult = 1;
yMult = zMult;
xMult = yMult;
if ((Math.abs(velocity.x) < maxVelocity) || ((velocity.x * t_vector.x) < 0)) {
velocity.x = velocity.x + ((t_vector.x * el) * xMult);
}
if ((Math.abs(velocity.y) < maxVelocity) || ((velocity.y * t_vector.y) < 0)) {
velocity.y = velocity.y + ((t_vector.y * el) * yMult);
}
if ((Math.abs(velocity.z) < maxVelocity) || ((velocity.z * t_vector.z) < 0)) {
velocity.z = velocity.z + ((t_vector.z * el) * zMult);
}
}
function decelVelocityX(el, t_friction) {
if (t_friction == undefined) {
t_friction = 1;
}
if (velocity.x < 0) {
velocity.x = velocity.x + ((__DECELERATION_DECAY * t_friction) * el);
if (velocity.x > 0) {
velocity.x = 0;
}
return(undefined);
}
velocity.x = velocity.x - ((__DECELERATION_DECAY * t_friction) * el);
if (velocity.x < 0) {
velocity.x = 0;
}
}
function decelVelocityY(el, t_friction) {
if (t_friction == undefined) {
t_friction = 1;
}
if (velocity.y < 0) {
velocity.y = velocity.y + ((__DECELERATION_DECAY * t_friction) * el);
if (velocity.y > 0) {
velocity.y = 0;
}
return(undefined);
}
velocity.y = velocity.y - ((__DECELERATION_DECAY * t_friction) * el);
if (velocity.y < 0) {
velocity.y = 0;
}
}
function decelVelocityZ(el, t_friction) {
if (t_friction == undefined) {
t_friction = 1;
}
if (velocity.z < 0) {
velocity.z = velocity.z + ((__DECELERATION_DECAY * t_friction) * el);
if (velocity.z > 0) {
velocity.z = 0;
}
return(undefined);
}
velocity.z = velocity.z - ((__DECELERATION_DECAY * t_friction) * el);
if (velocity.z < 0) {
velocity.z = 0;
}
}
function decayVelocityX(t_decay) {
if (t_decay == undefined) {
t_decay = __COLLISION_DECAY;
}
if (bounciness) {
t_decay = t_decay / bounciness;
}
velocity.x = velocity.x * (1 - t_decay);
}
function decayVelocityY(t_decay) {
if (t_decay == undefined) {
t_decay = __COLLISION_DECAY;
}
if (bounciness) {
t_decay = t_decay / bounciness;
}
velocity.y = velocity.y * (1 - t_decay);
}
function decayVelocityZ(t_decay) {
if (t_decay == undefined) {
t_decay = __COLLISION_DECAY;
}
if (bounciness) {
t_decay = t_decay / bounciness;
}
velocity.z = velocity.z * (1 - t_decay);
}
function invertVelocityX() {
velocity.x = velocity.x * -1;
}
function invertVelocityY() {
velocity.y = velocity.y * -1;
}
function invertVelocityZ() {
velocity.z = velocity.z * -1;
}
function magnitudeToVector(t_magnitude, t_angle) {
var _local2;
var _local1;
var _local3 = t_angle * (Math.PI/180);
_local2 = t_magnitude * Math.cos(_local3);
_local2 = Math.round(_local2 * 100) / 100;
_local1 = t_magnitude * Math.sin(_local3);
_local1 = Math.round(_local1 * 100) / 100;
return(new smashing.Point3D(_local2, _local1, 0));
}
function toString() {
return("Element: " + TYPE);
}
var __DEF_MASS = 1;
var __DEF_BOUNCY = 1;
var __USE_GRAVITY = false;
var __MAX_VELOCITY = 300;
var __DECELERATION_DECAY = 100;
var __COLLISION_DECAY = 0.25;
var __DO_UPDATE = true;
}
Symbol 472 MovieClip [__Packages.thebluerobot.doctorCompactor.Entity] Frame 0
class thebluerobot.doctorCompactor.Entity extends smashing.keithm.Element
{
var velocity, mc, isAlive, despawn, spin;
function Entity () {
super();
}
function reset() {
super.reset();
}
function fullUpdate(el) {
super.fullUpdate(el);
if (__ROTATE_TO_MOVEMENT) {
mc._rotation = Math.atan(velocity.y / velocity.x) * 57.2957795130823;
}
if (!isAlive) {
if (mc.anim._currentFrame == mc.anim._totalFrames) {
despawn();
}
spin = spin * 1.1;
}
}
function hitReact(t_target) {
}
var __KILL_ON_ERASE = true;
var __ROTATE_TO_MOVEMENT = false;
}
Symbol 473 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.Player] Frame 0
class thebluerobot.doctorCompactor.ents.Player extends thebluerobot.doctorCompactor.Entity
{
var __fireJoint, __armDimensions, isFacingLeft, __lastAngle, isAnimating, hasChangedDirection, absoluteJointx, x, absoluteJointy, y, mc, owner, animate, hdReg;
function Player () {
super();
}
function reset() {
super.reset();
__fireJoint = {};
__armDimensions = {};
onFaceRight();
}
function onDraw(t_newmc) {
super.onDraw(t_newmc);
if (isFacingLeft) {
onFaceLeft();
} else {
onFaceRight();
}
}
function fullUpdate(el, t_angle) {
super.fullUpdate(el);
__lastAngle = t_angle;
if (!isAnimating) {
if (hasChangedDirection) {
absoluteJointx = __fireJoint.x + x;
absoluteJointy = __fireJoint.y + y;
hasChangedDirection = false;
}
if ((_xmouse > absoluteJointx) && (isFacingLeft)) {
onFaceRight();
} else if ((_xmouse < absoluteJointx) && (!isFacingLeft)) {
onFaceLeft();
}
} else if (mc.anim._currentFrame == mc.anim._totalFrames) {
stopAnimating();
if (isFacingLeft) {
onFaceLeft();
} else {
onFaceRight();
}
}
updateRotations();
}
function changePowerup(t_powerup) {
if (owner.powerupChangesGun) {
mc.greatRotate.anim.gun.gotoAndPlay(owner.powerupName + "_open");
owner.engine.playSound("changeGun");
} else if (mc.greatRotate.anim.gun._currentFrame != 1) {
mc.greatRotate.anim.gun.gotoAndPlay("none_open");
owner.engine.playSound("changeGun");
}
}
function updateRotations() {
mc.greatRotate._rotation = __lastAngle;
mc.lessRotate._rotation = __lastAngle / 2;
mc.miniRotate._rotation = __lastAngle / 5;
}
function onFaceRight() {
mc.gotoAndStop("right");
mc.greatRotate.stop();
if (owner.powerupChangesGun) {
mc.greatRotate.anim.gun.gotoAndStop(owner.powerupName);
}
if (__USE_GREATROTATE_AS_FIREJOINT) {
__fireJoint = {x:mc.greatRotate._x, y:mc.greatRotate._y};
} else {
__fireJoint = {x:__JOINTX_RIGHT, y:__JOINTY_RIGHT};
}
if (__USE_GREATROTATE_DIMENSIONS_AS_LENGTH) {
__armDimensions = {armlength:mc.greatRotate._width, armwidth:mc.greatRotate._height};
} else {
__armDimensions = {armlength:__ARMLENGTH_RIGHT, armwidth:__ARMHEIGHT_RIGHT};
}
isFacingLeft = false;
hasChangedDirection = true;
}
function onFaceLeft() {
mc.gotoAndStop("left");
mc.greatRotate.stop();
if (owner.powerupChangesGun) {
mc.greatRotate.anim.gun.gotoAndStop(owner.powerupName);
}
if (__USE_GREATROTATE_AS_FIREJOINT) {
__fireJoint = {x:mc.greatRotate._x, y:mc.greatRotate._y};
} else {
__fireJoint = {x:__JOINTX_LEFT, y:__JOINTY_LEFT};
}
if (__USE_GREATROTATE_DIMENSIONS_AS_LENGTH) {
__armDimensions = {armlength:mc.greatRotate._width, armwidth:mc.greatRotate._height};
} else {
__armDimensions = {armlength:__ARMLENGTH_LEFT, armwidth:__ARMHEIGHT_LEFT};
}
isFacingLeft = true;
hasChangedDirection = true;
}
function startAnimating(t_frame) {
isAnimating = true;
animate(t_frame);
}
function stopAnimating() {
isAnimating = false;
}
function fire() {
mc.greatRotate.gotoAndPlay("fire");
if (owner.powerupChangesGun) {
mc.greatRotate.anim.gun.gotoAndStop(owner.powerupName);
}
}
function takeDamage() {
if (isFacingLeft) {
startAnimating("damageLeft");
} else {
startAnimating("damageRight");
}
updateRotations();
}
function shieldUp() {
mc.shield_mc.gotoAndPlay("appear");
owner.engine.playSound("shield", 0);
}
function shieldDown() {
mc.shield_mc.gotoAndPlay("disappear");
owner.engine.stopSound("shield");
}
function die() {
startAnimating("die");
}
function getGunTip(t_fireVector) {
if (t_fireVector == undefined) {
t_fireVector = new smashing.Point3D(_xmouse - absoluteJointx, _ymouse - absoluteJointy, 0);
}
var _local4 = __armDimensions.armlength / Math.sqrt((t_fireVector.x * t_fireVector.x) + (t_fireVector.y * t_fireVector.y));
t_fireVector.x = t_fireVector.x * _local4;
t_fireVector.y = t_fireVector.y * _local4;
_local4 = __lastAngle / 90;
t_fireVector.x = t_fireVector.x + (__armDimensions.armwidth * _local4);
t_fireVector.y = t_fireVector.y - (__armDimensions.armwidth * (1 - Math.abs(_local4)));
var _local3 = Math.abs(__lastAngle / 90);
if (isFacingLeft) {
if (__lastAngle > 0) {
t_fireVector.x = t_fireVector.x - (__GREATROTATE_OFFSET_X * _local3);
t_fireVector.y = t_fireVector.y + __GREATROTATE_OFFSET_Y;
} else {
t_fireVector.x = t_fireVector.x + __GREATROTATE_OFFSET_X;
t_fireVector.y = t_fireVector.y + (__GREATROTATE_OFFSET_Y * (1 - _local3));
}
} else if (__lastAngle > 0) {
t_fireVector.x = t_fireVector.x - (__GREATROTATE_OFFSET_X * _local3);
t_fireVector.y = t_fireVector.y + (__GREATROTATE_OFFSET_Y * (1 - _local3));
} else {
t_fireVector.x = t_fireVector.x + (__GREATROTATE_OFFSET_X * _local3);
t_fireVector.y = t_fireVector.y + (__GREATROTATE_OFFSET_Y * (1 - _local3));
}
return({x:absoluteJointx + t_fireVector.x, y:absoluteJointy + t_fireVector.y});
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 31;
hdReg.y = 25;
}
var TYPE = "player";
var DRAWTYPE = "player";
var __DEF_ASSET = "player_mc";
var __DEF_WIDTH = 40;
var __DEF_HEIGHT = 90;
var __USE_ACTUAL_DIMENSIONS = false;
var __USE_DIMENSIONS_AS_HD = true;
var __USE_GREATROTATE_AS_FIREJOINT = true;
var __GREATROTATE_OFFSET_X = 10;
var __GREATROTATE_OFFSET_Y = 10;
var __JOINTX_LEFT = 0;
var __JOINTY_LEFT = 0;
var __JOINTX_RIGHT = 0;
var __JOINTY_RIGHT = 0;
var __USE_GREATROTATE_DIMENSIONS_AS_LENGTH = false;
var __ARMLENGTH_LEFT = 64;
var __ARMHEIGHT_LEFT = 13;
var __ARMLENGTH_RIGHT = 64;
var __ARMHEIGHT_RIGHT = 13;
}
Symbol 474 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.Projectile] Frame 0
class thebluerobot.doctorCompactor.ents.Projectile extends thebluerobot.doctorCompactor.Entity
{
var startVelocity, velocity, animate, hdReg, isSpawned, despawn, isAlive, kill, mc;
function Projectile () {
super();
}
function init(t_data) {
super.init(t_data);
startVelocity = new smashing.Point3D(t_data.fireVector.x * __FLY_SPEED, t_data.fireVector.y * __FLY_SPEED, 0);
}
function onDraw(t_newmc, t_viewport) {
super.onDraw(t_newmc, t_viewport);
if (velocity.x > 0) {
animate("right");
} else {
animate("left");
}
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = 0;
}
function onErase() {
super.onErase();
if (isSpawned) {
despawn();
}
}
function hitReact() {
if (!isAlive) {
return(undefined);
}
kill();
velocity = new smashing.Point3D(0, 0, 0);
mc.gotoAndStop("hit");
}
var TYPE = "projectile";
var DRAWTYPE = "projectile";
var __DEF_ASSET = "proj_player";
var __DEF_WIDTH = 20;
var __DEF_HEIGHT = 20;
var __USE_ACTUAL_DIMENSIONS = true;
var __USE_DIMENSIONS_AS_HD = true;
var __FLY_SPEED = 440;
var __ROTATE_TO_MOVEMENT = true;
}
Symbol 475 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.Scenery] Frame 0
class thebluerobot.doctorCompactor.ents.Scenery extends smashing.keithm.Element
{
var gravityVector, hdReg, baseWidth;
function Scenery () {
super();
}
function reset() {
super.reset();
gravityVector = new smashing.Point3D(0, 0, 0);
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = (-baseWidth) / 2;
}
var TYPE = "scenery";
var DRAWTYPE = "scenery";
var __DEF_WIDTH = 100;
var __DEF_HEIGHT = 100;
var __USE_ACTUAL_DIMENSIONS = true;
var __USE_DIMENSIONS_AS_HD = true;
var __DO_UPDATE = false;
}
Symbol 476 MovieClip [__Packages.smashing.keithm.Effect] Frame 0
class smashing.keithm.Effect extends smashing.keithm.Element
{
var startGravity, flag_HD, isDrawn, mc, flag_eraseMe;
function Effect () {
super();
}
function init(t_data) {
super.init(t_data);
if ((t_data.grav != undefined) && (t_data.grav != false)) {
startGravity = t_data.grav.copy();
} else {
startGravity = new smashing.Point3D(0, 0, 0);
}
flag_HD = true;
}
function update(el) {
if (isDrawn && (mc._currentFrame == mc._totalFrames)) {
flag_eraseMe = true;
return(undefined);
}
super.update(el);
}
function fullUpdate(el) {
if (isDrawn && (mc._currentFrame == mc._totalFrames)) {
flag_eraseMe = true;
return(undefined);
}
super.fullUpdate(el);
}
var TYPE = "effect";
var DRAWTYPE = "effect";
var __KILL_ON_ERASE = true;
var __USE_GRAVITY = true;
var __3D_SCALE = true;
var __DO_UPDATE = true;
}
Symbol 477 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.Projectile_Ricochet] Frame 0
class thebluerobot.doctorCompactor.ents.Projectile_Ricochet extends thebluerobot.doctorCompactor.ents.Projectile
{
var __ricCounter, hdWidth, x, velocity, invertVelocityX, animate, owner, hdHeight, y, invertVelocityY;
function Projectile_Ricochet () {
super();
}
function reset() {
super.reset();
__ricCounter = 1;
}
function fullUpdate(el) {
super.fullUpdate(el);
if (((x < hdWidth) && (velocity.x < 0)) || ((x > (thebluerobot.doctorCompactor.Dimensions.__get__screenWidth() - hdWidth)) && (velocity.x > 0))) {
if (__ricCounter == 0) {
return(undefined);
}
__ricCounter--;
invertVelocityX();
if (velocity.x > 0) {
animate("right");
} else {
animate("left");
}
owner.engine.playSound("rico");
}
if (((y < hdHeight) && (velocity.y < 0)) || ((y > (thebluerobot.doctorCompactor.Dimensions.__get__screenHeight() - hdHeight)) && (velocity.y > 0))) {
if (__ricCounter == 0) {
return(undefined);
}
__ricCounter--;
invertVelocityY();
owner.engine.playSound("rico");
}
}
function hitReact() {
if (__ricCounter > 0) {
invertVelocityX();
invertVelocityY();
if (velocity.x > 0) {
animate("right");
} else {
animate("left");
}
__ricCounter--;
owner.engine.playSound("rico");
return(undefined);
}
super.hitReact();
}
var __DEF_ASSET = "proj_ricochet";
}
Symbol 478 MovieClip [__Packages.thebluerobot.doctorCompactor.Dimensions] Frame 0
class thebluerobot.doctorCompactor.Dimensions
{
function Dimensions () {
}
static function get screenWidth() {
return(__SCREENWIDTH);
}
static function get screenHeight() {
return(__SCREENHEIGHT);
}
static function get sc() {
return(__sc);
}
static var __SCREENWIDTH = Stage.width;
static var __SCREENHEIGHT = Stage.height;
static var __sc = {x:Stage.width / 2, y:Stage.height / 2};
}
Symbol 479 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.Projectile_Rocket] Frame 0
class thebluerobot.doctorCompactor.ents.Projectile_Rocket extends thebluerobot.doctorCompactor.ents.Projectile
{
var __explodeTimer, __hasExploded, mc, despawn, owner, velocity;
function Projectile_Rocket () {
super();
}
function reset() {
super.reset();
__explodeTimer = 0.45;
__hasExploded = false;
}
function fullUpdate(el) {
super.fullUpdate(el);
if (__hasExploded) {
if (mc.anim._currentFrame == mc.anim._totalFrames) {
despawn();
}
return(undefined);
}
__explodeTimer = __explodeTimer - el;
if (__explodeTimer < 0) {
explode();
}
}
function explode() {
owner.engine.playSound("explodeRocket");
__hasExploded = true;
velocity.x = (velocity.y = 0);
mc.gotoAndStop("explode");
}
function hitReact() {
if (!__hasExploded) {
explode();
}
}
var __FLY_SPEED = 290;
var __DEF_ASSET = "proj_rocket";
}
Symbol 480 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.Projectile_Spread] Frame 0
class thebluerobot.doctorCompactor.ents.Projectile_Spread extends thebluerobot.doctorCompactor.ents.Projectile
{
function Projectile_Spread () {
super();
}
var __DEF_ASSET = "proj_player";
}
Symbol 481 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.Enemy] Frame 0
class thebluerobot.doctorCompactor.ents.Enemy extends thebluerobot.doctorCompactor.Entity
{
var startVelocity, __ASSET_VARIATIONS, assetID, __DEF_ASSET, velocity, mc, spin, isAlive, isDrawn, kill, owner, despawn;
function Enemy () {
super();
}
function get value() {
return(__value);
}
function init(t_data) {
super.init(t_data);
startVelocity.x = startVelocity.x * __MOVE_SPEED;
startVelocity.y = startVelocity.y * __MOVE_SPEED;
if ((__ASSET_VARIATIONS != undefined) && (__ASSET_VARIATIONS.length > 0)) {
assetID = __ASSET_VARIATIONS[Math.ceil(Math.random() * __ASSET_VARIATIONS.length) - 1];
if (assetID == "undefined") {
assetID = __DEF_ASSET;
}
}
}
function onDraw(t_newmc, t_viewport) {
super.onDraw(t_newmc);
if (velocity.x > 0) {
mc.gotoAndStop("right");
spin = __SPIN_RATE;
} else {
mc.gotoAndStop("left");
spin = -__SPIN_RATE;
}
mc.rgb = new Color(mc);
mc.original = mc.rgb.getTransform();
}
function slowSpeed() {
__MOVE_SPEED = __MOVE_SPEED * 0.6;
}
function medSpeed() {
__MOVE_SPEED = __MOVE_SPEED * 0.8;
}
function highSpeed() {
__MOVE_SPEED = __MOVE_SPEED;
}
function hitReact(t_hitObject) {
if (!isAlive) {
return(false);
}
if (isDrawn) {
mc.rgb.setTransform(__DAMAGE_COLOR);
mc.frames = 2;
mc.onEnterFrame = function () {
this.frames--;
if (this.frames <= 0) {
this.rgb.setTransform(this.original);
this.onEnterFrame = null;
}
};
}
if (t_hitObject.TYPE == "player") {
kill();
return(undefined);
}
__HP--;
if (__HP <= 0) {
kill();
owner.engine.playSound("enemyHit");
if (!isDrawn) {
despawn();
return(true);
}
if (velocity.x > 0) {
mc.gotoAndStop("dieRight");
} else {
mc.gotoAndStop("dieLeft");
}
velocity = new smashing.Point3D(0, 0, 0);
return(true);
}
return(false);
}
var TYPE = "enemy";
var DRAWTYPE = "enemy";
var __DEF_WIDTH = 50;
var __DEF_HEIGHT = 25;
var __USE_ACTUAL_DIMENSIONS = true;
var __USE_DIMENSIONS_AS_HD = true;
var __KILL_ON_ERASE = false;
var __MOVE_SPEED = 19;
var __HP = 1;
var __value = 10;
var __SPIN_RATE = 90;
var __DAMAGE_COLOR = {ra:0, rb:199, ga:0, gb:1, ba:0, bb:1, aa:100, ab:0};
}
Symbol 482 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.Enemy_Type3] Frame 0
class thebluerobot.doctorCompactor.ents.Enemy_Type3 extends thebluerobot.doctorCompactor.ents.Enemy
{
function Enemy_Type3 () {
super();
}
var TYPE = "enemy";
var DRAWTYPE = "enemy";
var __DEF_ASSET = "enemy3";
var __DEF_WIDTH = 20;
var __DEF_HEIGHT = 20;
var __MOVE_SPEED = 140;
var __HP = 3;
var __value = 30;
var __ROTATE_TO_MOVEMENT = false;
}
Symbol 483 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.Enemy_Type2] Frame 0
class thebluerobot.doctorCompactor.ents.Enemy_Type2 extends thebluerobot.doctorCompactor.ents.Enemy
{
function Enemy_Type2 () {
super();
}
var TYPE = "enemy";
var DRAWTYPE = "enemy";
var __DEF_ASSET = "enemy2";
var __DEF_WIDTH = 25;
var __DEF_HEIGHT = 25;
var __MOVE_SPEED = 160;
var __HP = 2;
var __value = 20;
var __ROTATE_TO_MOVEMENT = false;
}
Symbol 484 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.Enemy_Type1] Frame 0
class thebluerobot.doctorCompactor.ents.Enemy_Type1 extends thebluerobot.doctorCompactor.ents.Enemy
{
function Enemy_Type1 () {
super();
}
var __DEF_ASSET = "enemy1a";
var __DEF_WIDTH = 40;
var __DEF_HEIGHT = 40;
var __MOVE_SPEED = 180;
var __value = 10;
var __ROTATE_TO_MOVEMENT = false;
var __ASSET_VARIATIONS = ["enemy1a", "enemy1b", "enemy1c", "enemy1d", "enemy1e", "enemy1f", "enemy1g"];
}
Symbol 485 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.Pickup] Frame 0
class thebluerobot.doctorCompactor.ents.Pickup extends thebluerobot.doctorCompactor.Entity
{
var startVelocity, animate, isSpawned, despawn, isAlive, mc, owner, kill;
function Pickup () {
super();
}
function get value() {
return(__value);
}
function init(t_data) {
super.init(t_data);
startVelocity = new smashing.Point3D(0, __MOVE_SPEED, 0);
}
function onDraw(t_newmc) {
super.onDraw(t_newmc);
animate("appear");
}
function onErase() {
super.onErase();
if (isSpawned) {
despawn();
}
}
function hitReact() {
if (!isAlive) {
return(false);
}
mc.gotoAndStop("pickup");
owner.engine.playSound("pickup");
owner.engine.addScore(value);
kill();
return(true);
}
var TYPE = "pickup";
var DRAWTYPE = "enemy";
var __DEF_ASSET = "pickup_score1";
var __DEF_WIDTH = 18;
var __DEF_HEIGHT = 18;
var __USE_ACTUAL_DIMENSIONS = true;
var __USE_DIMENSIONS_AS_HD = true;
var __DRAW_WHEN_KILLED = true;
var __MOVE_SPEED = -100;
var __value = 30;
var __ROTATE_TO_MOVEMENT = false;
}
Symbol 486 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.PowerUp] Frame 0
class thebluerobot.doctorCompactor.ents.PowerUp extends thebluerobot.doctorCompactor.Entity
{
var startVelocity, startSpin, mc, rotation, isSpawned, y, despawn, isAlive, owner, kill;
function PowerUp () {
super();
}
function init(t_data) {
super.init(t_data);
startVelocity = new smashing.Point3D(0, __SPAWN_SPEED, 0);
startSpin = 100;
}
function render(camera) {
super.render(camera);
mc._rotation = 0;
mc.anim._rotation = rotation;
}
function onErase() {
super.onErase();
if (isSpawned && (y > thebluerobot.doctorCompactor.Dimensions.__get__screenHeight())) {
despawn();
}
}
function hitReact() {
if (!isAlive) {
return(false);
}
mc.gotoAndStop("pickup");
owner.powerUp(__POWER_UP_TYPE);
kill();
return(true);
}
var TYPE = "powerup";
var DRAWTYPE = "enemy";
var __DEF_ASSET = "powerup_beam";
var __POWER_UP_TYPE = "generic";
var __DEF_WIDTH = 14;
var __DEF_HEIGHT = 14;
var __USE_ACTUAL_DIMENSIONS = true;
var __USE_DIMENSIONS_AS_HD = true;
var __DRAW_WHEN_KILLED = false;
var __SPAWN_SPEED = -160;
var __ROTATE_TO_MOVEMENT = false;
var __USE_GRAVITY = true;
}
Symbol 487 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.PowerUp_Beam] Frame 0
class thebluerobot.doctorCompactor.ents.PowerUp_Beam extends thebluerobot.doctorCompactor.ents.PowerUp
{
function PowerUp_Beam () {
super();
}
var __DEF_ASSET = "powerup_beam";
var __POWER_UP_TYPE = "beam";
}
Symbol 488 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.PowerUp_Shield] Frame 0
class thebluerobot.doctorCompactor.ents.PowerUp_Shield extends thebluerobot.doctorCompactor.ents.PowerUp
{
function PowerUp_Shield () {
super();
}
var __DEF_ASSET = "powerup_shield";
var __POWER_UP_TYPE = "shield";
}
Symbol 489 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.PowerUp_Ricochet] Frame 0
class thebluerobot.doctorCompactor.ents.PowerUp_Ricochet extends thebluerobot.doctorCompactor.ents.PowerUp
{
function PowerUp_Ricochet () {
super();
}
var __DEF_ASSET = "powerup_ric";
var __POWER_UP_TYPE = "ricochet";
}
Symbol 490 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.PowerUp_Rocket] Frame 0
class thebluerobot.doctorCompactor.ents.PowerUp_Rocket extends thebluerobot.doctorCompactor.ents.PowerUp
{
function PowerUp_Rocket () {
super();
}
var __DEF_ASSET = "powerup_rocket";
var __POWER_UP_TYPE = "rocket";
}
Symbol 491 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.PowerUp_Spread] Frame 0
class thebluerobot.doctorCompactor.ents.PowerUp_Spread extends thebluerobot.doctorCompactor.ents.PowerUp
{
function PowerUp_Spread () {
super();
}
var __DEF_ASSET = "powerup_spread";
var __POWER_UP_TYPE = "spread";
}
Symbol 492 MovieClip [__Packages.thebluerobot.doctorCompactor.ents.PowerUp_Slowmo] Frame 0
class thebluerobot.doctorCompactor.ents.PowerUp_Slowmo extends thebluerobot.doctorCompactor.ents.PowerUp
{
function PowerUp_Slowmo () {
super();
}
var __DEF_ASSET = "powerup_slowmo";
var __POWER_UP_TYPE = "slowmo";
}
Symbol 493 MovieClip [__Packages.thebluerobot.doctorCompactor.LevelData] Frame 0
class thebluerobot.doctorCompactor.LevelData
{
var ldata;
function LevelData () {
}
function loadData(t_data) {
parseData(t_data);
}
function parseData(t_data) {
ldata = {};
ldata = t_data;
return(undefined);
}
}
Symbol 494 MovieClip [__Packages.thebluerobot.doctorCompactor.levels.Level1] Frame 0
class thebluerobot.doctorCompactor.levels.Level1 extends thebluerobot.doctorCompactor.LevelData
{
var parseData;
function Level1 () {
super();
}
function loadData(t_data) {
t_data = {};
var _local3 = {x:240, y:210};
var _local2 = {};
_local2.__ENEMYS_DEAD_FOR_LEVELUP = 10;
_local2.__START_ET_MAX = 2;
_local2.__LEVELUP_ET_MAX_CHANGE = -0.05;
_local2.__ET_MAX_MINCAP = 1;
_local2.__ET_MAX_MAXCAP = 2;
_local2.__START_ET_MIN = 0.4;
_local2.__LEVELUP_ET_MIN_CHANGE = -0.025;
_local2.__ET_MIN_MINCAP = 0.1;
_local2.__ET_MIN_MAXCAP = 0.3;
_local2.__START_SSC = 0.2;
_local2.__LEVELUP_SSC_CHANGE = 0.025;
_local2.__SSC_MINCAP = 0.2;
_local2.__SSC_MAXCAP = 0.9;
_local2.__START_STC = 0;
_local2.__LEVELUP_STC_CHANGE = 0.05;
_local2.__STC_MINCAP = 0;
_local2.__STC_MAXCAP = 0.4;
_local2.__START_HARDC = 0;
_local2.__LEVELUP_HARDC_CHANGE = 0.01;
_local2.__HARDC_MINCAP = 0;
_local2.__HARDC_MAXCAP = 0.5;
_local2.__START_MEDIUMC = 0;
_local2.__LEVELUP_MEDIUMC_CHANGE = 0.05;
_local2.__MEDIUMC_MINCAP = 0;
_local2.__MEDIUMC_MAXCAP = 0.95;
_local2.__START_SCOREC = 0.65;
_local2.__LEVELUP_SCOREC_CHANGE = 0.05;
_local2.__SCOREC_MINCAP = 0.5;
_local2.__SCOREC_MAXCAP = 0.8;
_local2.__SUPERSCORE_CHANCE = 0.05;
_local2.__POWERUP_CHANCE = 0.25;
var _local4 = {};
var _local6 = {asset:"environment1_mc", x:0, y:0};
t_data = {player:_local3, cameraData:_local4, spawningData:_local2, bg:_local6};
parseData(t_data);
}
}
Symbol 296 MovieClip Frame 1
this._visible = false;
Symbol 301 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 306 MovieClip Frame 2
if (_url.indexOf("http") > -1) {
if (_parent._parent._parent.loadAdNow) {
cacheBuster = getTimer() + random(999999);
showAd = "http://www.miniclip.com/swfcontent/push/didyouknow.swf?cacheBuster" + cacheBuster;
trace("Loading ad: " + showAd);
mcAd.loadMovie(showAd);
} else {
gotoAndPlay(_currentframe - 1);
}
}
Symbol 306 MovieClip Frame 4
if ((mcAd.getBytesTotal() != 0) && (mcAd.getBytesLoaded() == mcAd.getBytesTotal())) {
gotoAndStop ("showAd");
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 306 MovieClip Frame 12
stop();
Symbol 315 MovieClip Frame 1
stop();
Symbol 315 MovieClip Frame 100
stop();
Symbol 317 MovieClip Frame 1
stop();
Symbol 317 MovieClip Frame 12
_root.play();
_root.isFinished = true;
_parent.stop();
stop();
Symbol 321 Button
on (release) {
getURL ("http://www.miniclip.com/", "_blank");
}
Symbol 322 MovieClip Frame 2
_parent.mcAnimation.play();
stop();
Symbol 322 MovieClip Frame 13
_parent.gotoAndPlay("preload");
stop();
Symbol 338 MovieClip Frame 1
stop();
Symbol 338 MovieClip Frame 60
Symbol 338 MovieClip Frame 121
_parent.mcBackground.play();
stop();
Symbol 339 MovieClip Frame 1
loadAdNow = false;
_root.stop();
play();
Instance of Symbol 296 MovieClip "mcIntro" in Symbol 339 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 339 MovieClip Frame 2
xPos = _x;
yPos = _y;
mcBackground._x = mcBackground._x - xPos;
mcBackground._y = mcBackground._y - yPos;
mcAnimation._x = mcAnimation._x - xPos;
mcAnimation._y = mcAnimation._y - yPos;
var stageWidth = Stage.width;
var stageHeight = Stage.height;
var centerStageX = (stageWidth / 2);
var centerStageY = (stageHeight / 2);
mcBackground._width = stageWidth;
mcBackground._height = stageHeight;
mcAnimation._x = mcAnimation._x + centerStageX;
mcAnimation._y = mcAnimation._y + (centerStageY - (stageHeight / 10));
stop();
Instance of Symbol 317 MovieClip "mcLoadingAnimated" in Symbol 339 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 339 MovieClip Frame 3
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent == 100) {
_root.play();
stop();
} else {
loadAdNow = true;
mcLoadingAnimated._visible = true;
}
Symbol 339 MovieClip Frame 5
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent < 100) {
mcLoadingAnimated.mcLoading.gotoAndStop(loadedPercent);
mcLoadingAnimated.mcLoading.txtPercentLoaded1 = ("The game is loading (" + loadedPercent) + "%)";
mcLoadingAnimated.mcLoading.txtPercentLoaded2 = ("The game is loading (" + loadedPercent) + "%)";
gotoAndPlay(_currentframe - 1);
} else {
mcLoadingAnimated.play();
stop();
}
Symbol 429 MovieClip Frame 1
modal.useHandCursor = false;
Instance of Symbol 19 MovieClip "modal" in Symbol 429 MovieClip Frame 1
on (release) {
var x = 1;
}
Symbol 429 MovieClip Frame 75
stop();
Symbol 430 MovieClip Frame 35
_parent.gotoAndStop("loader");
stop();
Symbol 430 MovieClip Frame 36
anim.gotoAndPlay(70);
play();
Symbol 430 MovieClip Frame 48
_parent.gotoAndStop("init");
Symbol 438 MovieClip Frame 1
this._visible = false;
Symbol 456 Button
on (release) {
gameURL = ("http://www.miniclip.com/" + gamename) + ".htm";
getURL (gameURL, "_blank");
}
Symbol 458 MovieClip Frame 1
System.security.allowDomain("www.miniclip.com");
Instance of Symbol 438 MovieClip "mcHighscores" in Symbol 458 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 458 MovieClip Frame 2
if ((((_url.indexOf("miniclip.com") == -1) && (_url.indexOf("miniclip.net") == -1)) && (_url.indexOf("miniclip.co.uk") == -1)) && (_url.indexOf("miniclips.com"))) {
gotoAndStop(_currentframe + 1);
} else {
var noCache = (getTimer() + random(100000));
mcTarget.loadMovie("http://www.miniclip.com/swfcontent/highscore.swf?noCache=" + noCache);
stop();
}
Symbol 458 MovieClip Frame 3
stop();