Frame 1
function onLoadFinished(e) {
this.gotoAndStop("game");
}
var mastersound = new Sound();
if (nosound == "true") {
mastersound.setVolume(0);
}
this.stop();
_loadingScreen.addEventListener("onLoadFinished", this);
var whosmart = "";
Symbol 26 MovieClip [pizzaTrail] Frame 26
gotoAndPlay (14);
Symbol 27 MovieClip [watermelonLeft] Frame 1
stop();
Symbol 37 MovieClip [collisionLeft] Frame 9
this.stop();
_parent.onMotionFinished();
Symbol 57 MovieClip [kevinSplat] Frame 5
_parent.onMotionFinished();
Symbol 59 MovieClip [eddSplat] Frame 5
_parent.onMotionFinished();
Symbol 61 MovieClip [trayTall] Frame 1
#initclip 72
Object.registerClass("trayTall", com.hitf.tileGameClasses.hudClasses.ProjectileQueue);
#endinitclip
Symbol 71 MovieClip [eddDeath] Frame 31
this.stop();
_parent.onLoseFinished();
Symbol 88 MovieClip [jawbreakerPickedUpRed] Frame 19
this.stop();
_parent.onMotionFinished();
Symbol 92 MovieClip Frame 31
this.stop();
_parent.onMotionFinished();
Symbol 93 MovieClip Frame 1
this.stop();
Symbol 97 MovieClip [LoadingScreen] Frame 1
#initclip 71
Object.registerClass("LoadingScreen", com.hitf.tileGameClasses.LoadingScreen);
#endinitclip
Symbol 2606 MovieClip [__Packages.com.hitf.tileGameClasses.LoadingScreen] Frame 0
class com.hitf.tileGameClasses.LoadingScreen extends MovieClip
{
var _mcLoading, _parent, _mcJawbreaker4, dispatchEvent;
function LoadingScreen () {
super();
init();
}
function init() {
mx.events.EventDispatcher.initialize(this);
var _local2 = 1;
while (_local2 <= 5) {
this["_mcJawbreaker" + _local2]._mcInstance.stop();
_local2++;
}
initTransitions();
_tmgLoadingShow.play();
_tmgLoadingLoop.play();
_tmgJawbreakers.play();
_schedJawbreakers.play();
}
function initTransitions() {
_tmgLoadingShow = new com.hitf.transitions.TweenManager();
_tmgLoadingShow.addTween(0, _mcLoading, "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.2);
_tmgLoadingLoop = new com.hitf.transitions.TweenManager();
_tmgLoadingLoop.addTween(0, _mcLoading, "_xscale", mx.transitions.easing.None.easeNone, 100, 105, 0.1);
_tmgLoadingLoop.addTween(0, _mcLoading, "_yscale", mx.transitions.easing.None.easeNone, 100, 105, 0.1);
_tmgLoadingLoop.addTween(0.1, _mcLoading, "_xscale", mx.transitions.easing.None.easeNone, 105, 95, 0.2);
_tmgLoadingLoop.addTween(0.1, _mcLoading, "_yscale", mx.transitions.easing.None.easeNone, 105, 95, 0.2);
_tmgLoadingLoop.addTween(0.3, _mcLoading, "_xscale", mx.transitions.easing.None.easeNone, 95, 100, 0.2);
_tmgLoadingLoop.addTween(0.3, _mcLoading, "_yscale", mx.transitions.easing.None.easeNone, 95, 100, 0.2);
_tmgLoadingLoop.__set__isLooping(true);
_tmgJawbreakers = new com.hitf.transitions.TweenManager();
_schedJawbreakers = new com.hitf.Schedule();
var _local2 = 1;
while (_local2 <= 5) {
_tmgJawbreakers.addTween(_local2 * 0.4, this["_mcJawbreaker" + _local2], "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.2);
_tmgJawbreakers.addTween(_local2 * 0.4, this["_mcJawbreaker" + _local2], "_xscale", mx.transitions.easing.Regular.easeInOut, 50, this["_mcJawbreaker" + _local2]._xscale, 0.2);
_tmgJawbreakers.addTween(_local2 * 0.4, this["_mcJawbreaker" + _local2], "_yscale", mx.transitions.easing.Regular.easeInOut, 50, this["_mcJawbreaker" + _local2]._yscale, 0.2);
_schedJawbreakers.addCommand(new com.hitf.Command(this["_mcJawbreaker" + _local2]._mcInstance, this["_mcJawbreaker" + _local2]._mcInstance.play, []), _local2 * 0.4);
_local2++;
}
}
function loadStep(i) {
this["_mcJawbreaker" + _numCurrentStep].gotoAndStop("explosion");
_numCurrentStep++;
if (_numCurrentStep == 5) {
onLoadFinished();
}
}
function onEnterFrame() {
_numPercent = Math.round((100 * _parent.getBytesLoaded()) / _parent.getBytesTotal());
_mcLoading._txtLabel.text = ("Loading " + _numPercent) + "%";
if ((_numPercent >= (_numCurrentStep * 25)) && (!_tmgJawbreakers.__get__isPlaying())) {
loadStep(_numCurrentStep);
}
}
function onLoadFinished() {
_mcJawbreaker4.onMotionFinished = mx.utils.Delegate.create(this, onLoadScreenFinished);
_tmgLoadingShow.rewind();
}
function onLoadScreenFinished() {
dispatchEvent({target:this, type:"onLoadFinished"});
}
var _numPercent = 0;
var _numCurrentStep = 0;
var _tmgLoadingShow = null;
var _tmgLoadingLoop = null;
var _tmgJawbreakers = null;
var _schedJawbreakers = null;
}
Symbol 2607 MovieClip [__Packages.com.hitf.transitions.TweenManager] Frame 0
class com.hitf.transitions.TweenManager
{
var _arrayTweens, _numDuration, _numElapsedTime, _twnTimer, _boolIsLooping, broadcastMessage;
function TweenManager () {
init();
}
function init() {
AsBroadcaster.initialize(this);
_arrayTweens = [];
_numDuration = 0;
_numElapsedTime = 0;
_twnTimer = null;
}
function addTween(t, o, p, fu, b, fi, d) {
var _local6 = true;
var _local2 = 0;
while (_local2 < _arrayTweens.length) {
if (_arrayTweens[_local2].obj == o) {
if (_arrayTweens[_local2].arrayProps[p] == null) {
_arrayTweens[_local2].arrayProps[p] = [];
}
_arrayTweens[_local2].arrayProps[p].push({time:t, func:fu, begin:b, finish:fi, duration:d});
_local6 = false;
break;
}
_local2++;
}
if (_local6) {
_arrayTweens.push({obj:o, arrayProps:[]});
_arrayTweens[_arrayTweens.length - 1].arrayProps[p] = [{time:t, func:fu, begin:b, finish:fi, duration:d}];
}
if ((t + d) > _numDuration) {
_numDuration = t + d;
}
return(this);
}
function play() {
if (_twnTimer == null) {
createTimer();
}
_twnTimer.play();
return(this);
}
function playAt(t) {
if (_twnTimer == null) {
createTimer();
}
_twnTimer.playAt(t);
return(this);
}
function pause() {
if (_twnTimer == null) {
createTimer();
}
_twnTimer.pause();
return(this);
}
function pauseAt(t) {
if (_twnTimer == null) {
createTimer();
}
_twnTimer.pauseAt(t);
return(this);
}
function rewind() {
if (_twnTimer == null) {
createTimer();
}
_twnTimer.rewind();
return(this);
}
function rewindAt(t) {
if (_twnTimer == null) {
createTimer();
}
_twnTimer.rewindAt(t);
return(this);
}
function toString() {
var _local2 = "";
for (var _local5 in _arrayTweens) {
_local2 = _local2 + (("obj: " + _arrayTweens[_local5].obj) + newline);
for (var _local4 in _arrayTweens[_local5].arrayProps) {
_local2 = _local2 + ((" prop: " + _local4) + newline);
for (var _local3 in _arrayTweens[_local5].arrayProps[_local4]) {
_local2 = _local2 + (" time: " + _arrayTweens[_local5].arrayProps[_local4][_local3].time);
_local2 = _local2 + (", func: " + _arrayTweens[_local5].arrayProps[_local4][_local3].func);
_local2 = _local2 + (", begin: " + _arrayTweens[_local5].arrayProps[_local4][_local3].begin);
_local2 = _local2 + (", finish: " + _arrayTweens[_local5].arrayProps[_local4][_local3].finish);
_local2 = _local2 + ((", duration: " + _arrayTweens[_local5].arrayProps[_local4][_local3].duration) + newline);
}
}
}
return(_local2);
}
function createTimer() {
_twnTimer = new com.hitf.transitions.Tween(this, "elapsedTime", mx.transitions.easing.None.easeNone, 0, _numDuration, _numDuration);
_twnTimer.__set__isLooping(_boolIsLooping);
_twnTimer.addListener(this);
}
function onMotionFinished() {
broadcastMessage("onMotionFinished", this);
}
function get isLooping() {
return(_boolIsLooping);
}
function set isLooping(l) {
_boolIsLooping = l;
if (_twnTimer != null) {
_twnTimer.__set__isLooping(l);
}
//return(isLooping);
}
function get duration() {
return(_numDuration);
}
function get isPlaying() {
if (_twnTimer != null) {
return(_twnTimer.__get__isPlaying());
}
return(false);
}
function get isPaused() {
if (_twnTimer != null) {
return(_twnTimer.__get__isPaused());
}
return(true);
}
function get isRewinding() {
if (_twnTimer != null) {
return(_twnTimer.__get__isPaused());
}
return(false);
}
function get elapsedTime() {
return(_numElapsedTime);
}
function set elapsedTime(t) {
_numElapsedTime = t;
for (var _local13 in _arrayTweens) {
for (var _local12 in _arrayTweens[_local13].arrayProps) {
var _local5 = Infinity;
for (var _local11 in _arrayTweens[_local13].arrayProps[_local12]) {
var _local2 = _arrayTweens[_local13].arrayProps[_local12][_local11].time;
var _local8 = _arrayTweens[_local13].obj;
var _local6 = _local12;
var _local10 = _arrayTweens[_local13].arrayProps[_local12][_local11].func;
var _local7 = _arrayTweens[_local13].arrayProps[_local12][_local11].begin;
var _local9 = _arrayTweens[_local13].arrayProps[_local12][_local11].finish;
var _local4 = _arrayTweens[_local13].arrayProps[_local12][_local11].duration;
if (((t - _local2) >= 0) && ((t - _local2) <= _local4)) {
_local8[_local6] = _local10(t - _local2, _local7, _local9 - _local7, _local4);
break;
}
if (((t - _local2) < 0) && ((_local2 - t) < _local5)) {
_local8[_local6] = _local7;
_local5 = _local2 - t;
} else if (((t - _local2) > _local4) && (((t - _local2) - _local4) < _local5)) {
_local8[_local6] = _local9;
_local5 = (t - _local2) - _local4;
}
}
}
}
//return(elapsedTime);
}
}
Symbol 2608 MovieClip [__Packages.com.hitf.transitions.Tween] Frame 0
class com.hitf.transitions.Tween
{
var addListener, _objTarget, _strProp, _funMethod, _numBegin, _numFinish, _numDuration, _numStartTime, _numPrevTime, _boolIsLooping, _boolIsPlaying, _boolIsPaused, _boolIsRewinding, _numElapsedTime, broadcastMessage;
function Tween (o, p, fu, b, fi, d) {
init(o, p, fu, b, fi, d);
}
function init(o, p, fu, b, fi, d) {
AsBroadcaster.initialize(this);
addListener(this);
mx.transitions.OnEnterFrameBeacon.init();
_objTarget = o;
_strProp = p;
_funMethod = fu;
_numBegin = b;
_numFinish = fi;
_numDuration = d;
_numStartTime = null;
_numPrevTime = 0;
_boolIsLooping = false;
_boolIsPlaying = false;
_boolIsPaused = true;
_boolIsRewinding = false;
_numElapsedTime = 0;
}
function play() {
_boolIsPlaying = true;
_boolIsRewinding = false;
_boolIsPaused = false;
fixTime();
update();
if (_boolIsPlaying) {
startTimer();
}
return(this);
}
function playAt(t) {
_numElapsedTime = t;
play();
return(this);
}
function pause() {
_boolIsPlaying = false;
_boolIsRewinding = false;
_boolIsPaused = true;
fixTime();
update();
stopTimer();
return(this);
}
function pauseAt(t) {
_numElapsedTime = t;
pause();
return(this);
}
function rewind() {
_boolIsPlaying = false;
_boolIsRewinding = true;
_boolIsPaused = false;
fixTime();
update();
if (_boolIsRewinding) {
startTimer();
}
return(this);
}
function rewindAt(t) {
_numElapsedTime = t;
rewind();
return(this);
}
function onEnterFrame() {
update();
}
function getPropertyValue(e) {
return(_funMethod(e, _numBegin, _numFinish - _numBegin, _numDuration));
}
function update() {
if (targetExists()) {
updateElapsedTime();
updatePropertyValue();
if (!_boolIsLooping) {
if ((_boolIsPlaying && (_numElapsedTime == _numDuration)) || (_boolIsRewinding && (_numElapsedTime == 0))) {
_boolIsPlaying = false;
_boolIsPaused = true;
_boolIsRewinding = false;
stopTimer();
broadcastMessage("onMotionFinished", this);
}
}
} else {
stopTimer();
}
}
function targetExists() {
return(_objTarget[_strProp] != null);
}
function updateElapsedTime() {
if (_boolIsPlaying) {
_numElapsedTime = (_numPrevTime + (getTimer() / 1000)) - _numStartTime;
} else if (_boolIsRewinding) {
_numElapsedTime = (_numPrevTime - (getTimer() / 1000)) + _numStartTime;
}
if ((_numElapsedTime <= 0) || (_numElapsedTime >= _numDuration)) {
fixTime();
}
}
function updatePropertyValue() {
_objTarget[_strProp] = getPropertyValue(_numElapsedTime);
updateAfterEvent();
}
function fixTime() {
if (_numElapsedTime >= _numDuration) {
if (_boolIsLooping) {
_numElapsedTime = _numElapsedTime % _numDuration;
} else {
_numElapsedTime = _numDuration;
}
} else if (_numElapsedTime <= 0) {
if (_boolIsLooping) {
_numElapsedTime = _numDuration - (_numElapsedTime % _numDuration);
} else {
_numElapsedTime = 0;
}
}
_numPrevTime = _numElapsedTime;
_numStartTime = getTimer() / 1000;
}
function startTimer() {
_global.MovieClip.addListener(this);
}
function stopTimer() {
_global.MovieClip.removeListener(this);
}
function get duration() {
return(_numDuration);
}
function get isLooping() {
return(_boolIsLooping);
}
function set isLooping(l) {
_boolIsLooping = l;
//return(isLooping);
}
function get isPlaying() {
return(_boolIsPlaying);
}
function get isPaused() {
return(_boolIsPaused);
}
function get isRewinding() {
return(_boolIsRewinding);
}
function get elapsedTime() {
return(_numElapsedTime);
}
}
Symbol 2609 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 2610 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 2611 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 2612 MovieClip [__Packages.com.hitf.Schedule] Frame 0
class com.hitf.Schedule
{
var dispatchEvent;
function Schedule () {
init();
}
function addCommand(c, t) {
_arrayCommands.push({command:c, time:t});
if (t > _numDuration) {
_numDuration = t;
}
return(this);
}
function play() {
if (_twnTimer == null) {
createTimer();
}
_twnTimer.play();
return(this);
}
function init() {
mx.events.EventDispatcher.initialize(this);
_arrayCommands = [];
}
function createTimer() {
_twnTimer = new com.hitf.transitions.Tween(this, "elapsedTime", mx.transitions.easing.None.easeNone, 0, _numDuration, _numDuration);
_twnTimer.addListener(this);
}
function onMotionFinished() {
dispatchEvent({target:this, type:"onScheduleFinished"});
}
function get elapsedTime() {
return(_numElapsedTime);
}
function set elapsedTime(e) {
_numLastTime = _numElapsedTime;
_numElapsedTime = e;
for (var _local2 in _arrayCommands) {
if ((_numLastTime < _arrayCommands[_local2].time) && (_numElapsedTime >= _arrayCommands[_local2].time)) {
_arrayCommands[_local2].command.execute();
}
}
//return(elapsedTime);
}
var _arrayCommands = null;
var _numDuration = 0;
var _numElapsedTime = 0;
var _numLastTime = -1;
var _twnTimer = null;
}
Symbol 2613 MovieClip [__Packages.com.hitf.Command] Frame 0
class com.hitf.Command
{
function Command (o, m, p) {
init(o, m, p);
}
function execute() {
method.apply(object, parameters);
}
function init(o, m, p) {
object = (o);
method = (m);
parameters = (p);
}
function get object() {
return(_objObject);
}
function set object(o) {
_objObject = o;
//return(object);
}
function get method() {
return(_funMethod);
}
function set method(m) {
_funMethod = m;
//return(method);
}
function get parameters() {
return(_arrayParameters);
}
function set parameters(p) {
_arrayParameters = p;
//return(parameters);
}
var _objObject = null;
var _funMethod = null;
var _arrayParameters = null;
}
Symbol 2614 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
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 _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.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 _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 2615 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}
Symbol 2616 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 2617 MovieClip [__Packages.com.hitf.tileGameClasses.hudClasses.ProjectileQueue] Frame 0
class com.hitf.tileGameClasses.hudClasses.ProjectileQueue extends MovieClip
{
var _subtray, _ary_tweens, attachMovie;
function ProjectileQueue () {
super();
init();
}
function set amHud(b) {
_amHud = b;
//return(amHud);
}
function get amHud() {
return(_amHud);
}
function init() {
positions = ([{_x:-8, _y:-1}, {_x:1, _y:-1}, {_x:6, _y:-1}, {_x:-6, _y:-7}, {_x:-1, _y:-7}, {_x:6, _y:-7}]);
_arrayProjectiles = [];
queue = ([]);
_subtray = false;
_ary_tweens = new Array();
}
function set subtray(b) {
_subtray = b;
//return(subtray);
}
function get subtray() {
return(_subtray);
}
function set sillho(b) {
_sillho = b;
_ary_tweens = new Array();
arrange();
//return(sillho);
}
function get sillho() {
return(_sillho);
}
function arrange() {
if (((character.__get__type() == "userCharacter") && (_amHud)) && (character.__get__refilling())) {
var _local3 = queue.length;
if (_arrayProjectiles.length != queue.length) {
if (queue.length <= 1) {
while (_arrayProjectiles.length > 0) {
_arrayProjectiles.pop().removeMovieClip();
}
}
if (queue.length > 0) {
var _local2 = queue.length - 1;
_arrayProjectiles.push(attachMovie(queue[_local2], "_mcProjectile" + _local2, _local2 + 10, positions[_local2]));
trace(_arrayProjectiles[_local2] + " return value");
_arrayProjectiles[_local2]._xscale = (_arrayProjectiles[_local2]._yscale = 1);
_arrayProjectiles[_local2].gotoAndStop("static");
_arrayProjectiles[_local2]._alpha = 50;
_arrayColors[_local2] = new Color(_arrayProjectiles[_local2]);
_arrayColors[_local2].setRGB(0);
_ary_tweens[_local2] = new mx.transitions.Tween(_arrayProjectiles[_local2], "_xscale", mx.transitions.easing.Bounce.easeIn, 1, projectileScale, 0.2, true);
_ary_tweens[_local2] = new mx.transitions.Tween(_arrayProjectiles[_local2], "_yscale", mx.transitions.easing.Bounce.easeIn, 1, projectileScale, 0.2, true);
}
}
} else {
var _local3 = queue.length;
while (_arrayProjectiles.length > 0) {
_arrayProjectiles.pop().removeMovieClip();
}
var _local2 = 0;
while (_local2 < _local3) {
_arrayProjectiles.push(attachMovie(queue[_local2], "_mcProjectile" + _local2, _local2 + 10, positions[_local2]));
_arrayProjectiles[_local2]._xscale = (_arrayProjectiles[_local2]._yscale = projectileScale);
_arrayProjectiles[_local2].gotoAndStop(projectileState);
_local2++;
}
}
}
function reshow(c) {
trace("RESHOW");
queue = (c.__get__model().projectileQueue);
var _local3 = queue.length;
while (_arrayProjectiles.length > 0) {
trace("WHILE: " + _arrayProjectiles.length);
_arrayProjectiles.pop().removeMovieClip();
}
var _local2 = 0;
while (_local2 < _local3) {
trace("ADDING: " + _local2);
_arrayProjectiles.push(attachMovie(queue[_local2], "_mcProjectile" + _local2, _local2 + 10, positions[_local2]));
_arrayProjectiles[_local2]._xscale = (_arrayProjectiles[_local2]._yscale = projectileScale);
_arrayProjectiles[_local2].gotoAndStop(projectileState);
_local2++;
}
}
function onHideProjectile(e) {
_arrayProjectiles[_arrayProjectiles.length - 1]._visible = false;
}
function onProjectileQueueChange(e) {
queue = (character.__get__model().projectileQueue);
sillho = (character.refilling);
}
function onRefill(e) {
sillho = (e.sillho);
}
function get character() {
return(_character);
}
function set character(c) {
_character = c;
queue = (c.__get__model().projectileQueue);
c.__get__model().addEventListener("onProjectileQueueChange", this);
c.__get__view().addEventListener("onHideProjectile", this);
c.addEventListener("onRefill", this);
//return(character);
}
function get positions() {
return(_arrayPositions);
}
function set positions(p) {
_arrayPositions = p;
arrange();
//return(positions);
}
function get projectileScale() {
return(_numProjectileScale);
}
function set projectileScale(s) {
_numProjectileScale = s;
arrange();
//return(projectileScale);
}
function get projectileState() {
return(_strProjectileState);
}
function set projectileState(s) {
_strProjectileState = s;
arrange();
//return(projectileState);
}
function get queue() {
return(_arrayQueue);
}
function set queue(q) {
_arrayQueue = q;
arrange();
//return(queue);
}
var _character = null;
var _arrayPositions = null;
var _arrayProjectiles = null;
var _numProjectileScale = 75;
var _strProjectileState = "static";
var _arrayQueue = null;
var _arrayTweens = new Array();
var _arrayColors = new Array();
var _sillho = false;
var _amHud = false;
}
Symbol 2618 MovieClip [__Packages.com.hitf.tileGameClasses.Character] Frame 0
class com.hitf.tileGameClasses.Character
{
var _loseIntID, _inplay, _lastHitTime, _hitTimeDiff, _invID, _refilling, dispatchEvent, _view, _model, _sfx_ching, _offscreenDeath, _throwDirection, _map, addEventListener;
function Character (t, l, n, d, i) {
init(t, l, n, d, i);
_loseIntID = null;
_inplay = true;
_lastHitTime = 0;
_hitTimeDiff = 9999;
_invID = null;
_refilling = false;
}
function clearEvents() {
clearInterval(_loseIntID);
MovieClip.removeListener(this);
MovieClip.removeListener(model);
}
function collision(m) {
if ((m.type == "aiCharacter") || (m.type == "userCharacter")) {
return(true);
}
if ((m.type == "projectileStatic") && (type == "userCharacter")) {
dispatchEvent({target:this, type:"onRefill", sillho:false});
_view.onTrayLoad();
_refilling = false;
if (_model.__get__projectileQueue().length < _model.projmax()) {
_sfx_ching.start(0, 1);
model.addProjectile(m.model.libraryID);
}
} else if (m.type == "projectileMotion") {
if (m.character != this) {
if (((model.__get__health() > 0) && (model.__get__state() != "defending")) && (model.__get__state() != "lose")) {
if (_invID == null) {
_hitTimeDiff = getTimer() - _lastHitTime;
_lastHitTime = getTimer();
m.character.model.projectileHits++;
model.__set__state("collision");
if (type == "userCharacter") {
model.health = model.health - Math.floor(0.75 * (((20 * m.character.model.strength) / 100) - (model.__get__strength() / 20)));
} else {
model.health = model.health - Math.floor(((20 * m.character.model.strength) / 100) - (model.__get__strength() / 20));
}
if (model.__get__health() <= 0) {
m.character.model.eliminations++;
}
} else {
trace("INVULNERABLE");
}
return(true);
}
}
} else {
if (m.type == "mapItem") {
return(true);
}
if (m.type == "health") {
trace("HEALTH COLLISION");
if (model.__get__health() < 100) {
m.type = "specialMove";
if (m.collision(this)) {
healthPickup(m);
}
randomBonus(m);
}
return(false);
}
if (m.type == "specialMove") {
trace("SPECIAL MOVE COLLISION");
if (model.__get__specialMoves() < com.hitf.tileGameClasses.characterClasses.CharacterModel.MAX_SPECIAL_MOVES) {
m.type = "health";
if (m.collision(this)) {
specialMovePickup();
}
randomBonus(m);
}
return(false);
}
}
return(false);
}
function randomBonus(m) {
}
function specialMoveCollision() {
if (model.__get__state() != "defending") {
model.__set__state("specialMoveCollision");
model.health = model.health - ((20 * (100 - model.__get__strength())) / 100);
}
}
function defend() {
model.__set__state("defending");
}
function healthPickup(m) {
model.__set__health(100);
model.__set__healthPickups((model.__get__healthPickups()+1));
}
function specialMovePickup(m) {
if (model.__get__specialMoves() < com.hitf.tileGameClasses.characterClasses.CharacterModel.MAX_SPECIAL_MOVES) {
model.__set__specialMoves((model.__get__specialMoves()+1));
model.__set__specialMovePickups((model.__get__specialMovePickups()+1));
}
}
function clearInv() {
clearInterval(_invID);
_invID = null;
}
function specialMove() {
if (model.__get__specialMoves() > 0) {
_invID = setInterval(this, "clearInv", 7000);
model.__set__state("specialMove");
}
}
function throwProjectile() {
var _local2 = model.__get__state();
if ((_local2.indexOf("standing") != -1) || (_local2.indexOf("walking") != -1)) {
if (model.__get__visible()) {
model.__set__state(model.__get__state() + "Throw");
} else {
onProjectile();
}
model.__set__projectileAttempts((model.__get__projectileAttempts()+1));
}
}
function walk(a) {
if (model.__get__state() != "win") {
var _local2 = com.hitf.VectorUtils.stringToVector(a);
if (!Key.isDown(32)) {
model.__set__direction(_local2);
}
if ((((model.__get__state() != "collision") && (model.__get__state() != "defending")) && (model.__get__state() != "specialMove")) && (model.__get__state() != "lose")) {
model.__set__velocity(_local2.returnScalar(model.__get__maxSpeed()));
}
}
}
function win() {
model.__set__state("win");
}
function lose() {
model.__set__state("lose");
_offscreenDeath = setInterval(this, "offscreenLose", 2000);
}
function init(t, l, n, d, i) {
mx.events.EventDispatcher.initialize(this);
model = (new com.hitf.tileGameClasses.characterClasses.CharacterModel());
view = (new com.hitf.tileGameClasses.characterClasses.CharacterView());
model.__set__view(view);
view.__set__model(model);
view.__set__character(this);
model.addEventListener("onDepthChange", view);
model.addEventListener("onHealthChange", this);
model.addEventListener("onPositionChange", view);
model.addEventListener("onPositionChange", this);
model.addEventListener("onRemoveMapItem", this);
model.addEventListener("onSpecialMovesChange", this);
model.addEventListener("onStateChange", view);
model.addEventListener("onVisibleChange", view);
view.addEventListener("onProjectile", this);
view.addEventListener("onSpecialMove", this);
view.addEventListener("onWinFinished", this);
view.addEventListener("onLoseFinished", this);
model.__set__stateManager(new com.hitf.tileGameClasses.characterClasses.CharacterStateManager());
model.__set__target(t);
model.__set__libraryID(l);
model.__set__name(n);
model.__set__depth(d);
model.__set__bioImageLibraryID(i.bioImageLibraryID);
model.__set__halfwidthX(i.halfwidthX);
model.__set__halfwidthY(i.halfwidthY);
model.__set__id(i.id);
model.__set__label(i.label);
model.__set__moveable(i.moveable);
model.__set__position(new com.wis.math.alg.Vector(i.x, i.y));
model.__set__rgbFill(i.rgbFill);
model.__set__rgbHighlight(i.rgbHighlight);
model.__set__maxSpeed(i.speed);
model.__set__strength(i.strength);
model.__set__range(i.range);
model.__set__viewable(i.viewable);
model.__set__walkable(i.walkable);
model.__set__parent(this);
_sfx_ching = new Sound(_parent);
_sfx_ching.attachSound("sfx_pickupfood");
_throwDirection = new com.wis.math.alg.Vector(1, 0);
_offscreenDeath = null;
}
function onHealthChange(e) {
e.target = this;
dispatchEvent(e);
}
function onPositionChange(e) {
e.target = this;
dispatchEvent(e);
}
function onProjectile(e) {
var _local2 = model.removeProjectile();
if (_local2 != "") {
e.target = this;
e.libraryID = _local2;
dispatchEvent(e);
}
}
function onSpecialMove(e) {
model.__set__specialMoves((model.__get__specialMoves()-1));
e.target = this;
dispatchEvent(e);
}
function onRemoveMapItem(e) {
e.target = this;
dispatchEvent(e);
}
function onSpecialMovesChange(e) {
e.target = this;
dispatchEvent(e);
}
function onWinFinished(e) {
e.target = this;
dispatchEvent(e);
}
function offscreenLose() {
trace("AN OFFSCREEN DEATH");
if (_offscreenDeath != null) {
clearInterval(_offscreenDeath);
}
dispatchEvent({target:this, type:"onLoseFinished"});
}
function onLoseFinished(e) {
if (_offscreenDeath != null) {
clearInterval(_offscreenDeath);
}
e.target = this;
dispatchEvent(e);
}
function get map() {
return(_map);
}
function set map(m) {
_map = m;
addEventListener("onHealthChange", m);
addEventListener("onPositionChange", m);
addEventListener("onProjectile", m);
addEventListener("onRemoveMapItem", m);
addEventListener("onSpecialMove", m);
addEventListener("onWinFinished", m);
addEventListener("onLoseFinished", m);
//return(map);
}
function get model() {
return(_model);
}
function set model(m) {
_model = m;
//return(model);
}
function get type() {
return(_strType);
}
function set type(t) {
_strType = t;
//return(type);
}
function get view() {
return(_view);
}
function set view(v) {
_view = v;
//return(view);
}
function set throwDirection(v) {
_throwDirection = v;
//return(throwDirection);
}
function get throwDirection() {
return(_throwDirection);
}
function set inplay(b) {
_inplay = b;
dispatchEvent({target:this, type:"onInPlayChange", id:model.__get__libraryID(), inplay:b});
//return(inplay);
}
function get inplay() {
return(_inplay);
}
function get refilling() {
return(_refilling);
}
function set refilling(b) {
_refilling = b;
//return(refilling);
}
var _strType = "character";
}
Symbol 2619 MovieClip [__Packages.com.hitf.tileGameClasses.Map] Frame 0
class com.hitf.tileGameClasses.Map
{
var _view, addEventListener, dispatchEvent, _model;
function Map (t, l, n, d, i) {
init(t, l, n, d, i);
}
function init(t, l, n, d, i) {
mx.events.EventDispatcher.initialize(this);
model = (new com.hitf.tileGameClasses.mapClasses.MapModel(i.width, i.height, i.screenWidth, i.screenHeight, i.tileWidth, i.tileHeight));
view = (com.hitf.tileGameClasses.mapClasses.MapView(t.attachMovie(l, n, d)));
model.__set__view(_view);
view.__set__model(model);
view.__set__map(this);
addEventListener("onPositionChange", model);
addEventListener("onProjectile", model);
addEventListener("onAddMapItem", model);
addEventListener("onRemoveMapItem", model);
addEventListener("onSpecialMove", model);
addEventListener("onStateChange", model);
addEventListener("onWinFinished", model);
addEventListener("onLoseFinished", model);
model.addEventListener("onLose", this);
model.addEventListener("onWin", this);
model.addEventListener("onUltimateWin", this);
model.addEventListener("onOriginXChange", view);
model.addEventListener("onOriginYChange", view);
}
function onLose(e) {
dispatchEvent(e);
}
function onWin(e) {
dispatchEvent(e);
}
function onUltimateWin(e) {
dispatchEvent(e);
}
function onPositionChange(e) {
dispatchEvent(e);
}
function onProjectile(e) {
dispatchEvent(e);
}
function onAddMapItem(e) {
dispatchEvent(e);
}
function onRemoveMapItem(e) {
dispatchEvent(e);
}
function onStateChange(e) {
dispatchEvent(e);
}
function onSpecialMove(e) {
dispatchEvent(e);
}
function onWinFinished(e) {
dispatchEvent(e);
}
function onLoseFinished(e) {
dispatchEvent(e);
}
function get model() {
return(_model);
}
function set model(m) {
_model = m;
//return(model);
}
function get view() {
return(_view);
}
function set view(v) {
_view = v;
//return(view);
}
}
Symbol 2620 MovieClip [__Packages.com.hitf.tileGameClasses.mapClasses.MapModel] Frame 0
class com.hitf.tileGameClasses.mapClasses.MapModel
{
var _aiData, _mapViewManager, dispatchEvent, intPlaceID;
function MapModel (w, h, sw, sh, tw, th) {
init(w, h, sw, sh, tw, th);
}
function init(w, h, sw, sh, tw, th) {
mx.events.EventDispatcher.initialize(this);
mx.transitions.OnEnterFrameBeacon.init();
MovieClip.addListener(this);
Key.addListener(this);
_aiData = new Object();
_numWidth = w;
_numHeight = h;
_numScreenWidth = sw;
_numScreenHeight = sh;
_numTileWidth = tw;
_numTileHeight = th;
characters = ([]);
health = ([]);
mapItems = ([]);
specialMoves = ([]);
_arrayAABBTiles = [];
var _local5 = Math.ceil(width / tileWidth);
var _local4 = Math.ceil(height / tileHeight);
var _local3 = 0;
while (_local3 < _local5) {
_arrayAABBTiles[_local3] = [];
var _local2 = 0;
while (_local2 < _local4) {
_arrayAABBTiles[_local3][_local2] = [];
_local2++;
}
_local3++;
}
_mapViewManager = new com.hitf.tileGameClasses.mapClasses.MapViewManager(this);
}
function initMapItems() {
ary_aic = new Array();
_numInitMapItemsID = setInterval(this, "initNextMapItems", 200);
}
function initNextMapItems() {
var _local3 = _numMapItemIndex;
var _local4 = _numMapItemIndex + 10;
while (_local3 < _local4) {
var _local2 = mapItemModel[_numMapItemIndex];
if ((_local2.type == "character") && (_local2.libraryID != userCharacterID)) {
ary_aic.push(mapItemModel[_numMapItemIndex]);
addMapItem(mapItemModel[_numMapItemIndex]);
} else {
addMapItem(mapItemModel[_numMapItemIndex]);
}
_numMapItemIndex++;
if (_numMapItemIndex == mapItemModel.length) {
onInitMapItemsFinished();
break;
}
_local3++;
}
}
function initCharacterDistances() {
_objCharacterIDToIndex = {};
_arrayCharacterDistances = [];
var _local5 = characters;
var _local4 = characters.length;
var _local3 = 0;
while (_local3 < _local4) {
_objCharacterIDToIndex[_local5[_local3].model.id] = _local3;
_arrayCharacterDistances[_local3] = [];
var _local2 = 0;
while (_local2 < _local4) {
_arrayCharacterDistances[_local3][_local2] = distanceBetweenCharacters(_local3, _local2);
_local2++;
}
_local3++;
}
}
function updateCharacterDistances(c) {
var _local3 = _objCharacterIDToIndex[c.__get__model().__get__id()];
var _local4 = _arrayCharacterDistances.length;
var _local2 = 0;
while (_local2 < _local4) {
_arrayCharacterDistances[_local3][_local2] = (_arrayCharacterDistances[_local2][_local3] = distanceBetweenCharacters(_local3, _local2));
_local2++;
}
}
function distanceBetweenCharacters(a, b) {
var _local2 = characters;
return(_local2[a].model.position.returnSubtraction(_local2[b].model.position).norm());
}
function addMapItem(m) {
if (m.type == "character") {
m.halfwidthY = 16;
if (m.libraryID == userCharacterID) {
m.type = "userCharacter";
} else {
m.type = "aiCharacter";
}
}
if (m.libraryID.indexOf("jawbreaker") != -1) {
var _local5 = Math.floor(Math.random() * 100);
if (_local5 < Math.floor((100 * _numSM) / _numJB)) {
m.type = "health";
m.libraryID = "jawbreaker";
} else {
m.type = "specialMove";
m.libraryID = "jawbreakerRed";
_numSM++;
}
_numJB++;
}
var _local4 = positionToDepth(m.x, m.y, m.z);
if (m.libraryID.indexOf("uffet") != -1) {
trace("BUFFET TABLE");
_local4 = positionToDepth(m.x, m.y - m.halfwidthY, m.z);
}
var _local3 = view.addMapItem(m, _local4);
addMapItemToTiles(_local3);
if (_local3.type == "aiCharacter") {
characters.push(_local3);
} else if (_local3.type == "userCharacter") {
if ((_strCheat == "spotless") || (_strCheat == "invincibilityAndUnlimitedProjectiles")) {
_local3.model.strength = 100;
}
if ((_strCheat == "buffet") || (_strCheat == "invincibilityAndUnlimitedProjectiles")) {
_local3.model.projectileFillDelay = 0;
}
characters.push(_local3);
userCharacter = (com.hitf.tileGameClasses.UserCharacter(_local3));
_local3.model.lastPoints = _numLastPoints;
} else {
mapItems.push(_local3);
}
dispatchEvent({target:this, type:"onAddMapItem", mapItem:_local3});
}
function addMapItemToTiles(m) {
if (!m.model.walkable) {
m.model.aabbTiles = mapItemToTiles(m, false);
addMapItemToAABBTiles(m);
}
}
function addMapItemToAABBTiles(m) {
var _local2 = m.model.aabbTiles;
for (var _local4 in _local2) {
_arrayAABBTiles[_local2[_local4].column][_local2[_local4].row].push(m);
}
}
function removeMapItem(mi) {
mi.model.visible = false;
removeMapItemFromTiles(mi);
mi.clearEvents();
if (mi.model.libraryID.indexOf("jawbreaker") != -1) {
mi.clearIt();
}
dispatchEvent({target:this, type:"onRemoveMapItem", mapItem:mi});
}
function removeAllMapItems() {
var _local3 = mapItems;
for (var _local4 in _local3) {
removeMapItem(_local3[_local4]);
}
var _local2 = characters;
for (var _local4 in _local2) {
removeMapItem(_local2[_local4]);
}
}
function lastCharacter() {
var _local2 = characters;
var _local3 = true;
for (var _local4 in _local2) {
if ((_local2[_local4].model.health > 0) && (_local2[_local4].type == "aiCharacter")) {
_local3 = false;
break;
}
}
return(_local3);
}
function removeMapItemFromTiles(m) {
if (!m.model.walkable) {
var _local2 = m.model.aabbTiles;
for (var _local4 in _local2) {
removeMapItemFromTile(m, _arrayAABBTiles, _local2[_local4]);
}
}
}
function removeMapItemFromTile(m, a, t) {
var _local3 = [];
for (var _local5 in a[t.column][t.row]) {
if (a[t.column][t.row][_local5] != m) {
_local3.push(a[t.column][t.row][_local5]);
}
}
a[t.column][t.row] = _local3;
}
function mapItemToTiles(m, v) {
var _local2 = [];
var _local9 = m.model.x;
var _local8 = m.model.y;
var _local16 = m.model.z;
if (!v) {
var _local11 = m.model.halfwidthX;
var _local17 = m.model.halfwidthY;
var _local14 = _local9 - _local11;
var _local12 = _local9 + _local11;
var _local15 = _local8 - _local17;
var _local13 = _local8 + _local17;
} else {
var _local4 = m.model.bounds;
var _local14 = _local9 + _local4.xMin;
var _local12 = _local9 + _local4.xMax;
var _local15 = (_local8 - _local16) + _local4.yMin;
var _local13 = (_local8 - _local16) + _local4.yMax;
}
var _local10 = tileAt(_local14, _local15);
var _local6 = tileAt(_local12, _local15);
var _local7 = tileAt(_local12, _local13);
var _local3 = tileAt(_local14, _local13);
_local2.push(_local10);
if (!equalTiles(_local6, _local10)) {
_local2.push(_local6);
}
if ((!equalTiles(_local7, _local6)) && (!equalTiles(_local7, _local10))) {
_local2.push(_local7);
}
if (((!equalTiles(_local3, _local7)) && (!equalTiles(_local3, _local6))) && (!equalTiles(_local3, _local10))) {
_local2.push(_local3);
}
return(_local2);
}
function borderCollide(m) {
if (m.model.x < m.model.halfwidthX) {
m.model.position.x = m.model.halfwidthX;
m.model.velocity = new com.wis.math.alg.Vector(0, 0);
} else if (m.model.x > (width - m.model.halfwidthX)) {
m.model.position.x = width - m.model.halfwidthX;
m.model.velocity = new com.wis.math.alg.Vector(0, 0);
}
if (m.model.y < m.model.halfwidthY) {
m.model.position.y = m.model.halfwidthY;
m.model.velocity = new com.wis.math.alg.Vector(0, 0);
} else if (m.model.y > (height - m.model.halfwidthY)) {
m.model.position.y = height - m.model.halfwidthY;
m.model.velocity = new com.wis.math.alg.Vector(0, 0);
}
}
function broadPhaseCollide(m) {
var _local7 = [];
var _local5 = [];
var _local6 = m.model.aabbTiles;
var _local4 = null;
var _local3 = null;
var _local2 = null;
_local5[m.model.depth] = true;
for (var _local9 in _local6) {
_local4 = _arrayAABBTiles[_local6[_local9].column][_local6[_local9].row];
for (var _local8 in _local4) {
_local3 = _local4[_local8];
_local2 = _local3.model.depth;
if (!_local5[_local2]) {
_local7.push(_local3);
_local5[_local2] = true;
}
}
}
return(_local7);
}
function narrowPhaseCollide(collider, targets) {
for (var _local12 in targets) {
var _local6 = collider.model.position;
var _local11 = collider.model.lastPosition;
var _local5 = collider.model.halfwidthX;
var _local9 = collider.model.halfwidthY;
var _local7 = targets[_local12].model.position;
var _local10 = targets[_local12].model.halfwidthX;
var _local8 = targets[_local12].model.halfwidthY;
var _local4 = collision(_local6, _local5, _local9, _local7, _local10, _local8);
if (_local4) {
if (((collider.type.indexOf("Character") != -1) && (targets[_local12].type.indexOf("Character") != -1)) && ((targets[_local12].model.state == "lose") || (collider.model.state == "lose"))) {
trace("RAN INTO A DEAD MAN THE OTHER DAY.");
} else if (collider.collision(targets[_local12])) {
if (targets[_local12].model.moveable) {
targets[_local12].model.position = targets[_local12].model.position.returnSubtraction(new com.wis.math.alg.Vector(_local4.penetrationX, _local4.penetrationY));
} else {
collider.model.fixPosition(resolveCollision(_local6, _local11, _local5, _local9, _local7, _local10, _local8));
}
}
}
}
}
function collision(p1, hx1, hy1, p2, hx2, hy2) {
var _local4 = p1.x - p2.x;
var _local3 = p1.y - p2.y;
var _local2 = (hx1 + hx2) - Math.abs(_local4);
var _local1 = (hy1 + hy2) - Math.abs(_local3);
if ((_local2 > 0) && (_local1 > 0)) {
if (_local2 < _local1) {
if (_local4 < 0) {
_local2 = _local2 * -1;
}
_local1 = 0;
} else {
_local2 = 0;
if (_local3 < 0) {
_local1 = _local1 * -1;
}
}
return({penetrationX:_local2, penetrationY:_local1});
}
return(false);
}
function resolveCollision(p1Upper, p1Lower, hx1, hy1, p2, hx2, hy2) {
if (p1Upper.returnSubtraction(p1Lower).norm() < 1) {
return(p1Lower);
}
var _local2 = p1Upper.returnAddition(p1Lower).returnDivide(2);
if (collision(_local2, hx1, hy1, p2, hx2, hy2)) {
return(resolveCollision(_local2, p1Lower, hx1, hy1, p2, hx2, hy2));
}
return(resolveCollision(p1Upper, _local2, hx1, hy1, p2, hx2, hy2));
}
function pan(c) {
var _local7 = c.model.x;
var _local6 = c.model.y;
var _local10 = c.model.originXMin;
var _local8 = c.model.originXMax;
var _local11 = c.model.originYMin;
var _local9 = c.model.originYMax;
var _local5 = c.model.direction;
var _local3 = ((_local8 + _local10) / 2) - _local7;
var _local2 = ((_local9 + _local11) / 2) - _local6;
if (_local5.x < 0) {
_local3 = _local8 - _local7;
} else if (_local5.x > 0) {
_local3 = _local10 - _local7;
}
if (_local5.y < 0) {
_local2 = _local9 - _local6;
} else if (_local5.y > 0) {
_local2 = _local11 - _local6;
}
if (_local3 > 0) {
_local3 = 0;
} else if (_local3 < (screenWidth - width)) {
_local3 = screenWidth - width;
}
if (_local2 > 0) {
_local2 = 0;
} else if (_local2 < (screenHeight - height)) {
_local2 = screenHeight - height;
}
originXTarget = (_local3);
originYTarget = (_local2);
}
function equalTiles(t1, t2) {
return((t1.column == t2.column) && (t1.row == t2.row));
}
function positionToDepth(x, y, z) {
return(((y + z) * width) + x);
}
function tileAt(x, y) {
return({column:Math.floor(x / tileWidth), row:Math.floor(y / tileHeight)});
}
function onPositionChange(e) {
var _local3 = e.target;
removeMapItemFromTiles(_local3);
if (_local3.type == "projectileMotion") {
var _local2 = 0;
while (_local2 < characters.length) {
if (characters[_local2].model.health > 0) {
var _local5 = characters[_local2].model.position.x - _local3.model.position.x;
var _local4 = characters[_local2].model.position.y - _local3.model.position.y;
var _local6 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
if (_local6 < 65) {
_local3.collision(characters[_local2]);
break;
}
}
_local2++;
}
}
borderCollide(_local3);
narrowPhaseCollide(_local3, broadPhaseCollide(_local3));
addMapItemToTiles(_local3);
_local3.model.depth = positionToDepth(_local3.model.x, _local3.model.y, _local3.model.z);
if (_local3.type == "aiCharacter") {
updateCharacterDistances(com.hitf.tileGameClasses.Character(_local3));
} else if (_local3.type == "userCharacter") {
updateCharacterDistances(com.hitf.tileGameClasses.Character(_local3));
pan(_local3);
}
dispatchEvent({target:this, type:"onPositionChange", mapItem:_local3});
}
function onProjectile(e) {
var _local4 = 0;
var _local3 = 0;
var _local5 = 12;
var _local6 = Math.atan2(e.target.model.direction.y, e.target.model.direction.x);
_local4 = e.target.model.x + (_local5 * Math.cos(_local6));
_local3 = e.target.model.y + (_local5 * Math.sin(_local6));
addMapItem({libraryID:e.libraryID, type:"projectileMotion", halfwidthX:10, halfwidthY:8, x:_local4, y:_local3, z:40, character:e.target, maxDistance:e.target.model.range, moveable:false, viewable:true, walkable:false});
}
function onAddMapItem(e) {
addMapItem(e.model);
}
function onRemoveMapItem(e) {
if (e.target.type == "userCharacter") {
if (lastCharacter()) {
_view.gotoAndPlay(2);
userCharacter.win();
} else {
userCharacter.lose();
}
} else if (e.target.type == "aiCharacter") {
e.target.lose();
if (lastCharacter()) {
_view.gotoAndPlay(2);
userCharacter.win();
}
} else {
removeMapItem(e.target);
}
}
function onSpecialMove(e) {
var _local4 = _objCharacterIDToIndex[e.target.model.id];
var _local5 = _arrayCharacterDistances[_local4].length;
var _local2 = 0;
while (_local2 < _local5) {
if ((_arrayCharacterDistances[_local4][_local2] < 200) && (_local4 != _local2)) {
var _local3 = characters[_local2].model.health;
characters[_local2].specialMoveCollision();
if ((characters[_local2].model.health == 0) && (_local3 != 0)) {
e.target.model.eliminations++;
}
}
_local2++;
}
}
function onWinFinished(e) {
removeAllMapItems();
Key.removeListener(this);
dispatchEvent({target:this, type:"onWin", characters:characters, userCharacter:userCharacter});
}
function onKeyDown() {
}
function get characters() {
return(_arrayCharacters);
}
function set characters(c) {
_arrayCharacters = c;
//return(characters);
}
function get cheat() {
return(_strCheat);
}
function set cheat(c) {
_strCheat = c;
//return(cheat);
}
function get columnMax() {
return(Math.floor(((-originX) + screenWidth) / tileWidth));
}
function get columnMin() {
return(Math.floor((-originX) / tileWidth));
}
function get height() {
return(_numHeight);
}
function get health() {
return(_arrayHealth);
}
function set health(h) {
_arrayHealth = h;
//return(health);
}
function get hud() {
return(_hud);
}
function set hud(h) {
_hud = h;
//return(hud);
}
function get mapItemModel() {
return(_arrayMapItemModel);
}
function set mapItemModel(m) {
_arrayMapItemModel = m;
initMapItems();
//return(mapItemModel);
}
function get mapItems() {
return(_arrayMapItems);
}
function set mapItems(m) {
_arrayMapItems = m;
//return(mapItems);
}
function get originX() {
return(_numOriginX);
}
function set originX(x) {
if (x != _numOriginX) {
var _local2 = _numOriginX;
_numOriginX = x;
dispatchEvent({target:this, type:"onOriginXChange", prevOriginX:_local2, originX:_numOriginX});
}
//return(originX);
}
function get originY() {
return(_numOriginY);
}
function set originY(y) {
if (y != _numOriginY) {
var _local2 = _numOriginY;
_numOriginY = y;
dispatchEvent({target:this, type:"onOriginYChange", prevOriginY:_local2, originY:_numOriginY});
}
//return(originY);
}
function get originXTarget() {
return(_numOriginXTarget);
}
function set originXTarget(o) {
_numOriginXTarget = o;
//return(originXTarget);
}
function get originYTarget() {
return(_numOriginYTarget);
}
function set originYTarget(o) {
_numOriginYTarget = o;
//return(originYTarget);
}
function get rowMin() {
return(Math.floor((-originY) / tileHeight));
}
function get rowMax() {
return(Math.floor(((-originY) + screenHeight) / tileHeight));
}
function get screenWidth() {
return(_numScreenWidth);
}
function get screenHeight() {
return(_numScreenHeight);
}
function get specialMoves() {
return(_arraySpecialMoves);
}
function set specialMoves(s) {
_arraySpecialMoves = s;
//return(specialMoves);
}
function get tileWidth() {
return(_numTileWidth);
}
function get tileHeight() {
return(_numTileHeight);
}
function get userCharacter() {
return(_userCharacter);
}
function set userCharacter(u) {
_userCharacter = u;
//return(userCharacter);
}
function get userCharacterID() {
return(_strUserCharacterID);
}
function set userCharacterID(u) {
_strUserCharacterID = u;
//return(userCharacterID);
}
function get view() {
return(_view);
}
function set view(v) {
_view = v;
//return(view);
}
function get width() {
return(_numWidth);
}
function get arrayCharacterDistances() {
return(_arrayCharacterDistances);
}
function getAIMap() {
var _local35 = new Array();
var _local33 = new Array();
var _local34 = new Array();
var _local32 = new Array();
var _local30 = width;
var _local31 = height;
var _local26 = Math.floor(_local30 / tileSize);
var _local29 = Math.floor(_local31 / tileSize);
var _local8 = 0;
while (_local8 < mapItemModel.length) {
var _local9 = mapItemModel[_local8];
if (_local9.type.toLowerCase().indexOf("character") == -1) {
if (_local9.libraryID.indexOf("jawbreaker") > -1) {
_local34.push(new com.wis.math.alg.Vector(_local9.x, _local9.y));
} else if ((((_local9.type != "projectileStatic") && (_local9.halfwidthX != 0)) && (_local9.halfwidthY != 0)) && (!_local9.moveable)) {
var _local25 = parseInt(_local9.x);
var _local23 = parseInt(_local9.y);
var _local22 = parseInt(_local9.halfwidthX);
var _local24 = parseInt(_local9.halfwidthY);
if (_local22 != 0) {
_local35.push(new com.hitf.tileGameClasses.Square(_local25, _local23, _local22, _local24));
}
}
}
_local8++;
}
_local8 = 0;
var _local18 = 10;
var _local27 = 0;
var _local28 = 999;
_local35.push(new com.hitf.tileGameClasses.Square(_local30 / 2, _local31 + 10, _local30 / 2, 10));
_local35.push(new com.hitf.tileGameClasses.Square(_local30 + 10, _local31 / 2, 10, _local31 / 2));
do {
var _local3 = _local35[_local8];
var _local5 = _local8 + 1;
while (_local5 < _local35.length) {
var _local2 = _local35[_local5];
if ((((_local3.ary_v[3].x == _local2.ary_v[0].x) && (Math.abs(_local3.ary_v[3].y - _local2.ary_v[0].y) < _local18)) && (_local3.ary_v[2].x == _local2.ary_v[1].x)) && (Math.abs(_local3.ary_v[2].y - _local2.ary_v[1].y) < _local18)) {
_local3.ary_v[3].y = _local2.ary_v[3].y;
_local3.ary_v[2].y = _local2.ary_v[2].y;
_local35.splice(_local5, 1);
_local8--;
break;
}
if ((((_local2.ary_v[3].x == _local3.ary_v[0].x) && (Math.abs(_local2.ary_v[3].y - _local3.ary_v[0].y) < _local18)) && (_local2.ary_v[2].x == _local3.ary_v[1].x)) && (Math.abs(_local2.ary_v[2].y - _local3.ary_v[1].y) < _local18)) {
_local3.ary_v[1].y = _local2.ary_v[1].y;
_local3.ary_v[0].y = _local2.ary_v[0].y;
_local35.splice(_local5, 1);
_local8--;
break;
}
if ((((_local3.ary_v[1].x == _local2.ary_v[0].x) && (_local3.ary_v[1].y == _local2.ary_v[0].y)) && (_local3.ary_v[2].x == _local2.ary_v[3].x)) && (_local3.ary_v[2].y == _local2.ary_v[3].y)) {
_local3.ary_v[1].x = _local2.ary_v[1].x;
_local3.ary_v[2].x = _local2.ary_v[2].x;
_local35.splice(_local5, 1);
_local8--;
break;
}
if ((((_local2.ary_v[1].x == _local3.ary_v[0].x) && (_local2.ary_v[1].y == _local3.ary_v[0].y)) && (_local2.ary_v[2].x == _local3.ary_v[3].x)) && (_local2.ary_v[2].y == _local3.ary_v[3].y)) {
_local3.ary_v[0].x = _local2.ary_v[0].x;
_local3.ary_v[3].x = _local2.ary_v[3].x;
_local35.splice(_local5, 1);
_local8--;
break;
}
_local5++;
}
_local8++;
_local27++;
} while ((_local8 < _local35.length) && (_local27 < _local28));
var _local19 = 0;
while (_local19 < _local29) {
var _local21 = new Array();
var _local20 = "";
var _local14 = 0;
while (_local14 < _local26) {
var _local10 = true;
var _local17 = _local14 * tileSize;
var _local16 = (_local14 * tileSize) + tileSize;
var _local11 = _local19 * tileSize;
var _local15 = (_local19 * tileSize) + tileSize;
_local8 = 0;
while (_local8 < _local35.length) {
if (_local11 < 150) {
_local10 = false;
break;
}
var _local4 = _local35[_local8].ary_v;
var _local7 = _local4[0].x - 10;
var _local6 = _local4[2].x + 10;
var _local13 = _local4[0].y - 10;
var _local12 = _local4[2].y + 10;
if (_local7 != _local6) {
if (!(((((_local17 < _local7) && (_local16 < _local7)) || ((_local17 > _local6) && (_local16 > _local6))) || ((_local11 < _local13) && (_local15 < _local13))) || ((_local11 > _local12) && (_local15 > _local12)))) {
_local10 = false;
break;
}
}
_local8++;
}
if (_local10) {
_local20 = _local20 + "o";
} else {
_local20 = _local20 + "x";
}
_local21.push(_local10);
_local14++;
}
_local32.push(_local21);
_local19++;
}
return({ary_sqs:_local35, ary_hints:_local33, ary_bonus:_local34, ary_tiles:_local32});
}
function onInitMapItemsFinished() {
var _local5 = new Array();
var _local6 = new Array();
var _local7 = 0;
var _local8 = 0;
var _local4 = ary_aic.length;
if (_local4 > _maxAI) {
_local4 = _maxAI;
}
var _local3 = 0;
while (_local3 < _local4) {
var _local2 = 0;
while (_local2 < characters.length) {
if (ary_aic[_local3].libraryID == characters[_local2].model.libraryID) {
characters[_local2].inplay = true;
}
_local2++;
}
_local3++;
}
ary_aic.splice(0, _local4);
_local3 = 0;
while (_local3 < ary_aic.length) {
var _local2 = 0;
while (_local2 < characters.length) {
if (ary_aic[_local3].libraryID == characters[_local2].model.libraryID) {
characters[_local2].inplay = false;
characters[_local2].model.position.x = 50 + (100 * _local3);
characters[_local2].model.position.y = 50;
}
_local2++;
}
_local3++;
}
initCharacterDistances();
hud.__set__characters(characters);
hud.show();
clearInterval(_numInitMapItemsID);
view.onCreateMapFinished();
view.__set__aiData(getAIMap());
pan(userCharacter);
}
function onLoseFinished(e) {
if (_root._tileGame._currentFrame == 4) {
if (e.target.type == "userCharacter") {
dispatchEvent({target:this, type:"onLose", characters:characters, userCharacter:userCharacter});
removeAllMapItems();
} else if (e.target.inplay) {
e.target.inplay = false;
removeMapItem(e.target);
if (ary_aic.length > 0) {
f_doPlace();
}
}
}
}
function f_doPlace() {
clearInterval(intPlaceID);
trace("TRY TO PLACE " + intPlaceID);
var _local7 = true;
var _local12 = 0;
var _local9 = -originX;
var _local11 = _local9 + _numScreenWidth;
var _local8 = -originY;
var _local10 = _local8 + _numScreenHeight;
var _local6 = false;
do {
var _local4 = Math.floor(Math.random() * _numWidth);
if (_root._tileGame.model.level >= 8) {
_local4 = Math.floor(Math.random() * 1800);
}
var _local5 = Math.floor(Math.random() * _numHeight);
if (!((((_local4 > _local9) && (_local4 < _local11)) && (_local5 > _local8)) && (_local5 < _local10))) {
if (view.__get__aiData().ary_tiles[Math.floor(_local5 / tileSize)][Math.floor(_local4 / tileSize)]) {
var _local3 = 0;
while (_local3 < characters.length) {
if (ary_aic[0].libraryID == characters[_local3].model.libraryID) {
characters[_local3].model.position.x = _local4;
characters[_local3].model.position.y = _local5;
characters[_local3].inplay = true;
_local6 = true;
break;
}
_local3++;
}
if (_local6) {
_arrayCharacterDistances.push(new Array());
ary_aic.splice(0, 1);
_local7 = false;
} else {
intPlaceID = setInterval(this, "f_doPlace", 1000);
}
}
}
} while (_local7 && (_local12 < 250));
}
function onEnterFrame() {
var _local3 = originX;
var _local5 = originXTarget;
var _local2 = originY;
var _local4 = originYTarget;
if (_local3 != _local5) {
originX = (Math.round(_local3 + ((_local5 - _local3) / 5)));
}
if (_local2 != _local4) {
originY = (Math.round(_local2 + ((_local4 - _local2) / 5)));
}
}
var _hud = null;
var _arrayMapItemModel = null;
var _numOriginX = 0;
var _numOriginY = 0;
var _numOriginXTarget = 0;
var _numOriginYTarget = 0;
var _arrayAABBTiles = null;
var _numScreenWidth = 600;
var _numScreenHeight = 400;
var _numTileWidth = 200;
var _numTileHeight = 200;
var _strUserCharacterID = "";
var _numWidth = null;
var _numHeight = null;
var _view = null;
var _numInitMapItemsID = -1;
var _numMapItemIndex = 0;
var _numLastPoints = 0;
var _strCheat = "";
var _objCharacterIDToIndex = null;
var _arrayCharacterDistances = null;
var _arrayCharacters = null;
var _arrayHealth = null;
var _arrayMapItems = null;
var _arraySpecialMoves = null;
var _userCharacter = null;
var _maxAI = 5;
var ary_aic = new Array();
var tileSize = 50;
var lastChar = 0;
var _numJB = 0;
var _numSM = 0;
}
Symbol 2621 MovieClip [__Packages.com.hitf.tileGameClasses.HUD] Frame 0
class com.hitf.tileGameClasses.HUD extends MovieClip
{
var _projectileQueue, _specialMoveQueue, _scoreboard, onEnterFrame, _characterBioGroup;
function HUD () {
super();
init();
}
function show() {
_tmgShow.play();
}
function init() {
_tmgShow = new com.hitf.transitions.TweenManager();
_tmgShow.addTween(0, _projectileQueue, "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.2);
_tmgShow.addTween(0.2, _specialMoveQueue, "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.2);
_tmgShow.addTween(0.4, _scoreboard, "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.2);
_tmgShow.pause();
}
function initChildren() {
_projectileQueue.__set__positions([{_x:15, _y:13}, {_x:35, _y:13}, {_x:55, _y:13}, {_x:15, _y:33}, {_x:35, _y:33}, {_x:55, _y:33}]);
}
function invalidate() {
onEnterFrame = function () {
delete this.onEnterFrame;
this.arrange();
};
}
function arrange() {
var _local2 = characters;
for (var _local3 in _local2) {
if (_local2[_local3].type == "userCharacter") {
_projectileQueue.__set__amHud(true);
_projectileQueue.__set__character((_specialMoveQueue.character = _scoreboard.__set__character(_local2[_local3])));
}
}
_characterBioGroup.__set__characters(_local2);
}
function onLoad() {
initChildren();
}
function get characters() {
return(_arrayCharacters);
}
function set characters(c) {
_arrayCharacters = c;
invalidate();
//return(characters);
}
function get charBioGroup() {
return(_characterBioGroup);
}
var _arrayCharacters = null;
var _tmgShow = null;
}
Symbol 2622 MovieClip [__Packages.com.hitf.tileGameClasses.hudClasses.CharacterBioGroup] Frame 0
class com.hitf.tileGameClasses.hudClasses.CharacterBioGroup extends MovieClip
{
var _oldLength, _arrayCharacterBios, _characterBio0, _arrayStarburst, onEnterFrame, attachMovie;
function CharacterBioGroup () {
super();
init();
_oldLength = 0;
}
function init() {
_arrayCharacterBios = [_characterBio0];
_arrayStarburst = [];
}
function invalidate() {
onEnterFrame = function () {
delete this.onEnterFrame;
this.arrange();
};
}
function arrange() {
while (_arrayCharacterBios.length > 1) {
_arrayCharacterBios.pop().removeMovieClip();
}
var _local3 = characters;
var _local2 = 0;
while (_local2 < _arrayCharacters.length) {
if (_local2 > 0) {
_arrayCharacterBios.push(attachMovie("CharacterBio", "_characterBio" + _local2, _local2));
}
_arrayCharacterBios[_local2].addEventListener("onHealthChange", this);
_arrayCharacterBios[_local2].addEventListener("onInPlayChange", this);
_arrayCharacterBios[_local2].character = _local3[_local2];
_arrayCharacterBios[_local2].bioImage.isActive = _local3[_local2].inplay;
_local2++;
}
_local2 = 0;
while (_local2 < 3) {
_arrayStarburst.push(attachMovie("RankStarburst", "_starburst" + _local2, 100 + _local2));
_arrayStarburst[_local2]._y = -7.5;
_arrayStarburst[_local2]._x = ((_local2 - (_arrayCharacters.length / 2)) * PADDING) - 11;
_arrayStarburst[_local2].mynumb = _local2 + 1;
_local2++;
}
_arrayCharacterBios.sort(sortCharacterBios);
_tmgCharacterBios = new com.hitf.transitions.TweenManager();
_local2 = 0;
while (_local2 < _arrayCharacterBios.length) {
_arrayCharacterBios[_local2]._x = (_local2 - (_arrayCharacters.length / 2)) * PADDING;
_tmgCharacterBios.addTween(0.1 * _local2, _arrayCharacterBios[_local2], "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.2);
_tmgCharacterBios.addTween(0.1 * _local2, _arrayCharacterBios[_local2], "_y", mx.transitions.easing.Regular.easeInOut, -_characterBio0._height, _characterBio0._y, 0.2);
_local2++;
}
_tmgCharacterBios.play();
_oldLength = _arrayCharacterBios.length;
_intID = setInterval(this, "doInPlayChange", 600);
}
function rearrange() {
_arrayCharacterBios.sort(sortCharacterBios);
if (_tmgRearrange.__get__isPlaying()) {
_tmgRearrange.pause();
}
_tmgRearrange = new com.hitf.transitions.TweenManager();
var _local2 = 0;
while (_local2 < _arrayCharacters.length) {
var _local3 = (_local2 - (_arrayCharacters.length / 2)) * PADDING;
_tmgRearrange.addTween(0, _arrayCharacterBios[_local2], "_x", mx.transitions.easing.Regular.easeInOut, _arrayCharacterBios[_local2]._x, _local3, 0.2);
if (_local2 < 3) {
_tmgRearrange.addTween(0, _arrayStarburst[_local2], "_x", mx.transitions.easing.Regular.easeInOut, _arrayStarburst[_local2]._x, _local3 - 11, 0.2);
}
_local2++;
}
_tmgRearrange.play();
}
function sortCharacterBios(a, b) {
if (a.__get__inplay() && (!b.__get__inplay())) {
return(-1);
}
if (b.__get__inplay() && (!a.__get__inplay())) {
return(1);
}
if (a.__get__health() > b.__get__health()) {
return(-1);
}
if (a.__get__health() < b.__get__health()) {
return(1);
}
if (a.__get__active()) {
return(-1);
}
if (b.__get__active()) {
return(1);
}
return(0);
}
function onHealthChange(e) {
rearrange();
}
function onInPlayChange(e) {
trace("GOT THE MESSAGE TO REARRANGE");
_intID = setInterval(this, "doInPlayChange", 100);
}
function doInPlayChange() {
rearrange();
clearInterval(_intID);
}
function get characters() {
return(_arrayCharacters);
}
function addCharacter(c) {
var _local2 = _arrayCharacterBios.length;
_arrayCharacterBios.push(attachMovie("CharacterBio", "_characterBio" + _local2, _local2));
_arrayCharacterBios[_local2].addEventListener("onHealthChange", this);
_arrayCharacterBios[_local2].character = c;
rearrange();
}
function set characters(c) {
_arrayCharacters = c;
invalidate();
//return(characters);
}
static var PADDING = 40;
var _arrayCharacters = null;
var _tmgCharacterBios = null;
var _tmgRearrange = null;
var _intID = null;
}
Symbol 2623 MovieClip [__Packages.com.hitf.tileGameClasses.hudClasses.CharacterBio] Frame 0
class com.hitf.tileGameClasses.hudClasses.CharacterBio extends MovieClip
{
var _cfxGrayFill, _mcGrayFill, _cfxFill, _mcFill, onEnterFrame, _bioImage, _bioHealth, _mcStroke, _mcShadow, dispatchEvent;
function CharacterBio () {
super();
init();
}
function init() {
mx.events.EventDispatcher.initialize(this);
_cfxGrayFill = new com.hitf.transitions.ColorFX(_mcGrayFill);
_cfxFill = new com.hitf.transitions.ColorFX(_mcFill);
_cfxGrayFill.__set__rgbHex(0);
}
function invalidate() {
onEnterFrame = function () {
delete this.onEnterFrame;
this.arrange();
};
}
function arrange() {
_bioImage.__set__imageLibraryID(_strBioImageLibraryID);
_bioImage.__set__rgbFill(_numRGBBioImageFill);
_bioHealth.__set__health(_numHealth);
if (_boolActive) {
_mcStroke.gotoAndStop("active");
_mcFill._y = -10;
_mcFill._height = 65;
_cfxFill.__set__rgbHex(_numRGBFill);
} else {
_mcStroke.gotoAndStop("inactive");
_mcFill._y = 0;
_mcFill._height = 55;
_cfxFill.__set__rgbHex(RGB_INACTIVE_FILL);
}
if (_numHealth <= 0) {
_mcStroke._alpha = 0;
_mcGrayFill._alpha = GRAY_FILL_ALPHA;
_bioHealth._alpha = 0;
_mcFill._alpha = 0;
_mcShadow._width = 38;
_mcShadow._height = 46;
} else {
_mcStroke._alpha = 100;
_mcGrayFill._alpha = 0;
_bioHealth._alpha = 100;
_mcFill._alpha = 100;
_mcShadow._width = 44;
_mcShadow._height = 63;
}
}
function onHealthChange(e) {
if (e.target.model.libraryID == id) {
health = (e.target.model.health);
dispatchEvent({target:this, type:"onHealthChange"});
}
}
function onInPlayChange(e) {
if (((!_bioImage.__get__isActive()) && (e.inplay)) && (e.target.model.libraryID == id)) {
dispatchEvent({target:this, type:"onInPlayChange"});
}
_bioImage.__set__isActive(e.inplay);
}
function get character() {
return(_character);
}
function set character(c) {
c.addEventListener("onHealthChange", this);
c.addEventListener("onInPlayChange", this);
id = (c.__get__model().id);
active = (c.__get__type() == "userCharacter");
bioImageLibraryID = (c.__get__model().bioImageLibraryID);
rgbBioImageFill = (c.__get__model().rgbHighlight);
health = (c.__get__model().health);
rgbFill = (c.__get__model().rgbFill);
_bioImage.__set__isActive(c.inplay);
//return(character);
}
function get inplay() {
return(_bioImage.__get__isActive());
}
function get id() {
return(_strID);
}
function set id(i) {
_strID = i;
//return(id);
}
function get active() {
return(_boolActive);
}
function set active(a) {
_boolActive = a;
//return(active);
}
function get bioImageLibraryID() {
return(_strBioImageLibraryID);
}
function set bioImageLibraryID(b) {
_strBioImageLibraryID = b;
invalidate();
//return(bioImageLibraryID);
}
function get rgbBioImageFill() {
return(_numRGBBioImageFill);
}
function set rgbBioImageFill(r) {
_numRGBBioImageFill = r;
invalidate();
//return(rgbBioImageFill);
}
function get health() {
return(_numHealth);
}
function set health(h) {
_numHealth = h;
_bioImage.__set__health(h);
invalidate();
//return(health);
}
function get rgbFill() {
return(_numRGBFill);
}
function set rgbFill(r) {
_numRGBFill = r;
//return(rgbFill);
}
static var GRAY_FILL_ALPHA = 40;
static var RGB_INACTIVE_FILL = 16777215;
var _character = null;
var _strID = "";
var _boolActive = false;
var _strBioImageLibraryID = "";
var _numRGBBioImageFill = 16777215;
var _numHealth = 100;
var _numRGBFill = 16777215;
}
Symbol 2624 MovieClip [__Packages.com.hitf.tileGameClasses.hudClasses.characterBioClasses.BioImage] Frame 0
class com.hitf.tileGameClasses.hudClasses.characterBioClasses.BioImage extends MovieClip
{
var _cfxFill, _mcFill, _mcHolder, _cfxImage;
function BioImage () {
super();
init();
}
function init() {
_cfxFill = new com.hitf.transitions.ColorFX(_mcFill);
_isActive = true;
}
function get health() {
return(_numHealth);
}
function set health(h) {
_numHealth = h;
//return(health);
}
function get imageLibraryID() {
return(_strImageLibraryID);
}
function set imageLibraryID(i) {
_strImageLibraryID = i;
_mcHolder.attachMovie(i, "_mcImage", 0);
_mcHolder.attachMovie(i, "_outline", 1);
_mcHolder._mcImage.gotoAndStop(imageFrame);
_mcHolder._outline.gotoAndStop(imageFrame);
_mcHolder._outline._visible = false;
_cfxImage = new com.hitf.transitions.ColorFX(_mcHolder._outline);
_cfxImage.__set__rgbHex(0);
//return(imageLibraryID);
}
function get imageFrame() {
return(_strImageFrame);
}
function set imageFrame(f) {
_strImageFrame = f;
//return(imageFrame);
}
function get rgbFill() {
return(_numRGBFill);
}
function set rgbFill(r) {
_cfxFill.__set__rgbHex((_numRGBFill = r));
//return(rgbFill);
}
function get isActive() {
return(_isActive);
}
function set isActive(b) {
_isActive = b;
if (_isActive) {
_mcHolder._outline._visible = false;
} else if (health > 0) {
_mcHolder._outline._visible = true;
}
//return(isActive);
}
var _strImageLibraryID = "";
var _strImageFrame = "hud";
var _numRGBFill = 16777215;
var _isActive = true;
var _numHealth = 100;
}
Symbol 2625 MovieClip [__Packages.com.hitf.transitions.ColorFX] Frame 0
class com.hitf.transitions.ColorFX
{
var _colorFX;
function ColorFX (t) {
init(t);
}
static function getRGBHexComponent(h) {
var _local1 = {};
_local1.r = Math.floor(h / 65536);
_local1.g = Math.floor((h % 65536) / 256);
_local1.b = h % 256;
return(_local1);
}
function init(t) {
_colorFX = new Color(t);
}
function get brightness() {
return(_numBrightness);
}
function set brightness(b) {
_numBrightness = b;
_colorFX.setTransform({rb:b * 2.55, gb:b * 2.55, bb:b * 2.55});
//return(brightness);
}
function get rgbHex() {
return(((_objRGBHex.r * 65536) + (_objRGBHex.g * 256)) + _objRGBHex.b);
}
function set rgbHex(h) {
var _local2 = getRGBHexComponent(h);
redHex = (_local2.r);
greenHex = (_local2.g);
blueHex = (_local2.b);
//return(rgbHex);
}
function get redHex() {
return(_objRGBHex.r);
}
function set redHex(r) {
_objRGBHex.r = r;
_colorFX.setTransform({ra:r / 2.55});
//return(redHex);
}
function get greenHex() {
return(_objRGBHex.g);
}
function set greenHex(g) {
_objRGBHex.g = g;
_colorFX.setTransform({ga:g / 2.55});
//return(greenHex);
}
function get blueHex() {
return(_objRGBHex.b);
}
function set blueHex(b) {
_objRGBHex.b = b;
_colorFX.setTransform({ba:b / 2.55});
//return(blueHex);
}
var _numBrightness = 0;
var _objRGBHex = {r:255, g:255, b:255};
}
Symbol 2626 MovieClip [__Packages.com.hitf.tileGameClasses.hudClasses.characterBioClasses.BioHealth] Frame 0
class com.hitf.tileGameClasses.hudClasses.characterBioClasses.BioHealth extends MovieClip
{
var _cfxFill, _mcFillFG;
function BioHealth () {
super();
init();
}
function init() {
_cfxFill = new com.hitf.transitions.ColorFX(_mcFillFG);
}
function get health() {
return(_numHealth);
}
function set health(h) {
_numHealth = h;
_mcFillFG._xscale = Math.round(h);
if (h < 100) {
rgbFill = (RGB_HEALTH[Math.floor((h * RGB_HEALTH.length) / 100)]);
} else {
rgbFill = (RGB_HEALTH[RGB_HEALTH.length - 1]);
}
//return(health);
}
function get rgbFill() {
return(_numRGBFill);
}
function set rgbFill(r) {
_cfxFill.__set__rgbHex((_numRGBFill = r));
//return(rgbFill);
}
static var RGB_HEALTH = [16718336, 16750848, 9821215];
var _numHealth = 100;
var _numRGBFill = 16777215;
}
Symbol 2627 MovieClip [__Packages.com.hitf.tileGameClasses.hudClasses.Scoreboard] Frame 0
class com.hitf.tileGameClasses.hudClasses.Scoreboard extends MovieClip
{
function Scoreboard () {
super();
}
function arrange() {
var _local3 = score.toString();
var _local2 = 0;
while (_local2 <= 5) {
if (_local3.length > _local2) {
this["_mcDigit" + _local2].gotoAndStop(parseInt(_local3.charAt((_local3.length - _local2) - 1)) + 1);
} else {
this["_mcDigit" + _local2].gotoAndStop(11);
}
if (_local2 > 0) {
this["_mcDigit" + _local2]._x = (this["_mcDigit" + (_local2 - 1)]._x - this["_mcDigit" + _local2]._width) - PADDING;
}
_local2++;
}
}
function onPointsChange(e) {
score = (character.__get__model().points);
}
function get character() {
return(_character);
}
function set character(c) {
_character = c;
c.__get__model().addEventListener("onPointsChange", this);
//return(character);
}
function get score() {
return(_numScore);
}
function set score(s) {
_numScore = s;
arrange();
//return(score);
}
static var PADDING = -20;
var _character = null;
var _numScore = 0;
}
Symbol 2628 MovieClip [__Packages.com.hitf.tileGameClasses.mapClasses.MapView] Frame 0
class com.hitf.tileGameClasses.mapClasses.MapView extends MovieClip
{
var _arrayMapItems, _mcCreatingMap, _arrayAI, _model, _aiData, _x, _y, _map;
function MapView () {
super();
init();
}
function get arrayMapItems() {
return(_arrayMapItems);
}
function onCreateMapFinished() {
_mcCreatingMap.swapDepths(0);
_mcCreatingMap.removeMovieClip();
}
function addMapItem(m, d) {
var _local2 = _arrayMapItems.length;
switch (m.type) {
case "aiCharacter" :
_arrayMapItems.push(new com.hitf.tileGameClasses.AICharacter(this, m.libraryID, "_mapItem" + _local2, d, m));
_arrayMapItems[_local2].map = map;
_arrayAI.push(_local2);
if (_arrayAI < _maxAI) {
_arrayMapItems[_local2].inplay = true;
} else {
_arrayMapItems[_local2].inplay = false;
}
_ctrAI++;
break;
case "userCharacter" :
_arrayMapItems.push(new com.hitf.tileGameClasses.UserCharacter(this, m.libraryID, "_mapItem" + _local2, d, m));
_arrayMapItems[_local2].map = map;
_arrayMapItems[_local2].inplay = true;
userIndex = _local2;
break;
case "mapItem" :
_arrayMapItems.push(new com.hitf.tileGameClasses.MapItem(this, m.libraryID, "_mapItem" + _local2, d, m));
if (m.moveable) {
_arrayMapItems[_local2].map = map;
}
break;
case "projectileMotion" :
_arrayMapItems.push(new com.hitf.tileGameClasses.Projectile(this, m.libraryID, "_mapItem" + _local2, d, m));
_arrayMapItems[_local2].type = "projectileMotion";
_arrayMapItems[_local2].map = map;
break;
case "projectileStatic" :
_arrayMapItems.push(new com.hitf.tileGameClasses.MapItem(this, m.libraryID, "_mapItem" + _local2, d, m));
_arrayMapItems[_local2].type = "projectileStatic";
break;
case "health" :
_arrayMapItems.push(new com.hitf.tileGameClasses.Health(this, m.libraryID, "_mapItem" + _local2, d, m));
_arrayMapItems[_local2].map = map;
break;
case "specialMove" :
_arrayMapItems.push(new com.hitf.tileGameClasses.SpecialMove(this, m.libraryID, "_mapItem" + _local2, d, m));
_arrayMapItems[_local2].map = map;
}
return(_arrayMapItems[_local2]);
}
function clearIt() {
trace("CLEAR IT OUT");
var _local3 = _arrayMapItems;
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].model.libraryID.indexOf("jawbreaker") != -1) {
_local3[_local2].clearIt();
_local3[_local2].onAddMapItem = function () {
};
}
_local2++;
}
}
function set thinkCtr(n) {
_thinkCtr = n;
//return(thinkCtr);
}
function get thinkCtr() {
return(_thinkCtr);
}
function onEnterFrame() {
if (aiData.ary_sqs != undefined) {
var _local5 = new Array();
var _local10 = new Array();
var _local4 = 0;
while (_local4 < _arrayAI.length) {
if ((_arrayMapItems[_arrayAI[_local4]].type == "aiCharacter") && (_arrayMapItems[_arrayAI[_local4]].inplay)) {
if (_arrayMapItems[_arrayAI[_local4]].model.visible && (_arrayMapItems[_arrayAI[_local4]].model.health > 0)) {
_local5.push(_arrayAI[_local4]);
} else {
_arrayMapItems[_arrayAI[_local4]].thinkSimple = true;
}
if (_arrayMapItems[_arrayAI[_local4]].model.health > 0) {
_local10.push(_arrayAI[_local4]);
if (_arrayMapItems[_arrayAI[_local4]].ary_sqs.length == 0) {
if ((aiData.ary_sqs != undefined) && (_arrayMapItems[_arrayAI[_local4]].ary_sqs.length < 1)) {
var _local2 = _arrayMapItems[_arrayAI[_local4]];
_local2.ary_sqs = aiData.ary_sqs;
_local2.ary_hints = aiData.ary_hints;
_local2.ary_tiles = aiData.ary_tiles;
_local2.ary_bonus = aiData.ary_bonus;
_local2.boardW = _model.width;
_local2.boardH = _model.height;
}
}
}
}
_local4++;
}
if (_local5.length > 0) {
var _local13 = Math.floor(Math.random() * _local5.length);
_local4 = 0;
while (_local4 < _local5.length) {
if (_local4 == _local13) {
_arrayMapItems[_local5[_local4]].thinkSimple = false;
} else {
_arrayMapItems[_local5[_local4]].thinkSimple = true;
}
_local4++;
}
} else {
_arrayMapItems[_local10[0]].thinkSimple = false;
if (_local10.length > 1) {
_arrayMapItems[_local10[1]].thinkSimple = false;
}
}
thinkCtr = ((thinkCtr+1));
if (_local10.length > 0) {
if ((thinkCtr % 10) == 0) {
if (_local10.length < 3) {
thinkWho++;
var _local14 = thinkWho % _local10.length;
_arrayMapItems[_local10[_local14]].doThinkin();
} else {
var _local6 = _local10;
var _local11 = 9999;
var _local12 = 9999;
_local4 = 0;
while (_local4 < _local6.length) {
var _local3 = _arrayMapItems[_local6[_local4]];
if ((_local3.model.health > 50) && (_local3.model.projectileQueue.length > 1)) {
var _local8 = _local3.model.position.x - _arrayMapItems[userIndex].model.position.x;
var _local7 = _local3.model.position.y - _arrayMapItems[userIndex].model.position.y;
var _local9 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local9 < _local12) {
_local12 = _local9;
_local11 = _local4;
}
}
_local4++;
}
if (_local11 != 9999) {
_local4 = 0;
while (_local4 < _local6.length) {
var _local3 = _arrayMapItems[_local6[_local4]];
if (_local4 == _local11) {
_local3.doThinkin();
_local3.seekPlayer = true;
} else if (_local3.myAction == "pursuePlayer") {
_local3.seekPlayer = false;
_local3.getOutOfDodge();
}
_local4++;
}
}
}
}
_local4 = 0;
while (_local4 < _arrayAI.length) {
if (_arrayMapItems[_arrayAI[_local4]].type == "aiCharacter") {
_arrayMapItems[_arrayAI[_local4]].amax = _local10.length;
}
_local4++;
}
}
}
}
function init() {
mx.events.EventDispatcher.initialize(this);
_mcCreatingMap.swapDepths(2377700);
_arrayMapItems = [];
_arrayAI = [];
_thinkCtr = 0;
_aiData = new Object();
}
function onOriginXChange(e) {
_x = model.originX;
}
function onOriginYChange(e) {
_y = model.originY;
}
function get map() {
return(_map);
}
function set map(m) {
_map = m;
//return(map);
}
function get model() {
return(_model);
}
function set model(m) {
_model = m;
//return(model);
}
function get aiData() {
return(_aiData);
}
function set aiData(o) {
_aiData = o;
//return(aiData);
}
var _maxAI = 5;
var _ctrAI = 0;
var _thinkCtr = 0;
var tileSize = 50;
var thinkWho = 0;
var userIndex = 0;
}
Symbol 2629 MovieClip [__Packages.com.hitf.tileGameClasses.MapItem] Frame 0
class com.hitf.tileGameClasses.MapItem
{
var dispatchEvent, _map, addEventListener, _model, _view;
function MapItem (t, l, n, d, i) {
init(t, l, n, d, i);
}
function collision(m) {
return(true);
}
function init(t, l, n, d, i) {
mx.events.EventDispatcher.initialize(this);
model = (new com.hitf.tileGameClasses.mapItemClasses.MapItemModel());
view = (new com.hitf.tileGameClasses.mapItemClasses.MapItemView());
model.__set__view(view);
view.__set__model(model);
view.__get__model().__set__type(i.type);
model.addEventListener("onDepthChange", view);
model.addEventListener("onPositionChange", view);
model.addEventListener("onPositionChange", this);
model.addEventListener("onStateChange", view);
model.addEventListener("onVisibleChange", view);
view.addEventListener("onMotionFinished", this);
model.__set__target(t);
model.__set__libraryID(l);
model.__set__name(n);
model.__set__depth(d);
model.__set__halfwidthX(i.halfwidthX);
model.__set__halfwidthY(i.halfwidthY);
model.__set__moveable(i.moveable);
model.__set__position(new com.wis.math.alg.Vector(i.x, i.y));
model.__set__type(i.type);
model.__set__viewable(i.viewable);
model.__set__walkable(i.walkable);
model.__set__z(i.z);
}
function onPositionChange(e) {
e.target = this;
dispatchEvent(e);
}
function set map(m) {
_map = m;
addEventListener("onPositionChange", m);
addEventListener("onAddMapItem", m);
addEventListener("onRemoveMapItem", m);
//return(map);
}
function get map() {
return(_map);
}
function get model() {
return(_model);
}
function set model(m) {
_model = m;
//return(model);
}
function get type() {
return(_strType);
}
function set type(t) {
_strType = t;
//return(type);
}
function get view() {
return(_view);
}
function set view(v) {
_view = v;
//return(view);
}
var _strType = "mapItem";
}
Symbol 2630 MovieClip [__Packages.com.hitf.tileGameClasses.mapItemClasses.MapItemModel] Frame 0
class com.hitf.tileGameClasses.mapItemClasses.MapItemModel
{
var _vLastPosition, _objBounds, _direction, _velocity, _arrayAABBTiles, dispatchEvent, _vPosition, _mcTarget, _view, _arrayViewTiles;
function MapItemModel () {
init();
}
function init() {
mx.events.EventDispatcher.initialize(this);
position = (new com.wis.math.alg.Vector(0, 0));
_vLastPosition = position.copy();
aabbTiles = ([]);
_objBounds = {};
viewTiles = ([]);
_direction = new com.wis.math.alg.Vector(0, 0);
_velocity = new com.wis.math.alg.Vector(0, 0);
}
function get model() {
return({libraryID:libraryID, type:type, halfwidthX:halfwidthX, halfwidthY:halfwidthY, x:x, y:y, z:z, moveable:moveable, viewable:viewable, walkable:walkable});
}
function get aabbTiles() {
return(_arrayAABBTiles);
}
function set aabbTiles(t) {
_arrayAABBTiles = t;
//return(aabbTiles);
}
function get bounds() {
return(_objBounds);
}
function set bounds(ob) {
_objBounds = ob;
//return(bounds);
}
function get velocity() {
return(_velocity);
}
function set velocity(v) {
_velocity = v;
//return(velocity);
}
function get direction() {
return(_direction);
}
function set direction(v) {
_direction = v;
//return(direction);
}
function get depth() {
return(_numDepth);
}
function set depth(d) {
_numDepth = d;
dispatchEvent({target:this, type:"onDepthChange"});
//return(depth);
}
function get halfwidthX() {
return(_numHalfwidthX);
}
function set halfwidthX(x) {
_numHalfwidthX = x;
//return(halfwidthX);
}
function get halfwidthY() {
return(_numHalfwidthY);
}
function set halfwidthY(y) {
_numHalfwidthY = y;
//return(halfwidthY);
}
function get libraryID() {
return(_strLibraryID);
}
function set libraryID(l) {
_strLibraryID = l;
_objBounds = view.getBounds();
//return(libraryID);
}
function get moveable() {
return(_boolMoveable);
}
function set moveable(m) {
_boolMoveable = m;
//return(moveable);
}
function get name() {
return(_strName);
}
function set name(n) {
_strName = n;
//return(name);
}
function fixPosition(p) {
_vPosition = p;
view.onPositionChange();
}
function get position() {
return(_vPosition);
}
function set position(p) {
var _local2 = true;
if (p.equal(_vLastPosition)) {
_local2 = false;
}
if (!p.equal(_vPosition)) {
_vLastPosition = _vPosition.copy();
_vPosition = p;
if (_local2) {
dispatchEvent({target:this, type:"onPositionChange"});
}
}
//return(position);
}
function get lastPosition() {
return(_vLastPosition);
}
function get state() {
return(_strState);
}
function set state(s) {
_strState = s;
dispatchEvent({target:this, type:"onStateChange"});
//return(state);
}
function get type() {
return(_strType);
}
function set type(t) {
_strType = t;
//return(type);
}
function get x() {
return(_vPosition.x);
}
function get y() {
return(_vPosition.y);
}
function get target() {
return(_mcTarget);
}
function set target(t) {
_mcTarget = t;
//return(target);
}
function get view() {
return(_view);
}
function set view(v) {
_view = v;
//return(view);
}
function get viewable() {
return(_boolViewable);
}
function set viewable(v) {
_boolViewable = v;
//return(viewable);
}
function get viewTiles() {
return(_arrayViewTiles);
}
function set viewTiles(t) {
_arrayViewTiles = t;
//return(viewTiles);
}
function get visible() {
return(_boolVisible);
}
function set visible(v) {
if (v != _boolVisible) {
_boolVisible = v;
dispatchEvent({target:this, type:"onVisibleChange"});
}
//return(visible);
}
function get walkable() {
return(_boolWalkable);
}
function set walkable(w) {
_boolWalkable = w;
//return(walkable);
}
function get z() {
return(_numZ);
}
function set z(i) {
_numZ = i;
dispatchEvent({target:this, type:"onZChange"});
//return(z);
}
var _numDepth = -1;
var _numHalfwidthX = 0;
var _numHalfwidthY = 0;
var _strLibraryID = "";
var _boolMoveable = false;
var _strName = "";
var _strState = "";
var _strType = "mapItem";
var _boolViewable = true;
var _boolVisible = false;
var _boolWalkable = false;
var _numZ = 0;
}
Symbol 2631 MovieClip [__Packages.com.wis.math.alg.Vector] Frame 0
class com.wis.math.alg.Vector
{
var x, y, z, $b3;
function Vector (vx, vy, vz) {
x = vx;
y = vy;
z = vz;
if (vz != undefined) {
$b3 = true;
} else {
$b3 = false;
}
}
function toString() {
var _local2;
if ($b3) {
_local2 = ((((("[" + x) + ",") + y) + ",") + z) + "]";
} else {
_local2 = ((("[" + x) + ",") + y) + "]";
}
return(_local2);
}
function resetComponents(vx, vy, vz) {
x = vx;
y = vy;
if ($b3) {
z = vz;
}
}
function copyComponents(V) {
x = V.x;
y = V.y;
if ($b3) {
z = V.z;
}
}
function incrementX(incX) {
x = x + incX;
}
function incrementY(incY) {
y = y + incY;
}
function incrementZ(incZ) {
if ($b3) {
z = z + incZ;
}
}
function incrementComponents(incX, incY, incZ) {
x = x + incX;
y = y + incY;
if ($b3) {
z = z + incZ;
}
}
function adds(V) {
x = x + V.x;
y = y + V.y;
if ($b3) {
z = z + V.z;
}
return(this);
}
function returnAddition(V) {
var _local3;
if ($b3) {
_local3 = new com.wis.math.alg.Vector(x + V.x, y + V.y, z + V.z);
} else {
_local3 = new com.wis.math.alg.Vector(x + V.x, y + V.y);
}
return(_local3);
}
function subtract(V) {
x = x - V.x;
y = y - V.y;
if ($b3) {
z = z - V.z;
}
return(this);
}
function returnSubtraction(V) {
var _local3;
if ($b3) {
_local3 = new com.wis.math.alg.Vector(x - V.x, y - V.y, z - V.z);
} else {
_local3 = new com.wis.math.alg.Vector(x - V.x, y - V.y);
}
return(_local3);
}
function scalar(s) {
x = x * s;
y = y * s;
if ($b3) {
z = z * s;
}
}
function returnScalar(s) {
var _local3;
if ($b3) {
_local3 = new com.wis.math.alg.Vector(x * s, y * s, z * s);
} else {
_local3 = new com.wis.math.alg.Vector(x * s, y * s);
}
return(_local3);
}
function scalarComponent(V) {
var _local2;
if ($b3) {
_local2 = new com.wis.math.alg.Vector(x, y, z);
} else {
_local2 = new com.wis.math.alg.Vector(x, y);
}
_local2.unitVector(V);
return(dotProduct(_local2));
}
function divide(s) {
x = x / s;
y = y / s;
if ($b3) {
z = z / s;
}
return(this);
}
function returnDivide(s) {
var _local3;
if ($b3) {
_local3 = new com.wis.math.alg.Vector(x / s, y / s, z / s);
} else {
_local3 = new com.wis.math.alg.Vector(x / s, y / s);
}
return(_local3);
}
function dotProduct(V) {
var _local3;
if ($b3) {
_local3 = ((x * V.x) + (y * V.y)) + (z * V.z);
} else {
_local3 = (x * V.x) + (y * V.y);
}
return(_local3);
}
function crossProduct(V) {
var _local2 = new com.wis.math.alg.Vector(0, 0, 0);
if ($b3) {
_local2.x = (y * V.z) - (z * V.y);
_local2.y = (z * V.x) - (x * V.z);
_local2.z = (x * V.y) - (y * V.x);
} else {
_local2.x = 0;
_local2.y = 0;
_local2.z = (x * V.y) - (y * V.x);
}
return(_local2);
}
function norm() {
var _local2;
if ($b3) {
_local2 = Math.sqrt(((x * x) + (y * y)) + (z * z));
} else {
_local2 = Math.sqrt((x * x) + (y * y));
}
return(_local2);
}
function unitVector() {
var _local2;
var _local3 = norm();
if ($b3) {
_local2 = new com.wis.math.alg.Vector(x, y, z);
} else {
_local2 = new com.wis.math.alg.Vector(x, y);
}
_local2.x = _local2.x / _local3;
_local2.y = _local2.y / _local3;
if ($b3) {
_local2.z = _local2.z / _local3;
}
return(_local2);
}
function normalize() {
var _local2 = norm();
x = x / _local2;
y = y / _local2;
if ($b3) {
z = z / _local2;
}
}
function swap(V) {
var _local5;
var _local4;
var _local3;
_local5 = x;
_local4 = y;
x = V.x;
y = V.y;
V.x = _local5;
V.y = _local4;
if ($b3) {
_local3 = z;
z = V.z;
V.z = _local3;
}
}
function angleVector(V) {
return(dotProduct(V) / (norm() * V.norm()));
}
function areaPara(V) {
var _local2;
if ($b3) {
_local2 = new com.wis.math.alg.Vector(x, y, z);
} else {
_local2 = new com.wis.math.alg.Vector(x, y);
}
_local2.crossProduct(V);
return(_local2.norm());
}
function areaTriangle(A, B) {
var _local2;
var _local3;
if ($b3) {
_local2 = new com.wis.math.alg.Vector(x, y, z);
_local3 = new com.wis.math.alg.Vector(x, y, z);
} else {
_local2 = new com.wis.math.alg.Vector(x, y);
_local3 = new com.wis.math.alg.Vector(x, y);
}
_local2 = subtract(A);
_local3 = subtract(B);
return(0.5 * _local2.areaPara(_local3));
}
function volumePara3d(A, B) {
var _local2 = new com.wis.math.alg.Vector(x, y, z);
_local2 = A.crossProduct(B);
return(Math.abs(A.dotProduct(_local2)));
}
function perp() {
var _local2;
if ($b3) {
_local2 = new com.wis.math.alg.Vector(-y, x, z);
} else {
_local2 = new com.wis.math.alg.Vector(-y, x);
}
return(_local2);
}
function fromPointVals(x1, x2, y1, y2, z1, z2) {
var _local1;
if (z1) {
_local1 = new com.wis.math.alg.Vector(x2 - x1, y2 - y1, z2 - z1);
} else {
_local1 = new com.wis.math.alg.Vector(x2 - x1, y2 - y1);
}
return(_local1);
}
function equal(V) {
var _local3;
if ($b3) {
_local3 = ((round3(x) == round3(V.x)) && (round3(y) == round3(V.y))) && (round3(z) == round3(V.z));
} else {
_local3 = (round3(x) == round3(V.x)) && (round3(y) == round3(V.y));
}
return(_local3);
}
function sameDirection(V) {
var _local3;
var _local2;
if ($b3) {
_local3 = new com.wis.math.alg.Vector(x, y, z);
_local2 = new com.wis.math.alg.Vector(x, y, z);
} else {
_local3 = new com.wis.math.alg.Vector(x, y);
_local2 = new com.wis.math.alg.Vector(x, y);
}
_local3.unitVector(this);
_local2.unitVector(V);
return(_local3.equal(_local2));
}
function greater(V) {
var _local3;
if ($b3) {
_local3 = ((round3(x) > round3(V.x)) && (round3(y) > round3(V.y))) && (round3(z) > round3(V.z));
} else {
_local3 = (round3(x) > round3(V.x)) && (round3(y) > round3(V.y));
}
return(_local3);
}
function greaterEqual(V) {
var _local3;
if ($b3) {
_local3 = ((round3(x) >= round3(V.x)) && (round3(y) >= round3(V.y))) && (round3(z) >= round3(V.z));
} else {
_local3 = (round3(x) >= round3(V.x)) && (round3(y) >= round3(V.y));
}
return(_local3);
}
function less(V) {
var _local3;
if ($b3) {
_local3 = ((round3(x) < round3(V.x)) && (round3(y) < round3(V.y))) && (round3(z) < round3(V.z));
} else {
_local3 = (round3(x) < round3(V.x)) && (round3(y) < round3(V.y));
}
return(_local3);
}
function lessEqual(V) {
var _local3;
if ($b3) {
_local3 = ((round3(x) <= round3(V.x)) && (round3(y) <= round3(V.y))) && (round3(z) <= round3(V.z));
} else {
_local3 = (round3(x) <= round3(V.x)) && (round3(y) <= round3(V.y));
}
return(_local3);
}
function round3(n) {
return(Math.round(n * 1000) / 1000);
}
function inv() {
return(new com.wis.math.alg.Vector(1 / x, 1 / y, 1 / z));
}
function get _len() {
return(Math.sqrt(((x * x) + (y * y)) + (z * z)));
}
function get _lenSq() {
return(((x * x) + (y * y)) + (z * z));
}
function copy() {
return(new com.wis.math.alg.Vector(x, y, z));
}
function transform(trans, dontTranslate) {
var _local5;
var _local4;
var _local3;
if (dontTranslate) {
_local5 = dot(trans.$vx, this);
_local4 = dot(trans.$vy, this);
_local3 = dot(trans.$vz, this);
} else {
_local5 = dot(trans.$vx, this) + trans.$c.x;
_local4 = dot(trans.$vy, this) + trans.$c.y;
_local3 = dot(trans.$vz, this) + trans.$c.z;
}
x = _local5;
y = _local4;
z = _local3;
}
function transformed(trans, dontTranslate) {
if (dontTranslate) {
return(new com.wis.math.alg.Vector(dot(trans.$vx, this), dot(trans.$vy, this), dot(trans.$vz, this)));
}
return(new com.wis.math.alg.Vector(dot(trans.$vx, this) + trans.$c.x, dot(trans.$vy, this) + trans.$c.y, dot(trans.$vz, this) + trans.$c.z));
}
static function normalizer(vec) {
var _local1 = 1 / vec.__get___len();
return(new com.wis.math.alg.Vector(vec.x * _local1, vec.y * _local1, vec.z * _local1));
}
static function neg(v) {
return(new com.wis.math.alg.Vector(-v.x, -v.y, -v.z));
}
static function adder(v1, v2) {
return(new com.wis.math.alg.Vector(v1.x + v2.x, v1.y + v2.y, v1.z + v2.z));
}
static function scaler(v1, s) {
return(new com.wis.math.alg.Vector(v1.x * s, v1.y * s, v1.z * s));
}
static function compare(v1, v2) {
return(((v1.x == v2.x) && (v1.y == v2.y)) && (v1.z == v2.z));
}
static function mult(v1, v2) {
return(new com.wis.math.alg.Vector(v1.x * v2.x, v1.y * v2.y, v1.z * v2.z));
}
static function dot(v1, v2) {
return(((v1.x * v2.x) + (v1.y * v2.y)) + (v1.z * v2.z));
}
static function cross(v1, v2) {
return(new com.wis.math.alg.Vector((v1.y * v2.z) - (v1.z * v2.y), (v1.z * v2.x) - (v1.x * v2.z), (v1.x * v2.y) - (v1.y * v2.x)));
}
static var XX = new com.wis.math.alg.Vector(1, 0, 0);
static var YY = new com.wis.math.alg.Vector(0, 1, 0);
static var ZZ = new com.wis.math.alg.Vector(0, 0, 1);
static var OO = new com.wis.math.alg.Vector(0, 0, 0);
}
Symbol 2632 MovieClip [__Packages.com.wis.math.geom.util.Transformation] Frame 0
class com.wis.math.geom.util.Transformation
{
var $vx, $vy, $vz, $c, $identity, $inverse;
function Transformation (vx, vy, vz, c, dontFindInverse, actualOrder) {
if (actualOrder) {
$vx = vx;
$vy = vy;
$vz = vz;
} else {
$vx = new com.wis.math.alg.Vector(vx.x, vy.x, vz.x);
$vy = new com.wis.math.alg.Vector(vx.y, vy.y, vz.y);
$vz = new com.wis.math.alg.Vector(vx.z, vy.z, vz.z);
}
$c = c;
$identity = false;
if (((com.wis.math.alg.Vector.compare(vx, com.wis.math.alg.Vector.XX) && (com.wis.math.alg.Vector.compare(vy, com.wis.math.alg.Vector.YY))) && (com.wis.math.alg.Vector.compare(vz, com.wis.math.alg.Vector.ZZ))) && (com.wis.math.alg.Vector.compare(c, com.wis.math.alg.Vector.OO))) {
$identity = true;
}
if ((typeof(dontFindInverse) == "undefined") || (!dontFindInverse)) {
if ($identity) {
$inverse = this;
} else {
$inverse = findInverse(this);
}
}
}
function copy() {
var _local3 = true;
if (typeof($inverse) == "undefined") {
_local3 = false;
}
var _local2 = new com.wis.math.geom.util.Transformation($vx.copy(), $vy.copy(), $vz.copy(), $c.copy(), _local3, true);
if (_local3) {
if (!$identity) {
_local2.$inverse = new com.wis.math.geom.util.Transformation($inverse.$vx.copy(), $inverse.$vy.copy(), $inverse.$vz.copy(), $inverse.$c.copy(), true, true);
} else {
_local2.$inverse = _local2;
}
}
return(_local2);
}
function findInverse(trans) {
var _local2 = reducedRowEchelonForm([[trans.$vx.x, trans.$vx.y, trans.$vx.z, 1, 0, 0], [trans.$vy.x, trans.$vy.y, trans.$vy.z, 0, 1, 0], [trans.$vz.x, trans.$vz.y, trans.$vz.z, 0, 0, 1]]);
$vx = new com.wis.math.alg.Vector(_local2[0][3], _local2[0][4], _local2[0][5]);
$vy = new com.wis.math.alg.Vector(_local2[1][3], _local2[1][4], _local2[1][5]);
$vz = new com.wis.math.alg.Vector(_local2[2][3], _local2[2][4], _local2[2][5]);
var _local4 = new com.wis.math.geom.util.Transformation(new com.wis.math.alg.Vector($vx.x, $vy.x, $vz.x), new com.wis.math.alg.Vector($vx.y, $vy.y, $vz.y), new com.wis.math.alg.Vector($vx.z, $vy.z, $vz.z), new com.wis.math.alg.Vector(0, 0, 0), true);
_local4.$c = com.wis.math.alg.Vector.neg(trans.$c.transformed(_local4));
_local4.$inverse = trans;
return(_local4);
}
static function reducedRowEchelonForm(rows) {
var _local7 = rows.length;
var _local5 = rows[0].length;
var _local6;
var _local2;
var _local4;
var _local1;
var _local9;
var _local8;
_local2 = 0;
while (_local2 < _local7) {
if (Math.abs(rows[_local2][_local2] - 0) < $ACCURACY) {
_local4 = _local2 + 1;
while (_local4 < _local7) {
if (Math.abs(rows[_local4][_local2] - 0) > $ACCURACY) {
_local1 = 0;
while (_local1 < _local5) {
_local6 = rows[_local2][_local1];
rows[_local2][_local1] = rows[_local4][_local1];
rows[_local4][_local1] = _local6;
_local1++;
}
break;
}
_local4++;
}
}
_local9 = rows[_local2][_local2];
_local1 = 0;
while (_local1 < _local5) {
rows[_local2][_local1] = rows[_local2][_local1] / _local9;
_local1++;
}
_local4 = 0;
while (_local4 < _local7) {
if (_local4 != _local2) {
_local8 = rows[_local4][_local2];
_local1 = _local2;
while (_local1 < _local5) {
rows[_local4][_local1] = rows[_local4][_local1] - (rows[_local2][_local1] * _local8);
_local1++;
}
}
_local4++;
}
_local2++;
}
return(rows);
}
function toString() {
var _local4 = [[$vx.x, $vx.y, $vx.z], [$vy.x, $vy.y, $vy.z], [$vz.x, $vz.y, $vz.z], [$c.x, $c.y, $c.z]];
var _local3;
var _local2;
var _local5;
_local5 = "[ ";
_local3 = 0;
while (_local3 < _local4.length) {
_local2 = 0;
while (_local2 < _local4[_local3].length) {
if (Math.abs(_local4[_local3][_local2] - 0) < $ACCURACY) {
_local5 = _local5 + "0 ";
} else {
_local5 = _local5 + (_local4[_local3][_local2] + " ");
}
_local2++;
}
if (_local3 < (_local4.length - 1)) {
_local5 = _local5 + "\n ";
}
_local3++;
}
return(_local5 + " ]");
}
static function multipleTrans(trans_arr) {
if (trans_arr.length == 0) {
return($IdentityTrans);
}
var _local1;
var _local2;
if (trans_arr.length == 1) {
_local1 = trans_arr[0].copy();
} else {
_local1 = trans_arr[0];
}
_local2 = 1;
while (_local2 < trans_arr.length) {
_local1 = new com.wis.math.geom.util.Transformation(new com.wis.math.alg.Vector(com.wis.math.alg.Vector.dot(trans_arr[_local2].$vx, new com.wis.math.alg.Vector(_local1.$vx.x, _local1.$vy.x, _local1.$vz.x)), com.wis.math.alg.Vector.dot(trans_arr[_local2].$vx, new com.wis.math.alg.Vector(_local1.$vx.y, _local1.$vy.y, _local1.$vz.y)), com.wis.math.alg.Vector.dot(trans_arr[_local2].vx, new com.wis.math.alg.Vector(_local1.$vx.z, _local1.$vy.z, _local1.$vz.z))), new com.wis.math.alg.Vector(com.wis.math.alg.Vector.dot(trans_arr[_local2].$vy, new com.wis.math.alg.Vector(_local1.$vx.x, _local1.$vy.x, _local1.$vz.x)), com.wis.math.alg.Vector.dot(trans_arr[_local2].$vy, new com.wis.math.alg.Vector(_local1.$vx.y, _local1.$vy.y, _local1.$vz.y)), com.wis.math.alg.Vector.dot(trans_arr[_local2].vy, new com.wis.math.alg.Vector(_local1.$vx.z, _local1.$vy.z, _local1.$vz.z))), new com.wis.math.alg.Vector(com.wis.math.alg.Vector.dot(trans_arr[_local2].$vz, new com.wis.math.alg.Vector(_local1.$vx.x, _local1.$vy.x, _local1.$vz.x)), com.wis.math.alg.Vector.dot(trans_arr[_local2].$vz, new com.wis.math.alg.Vector(_local1.$vx.y, _local1.$vy.y, _local1.$vz.y)), com.wis.math.alg.Vector.dot(trans_arr[_local2].vz, new com.wis.math.alg.Vector(_local1.$vx.z, _local1.$vy.z, _local1.$vz.z))), _local1.$c.transformed(trans_arr[_local2]), false, true);
_local2++;
}
return(_local1);
}
function scale(amount) {
return(new com.wis.math.geom.util.Transformation(com.wis.math.alg.Vector.scaler(com.wis.math.alg.Vector.XX, amount.x), com.wis.math.alg.Vector.scaler(com.wis.math.alg.Vector.YY, amount.y), com.wis.math.alg.Vector.scaler(com.wis.math.alg.Vector.ZZ, amount.z), com.wis.math.alg.Vector.OO));
}
function rotate(dim, amnt) {
if ((dim == 0) || (dim == "x")) {
return(new com.wis.math.geom.util.Transformation(com.wis.math.alg.Vector.XX, com.wis.math.alg.Vector.adder(com.wis.math.alg.Vector.scaler(com.wis.math.alg.Vector.YY, Math.cos(amnt)), com.wis.math.alg.Vector.scaler(com.wis.math.alg.Vector.ZZ, Math.sin(amnt))), com.wis.math.alg.Vector.adder(com.wis.math.alg.Vector.scaler(com.wis.math.alg.Vector.ZZ, Math.cos(amnt)), com.wis.math.alg.Vector.neg(com.wis.math.alg.Vector.scaler(com.wis.math.alg.Vector.YY, Math.sin(amnt)))), com.wis.math.alg.Vector.OO));
}
if ((dim == 1) || (dim == "y")) {
return(new com.wis.math.geom.util.Transformation(com.wis.math.alg.Vector.adder(com.wis.math.alg.Vector.scaler(com.wis.math.alg.Vector.XX, Math.cos(amnt)), com.wis.math.alg.Vector.neg(com.wis.math.alg.Vector.scaler(com.wis.math.alg.Vector.ZZ, Math.sin(amnt)))), com.wis.math.alg.Vector.YY, com.wis.math.alg.Vector.adder(com.wis.math.alg.Vector.scaler(com.wis.math.alg.Vector.ZZ, Math.cos(amnt)), com.wis.math.alg.Vector.scaler(com.wis.math.alg.Vector.XX, Math.sin(amnt))), com.wis.math.alg.Vector.OO));
}
if ((dim == 2) || (dim == "z")) {
return(new com.wis.math.geom.util.Transformation(com.wis.math.alg.Vector.adder(com.wis.math.alg.Vector.scaler(com.wis.math.alg.Vector.XX, Math.cos(amnt)), com.wis.math.alg.Vector.scaler(com.wis.math.alg.Vector.YY, Math.sin(amnt))), com.wis.math.alg.Vector.adder(com.wis.math.alg.Vector.scaler(com.wis.math.alg.Vector.YY, Math.cos(amnt)), com.wis.math.alg.Vector.neg(com.wis.math.alg.Vector.scaler(com.wis.math.alg.Vector.XX, Math.sin(amnt)))), com.wis.math.alg.Vector.ZZ, com.wis.math.alg.Vector.OO));
}
}
function translate(amount) {
return(new com.wis.math.geom.util.Transformation(com.wis.math.alg.Vector.XX, com.wis.math.alg.Vector.YY, com.wis.math.alg.Vector.ZZ, amount));
}
static var $IdentityTrans = new com.wis.math.geom.util.Transformation(com.wis.math.alg.Vector.XX, com.wis.math.alg.Vector.YY, com.wis.math.alg.Vector.ZZ, com.wis.math.alg.Vector.OO);
static var $ACCURACY = 1E-8;
}
Symbol 2633 MovieClip [__Packages.com.hitf.tileGameClasses.mapItemClasses.MapItemView] Frame 0
class com.hitf.tileGameClasses.mapItemClasses.MapItemView
{
var _mcInstance, dispatchEvent, _model;
function MapItemView () {
init();
}
function init() {
mx.events.EventDispatcher.initialize(this);
}
function getBounds() {
var _local3 = {xMin:Infinity, xMax:-Infinity, yMin:Infinity, yMax:-Infinity};
var _local5 = model.__get__target().attachMovie(model.__get__libraryID(), "_mcBounds", -1, {_visible:false});
var _local4 = 1;
while (_local4 <= _local5._totalframes) {
_local5.gotoAndStop(_local4);
var _local2 = _local5.getBounds();
if (_local2.xMin < _local3.xMin) {
_local3.xMin = _local2.xMin;
}
if (_local2.xMax > _local3.xMax) {
_local3.xMax = _local2.xMax;
}
if (_local2.yMin < _local3.yMin) {
_local3.yMin = _local2.yMin;
}
if (_local2.yMax > _local3.yMax) {
_local3.yMax = _local2.yMax;
}
_local4++;
}
_local5.removeMovieClip();
return(_local3);
}
function onDepthChange(e) {
if (model.__get__visible() && (_mcInstance)) {
_mcInstance.swapDepths(model.__get__depth());
}
}
function onMotionFinished() {
dispatchEvent({target:this, type:"onMotionFinished"});
}
function onPositionChange(e) {
if (model.__get__visible() && (_mcInstance)) {
_mcInstance._x = model.__get__position().x;
_mcInstance._y = model.__get__position().y - model.__get__z();
}
}
function onStateChange(e) {
if (model.__get__visible() && (_mcInstance)) {
_mcInstance.gotoAndStop(model.__get__state());
}
}
function onVisibleChange(e) {
if (model.__get__visible() && (!_mcInstance)) {
while (model.__get__target().getInstanceAtDepth(model.__get__depth())) {
model.__set__depth((model.__get__depth()+1));
}
_mcInstance = model.__get__target().attachMovie(model.__get__libraryID(), model.__get__name(), model.__get__depth(), {_x:model.__get__position().x, _y:model.__get__position().y - model.__get__z()});
_mcInstance.onMotionFinished = mx.utils.Delegate.create(this, onMotionFinished);
_mcInstance.gotoAndStop(model.__get__state());
} else if ((!model.__get__visible()) && (_mcInstance)) {
if (model.__get__state() != "lose") {
_mcInstance.swapDepths(0);
_mcInstance.removeMovieClip();
_mcInstance = null;
}
}
}
function onZChange(e) {
if (model.__get__visible() && (_mcInstance)) {
_mcInstance._y = model.__get__position().y - model.__get__z();
}
}
function get model() {
return(_model);
}
function set model(m) {
_model = m;
//return(model);
}
}
Symbol 2634 MovieClip [__Packages.com.hitf.tileGameClasses.AICharacter] Frame 0
class com.hitf.tileGameClasses.AICharacter extends com.hitf.tileGameClasses.Character
{
var __set__type, halfw, __get__model, halfh, ary_xoff, ary_yoff, boardMargin, itemCol, charCol, tgtx, tgty, oldx, oldy, thinkmax, thinkctr, _ary_bonus, ary_smove, stuckctr, stuckmax, mypath, rctr, ary_inpath, ary_cc, _ary_sqs, userIndex, bravery, _seekPlayer, mainctr, numTimer, getUserIndex, prange, myAng, seekingPath, currentAction, lastAction, mynumb, fleedirection, closestD, closestX, closestY, closestAng, closestDeg, trayctr, throwpause, lastVis, _thinkSimple, _amax, ary_eight, ary_c, astarFollowRoute, astarCalcRoute, astar_route, astarctr, startP, endP, _myTile, _boardW, _boardH, __get__inplay, __set__inplay, _hitTimeDiff, defend, ary_open, throwProjectile, __set__throwDirection, ffact, _ary_hints, _ary_tiles, _ary_map, ary_closed;
function AICharacter (t, l, n, d, i) {
super(t, l, n, d, i);
}
function init(t, l, n, d, i) {
super.init(t, l, n, d, i);
mx.transitions.OnEnterFrameBeacon.init();
MovieClip.addListener(this);
__set__type("aiCharacter");
halfw = __get__model().halfwidthX;
halfh = __get__model().halfwidthY;
ary_xoff = new Array(-halfw, halfw, halfw, -halfw);
ary_yoff = new Array(-halfh, -halfh, halfh, halfh);
boardMargin = 50;
itemCol = _root._tileGame.map.view.arrayMapItems;
charCol = _root._tileGame.map.model.characters;
tgtx = __get__model().__get__position().x;
tgty = __get__model().__get__position().y;
oldx = __get__model().__get__position().x;
oldy = __get__model().__get__position().y;
thinkmax = 15;
thinkctr = Math.floor(Math.random() * (thinkmax - 1)) + 1;
_ary_bonus = new Array();
ary_smove = new Array();
stuckctr = 0;
stuckmax = 5;
mypath = new Array();
rctr = 0;
ary_inpath = new Array();
ary_cc = new Array();
_ary_sqs = new Array();
userIndex = 1;
bravery = Math.floor(Math.random() * 4) + 1;
_seekPlayer = false;
mainctr = 0;
numTimer = getTimer();
getUserIndex = true;
prange = 700;
myAng = 0;
seekingPath = false;
currentAction = "";
lastAction = "";
getUserIndex = true;
mynumb = 0;
fleedirection = 0;
closestD = 99999 /* 0x01869F */;
closestX = 0;
closestY = 0;
closestAng = 0;
closestDeg = 0;
trayctr = 0;
throwpause = 0;
ary_hints = (new Array());
ary_hints[0] = new Array();
ary_hints[1] = null;
lastVis = false;
_thinkSimple = false;
_amax = 5;
ary_eight = new Array(new com.wis.math.alg.Vector(1, 0), new com.wis.math.alg.Vector(1, 1), new com.wis.math.alg.Vector(0, 1), new com.wis.math.alg.Vector(-1, 1), new com.wis.math.alg.Vector(-1, 0), new com.wis.math.alg.Vector(-1, -1), new com.wis.math.alg.Vector(0, -1), new com.wis.math.alg.Vector(1, -1));
ary_c = new Array(10, 14, 10, 14, 10, 14, 10, 14);
ary_eight = new Array(new com.wis.math.alg.Vector(1, 0), new com.wis.math.alg.Vector(0, 1), new com.wis.math.alg.Vector(-1, 0), new com.wis.math.alg.Vector(0, -1));
ary_c = new Array(10, 10, 10, 10);
astarFollowRoute = false;
astarCalcRoute = false;
astar_route = new Array();
astarctr = 0;
startP = new com.wis.math.alg.Vector(0, 0);
endP = new com.wis.math.alg.Vector(0, 0);
_myTile = new com.wis.math.alg.Vector(Math.floor(__get__model().__get__position().x / tileSize), Math.floor(__get__model().__get__position().y / tileSize));
}
function initAryChars() {
var _local2 = 0;
while (_local2 < charCol.length) {
var _local3 = charCol[_local2];
if (_local3.type == "userCharacter") {
userIndex = _local2;
getUserIndex = false;
} else if (_local3.model.libraryID == __get__model().__get__libraryID()) {
mynumb = _local2;
mainctr = mynumb;
}
_local2++;
}
}
function dieroll(n) {
return(Math.floor(Math.random() * n));
}
function get myTile() {
_myTile.x = Math.floor(__get__model().__get__position().x / tileSize);
_myTile.y = Math.floor(__get__model().__get__position().y / tileSize);
return(_myTile);
}
function set myTile(v) {
_myTile = v;
//return(myTile);
}
function getTile(cn) {
var _local3 = Math.floor(charCol[cn].model.position.x / tileSize);
var _local2 = Math.floor(charCol[cn].model.position.y / tileSize);
return(new com.wis.math.alg.Vector(_local3, _local2));
}
function get userPosition() {
return(new com.wis.math.alg.Vector(charCol[userIndex].model.position.x, charCol[userIndex].model.position.y));
}
function getUnstuck() {
astar_clear();
currentAction = "getUnstuck";
thinkctr = 0;
thinkmax = 15;
lastAction = "";
stuckctr = 0;
var _local2 = 0;
while (_local2 < ary_eight.length) {
var _local3 = myTile.y + ary_eight[_local2].y;
var _local4 = myTile.x + ary_eight[_local2].x;
if (ary_tiles[_local3][_local4]) {
return(undefined);
}
_local2++;
}
}
function getOutOfDodge(x, y) {
astar_clear();
thinkctr = 2;
thinkmax = 1;
}
function setExplore() {
var _local10 = 4;
var _local17 = _local10 * tileSize;
var _local12 = [];
var _local19 = Math.floor(_boardW / _local17);
var _local13 = Math.floor(_boardH / _local17);
var _local2 = 0;
var _local3 = 0;
var _local14 = new com.wis.math.alg.Vector(Math.floor(__get__model().__get__x() / _local17), Math.floor(__get__model().__get__y() / _local17));
var _local18 = new com.wis.math.alg.Vector(_local14.x, _local14.y);
var _local11 = new Array(new com.wis.math.alg.Vector(1, 0), new com.wis.math.alg.Vector(1, 1), new com.wis.math.alg.Vector(0, 1), new com.wis.math.alg.Vector(-1, 1), new com.wis.math.alg.Vector(-1, 0), new com.wis.math.alg.Vector(-1, -1), new com.wis.math.alg.Vector(0, -1), new com.wis.math.alg.Vector(1, -1));
_local2 = 0;
while (_local2 < _local19) {
var _local8 = [];
_local3 = 0;
while (_local3 < _local13) {
_local8.push(0);
_local3++;
}
_local12.push(_local8);
_local2++;
}
_local2 = 0;
while (_local2 < charCol.length) {
var _local4 = charCol[_local2];
if ((_local4.model.libraryID != __get__model().__get__libraryID()) && (_local4.inplay)) {
_local12[Math.floor(_local4.model.x / _local17)][Math.floor(_local4.model.y / _local17)]++;
}
_local2++;
}
var _local20 = new Array();
var _local26 = 0;
var _local25 = 0;
_local2 = 0;
while (_local2 < _local11.length) {
var _local6 = _local14.x + _local11[_local2].x;
var _local5 = _local14.y + _local11[_local2].y;
if ((((_local6 > 0) && (_local5 > 0)) && (_local6 < _local19)) && (_local5 < _local13)) {
if (_local12[_local6][_local5] < 2) {
_local20.push(_local2);
}
}
_local2++;
}
if (_local20.length == 0) {
return(false);
}
var _local24 = dieroll(_local20.length);
_local18.x = _local14.x + _local11[_local20[_local24]].x;
_local18.y = _local14.y + _local11[_local20[_local24]].y;
if (ary_tiles.length > 0) {
var _local23 = 0;
var _local21 = 100;
var _local22 = false;
do {
var _local9 = dieroll(_local10) + (_local18.x * _local10);
var _local7 = dieroll(_local10) + (_local18.y * _local10);
if (ary_tiles[_local7][_local9]) {
var _local16 = (_local9 * tileSize) + (tileSize / 2);
var _local15 = (_local7 * tileSize) + (tileSize / 2);
astarCalcRoute = true;
astar_init(myTile.x, myTile.y, _local9, _local7);
setTarget(_local16, _local15);
_local22 = true;
return(true);
}
} while (_local23 < _local21);
currentAction = "";
}
return(true);
}
function onEnterFrame() {
mainctr++;
if (mainctr < 100) {
if (__get__inplay()) {
__set__inplay(true);
}
if (!__get__inplay()) {
__set__inplay(false);
}
}
if (__get__inplay()) {
if (__get__model().__get__state() == "defending") {
_hitTimeDiff = 9999;
} else if (((((__get__model().__get__health() < 50) && (__get__inplay())) && (_hitTimeDiff < 700)) && (__get__model().__get__state() != "defending")) && (__get__model().__get__projectileQueue().length == 0)) {
defend();
}
charCol = _root._tileGame.map.model.characters;
if (getUserIndex) {
initAryChars();
} else if (ary_tiles.length > 0) {
}
if ((__get__model().__get__health() > 0) && (_root._tileGame.map.model.arrayCharacterDistances.length != undefined)) {
var _local7 = _root._tileGame.map.model.arrayCharacterDistances[mynumb][userIndex];
var _local3 = getClosestD();
closestD = _local3[0];
thinkctr++;
throwpause--;
if ((currentAction == "chasePlayer") && (__get__model().__get__projectileQueue().length == 0)) {
lastAction = currentAction;
currentAction = "";
}
if ((thinkctr > thinkmax) && (!astarFollowRoute)) {
lastAction = currentAction;
currentAction = "";
}
if ((__get__model().__get__projectileQueue().length == 0) && ((astar_route.length == 0) || (currentAction == "chasePlayer"))) {
currentAction = "explore";
setExplore();
thinkctr = 0;
thinkmax = 45;
} else if (((_local7 < (tileSize * 3)) && (__get__model().__get__projectileQueue().length > 0)) && ((amax < 4) || (_seekPlayer))) {
astar_clear();
currentAction = "chasePlayer";
thinkctr = 0;
thinkmax = 2;
} else if (((closestD < (tileSize * 2)) && (amax < 3)) && (currentAction != "evade")) {
currentAction = "evade";
setEvade();
thinkctr = 0;
thinkmax = 10;
} else if (((mainctr % (3 * amax)) == 0) || (thinkctr > thinkmax)) {
if ((currentAction == "") || (_local3[3] > 3)) {
if (currentAction != "explore") {
currentAction = "explore";
setExplore();
thinkctr = 0;
thinkmax = 45;
}
} else if ((closestD < (tileSize * 2)) && (__get__model().__get__projectileQueue().length == 0)) {
currentAction = "evade";
setEvade();
thinkctr = 0;
thinkmax = 5;
} else if (astar_route.length == 0) {
if (((__get__model().__get__health() > 20) && (__get__model().__get__projectileQueue().length > 0)) && (closestD < (tileSize * 4))) {
currentAction = "pursue";
thinkctr = 0;
thinkmax = 2;
} else {
currentAction = "explore";
setExplore();
thinkctr = 0;
thinkmax = 45;
}
}
}
if (currentAction == "pursue") {
setTarget(_local3[1], _local3[2]);
}
if (currentAction == "chasePlayer") {
setTarget(charCol[userIndex].x, charCol[userIndex].y);
}
if (astarCalcRoute) {
if (ary_open.length > 0) {
setTarget((ary_open[0].x * tileSize) + (tileSize / 2), (ary_open[0].y * tileSize) + (tileSize / 2));
}
astarctr++;
if (astarctr > 10) {
astar_clear();
} else {
var _local4 = astar_maintain();
if (_local4 != null) {
astar_route = _local4;
astarCalcRoute = false;
astarFollowRoute = true;
thinkctr = 0;
thinkmax = 20;
}
}
}
if (astarFollowRoute && (astar_route.length > 0)) {
if (astar_route.length > 0) {
if ((myTile.x == astar_route[0].x) && (myTile.y == astar_route[0].y)) {
astar_route.splice(0, 1);
}
}
if (astar_route.length > 0) {
var _local6 = (astar_route[0].x * tileSize) + (tileSize / 2);
var _local5 = (astar_route[0].y * tileSize) + (tileSize / 2);
thinkctr = 0;
setTarget(_local6, _local5);
} else {
lastAction = currentAction;
currentAction = "";
astar_clear();
}
}
if ((__get__model().__get__state().indexOf("Throw") == -1) && (__get__model().__get__visible())) {
checkThrow();
}
if ((((__get__model().__get__state() != "collision") && (__get__model().__get__state() != "defending")) && (__get__model().__get__state() != "specialMove")) && (__get__model().__get__state() != "specialMoveCollision")) {
doMove();
}
}
}
}
function doThinkin() {
if (__get__inplay()) {
if (getUserIndex) {
initAryChars();
} else if (ary_tiles.length > 0) {
var _local7 = getClosestD();
closestD = _local7[0];
var _local8 = _root._tileGame.map.model.arrayCharacterDistances[mynumb][userIndex];
var _local6 = false;
if ((_local8 < 1200) && (__get__model().__get__projectileQueue().length > 0)) {
currentAction = "pursuePlayer";
_local6 = true;
}
if (_local6) {
if (!(currentAction === "pursuePlayer")) {
} else {
thinkctr = 0;
thinkmax = 45;
astarCalcRoute = true;
var _local5 = getTile(userIndex).x;
var _local4 = getTile(userIndex).y;
if (!ary_tiles[_local4][_local5]) {
var _local3 = 0;
while (_local3 < ary_eight.length) {
if (ary_tiles[_local4 + ary_eight[_local3].y][_local5 + ary_eight[_local3].x]) {
_local4 = _local4 + ary_eight[_local3].y;
_local5 = _local5 + ary_eight[_local3].x;
}
_local3++;
}
}
astar_init(myTile.x, myTile.y, _local5, _local4);
}
}
}
}
}
function getClosestD() {
var _local6 = 99999 /* 0x01869F */;
var _local8 = 0;
var _local7 = 0;
var _local9 = 0;
var _local3 = 0;
while (_local3 < charCol.length) {
var _local4 = charCol[_local3];
if (((_local3 != mynumb) && (_local4.model.health > 0)) && (charCol[_local3].inplay)) {
var _local5 = _root._tileGame.map.model.arrayCharacterDistances[mynumb][_local3];
if (_local5 < _local6) {
_local6 = _local5;
_local8 = _local4.model.position.x;
_local7 = _local4.model.position.y;
}
if (_local5 < 300) {
_local9++;
}
}
_local3++;
}
return(new Array(_local6, _local8, _local7, _local9));
}
function dhTrace(s) {
}
function setEvade() {
var _local11 = 999;
var _local4 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
var _local3 = 0;
while (_local3 < charCol.length) {
if ((_local3 != mynumb) && (charCol[_local3].inplay)) {
var _local6 = getTile(_local3).x - myTile.x;
var _local5 = getTile(_local3).y - myTile.y;
if ((Math.abs(_local6) <= 1) && (Math.abs(_local5) < 1)) {
var _local2 = 0;
while (_local2 < ary_eight.length) {
if ((ary_eight[_local2].x == _local6) && (ary_eight[_local2].y == _local5)) {
_local4[_local2]++;
}
_local2++;
}
}
}
_local3++;
}
var _local7 = 999;
var _local8 = 0;
_local3 = 0;
while (_local3 < _local4.length) {
if ((_local4[_local3] < _local7) && (ary_tiles[myTile.y + ary_eight[_local3].y][myTile.x + ary_eight[_local3].x])) {
_local7 = _local4[_local3];
_local8 = _local3;
}
_local3++;
}
var _local10 = ((myTile.x + ary_eight[_local8].x) * tileSize) + (tileSize / 2);
var _local9 = ((myTile.y + ary_eight[_local8].y) * tileSize) + (tileSize / 2);
setTarget(_local10, _local9);
}
function checkThrow() {
var _local19 = __get__model().__get__health();
var _local17 = __get__model().__get__direction().x;
var _local16 = __get__model().__get__direction().y;
var _local15 = 30;
var _local18 = 0;
myAng = Math.atan2(_local16, _local17);
var _local14 = (myAng * 180) / Math.PI;
if ((__get__model().__get__projectileQueue().length > 0) && (throwpause < 1)) {
var _local4 = 0;
while (_local4 < charCol.length) {
if (_local4 != mynumb) {
var _local8 = charCol[_local4];
if (_local8.model.health > 0) {
var _local7 = _root._tileGame.map.model.arrayCharacterDistances[mynumb][_local4];
if (_local7 != undefined) {
if (_local7 < (prange / 2)) {
var _local10 = _local8.model.position.x;
var _local9 = _local8.model.position.y;
var _local6 = _local10 - __get__model().__get__position().x;
var _local5 = _local9 - __get__model().__get__position().y;
var _local11 = Math.atan2(_local5, _local6);
var _local12 = (_local11 * 180) / Math.PI;
var _local3 = Math.abs(_local14 - _local12);
if (_local3 > 180) {
_local3 = 360 - _local3;
}
var _local13 = checkClearPath(__get__model().__get__position().x, __get__model().__get__position().y, 5, 5, _local10, _local9);
if (((_local3 < _local15) && (_local13)) || ((_local7 < 155) && (_local3 < 80))) {
throwProjectile();
__set__throwDirection(new com.wis.math.alg.Vector(_local6, _local5));
throwpause = 15;
return(undefined);
}
if (((_local7 < 75) && (_local4 == userIndex)) && (_local3 < 95)) {
throwProjectile();
__set__throwDirection(new com.wis.math.alg.Vector(_local6, _local5));
__get__model().__set__direction(new com.wis.math.alg.Vector(_local6, _local5));
__get__model().__set__velocity(__get__model().__get__direction().returnScalar(0));
throwpause = 15;
return(undefined);
}
}
}
}
}
_local4++;
}
}
}
function setTarget(x1, y1) {
if ((x1 != undefined) && (y1 != undefined)) {
tgtx = x1;
tgty = y1;
}
}
function doMove() {
if ((Math.abs(oldx - __get__model().__get__position().x) < 5) && (Math.abs(oldy - __get__model().__get__position().y) < 5)) {
stuckctr++;
} else {
oldx = __get__model().__get__position().x;
oldy = __get__model().__get__position().y;
stuckctr = 0;
}
if (stuckctr > stuckmax) {
getUnstuck();
return(undefined);
}
steerCharacter();
}
function steerCharacter() {
var _local6 = tgtx - __get__model().__get__position().x;
var _local5 = tgty - __get__model().__get__position().y;
var _local8 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
if ((currentAction == "chasePlayer") && (_local8 < 100)) {
__get__model().__set__direction(__get__model().__get__direction().returnAddition(new com.wis.math.alg.Vector(_local6, _local5, 0)));
__get__model().__set__velocity(__get__model().__get__direction().returnScalar(0));
} else {
if ((_local8 < (__get__model().__get__maxSpeed() * 2)) && (!astarFollowRoute)) {
currentAction = "";
thinkctr = 100;
thinkmax = 0;
return(undefined);
}
var _local9 = __get__model().__get__maxSpeed();
_local6 = (_local9 * _local6) / _local8;
_local5 = (_local9 * _local5) / _local8;
var _local10 = new com.wis.math.alg.Vector(__get__model().__get__position().x + _local6, __get__model().__get__position().y + _local5);
var _local7 = new com.wis.math.alg.Vector(Math.floor(_local10.x / tileSize), Math.floor(_local10.y / tileSize));
if (ary_tiles[_local7.y][_local7.x] || ((_local7.y == myTile.y) && (_local7.x == myTile.x))) {
__get__model().__set__direction(__get__model().__get__direction().returnAddition(new com.wis.math.alg.Vector(_local6 / 8, _local5 / 8, 0)));
__get__model().__set__velocity(__get__model().__get__direction().returnScalar(__get__model().__get__maxSpeed()));
} else {
var _local4 = new com.wis.math.alg.Vector(_local7.x - myTile.x, _local7.y - myTile.y);
var _local3 = 0;
var _local2 = 0;
_local2 = 0;
while (_local2 < ary_eight.length) {
if ((ary_eight[_local2].x == _local4.x) && (ary_eight[_local2].y == _local4.y)) {
_local3 = _local2;
}
_local2++;
}
_local2 = 1;
while (_local2 <= 3) {
if (ary_tiles[myTile.y + ary_eight[_local3 + _local2].y][myTile.x + ary_eight[_local3 + _local2].x] != undefined) {
if (ary_tiles[myTile.y + ary_eight[_local3 + _local2].y][myTile.x + ary_eight[_local3 + _local2].x]) {
setTarget(((myTile.x + ary_eight[_local3 + _local2].x) * tileSize) + (tileSize / 2), ((myTile.y + ary_eight[_local3 + _local2].y) * tileSize) + (tileSize / 2));
return(undefined);
}
}
if (ary_tiles[myTile.y + ary_eight[_local3 - _local2].y][myTile.x + ary_eight[_local3 - _local2].x] != undefined) {
if (ary_tiles[myTile.y + ary_eight[_local3 - _local2].y][myTile.x + ary_eight[_local3 - _local2].x]) {
setTarget(((myTile.x + ary_eight[_local3 - _local2].x) * tileSize) + (tileSize / 2), ((myTile.y + ary_eight[_local3 - _local2].y) * tileSize) + (tileSize / 2));
return(undefined);
}
}
_local2++;
}
}
}
}
function retLow(n1, n2) {
if (n1 < n2) {
return(n1);
}
return(n2);
}
function retHigh(n1, n2) {
if (n1 > n2) {
return(n1);
}
return(n2);
}
function checkClearPath(startx, starty, hw, hh, endx, endy) {
var _local34;
var _local33;
var _local32;
var _local31;
var _local30 = new Array();
_local34 = retLow(startx, endx);
_local32 = retHigh(startx, endx);
_local33 = retLow(starty, endy);
_local31 = retHigh(starty, endy);
var _local24 = endy - starty;
var _local23 = startx - endx;
var _local25 = (_local24 * startx) + (_local23 * starty);
var _local20 = 0;
while (_local20 < ary_sqs.length) {
var _local3 = ary_sqs[_local20].ary_v;
var _local29 = _local3[0].x - hw;
var _local27 = _local3[2].x + hw;
var _local28 = _local3[0].y - hh;
var _local26 = _local3[2].y + hh;
if (!(((((_local34 < _local29) && (_local32 < _local29)) || ((_local34 > _local27) && (_local32 > _local27))) || ((_local33 < _local28) && (_local31 < _local28))) || ((_local33 > _local26) && (_local31 > _local26)))) {
_local30.push(_local20);
}
_local20++;
}
_local20 = 0;
while (_local20 < _local30.length) {
var _local3 = ary_sqs[_local30[_local20]];
var _local2 = 0;
while (_local2 < 4) {
var _local4 = _local2 + 1;
if (_local4 == 4) {
_local4 = 0;
}
var _local13 = _local3.ary_v[_local4].x + ary_xoff[_local4];
var _local14 = _local3.ary_v[_local4].y + ary_yoff[_local4];
var _local8 = _local3.ary_v[_local2].x + ary_xoff[_local2];
var _local9 = _local3.ary_v[_local2].y + ary_yoff[_local2];
var _local5 = true;
switch (_local2) {
case 0 :
if (starty > _local3.ary_v[_local2].y) {
_local5 = false;
}
break;
case 1 :
if (startx < _local3.ary_v[_local2].x) {
_local5 = false;
}
break;
case 2 :
if (starty < _local3.ary_v[_local2].y) {
_local5 = false;
}
break;
case 3 :
if (startx <= _local3.ary_v[_local2].x) {
break;
}
_local5 = false;
}
if (_local5) {
var _local12 = _local14 - _local9;
var _local11 = _local8 - _local13;
var _local15 = (_local12 * _local8) + (_local11 * _local9);
var _local10 = (_local24 * _local11) - (_local12 * _local23);
if (_local10 != 0) {
var _local6 = ((_local11 * _local25) - (_local23 * _local15)) / _local10;
var _local7 = ((_local24 * _local15) - (_local12 * _local25)) / _local10;
if (!(isNaN(_local6) || (isNaN(_local7)))) {
_local7 = Math.round(_local7);
_local6 = Math.round(_local6);
var _local19 = retLow(_local8, _local13);
var _local17 = retHigh(_local8, _local13);
var _local18 = retLow(_local9, _local14);
var _local16 = retHigh(_local9, _local14);
if ((((_local6 >= (_local19 - ffact)) && (_local6 <= (_local17 + ffact))) && (_local7 >= (_local18 - ffact))) && (_local7 <= (_local16 + ffact))) {
return(false);
}
}
}
}
_local2++;
}
_local20++;
}
return(true);
}
function set thinkSimple(b) {
_thinkSimple = b;
//return(thinkSimple);
}
function get thinkSimple() {
return(_thinkSimple);
}
function set boardW(n) {
_boardW = n;
//return(boardW);
}
function get boardW() {
return(_boardW);
}
function set boardH(n) {
_boardH = n;
//return(boardH);
}
function get boardH() {
return(_boardH);
}
function set ary_sqs(a) {
_ary_sqs = a;
//return(ary_sqs);
}
function get ary_sqs() {
return(_ary_sqs);
}
function set ary_hints(a) {
_ary_hints = a;
//return(ary_hints);
}
function get ary_hints() {
return(_ary_hints);
}
function set ary_tiles(a) {
_ary_tiles = a;
//return(ary_tiles);
}
function get ary_tiles() {
return(_ary_tiles);
}
function set ary_bonus(a) {
_ary_bonus = a;
//return(ary_bonus);
}
function get ary_bonus() {
return(_ary_bonus);
}
function get ary_map() {
return(_ary_map);
}
function set ary_map(a) {
_ary_map = a;
//return(ary_map);
}
function astar_cost(x, y, p) {
return(10 * (Math.abs(x - p.x) + Math.abs(y - p.y)));
}
function astar_init(asx, asy, asx2, asy2) {
setTarget((asx2 * tileSize) + (tileSize / 2), (asy2 * tileSize) + (tileSize / 2));
astarctr = 0;
startP.x = asx;
startP.y = asy;
endP.x = asx2;
endP.y = asy2;
ary_open = new Array(new com.hitf.tileGameClasses.astarob(startP.x, startP.y, null, 0, astar_cost(startP.x, startP.y, endP)));
ary_closed = new Array();
}
function astar_maintain() {
var _local2 = [];
var _local3 = astar_main(9 - amax);
if (_local3) {
_local2 = astar_getPath();
return(_local2);
}
return(null);
}
function astar_getPath() {
var _local9 = [];
var _local7 = 0;
var _local8 = 200;
var _local5 = ary_closed[ary_closed.length - 1].x;
var _local4 = ary_closed[ary_closed.length - 1].y;
var _local3 = ary_closed[ary_closed.length - 1].p;
var _local6 = new Array(new com.wis.math.alg.Vector(_local5, _local4));
ary_closed.splice(ary_closed.length - 1, 1);
do {
var _local2 = 0;
while (_local2 < ary_closed.length) {
if ((ary_closed[_local2].x == _local3.x) && (ary_closed[_local2].y == _local3.y)) {
_local5 = ary_closed[_local2].x;
_local4 = ary_closed[_local2].y;
_local3 = ary_closed[_local2].p;
_local6.push(new com.wis.math.alg.Vector(_local5, _local4));
break;
}
_local2++;
}
_local7++;
} while ((!((_local5 == startP.x) && (_local4 == startP.y))) && (_local7 < _local8));
_local6.reverse();
return(_local6);
}
function astar_main(timeTot) {
var _local9 = true;
var _local5 = 0;
var _local11 = 200;
var _local6 = 0;
var _local10 = getTimer();
do {
var _local4 = ary_open[0].f;
var _local3 = 0;
var _local2 = 1;
while (_local2 < ary_open.length) {
if (ary_open[_local2].f < _local4) {
_local4 = ary_open[_local2].f;
_local3 = _local2;
}
_local2++;
}
if (ary_open[_local3].e == 0) {
ary_closed.push(ary_open[_local3]);
return(true);
}
var _local8 = ary_open[_local3].x * tileSize;
var _local7 = ary_open[_local3].y * tileSize;
ary_closed.push(ary_open[_local3]);
ary_open.splice(_local3, 1);
astar_check(ary_closed[ary_closed.length - 1]);
_local5++;
_local6 = getTimer() - _local10;
if (_local6 >= timeTot) {
return(false);
}
} while (((ary_open.length > 0) && (_local9)) && (_local5 < _local11));
return(true);
}
function astar_check(ob) {
var _local7 = 0;
while (_local7 < ary_eight.length) {
var _local4 = ob.x + ary_eight[_local7].x;
var _local3 = ob.y + ary_eight[_local7].y;
if (ary_tiles[_local3][_local4] != undefined) {
if (ary_tiles[_local3][_local4]) {
var _local9 = true;
var _local2 = 0;
while (_local2 < ary_closed.length) {
if ((_local4 == ary_closed[_local2].x) && (_local3 == ary_closed[_local2].y)) {
_local9 = false;
break;
}
_local2++;
}
if (_local9) {
var _local6 = ob.c + ary_c[_local7];
var _local8 = true;
_local2 = 0;
while (_local2 < ary_open.length) {
if ((ary_open[_local2].x == _local4) && (ary_open[_local2].y == _local3)) {
if (ary_open[_local2].c > _local6) {
ary_open[_local2].p = new com.wis.math.alg.Vector(ob.x, ob.y);
ary_open[_local2].c = _local6;
}
_local8 = false;
}
_local2++;
}
if (_local8) {
ary_open.push(new com.hitf.tileGameClasses.astarob(_local4, _local3, new com.wis.math.alg.Vector(ob.x, ob.y), _local6, astar_cost(_local4, _local3, endP)));
}
}
}
}
_local7++;
}
}
function astar_clear() {
astar_route = new Array();
astarFollowRoute = false;
astarCalcRoute = false;
}
function astar_clearRoute() {
astar_route = new Array();
astarFollowRoute = true;
}
function get amax() {
return(_amax);
}
function set amax(n) {
_amax = n;
//return(amax);
}
function get seekPlayer() {
return(_seekPlayer);
}
function set seekPlayer(b) {
_seekPlayer = b;
//return(seekPlayer);
}
function get myAction() {
return(currentAction);
}
var tileSize = 50;
}
Symbol 2635 MovieClip [__Packages.com.hitf.tileGameClasses.astarob] Frame 0
class com.hitf.tileGameClasses.astarob extends Object
{
var _x, _y, _p, _c, _e, _f;
function astarob (vx, vy, vp, vc, ve) {
super();
_x = vx;
_y = vy;
_p = vp;
_c = vc;
_e = ve;
_f = vc + ve;
}
function get x() {
return(_x);
}
function set x(n) {
_x = n;
//return(x);
}
function get y() {
return(_y);
}
function set y(n) {
_y = n;
//return(y);
}
function get p() {
return(_p);
}
function set p(v) {
_p = v;
//return(p);
}
function get c() {
return(_c);
}
function set c(n) {
_c = n;
_f = _c + _e;
//return(c);
}
function get e() {
return(_e);
}
function set e(n) {
_e = n;
_f = _c + _e;
//return(e);
}
function get f() {
return(_f);
}
function set f(n) {
_f = n;
//return(f);
}
}
Symbol 2636 MovieClip [__Packages.com.hitf.tileGameClasses.UserCharacter] Frame 0
class com.hitf.tileGameClasses.UserCharacter extends com.hitf.tileGameClasses.Character
{
var __set__type, _clearToThrow, _throwPause, _spacePressed, _inplay, _model, __get__model, _intID, walk, _refilling, throwProjectile, defend, _refillID, dispatchEvent, __get__view, specialMove;
function UserCharacter (t, l, n, d, i) {
super(t, l, n, d, i);
}
function init(t, l, n, d, i) {
super.init(t, l, n, d, i);
__set__type("userCharacter");
_clearToThrow = true;
_throwPause = 400;
_spacePressed = false;
_keyManager = new com.hitf.KeyManager();
_keyManager.addEventListener("onArrowPress", this);
_keyManager.addEventListener("onSpacePress", this);
_keyManager.addEventListener("onZPress", this);
_keyManager.addEventListener("onSpaceRelease", this);
_inplay = true;
_model.__set__projectileFillDelay(99999);
__get__model().addEventListener("onProjectileQueueChange", this);
}
function upkeep() {
_clearToThrow = true;
clearInterval(_intID);
}
function onArrowPress(e) {
walk(e.arrow);
_boolProjectile = false;
}
function onSpacePress(e) {
if (__get__model().__get__state().indexOf("standing") != -1) {
switch (__get__model().__get__state()) {
case "standingUp" :
__get__model().__get__direction().x = 0;
__get__model().__get__direction().y = -1;
break;
case "standingRight" :
__get__model().__get__direction().x = 1;
__get__model().__get__direction().y = 0;
break;
case "standingDown" :
__get__model().__get__direction().x = 0;
__get__model().__get__direction().y = 1;
break;
case "standingLeft" :
__get__model().__get__direction().x = -1;
__get__model().__get__direction().y = 0;
break;
}
}
if ((__get__model().__get__projectileQueue().length > 0) && (!_refilling)) {
if (_clearToThrow) {
throwProjectile();
_clearToThrow = false;
_boolProjectile = true;
_intID = setInterval(this, "upkeep", _throwPause);
}
} else if (!_spacePressed) {
defend();
}
_spacePressed = true;
}
function onProjectileQueueChange(e) {
if (!((_root._tileGame.model.cheat == "buffet") || (_root._tileGame.model.cheat == "hummelpummel"))) {
if (__get__model().__get__projectileQueue().length == 0) {
_refillID = setInterval(this, "addOne", 500);
_refilling = true;
dispatchEvent({target:this, type:"onRefill", sillho:true});
}
}
}
function addOne() {
if (_refilling && (__get__model().__get__projectileQueue().length < MAX_PROJECTILES)) {
_model.addProjectile(PROJECTILE_LIBRARY[Math.floor(Math.random() * PROJECTILE_LIBRARY.length)]);
} else {
_refilling = false;
dispatchEvent({target:this, type:"onRefill", sillho:false});
clearInterval(_refillID);
_refillID = setInterval(this, "arrangeTray", 100);
}
}
function arrangeTray() {
__get__view().__get__tray().reshow(this);
clearInterval(_refillID);
}
function onSpaceRelease(e) {
if (e.keyCode == 32) {
_spacePressed = false;
}
}
function onZPress(e) {
specialMove();
_boolProjectile = false;
}
function get throwPause() {
return(_throwPause);
}
function set throwPause(n) {
_throwPause = n;
//return(throwPause);
}
static var PROJECTILE_LIBRARY = ["bakedPotato", "chickenLeg", "cornDog", "donut", "dough", "egg", "pie", "pizza", "sloppyJoe", "turkey", "watermelon"];
static var MAX_PROJECTILES = 6;
var _boolProjectile = false;
var _keyManager = null;
}
Symbol 2637 MovieClip [__Packages.com.hitf.KeyManager] Frame 0
class com.hitf.KeyManager
{
var spaceIsDown, dispatchEvent;
function KeyManager () {
mx.transitions.OnEnterFrameBeacon.init();
MovieClip.addListener(this);
mx.events.EventDispatcher.initialize(this);
Key.addListener(this);
spaceIsDown = false;
}
function onEnterFrame() {
if (Key.isDown(32)) {
spaceIsDown = true;
dispatchEvent({target:this, type:"onSpacePress"});
} else {
spaceIsDown = false;
}
if (Key.isDown(38)) {
if (Key.isDown(39)) {
dispatchEvent({target:this, type:"onArrowPress", arrow:"rightUp"});
} else if (Key.isDown(37)) {
dispatchEvent({target:this, type:"onArrowPress", arrow:"leftUp"});
} else {
dispatchEvent({target:this, type:"onArrowPress", arrow:"up"});
}
} else if (Key.isDown(40)) {
if (Key.isDown(39)) {
dispatchEvent({target:this, type:"onArrowPress", arrow:"rightDown"});
} else if (Key.isDown(37)) {
dispatchEvent({target:this, type:"onArrowPress", arrow:"leftDown"});
} else {
dispatchEvent({target:this, type:"onArrowPress", arrow:"down"});
}
} else if (Key.isDown(39)) {
dispatchEvent({target:this, type:"onArrowPress", arrow:"right"});
} else if (Key.isDown(37)) {
dispatchEvent({target:this, type:"onArrowPress", arrow:"left"});
}
}
function onKeyDown() {
switch (Key.getCode()) {
case 90 :
dispatchEvent({target:this, type:"onZPress"});
break;
case 32 :
spaceIsDown = true;
break;
}
}
function onKeyUp() {
if (Key.getCode() == 32) {
spaceIsDown = false;
dispatchEvent({target:this, type:"onSpaceRelease", keyCode:Key.getCode()});
}
}
}
Symbol 2638 MovieClip [__Packages.com.hitf.tileGameClasses.Projectile] Frame 0
class com.hitf.tileGameClasses.Projectile
{
var _character, dispatchEvent, _map, addEventListener, _model, _view;
function Projectile (t, l, n, d, i) {
init(t, l, n, d, i);
}
function clearEvents() {
MovieClip.removeListener(model);
}
function collision(m) {
if ((m != _character) && (m.type != "projectileMotion")) {
model.__set__velocity(new com.wis.math.alg.Vector(0, 0));
if ((m.type == "aiCharacter") || (m.type == "userCharacter")) {
m.collision(this);
}
return(true);
}
return(false);
}
function init(t, l, n, d, i) {
mx.events.EventDispatcher.initialize(this);
model = (new com.hitf.tileGameClasses.projectileClasses.ProjectileModel());
view = (new com.hitf.tileGameClasses.mapItemClasses.MapItemView());
model.__set__view(view);
view.__set__model(model);
model.addEventListener("onDepthChange", view);
model.addEventListener("onPositionChange", view);
model.addEventListener("onPositionChange", this);
model.addEventListener("onStateChange", view);
model.addEventListener("onVisibleChange", view);
model.addEventListener("onZChange", view);
view.addEventListener("onMotionFinished", this);
model.__set__stateManager(new com.hitf.tileGameClasses.projectileClasses.ProjectileStateManager());
model.__set__target(t);
model.__set__libraryID(l);
model.__set__name(n);
model.__set__depth(d);
character = (i.character);
model.__set__bounds({xMin:i.xMin, xMax:i.xMax, yMin:i.yMin, yMax:i.yMax});
model.__set__friction(0);
model.__set__halfwidthX(Math.floor(i.halfwidthX));
model.__set__halfwidthY(Math.floor(i.halfwidthY));
model.__set__maxDistance(i.maxDistance);
model.__set__position(model.__set__startPosition(new com.wis.math.alg.Vector(i.x, i.y)));
model.__set__viewable(i.viewable);
model.__set__walkable(i.walkable);
model.__set__z(model.__set__startZ(i.z));
dispatchEvent({target:this, type:"onPositionChange"});
}
function onMotionFinished(e) {
dispatchEvent({target:this, type:"onRemoveMapItem"});
}
function onPositionChange(e) {
e.target = this;
dispatchEvent(e);
}
function get character() {
return(_character);
}
function set character(c) {
_character = c;
if (c.__get__type() == "aiCharacter") {
model.__set__direction(c.throwDirection);
} else {
model.__set__direction(c.__get__model().direction);
}
model.__set__maxSpeed(c.__get__model().projectileSpeed);
model.__set__velocity(model.__get__direction().returnScalar(c.__get__model().__get__projectileSpeed()));
//return(character);
}
function get map() {
return(_map);
}
function set map(m) {
_map = m;
addEventListener("onPositionChange", m);
addEventListener("onRemoveMapItem", m);
//return(map);
}
function get model() {
return(_model);
}
function set model(p) {
_model = p;
//return(model);
}
function get type() {
return(_strType);
}
function set type(t) {
_strType = t;
//return(type);
}
function get view() {
return(_view);
}
function set view(v) {
_view = v;
//return(view);
}
var _strType = "projectile";
}
Symbol 2639 MovieClip [__Packages.com.hitf.tileGameClasses.mapItemClasses.MotionMapItemModel] Frame 0
class com.hitf.tileGameClasses.mapItemClasses.MotionMapItemModel extends com.hitf.tileGameClasses.mapItemClasses.MapItemModel
{
var __set__position, __get__position, dispatchEvent, __get__view, addEventListener;
function MotionMapItemModel () {
super();
}
function init() {
super.init();
mx.transitions.OnEnterFrameBeacon.init();
MovieClip.addListener(this);
direction = (new com.wis.math.alg.Vector(0, 1));
velocity = (new com.wis.math.alg.Vector(0, 0));
}
function onEnterFrame() {
stateManager.update();
__set__position(__get__position().returnAddition(velocity));
velocity = (velocity.returnScalar(1 - friction));
}
function onStateChange(e) {
dispatchEvent(e);
}
function get direction() {
return(_vDirection);
}
function set direction(d) {
if (!d.unitVector().equal(_vDirection)) {
_vDirection = d.unitVector();
dispatchEvent({target:this, type:"onDirectionChange"});
}
//return(direction);
}
function get friction() {
return(_numFriction);
}
function set friction(f) {
_numFriction = f;
//return(friction);
}
function get maxSpeed() {
return(_numMaxSpeed);
}
function set maxSpeed(s) {
_numMaxSpeed = s;
//return(maxSpeed);
}
function get stateManager() {
return(_stateManager);
}
function set stateManager(s) {
_stateManager = s;
_stateManager.__set__model(this);
_stateManager.addEventListener("onStateChange", this);
__get__view().addEventListener("onMotionFinished", _stateManager);
addEventListener("onDirectionChange", _stateManager);
addEventListener("onVelocityChange", _stateManager);
//return(stateManager);
}
function get state() {
return(stateManager.__get__state());
}
function set state(s) {
stateManager.__set__state(s);
//return(state);
}
function get velocity() {
return(_vVelocity);
}
function set velocity(v) {
_vVelocity = v;
dispatchEvent({target:this, type:"onVelocityChange"});
//return(velocity);
}
var _vDirection = null;
var _numFriction = 1;
var _numMaxSpeed = 10;
var _stateManager = null;
var _vVelocity = null;
}
Symbol 2640 MovieClip [__Packages.com.hitf.tileGameClasses.StateManager] Frame 0
class com.hitf.tileGameClasses.StateManager
{
var _model, dispatchEvent, _objStates;
function StateManager () {
init();
}
function update() {
if (model.__get__direction().x > 0) {
state = ("right");
} else if (model.__get__direction().x < 0) {
state = ("left");
} else if (model.__get__direction().y < 0) {
state = ("up");
} else {
state = ("down");
}
}
function init() {
mx.events.EventDispatcher.initialize(this);
}
function repeatable(s) {
return((states[s].repeatable || (states[s].lastTime == null)) || ((getTimer() - states[s].lastTime) > states[s].repeat));
}
function onMotionFinished(e) {
activeMotion = (false);
state = (queueState);
queueState = (null);
}
function get activeMotion() {
return(_boolActiveMotion);
}
function set activeMotion(a) {
_boolActiveMotion = a;
//return(activeMotion);
}
function get model() {
return(_model);
}
function set model(m) {
_model = m;
//return(model);
}
function get queueState() {
return(_strQueueState);
}
function set queueState(q) {
_strQueueState = q;
//return(queueState);
}
function get state() {
return(_strState);
}
function set state(s) {
if (s != _strState) {
if ((!activeMotion) && (repeatable(s))) {
activeMotion = (states[s].activeMotion);
queueState = (states[s].queueState);
states[s].lastTime = getTimer();
_boolLockQueue = states[s].lockQueue;
_strState = s;
dispatchEvent({target:this, type:"onStateChange"});
} else if (states[s].queueable && (!_boolLockQueue)) {
activeMotion = (true);
queueState = (s);
_boolLockQueue = states[s].lockQueue;
}
}
//return(state);
}
function get states() {
return(_objStates);
}
function set states(s) {
_objStates = s;
//return(states);
}
var _boolActiveMotion = false;
var _strQueueState = null;
var _strState = "";
var _boolLockQueue = false;
}
Symbol 2641 MovieClip [__Packages.com.hitf.tileGameClasses.projectileClasses.ProjectileModel] Frame 0
class com.hitf.tileGameClasses.projectileClasses.ProjectileModel extends com.hitf.tileGameClasses.mapItemClasses.MotionMapItemModel
{
var __get__position, __set__friction, __set__z, __get__maxSpeed, __get__velocity;
function ProjectileModel () {
super();
}
function onEnterFrame() {
super.onEnterFrame();
var _local3 = __get__position().returnSubtraction(startPosition).norm();
if (_local3 > maxDistance) {
__set__friction(0.4);
__set__z((startZ * __get__velocity().norm()) / __get__maxSpeed());
}
}
function get maxDistance() {
return(_numMaxDistance);
}
function set maxDistance(d) {
_numMaxDistance = d;
//return(maxDistance);
}
function get startPosition() {
return(_vStartPosition);
}
function set startPosition(p) {
_vStartPosition = p;
//return(startPosition);
}
function get startZ() {
return(_numStartZ);
}
function set startZ(z) {
_numStartZ = z;
//return(startZ);
}
var _numMaxDistance = 300;
var _vStartPosition = null;
var _numStartZ = 0;
}
Symbol 2642 MovieClip [__Packages.com.hitf.tileGameClasses.projectileClasses.ProjectileStateManager] Frame 0
class com.hitf.tileGameClasses.projectileClasses.ProjectileStateManager extends com.hitf.tileGameClasses.StateManager
{
var __set__states, __get__model, __set__state;
function ProjectileStateManager () {
super();
}
function init() {
super.init();
__set__states({motionUp:{queueable:false, activeMotion:false, queueState:"motionUp", repeat:0, lockQueue:false}, motionRight:{queueable:false, activeMotion:false, queueState:"motionRight", repeat:0, lockQueue:false}, motionDown:{queueable:false, activeMotion:false, queueState:"motionDown", repeat:0, lockQueue:false}, motionLeft:{queueable:false, activeMotion:false, queueState:"motionLeft", repeat:0, lockQueue:false}, collisionUp:{queueable:true, activeMotion:true, queueState:"collisionUp", repeat:0, lockQueue:true}, collisionRight:{queueable:true, activeMotion:true, queueState:"collisionRight", repeat:0, lockQueue:true}, collisionDown:{queueable:true, activeMotion:true, queueState:"collisionDown", repeat:0, lockQueue:true}, collisionLeft:{queueable:true, activeMotion:true, queueState:"collisionLeft", repeat:0, lockQueue:true}});
}
function update() {
var _local2 = "";
if (__get__model().__get__velocity().norm() < 1) {
_local2 = "collision";
} else {
_local2 = "motion";
}
if (__get__model().__get__direction().x > 0) {
_local2 = _local2 + "Right";
} else if (__get__model().__get__direction().x < 0) {
_local2 = _local2 + "Left";
} else if (__get__model().__get__direction().y < 0) {
_local2 = _local2 + "Up";
} else {
_local2 = _local2 + "Down";
}
__set__state(_local2);
}
}
Symbol 2643 MovieClip [__Packages.com.hitf.tileGameClasses.Health] Frame 0
class com.hitf.tileGameClasses.Health extends com.hitf.tileGameClasses.MapItem
{
var __get__model, dispatchEvent;
function Health (t, l, n, d, i) {
super(t, l, n, d, i);
}
function collision(m) {
if ((m.type == "aiCharacter") || (m.type == "userCharacter")) {
if (super.__get__model().__get__state() != "remove") {
if (super.__get__model().__get__visible()) {
super.__get__model().__set__state("remove");
} else {
onMotionFinished();
}
return(true);
}
}
return(false);
}
function onVisibleChange(e) {
if ((super.__get__model().__get__state() == "remove") && (_numAddMapItemID == -1)) {
onMotionFinished();
}
}
function init(t, l, n, d, i) {
super.init(t, l, n, d, i);
super.__set__type("health");
__get__model().addEventListener("onVisibleChange", this);
}
function onMotionFinished(e) {
dispatchEvent({target:this, type:"onRemoveMapItem"});
_numAddMapItemID = setInterval(this, "onAddMapItem", RESPAWN_TIME);
}
function onAddMapItem() {
var _local9 = _root._tileGame.map.model.characters;
var _local14 = true;
var _local13 = __get__model().__get__position().x - (__get__model().__get__halfwidthX() + 5);
var _local11 = __get__model().__get__position().x + (__get__model().__get__halfwidthX() + 5);
var _local12 = __get__model().__get__position().y - (__get__model().__get__halfwidthY() + 5);
var _local10 = __get__model().__get__position().y + (__get__model().__get__halfwidthY() + 5);
if (((_local9.length == 0) || (_local9.length == undefined)) || (_numAddMapItemID == -1)) {
clearInterval(_numAddMapItemID);
_numAddMapItemID = -1;
} else {
var _local4 = 0;
while (_local4 < _local9.length) {
var _local3 = _local9[_local4];
if (_local3.model.health > 0) {
var _local8 = _local3.model.position.x - _local3.model.halfwidthX;
var _local6 = _local3.model.position.x + _local3.model.halfwidthX;
var _local7 = _local3.model.position.y - _local3.model.halfwidthY;
var _local5 = _local3.model.position.y + _local3.model.halfwidthY;
if (!(((((_local13 < _local8) && (_local11 < _local8)) || ((_local13 > _local6) && (_local11 > _local6))) || ((_local12 < _local7) && (_local10 < _local7))) || ((_local12 > _local5) && (_local10 > _local5)))) {
_local14 = false;
}
}
_local4++;
}
if (_local14) {
clearInterval(_numAddMapItemID);
_numAddMapItemID = -1;
dispatchEvent({target:this, type:"onAddMapItem", model:__get__model().__get__model()});
}
}
}
function clearIt() {
clearInterval(_numAddMapItemID);
_numAddMapItemID = -1;
}
static var RESPAWN_TIME = 4000;
var _numAddMapItemID = -1;
}
Symbol 2644 MovieClip [__Packages.com.hitf.tileGameClasses.SpecialMove] Frame 0
class com.hitf.tileGameClasses.SpecialMove extends com.hitf.tileGameClasses.MapItem
{
var __get__model, dispatchEvent;
function SpecialMove (t, l, n, d, i) {
super(t, l, n, d, i);
}
function onVisibleChange(e) {
if ((super.__get__model().__get__state() == "remove") && (_numAddMapItemID == -1)) {
onMotionFinished();
}
}
function collision(m) {
if ((m.type == "aiCharacter") || (m.type == "userCharacter")) {
if (super.__get__model().__get__state() != "remove") {
if (super.__get__model().__get__visible()) {
super.__get__model().__set__state("remove");
} else {
onMotionFinished();
}
return(true);
}
}
return(false);
}
function init(t, l, n, d, i) {
super.init(t, l, n, d, i);
super.__set__type("specialMove");
__get__model().addEventListener("onVisibleChange", this);
}
function onMotionFinished(e) {
dispatchEvent({target:this, type:"onRemoveMapItem"});
_numAddMapItemID = setInterval(this, "onAddMapItem", RESPAWN_TIME);
}
function onAddMapItem() {
var _local9 = _root._tileGame.map.model.characters;
var _local14 = true;
var _local13 = __get__model().__get__position().x - (__get__model().__get__halfwidthX() + 5);
var _local11 = __get__model().__get__position().x + (__get__model().__get__halfwidthX() + 5);
var _local12 = __get__model().__get__position().y - (__get__model().__get__halfwidthY() + 5);
var _local10 = __get__model().__get__position().y + (__get__model().__get__halfwidthY() + 5);
if (((_local9.length == 0) || (_local9.length == undefined)) || (_numAddMapItemID == -1)) {
clearInterval(_numAddMapItemID);
_numAddMapItemID = -1;
} else {
var _local4 = 0;
while (_local4 < _local9.length) {
var _local3 = _local9[_local4];
if (_local3.model.health > 0) {
var _local8 = _local3.model.position.x - _local3.model.halfwidthX;
var _local6 = _local3.model.position.x + _local3.model.halfwidthX;
var _local7 = _local3.model.position.y - _local3.model.halfwidthY;
var _local5 = _local3.model.position.y + _local3.model.halfwidthY;
if (!(((((_local13 < _local8) && (_local11 < _local8)) || ((_local13 > _local6) && (_local11 > _local6))) || ((_local12 < _local7) && (_local10 < _local7))) || ((_local12 > _local5) && (_local10 > _local5)))) {
_local14 = false;
}
}
_local4++;
}
if (_local14) {
clearInterval(_numAddMapItemID);
_numAddMapItemID = -1;
dispatchEvent({target:this, type:"onAddMapItem", model:__get__model().__get__model()});
}
}
}
function clearIt() {
clearInterval(_numAddMapItemID);
_numAddMapItemID = -1;
}
static var RESPAWN_TIME = 4000;
var _numAddMapItemID = -1;
}
Symbol 2645 MovieClip [__Packages.com.hitf.tileGameClasses.mapClasses.MapViewManager] Frame 0
class com.hitf.tileGameClasses.mapClasses.MapViewManager
{
var _arrayViewTiles, _numWidth, _numHeight, _numColMin, _numColMax, _numScreenWidth, _numRowMin, _numRowMax, _numScreenHeight, _model;
function MapViewManager (m) {
init(m);
}
function init(m) {
model = (m);
}
function initViewTiles() {
_arrayViewTiles = [];
var _local5 = Math.ceil(_numWidth / _numTileWidth);
var _local4 = Math.ceil(_numHeight / _numTileHeight);
var _local3 = 0;
while (_local3 < _local5) {
_arrayViewTiles[_local3] = [];
var _local2 = 0;
while (_local2 < _local4) {
_arrayViewTiles[_local3][_local2] = [];
_local2++;
}
_local3++;
}
}
function mapItemToViewTiles(mi) {
var _local2 = [];
var _local4 = mi.model.bounds;
var _local15 = mi.model.x;
var _local14 = mi.model.y;
var _local13 = mi.model.z;
var _local10 = _local15 + _local4.xMin;
var _local8 = _local15 + _local4.xMax;
var _local12 = (_local14 - _local13) + _local4.yMin;
var _local9 = (_local14 - _local13) + _local4.yMax;
var _local7 = tileAt(_local10, _local12);
var _local5 = tileAt(_local8, _local12);
var _local3 = tileAt(_local8, _local9);
var _local6 = tileAt(_local10, _local9);
_local2.push(_local7);
if (!equalTiles(_local5, _local7)) {
_local2.push(_local5);
}
if (!equalTiles(_local3, _local5)) {
if (!equalTiles(_local3, _local7)) {
_local2.push(_local3);
}
}
if (!equalTiles(_local6, _local3)) {
if (!equalTiles(_local6, _local5)) {
if (!equalTiles(_local6, _local7)) {
_local2.push(_local6);
}
}
}
return(_local2);
}
function addMapItemToTiles(mi) {
var _local2 = mi.model.viewTiles;
for (var _local4 in _local2) {
_arrayViewTiles[_local2[_local4].column][_local2[_local4].row].push(mi);
}
}
function removeMapItemFromTiles(mi) {
if (mi.model.viewable) {
var _local2 = mi.model.viewTiles;
for (var _local7 in _local2) {
var _local3 = [];
var _local4 = _arrayViewTiles[_local2[_local7].column][_local2[_local7].row];
for (var _local6 in _local4) {
if (_arrayViewTiles[_local2[_local7].column][_local2[_local7].row][_local6] != mi) {
_local3.push(_arrayViewTiles[_local2[_local7].column][_local2[_local7].row][_local6]);
}
}
_arrayViewTiles[_local2[_local7].column][_local2[_local7].row] = _local3;
}
}
}
function columnChange(prevCol, col) {
var _local6;
var _local5;
_numColMin = col;
_numColMax = col + tileAt(_numScreenWidth, 0).column;
if (prevCol < col) {
_local6 = _numColMin - 1;
_local5 = _numColMax;
} else {
_local6 = _numColMax + 1;
_local5 = _numColMin;
}
var _local2 = _numRowMin;
while (_local2 <= _numRowMax) {
var _local3 = 0;
while (_local3 < _arrayViewTiles[_local6][_local2].length) {
var _local4 = _arrayViewTiles[_local6][_local2][_local3];
_local4.model.visible = mapItemIsVisible(_local4);
_local3++;
}
_local3 = 0;
while (_local3 < _arrayViewTiles[_local5][_local2].length) {
_arrayViewTiles[_local5][_local2][_local3].model.visible = true;
_local3++;
}
_local2++;
}
}
function rowChange(prevRow, row) {
var _local6;
var _local5;
_numRowMin = row;
_numRowMax = row + tileAt(0, _numScreenHeight).row;
if (prevRow < row) {
_local6 = _numRowMin - 1;
_local5 = _numRowMax;
} else {
_local6 = _numRowMax + 1;
_local5 = _numRowMin;
}
var _local2 = _numColMin;
while (_local2 <= _numColMax) {
var _local3 = 0;
while (_local3 < _arrayViewTiles[_local2][_local6].length) {
var _local4 = _arrayViewTiles[_local2][_local6][_local3];
_local4.model.visible = mapItemIsVisible(_local4);
_local3++;
}
_local3 = 0;
while (_local3 < _arrayViewTiles[_local2][_local5].length) {
_arrayViewTiles[_local2][_local5][_local3].model.visible = true;
_local3++;
}
_local2++;
}
}
function equalTiles(t1, t2) {
return((t1.column == t2.column) && (t1.row == t2.row));
}
function tileAt(x, y) {
return({column:Math.floor(x / _numTileWidth), row:Math.floor(y / _numTileHeight)});
}
function mapItemIsVisible(mi) {
var _local3 = false;
if ((mi.type == "userCharacter") || (mi.type == "projectileMotion")) {
_local3 = true;
} else if ((mi.type == "aiCharacter") && (!mi.inplay)) {
_local3 = false;
} else if (mi.model.viewable) {
var _local2 = mi.model.viewTiles;
for (var _local5 in _local2) {
if (tileIsVisible(_local2[_local5])) {
_local3 = true;
break;
}
}
}
return(_local3);
}
function tileIsVisible(t) {
return((((t.column >= _numColMin) && (t.column <= _numColMax)) && (t.row >= _numRowMin)) && (t.row <= _numRowMax));
}
function onAddMapItem(e) {
var _local2 = e.mapItem;
if (_local2.model.viewable) {
_local2.model.viewTiles = mapItemToViewTiles(_local2);
addMapItemToTiles(_local2);
_local2.model.visible = mapItemIsVisible(_local2);
}
}
function onRemoveMapItem(e) {
removeMapItemFromTiles(e.mapItem);
}
function onPositionChange(e) {
var _local2 = e.mapItem;
removeMapItemFromTiles(_local2);
if (_local2.model.viewable) {
_local2.model.viewTiles = mapItemToViewTiles(_local2);
addMapItemToTiles(_local2);
_local2.model.visible = mapItemIsVisible(_local2);
}
}
function onOriginXChange(e) {
var _local5 = tileAt(-e.prevOriginX, 0).column;
var _local3 = tileAt(-e.originX, 0).column;
var _local2 = _local5 - _local3;
var _local4 = ((_local2 > 0) ? -1 : 1);
while (_local2 != 0) {
columnChange(_local3 + _local2, (_local3 + _local2) + _local4);
_local2 = _local2 + _local4;
}
}
function onOriginYChange(e) {
var _local5 = tileAt(0, -e.prevOriginY).row;
var _local3 = tileAt(0, -e.originY).row;
var _local2 = _local5 - _local3;
var _local4 = ((_local2 > 0) ? -1 : 1);
while (_local2 != 0) {
rowChange(_local3 + _local2, (_local3 + _local2) + _local4);
_local2 = _local2 + _local4;
}
}
function get model() {
return(_model);
}
function set model(m) {
_model = m;
_numWidth = _model.width;
_numHeight = _model.height;
_numScreenWidth = _model.screenWidth;
_numScreenHeight = _model.screenHeight;
_numColMin = tileAt(_model.__get__originX(), 0).column;
_numColMax = _numColMin + tileAt(_numScreenWidth, 0).column;
_numRowMin = tileAt(0, _model.__get__originY()).row;
_numRowMax = _numRowMin + tileAt(0, _numScreenHeight).row;
_model.addEventListener("onAddMapItem", this);
_model.addEventListener("onRemoveMapItem", this);
_model.addEventListener("onPositionChange", this);
_model.addEventListener("onOriginXChange", this);
_model.addEventListener("onOriginYChange", this);
initViewTiles();
//return(model);
}
var _numTileWidth = 50;
var _numTileHeight = 50;
}
Symbol 2646 MovieClip [__Packages.com.hitf.tileGameClasses.Square] Frame 0
class com.hitf.tileGameClasses.Square
{
function Square (x1, y1, hw, hh) {
_ary_v = new Array();
_ary_v.push(new com.hitf.tileGameClasses.Point2D(x1 - hw, y1 - hh));
_ary_v.push(new com.hitf.tileGameClasses.Point2D(x1 + hw, y1 - hh));
_ary_v.push(new com.hitf.tileGameClasses.Point2D(x1 + hw, y1 + hh));
_ary_v.push(new com.hitf.tileGameClasses.Point2D(x1 - hw, y1 + hh));
}
function get ary_v() {
return(_ary_v);
}
var _ary_v = null;
}
Symbol 2647 MovieClip [__Packages.com.hitf.tileGameClasses.Point2D] Frame 0
class com.hitf.tileGameClasses.Point2D
{
function Point2D (x1, y1) {
x = x1;
y = y1;
}
var x = 0;
var y = 0;
}
Symbol 2648 MovieClip [__Packages.com.hitf.tileGameClasses.characterClasses.CharacterModel] Frame 0
class com.hitf.tileGameClasses.characterClasses.CharacterModel extends com.hitf.tileGameClasses.mapItemClasses.MotionMapItemModel
{
var _prnt, _arrayProjectileQueue, _projectileQueueManager, __get__parent, dispatchEvent, __get__libraryID, __get__lastPoints;
function CharacterModel () {
super();
}
function addProjectile(p) {
var _local2 = projectileQueue.slice();
if (_local2.length < MAX_PROJECTILES) {
_local2.push(p);
projectileQueue = (_local2);
}
}
function removeProjectile() {
if (((_root._tileGame.model.cheat == "buffet") || (_root._tileGame.model.cheat == "hummelpummel")) && (_prnt.type == "userCharacter")) {
projectileFillDelay = (0);
}
var _local3 = projectileQueue.slice();
var _local4 = "";
if (_local3.length > 0) {
_local4 = String(_local3.pop());
}
projectileQueue = (_local3);
return(_local4);
}
function init() {
super.init();
_arrayProjectileQueue = [];
_projectileQueueManager = new com.hitf.tileGameClasses.characterClasses.ProjectileQueueManager(this);
_prnt = null;
}
function set parent(ob) {
_prnt = ob;
//return(__get__parent());
}
function get bioImageLibraryID() {
return(_strBioImageLibraryID);
}
function set bioImageLibraryID(b) {
_strBioImageLibraryID = b;
//return(bioImageLibraryID);
}
function get health() {
return(_numHealth);
}
function set health(h) {
if (((_root._tileGame.model.cheat == "spotless") || (_root._tileGame.model.cheat == "hummelpummel")) && (_prnt.type == "userCharacter")) {
_numHealth = 100;
} else {
_numHealth = h;
}
if (_numHealth < 0) {
_numHealth = 0;
}
dispatchEvent({target:this, type:"onHealthChange", id:__get__libraryID()});
if (_numHealth == 0) {
timeOfDeath = (getTimer());
dispatchEvent({target:this, type:"onRemoveMapItem"});
}
//return(health);
}
function get id() {
return(_strID);
}
function set id(i) {
_strID = i;
//return(id);
}
function get label() {
return(_strLabel);
}
function set label(l) {
_strLabel = l;
//return(label);
}
function get originXMin() {
return(_numOriginXMin);
}
function set originXMin(x) {
_numOriginXMin = x;
//return(originXMin);
}
function get originXMax() {
return(_numOriginXMax);
}
function set originXMax(x) {
_numOriginXMax = x;
//return(originXMax);
}
function get originYMin() {
return(_numOriginYMin);
}
function set originYMin(y) {
_numOriginYMin = y;
//return(originYMin);
}
function get originYMax() {
return(_numOriginYMax);
}
function set originYMax(y) {
_numOriginYMax = y;
//return(originYMax);
}
function get projectileQueue() {
return(_arrayProjectileQueue);
}
function set projectileQueue(p) {
_arrayProjectileQueue = p;
dispatchEvent({target:this, type:"onProjectileQueueChange"});
//return(projectileQueue);
}
function get projectileFillDelay() {
return(_projectileQueueManager.__get__fillDelay());
}
function set projectileFillDelay(f) {
_projectileQueueManager.__set__fillDelay(f);
//return(projectileFillDelay);
}
function get projectileSpeed() {
return(_numProjectileSpeed);
}
function set projectileSpeed(p) {
_numProjectileSpeed = p;
//return(projectileSpeed);
}
function get rgbFill() {
return(_numRGBFill);
}
function set rgbFill(r) {
_numRGBFill = r;
//return(rgbFill);
}
function get rgbHighlight() {
return(_numRGBHighlight);
}
function set rgbHighlight(r) {
_numRGBHighlight = r;
//return(rgbHighlight);
}
function get specialMoves() {
return(_numSpecialMoves);
}
function set specialMoves(s) {
_numSpecialMoves = s;
dispatchEvent({target:this, type:"onSpecialMovesChange"});
//return(specialMoves);
}
function get strength() {
return(_numStrength);
}
function set strength(s) {
_numStrength = s;
//return(strength);
}
function get range() {
return(_numRange);
}
function set range(r) {
_numRange = r;
//return(range);
}
function get timeOfDeath() {
return(_numTimeOfDeath);
}
function set timeOfDeath(t) {
_numTimeOfDeath = t;
//return(timeOfDeath);
}
function get projectileHits() {
return(_numProjectileHits);
}
function set projectileHits(p) {
_numProjectileHits = p;
dispatchEvent({target:this, type:"onPointsChange"});
//return(projectileHits);
}
function get projectileAttempts() {
return(_numProjectileAttempts);
}
function set projectileAttempts(p) {
_numProjectileAttempts = p;
dispatchEvent({target:this, type:"onPointsChange"});
//return(projectileAttempts);
}
function get eliminations() {
return(_numEliminations);
}
function set eliminations(e) {
trace("AN ELIMINATION INCREMENT AT " + getTimer());
_numEliminations = e;
dispatchEvent({target:this, type:"onPointsChange"});
//return(eliminations);
}
function get specialMovePickups() {
return(_numSpecialMovePickups);
}
function set specialMovePickups(s) {
_numSpecialMovePickups = s;
dispatchEvent({target:this, type:"onPointsChange"});
//return(specialMovePickups);
}
function get healthPickups() {
return(_numHealthPickups);
}
function set healthPickups(h) {
_numHealthPickups = h;
dispatchEvent({target:this, type:"onPointsChange"});
//return(healthPickups);
}
function get points() {
return(((_numLastPoints + (projectileHits * 1000)) + (eliminations * 500)) + ((specialMovePickups + healthPickups) * 250));
}
function set lastPoints(l) {
_numLastPoints = l;
dispatchEvent({target:this, type:"onPointsChange"});
//return(__get__lastPoints());
}
function projmax() {
return(MAX_PROJECTILES);
}
function get pqm() {
return(_projectileQueueManager);
}
function set pqm(p) {
_projectileQueueManager = p;
//return(pqm);
}
static var MAX_PROJECTILES = 6;
static var MAX_SPECIAL_MOVES = 3;
var _strBioImageLibraryID = "";
var _numHealth = 100;
var _strID = "";
var _strLabel = "";
var _numOriginXMin = 200;
var _numOriginXMax = 400;
var _numOriginYMin = 200;
var _numOriginYMax = 300;
var _numProjectileSpeed = 30;
var _numRGBFill = 16777215;
var _numRGBHighlight = 16777215;
var _numSpecialMoves = 0;
var _numStrength = 50;
var _numRange = 300;
var _numTimeOfDeath = 0;
var _numLastPoints = 0;
var _numProjectileHits = 0;
var _numProjectileAttempts = 0;
var _numEliminations = 0;
var _numSpecialMovePickups = 0;
var _numHealthPickups = 0;
var _numLastAddProjectileTime = 0;
}
Symbol 2649 MovieClip [__Packages.com.hitf.tileGameClasses.characterClasses.ProjectileQueueManager] Frame 0
class com.hitf.tileGameClasses.characterClasses.ProjectileQueueManager
{
var _model;
function ProjectileQueueManager (m) {
init(m);
}
function fillProjectileQueue() {
trace("fill queue");
clearInterval(_numFillProjectileQueueID);
var _local3 = com.hitf.tileGameClasses.characterClasses.CharacterModel.MAX_PROJECTILES;
var _local2 = 0;
while (_local2 < _local3) {
_model.addProjectile(PROJECTILE_LIBRARY[Math.floor(Math.random() * PROJECTILE_LIBRARY.length)]);
_local2++;
}
}
function init(m) {
_model = m;
_model.addEventListener("onProjectileQueueChange", this);
fillProjectileQueue();
}
function onProjectileQueueChange(e) {
if ((_model.__get__projectileQueue().length == 0) && (_numFillDelay != 99999)) {
_numFillProjectileQueueID = setInterval(this, "fillProjectileQueue", _numFillDelay);
}
}
function get fillDelay() {
return(_numFillDelay);
}
function set fillDelay(f) {
_numFillDelay = f;
//return(fillDelay);
}
static var PROJECTILE_LIBRARY = ["bakedPotato", "chickenLeg", "cornDog", "donut", "dough", "egg", "pie", "pizza", "sloppyJoe", "turkey", "watermelon"];
var _numFillDelay = 5000;
var _numFillProjectileQueueID = -1;
}
Symbol 2650 MovieClip [__Packages.com.hitf.tileGameClasses.characterClasses.CharacterView] Frame 0
class com.hitf.tileGameClasses.characterClasses.CharacterView extends com.hitf.tileGameClasses.mapItemClasses.MapItemView
{
var _mcInstance, dispatchEvent;
function CharacterView () {
super();
}
function arrangeTray() {
_tray = _mcInstance._mcInstance._tray;
_tray.__set__queue(_tray.queue);
}
function initTray() {
_tray = _mcInstance._mcInstance._tray;
_tray.onLoad = mx.utils.Delegate.create(this, onTrayLoad);
}
function onHideProjectile() {
dispatchEvent({target:this, type:"onHideProjectile"});
}
function onProjectile() {
dispatchEvent({target:this, type:"onProjectile"});
}
function onSpecialMove() {
dispatchEvent({target:this, type:"onSpecialMove"});
}
function onStateChange(e) {
super.onStateChange();
if (!character.__get__refilling()) {
initTray();
}
}
function onWinFinished() {
dispatchEvent({target:this, type:"onWinFinished"});
}
function onLoseFinished() {
dispatchEvent({target:this, type:"onLoseFinished"});
}
function onTrayLoad() {
_tray.__set__subtray(true);
_tray.__set__character(character);
}
function onVisibleChange(e) {
super.onVisibleChange();
_mcInstance.onHideProjectile = mx.utils.Delegate.create(this, onHideProjectile);
_mcInstance.onProjectile = mx.utils.Delegate.create(this, onProjectile);
_mcInstance.onSpecialMove = mx.utils.Delegate.create(this, onSpecialMove);
_mcInstance.onWinFinished = mx.utils.Delegate.create(this, onWinFinished);
_mcInstance.onLoseFinished = mx.utils.Delegate.create(this, onLoseFinished);
}
function get character() {
return(_character);
}
function set character(c) {
_character = c;
//return(character);
}
function get tray() {
return(_tray);
}
function set tray(p) {
_tray = p;
//return(tray);
}
var _character = null;
var _tray = null;
}
Symbol 2651 MovieClip [__Packages.com.hitf.VectorUtils] Frame 0
class com.hitf.VectorUtils
{
function VectorUtils () {
}
static function stringToVector(d) {
var _local1 = new com.wis.math.alg.Vector(0, 0);
switch (d) {
case "up" :
_local1 = new com.wis.math.alg.Vector(0, -1);
break;
case "right" :
_local1 = new com.wis.math.alg.Vector(1, 0);
break;
case "down" :
_local1 = new com.wis.math.alg.Vector(0, 1);
break;
case "left" :
_local1 = new com.wis.math.alg.Vector(-1, 0);
break;
case "rightUp" :
_local1 = new com.wis.math.alg.Vector(1, -1);
break;
case "leftUp" :
_local1 = new com.wis.math.alg.Vector(-1, -1);
break;
case "rightDown" :
_local1 = new com.wis.math.alg.Vector(1, 1);
break;
case "leftDown" :
_local1 = new com.wis.math.alg.Vector(-1, 1);
}
return(_local1.unitVector());
}
static function vectorToString(v) {
v = v.unitVector();
var _local1 = null;
if (v.equal(new com.wis.math.alg.Vector(0, -1))) {
_local1 = "up";
} else if (v.equal(new com.wis.math.alg.Vector(1, 0))) {
_local1 = "right";
} else if (v.equal(new com.wis.math.alg.Vector(0, 1))) {
_local1 = "down";
} else if (v.equal(new com.wis.math.alg.Vector(-1, 0))) {
_local1 = "left";
} else if (v.equal((new com.wis.math.alg.Vector(1, -1)).unitVector())) {
_local1 = "rightUp";
} else if (v.equal((new com.wis.math.alg.Vector(-1, -1)).unitVector())) {
_local1 = "leftUp";
} else if (v.equal((new com.wis.math.alg.Vector(1, 1)).unitVector())) {
_local1 = "rightDown";
} else if (v.equal((new com.wis.math.alg.Vector(-1, 1)).unitVector())) {
_local1 = "leftDown";
}
return(_local1);
}
}
Symbol 2652 MovieClip [__Packages.com.hitf.tileGameClasses.characterClasses.CharacterStateManager] Frame 0
class com.hitf.tileGameClasses.characterClasses.CharacterStateManager extends com.hitf.tileGameClasses.StateManager
{
var __get__model, __set__state, __set__states;
function CharacterStateManager () {
super();
}
function update() {
var _local2 = "";
if (__get__model().__get__velocity().norm() < 1) {
_local2 = "standing";
} else {
_local2 = "walking";
}
if (__get__model().__get__direction().x >= Math.SQRT1_2) {
_local2 = _local2 + "Right";
} else if (__get__model().__get__direction().x <= -0.707106781186548) {
_local2 = _local2 + "Left";
} else if (__get__model().__get__direction().y < 0) {
_local2 = _local2 + "Up";
} else {
_local2 = _local2 + "Down";
}
__set__state(_local2);
}
function init() {
super.init();
__set__state("standingUp");
__set__states({standingUp:{queueable:true, activeMotion:false, repeat:0, lockQueue:false}, standingRight:{queueable:true, activeMotion:false, repeat:0, lockQueue:false}, standingDown:{queueable:true, activeMotion:false, repeat:0, lockQueue:false}, standingLeft:{queueable:true, activeMotion:false, repeat:0, lockQueue:false}, walkingUp:{queueable:false, activeMotion:false, repeat:0, lockQueue:false}, walkingRight:{queueable:false, activeMotion:false, repeat:0, lockQueue:false}, walkingDown:{queueable:false, activeMotion:false, repeat:0, lockQueue:false}, walkingLeft:{queueable:false, activeMotion:false, repeat:0, lockQueue:false}, standingUpThrow:{queueable:false, activeMotion:true, queueState:"standingUp", repeat:0, lockQueue:false}, standingRightThrow:{queueable:false, activeMotion:true, queueState:"standingRight", repeat:0, lockQueue:false}, standingDownThrow:{queueable:false, activeMotion:true, queueState:"standingDown", repeat:0, lockQueue:false}, standingLeftThrow:{queueable:false, activeMotion:true, queueState:"standingLeft", repeat:0, lockQueue:false}, walkingUpThrow:{queueable:false, activeMotion:true, queueState:"standingUp", repeat:0, lockQueue:false}, walkingRightThrow:{queueable:false, activeMotion:true, queueState:"standingRight", repeat:0, lockQueue:false}, walkingDownThrow:{queueable:false, activeMotion:true, queueState:"standingDown", repeat:0, lockQueue:false}, walkingLeftThrow:{queueable:false, activeMotion:true, queueState:"standingLeft", repeat:0, lockQueue:false}, specialMove:{queueable:false, activeMotion:true, queueState:"standingDown", repeat:0, lockQueue:false}, powerUp:{queueable:true, activeMotion:true, queueState:"standingDown", repeat:0, lockQueue:false}, defending:{queueable:false, activeMotion:true, queueState:"standingDown", repeat:1500, lockQueue:false}, collision:{queueable:true, activeMotion:true, queueState:"standingDown", repeat:0, lockQueue:false}, specialMoveCollision:{queueable:true, activeMotion:true, queueState:"standingDown", repeat:0, lockQueue:false}, win:{queueable:true, activeMotion:true, repeat:0, lockQueue:true}, lose:{queueable:true, activeMotion:true, repeat:0, lockQueue:true}});
}
}
Symbol 2653 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 2654 MovieClip [__Packages.mx.transitions.easing.Bounce] Frame 0
class mx.transitions.easing.Bounce
{
function Bounce () {
}
static function easeOut(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeIn(t, b, c, d) {
return((c - easeOut(d - t, 0, c, d)) + b);
}
static function easeInOut(t, b, c, d) {
if (t < (d / 2)) {
return((easeIn(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOut((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static var version = "1.1.0.52";
}
Symbol 2655 MovieClip [__Packages.com.hitf.tileGameClasses.IntroScreen] Frame 0
class com.hitf.tileGameClasses.IntroScreen extends MovieClip
{
var _btnSkip, gotoAndPlay, gotoAndStop, _totalframes, dispatchEvent;
function IntroScreen () {
super();
init();
}
function init() {
mx.events.EventDispatcher.initialize(this);
Key.addListener(this);
initTransitions();
_btnSkip.onRelease = mx.utils.Delegate.create(this, onSkipClick);
_btnSkip.onRollOver = mx.utils.Delegate.create(this, onSkipOver);
_btnSkip.onRollOut = (_btnSkip.onDragOut = mx.utils.Delegate.create(this, onSkipOut));
}
function initTransitions() {
_tmgSkip = new com.hitf.transitions.TweenManager();
_tmgSkip.addTween(0, _btnSkip, "_xscale", mx.transitions.easing.Regular.easeInOut, 100, 105, 0.2);
_tmgSkip.addTween(0, _btnSkip, "_yscale", mx.transitions.easing.Regular.easeInOut, 100, 105, 0.2);
}
function onKeyDown() {
if (Key.getCode() == 32) {
onSkipClick();
}
}
function onSkipClick() {
_numSkips++;
switch (_numSkips) {
case 1 :
gotoAndPlay("skip");
break;
case 2 :
gotoAndStop(_totalframes);
break;
case 3 :
onPlayClick();
}
}
function onSkipOver() {
_tmgSkip.play();
}
function onSkipOut() {
_tmgSkip.rewind();
}
function onPlayClick() {
dispatchEvent({target:this, type:"onPlayClick"});
}
var _numSkips = 0;
var _tmgSkip = null;
}
Symbol 2656 MovieClip [__Packages.com.hitf.tileGameClasses.introScreenClasses.TitleScreen] Frame 0
class com.hitf.tileGameClasses.introScreenClasses.TitleScreen extends MovieClip
{
var _btnPlay, _parent;
function TitleScreen () {
super();
init();
}
function init() {
mx.events.EventDispatcher.initialize(this);
_btnPlay.onRelease = mx.utils.Delegate.create(this, onPlayClick);
}
function onPlayClick() {
_parent.onPlayClick();
}
}
Symbol 2657 MovieClip [__Packages.com.hitf.SimpleButton] Frame 0
class com.hitf.SimpleButton extends MovieClip
{
var onRollOver, onRollOut, onDragOut, onRelease, dispatchEvent;
function SimpleButton () {
super();
init();
}
function init() {
mx.events.EventDispatcher.initialize(this);
enabled = (true);
}
function enable() {
onRollOver = function () {
this.dispatchEvent({target:this, type:"onOver"});
};
onRollOut = (onDragOut = function () {
this.dispatchEvent({target:this, type:"onOut"});
});
onRelease = function () {
this.dispatchEvent({target:this, type:"onClick", id:this.id});
};
onRollOut();
dispatchEvent({target:this, type:"onEnable"});
}
function disable() {
onRollOut();
delete onRollOver;
delete onRollOut;
delete onDragOut;
delete onRelease;
dispatchEvent({target:this, type:"onDisable"});
}
function get enabled() {
return(_boolEnabled);
}
function set enabled(e) {
_boolEnabled = e;
if (e) {
enable();
} else {
disable();
}
//return(enabled);
}
function get active() {
return(_boolActive);
}
function set active(a) {
_boolActive = a;
if (a) {
dispatchEvent({target:this, type:"onActive"});
} else {
dispatchEvent({target:this, type:"onInactive"});
}
//return(active);
}
function get id() {
return(_strID);
}
function set id(i) {
_strID = i;
//return(id);
}
var _boolEnabled = false;
var _boolActive = false;
var _strID = "";
}
Symbol 2658 MovieClip [__Packages.com.hitf.tileGameClasses.ArrowButton] Frame 0
class com.hitf.tileGameClasses.ArrowButton extends com.hitf.SimpleButton
{
var addEventListener, _sfx_roll, _parent, _cfxLabel, _mcLabel, _tmgOver;
function ArrowButton () {
super();
}
function init() {
super.init();
initTransitions();
addEventListener("onOver", this);
addEventListener("onOut", this);
_sfx_roll = new Sound(_parent);
_sfx_roll.attachSound("sfx_arrowroll");
}
function initTransitions() {
_cfxLabel = new com.hitf.transitions.ColorFX(_mcLabel);
_tmgOver = new com.hitf.transitions.TweenManager();
_tmgOver.addTween(0, _cfxLabel, "rgbHex", mx.transitions.easing.Regular.easeInOut, 16694616, 16777215, 0.05);
_tmgOver.addTween(0, _mcLabel, "_xscale", mx.transitions.easing.Regular.easeInOut, 100, 105, 0.15);
_tmgOver.addTween(0, _mcLabel, "_yscale", mx.transitions.easing.Regular.easeInOut, 100, 105, 0.15);
_tmgOver.addTween(0, this, "_rotation", mx.transitions.easing.Regular.easeInOut, 0, -2, 0.15);
_tmgOver.addTween(0, this, "_xscale", mx.transitions.easing.Regular.easeInOut, 100, 105, 0.15);
_tmgOver.addTween(0, this, "_yscale", mx.transitions.easing.Regular.easeInOut, 100, 105, 0.15);
_tmgOver.addTween(0.15, this, "_rotation", mx.transitions.easing.Regular.easeInOut, 0, 2, 0.05);
_tmgOver.addTween(0.2, this, "_rotation", mx.transitions.easing.Regular.easeInOut, 2, 1, 0.05);
_tmgOver.pause();
}
function onOver() {
_sfx_roll.start(0, 1);
_tmgOver.play();
}
function onOut() {
_tmgOver.rewind();
}
function get label() {
return(_strLabel);
}
function set label(l) {
_mcLabel._txtLabel.text = (_strLabel = l);
//return(label);
}
var _strLabel = "";
}
Symbol 2659 MovieClip [__Packages.com.hitf.tileGameClasses.InstructionsScreen] Frame 0
class com.hitf.tileGameClasses.InstructionsScreen extends MovieClip
{
var _mcLabel, _mcCopy, _txtCodeLabel, _tmgCopy, _dsInt, _btnNext, _tmgContent, _mcContent, _tmgHide, onInstructionsLoad, _txtCode, dispatchEvent;
function InstructionsScreen () {
super();
init();
}
function init() {
mx.events.EventDispatcher.initialize(this);
Key.addListener(this);
initTransitions();
_mcLabel._txtLabel.text = "Playing the Game";
_mcCopy._txtLabel.text = "Choose any unlocked character to play. Look at the stars below the\ncharacters to see how they rank in speed, strength and range.";
_txtCodeLabel.text = "Got a code?";
_tmgCopy.play();
_dsInt = setInterval(this, "deEss", 10);
}
function initChildren() {
_btnNext.addEventListener("onClick", this);
_btnNext.__set__id("next");
_btnNext.__set__label("Continue");
}
function initTransitions() {
_tmgCopy = new com.hitf.transitions.TweenManager();
_tmgCopy.addTween(0, _mcLabel, "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.3);
_tmgCopy.addTween(0, _mcLabel, "_xscale", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.3);
_tmgCopy.addTween(0, _mcLabel, "_yscale", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.3);
_tmgCopy.addTween(0, _mcCopy, "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.3);
_tmgContent = new com.hitf.transitions.TweenManager();
_tmgContent.addTween(0, _mcContent._mcFrame1, "_x", mx.transitions.easing.Regular.easeInOut, 0, -590, 0.4);
_tmgContent.addTween(0.4, _mcContent._mcFrame2, "_x", mx.transitions.easing.Regular.easeInOut, 600, 0, 0.4);
_tmgHide = new com.hitf.transitions.TweenManager();
_tmgHide.addTween(0, _mcContent._mcFrame2, "_x", mx.transitions.easing.Regular.easeInOut, 0, -590, 0.4);
_tmgHide.onMotionFinished = mx.utils.Delegate.create(this, onHideFinished);
}
function onLoad() {
initChildren();
onInstructionsLoad();
}
function onClick(e) {
if (_numFrame == 1) {
_mcContent._mcFrame1.gotoAndStop(1);
_tmgContent.play();
_numFrame = 2;
} else {
_tmgHide.play();
}
}
function onKeyDown() {
if (Key.getCode() == 32) {
onClick();
}
}
function onHideFinished() {
clearInterval(_dsInt);
var _local2 = rtrim(_txtCode.text).toLowerCase();
dispatchEvent({target:this, type:"onInstructionsNextClick", code:_local2});
}
function deEss() {
_txtCode.text = rtrim(_txtCode.text);
}
function rtrim(s) {
var _local1 = s.length;
while (_local1 >= 0) {
if (s.charCodeAt(_local1) > 32) {
return(s.substring(0, _local1 + 1));
}
_local1--;
}
return("");
}
var _numFrame = 1;
var _strNextButtonLabel = "";
}
Symbol 2660 MovieClip [__Packages.com.hitf.tileGameClasses.characterSelectScreenClasses.SelectedCharacter] Frame 0
class com.hitf.tileGameClasses.characterSelectScreenClasses.SelectedCharacter extends MovieClip
{
var _txtLabel, _txtSelected;
function SelectedCharacter () {
super();
}
function get label() {
return(_strLabel);
}
function set label(l) {
_txtLabel.text = (_strLabel = l);
//return(label);
}
function get selected() {
return(_strSelected);
}
function set selected(s) {
_txtSelected.text = (_strSelected = s);
//return(selected);
}
var _strLabel = "Playing as:";
var _strSelected = "";
}
Symbol 2661 MovieClip [__Packages.com.hitf.tileGameClasses.characterSelectScreenClasses.CharacterSelect] Frame 0
class com.hitf.tileGameClasses.characterSelectScreenClasses.CharacterSelect extends MovieClip
{
var _mcStar0, _mcLabel, _mcNew, _mcHolder, _mcStarburstGradient, _mcStarburst, onEnterFrame, _parent, _mcBling, _mcLock, _mcGradient, attachMovie, _mcHit, dispatchEvent;
function CharacterSelect () {
super();
init();
}
function setNew(n) {
enabled = (isNew = (n));
}
function init() {
mx.events.EventDispatcher.initialize(this);
_arrayStars = [];
_arrayStarMCs = [_mcStar0];
initTransitions();
}
function initTransitions() {
_tmgLabel = new com.hitf.transitions.TweenManager();
_tmgLabel.addTween(0, _mcLabel, "_xscale", mx.transitions.easing.Regular.easeIn, 0, 100, 0.2);
_tmgLabel.addTween(0, _mcLabel, "_yscale", mx.transitions.easing.Regular.easeIn, 0, 100, 0.2);
_tmgLabel.pause();
_tmgNew = new com.hitf.transitions.TweenManager();
_tmgNew.addTween(0, _mcNew, "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.2);
_tmgNew.pause();
_tmgNewCharacter = new com.hitf.transitions.TweenManager();
_tmgNewCharacter.addTween(0, _mcHolder, "_xscale", mx.transitions.easing.Regular.easeInOut, 100, 110, 0.1);
_tmgNewCharacter.addTween(0, _mcHolder, "_yscale", mx.transitions.easing.Regular.easeInOut, 100, 110, 0.1);
_tmgNewCharacter.addTween(0.1, _mcHolder, "_xscale", mx.transitions.easing.Regular.easeInOut, 110, 95, 0.2);
_tmgNewCharacter.addTween(0.1, _mcHolder, "_yscale", mx.transitions.easing.Regular.easeInOut, 110, 95, 0.2);
_tmgNewCharacter.addTween(0.3, _mcHolder, "_xscale", mx.transitions.easing.Regular.easeInOut, 95, 100, 0.1);
_tmgNewCharacter.addTween(0.3, _mcHolder, "_yscale", mx.transitions.easing.Regular.easeInOut, 95, 100, 0.1);
_tmgStarburstShow = new com.hitf.transitions.TweenManager();
_tmgStarburstShow.addTween(0, _mcStarburstGradient, "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.2);
_tmgStarburstShow.addTween(0, _mcStarburst, "_xscale", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.2);
_tmgStarburstShow.addTween(0, _mcStarburst, "_yscale", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.2);
_tmgStarburstShow.pause();
_tmgStarburstRotate = new com.hitf.transitions.TweenManager();
_tmgStarburstRotate.addTween(0, _mcStarburst, "_rotation", mx.transitions.easing.None.easeNone, 0, 360, 4);
_tmgStarburstRotate.__set__isLooping(true);
}
function invalidate() {
onEnterFrame = function () {
delete this.onEnterFrame;
this.arrange();
};
}
function arrange() {
arrangeStars();
_mcLabel._txtLabel.text = label;
_mcHolder.attachMovie(imageLibraryID, "_mcImage", 0);
_mcHolder._mcImage.gotoAndStop("characterSelect");
_mcStarburst._y = (_mcStarburstGradient._y = 10 - _mcHolder._height);
if (enabled || (enabled && (_parent._parent._parent.model.b_replayLevel))) {
enableEvents();
if ((!isNew) || (_parent._parent._parent.model.b_replayLevel)) {
_tmgNew.rewind();
_mcBling.gotoAndStop(1);
_mcLock.gotoAndStop(_mcLock._totalframes);
} else {
_tmgNew.play();
_tmgNewCharacter.play();
_mcBling.gotoAndPlay(2);
_mcLock.gotoAndPlay(2);
}
_mcGradient._visible = false;
_mcGradient.setMask(null);
} else {
disableEvents();
_mcLock.gotoAndStop(1);
_mcGradient._width = _mcHolder._width;
_mcGradient._height = _mcHolder._height;
_mcGradient._x = _mcHolder._x;
_mcGradient._y = _mcHolder._y;
_mcGradient.setMask(_mcHolder);
}
}
function arrangeStars() {
while (_arrayStarMCs.length > 1) {
_arrayStarMCs.pop().removeMovieClip();
}
var _local7 = stars;
var _local4 = 1;
var _local3 = 0;
while (_local3 < _local7.length) {
var _local2 = 0;
while (_local2 < _local7[_local3]) {
if ((_local3 != 0) || (_local2 != 0)) {
_arrayStarMCs.push(attachMovie("characterSelectStar", "_mcStar" + _local4, _local4++, {_x:_mcStar0._x + (_local2 * STARS_H_PADDING), _y:_mcStar0._y + (_local3 * STARS_V_PADDING)}));
}
_local2++;
}
_local3++;
}
_mcLock.swapDepths(_local4);
}
function enableEvents() {
_mcHit.onRelease = mx.utils.Delegate.create(this, onClick);
_mcHit.onRollOver = mx.utils.Delegate.create(this, onOver);
_mcHit.onRollOut = (_mcHit.onDragOut = mx.utils.Delegate.create(this, onOut));
}
function disableEvents() {
delete _mcHit.onRelease;
delete _mcHit.onRollOver;
delete _mcHit.onRollOut;
delete _mcHit.onDragOut;
}
function onClick() {
dispatchEvent({target:this, type:"onClick", id:id, label:label});
}
function onOver() {
_tmgLabel.play();
_tmgNew.rewind();
_tmgStarburstShow.play();
_tmgStarburstRotate.play();
}
function onOut() {
_tmgLabel.rewind();
if (!selected) {
if (isNew) {
_tmgNew.play();
}
_tmgStarburstShow.rewind();
_tmgStarburstRotate.pause();
} else {
_mcStarburstGradient._alpha = 60;
}
}
function onSelectedIDChange(e) {
if (e.id == id) {
selected = (true);
} else {
selected = (false);
}
}
function get model() {
return({enabled:enabled, id:id, imageLibraryID:imageLibraryID, label:label, stars:stars});
}
function set model(m) {
if (m.enabled != null) {
enabled = (m.enabled);
}
if (m.id != null) {
id = (m.id);
}
if (m.imageLibraryID != null) {
imageLibraryID = (m.imageLibraryID);
}
if (m.label != null) {
label = (m.label);
}
if (m.stars != null) {
stars = (m.stars);
}
//return(model);
}
function get enabled() {
return(_boolEnabled);
}
function set enabled(e) {
_boolEnabled = e;
invalidate();
//return(enabled);
}
function get id() {
return(_strID);
}
function set id(i) {
_strID = i;
//return(id);
}
function get imageLibraryID() {
return(_strImageLibraryID);
}
function set imageLibraryID(i) {
_strImageLibraryID = i;
invalidate();
//return(imageLibraryID);
}
function get label() {
return(_strLabel);
}
function set label(l) {
_strLabel = l;
invalidate();
//return(label);
}
function get isNew() {
return(_boolIsNew);
}
function set isNew(n) {
_boolIsNew = n;
invalidate();
//return(isNew);
}
function get selected() {
return(_boolSelected);
}
function set selected(s) {
_boolSelected = s;
onOut();
//return(selected);
}
function get stars() {
return(_arrayStars);
}
function set stars(a) {
_arrayStars = a;
invalidate();
//return(stars);
}
static var STARS_H_PADDING = 10;
static var STARS_V_PADDING = 16;
var _boolEnabled = false;
var _strID = "";
var _strImageLibraryID = "";
var _strLabel = "";
var _boolIsNew = false;
var _boolSelected = false;
var _arrayStars = null;
var _arrayStarMCs = null;
var _tmgLabel = null;
var _tmgNew = null;
var _tmgNewCharacter = null;
var _tmgStarburstShow = null;
var _tmgStarburstRotate = null;
}
Symbol 2662 MovieClip [__Packages.com.hitf.tileGameClasses.charSelectScreenClasses.CharacterSelectGroup] Frame 0
class com.hitf.tileGameClasses.charSelectScreenClasses.CharacterSelectGroup extends MovieClip
{
var _characterSelect0, attachMovie, addEventListener, _parent, dispatchEvent;
function CharacterSelectGroup () {
super();
init();
}
function init() {
mx.events.EventDispatcher.initialize(this);
_arrayModel = [];
_arrayCharacterSelects = [_characterSelect0];
_schedNew = new com.hitf.Schedule();
}
function arrange() {
while (_arrayCharacterSelects.length > 1) {
_arrayCharacterSelects.pop().removeMovieClip();
}
var _local3 = model;
var _local6 = 0.5;
_tmgCharacterSelects = new com.hitf.transitions.TweenManager();
var _local2 = 0;
while (_local2 < model.length) {
if (_local2 > 0) {
_arrayCharacterSelects.push(attachMovie("CharacterSelect", "_characterSelect" + _local2, _local2, {_x:_characterSelect0._x + (_local2 * PADDING), _y:_characterSelect0._y}));
}
addEventListener("onSelectedIDChange", _arrayCharacterSelects[_local2]);
_arrayCharacterSelects[_local2].addEventListener("onClick", this);
if (_local3[_local2].isNew && (!_parent._parent.model.b_replayLevel)) {
_local3[_local2].enabled = false;
_schedNew.addCommand(new com.hitf.Command(_arrayCharacterSelects[_local2], _arrayCharacterSelects[_local2].setNew, [true]), _local6++);
}
_arrayCharacterSelects[_local2].model = _local3[_local2];
_tmgCharacterSelects.addTween(_local2 * 0.05, _arrayCharacterSelects[_local2], "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.2);
_tmgCharacterSelects.addTween(_local2 * 0.05, _arrayCharacterSelects[_local2], "_xscale", mx.transitions.easing.Regular.easeInOut, 80, 100, 0.2);
_tmgCharacterSelects.addTween(_local2 * 0.05, _arrayCharacterSelects[_local2], "_yscale", mx.transitions.easing.Regular.easeInOut, 80, 100, 0.2);
_local2++;
}
_schedNew.play();
_tmgCharacterSelects.play();
}
function onClick(e) {
selectedID = (e.id);
dispatchEvent(e);
}
function get model() {
return(_arrayModel);
}
function set model(m) {
_arrayModel = m;
arrange();
//return(model);
}
function get selectedID() {
return(_strSelectedID);
}
function set selectedID(s) {
_strSelectedID = s;
dispatchEvent({target:this, type:"onSelectedIDChange", id:s});
//return(selectedID);
}
static var PADDING = 50;
var _arrayModel = null;
var _strSelectedID = null;
var _arrayCharacterSelects = null;
var _schedNew = null;
var _tmgShow = null;
var _tmgCharacterSelects = null;
}
Symbol 2663 MovieClip [__Packages.com.hitf.tileGameClasses.CharacterSelectScreen] Frame 0
class com.hitf.tileGameClasses.CharacterSelectScreen extends MovieClip
{
var _tmgShow, _clickLock, _intID, _characterSelectGroup, _tmgError, _mcError, _tmgCopyOneStep, _mcLabel2, _mcCopy2, _tmgCopyTwoSteps, _mcLabel1, _mcCopy1, _btnNext, onEnterFrame, onCharacterSelectLoad, _selectedCharacter, dispatchEvent, _arrayCharacterSelectGroupModel;
function CharacterSelectScreen () {
super();
init();
}
function show() {
_tmgShow.play();
}
function hide() {
_tmgShow.rewind();
}
function clearClickLock() {
trace("clear click lock");
_clickLock = false;
clearInterval(_intID);
}
function init() {
_clickLock = true;
_intID = setInterval(this, "clearClickLock", 1000);
mx.events.EventDispatcher.initialize(this);
Key.addListener(this);
initTransitions();
}
function initTransitions() {
_tmgShow = new com.hitf.transitions.TweenManager();
_tmgShow.addTween(0, _characterSelectGroup, "_x", mx.transitions.easing.Regular.easeInOut, 600, 9, 0.4);
_tmgError = new com.hitf.transitions.TweenManager();
_tmgError.addTween(0, _mcError, "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.1);
_tmgError.addTween(2, _mcError, "_alpha", mx.transitions.easing.Regular.easeInOut, 100, 0, 0.1);
_tmgCopyOneStep = new com.hitf.transitions.TweenManager();
_tmgCopyOneStep.addTween(0, _mcLabel2, "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.3);
_tmgCopyOneStep.addTween(0, _mcLabel2, "_xscale", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.3);
_tmgCopyOneStep.addTween(0, _mcLabel2, "_yscale", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.3);
_tmgCopyOneStep.addTween(0, _mcCopy2, "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.3);
_tmgCopyTwoSteps = new com.hitf.transitions.TweenManager();
_tmgCopyTwoSteps.addTween(0, _mcLabel1, "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.3);
_tmgCopyTwoSteps.addTween(0, _mcLabel1, "_xscale", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.3);
_tmgCopyTwoSteps.addTween(0, _mcLabel1, "_yscale", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.3);
_tmgCopyTwoSteps.addTween(0, _mcCopy1, "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.3);
_tmgCopyTwoSteps.addTween(1.7, _mcCopy1, "_alpha", mx.transitions.easing.Regular.easeInOut, 100, 0, 0.3);
_tmgCopyTwoSteps.addTween(1.7, _mcLabel1, "_alpha", mx.transitions.easing.Regular.easeInOut, 100, 0, 0.3);
_tmgCopyTwoSteps.addTween(1.7, _mcLabel1, "_xscale", mx.transitions.easing.Regular.easeInOut, 100, 0, 0.3);
_tmgCopyTwoSteps.addTween(1.7, _mcLabel1, "_yscale", mx.transitions.easing.Regular.easeInOut, 100, 0, 0.3);
_tmgCopyTwoSteps.addTween(2, _mcLabel2, "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.3);
_tmgCopyTwoSteps.addTween(2, _mcLabel2, "_xscale", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.3);
_tmgCopyTwoSteps.addTween(2, _mcLabel2, "_yscale", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.3);
_tmgCopyTwoSteps.addTween(2, _mcCopy2, "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.3);
}
function initChildren() {
_characterSelectGroup.addEventListener("onClick", this);
_btnNext.addEventListener("onClick", this);
_btnNext.__set__id("next");
show();
}
function invalidate() {
onEnterFrame = function () {
delete this.onEnterFrame;
this.arrange();
};
}
function arrange() {
_mcError._txtLabel.text = error;
_mcLabel1._txtLabel.text = label1;
_mcCopy1._txtLabel.text = copy1;
_mcLabel2._txtLabel.text = label2;
_mcCopy2._txtLabel.text = copy2;
_btnNext.__set__label(nextButtonLabel);
var _local2 = characterSelectGroupModel;
var _local3 = false;
for (var _local4 in _local2) {
if (_local2[_local4].isNew) {
_local3 = true;
break;
}
}
if (_local3) {
_tmgCopyTwoSteps.playAt(0);
} else {
_tmgCopyTwoSteps.pauseAt(0);
_tmgCopyOneStep.playAt(0);
}
_characterSelectGroup.__set__model(_local2);
}
function onLoad() {
initChildren();
onCharacterSelectLoad();
}
function onKeyDown() {
if (Key.getCode() == 32) {
onNextClick();
}
}
function onClick(e) {
if (e.id != "next") {
_selectedCharacter.__set__selected(e.label);
} else {
onNextClick();
}
}
function onNextClick() {
if (!_clickLock) {
if (_characterSelectGroup.__get__selectedID() != null) {
dispatchEvent({target:this, type:"onCharacterSelect", id:_characterSelectGroup.__get__selectedID()});
} else if (!_tmgError.__get__isPlaying()) {
_tmgError.playAt(0);
}
}
}
function get model() {
return({error:error, label1:label1, copy1:copy1, label2:label2, copy2:copy2, nextButtonLabel:nextButtonLabel});
}
function set model(m) {
error = (m.error);
if (!_root._tileGame._model.b_replayLevel) {
label1 = (m.label1);
copy1 = (m.copy1);
}
label2 = (m.label2);
copy2 = (m.copy2);
nextButtonLabel = (m.nextButtonLabel);
characterSelectGroupModel = (m.characterSelectGroupModel);
//return(model);
}
function get error() {
return(_strError);
}
function set error(e) {
_strError = e;
invalidate();
//return(error);
}
function get label1() {
return(_strLabel1);
}
function set label1(l) {
_strLabel1 = l;
invalidate();
//return(label1);
}
function get copy1() {
return(_strCopy1);
}
function set copy1(c) {
_strCopy1 = c;
invalidate();
//return(copy1);
}
function get label2() {
return(_strLabel2);
}
function set label2(l) {
_strLabel2 = l;
invalidate();
//return(label2);
}
function get copy2() {
return(_strCopy2);
}
function set copy2(c) {
_strCopy2 = c;
invalidate();
//return(copy2);
}
function get nextButtonLabel() {
return(_strNextButtonLabel);
}
function set nextButtonLabel(n) {
_strNextButtonLabel = n;
invalidate();
//return(nextButtonLabel);
}
function get characterSelectGroupModel() {
return(_arrayCharacterSelectGroupModel);
}
function set characterSelectGroupModel(c) {
_arrayCharacterSelectGroupModel = c;
invalidate();
//return(characterSelectGroupModel);
}
var _strError = "";
var _strLabel1 = "";
var _strCopy1 = "";
var _strLabel2 = "";
var _strCopy2 = "";
var _strNextButtonLabel = "";
}
Symbol 2664 MovieClip [__Packages.com.hitf.tileGameClasses.hudClasses.RankStarburst] Frame 0
class com.hitf.tileGameClasses.hudClasses.RankStarburst extends MovieClip
{
var _mcStarburst, onEnterFrame, _txtRank, _mynumb;
function RankStarburst () {
super();
init();
}
function init() {
_cfxStarburst = new com.hitf.transitions.ColorFX(_mcStarburst);
}
function invalidate() {
onEnterFrame = function () {
delete this.onEnterFrame;
this.arrange();
};
}
function arrange() {
_txtRank.text = mynumb.toString();
_cfxStarburst.__set__rgbHex(_numRGBStarburst);
}
function set mynumb(n) {
if (n == 1) {
rgbStarburst = (255);
} else if (n == 2) {
rgbStarburst = (16711680);
} else if (n == 3) {
rgbStarburst = (16776960);
}
_mynumb = n;
invalidate();
//return(mynumb);
}
function get mynumb() {
return(_mynumb);
}
function get rgbStarburst() {
return(_numRGBStarburst);
}
function set rgbStarburst(r) {
_numRGBStarburst = r;
invalidate();
//return(rgbStarburst);
}
var _numRGBStarburst = 16777215;
var _cfxStarburst = null;
}
Symbol 2665 MovieClip [__Packages.com.hitf.tileGameClasses.hudClasses.SpecialMoveQueue] Frame 0
class com.hitf.tileGameClasses.hudClasses.SpecialMoveQueue extends MovieClip
{
var onEnterFrame;
function SpecialMoveQueue () {
super();
init();
}
function init() {
arrange();
}
function invalidate() {
onEnterFrame = function () {
delete this.onEnterFrame;
this.arrange();
};
}
function arrange() {
var _local2 = 1;
while (_local2 <= 3) {
this["_mcSpecialMove" + _local2]._visible = _local2 <= specialMoves;
_local2++;
}
}
function onSpecialMovesChange(e) {
specialMoves = (character.__get__model().specialMoves);
}
function get character() {
return(_character);
}
function set character(c) {
_character = c;
specialMoves = (c.__get__model().specialMoves);
c.__get__model().addEventListener("onSpecialMovesChange", this);
//return(character);
}
function get specialMoves() {
return(_numSpecialMoves);
}
function set specialMoves(s) {
_numSpecialMoves = s;
invalidate();
//return(specialMoves);
}
var _character = null;
var _numSpecialMoves = 0;
}
Symbol 2666 MovieClip [__Packages.com.hitf.tileGameClasses.levelRankingsClasses.LevelRankingsBioImage] Frame 0
class com.hitf.tileGameClasses.levelRankingsClasses.LevelRankingsBioImage extends com.hitf.tileGameClasses.hudClasses.characterBioClasses.BioImage
{
var __set__imageFrame, _mcStarburst, onEnterFrame, _txtRank;
function LevelRankingsBioImage () {
super();
}
function init() {
super.init();
__set__imageFrame("ranking");
_cfxStarburst = new com.hitf.transitions.ColorFX(_mcStarburst);
}
function invalidate() {
onEnterFrame = function () {
delete this.onEnterFrame;
this.arrange();
};
}
function arrange() {
_txtRank.text = rank.toString();
_cfxStarburst.__set__rgbHex(_numRGBStarburst);
}
function get rank() {
return(_numRank);
}
function set rank(r) {
_numRank = r;
invalidate();
//return(rank);
}
function get rgbStarburst() {
return(_numRGBStarburst);
}
function set rgbStarburst(r) {
_numRGBStarburst = r;
invalidate();
//return(rgbStarburst);
}
var _numRank = 1;
var _numRGBStarburst = 16777215;
var _cfxStarburst = null;
}
Symbol 2667 MovieClip [__Packages.com.hitf.tileGameClasses.LevelRankings] Frame 0
class com.hitf.tileGameClasses.LevelRankings extends MovieClip
{
var _bioImage0, _bioImage1, onEnterFrame, attachMovie, _txtFirstPlace;
function LevelRankings () {
super();
init();
}
function init() {
_arrayModel = [];
_arrayBioImages = [_bioImage0, _bioImage1];
}
function invalidate() {
onEnterFrame = function () {
delete this.onEnterFrame;
this.arrange();
};
}
function arrange() {
var _local6 = 0;
while ((_arrayBioImages.length > 2) && (_local6 < 100)) {
_arrayBioImages.pop().removeMovieClip();
_local6++;
}
_tmgBioImages = new com.hitf.transitions.TweenManager();
var _local3 = characters;
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local2 > 1) {
var _local5 = _bioImage1._x + (((_local2 - 1) % 3) * H_PADDING);
var _local4 = _bioImage1._y + (Math.floor((_local2 - 1) / 3) * V_PADDING);
_arrayBioImages.push(attachMovie("LevelRankingsBioImage", "_bioImage" + _local2, _local2, {_x:_local5, _y:_local4}));
}
_arrayBioImages[_local2].rank = _local2 + 1;
_arrayBioImages[_local2].imageLibraryID = _local3[_local2].model.bioImageLibraryID;
_arrayBioImages[_local2].rgbFill = _local3[_local2].model.rgbHighlight;
if (_local2 == 0) {
_arrayBioImages[_local2].rgbStarburst = 255;
} else if (_local2 == 1) {
_arrayBioImages[_local2].rgbStarburst = 16711680 /* 0xFF0000 */;
} else if (_local2 == 2) {
_arrayBioImages[_local2].rgbStarburst = 16776960 /* 0xFFFF00 */;
}
_tmgBioImages.addTween(0.1 * _local2, _arrayBioImages[_local2], "_alpha", mx.transitions.easing.Regular.easeInOut, 0, 100, 0.2);
_tmgBioImages.addTween(0.1 * _local2, _arrayBioImages[_local2], "_xscale", mx.transitions.easing.Regular.easeInOut, 0, _arrayBioImages[_local2]._xscale, 0.2);
_tmgBioImages.addTween(0.1 * _local2, _arrayBioImages[_local2], "_yscale", mx.transitions.easing.Regular.easeInOut, 0, _arrayBioImages[_local2]._yscale, 0.2);
_local2++;
}
_tmgBioImages.play();
_txtFirstPlace.text = _local3[0].model.label;
}
function sortCharacters(a, b) {
trace((a.__get__type() + "...") + b.__get__type());
if (a.__get__model().__get__health() > b.__get__model().__get__health()) {
return(-1);
}
if (a.__get__model().__get__health() < b.__get__model().__get__health()) {
return(1);
}
if (a.__get__model().__get__timeOfDeath() > b.__get__model().__get__timeOfDeath()) {
return(-1);
}
if (a.__get__model().__get__timeOfDeath() < b.__get__model().__get__timeOfDeath()) {
return(1);
}
return(0);
}
function get characters() {
return(_arrayCharacters);
}
function set characters(c) {
c.sort(sortCharacters);
if (_didLose && (c[0].type == "userCharacter")) {
trace("Time of Death Fix");
var _local3 = c[0];
c[0] = c[1];
c[1] = _local3;
}
_arrayCharacters = c;
invalidate();
//return(characters);
}
function get didLose() {
return(_didLose);
}
function set didLose(b) {
_didLose = b;
//return(didLose);
}
static var H_PADDING = 52;
static var V_PADDING = 62;
var _arrayCharacters = null;
var _arrayModel = null;
var _arrayBioImages = null;
var _didLose = false;
var _tmgBioImages = null;
}
Symbol 2668 MovieClip [__Packages.com.hitf.tileGameClasses.WinScreen] Frame 0
class com.hitf.tileGameClasses.WinScreen extends MovieClip
{
var _btnNext, onEnterFrame, _txtAccuracy, _txtEliminations, _txtJawbreakers, _txtPoints, _txtLabel, _txtCopy, _txtCodeLabel, _txtCode, _rankings, onWinScreenLoad, dispatchEvent;
function WinScreen () {
super();
init();
}
function init() {
mx.events.EventDispatcher.initialize(this);
Key.addListener(this);
}
function initChildren() {
_btnNext.addEventListener("onClick", this);
}
function invalidate() {
onEnterFrame = function () {
delete this.onEnterFrame;
this.arrange();
};
}
function arrange() {
var _local6 = userCharacter.__get__model().__get__projectileHits();
var _local3 = userCharacter.__get__model().__get__projectileAttempts();
var _local2 = ((_local3 == 0) ? 0 : (Math.round((100 * _local6) / _local3)));
if (_local2 > 96) {
_local2 = 96;
}
var _local4 = userCharacter.__get__model().__get__eliminations();
var _local7 = userCharacter.__get__model().__get__specialMovePickups() + userCharacter.__get__model().__get__healthPickups();
var _local5 = userCharacter.__get__model().__get__points();
_txtAccuracy.text = _local2.toString() + "%";
_txtEliminations.text = _local4.toString();
_txtJawbreakers.text = _local7.toString();
_txtPoints.text = _local5.toString();
_txtLabel.text = label;
_txtCopy.text = copy;
_txtCodeLabel.text = codeLabel;
_txtCode.text = code;
_btnNext.__set__label(nextButtonLabel);
_rankings.__set__characters(characters);
}
function onLoad() {
trace("I'm loaded");
initChildren();
onWinScreenLoad();
}
function onKeyDown() {
if (Key.getCode() == 32) {
onClick();
}
}
function onClick(e) {
trace("I'm clicked");
dispatchEvent({target:this, type:"onNextLevel"});
}
function get model() {
return({label:label, copy:copy, codeLabel:codeLabel, code:code, nextButtonLabel:nextButtonLabel, characters:characters});
}
function set model(m) {
if (m.label != null) {
label = (m.label);
}
if (m.copy != null) {
copy = (m.copy);
}
if (m.codeLabel != null) {
codeLabel = (m.codeLabel);
}
if (m.code != null) {
code = (m.code);
}
if (m.nextButtonLabel != null) {
nextButtonLabel = (m.nextButtonLabel);
}
if (m.characters != null) {
characters = (m.characters);
}
if (m.userCharacter != null) {
userCharacter = (m.userCharacter);
}
//return(model);
}
function get label() {
return(_strLabel);
}
function set label(l) {
_strLabel = l;
invalidate();
//return(label);
}
function get copy() {
return(_strCopy);
}
function set copy(c) {
_strCopy = c;
invalidate();
//return(copy);
}
function get codeLabel() {
return(_strCodeLabel);
}
function set codeLabel(c) {
_strCodeLabel = c;
invalidate();
//return(codeLabel);
}
function get code() {
return(_strCode);
}
function set code(c) {
_strCode = c;
invalidate();
//return(code);
}
function get nextButtonLabel() {
return(_strNextButtonLabel);
}
function set nextButtonLabel(n) {
_strNextButtonLabel = n;
invalidate();
//return(nextButtonLabel);
}
function get characters() {
return(_arrayCharacters);
}
function set characters(c) {
_arrayCharacters = c;
invalidate();
//return(characters);
}
function get userCharacter() {
return(_userCharacter);
}
function set userCharacter(u) {
_userCharacter = u;
invalidate();
//return(userCharacter);
}
var _strLabel = "";
var _strCopy = "";
var _strCodeLabel = "";
var _strCode = "";
var _strNextButtonLabel = "";
var _arrayCharacters = null;
var _userCharacter = null;
}
Symbol 2669 MovieClip [__Packages.com.hitf.tileGameClasses.loseScreenClasses.LoseScreenScene] Frame 0
class com.hitf.tileGameClasses.loseScreenClasses.LoseScreenScene extends MovieClip
{
var onEnterFrame, _mcHolder;
function LoseScreenScene () {
super();
}
function invalidate() {
onEnterFrame = function () {
delete this.onEnterFrame;
this.arrange();
};
}
function arrange() {
_mcHolder.attachMovie(imageLibraryID, "_mcImage", 0, {_xscale:140, _yscale:140});
_mcHolder._mcImage.gotoAndStop("lose");
}
function get imageLibraryID() {
return(_strImageLibraryID);
}
function set imageLibraryID(i) {
_strImageLibraryID = i;
invalidate();
//return(imageLibraryID);
}
var _strImageLibraryID = "";
}
Symbol 2670 MovieClip [__Packages.com.hitf.tileGameClasses.LoseScreen] Frame 0
class com.hitf.tileGameClasses.LoseScreen extends MovieClip
{
var _btnNext, onEnterFrame, _txtFooterLabel, _loseScreenScene, _rankings, onLoseScreenLoad, dispatchEvent, _arrayCharacters;
function LoseScreen () {
super();
init();
}
function init() {
mx.events.EventDispatcher.initialize(this);
Key.addListener(this);
}
function initChildren() {
_btnNext.addEventListener("onClick", this);
}
function invalidate() {
onEnterFrame = function () {
delete this.onEnterFrame;
this.arrange();
};
}
function arrange() {
_txtFooterLabel.text = footerLabel;
_btnNext.__set__label(nextButtonLabel);
_loseScreenScene.__set__imageLibraryID(userCharacter().__get__model().bioImageLibraryID);
_rankings.__set__didLose(true);
_rankings.__set__characters(characters);
}
function userCharacter() {
var _local2 = characters;
for (var _local3 in _local2) {
if (_local2[_local3].type == "userCharacter") {
return(_local2[_local3]);
}
}
}
function onLoad() {
initChildren();
onLoseScreenLoad();
}
function onKeyDown() {
if (Key.getCode() == 32) {
onClick();
}
}
function onClick(e) {
dispatchEvent({target:this, type:"onReplayLevel"});
}
function get model() {
return({});
}
function set model(m) {
if (m.footerLabel != null) {
footerLabel = (m.footerLabel);
}
if (m.nextButtonLabel != null) {
nextButtonLabel = (m.nextButtonLabel);
}
if (m.characters != null) {
characters = (m.characters);
}
//return(model);
}
function get footerLabel() {
return(_strFooterLabel);
}
function set footerLabel(l) {
_strFooterLabel = l;
invalidate();
//return(footerLabel);
}
function get nextButtonLabel() {
return(_strNextButtonLabel);
}
function set nextButtonLabel(n) {
_strNextButtonLabel = n;
invalidate();
//return(nextButtonLabel);
}
function get characters() {
return(_arrayCharacters);
}
function set characters(c) {
_arrayCharacters = c;
invalidate();
//return(characters);
}
var _strFooterLabel = "";
var _strNextButtonLabel = "";
}
Symbol 2671 MovieClip [__Packages.com.hitf.tileGameClasses.winGameScreenClasses.WinGameScreenScene] Frame 0
class com.hitf.tileGameClasses.winGameScreenClasses.WinGameScreenScene extends MovieClip
{
var onEnterFrame, _mcHolder;
function WinGameScreenScene () {
super();
}
function LoseScreenScene() {
}
function invalidate() {
onEnterFrame = function () {
delete this.onEnterFrame;
this.arrange();
};
}
function arrange() {
_mcHolder.attachMovie(imageLibraryID, "_mcImage", 0, {_xscale:160, _yscale:160});
_mcHolder._mcImage.gotoAndStop("win");
}
function get imageLibraryID() {
return(_strImageLibraryID);
}
function set imageLibraryID(i) {
_strImageLibraryID = i;
invalidate();
//return(imageLibraryID);
}
var _strImageLibraryID = "";
}
Symbol 2672 MovieClip [__Packages.com.hitf.tileGameClasses.WinGameScreen] Frame 0
class com.hitf.tileGameClasses.WinGameScreen extends MovieClip
{
var _clickLock, _intID, _cheatTxt, _cheatDescription, _btnNext, onEnterFrame, _winGameScreenScene, _character, onWinGameScreenLoad, dispatchEvent;
function WinGameScreen () {
super();
init();
}
function init() {
_clickLock = true;
_intID = setInterval(this, "clearClickLock", 2000);
mx.events.EventDispatcher.initialize(this);
var _local4 = new Array("For your great food fighting abilities you've been granted a cheat code for unlimited food!", "For your great food fighting abilities you've been granted a cheat code for invincibility!");
var _local3 = new Array("buffet", "spotless");
var _local2 = Math.floor(Math.random() * 2);
_cheatTxt.text = _local3[_local2];
_cheatDescription.text = _local4[_local2];
Key.addListener(this);
}
function initChildren() {
_btnNext.addEventListener("onClick", this);
}
function invalidate() {
onEnterFrame = function () {
delete this.onEnterFrame;
this.arrange();
};
}
function arrange() {
_btnNext.__set__label(nextButtonLabel);
_winGameScreenScene.__set__imageLibraryID(_character.__get__model().libraryID);
}
function onLoad() {
initChildren();
onWinGameScreenLoad();
}
function clearClickLock() {
trace("clear click lock");
_clickLock = false;
clearInterval(_intID);
}
function onKeyDown() {
if (Key.getCode() == 32) {
onClick();
}
}
function onClick(e) {
if (!_clickLock) {
dispatchEvent({target:this, type:"onNewGame"});
}
}
function get model() {
return({});
}
function set model(m) {
if (m.nextButtonLabel != null) {
nextButtonLabel = (m.nextButtonLabel);
}
if (m.character != null) {
character = (m.character);
}
//return(model);
}
function get nextButtonLabel() {
return(_strNextButtonLabel);
}
function set nextButtonLabel(n) {
_strNextButtonLabel = n;
invalidate();
//return(nextButtonLabel);
}
function get character() {
return(_character);
}
function set character(c) {
_character = c;
invalidate();
//return(character);
}
var _strNextButtonLabel = "Play Again";
}
Symbol 2673 MovieClip [__Packages.com.hitf.TileGame] Frame 0
class com.hitf.TileGame extends MovieClip
{
var _model, _clickLock, _nextLevelLock, _lastLevelClick, _leestate, _introScreen, gotoAndStop, _instructionsScreen, _characterSelectScreen, _map, _hud, onEnterFrame, _loseScreen, _winScreen, _winGameScreen, _arrayCharacters, _userCharacter, _strCheat;
function TileGame () {
super();
init();
}
function init() {
_model = new com.hitf.tileGameClasses.TileGameModel();
_model.addEventListener("onGlobalXMLLoad", this);
_model.addEventListener("onLevelXMLLoad", this);
leestate = ("");
_clickLock = false;
_nextLevelLock = false;
_lastLevelClick = 0;
}
function set leestate(s) {
_leestate = s;
//return(leestate);
}
function get leestate() {
return(_leestate);
}
function initChildren() {
_introScreen.addEventListener("onPlayClick", this);
_model.loadGlobalXML(GLOBAL_XML_URL);
}
function trackPlay() {
var _local1 = new Date().getTime();
loadMovieNum ("tracker.swf?" + _local1, 10000);
}
function remove(m) {
m.swapDepths(0);
m.removeMovieClip();
}
function onLoad() {
initChildren();
}
function onPlayClick() {
trackPlay();
remove(_introScreen);
gotoAndStop("instructions");
_instructionsScreen.onInstructionsLoad = mx.utils.Delegate.create(this, onInstructionsLoad);
}
function onInstructionsLoad() {
_instructionsScreen.addEventListener("onInstructionsNextClick", this);
}
function onInstructionsNextClick(e) {
if (!_clickLock) {
_model.__set__cheat(e.code);
_model.__set__level(_model.codeToLevel(e.code));
_clickLock = true;
_model.loadLevelXML();
}
}
function onGlobalXMLLoad(s) {
}
function doNothing() {
trace("DO NOTHING");
}
function onLevelXMLLoad(s) {
var _local3 = setInterval(this, "doNothing", 99999);
_local3 = _local3 - 2000;
if (_local3 < -1) {
_local3 = -1;
}
var _local2 = _local3;
while (_local2 <= (_local3 + 2000)) {
clearInterval(_local2);
_local2++;
}
_clickLock = false;
_boolXMLLoaded = true;
remove(_instructionsScreen);
gotoAndStop("characterSelect");
_characterSelectScreen.onCharacterSelectLoad = mx.utils.Delegate.create(this, onCharacterSelectLoad);
}
function onCharacterSelectLoad() {
_characterSelectScreen.addEventListener("onCharacterSelect", this);
_characterSelectScreen.__set__model(model.characterSelectModel);
}
function onCharacterSelect(e) {
if (!_clickLock) {
_nextLevelLock = false;
stopAllSounds();
remove(_characterSelectScreen);
gotoAndStop("map");
_map = new com.hitf.tileGameClasses.Map(this, "MapView", "_mapView", 0, model.__get__dimensions());
_map.addEventListener("onLose", this);
_map.addEventListener("onWin", this);
_map.addEventListener("onUltimateWin", this);
_hud.swapDepths(1);
_map.__get__model().__set__cheat(_model.cheat);
_map.__get__model().__set__userCharacterID(e.id);
onEnterFrame = function () {
delete this.onEnterFrame;
this._map.model.hud = this._hud;
this._map.model._numLastPoints = this._numLastPoints;
this._hud._scoreboard.score = this._numLastPoints;
this._map.model.mapItemModel = this.model.mapItemModel;
};
}
}
function onLose(e) {
trace("ON LOSE!");
remove(_hud);
_map.__get__view().clearIt();
_map.__get__view().removeMovieClip();
stopAllSounds();
characters = (e.characters);
userCharacter = (e.userCharacter);
gotoAndStop("lose");
_loseScreen.onLoseScreenLoad = mx.utils.Delegate.create(this, onLoseScreenLoad);
}
function onLoseScreenLoad() {
_loseScreen.addEventListener("onReplayLevel", this);
var _local2 = model.__get__loseModel();
_local2.characters = characters;
_loseScreen.__set__model(_local2);
}
function onWin(e) {
trace("ON WIN!");
_numLastPoints = e.userCharacter.model.points;
remove(_hud);
_map.__get__view().clearIt();
_map.__get__view().removeMovieClip();
characters = (e.characters);
userCharacter = (e.userCharacter);
gotoAndStop("win");
_winScreen.onWinScreenLoad = mx.utils.Delegate.create(this, onWinScreenLoad);
}
function onWinScreenLoad() {
_winScreen.addEventListener("onNextLevel", this);
var _local2 = model.__get__winModel();
_local2.characters = characters;
_local2.userCharacter = userCharacter;
_winScreen.__set__model(_local2);
}
function onWinGameScreenLoad() {
trace(_winGameScreen.addEventListener);
_winGameScreen.addEventListener("onNewGame", this);
_winGameScreen.__set__character(userCharacter);
}
function onNextLevel(e) {
var _local2 = getTimer() - _lastLevelClick;
trace((((("ON NEXT LEVEL " + _clickLock) + " ... ") + _nextLevelLock) + " TIME DIFF: ") + _local2);
if ((_local2 > 1000) || (!(_clickLock || (_nextLevelLock)))) {
_lastLevelClick = getTimer();
_nextLevelLock = true;
_model.__set__b_replayLevel(false);
if (_model.__get__level() < _model.__get__totalLevels()) {
_model.__set__level((_model.__get__level()+1));
_model.loadLevelXML();
} else {
gotoAndStop("winGame");
_winGameScreen.onWinGameScreenLoad = mx.utils.Delegate.create(this, onWinGameScreenLoad);
}
}
}
function onUltimateWin(e) {
if (!_clickLock) {
_model.__set__level(_model.totalLevels);
_numLastPoints = e.userCharacter.model.points;
remove(_hud);
_map.__get__view().clearIt();
_map.__get__view().removeMovieClip();
stopAllSounds();
characters = (e.characters);
userCharacter = (e.userCharacter);
gotoAndStop("win");
_winScreen.onWinScreenLoad = mx.utils.Delegate.create(this, onWinScreenLoad);
}
}
function onReplayLevel(e) {
if (!_clickLock) {
stopAllSounds();
trackPlay();
_model.__set__b_replayLevel(true);
_clickLock = true;
_model.loadLevelXML();
}
}
function onNewGame(e) {
if (!_clickLock) {
trackPlay();
_numLastPoints = 0;
_model.__set__level(1);
gotoAndStop("instructions");
_instructionsScreen.onInstructionsLoad = mx.utils.Delegate.create(this, onInstructionsLoad);
}
}
function get model() {
return(_model);
}
function set model(m) {
_model = m;
//return(model);
}
function get characters() {
return(_arrayCharacters);
}
function set characters(c) {
_arrayCharacters = c;
//return(characters);
}
function get userCharacter() {
return(_userCharacter);
}
function set userCharacter(c) {
_userCharacter = c;
//return(userCharacter);
}
function get map() {
return(_map);
}
function get cheat() {
return(_strCheat);
}
function set cheat(s) {
_strCheat = s;
//return(cheat);
}
static var GLOBAL_XML_URL = "assets/xml/global.xml";
var _boolXMLLoaded = false;
var _numLastPoints = 0;
}
Symbol 2674 MovieClip [__Packages.com.hitf.tileGameClasses.TileGameModel] Frame 0
class com.hitf.tileGameClasses.TileGameModel
{
var _xmlGlobalModel, _xmlLevelModel, _objGlobalModel, _xml2Object, _objLevelModel, dispatchEvent;
function TileGameModel () {
init();
}
function loadGlobalXML(u) {
_xmlGlobalModel.load(u);
}
function loadLevelXML() {
_xmlLevelModel = new XML();
_xmlLevelModel.ignoreWhite = true;
_xmlLevelModel.onLoad = mx.utils.Delegate.create(this, onLevelXMLLoad);
_xmlLevelModel.load(levelToURL(_numLevel));
}
function codeToCheat(c) {
var _local2 = _objGlobalModel.global.cheats.cheat;
for (var _local4 in _local2) {
if (_local2[_local4].code.data.toLowerCase() == c.toLowerCase()) {
return(_local2[_local4].type.data);
}
}
return("");
}
function codeToLevel(c) {
var _local2 = _objGlobalModel.global.levels.level;
for (var _local4 in _local2) {
if (_local2[_local4].code.data == c) {
return(parseInt(_local4) + 1);
}
}
return(_numLevel);
}
function levelToURL(l) {
return(_objGlobalModel.global.levels.level[l - 1].url.data);
}
function init() {
mx.events.EventDispatcher.initialize(this);
_xml2Object = new it.sephiroth.XML2Object();
_xmlGlobalModel = new XML();
_xmlGlobalModel.ignoreWhite = true;
_xmlGlobalModel.onLoad = mx.utils.Delegate.create(this, onGlobalXMLLoad);
_xmlLevelModel = new XML();
_xmlLevelModel.ignoreWhite = true;
_xmlLevelModel.onLoad = mx.utils.Delegate.create(this, onLevelXMLLoad);
_b_replayLevel = false;
}
function getCharacterSelectGroupModel() {
var _local5 = [];
var _local6 = _objLevelModel.level.map.mapItem.length;
var _local4 = 0;
while (_local4 < _local6) {
var _local3 = _objLevelModel.level.map.mapItem[_local4];
if (_local3.type.data == "character") {
var _local2 = {};
_local2.enabled = _local3.playable.data == "true";
_local2.id = _local3.id.data;
_local2.imageLibraryID = _local3.bioImageLibraryID.data;
_local2.isNew = _local3.isNew.data == "true";
_local2.label = _local3.label.data;
_local2.stars = _local3.stars.data.split(",");
_local5.push(_local2);
}
_local4++;
}
return(_local5);
}
function onGlobalXMLLoad(s) {
if (s) {
_objGlobalModel = _xml2Object.parseXML(_xmlGlobalModel);
}
dispatchEvent({target:this, type:"onGlobalXMLLoad", success:s});
}
function onLevelXMLLoad(s) {
if (s) {
_objLevelModel = _xml2Object.parseXML(_xmlLevelModel);
}
dispatchEvent({target:this, type:"onLevelXMLLoad", success:s});
}
function get cheat() {
return(_strCheat);
}
function set cheat(c) {
_strCheat = c.toLowerCase();
//return(cheat);
}
function get level() {
return(_numLevel);
}
function set level(l) {
_numLevel = l;
//return(level);
}
function get totalLevels() {
return(_objGlobalModel.global.levels.level.length);
}
function get characterSelectModel() {
var _local2 = {};
var _local3 = _objLevelModel.level.characterSelect;
_local2.error = _local3.error.data;
_local2.label1 = _local3.label1.data;
_local2.copy1 = _local3.copy1.data;
_local2.label2 = _local3.label2.data;
_local2.copy2 = _local3.copy2.data;
_local2.nextButtonLabel = _local3.nextButtonLabel.data;
_local2.characterSelectGroupModel = getCharacterSelectGroupModel();
return(_local2);
}
function get mapItemModel() {
var _local5 = [];
var _local6 = _objLevelModel.level.map.mapItem.length;
var _local4 = 0;
while (_local4 < _local6) {
var _local2 = _objLevelModel.level.map.mapItem[_local4];
if (_local2.enabled.data == "true") {
var _local3 = {};
_local3.libraryID = _local2.libraryID.data;
_local3.type = _local2.type.data;
_local3.halfwidthX = parseInt(_local2.halfwidthX.data);
_local3.halfwidthY = parseInt(_local2.halfwidthY.data);
_local3.x = parseInt(_local2.x.data);
_local3.y = parseInt(_local2.y.data);
_local3.z = parseInt(_local2.z.data);
_local3.moveable = _local2.moveable.data == "true";
_local3.viewable = _local2.viewable.data == "true";
_local3.walkable = _local2.walkable.data == "true";
if (_local2.type.data == "character") {
_local3.bioImageLibraryID = _local2.bioImageLibraryID.data;
_local3.id = _local2.id.data;
_local3.label = _local2.label.data;
_local3.rgbFill = parseInt(_local2.rgbFill.data, 16);
_local3.rgbHighlight = parseInt(_local2.rgbHighlight.data, 16);
_local3.speed = parseInt(_local2.speed.data);
_local3.strength = parseInt(_local2.strength.data);
_local3.range = parseInt(_local2.range.data);
}
_local5.push(_local3);
}
_local4++;
}
return(_local5);
}
function get dimensions() {
var _local3 = _objLevelModel.level.dimensions;
var _local2 = {};
_local2.width = parseInt(_local3.width.data);
_local2.height = parseInt(_local3.height.data);
_local2.screenWidth = parseInt(_local3.screenWidth.data);
_local2.screenHeight = parseInt(_local3.screenHeight.data);
_local2.tileWidth = parseInt(_local3.tileWidth.data);
_local2.tileHeight = parseInt(_local3.tileHeight.data);
return(_local2);
}
function get winModel() {
var _local3 = _objLevelModel.level.win;
var _local2 = {};
_local2.label = _local3.label.data;
_local2.copy = _local3.copy.data;
_local2.codeLabel = _local3.codeLabel.data;
_local2.code = _local3.code.data;
_local2.nextButtonLabel = _local3.nextButtonLabel.data;
return(_local2);
}
function get loseModel() {
var _local3 = _objLevelModel.level.lose;
var _local2 = {};
_local2.label = _local3.label.data;
_local2.copy = _local3.copy.data;
_local2.footerLabel = _local3.footerLabel.data;
_local2.nextButtonLabel = _local3.nextButtonLabel.data;
return(_local2);
}
function get b_replayLevel() {
return(_b_replayLevel);
}
function set b_replayLevel(b) {
_b_replayLevel = b;
//return(b_replayLevel);
}
var _strCheat = "";
var _numLevel = 1;
var _b_replayLevel = null;
}
Symbol 2675 MovieClip [__Packages.it.sephiroth.XML2Object] Frame 0
class it.sephiroth.XML2Object extends XML
{
var oXML;
function XML2Object () {
super();
}
function get xml() {
return(oXML);
}
function parseXML(sFile) {
oResult = new Object();
oXML = sFile;
oResult = translateXML();
return(oResult);
}
function translateXML(from, path, name, position) {
var _local8;
var _local2;
var _local9;
if (path == undefined) {
path = this;
name = "oResult";
}
path = path[name];
if (from == undefined) {
from = new XML(String(xml));
from.ignoreWhite = true;
}
if (from.hasChildNodes()) {
_local8 = from.childNodes;
if (position != undefined) {
_local9 = path;
path = path[position];
}
while (_local8.length > 0) {
_local2 = _local8.shift();
if (_local2.nodeName != undefined) {
var _local4 = new Object();
_local4.attributes = _local2.attributes;
_local4.data = _local2.firstChild.nodeValue;
if (position != undefined) {
_local9 = path;
}
if (path[_local2.nodeName] != undefined) {
if (path[_local2.nodeName].__proto__ == Array.prototype) {
path[_local2.nodeName].push(_local4);
name = _local2.nodeName;
position = path[_local2.nodeName].length - 1;
} else {
var _local7 = path[_local2.nodeName];
path[_local2.nodeName] = new Array();
path[_local2.nodeName].push(_local7);
path[_local2.nodeName].push(_local4);
name = _local2.nodeName;
position = path[_local2.nodeName].length - 1;
}
} else {
path[_local2.nodeName] = _local4;
name = _local2.nodeName;
position = undefined;
}
}
if (_local2.hasChildNodes()) {
translateXML(_local2, path, name, position);
}
}
}
return(oResult);
}
var oResult = new Object();
}
Symbol 99 MovieClip [trayWide] Frame 1
#initclip 76
Object.registerClass("trayWide", com.hitf.tileGameClasses.hudClasses.ProjectileQueue);
#endinitclip
Symbol 110 MovieClip Frame 1
stop();
Instance of Symbol 110 MovieClip in Symbol 111 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Symbol 144 MovieClip Frame 19
gotoAndPlay (1);
Symbol 160 MovieClip Frame 1
stop();
Instance of Symbol 160 MovieClip in Symbol 161 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.95) {
this.play();
}
}
Symbol 172 MovieClip [edWalkingLeft] Frame 19
this.gotoAndPlay(1);
Symbol 183 MovieClip Frame 1
stop();
Symbol 184 MovieClip Frame 1
Instance of Symbol 183 MovieClip in Symbol 184 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
gotoAndPlay (2);
}
}
Symbol 191 MovieClip [edWalkingDown] Frame 19
gotoAndPlay (1);
Symbol 204 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 204 MovieClip Frame 4
_parent.onProjectile();
Symbol 204 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 211 MovieClip Frame 1
_parent.onHideProjectile();
Instance of Symbol 110 MovieClip in Symbol 211 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Symbol 211 MovieClip Frame 4
_parent.onProjectile();
Symbol 211 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 220 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 220 MovieClip Frame 4
_parent.onProjectile();
Symbol 220 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 221 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 221 MovieClip Frame 4
_parent.onProjectile();
Symbol 221 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 225 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 225 MovieClip Frame 4
_parent.onProjectile();
Symbol 225 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 226 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 226 MovieClip Frame 4
_parent.onProjectile();
Symbol 226 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 239 MovieClip Frame 24
_parent.onSpecialMove();
Symbol 239 MovieClip Frame 28
this.stop();
_parent.onMotionFinished();
Symbol 240 MovieClip [edHealthRestore] Frame 16
this.stop();
_parent.onMotionFinished();
Symbol 251 MovieClip Frame 20
this.stop();
_parent.onMotionFinished();
Symbol 253 MovieClip Frame 5
_parent.onMotionFinished();
Symbol 312 MovieClip [edSpecialMoveCollision] Frame 25
this.stop();
_parent.onMotionFinished();
Symbol 325 MovieClip Frame 9
stop();
Instance of Symbol 324 MovieClip in Symbol 332 MovieClip Frame 26
onClipEvent (enterFrame) {
if (_parent.bLooped == true) {
stop();
}
}
Symbol 332 MovieClip Frame 51
if (bLooped == null) {
var bLooped = true;
this.gotoAndPlay(2);
} else {
this.stop();
_parent.onWinFinished();
}
Symbol 335 MovieClip [edDeath] Frame 31
this.stop();
_parent.onLoseFinished();
Symbol 336 MovieClip [ed] Frame 1
this.stop();
Symbol 367 MovieClip Frame 1
stop();
Instance of Symbol 367 MovieClip in Symbol 368 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Symbol 388 MovieClip Frame 1
stop();
Instance of Symbol 388 MovieClip in Symbol 389 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Symbol 392 MovieClip Frame 1
stop();
Instance of Symbol 392 MovieClip in Symbol 393 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Symbol 432 MovieClip Frame 1
stop();
Symbol 442 MovieClip Frame 1
Instance of Symbol 432 MovieClip in Symbol 442 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Symbol 447 MovieClip Frame 17
gotoAndPlay (1);
Instance of Symbol 388 MovieClip in Symbol 471 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Symbol 472 MovieClip Frame 17
gotoAndPlay (1);
Symbol 479 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 479 MovieClip Frame 4
_parent.onProjectile();
Symbol 479 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 486 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 486 MovieClip Frame 4
_parent.onProjectile();
Symbol 486 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 489 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 489 MovieClip Frame 4
_parent.onProjectile();
Symbol 489 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 492 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 492 MovieClip Frame 4
_parent.onProjectile();
Symbol 492 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 495 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 495 MovieClip Frame 4
_parent.onProjectile();
Symbol 495 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 496 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 496 MovieClip Frame 3
_parent.onProjectile();
Symbol 496 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Instance of Symbol 367 MovieClip in Symbol 500 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Instance of Symbol 367 MovieClip in Symbol 503 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Instance of Symbol 367 MovieClip in Symbol 505 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Symbol 523 MovieClip Frame 29
_parent.onSpecialMove();
Symbol 523 MovieClip Frame 49
this.stop();
_parent.onMotionFinished();
Symbol 524 MovieClip [eddHealthRestore] Frame 16
this.stop();
_parent.onMotionFinished();
Instance of Symbol 388 MovieClip in Symbol 526 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Symbol 529 MovieClip Frame 20
this.stop();
_parent.onMotionFinished();
Symbol 531 MovieClip Frame 5
_parent.onMotionFinished();
Symbol 532 MovieClip [eddSpecialMoveCollision] Frame 25
this.stop();
_parent.onMotionFinished();
Symbol 566 MovieClip Frame 77
this.stop();
_parent.onWinFinished();
Symbol 567 MovieClip [edd] Frame 1
this.stop();
Symbol 580 MovieClip Frame 1
stop();
Instance of Symbol 580 MovieClip in Symbol 581 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.955) {
play();
}
}
Symbol 585 MovieClip Frame 1
stop();
Instance of Symbol 585 MovieClip in Symbol 586 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.956) {
play();
}
}
Symbol 653 MovieClip Frame 1
stop();
Instance of Symbol 653 MovieClip in Symbol 658 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.97) {
play();
}
}
Symbol 687 MovieClip Frame 1
stop();
Instance of Symbol 687 MovieClip in Symbol 693 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.966) {
play();
}
}
Symbol 710 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 710 MovieClip Frame 4
_parent.onProjectile();
Symbol 710 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 718 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 718 MovieClip Frame 4
_parent.onProjectile();
Symbol 718 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 724 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 724 MovieClip Frame 4
_parent.onProjectile();
Symbol 724 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 727 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 727 MovieClip Frame 4
_parent.onProjectile();
Symbol 727 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 730 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 730 MovieClip Frame 4
_parent.onProjectile();
Symbol 730 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 733 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 733 MovieClip Frame 4
_parent.onProjectile();
Symbol 733 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 767 MovieClip Frame 15
_parent.onSpecialMove();
Symbol 767 MovieClip Frame 34
this.stop();
_parent.onMotionFinished();
Symbol 768 MovieClip [eddyHealthRestore] Frame 16
this.stop();
_parent.onMotionFinished();
Symbol 769 MovieClip Frame 12
this.stop();
_parent.onMotionFinished();
Symbol 771 MovieClip Frame 5
_parent.onMotionFinished();
Symbol 772 MovieClip [eddySpecialMoveCollision] Frame 25
this.stop();
_parent.onMotionFinished();
Symbol 789 MovieClip Frame 95
this.stop();
_parent.onWinFinished();
Symbol 791 MovieClip [eddySplat] Frame 5
_parent.onMotionFinished();
Symbol 792 MovieClip [eddyDeath] Frame 31
this.stop();
_parent.onLoseFinished();
Symbol 793 MovieClip [eddy] Frame 1
this.stop();
Symbol 795 MovieClip [plankWide] Frame 1
#initclip 73
Object.registerClass("plankWide", com.hitf.tileGameClasses.hudClasses.ProjectileQueue);
#endinitclip
Symbol 829 MovieClip [plankTall] Frame 1
#initclip 74
Object.registerClass("plankTall", com.hitf.tileGameClasses.hudClasses.ProjectileQueue);
#endinitclip
Symbol 833 MovieClip Frame 1
stop();
Symbol 838 MovieClip Frame 1
stop();
Instance of Symbol 838 MovieClip in Symbol 839 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.956) {
play();
}
}
Instance of Symbol 838 MovieClip in Symbol 871 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.956) {
play();
}
}
Symbol 875 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 875 MovieClip Frame 4
_parent.onProjectile();
Symbol 875 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 878 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 878 MovieClip Frame 4
_parent.onProjectile();
Symbol 878 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 881 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 881 MovieClip Frame 4
_parent.onProjectile();
Symbol 881 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 884 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 884 MovieClip Frame 4
_parent.onProjectile();
Symbol 884 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 890 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 890 MovieClip Frame 4
_parent.onProjectile();
Symbol 890 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Instance of Symbol 838 MovieClip in Symbol 897 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.956) {
play();
}
}
Symbol 918 MovieClip Frame 18
_parent.onSpecialMove();
Symbol 918 MovieClip Frame 36
this.stop();
_parent.onMotionFinished();
Symbol 919 MovieClip [jonnyHealthRestore] Frame 16
this.stop();
_parent.onMotionFinished();
Symbol 926 MovieClip Frame 23
this.stop();
_parent.onMotionFinished();
Symbol 927 MovieClip Frame 5
_parent.onMotionFinished();
Symbol 928 MovieClip [jonnySpecialMoveCollision] Frame 25
this.stop();
_parent.onMotionFinished();
Symbol 937 MovieClip Frame 87
this.stop();
_parent.onWinFinished();
Symbol 938 MovieClip [jonnySplat] Frame 5
_parent.onMotionFinished();
Symbol 939 MovieClip [jonnyDeath] Frame 31
this.stop();
_parent.onLoseFinished();
Symbol 940 MovieClip [jonny2x4] Frame 1
this.stop();
Symbol 955 MovieClip Frame 1
stop();
Instance of Symbol 955 MovieClip in Symbol 956 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.98) {
play();
}
}
Symbol 964 MovieClip Frame 1
stop();
Instance of Symbol 964 MovieClip in Symbol 965 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.98) {
play();
}
}
Instance of Symbol 964 MovieClip in Symbol 970 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.98) {
play();
}
}
Symbol 1003 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1003 MovieClip Frame 4
_parent.onProjectile();
Symbol 1003 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1006 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1006 MovieClip Frame 4
_parent.onProjectile();
Symbol 1006 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1011 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1011 MovieClip Frame 4
_parent.onProjectile();
Symbol 1011 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1014 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1014 MovieClip Frame 4
_parent.onProjectile();
Symbol 1014 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1019 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1019 MovieClip Frame 4
_parent.onProjectile();
Symbol 1019 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1023 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1023 MovieClip Frame 4
_parent.onProjectile();
Symbol 1023 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1047 MovieClip Frame 28
_parent.onSpecialMove();
Symbol 1047 MovieClip Frame 35
this.stop();
_parent.onMotionFinished();
Symbol 1048 MovieClip [kevinHealthRestore] Frame 16
this.stop();
_parent.onMotionFinished();
Symbol 1092 MovieClip Frame 29
this.stop();
_parent.onMotionFinished();
Symbol 1094 MovieClip Frame 5
_parent.onMotionFinished();
Symbol 1095 MovieClip [kevinSpecialMoveCollision] Frame 25
this.stop();
_parent.onMotionFinished();
Instance of Symbol 964 MovieClip in Symbol 1097 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.98) {
play();
}
}
Symbol 1106 MovieClip Frame 6
stop();
Symbol 1109 MovieClip Frame 126
this.stop();
_parent.onWinFinished();
Symbol 1110 MovieClip [kevinDeath] Frame 31
this.stop();
_parent.onLoseFinished();
Symbol 1111 MovieClip [kevin] Frame 1
this.stop();
Symbol 1175 MovieClip Frame 17
gotoAndPlay (1);
Symbol 1181 MovieClip Frame 17
gotoAndPlay (1);
Symbol 1185 MovieClip Frame 17
gotoAndPlay (1);
Symbol 1188 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1188 MovieClip Frame 4
_parent.onProjectile();
Symbol 1188 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1196 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1196 MovieClip Frame 4
_parent.onProjectile();
Symbol 1196 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1201 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1201 MovieClip Frame 4
_parent.onProjectile();
Symbol 1201 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1204 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1204 MovieClip Frame 4
_parent.onProjectile();
Symbol 1204 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1207 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1207 MovieClip Frame 4
_parent.onProjectile();
Symbol 1207 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1210 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1210 MovieClip Frame 4
_parent.onProjectile();
Symbol 1210 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1238 MovieClip Frame 11
stop();
Symbol 1239 MovieClip Frame 32
_parent.onSpecialMove();
Symbol 1239 MovieClip Frame 37
this.stop();
_parent.onMotionFinished();
Symbol 1240 MovieClip [leeHealthRestore] Frame 16
this.stop();
_parent.onMotionFinished();
Symbol 1245 MovieClip Frame 27
this.stop();
_parent.onMotionFinished();
Symbol 1248 MovieClip Frame 5
_parent.onMotionFinished();
Symbol 1249 MovieClip [leeSpecialMoveCollision] Frame 25
this.stop();
_parent.onMotionFinished();
Symbol 1278 MovieClip Frame 83
this.stop();
_parent.onWinFinished();
Symbol 1279 MovieClip [leeSplat] Frame 5
_parent.onMotionFinished();
Symbol 1280 MovieClip [leeDeath] Frame 31
this.stop();
_parent.onLoseFinished();
Symbol 1281 MovieClip [lee] Frame 1
this.stop();
Symbol 1336 MovieClip Frame 1
stop();
Instance of Symbol 1336 MovieClip in Symbol 1337 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Instance of Symbol 1336 MovieClip in Symbol 1341 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Symbol 1348 MovieClip Frame 16
gotoAndPlay (1);
Symbol 1353 MovieClip Frame 17
gotoAndPlay (1);
Symbol 1354 MovieClip Frame 16
gotoAndPlay (1);
Symbol 1361 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1361 MovieClip Frame 4
_parent.onProjectile();
Symbol 1361 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1365 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1365 MovieClip Frame 4
_parent.onProjectile();
Symbol 1365 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1377 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1377 MovieClip Frame 4
_parent.onProjectile();
Symbol 1377 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1380 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1380 MovieClip Frame 4
_parent.onProjectile();
Symbol 1380 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1383 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1383 MovieClip Frame 4
_parent.onProjectile();
Symbol 1383 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1386 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1386 MovieClip Frame 4
_parent.onProjectile();
Symbol 1386 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Instance of Symbol 1336 MovieClip in Symbol 1391 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Symbol 1443 MovieClip Frame 24
_parent.onSpecialMove();
Symbol 1443 MovieClip Frame 30
this.stop();
_parent.onMotionFinished();
Symbol 1444 MovieClip [marieHealthRestore] Frame 16
this.stop();
_parent.onMotionFinished();
Symbol 1451 MovieClip Frame 29
this.stop();
_parent.onMotionFinished();
Symbol 1454 MovieClip Frame 5
_parent.onMotionFinished();
Symbol 1455 MovieClip [marySpecialMoveCollision] Frame 25
this.stop();
_parent.onMotionFinished();
Symbol 1473 MovieClip Frame 52
if (nLooped == null) {
var nLooped = 1;
}
if (nLooped < 3) {
nLooped++;
this.gotoAndPlay(4);
} else {
this.stop();
_parent.onWinFinished();
}
Symbol 1474 MovieClip [marieDeath] Frame 31
this.stop();
_parent.onLoseFinished();
Symbol 1475 MovieClip [marie] Frame 1
this.stop();
Symbol 1519 MovieClip Frame 1
stop();
Instance of Symbol 1519 MovieClip in Symbol 1520 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Symbol 1534 MovieClip Frame 1
stop();
Instance of Symbol 1534 MovieClip in Symbol 1535 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Symbol 1547 MovieClip Frame 17
gotoAndPlay (1);
Symbol 1548 MovieClip Frame 17
gotoAndPlay (1);
Symbol 1549 MovieClip Frame 17
gotoAndPlay (1);
Symbol 1554 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1554 MovieClip Frame 4
_parent.onProjectile();
Symbol 1554 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1557 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1557 MovieClip Frame 4
_parent.onProjectile();
Symbol 1557 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1564 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1564 MovieClip Frame 4
_parent.onProjectile();
Symbol 1564 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1567 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1567 MovieClip Frame 4
_parent.onProjectile();
Symbol 1567 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1570 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1570 MovieClip Frame 4
_parent.onProjectile();
Symbol 1570 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1573 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1573 MovieClip Frame 4
_parent.onProjectile();
Symbol 1573 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1586 MovieClip Frame 22
_parent.onSpecialMove();
Symbol 1586 MovieClip Frame 37
this.stop();
_parent.onMotionFinished();
Symbol 1587 MovieClip [mayHealthRestore] Frame 16
this.stop();
_parent.onMotionFinished();
Instance of Symbol 1519 MovieClip in Symbol 1589 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Instance of Symbol 1519 MovieClip in Symbol 1601 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.96) {
play();
}
}
Symbol 1604 MovieClip Frame 27
this.stop();
_parent.onMotionFinished();
Symbol 1610 MovieClip Frame 5
_parent.onMotionFinished();
Symbol 1611 MovieClip [maySpecialMoveCollision] Frame 25
this.stop();
_parent.onMotionFinished();
Symbol 1631 MovieClip Frame 19
stop();
Symbol 1634 MovieClip Frame 65
this.stop();
_parent.onWinFinished();
Symbol 1635 MovieClip [mayDeath] Frame 31
this.stop();
_parent.onLoseFinished();
Symbol 1636 MovieClip [may] Frame 1
this.stop();
Symbol 1661 MovieClip Frame 1
stop();
Symbol 1666 MovieClip Frame 1
stop();
Instance of Symbol 1666 MovieClip in Symbol 1667 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.975) {
play();
}
}
Symbol 1739 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1739 MovieClip Frame 4
_parent.onProjectile();
Symbol 1739 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1744 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1744 MovieClip Frame 4
_parent.onProjectile();
Symbol 1744 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1747 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1747 MovieClip Frame 4
_parent.onProjectile();
Symbol 1747 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1760 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1760 MovieClip Frame 4
_parent.onProjectile();
Symbol 1760 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1767 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1767 MovieClip Frame 4
_parent.onProjectile();
Symbol 1767 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1775 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1775 MovieClip Frame 4
_parent.onProjectile();
Symbol 1775 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1801 MovieClip Frame 27
_parent.onSpecialMove();
Symbol 1801 MovieClip Frame 39
this.stop();
_parent.onMotionFinished();
Symbol 1802 MovieClip [nazzHealthRestore] Frame 16
this.stop();
_parent.onMotionFinished();
Symbol 1819 MovieClip Frame 29
this.stop();
_parent.onMotionFinished();
Symbol 1828 MovieClip Frame 5
_parent.onMotionFinished();
Symbol 1829 MovieClip [nazzSpecialMoveCollision] Frame 25
this.stop();
_parent.onMotionFinished();
Symbol 1838 MovieClip Frame 126
this.stop();
_parent.onWinFinished();
Symbol 1839 MovieClip [nazzDeath] Frame 31
this.stop();
_parent.onLoseFinished();
Symbol 1840 MovieClip [nazz] Frame 1
this.stop();
Symbol 1879 MovieClip Frame 1
stop();
Instance of Symbol 1879 MovieClip in Symbol 1880 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.98) {
play();
}
}
Symbol 1883 MovieClip Frame 1
stop();
Instance of Symbol 1883 MovieClip in Symbol 1884 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.random() > 0.98) {
play();
}
}
Symbol 1914 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1914 MovieClip Frame 4
_parent.onProjectile();
Symbol 1914 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1917 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1917 MovieClip Frame 4
_parent.onProjectile();
Symbol 1917 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1920 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1920 MovieClip Frame 4
_parent.onProjectile();
Symbol 1920 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1923 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1923 MovieClip Frame 4
_parent.onProjectile();
Symbol 1923 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1926 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1926 MovieClip Frame 4
_parent.onProjectile();
Symbol 1926 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1929 MovieClip Frame 1
_parent.onHideProjectile();
Symbol 1929 MovieClip Frame 4
_parent.onProjectile();
Symbol 1929 MovieClip Frame 5
this.stop();
_parent.onMotionFinished();
Symbol 1936 MovieClip Frame 18
_parent.onSpecialMove();
Symbol 1936 MovieClip Frame 31
this.stop();
_parent.onMotionFinished();
Symbol 1937 MovieClip [rolfHealthRestore] Frame 16
this.stop();
_parent.onMotionFinished();
Symbol 1952 MovieClip Frame 25
this.stop();
_parent.onMotionFinished();
Symbol 1958 MovieClip Frame 5
_parent.onMotionFinished();
Symbol 1959 MovieClip [rolfSpecialMoveCollision] Frame 25
this.stop();
_parent.onMotionFinished();
Symbol 1972 MovieClip Frame 10
stop();
Symbol 1974 MovieClip Frame 109
this.stop();
_parent.onWinFinished();
Symbol 1975 MovieClip [rolfDeath] Frame 31
this.stop();
_parent.onLoseFinished();
Symbol 1976 MovieClip [rolf] Frame 1
this.stop();
Symbol 1987 MovieClip [bakedPotato] Frame 1
stop();
Symbol 1996 MovieClip [chickenLeg] Frame 1
stop();
Symbol 2005 MovieClip [cornDog] Frame 1
stop();
Symbol 2007 MovieClip [donut] Frame 1
stop();
Symbol 2011 MovieClip [dough] Frame 1
stop();
Symbol 2015 MovieClip [egg] Frame 1
stop();
Symbol 2020 MovieClip [pieTrail] Frame 26
gotoAndPlay (14);
Symbol 2025 MovieClip [pie] Frame 1
stop();
Symbol 2034 MovieClip [pizzaUp] Frame 1
stop();
Symbol 2035 MovieClip [pizzaRight] Frame 1
stop();
Symbol 2036 MovieClip [pizzaDown] Frame 1
stop();
Symbol 2037 MovieClip [pizzaLeft] Frame 1
stop();
Symbol 2038 MovieClip [pizza] Frame 1
stop();
Symbol 2044 MovieClip [sloppyJoeUp] Frame 1
stop();
Symbol 2045 MovieClip [sloppyJoeRight] Frame 1
stop();
Symbol 2046 MovieClip [sloppyJoeDown] Frame 1
stop();
Symbol 2047 MovieClip [sloppyJoeLeft] Frame 1
stop();
Symbol 2048 MovieClip [sloppyJoe] Frame 1
stop();
Symbol 2052 MovieClip [turkeyUp] Frame 1
stop();
Symbol 2053 MovieClip [turkeyRight] Frame 1
stop();
Symbol 2054 MovieClip [turkeyDown] Frame 1
stop();
Symbol 2055 MovieClip [turkeyLeft] Frame 1
stop();
Symbol 2056 MovieClip [turkey] Frame 1
stop();
Symbol 2058 MovieClip [watermelonUp] Frame 1
stop();
Symbol 2059 MovieClip [watermelonRight] Frame 1
stop();
Symbol 2060 MovieClip [watermelonDown] Frame 1
stop();
Symbol 2061 MovieClip [watermelon] Frame 1
stop();
Symbol 2070 MovieClip [edBioImages] Frame 1
this.stop();
Symbol 2075 MovieClip [eddBioImages] Frame 1
this.stop();
Symbol 2080 MovieClip [eddyBioImages] Frame 1
this.stop();
Symbol 2085 MovieClip [jonny2x4BioImages] Frame 1
this.stop();
Symbol 2090 MovieClip [kevinBioImages] Frame 1
this.stop();
Symbol 2095 MovieClip [leeBioImages] Frame 1
this.stop();
Symbol 2100 MovieClip [marieBioImages] Frame 1
this.stop();
Symbol 2105 MovieClip [mayBioImages] Frame 1
this.stop();
Symbol 2110 MovieClip [nazzBioImages] Frame 1
this.stop();
Symbol 2115 MovieClip [rolfBioImages] Frame 1
this.stop();
Symbol 2226 MovieClip [jawbreakerPickedUp] Frame 19
this.stop();
_parent.onMotionFinished();
Symbol 2227 MovieClip [jawbreaker] Frame 1
this.stop();
Symbol 2231 MovieClip [jawbreakerExplosion] Frame 31
this.stop();
_parent.onMotionFinished();
Symbol 2232 MovieClip [jawbreakerRed] Frame 1
this.stop();
Symbol 2318 MovieClip [MapView] Frame 1
#initclip 75
Object.registerClass("MapView", com.hitf.tileGameClasses.mapClasses.MapView);
#endinitclip
stop();
Symbol 2318 MovieClip [MapView] Frame 2
stopAllSounds();
Symbol 2318 MovieClip [MapView] Frame 3
stop();
Symbol 2329 MovieClip Frame 5
stop();
Symbol 2346 MovieClip [TitleScreen] Frame 1
#initclip 101
Object.registerClass("TitleScreen", com.hitf.tileGameClasses.introScreenClasses.TitleScreen);
#endinitclip
Symbol 2347 MovieClip [IntroScreen] Frame 1
#initclip 77
Object.registerClass("IntroScreen", com.hitf.tileGameClasses.IntroScreen);
#endinitclip
Symbol 2347 MovieClip [IntroScreen] Frame 203
this.stop();
Symbol 2354 MovieClip [ArrowButton] Frame 1
#initclip 78
Object.registerClass("ArrowButton", com.hitf.tileGameClasses.ArrowButton);
#endinitclip
this.stop();
Symbol 2372 MovieClip [instructionScreenFrame2] Frame 1
this.stop();
Symbol 2400 MovieClip [instructionsScreenFrame1] Frame 1
for (var i in _mcEdStanding2) {
_mcEdStanding2[i].stop();
}
for (var i in _mcEdStanding3) {
_mcEdStanding3[i].stop();
}
Symbol 2400 MovieClip [instructionsScreenFrame1] Frame 174
for (var i in _mcEdStanding2) {
_mcEdStanding2[i].stop();
}
Symbol 2408 MovieClip [InstructionsScreen] Frame 1
#initclip 79
Object.registerClass("InstructionsScreen", com.hitf.tileGameClasses.InstructionsScreen);
#endinitclip
Symbol 2415 MovieClip [SelectedCharacter] Frame 1
#initclip 80
Object.registerClass("SelectedCharacter", com.hitf.tileGameClasses.characterSelectScreenClasses.SelectedCharacter);
#endinitclip
Symbol 2426 MovieClip [characterSelectLock] Frame 1
this.stop();
Symbol 2426 MovieClip [characterSelectLock] Frame 40
this.stop();
Symbol 2430 MovieClip [characterSelectAnimatedBling] Frame 12
this.stop();
Symbol 2431 MovieClip [characterSelectUnlockBling] Frame 1
this.stop();
Symbol 2431 MovieClip [characterSelectUnlockBling] Frame 30
this.stop();
Symbol 2446 MovieClip [CharacterSelect] Frame 1
#initclip 81
Object.registerClass("CharacterSelect", com.hitf.tileGameClasses.characterSelectScreenClasses.CharacterSelect);
#endinitclip
Symbol 2448 MovieClip [CharacterSelectGroup] Frame 1
#initclip 82
Object.registerClass("CharacterSelectGroup", com.hitf.tileGameClasses.charSelectScreenClasses.CharacterSelectGroup);
#endinitclip
Symbol 2459 MovieClip [CharacterSelectScreen] Frame 1
#initclip 83
Object.registerClass("CharacterSelectScreen", com.hitf.tileGameClasses.CharacterSelectScreen);
#endinitclip
Symbol 2502 MovieClip [scoreboardDigit] Frame 1
this.stop();
Symbol 2503 MovieClip [Scoreboard] Frame 1
#initclip 84
Object.registerClass("Scoreboard", com.hitf.tileGameClasses.hudClasses.Scoreboard);
#endinitclip
Symbol 2508 MovieClip [BioHealth] Frame 1
#initclip 85
Object.registerClass("BioHealth", com.hitf.tileGameClasses.hudClasses.characterBioClasses.BioHealth);
#endinitclip
Symbol 2514 MovieClip [BioImage] Frame 1
#initclip 86
Object.registerClass("BioImage", com.hitf.tileGameClasses.hudClasses.characterBioClasses.BioImage);
#endinitclip
Symbol 2517 MovieClip [characterBioStroke] Frame 1
this.stop();
Symbol 2518 MovieClip [CharacterBio] Frame 1
#initclip 87
Object.registerClass("CharacterBio", com.hitf.tileGameClasses.hudClasses.CharacterBio);
#endinitclip
Symbol 2522 MovieClip [RankStarburst] Frame 1
#initclip 88
Object.registerClass("RankStarburst", com.hitf.tileGameClasses.hudClasses.RankStarburst);
#endinitclip
Symbol 2523 MovieClip [CharacterBioGroup] Frame 1
#initclip 89
Object.registerClass("CharacterBioGroup", com.hitf.tileGameClasses.hudClasses.CharacterBioGroup);
#endinitclip
Symbol 2525 MovieClip [JawbreakerQueue] Frame 1
#initclip 90
Object.registerClass("JawbreakerQueue", com.hitf.tileGameClasses.hudClasses.SpecialMoveQueue);
#endinitclip
Symbol 2526 MovieClip [ProjectileQueue] Frame 1
#initclip 91
Object.registerClass("ProjectileQueue", com.hitf.tileGameClasses.hudClasses.ProjectileQueue);
#endinitclip
Symbol 2527 MovieClip [HUD] Frame 1
#initclip 92
Object.registerClass("HUD", com.hitf.tileGameClasses.HUD);
#endinitclip
Symbol 2541 MovieClip [LevelRankingsBioImage] Frame 1
#initclip 93
Object.registerClass("LevelRankingsBioImage", com.hitf.tileGameClasses.levelRankingsClasses.LevelRankingsBioImage);
#endinitclip
Symbol 2548 MovieClip [LevelRankings] Frame 1
#initclip 94
Object.registerClass("LevelRankings", com.hitf.tileGameClasses.LevelRankings);
#endinitclip
Symbol 2567 MovieClip [WinScreen] Frame 1
#initclip 95
Object.registerClass("WinScreen", com.hitf.tileGameClasses.WinScreen);
#endinitclip
_rankings.model = [{rank:1, imageLibraryID:"edBioImages", rgbFill:13357954, rgbStarburst:16711680}, {rank:2, imageLibraryID:"eddBioImages", rgbFill:16697485, rgbStarburst:0}, {rank:3, imageLibraryID:"eddyBioImages", rgbFill:16774024, rgbStarburst:0}, {rank:4, imageLibraryID:"leeBioImages", rgbFill:15698581, rgbStarburst:0}, {rank:5, imageLibraryID:"marieBioImages", rgbFill:8355711, rgbStarburst:0}, {rank:6, imageLibraryID:"mayBioImages", rgbFill:16777087, rgbStarburst:0}, {rank:7, imageLibraryID:"jonny2x4BioImages", rgbFill:10733005, rgbStarburst:0}, {rank:8, imageLibraryID:"rolfBioImages", rgbFill:16772232, rgbStarburst:0}, {rank:9, imageLibraryID:"nazzBioImages", rgbFill:12104150, rgbStarburst:0}, {rank:10, imageLibraryID:"kevinBioImages", rgbFill:14282127, rgbStarburst:0}];
Symbol 2585 MovieClip [LoseScreenScene] Frame 1
#initclip 96
Object.registerClass("LoseScreenScene", com.hitf.tileGameClasses.loseScreenClasses.LoseScreenScene);
#endinitclip
Symbol 2588 MovieClip Frame 5
stop();
Symbol 2590 MovieClip [LoseScreen] Frame 1
#initclip 97
Object.registerClass("LoseScreen", com.hitf.tileGameClasses.LoseScreen);
#endinitclip
Symbol 2602 MovieClip [WinGameScreenScene] Frame 1
#initclip 98
Object.registerClass("WinGameScreenScene", com.hitf.tileGameClasses.winGameScreenClasses.WinGameScreenScene);
#endinitclip
Symbol 2604 MovieClip [WinGameScreen] Frame 1
#initclip 99
Object.registerClass("WinGameScreen", com.hitf.tileGameClasses.WinGameScreen);
#endinitclip
stopAllSounds();
Symbol 2604 MovieClip [WinGameScreen] Frame 2
stop();
Symbol 2605 MovieClip [TileGame] Frame 1
#initclip 100
Object.registerClass("TileGame", com.hitf.TileGame);
#endinitclip
this.stop();