STORY LOOP FURRY PORN GAMES C SERVICES [?] [R] RND POPULAR | Archived flashes: 229595 |
/disc/ · /res/ — /show/ · /fap/ · /gg/ · /swf/ | P0001 · P2595 · P5190 |
This is the info page for Flash #22886 |
loading |
%... |
000 |
0:00 |
0 |
Time's up! |
2.0 |
with shooting like that, how do you expect to convince the american public that invading iraq was a good idea? oh wait, you never really managed that one, huh? |
ActionScript [AS1/AS2]
Frame 1Stage.showMenu = false;Frame 6var time = 75000; var i = 0; while (i < 20) { _root["SCORE" + (19 - i)] = (i * 50) + 50; i++; } stop();Instance of Symbol 104 MovieClip "mcPad" in Frame 6/* no clip actions */Frame 11function startGame() { var myMap1 = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]; var tileManagerInit = {path:_root, ref:"mcTile", obCreateTiles:{arrMaster:[myMap1], arrMoving:[[]]}}; var heroInit = {sp:2, x:1, y:4, xTile:1, yTile:4, width:8, height:11, gravity:1.5, jumpStart:-16, jump:false, climbing:false, climbSpeed:2}; var e1 = {sp:0.5, type:"samurai", xTile:4, yTile:3, turn:25, lastDir:"R"}; var e2 = {sp:0.5, type:"samurai", xTile:5, yTile:5, turn:50, lastDir:"L"}; var e5 = {sp:0.5, type:"samurai", xTile:6, yTile:6, turn:40, lastDir:"R"}; var e3 = {sp:0.5, type:"samurai", xTile:5, yTile:2, turn:40, lastDir:"R"}; var e4 = {sp:0.5, type:"samurai", xTile:7, yTile:4, turn:80, lastDir:"L"}; var enemyManagerInit = {arrRooms:[[e1, e2, e3, e4, e5]]}; var propManagerInit = {arrProps:[[]]}; var game = mvc_specific.MVC.main({lives:1, tileManagerInit:tileManagerInit, heroInit:heroInit, enemyManagerInit:enemyManagerInit, propManagerInit:propManagerInit, arrLevelStart:arrLevelStart, time:time}); return(game); } var myLog = org.fivepecks.logger.Logger.getInstance(); myLog.level = "debug"; myLog.setOutputWindowView(true); resetGame = function () { for (var prop in _root) { removeMovieClip(_root[prop]); } }; mainStart = function () { stopAllSounds(); name = ""; game = startGame(); this.onEnterFrame = function () { game.mvc_controller.updateModel(); }; }; mainStart(); stop();Frame 17btnMain.onRelease = function () { stopAllSounds(); resetGame(); gotoAndStop ("title"); }; btnHunt.onRelease = function () { resetGame(); gotoAndStop ("game"); };Frame 27btnMain.onRelease = function () { stopAllSounds(); resetGame(); gotoAndStop ("title"); }; btnHunt.onRelease = function () { resetGame(); gotoAndStop ("game"); };Frame 37btnMain.onRelease = function () { stopAllSounds(); resetGame(); gotoAndStop ("title"); }; btnHunt.onRelease = function () { resetGame(); gotoAndStop ("game"); };Frame 47btnMain.onRelease = function () { stopAllSounds(); resetGame(); gotoAndStop ("title"); }; btnHunt.onRelease = function () { resetGame(); gotoAndStop ("game"); };Instance of Symbol 7 MovieClip "preloadBar" in Symbol 8 MovieClip Frame 1onClipEvent (enterFrame) { var loadedSoFar = _root.getBytesLoaded(); if (loadedSoFar >= loadTotal) { this.onEnterFrame = null; _root.gotoAndStop("title"); } else { var percent = Math.round((loadedSoFar / loadTotal) * 100); _xscale = percent; _parent.percentText.text = percent; } } onClipEvent (load) { var loadTotal = _root.getBytesTotal(); }Symbol 175 MovieClip [__Packages.org.fivepecks.logger.Logger] Frame 0class org.fivepecks.logger.Logger { static var _inst; var _outputWinView, addEventListener, removeEventListener, _LCView, dispatchEvent; function Logger () { mx.events.EventDispatcher.initialize(this); if (_global.log == undefined) { _global.log = this; } _global.fplog = this; } static function getInstance() { if (_inst == null) { _inst = new org.fivepecks.logger.Logger(); } return(_inst); } function get level() { return(_logLevels[_logLevel]); } function set level(l) { var len = _logLevels.length; var i = 0; while (i < len) { if (_logLevels[i].toLowerCase() == l.toLowerCase()) { _logLevel = i; info(((("Log level set to " + _logLevels[_logLevel]) + " (") + _logLevel) + ")"); return; } i++; } warn("Invalid log level specified."); //return(level); } function setLevel(l) { level = (l); } function getLevel() { return(level); } function setOutputWindowView(enableView) { if (enableView) { if (_outputWinView == undefined) { _outputWinView = new org.fivepecks.logger.OutputWindowView(); } addEventListener("logMessage", _outputWinView); } else if (_outputWinView != undefined) { removeEventListener("logMessage", _outputWinView); } } function setLCView(enableView) { if (enableView) { if (_LCView == undefined) { _LCView = new org.fivepecks.logger.LCView(this); } addEventListener("logMessage", _LCView); } else if (_LCView != undefined) { removeEventListener("logMessage", _LCView); delete _LCView; } } function fatal(msg) { if (_logLevel >= 0) { sendLogMessage(msg, "FATAL"); } } function error(msg) { if (_logLevel >= 1) { sendLogMessage(msg, "ERROR"); } } function warn(msg) { if (_logLevel >= 2) { sendLogMessage(msg, "WARN"); } } function info(msg) { if (_logLevel >= 3) { sendLogMessage(msg, "INFO"); } } function debug(msg) { if (_logLevel >= 4) { sendLogMessage(msg, "DEBUG"); } } function sendLogMessage(msg, lvl) { var eventObj = {target:this, type:"logMessage"}; eventObj.message = msg; eventObj.level = lvl; dispatchEvent(eventObj); } var _logLevel = 3; var _logLevels = ["FATAL", "ERROR", "WARN", "INFO", "DEBUG"]; }Symbol 176 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0class mx.events.EventDispatcher { function EventDispatcher () { } static function _removeEventListener(queue, event, handler) { if (queue != undefined) { var l = queue.length; var i; i = 0; while (i < l) { var o = queue[i]; if (o == handler) { queue.splice(i, 1); return(undefined); } i++; } } } static function initialize(object) { if (_fEventDispatcher == undefined) { _fEventDispatcher = new mx.events.EventDispatcher(); } object.addEventListener = _fEventDispatcher.addEventListener; object.removeEventListener = _fEventDispatcher.removeEventListener; object.dispatchEvent = _fEventDispatcher.dispatchEvent; object.dispatchQueue = _fEventDispatcher.dispatchQueue; } function dispatchQueue(queueObj, eventObj) { var queueName = ("__q_" + eventObj.type); var queue = queueObj[queueName]; if (queue != undefined) { var i; for (i in queue) { var o = queue[i]; var oType = typeof(o); if ((oType == "object") || (oType == "movieclip")) { if (o.handleEvent != undefined) { o.handleEvent(eventObj); } if (o[eventObj.type] != undefined) { if (exceptions[eventObj.type] == undefined) { o[eventObj.type](eventObj); } } } else { o.apply(queueObj, [eventObj]); } } } } function dispatchEvent(eventObj) { if (eventObj.target == undefined) { eventObj.target = this; } this[eventObj.type + "Handler"](eventObj); dispatchQueue(this, eventObj); } function addEventListener(event, handler) { var queueName = ("__q_" + event); if (this[queueName] == undefined) { this[queueName] = new Array(); } _global.ASSetPropFlags(this, queueName, 1); _removeEventListener(this[queueName], event, handler); this[queueName].push(handler); } function removeEventListener(event, handler) { var queueName = ("__q_" + event); _removeEventListener(this[queueName], event, handler); } static var _fEventDispatcher = undefined; static var exceptions = {move:1, draw:1, load:1}; }Symbol 177 MovieClip [__Packages.org.fivepecks.logger.OutputWindowView] Frame 0class org.fivepecks.logger.OutputWindowView { function OutputWindowView () { } function logMessage(evtObj) { trace((evtObj.level + ": ") + evtObj.message); } }Symbol 178 MovieClip [__Packages.org.fivepecks.logger.LCView] Frame 0class org.fivepecks.logger.LCView { var _log, _outgoingConnectionName, _incomingConnectionName, _incoming_lc, _outgoing_lc; function LCView (controllingLog) { _log = controllingLog; var swfName = ""; var wholeURL = _root._url; var tempArray = wholeURL.split("/"); var tempName = tempArray.pop(); if (tempName.indexOf("\\") == -1) { swfName = tempName; } else { var tempArray2 = tempName.split("\\"); swfName = tempArray2.pop(); } swfName = unescape(swfName); _outgoingConnectionName = swfName + "_log_lc"; _incomingConnectionName = swfName + "_feedback_lc"; _incoming_lc = new LocalConnection(); _incoming_lc.controller = this; _incoming_lc.changeLevel = function (newLevel) { this.controller._log.setLevel(newLevel); }; _incoming_lc.connect(_incomingConnectionName); } function logMessage(evtObj) { var lvl = evtObj.level; var msg = evtObj.message; _outgoing_lc = new LocalConnection(); _outgoing_lc.send(_outgoingConnectionName, "logMessage", lvl, msg); } }Symbol 179 MovieClip [__Packages.mvc_specific.MVC] Frame 0class mvc_specific.MVC { var mvc_model, mvc_controller, mvc_view; function MVC (tOb) { mvc_model = new mvc_specific.MVCModel(tOb); mvc_controller = new mvc_specific.MVCController(mvc_model); mvc_view = new mvc_specific.MVCView(mvc_model, mvc_controller); mvc_model.addObserver(mvc_view); } static function main(tOb) { var mvc = (new mvc_specific.MVC(tOb)); mvc.mvc_model.initializeView(); mvc.mvc_model.switchMap(0); return(mvc); } static var log = org.fivepecks.logger.Logger.getInstance(); }Symbol 180 MovieClip [__Packages.util.Observable] Frame 0class util.Observable { var observers; function Observable () { observers = new Array(); } function addObserver(o) { if (o == null) { return(false); } var i = 0; while (i < observers.length) { if (observers[i] == o) { return(false); } i++; } observers.push(o); return(true); } function removeObserver(o) { var len = observers.length; var i = 0; while (i < len) { if (observers[i] == o) { observers.splice(i, 1); return(true); } i++; } return(false); } function notifyObservers(infoObj) { if (infoObj == undefined) { infoObj = null; } if (!changed) { return(undefined); } var observersSnapshot = observers.slice(0); clearChanged(); var i = (observersSnapshot.length - 1); while (i >= 0) { observersSnapshot[i].update(this, infoObj); i--; } } function clearObservers() { observers = new Array(); } function setChanged() { changed = true; } function clearChanged() { changed = false; } function hasChanged() { return(changed); } function countObservers() { return(observers.length); } var changed = false; }Symbol 181 MovieClip [__Packages.util.Observer] Frame 0interface util.Observer { }Symbol 182 MovieClip [__Packages.mvc_specific.MVCModel] Frame 0class mvc_specific.MVCModel extends util.Observable { var scoreURL, points, curMap, tileManager, hero, enemyManager, propManager, weaponManager, time, clock, clockListener, setChanged, notifyObservers, curLevel, arrLevelStart; function MVCModel (tOb) { super(); scoreURL = tOb.scoreURL; points = 0; curMap = 0; createChildren(tOb); } function createChildren(tOb) { var tileInit = tOb.tileManagerInit; tileInit.tileH = tileH; tileInit.tileW = tileW; tileManager = new tile.TileManager(tileInit); var heroInit = tOb.heroInit; heroInit.tileH = tileH; heroInit.tileW = tileW; heroInit.model = this; heroInit.tileManager = tileManager; heroInit.x = (heroInit.x * tileW) + (tileW / 2); heroInit.y = (heroInit.y * tileH) + (tileH / 2); hero = new characters.Hero(tOb.heroInit); hero.move(1, 0, 0); var enemyInit = tOb.enemyManagerInit; enemyInit.tileH = tileH; enemyInit.tileW = tileW; enemyInit.hero = hero; enemyInit.model = this; enemyInit.tileManager = tileManager; enemyManager = new characters.EnemyManager(enemyInit); var propInit = tOb.propManagerInit; propInit.tileH = tileH; propInit.tileW = tileW; propInit.hero = hero; propInit.model = this; propManager = new props.PropManager(propInit); var weaponInit = {}; weaponInit.tileH = tileH; weaponInit.tileW = tileW; weaponInit.hero = hero; weaponInit.model = this; weaponInit.tileManager = tileManager; var max = tileManager.arrTiles.length; var arrWeapons = []; while (max--) { var arrTmp = []; arrWeapons.push(arrTmp); } weaponInit.arrWeapons = arrWeapons; weaponManager = new weapons.WeaponManager(weaponInit); time = tOb.time; clock = new timer.TimerDownEvent(time); clockListener = {model:this}; clockListener.timerFinished = function () { this.model.update([this.model.points, this.model.clock.displayTime(), this.model.hero, this.model.enemyManager.arrCurrentEnemies, this.model.tileManager.arrCurrentMovingTiles, this.model.weaponManager.arrCurrentWeapons], "end"); }; clock.addEventListener("timerFinished", clockListener); clock.startClock(); } function initializeView() { var infoObj = {msg:"initialize", arrCurrentTiles:tileManager.arrCurrentTiles, hero:hero, scoreURL:scoreURL}; setChanged(); notifyObservers(infoObj); } function restart(str) { if (str == "nextLevel") { curLevel++; } weaponManager.clearAllWeapons(); switchMap(arrLevelStart[curLevel].map); resetHeroPos(curLevel); } function resetHeroPos(num) { hero.x = (arrLevelStart[num].xTile * tileW) + (tileW / 2); hero.y = (arrLevelStart[num].yTile * tileH) + (tileH / 2); hero.move(0, 1, 0); } function switchMap(num) { var arrLastMovingTiles = tileManager.arrCurrentMovingTiles; var arrLastEnemies = enemyManager.arrCurrentEnemies; var arrLastProps = propManager.arrCurrentProps; var arrLastItems = tileManager.arrCurrentItems; var arrLastWeapons = weaponManager.arrCurrentWeapons; tileManager.switchMap(num); enemyManager.switchMap(num); propManager.switchMap(num); weaponManager.switchMap(num); var infoObj = {msg:"switchMap", arrCurrentTiles:tileManager.arrCurrentTiles, arrCurrentEnemies:enemyManager.arrCurrentEnemies, arrCurrentProps:propManager.arrCurrentProps, arrCurrentMovingTiles:tileManager.arrCurrentMovingTiles, arrCurrentWeapons:weaponManager.arrCurrentWeapons, arrLastWeapons:arrLastWeapons, arrCurrentItems:tileManager.arrCurrentItems, arrLastMovingTiles:arrLastMovingTiles, arrLastEnemies:arrLastEnemies, arrLastProps:arrLastProps, arrLastItems:arrLastItems}; setChanged(); notifyObservers(infoObj); } function detectKeys() { var keyPressed = false; var ob = hero; if (Key.isDown(32) && (!lastSpaceBar)) { lastSpaceBar = true; ob.useWeapon(); } else if (Key.isDown(38)) { keyPressed = ob.move(0, -1); } else if (Key.isDown(40)) { keyPressed = ob.move(0, 1); } else if (Key.isDown(39)) { keyPressed = ob.move(1, 0); } else if (Key.isDown(37)) { keyPressed = ob.move(-1, 0); } if (!Key.isDown(32)) { lastSpaceBar = false; } ob.keyPressed = keyPressed; update([points, clock.displayTime(), hero, enemyManager.arrCurrentEnemies, tileManager.arrCurrentMovingTiles, weaponManager.arrCurrentWeapons]); } function updateObjects() { weaponManager.move(); enemyManager.move(); propManager.checkProps(); update([points, clock.displayTime(), hero, enemyManager.arrCurrentEnemies, tileManager.arrCurrentMovingTiles, weaponManager.arrCurrentWeapons, propManager.arrCurrentProps]); } function updateSound(strSound) { update([strSound], "doSound"); } function update(arrObjects, msg) { var infoObj; infoObj = {msg:((msg == undefined) ? "update" : (msg)), arrObjects:arrObjects}; setChanged(); notifyObservers(infoObj); } function addWeapon(weapon) { var infoObj = {msg:"addWeapon", weapon:weapon}; setChanged(); notifyObservers(infoObj); } function addNewEnemy(enemy) { var infoObj = {msg:"addNewEnemy", enemy:enemy}; setChanged(); notifyObservers(infoObj); } function removeClip(clip) { var infoObj = {msg:"removeClip", clip:clip}; setChanged(); notifyObservers(infoObj); } function resetWeapons(arrWeapons) { var infoObj = {msg:"resetWeapons", arrWeapons:arrWeapons}; setChanged(); notifyObservers(infoObj); } function victimDie(enemy) { enemy.killed = true; updateSound("scream"); updateScore(); } function updateScore() { points = points + 10; } static var log = org.fivepecks.logger.Logger.getInstance(); var tileH = 30; var tileW = 30; var numLevel = 0; var lastSpaceBar = true; var name = "MVCModel"; }Symbol 183 MovieClip [__Packages.tile.TileManager] Frame 0class tile.TileManager { var tileW, tileH, lastMap, curMap; function TileManager (tOb) { tileW = tOb.tileW; tileH = tOb.tileH; create(tOb); } function create(tOb) { var arrMaster = tOb.obCreateTiles.arrMaster; var arrMoving = tOb.obCreateTiles.arrMoving; var maxxx = arrMaster.length; while (maxxx--) { var arr = arrMaster[maxxx]; var max = arr.length; var arrTmpRoom = new Array(); var arrTmpItem = new Array(); while (max--) { var maxx = arr[max].length; var arrTmp = new Array(); while (maxx--) { var tile = createTile(arr[max][maxx], max, maxx); arrTmp.unshift(tile); if (tile.type != undefined) { arrTmpItem.unshift({type:tile.type, x:maxx * tileW, y:max * tileH}); } } arrTmpRoom.unshift(arrTmp); } arrTiles.unshift(arrTmpRoom); arrItems.unshift(arrTmpItem); } var max = arrMoving.length; while (max--) { arrTmpRoom = []; var maxx = arrMoving[max].length; while (maxx--) { arrTmpRoom.unshift(createMovingTile(arrMoving[max][maxx])); } arrMovingTiles.unshift(arrTmpRoom); } arrCurrentTiles = arrTiles[0]; arrCurrentItems = arrItems[0]; arrCurrentMovingTiles = arrMovingTiles[0]; } function createTile(num, max, maxx) { var obTile = {}; switch (num) { case 0 : obTile = {walkable:true, frame:1}; break; case 1 : obTile = {walkable:false, frame:2}; break; case 2 : obTile = {walkable:true, frame:3, door:true, type:2, map:1, xTile:1, yTile:10}; break; case 3 : obTile = {walkable:true, frame:3, door:true, type:3, map:0, xTile:14, yTile:9}; break; case 4 : obTile = {walkable:true, frame:4, cloud:true}; break; case 5 : obTile = {walkable:true, frame:5, cloud:true}; break; case 6 : obTile = {walkable:true, frame:6, cloud:true}; break; case 7 : obTile = {walkable:true, frame:3, type:7, door:true, map:2, xTile:1, yTile:4}; break; case 8 : obTile = {walkable:true, frame:3, type:8, door:true, map:1, xTile:14, yTile:9}; break; case 9 : obTile = {walkable:false, frame:2, ladder:true, type:"ladder"}; break; case 10 : obTile = {walkable:true, frame:1, ladder:true, type:"ladder"}; break; case 11 : obTile = {walkable:true, frame:1, ladder:true, type:"vine"}; break; case 12 : obTile = {walkable:true, frame:3, type:12, door:true, map:3, xTile:1, yTile:4}; break; case 13 : obTile = {walkable:true, frame:3, type:13, door:true, map:2, xTile:14, yTile:4}; } obTile.name = (("t_" + max) + "_") + maxx; return(obTile); } function createMovingTile(tile) { switch (tile.type) { case "verticalWide" : tile.width = tileW * 2; tile.height = tileH / 2; break; case "vertical" : tile.width = tileW; tile.height = tileH / 2; break; case "horizontalWide" : tile.width = tileW * 2; tile.height = tileH / 2; break; case "horizontal" : tile.width = tileW; tile.height = tileH / 2; } tile.tileMax = tile.tileMax * tileW; tile.tileMin = tile.tileMin * tileW; tile.x = tile.xTile * tileW; tile.y = tile.yTile * tileH; tile.tileH = tileH; tile.tileW = tileW; tile.yMax = tile.y + tile.height; tile.yMin = tile.y; tile.xMax = tile.x + tile.width; tile.xMin = tile.x; tile.lastX = tile.x; return(tile); } function switchMap(num) { lastMap = curMap; curMap = num; arrCurrentItems = arrItems[curMap]; arrCurrentTiles = arrTiles[curMap]; arrCurrentMovingTiles = arrMovingTiles[curMap]; } function moveMovingTiles(char) { var max = arrCurrentMovingTiles.length; while (max--) { var tile = arrCurrentMovingTiles[max]; with (tile) { if ((tile.type == "vertical") || (tile.type == "verticalWide")) { var step = ((y = y + (sp * dirY))); if ((step > tileMin) && (step < tileMax)) { y = step; } else { y = ((dirY == 1) ? (tileMax) : (tileMin)); dirY = -dirY; } } else { var step = ((x = x + (sp * dirX))); if ((step > tileMin) && (step < tileMax)) { lastX = sp * dirX; x = step; } else { x = ((dirX == 1) ? (tileMax) : (tileMin)); dirX = -dirX; } } yMax = y + height; yMin = y - height; xMax = x + width; xMin = x; } var charYMax = (char.y + char.height); var charYMin = (char.y - char.height); var charXMax = (char.x + char.width); var charXMin = (char.x - char.width); char.movingTile = undefined; if ((tile.type == "verticalWide") || (tile.type == "vertical")) { if ((charXMax >= tile.xMin) && (charXMin <= tile.xMax)) { if (charYMax <= tile.yMax) { if (charYMax >= tile.y) { if ((char.jumpDir >= 0) && (!char.jump)) { char.y = tile.y - (char.height * 0.5); char.movingTile = tile; } else if (char.jump && (char.jumpDir == 1)) { char.jump = false; char.y = tile.y - (char.height * 0.5); char.movingTile = tile; } } } } } else if ((charYMax >= tile.yMin) && (charYMax <= tile.yMax)) { if (charXMax >= tile.x) { if (charXMin <= tile.xMax) { if ((char.jumpDir >= 0) && (!char.jump)) { char.x = char.x + tile.lastX; char.movingTile = tile; } else if (char.jump && (char.jumpDir == 1)) { char.jump = false; char.x = char.x + tile.lastX; char.y = tile.y - char.height; char.movingTile = tile; } } } } } } static var log = org.fivepecks.logger.Logger.getInstance(); var arrCurrentTiles = new Array(); var arrTiles = new Array(); var arrCurrentMovingTiles = new Array(); var arrMovingTiles = new Array(); var arrItems = new Array(); var arrCurrentItems = new Array(); }Symbol 184 MovieClip [__Packages.characters.EnemyManager] Frame 0class characters.EnemyManager { var tileW, tileH, hero, model, tileManager; function EnemyManager (tOb) { tileW = tOb.tileW; tileH = tOb.tileH; hero = tOb.hero; model = tOb.model; tileManager = tOb.tileManager; create(tOb.arrRooms); arrCurrentEnemies = arrEnemies[0]; } function create(arrMaster) { var max = arrMaster.length; while (max--) { var maxx = arrMaster[max].length; var arrTmp = []; while (maxx--) { var enemy = arrMaster[max][maxx]; var enemyType = enemy.type; enemy.width = 13; enemy.height = 16; enemy.tileH = tileH; enemy.tileW = tileW; enemy.x = (enemy.xTile * tileW) + (tileW / 2); enemy.y = (enemy.yTile * tileH) + (tileH / 2); enemy.hero = hero; enemy.hitRadius = enemy.height * 1.5; enemy.model = model; enemy.tileManager = tileManager; var tmp; tmp = new characters.Enemy(enemy); arrTmp.unshift(tmp); } arrEnemies.unshift(arrTmp); } return(true); } function switchMap(num) { var max = arrCurrentEnemies.length; while (max--) { removeMovieClip(arrCurrentEnemies[max].id); } arrCurrentEnemies = arrEnemies[num]; var max = arrCurrentEnemies.length; while (max--) { var enemy = arrCurrentEnemies[max]; } } function move() { var max = arrCurrentEnemies.length; while (max--) { var enemy = arrCurrentEnemies[max]; if (enemy.killed && (!enemy.offScreen)) { enemy.die(); } else if (enemy.killed && (enemy.offScreen)) { removeEnemy(enemy); addNewEnemy(); } else { enemy.move(); } } } function removeEnemy(enemy) { var max = arrCurrentEnemies.length; while (max--) { if (arrCurrentEnemies[max].id == enemy.id) { model.removeClip(enemy.id); delete eval (arrCurrentEnemies.splice(max, 1)); } } } function addNewEnemy() { var enemy = {type:"samurai"}; enemy.sp = Math.random() + 0.1; enemy.xTile = Math.ceil(Math.random() * 7); enemy.yTile = Math.ceil(Math.random() * 6); enemy.turn = Math.ceil((Math.random() * 120) + 60); var dir = ((Math.floor(Math.random() * 2) == 1) ? 1 : -1); enemy.dirX = dir; enemy.lastDir = "L"; enemy.width = 13; enemy.height = 16; enemy.tileH = tileH; enemy.tileW = tileW; enemy.x = (enemy.xTile * tileW) + (tileW / 2); enemy.y = (enemy.yTile * tileH) + (tileH / 2); enemy.hero = hero; enemy.hitRadius = enemy.height * 1.5; enemy.model = model; enemy.tileManager = tileManager; var tmp = (new characters.Enemy(enemy)); model.addNewEnemy(tmp); arrCurrentEnemies.push(tmp); } static var log = org.fivepecks.logger.Logger.getInstance(); var arrCurrentEnemies = new Array(); var arrEnemies = new Array(); var name = "EnemyManager"; }Symbol 185 MovieClip [__Packages.characters.Character] Frame 0class characters.Character { var tileH, tileW, model, tileManager, x, y, sp, xTile, yTile, width, height, dirX, hero, turn, type, lastDir, hitRadius, downY, upY, leftX, rightX, upLeft, downLeft, upRight, downRight, yDist, xDist, jumpSpeed, gravity, climbing, jump, climbSpeed, dirWeapon; function Character (tOb) { tileH = tOb.tileH; tileW = tOb.tileW; model = tOb.model; tileManager = tOb.tileManager; x = tOb.x; y = tOb.y; sp = tOb.sp; xTile = tOb.xTile; yTile = tOb.yTile; width = tOb.width; height = tOb.height; dirX = tOb.dirX; hero = tOb.hero; turn = tOb.turn; type = tOb.type; lastDir = tOb.dir; hitRadius = tOb.hitRadius; } function getCorners(x, y) { downY = Math.floor(((y + height) - 1) / tileH); upY = Math.floor((y - height) / tileH); leftX = Math.floor((x - width) / tileW); rightX = Math.floor(((x + width) - 1) / tileW); upLeft = tileManager.arrCurrentTiles[upY][leftX].walkable; downLeft = tileManager.arrCurrentTiles[downY][leftX].walkable; upRight = tileManager.arrCurrentTiles[upY][rightX].walkable; downRight = tileManager.arrCurrentTiles[downY][rightX].walkable; } function die() { if (killed && (!offScreen)) { y = y + dieSpeed; getCorners(x + width, y); if (downY >= tileManager.arrCurrentTiles.length) { offScreen = true; } } } function checkHit() { var numDist = Math.floor(Math.sqrt((xDist * xDist) + (yDist * yDist))); if (numDist < hitRadius) { if ((hero.jumpDir == 1) && (hero.y <= y)) { killed = true; lastDir = lastDir + "Die"; } else { model.heroDie(); } } } function doJump() { jumpSpeed = jumpSpeed + gravity; if (jumpSpeed > tileH) { jumpSpeed = tileH; } if (jumpSpeed < 0) { move(0, -1, -1); } else if (jumpSpeed > 0) { move(0, 1, 1); } return(true); } function fall() { climbing = false; if (!jump) { getCorners(x, y + 1); if (downLeft && (downRight)) { jumpSpeed = 0; jump = true; } } } function onCloud() { var leftCloud = tileManager.arrCurrentTiles[downY][leftX].cloud; var rightCloud = tileManager.arrCurrentTiles[downY][rightX].cloud; if ((leftCloud || (rightCloud)) && (yTile != downY)) { return(true); } return(false); } function checkUpLadder() { var downY = Math.floor(((y + height) - 1) / tileH); var upY = Math.floor(((y - height) - sp) / tileW); var upLadder = tileManager.arrCurrentTiles[upY][xTile].ladder; var downLadder = tileManager.arrCurrentTiles[downY][xTile].ladder; var upBlock = tileManager.arrCurrentTiles[upY][xTile].walkable; if (upLadder || (upBlock)) { if (upLadder || (downLadder)) { return(true); } } else { y = (yTile * tileH) + height; update(0, -1, "U"); return(false); } } function checkDownLadder() { var downY = Math.floor(((sp + y) + height) / tileH); var downLadder = tileManager.arrCurrentTiles[downY][xTile].ladder; if (downLadder) { return(true); } fall(); } function climb(dirY) { climbing = true; jump = false; jumpDir = 0; y = y + (climbSpeed * dirY); x = (xTile * tileW) + (tileW / 2); update(0, dirY, "U"); return(true); } function useWeapon() { if ((lastDir == "R") || (lastDir == "L")) { dirWeapon = ((lastDir == "R") ? 1 : -1); model.weaponManager.addWeapon({x:x + (dirWeapon * width), y:y, prey:model.enemyManager.arrCurrentEnemies, dir:dirWeapon, type:"bullet"}); } } function move() { } function update() { } var killed = false; var offScreen = false; var dieSpeed = 30; var jumpDir = 0; }Symbol 186 MovieClip [__Packages.characters.Enemy] Frame 0class characters.Enemy extends characters.Character { var dirX, getCorners, sp, x, height, y, upRight, width, upLeft, lastDir, turn, xDist, hero, yDist, xTile, tileW, yTile, tileH; function Enemy (tOb) { super(tOb); } function move() { if (dirX == 1) { getCorners(x + (sp * dirX), y + height); if (upRight) { dirX = randomMove(dirX); } else { dirX = -1; } } else { getCorners(x + ((sp * dirX) - width), y + height); if (upLeft) { dirX = randomMove(dirX); } else { dirX = 1; } } x = x + (sp * dirX); lastDir = ((dirX > 0) ? "R" : "L"); update(); } function randomMove(xDir) { var newDir = xDir; var ran = Math.floor(Math.random() * turn); if (!ran) { newDir = -xDir; } return(newDir); } function update(dirX, dirY) { xDist = x - hero.x; yDist = y - hero.y; xTile = Math.floor(x / tileW); yTile = Math.floor(y / tileH); } }Symbol 187 MovieClip [__Packages.weapons.WeaponManager] Frame 0class weapons.WeaponManager { var tileH, tileW, model, tileManager; function WeaponManager (tOb) { tileH = tOb.tileH; tileW = tOb.tileW; arrWeapons = tOb.arrWeapons; arrCurrentWeapons = arrWeapons[0]; model = tOb.model; tileManager = tOb.tileManager; } function switchMap(num) { arrCurrentWeapons = arrWeapons[num]; } function createWeapon(weapon) { var weaponType = weapon.type; weapon.width = 10; weapon.height = 20; weapon.tileW = tileW; weapon.tileH = tileH; weapon.tileManager = tileManager; weapon.model = model; weapon.weaponManager = this; var tmp = ((weaponType == "bullet") ? (new weapons.Bullet(weapon)) : false); return(tmp); } function addWeapon(tOb) { var weapon = createWeapon(tOb); arrCurrentWeapons.push(weapon); model.addWeapon(weapon); return(true); } function move() { var max = arrCurrentWeapons.length; while (max--) { arrCurrentWeapons[max].move(); } } function removeWeapon(clip) { var max = arrCurrentWeapons.length; while (max--) { if (arrCurrentWeapons[max].id == clip) { delete eval (arrCurrentWeapons.splice(max, 1)); model.removeClip(clip); return; } } } function clearAllWeapons() { var max = arrCurrentWeapons.length; var arrTmp = []; while (max--) { arrTmp.push(arrCurrentWeapons[max].id); } model.resetWeapons(arrTmp); var max = arrWeapons.length; while (max--) { arrWeapons[max] = []; } } var arrCurrentWeapons = new Array(); var arrWeapons = new Array(); }Symbol 188 MovieClip [__Packages.weapons.Weapon] Frame 0class weapons.Weapon { var tileH, tileW, model, tileManager, weaponManager, downY, height, upY, leftX, width, rightX, upLeft, downLeft, upRight, downRight, dirX, sp, x, y, xTile, prey, id, yTile; function Weapon (tOb) { tileH = 30; tileW = 30; model = tOb.model; tileManager = tOb.tileManager; weaponManager = tOb.weaponManager; } function getCorners(x, y) { downY = Math.floor(((y + height) - 1) / tileH); upY = Math.floor((y - height) / tileH); leftX = Math.floor((x - width) / tileW); rightX = Math.floor(((x + width) - 1) / tileW); upLeft = tileManager.arrCurrentTiles[upY][leftX].walkable; downLeft = tileManager.arrCurrentTiles[downY][leftX].walkable; upRight = tileManager.arrCurrentTiles[upY][rightX].walkable; downRight = tileManager.arrCurrentTiles[downY][rightX].walkable; } function move() { if (dirX == 1) { getCorners(x + ((sp * dirX) + width), y + height); if (upRight) { x = x + ((sp * dirX) + width); } else if (lastX < 1) { x = ((xTile + 1) * tileW) - width; lastX++; } else { remove(); } } else { getCorners(x + ((sp * dirX) - width), y + height); if (upLeft) { x = x + ((sp * dirX) - width); } else { x = (xTile * tileW) - width; remove(); } } update(); checkHit(); } function checkHit() { var max = prey.length; var tmpPrey; while (max--) { tmpPrey = prey[max]; var xDist = (x - tmpPrey.x); var yDist = (y - tmpPrey.y); if (Math.sqrt((xDist * xDist) + (yDist * yDist)) < width) { model.victimDie(tmpPrey); weaponManager.removeWeapon(id); } } } function update() { xTile = Math.floor(x / tileW); yTile = Math.floor(y / tileH); } function remove() { weaponManager.removeWeapon(id); } var lastX = 0; }Symbol 189 MovieClip [__Packages.weapons.Bullet] Frame 0class weapons.Bullet extends weapons.Weapon { var sp, x, y, width, height, type, prey, dirX; function Bullet (tOb) { super(tOb); sp = 4; x = tOb.x; y = tOb.y; width = tOb.width; height = tOb.height; type = "bullet"; prey = tOb.prey; dirX = tOb.dir; } }Symbol 190 MovieClip [__Packages.props.PropManager] Frame 0class props.PropManager { var tileH, tileW, hero, model; function PropManager (tOb) { tileH = tOb.tileH; tileW = tOb.tileW; hero = tOb.hero; model = tOb.model; create(tOb.arrProps); arrCurrentProps = arrProps[0]; } function create(arrMaster) { var max = arrMaster.length; while (max--) { var maxx = arrMaster[max].length; var arrTmp = []; while (maxx--) { var obProp = arrMaster[max][maxx]; var tmp = createProp(obProp); arrTmp.unshift(tmp); } arrProps.unshift(arrTmp); } } function removeProp(id) { var max = arrCurrentProps.length; while (max--) { if (arrCurrentProps[max].id == id) { model.removeClip(id); delete eval (arrCurrentProps.splice(max, 1)); return; } } } function switchMap(num) { arrCurrentProps = arrProps[num]; } function createProp(obProp) { var prop = (new props.Prop(obProp)); var propType = prop.type; if (propType == "jewel") { prop.width = 10; prop.height = 10; } prop.x = (prop.xTile * tileW) + (tileW / 2); prop.y = (prop.yTile * tileH) + (tileH * 0.67); prop.hero = hero; prop.tileW = tileW; prop.tileH = tileH; prop.propManager = this; return(prop); } function addProp(tOb) { var prop = createProp(tOb); arrCurrentProps.push(prop); } function checkProps() { var max = arrCurrentProps.length; while (max--) { arrCurrentProps[max].checkHit(); } } static var log = org.fivepecks.logger.Logger.getInstance(); var arrProps = []; var arrCurrentProps = []; var name = "PropManager"; }Symbol 191 MovieClip [__Packages.props.Prop] Frame 0class props.Prop { var xTile, yTile, type, propManager, hero, x, y, width, id; function Prop (tOb) { xTile = tOb.xTile; yTile = tOb.yTile; type = tOb.type; propManager = tOb.propManager; } function checkHit() { var xDist = (x - hero.x); var yDist = (y - hero.y); if (Math.sqrt((xDist * xDist) + (yDist * yDist)) < (width + hero.width)) { propManager.removeProp(id); } } }Symbol 192 MovieClip [__Packages.characters.Hero] Frame 0class characters.Hero extends characters.Character { var walkSpeed, getCorners, x, sp, y, upLeft, upRight, height, tileH, yTile, downLeft, downRight, width, tileW, xTile, lastDir, tileManager; function Hero (tOb) { super(tOb); walkSpeed = tOb.sp; } function move(dirX, dirY) { getCorners(x, y + (sp * dirY)); if (dirY == -1) { if (upLeft && (upRight)) { y = y + (sp * dirY); } else { y = (yTile * tileH) + height; } } if (dirY == 1) { if (downLeft && (downRight)) { y = y + (sp * dirY); } else { y = ((yTile + 1) * tileH) - height; } } getCorners(x + (sp * dirX), y); if (dirX == -1) { if (downLeft && (upLeft)) { x = x + (sp * dirX); } else { x = (xTile * tileW) + width; } lastDir = "L"; } if (dirX == 1) { if (upRight && (downRight)) { x = x + sp; } else { x = ((xTile + 1) * tileW) - width; } lastDir = "R"; } update(dirX, dirY); return(true); } function update(dirX, dirY) { xTile = Math.floor(x / tileW); yTile = Math.floor(y / tileH); var tile = tileManager.arrCurrentTiles[yTile][xTile]; if (tile.door) { xTile = tile.xTile; yTile = tile.yTile; if (Math.abs(dirX) == 1) { x = Math.floor((xTile * tileW) + width); } else { y = Math.floor((yTile * tileH) + height); } } } }Symbol 193 MovieClip [__Packages.timer.TimerDownEvent] Frame 0class timer.TimerDownEvent { var numTimeLeft, numTimeOffset, numTempTime, numMin, numSec, strMinParse, strSecParse, strReturn, numInterval, numGetTimer, numLastTime; function TimerDownEvent (totalTime) { numTimeLeft = totalTime; timeOffset = (0); mx.events.EventDispatcher.initialize(this); } function dispatchEvent() { } function addEventListener() { } function removeEventListener() { } function get timeLeft() { return(numTimeLeft); } function set timeLeft(numTime) { numTimeLeft = numTime; //return(timeLeft); } function get timeOffset() { return(numTimeOffset); } function set timeOffset(numTime) { numTimeOffset = numTime; //return(timeOffset); } function displayTime() { numTempTime = Math.round(timeLeft / 1000); if (numTempTime >= 0) { if (numTempTime > 59) { numMin = Math.floor(numTempTime / 60); numSec = numTempTime - (numMin * 60); } else { numMin = 0; numSec = numTempTime; } if (numMin == 0) { strMinParse = "0"; } else { strMinParse = String(numMin); } if ((numSec < 10) && (numSec > 0)) { strSecParse = "0" + numSec; } else if (numSec == 0) { strSecParse = "00"; } else { strSecParse = String(numSec); } strReturn = (strMinParse + ":") + strSecParse; return(strReturn); } } function startClock() { if (timeLeft >= 1) { timeOffset = (getTimer()); numInterval = setInterval(this, "decrement", 250); } } function stopClock() { clearInterval(numInterval); } function lastCheck() { numGetTimer = getTimer(); numLastTime = numGetTimer - timeOffset; timeOffset = (numGetTimer); return(numLastTime); } function decrement() { timeLeft = timeLeft - lastCheck(); if (((timeLeft == null) || (timeLeft <= 0)) || (timeLeft == undefined)) { stopClock(); timerFinished(); } } function timerFinished() { var eventObj = {target:this, type:"timerFinished"}; dispatchEvent(eventObj); } function kill() { stopClock(); } }Symbol 194 MovieClip [__Packages.mvc.Controller] Frame 0interface mvc.Controller { }Symbol 195 MovieClip [__Packages.mvc.View] Frame 0interface mvc.View { }Symbol 196 MovieClip [__Packages.mvc.AbstractController] Frame 0class mvc.AbstractController implements mvc.Controller { var model, view; function AbstractController (m) { setModel(m); } function setModel(m) { model = m; } function getModel() { return(model); } function setView(v) { view = v; } function getView() { return(view); } }Symbol 197 MovieClip [__Packages.mvc_specific.MVCController] Frame 0class mvc_specific.MVCController extends mvc.AbstractController { var intervalId, model, view; function MVCController (cm) { super(cm); intervalId = setInterval(this, "updateObjects", 30); } function updateModel() { with (model) { detectKeys(); } } function updateObjects() { with (model) { updateObjects(); } } function pauseUpdates() { clearInterval(intervalId); _root.onEnterFrame = null; } function restartUpdates(str) { with (model) { restart(str); } _root.onEnterFrame = function () { this.game.mvc_controller.updateModel(); }; intervalId = setInterval(this, "updateObjects", 30); with (view) { changeState("active"); } } function click(e) { switch (e.target._name) { case "btnSubmit" : with (view) { submitScore(); } return; case "stop" : return; case "restart" : } } static var log = org.fivepecks.logger.Logger.getInstance(); }Symbol 198 MovieClip [__Packages.mvc.AbstractView] Frame 0class mvc.AbstractView implements util.Observer, mvc.View { var model, controller; function AbstractView (m, c) { setModel(m); if (!(c === undefined)) { setController(c); } } function defaultController(model) { return(null); } function setModel(m) { model = m; } function getModel() { return(model); } function setController(c) { controller = c; getController().setView(this); } function getController() { if (controller === undefined) { setController(defaultController(getModel())); } return(controller); } function update(o, infoObj) { } }Symbol 199 MovieClip [__Packages.mvc_specific.MVCView] Frame 0class mvc_specific.MVCView extends mvc.AbstractView { var mcPath, mcBG, mcClock, mcScore, mcAudio, mcFinalScreen, mcHero, strState, controller, intervalPauseId; function MVCView (m, c) { super(m, c); createChildren(_root); changeState("active"); } function createChildren(path) { mcPath = path.createEmptyMovieClip("mcTile", path.getNextHighestDepth()); mcBG = mcPath.attachMovie("mcGameBG", "mcGameBG", mcPath.getNextHighestDepth()); mcBG.cacheAsBitmap = true; mcPath._xscale = (mcPath._yscale = 160); mcPath._x = mcPath._x - 40; mcPath._y = mcPath._y - 42; mcClock = path.attachMovie("mcClock", "mcClock", path.getNextHighestDepth(), {_x:8, _y:5}); mcScore = path.attachMovie("mcScore", "mcScore", path.getNextHighestDepth(), {_x:335, _y:5}); mcAudio = path.attachMovie("mcAudio", "mcAudio", path.getNextHighestDepth()); mcFinalScreen = path.attachMovie("mcFinalScreen", "mcFinalScreen", path.getNextHighestDepth(), {_visible:false}); doSound("game"); Selection.setFocus(null); } function setTiles(arrCurrentTiles) { var max = arrCurrentTiles.length; while (max--) { var maxx = arrCurrentTiles[max].length; while (maxx--) { var tile = arrCurrentTiles[max][maxx]; var tilePath = mcPath.attachMovie("tile", tile.name, mcPath.getNextHighestDepth(), {_x:maxx * tileW, _y:max * tileH}); tile.id = tilePath; tilePath.cacheAsBitmap = true; } } } function setHero(hero) { mcHero = mcPath.attachMovie("mcHero", "mcHero", mcPath.getNextHighestDepth(), {_x:hero.x, _y:hero.y}); hero.id = mcHero; mcHero.cacheAsBitmap = true; } function switchMap(arrCurrentTiles, arrCurrentProps, arrCurrentItems, arrCurrentEnemies, arrCurrentMovingTiles, arrCurrentWeapons, arrLastProps, arrLastItems, arrLastEnemies, arrLastMovingTiles, arrLastWeapons) { var max = arrCurrentTiles.length; while (max--) { var maxx = arrCurrentTiles[max].length; while (maxx--) { var tile = arrCurrentTiles[max][maxx]; mcPath[tile.name].gotoAndStop(tile.frame); } } var arrLast = [arrLastWeapons, arrLastEnemies, arrLastMovingTiles, arrLastProps, arrLastItems]; var arrCurrent = [arrCurrentWeapons, arrCurrentEnemies, arrCurrentMovingTiles, arrCurrentProps, arrCurrentItems]; max = arrLast.length; while (max--) { var maxx = arrLast[max].length; while (maxx--) { removeMovieClip(arrLast[max][maxx].id); } } max = arrCurrent.length; while (max--) { maxx = arrCurrent[max].length; while (maxx--) { var depth = mcPath.getNextHighestDepth(); var tmp = arrCurrent[max][maxx]; var id = mcPath.attachMovie(tmp.type, tmp.type + depth, depth, {_x:tmp.x, _y:tmp.y}); tmp.id = id; tmp.id.cacheAsBitmap = true; } } } function addWeapon(weapon) { var depth = mcPath.getNextHighestDepth(); weapon.id = mcPath.attachMovie(weapon.type, weapon.type + depth, depth, {_x:weapon.x, _y:weapon.y}); weapon.id.cacheAsBitmap = true; doSound("shotgun"); } function removeClip(clip) { removeMovieClip(clip); } function updateObjects(arrObjects) { if (strState == "active") { var points = arrObjects.shift(); mcScore.score = points; var time = arrObjects.shift(); if (time.length) { mcClock.time = time; } var tmp = arrObjects.shift(); with (tmp) { if (keyPressed) { if ((lastDir == "R") || (lastDir == "L")) { id.gotoAndStop(lastDir); } id.clip.play(); } else { id.clip.gotoAndStop("rest"); } id._x = x; id._y = y; } var max = arrObjects.length; while (max--) { var maxx = arrObjects[max].length; while (maxx--) { tmp = arrObjects[max][maxx]; with (tmp) { id.gotoAndStop(lastDir); id.clip.play(); id._x = x; id._y = y; } } } } } function changeCharDepth(id) { mcHero.swapDepths(mcPath.getNextHighestDepth()); } function end(arrObjects) { changeState("end"); with (controller) { pauseUpdates(); } var points = arrObjects.shift(); if (points.length) { mcScore.score = points; } var time = arrObjects.shift(); if (time.length) { mcClock.time = time; } for (var prop in mcPath) { mcPath[prop].clip.clip.stop(); } doSound("stopGame"); setReward(); } function changeState(str) { strState = str; } function addNewEnemy(enemy) { var depth = mcPath.getNextHighestDepth(); enemy.id = mcPath.attachMovie(enemy.type, enemy.type + depth, depth, {_x:enemy.x, _y:enemy.y}); enemy.id.cacheAsBitmap = true; } function resetWeapons(arrWeapons) { var max = arrWeapons.length; while (max--) { removeMovieClip(arrWeapons[max]); } } function doSound(str) { if (str == "scream") { str = str + String(Math.floor(Math.random() * 5)); } else if (str == "shotgun") { str = str + String(Math.floor(Math.random() * 2)); } else if (str == "yeehaw") { str = (Math.floor(Math.random() * 2) ? "yeehaw" : "hehehe"); } mcAudio.gotoAndStop(str); mcAudio.gotoAndStop("rest"); } function initializeScores(strURL) { } function setReward() { var num = 0; finalScore = Number(mcScore.score); var i = 0; while (i < 20) { if (finalScore >= Number(_root["SCORE" + i])) { log.debug((((("VIEW " + finalScore) + " beats ") + i) + "'s ") + Number(_root["SCORE" + i])); num = i; break; } i++; } numRank = 0; if (i <= 6) { numRank = 3; } else if ((i > 6) && (i <= 13)) { numRank = 2; } else if ((i > 13) && (i < 20)) { numRank = 1; } doSound("title"); mcFinalScreen._visible = true; log.debug((((("VIEW: numRank " + numRank) + "...num ") + num) + "...finalScore ") + finalScore); var duration = 1000; intervalPauseId = setInterval(this, "executeCallback", duration, numRank); } function executeCallback(numRank) { if (intervalCount > 1) { trace("executeCallback intervalId: " + intervalPauseId); mcScore._visible = false; mcClock._visible = false; mcPath._visible = false; mcFinalScreen._visible = false; clearInterval(intervalPauseId); _root.gotoAndStop("reward" + numRank); } intervalCount++; } function update(o, ob) { switch (ob.msg) { case "initialize" : setTiles(ob.arrCurrentTiles); setHero(ob.hero); case "switchMap" : switchMap(ob.arrCurrentTiles, ob.arrCurrentProps, ob.arrCurrentItems, ob.arrCurrentEnemies, ob.arrCurrentMovingTiles, ob.arrCurrentWeapons, ob.arrLastProps, ob.arrLastItems, ob.arrLastEnemies, ob.arrLastMovingTiles, ob.arrLastWeapons); changeCharDepth(ob.hero.id); return; case "update" : updateObjects(ob.arrObjects); return; case "addWeapon" : addWeapon(ob.weapon); return; case "removeClip" : removeClip(ob.clip); return; case "end" : end(ob.arrObjects); return; case "resetWeapons" : resetWeapons(ob.arrWeapons); return; case "addNewEnemy" : addNewEnemy(ob.enemy); doSound("yeehaw"); return; case "doSound" : doSound(ob.arrObjects[0]); return; default : log.info("The view is reporting an update without an appropriate case - " + ob.msg); } } static var log = org.fivepecks.logger.Logger.getInstance(); var name = "MVCView"; var tileH = 30; var tileW = 30; var arrItems = []; var finalScore = 0; var intervalCount = 0; var numRank = 0; }Symbol 28 MovieClip [mcAudio] Frame 1stop();Symbol 40 MovieClip Frame 16gotoAndPlay (3);Symbol 53 MovieClip Frame 1gotoAndStop(_root.beltColor);Symbol 56 MovieClip Frame 9gotoAndPlay (1);Symbol 57 MovieClip [mcHero] Frame 1stop();Symbol 61 MovieClip Frame 17gotoAndPlay (3);Symbol 62 MovieClip [samurai] Frame 1stop();Symbol 103 Buttonon (release) { _root.gotoAndStop("game"); }Symbol 117 MovieClip Frame 20stop();
Library Items
Symbol 1 Font | Used by:2 3 4 | |
Symbol 2 Text | Uses:1 | Used by:8 |
Symbol 3 Text | Uses:1 | Used by:8 |
Symbol 4 EditableText | Uses:1 | Used by:8 |
Symbol 5 Graphic | Used by:8 | |
Symbol 6 Graphic | Used by:7 | |
Symbol 7 MovieClip | Uses:6 | Used by:8 |
Symbol 8 MovieClip | Uses:2 3 4 5 7 | Used by:Timeline |
Symbol 175 MovieClip [__Packages.org.fivepecks.logger.Logger] | ||
Symbol 176 MovieClip [__Packages.mx.events.EventDispatcher] | ||
Symbol 177 MovieClip [__Packages.org.fivepecks.logger.OutputWindowView] | ||
Symbol 178 MovieClip [__Packages.org.fivepecks.logger.LCView] | ||
Symbol 179 MovieClip [__Packages.mvc_specific.MVC] | ||
Symbol 180 MovieClip [__Packages.util.Observable] | ||
Symbol 181 MovieClip [__Packages.util.Observer] | ||
Symbol 182 MovieClip [__Packages.mvc_specific.MVCModel] | ||
Symbol 183 MovieClip [__Packages.tile.TileManager] | ||
Symbol 184 MovieClip [__Packages.characters.EnemyManager] | ||
Symbol 185 MovieClip [__Packages.characters.Character] | ||
Symbol 186 MovieClip [__Packages.characters.Enemy] | ||
Symbol 187 MovieClip [__Packages.weapons.WeaponManager] | ||
Symbol 188 MovieClip [__Packages.weapons.Weapon] | ||
Symbol 189 MovieClip [__Packages.weapons.Bullet] | ||
Symbol 190 MovieClip [__Packages.props.PropManager] | ||
Symbol 191 MovieClip [__Packages.props.Prop] | ||
Symbol 192 MovieClip [__Packages.characters.Hero] | ||
Symbol 193 MovieClip [__Packages.timer.TimerDownEvent] | ||
Symbol 194 MovieClip [__Packages.mvc.Controller] | ||
Symbol 195 MovieClip [__Packages.mvc.View] | ||
Symbol 196 MovieClip [__Packages.mvc.AbstractController] | ||
Symbol 197 MovieClip [__Packages.mvc_specific.MVCController] | ||
Symbol 198 MovieClip [__Packages.mvc.AbstractView] | ||
Symbol 199 MovieClip [__Packages.mvc_specific.MVCView] | ||
Symbol 9 Graphic | Used by:20 | |
Symbol 10 Graphic | Used by:15 | |
Symbol 11 Graphic | Used by:12 | |
Symbol 12 MovieClip | Uses:11 | Used by:15 |
Symbol 13 Graphic | Used by:14 | |
Symbol 14 MovieClip | Uses:13 | Used by:15 |
Symbol 15 MovieClip | Uses:10 12 14 | Used by:20 |
Symbol 16 Graphic | Used by:17 | |
Symbol 17 MovieClip | Uses:16 | Used by:20 |
Symbol 18 Graphic | Used by:19 | |
Symbol 19 MovieClip | Uses:18 | Used by:20 |
Symbol 20 MovieClip | Uses:9 15 17 19 | Used by:21 |
Symbol 21 MovieClip [mcGameBG] | Uses:20 | Used by:Timeline |
Symbol 22 Sound | Used by:28 | |
Symbol 23 Sound | Used by:28 Timeline | |
Symbol 24 Sound | Used by:28 | |
Symbol 25 Sound | Used by:28 | |
Symbol 26 Sound | Used by:28 | |
Symbol 27 Sound | Used by:28 | |
Symbol 28 MovieClip [mcAudio] | Uses:22 23 24 25 26 27 | Used by:Timeline |
Symbol 29 Graphic | Used by:30 | |
Symbol 30 MovieClip | Uses:29 | Used by:35 39 60 |
Symbol 31 Graphic | Used by:32 | |
Symbol 32 MovieClip | Uses:31 | Used by:35 39 |
Symbol 33 Graphic | Used by:34 | |
Symbol 34 MovieClip | Uses:33 | Used by:35 39 |
Symbol 35 MovieClip | Uses:30 32 34 | Used by:40 |
Symbol 36 Graphic | Used by:37 | |
Symbol 37 MovieClip | Uses:36 | Used by:38 |
Symbol 38 MovieClip | Uses:37 | Used by:40 |
Symbol 39 MovieClip | Uses:30 32 34 | Used by:40 |
Symbol 40 MovieClip | Uses:35 38 39 | Used by:57 |
Symbol 41 Graphic | Used by:56 | |
Symbol 42 Graphic | Used by:56 | |
Symbol 43 Graphic | Used by:56 | |
Symbol 44 Graphic | Used by:56 | |
Symbol 45 Graphic | Used by:53 | |
Symbol 46 Graphic | Used by:53 | |
Symbol 47 Graphic | Used by:53 | |
Symbol 48 Graphic | Used by:53 | |
Symbol 49 Graphic | Used by:53 | |
Symbol 50 Graphic | Used by:53 | |
Symbol 51 Graphic | Used by:53 | |
Symbol 52 Graphic | Used by:53 | |
Symbol 53 MovieClip | Uses:45 46 47 48 49 50 51 52 | Used by:56 |
Symbol 54 Graphic | Used by:55 | |
Symbol 55 MovieClip | Uses:54 | Used by:56 |
Symbol 56 MovieClip | Uses:41 42 43 44 53 55 | Used by:57 |
Symbol 57 MovieClip [mcHero] | Uses:40 56 | Used by:Timeline |
Symbol 58 Graphic | Used by:59 | |
Symbol 59 MovieClip | Uses:58 | Used by:60 |
Symbol 60 MovieClip | Uses:30 59 | Used by:61 |
Symbol 61 MovieClip | Uses:60 | Used by:62 |
Symbol 62 MovieClip [samurai] | Uses:61 | Used by:Timeline |
Symbol 63 Graphic | Used by:64 | |
Symbol 64 MovieClip | Uses:63 | Used by:65 |
Symbol 65 MovieClip [bullet] | Uses:64 | Used by:Timeline |
Symbol 66 MovieClip [tile] | Used by:Timeline | |
Symbol 67 Graphic | Used by:68 | |
Symbol 68 MovieClip | Uses:67 | Used by:71 73 |
Symbol 69 Font | Used by:70 72 | |
Symbol 70 EditableText | Uses:69 | Used by:71 |
Symbol 71 MovieClip [mcClock] | Uses:68 70 | Used by:Timeline |
Symbol 72 EditableText | Uses:69 | Used by:73 |
Symbol 73 MovieClip [mcScore] | Uses:68 72 | Used by:Timeline |
Symbol 74 Graphic | Used by:79 | |
Symbol 75 Graphic | Used by:76 | |
Symbol 76 MovieClip | Uses:75 | Used by:79 |
Symbol 77 Font | Used by:78 | |
Symbol 78 Text | Uses:77 | Used by:79 |
Symbol 79 MovieClip [mcFinalScreen] | Uses:74 76 78 | Used by:Timeline |
Symbol 80 Graphic | Used by:81 | |
Symbol 81 MovieClip | Uses:80 | Used by:Timeline |
Symbol 82 Graphic | Used by:83 | |
Symbol 83 MovieClip | Uses:82 | Used by:86 125 152 |
Symbol 84 Graphic | Used by:85 | |
Symbol 85 MovieClip | Uses:84 | Used by:86 125 152 |
Symbol 86 MovieClip | Uses:83 85 | Used by:Timeline |
Symbol 87 Graphic | Used by:88 | |
Symbol 88 MovieClip | Uses:87 | Used by:Timeline |
Symbol 89 Graphic | Used by:90 | |
Symbol 90 MovieClip | Uses:89 | Used by:Timeline |
Symbol 91 Graphic | Used by:92 | |
Symbol 92 MovieClip | Uses:91 | Used by:Timeline |
Symbol 93 Graphic | Used by:94 | |
Symbol 94 MovieClip | Uses:93 | Used by:Timeline |
Symbol 95 Graphic | Used by:104 | |
Symbol 96 Graphic | Used by:97 | |
Symbol 97 MovieClip | Uses:96 | Used by:104 |
Symbol 98 Graphic | Used by:99 | |
Symbol 99 MovieClip | Uses:98 | Used by:104 |
Symbol 100 Graphic | Used by:103 144 149 | |
Symbol 101 Graphic | Used by:103 144 | |
Symbol 102 Graphic | Used by:103 144 | |
Symbol 103 Button | Uses:100 101 102 | Used by:104 |
Symbol 104 MovieClip | Uses:95 97 99 103 | Used by:Timeline |
Symbol 105 Graphic | Used by:106 | |
Symbol 106 MovieClip | Uses:105 | Used by:117 Timeline |
Symbol 107 Graphic | Used by:110 | |
Symbol 108 Graphic | Used by:109 | |
Symbol 109 MovieClip | Uses:108 | Used by:110 167 |
Symbol 110 MovieClip | Uses:107 109 | Used by:117 Timeline |
Symbol 111 Graphic | Used by:112 | |
Symbol 112 MovieClip | Uses:111 | Used by:117 Timeline |
Symbol 113 Graphic | Used by:114 | |
Symbol 114 MovieClip | Uses:113 | Used by:117 Timeline |
Symbol 115 Graphic | Used by:116 | |
Symbol 116 MovieClip | Uses:115 | Used by:117 Timeline |
Symbol 117 MovieClip | Uses:106 110 112 114 116 SS1 | Used by:Timeline |
Symbol 118 Graphic | Used by:119 | |
Symbol 119 MovieClip | Uses:118 | Used by:Timeline |
Symbol 120 Font | Used by:121 122 | |
Symbol 121 Text | Uses:120 | Used by:Timeline |
Symbol 122 EditableText | Uses:120 | Used by:Timeline |
Symbol 123 Graphic | Used by:Timeline | |
Symbol 124 Graphic | Used by:125 | |
Symbol 125 MovieClip | Uses:83 85 124 | Used by:Timeline |
Symbol 126 Graphic | Used by:127 | |
Symbol 127 MovieClip | Uses:126 | Used by:Timeline |
Symbol 128 Graphic | Used by:129 | |
Symbol 129 MovieClip | Uses:128 | Used by:Timeline |
Symbol 130 Graphic | Used by:131 | |
Symbol 131 MovieClip | Uses:130 | Used by:Timeline |
Symbol 132 Graphic | Used by:133 | |
Symbol 133 MovieClip | Uses:132 | Used by:Timeline |
Symbol 134 Graphic | Used by:135 | |
Symbol 135 MovieClip | Uses:134 | Used by:Timeline |
Symbol 136 Graphic | Used by:137 | |
Symbol 137 MovieClip | Uses:136 | Used by:Timeline |
Symbol 138 Graphic | Used by:139 | |
Symbol 139 MovieClip | Uses:138 | Used by:Timeline |
Symbol 140 Graphic | Used by:141 | |
Symbol 141 MovieClip | Uses:140 | Used by:Timeline |
Symbol 142 Graphic | Used by:143 | |
Symbol 143 MovieClip | Uses:142 | Used by:Timeline |
Symbol 144 Button | Uses:100 101 102 | Used by:Timeline |
Symbol 145 Graphic | Used by:Timeline | |
Symbol 146 Graphic | Used by:149 | |
Symbol 147 Graphic | Used by:149 | |
Symbol 148 Graphic | Used by:149 | |
Symbol 149 Button | Uses:146 147 148 100 | Used by:Timeline |
Symbol 150 Graphic | Used by:151 | |
Symbol 151 MovieClip | Uses:150 | Used by:Timeline |
Symbol 152 MovieClip | Uses:83 85 | Used by:Timeline |
Symbol 153 Graphic | Used by:154 | |
Symbol 154 MovieClip | Uses:153 | Used by:Timeline |
Symbol 155 Graphic | Used by:156 | |
Symbol 156 MovieClip | Uses:155 | Used by:Timeline |
Symbol 157 Font | Used by:158 | |
Symbol 158 Text | Uses:157 | Used by:Timeline |
Symbol 159 Graphic | Used by:Timeline | |
Symbol 160 Graphic | Used by:161 | |
Symbol 161 MovieClip | Uses:160 | Used by:Timeline |
Symbol 162 Graphic | Used by:163 | |
Symbol 163 MovieClip | Uses:162 | Used by:Timeline |
Symbol 164 Graphic | Used by:165 | |
Symbol 165 MovieClip | Uses:164 | Used by:Timeline |
Symbol 166 Graphic | Used by:167 | |
Symbol 167 MovieClip | Uses:166 109 | Used by:Timeline |
Symbol 168 Graphic | Used by:169 | |
Symbol 169 MovieClip | Uses:168 | Used by:Timeline |
Symbol 170 Graphic | Used by:171 | |
Symbol 171 MovieClip | Uses:170 | Used by:Timeline |
Symbol 172 Graphic | Used by:173 | |
Symbol 173 MovieClip | Uses:172 | Used by:Timeline |
Symbol 174 Graphic | Used by:Timeline | |
Streaming Sound 1 | Used by:Symbol 117 MovieClip |
Instance Names
"preloaderClip" | Frame 1 | Symbol 8 MovieClip |
"mcPad" | Frame 6 | Symbol 104 MovieClip |
"txtDummy" | Frame 11 | Symbol 122 EditableText |
"btnHunt" | Frame 17 | Symbol 144 Button |
"btnMain" | Frame 17 | Symbol 149 Button |
"btnHunt" | Frame 27 | Symbol 144 Button |
"percentText" | Symbol 8 MovieClip Frame 1 | Symbol 4 EditableText |
"preloadBar" | Symbol 8 MovieClip Frame 1 | Symbol 7 MovieClip |
"clip" | Symbol 40 MovieClip Frame 3 | Symbol 39 MovieClip |
"belt" | Symbol 56 MovieClip Frame 1 | Symbol 53 MovieClip |
"belt" | Symbol 56 MovieClip Frame 10 | Symbol 53 MovieClip |
"clip" | Symbol 57 MovieClip [mcHero] Frame 1 | Symbol 40 MovieClip |
"clip" | Symbol 57 MovieClip [mcHero] Frame 3 | Symbol 56 MovieClip |
"clip" | Symbol 57 MovieClip [mcHero] Frame 5 | Symbol 40 MovieClip |
"clip" | Symbol 61 MovieClip Frame 1 | Symbol 60 MovieClip |
"clip" | Symbol 62 MovieClip [samurai] Frame 1 | Symbol 61 MovieClip |
"clip" | Symbol 65 MovieClip [bullet] Frame 1 | Symbol 64 MovieClip |
"txtTime" | Symbol 71 MovieClip [mcClock] Frame 1 | Symbol 70 EditableText |
"txtScore" | Symbol 73 MovieClip [mcScore] Frame 1 | Symbol 72 EditableText |
"mcHunt" | Symbol 104 MovieClip Frame 1 | Symbol 103 Button |
Special Tags
FileAttributes (69) | Timeline Frame 1 | Access local files only, Metadata not present, AS1/AS2. |
ExportAssets (56) | Timeline Frame 1 | Symbol 175 as "__Packages.org.fivepecks.logger.Logger" |
ExportAssets (56) | Timeline Frame 1 | Symbol 176 as "__Packages.mx.events.EventDispatcher" |
ExportAssets (56) | Timeline Frame 1 | Symbol 177 as "__Packages.org.fivepecks.logger.OutputWindowView" |
ExportAssets (56) | Timeline Frame 1 | Symbol 178 as "__Packages.org.fivepecks.logger.LCView" |
ExportAssets (56) | Timeline Frame 1 | Symbol 179 as "__Packages.mvc_specific.MVC" |
ExportAssets (56) | Timeline Frame 1 | Symbol 180 as "__Packages.util.Observable" |
ExportAssets (56) | Timeline Frame 1 | Symbol 181 as "__Packages.util.Observer" |
ExportAssets (56) | Timeline Frame 1 | Symbol 182 as "__Packages.mvc_specific.MVCModel" |
ExportAssets (56) | Timeline Frame 1 | Symbol 183 as "__Packages.tile.TileManager" |
ExportAssets (56) | Timeline Frame 1 | Symbol 184 as "__Packages.characters.EnemyManager" |
ExportAssets (56) | Timeline Frame 1 | Symbol 185 as "__Packages.characters.Character" |
ExportAssets (56) | Timeline Frame 1 | Symbol 186 as "__Packages.characters.Enemy" |
ExportAssets (56) | Timeline Frame 1 | Symbol 187 as "__Packages.weapons.WeaponManager" |
ExportAssets (56) | Timeline Frame 1 | Symbol 188 as "__Packages.weapons.Weapon" |
ExportAssets (56) | Timeline Frame 1 | Symbol 189 as "__Packages.weapons.Bullet" |
ExportAssets (56) | Timeline Frame 1 | Symbol 190 as "__Packages.props.PropManager" |
ExportAssets (56) | Timeline Frame 1 | Symbol 191 as "__Packages.props.Prop" |
ExportAssets (56) | Timeline Frame 1 | Symbol 192 as "__Packages.characters.Hero" |
ExportAssets (56) | Timeline Frame 1 | Symbol 193 as "__Packages.timer.TimerDownEvent" |
ExportAssets (56) | Timeline Frame 1 | Symbol 194 as "__Packages.mvc.Controller" |
ExportAssets (56) | Timeline Frame 1 | Symbol 195 as "__Packages.mvc.View" |
ExportAssets (56) | Timeline Frame 1 | Symbol 196 as "__Packages.mvc.AbstractController" |
ExportAssets (56) | Timeline Frame 1 | Symbol 197 as "__Packages.mvc_specific.MVCController" |
ExportAssets (56) | Timeline Frame 1 | Symbol 198 as "__Packages.mvc.AbstractView" |
ExportAssets (56) | Timeline Frame 1 | Symbol 199 as "__Packages.mvc_specific.MVCView" |
ExportAssets (56) | Timeline Frame 5 | Symbol 21 as "mcGameBG" |
ExportAssets (56) | Timeline Frame 5 | Symbol 28 as "mcAudio" |
ExportAssets (56) | Timeline Frame 5 | Symbol 57 as "mcHero" |
ExportAssets (56) | Timeline Frame 5 | Symbol 62 as "samurai" |
ExportAssets (56) | Timeline Frame 5 | Symbol 65 as "bullet" |
ExportAssets (56) | Timeline Frame 5 | Symbol 66 as "tile" |
ExportAssets (56) | Timeline Frame 5 | Symbol 71 as "mcClock" |
ExportAssets (56) | Timeline Frame 5 | Symbol 73 as "mcScore" |
ExportAssets (56) | Timeline Frame 5 | Symbol 79 as "mcFinalScreen" |
EnableDebugger2 (64) | Timeline Frame 1 | 31 bytes "..$1$5Q$A1BT1JIzNnhf7ypOakEqM0." |
DebugMX1 (63) | Timeline Frame 1 |
Labels
"preloader" | Frame 1 |
"title" | Frame 6 |
"game" | Frame 11 |
"reward0" | Frame 17 |
"reward1" | Frame 27 |
"reward2" | Frame 37 |
"reward3" | Frame 47 |
"rest" | Symbol 28 MovieClip [mcAudio] Frame 1 |
"game" | Symbol 28 MovieClip [mcAudio] Frame 7 |
"stopGame" | Symbol 28 MovieClip [mcAudio] Frame 13 |
"title" | Symbol 28 MovieClip [mcAudio] Frame 20 |
"stopTitle" | Symbol 28 MovieClip [mcAudio] Frame 25 |
"yeehaw" | Symbol 28 MovieClip [mcAudio] Frame 32 |
"hehehe" | Symbol 28 MovieClip [mcAudio] Frame 39 |
"scream0" | Symbol 28 MovieClip [mcAudio] Frame 45 |
"scream1" | Symbol 28 MovieClip [mcAudio] Frame 51 |
"scream2" | Symbol 28 MovieClip [mcAudio] Frame 57 |
"scream3" | Symbol 28 MovieClip [mcAudio] Frame 63 |
"scream4" | Symbol 28 MovieClip [mcAudio] Frame 69 |
"shotgun0" | Symbol 28 MovieClip [mcAudio] Frame 75 |
"shotgun1" | Symbol 28 MovieClip [mcAudio] Frame 82 |
"jump" | Symbol 40 MovieClip Frame 1 |
"rest" | Symbol 40 MovieClip Frame 2 |
"die" | Symbol 40 MovieClip Frame 17 |
"white" | Symbol 53 MovieClip Frame 1 |
"yellow" | Symbol 53 MovieClip Frame 2 |
"orange" | Symbol 53 MovieClip Frame 3 |
"green" | Symbol 53 MovieClip Frame 4 |
"brown" | Symbol 53 MovieClip Frame 5 |
"red" | Symbol 53 MovieClip Frame 6 |
"blue" | Symbol 53 MovieClip Frame 7 |
"black" | Symbol 53 MovieClip Frame 8 |
"rest" | Symbol 56 MovieClip Frame 10 |
"U" | Symbol 57 MovieClip [mcHero] Frame 1 |
"D" | Symbol 57 MovieClip [mcHero] Frame 3 |
"L" | Symbol 57 MovieClip [mcHero] Frame 5 |
"R" | Symbol 57 MovieClip [mcHero] Frame 7 |
"rest" | Symbol 61 MovieClip Frame 1 |
"die" | Symbol 61 MovieClip Frame 20 |
"L" | Symbol 62 MovieClip [samurai] Frame 1 |
"R" | Symbol 62 MovieClip [samurai] Frame 4 |
Dynamic Text Variables
time | Symbol 70 EditableText | "0:00" |
score | Symbol 72 EditableText | "0" |
|