Frame 1
stop();
Frame 2
gotoAndStop (1);
Frame 3
gotoAndPlay (55);
Frame 55
stopAllSounds();
_global.LOGICAL_FRAME_TIME = 0.025;
_global.M_WIDTH = 600;
_global.M_HEIGHT = 400;
_global.MAX_ZOOM = 100;
_global.CAM_NONE = 0;
_global.CAM_SPININ = 1;
_global.CAM_SHAKE = 2;
_global.KEY_UP = 1;
_global.KEY_DOWN = 2;
_global.KEY_LEFT = 4;
_global.KEY_RIGHT = 8;
_global.KEY_ATTACK1 = 16;
_global.KEY_ATTACK2 = 32;
_global.ANIM_LOOP = 0;
_global.ANIM_STOP = 1;
_global.ANIM_CLEAR = 2;
_global.ANIM_REVERT = 3;
_global.GAME_SPEED = 1;
_global.NONE = 0;
_global.ATTACK1 = 1;
_global.ATTACK2 = 2;
_global.SPECIAL1 = 3;
_global.SPECIAL2 = 4;
_global.SUPER = 5;
_global.OTHER = 6;
_global.p1keys = new Array(38, 40, 37, 39, 32, 17);
_global.p2keys = new Array(87, 83, 65, 68, 82, 70);
var game = new Game();
game.runGame("intro");
_quality = "MEDIUM";
stop();
Symbol 11 MovieClip Frame 1
function onEnterFrame() {
var _local4 = _root.getBytesLoaded() / _root.getBytesTotal();
var _local3 = 1;
while (_local3 <= 5) {
this["l" + _local3]._alpha = (100 * (_local4 - ((_local3 - 1) * 0.2))) / 0.2;
_local3++;
}
if (_local4 == 1) {
_root.gotoAndPlay(3);
}
}
l1._alpha = (l2._alpha = (l3._alpha = (l4._alpha = (l5._alpha = false))));
Symbol 375 MovieClip [__Packages.Game] Frame 0
class Game
{
var sound, curModuleName, time, module;
function Game () {
_global.ld = 0;
_global.hd = 100;
}
function runGame(modules) {
sound = new audio();
_global.sound = sound;
curModuleName = modules;
loadModule();
_root.onEnterFrame = tick;
time = getTimer();
}
function loadModule() {
var _local2 = curModuleName;
switch (_local2) {
case "credits" :
module = new credits();
break;
case "intro" :
module = new intro();
break;
case "hamman" :
module = new hamman();
break;
case "battle" :
var _local3 = module.exitCode;
module = new battle(_local3);
break;
case "dancedanceham" :
_local3 = module.exitCode;
module = new dancedanceham();
break;
case "sausage" :
_local3 = module.exitCode;
module = new sausage();
break;
default :
trace("Unknown module!");
}
}
function tick() {
with (_root.game) {
var dt = (getTimer() - time);
var dt2 = (dt / 1000);
module.think(dt2);
sound.think(dt2);
if (module.deleted) {
switch (curModuleName) {
case "intro" :
curModuleName = "hamman";
loadModule();
break;
case "hamman" :
curModuleName = "battle";
loadModule();
break;
case "battle" :
curModuleName = "dancedanceham";
loadModule();
break;
case "dancedanceham" :
curModuleName = "sausage";
loadModule();
break;
case "sausage" :
curModuleName = "credits";
loadModule();
break;
case "credits" :
curModuleName = "intro";
loadModule();
break;
case "charselect" :
if (module.exitCode == 0) {
curModuleName = "title";
} else {
curModuleName = "battle";
}
loadModule();
}
}
_global.fps = 1 / dt2;
time = time + dt;
}
}
}
Symbol 376 MovieClip [__Packages.thing] Frame 0
class thing
{
var children, gfx, anim, ox, oy;
function thing () {
children = new Array();
}
function get x() {
return(gfx._x);
}
function set x(v) {
gfx._x = v;
//return(x);
}
function get y() {
return(gfx._y);
}
function set y(v) {
gfx._y = v;
//return(y);
}
function set zoom(v) {
gfx._xscale = (gfx._yscale = v);
//return(zoom);
}
function get zoom() {
return(gfx._xscale);
}
function set rot(v) {
gfx._rotation = v;
//return(rot);
}
function get rot() {
return(gfx._rotation);
}
function set rotRad(v) {
gfx._rotation = (v * 180) / Math.PI;
//return(rotRad);
}
function get rotRad() {
return((gfx._rotation * Math.PI) / 180);
}
function setupGfx() {
}
function accAngle(a, theta) {
if (theta == undefined) {
theta = (rot * Math.PI) / 180;
}
ax = a * Math.cos(theta);
ay = a * Math.sin(theta);
}
function attachGfx(libname, parent, d) {
var _local3 = parent.gfx;
if (parent.gfx == undefined) {
_local3 = _root;
}
if ((libname == "") || (libname == undefined)) {
gfx = _local3.createEmptyMovieClip("thing" + d, d);
} else {
gfx = _local3.attachMovie(libname, "thing" + d, d);
gfx.stop();
gfx.anim.stop();
anim = "idle";
}
}
function think(dt) {
if (gfx) {
ox = x;
oy = y;
doMovement(dt);
updateAnim(dt);
}
childrenThink(dt);
}
function childrenThink(dt) {
var _local2 = 0;
while (_local2 < children.length) {
if (children[_local2].deleted) {
children.splice(_local2, 1);
} else {
children[_local2].think(dt);
}
_local2++;
}
}
function clear() {
var _local2 = 0;
while (_local2 < children.length) {
children[_local2].clear();
delete children[_local2];
_local2++;
}
children = new Array();
gfx.removeMovieClip();
deleted = true;
}
function doMovement(dt) {
if (moveTime) {
if (dt >= moveTime) {
x = x + (moveTime * vx);
y = y + (moveTime * vy);
moveTime = (vx = (vy = 0));
} else {
x = x + (dt * vx);
y = y + (dt * vy);
moveTime = moveTime - dt;
}
} else if (vx || (vy)) {
x = x + (vx * dt);
y = y + (vy * dt);
}
}
function addChild(t, libname, d, x, y, repeatMode_) {
t.attachGfx(libname, this, d);
if (repeatMode_) {
t.repeatMode = repeatMode_;
}
t.parent = this;
t.__set__x(x);
t.__set__y(y);
children.push(t);
return(t);
}
function updateAnim(dt) {
stopped = false;
var _local3 = gfx;
if (gfx.anim) {
gfx.gotoAndStop(anim);
_local3 = gfx.anim;
}
animOffset = animOffset + dt;
while ((animOffset >= _global.LOGICAL_FRAME_TIME) && (_local3)) {
animOffset = animOffset - _global.LOGICAL_FRAME_TIME;
if (_local3._currentframe == _local3._totalframes) {
switch (repeatMode) {
case _global.ANIM_CLEAR :
clear();
case _global.ANIM_STOP :
stopped = true;
break;
case _global.ANIM_REVERT :
anim = "idle";
gfx.gotoAndStop("idle");
gfx.anim.stop();
break;
default :
_local3.gotoAndStop(1);
}
} else {
_local3.nextFrame();
}
}
}
function moveTo(xd, yd, speed) {
if (!speed) {
x = (xd);
y = (yd);
return(undefined);
}
vx = xd - x;
vy = yd - y;
var _local2 = Math.sqrt((vx * vx) + (vy * vy));
vx = vx * (speed / _local2);
vy = vy * (speed / _local2);
moveTime = _local2 / speed;
}
function allocDepth(onTop) {
if (gfx) {
if (ld == 100) {
ld = 0;
}
if (onTop) {
return(hd++);
}
return(ld++);
}
if (_global.ld == 100) {
_global.ld = 0;
}
if (onTop) {
return(_global.hd++);
}
return(_global.ld++);
}
var animOffset = 0;
var ld = 0;
var hd = 100;
var vx = 0;
var vy = 0;
var ax = 0;
var ay = 0;
var repeatMode = 0;
var deleted = false;
var stopped = false;
var moveTime = 0;
var exitCode = 0;
var hitRadius = 10;
}
Symbol 377 MovieClip [__Packages.audio] Frame 0
class audio
{
var music, sounds, musicPlaylist;
function audio () {
if (!mute) {
music = new Sound();
sounds = new Sound();
}
song = 0;
}
function think(dt) {
if (fade > 0) {
music.setVolume(fade);
fade = fade - 5;
}
if ((music.duration == music.position) && (musicPlaylist.length)) {
playNextSong();
}
}
function playSong(songs, l) {
song = 0;
musicPlaylist = new Array();
if (typeof(songs) == "object") {
musicPlaylist = songs;
} else {
musicPlaylist.push(songs);
}
if (l == undefined) {
l = true;
}
loop = l;
playNextSong();
}
function stopMusic() {
music.stop();
}
function fadeOut() {
fade = 100;
musicPlaylist = new Array();
}
function playNextSong() {
music.stop();
music = new Sound();
music.setVolume(100);
music.attachSound(musicPlaylist[song]);
if (loop) {
song++;
if (song >= musicPlaylist.length) {
song = 0;
}
} else {
musicPlaylist.slice(0, 1);
}
music.start();
}
function playSound(id) {
sounds.attachSound(id);
sounds.start();
}
var loop = true;
var song = 0;
var shuffle = false;
var fade = 0;
var mute = false;
}
Symbol 378 MovieClip [__Packages.credits] Frame 0
class credits extends thing
{
var a, addChild, allocDepth, clear;
function credits () {
super();
_global.sound.playSong("credsong");
_global.LOGICAL_FRAME_TIME = 0.025;
a = addChild(new thing(), "credits", allocDepth(), 300, 200, _global.ANIM_STOP);
}
function think(dt) {
super.think(dt);
if (_global.FFF) {
_global.sound.stopMusic();
_global.FFF = false;
clear();
}
if (a.deleted) {
clear();
}
}
}
Symbol 379 MovieClip [__Packages.intro] Frame 0
class intro extends thing
{
var a, addChild, allocDepth, clear;
function intro () {
super();
_global.sound.stopMusic();
_global.LOGICAL_FRAME_TIME = 0.0333333333333333;
a = addChild(new thing(), "intro", allocDepth(), 300, 200, _global.ANIM_CLEAR);
}
function think(dt) {
super.think(dt);
if (a.deleted) {
clear();
}
}
}
Symbol 380 MovieClip [__Packages.hamman] Frame 0
class hamman extends thing
{
var a, addChild, allocDepth, clear;
function hamman () {
super();
_global.LOGICAL_FRAME_TIME = 0.025;
a = addChild(new thing(), "hamfight", allocDepth(), 300, 200, _global.ANIM_CLEAR);
}
function think(dt) {
super.think(dt);
if (a.deleted) {
clear();
}
}
}
Symbol 381 MovieClip [__Packages.battle] Frame 0
class battle extends thing
{
var pWins, gameWon, clear, deleted, keys, players, arena, addChild, allocDepth, statusbar, marquee, guyTimer, timer, flash;
function battle () {
super();
_global.LOGICAL_FRAME_TIME = 0.025;
pWins = new Array(0, 0);
startBattle();
}
function startBattle() {
time = 60;
round++;
gameWon = null;
clear();
deleted = false;
paused = true;
keys = new keyState(new Array(27, 0));
players = new Array();
if (round == 1) {
_global.sound.playSong("bgm1");
}
arena = addChild(new camlayer(), "", allocDepth(true));
players.push(arena.addChild(new player(this), "hamman", arena.allocDepth(true), -200, -80));
players.push(arena.addChild(new neo(this), "segwayneo", arena.allocDepth(true), 200, -80));
players[0].setKeys(_global.p1keys);
players[0].enemy = players[1];
players[1].enemy = players[0];
arena.focusThings = players.concat();
var _local3;
statusbar = addChild(new thing(), "", allocDepth(true));
_local3 = statusbar.addChild(new hpbar(0, false, players[0]), "hpbar", statusbar.allocDepth(true));
_local3.setupGfx();
_local3 = statusbar.addChild(new hpbar(1, true, players[1]), "hpbar", statusbar.allocDepth(true));
_local3.setupGfx();
players[0].setKeys(_global.p1keys);
arena.addChild(new thing(), "bg", arena.allocDepth());
arena.effect = _global.CAM_SPININ;
arena.effectTime = 2;
marquee = addChild(new thing(), "marquee", allocDepth(true), 300, 200, _global.ANIM_CLEAR);
guyTimer = Math.random() * 5;
}
function gameEnd(winner) {
pWins[winner]++;
gameWon = addChild(new thing(), "wins", allocDepth(true), 250, 150, _global.ANIM_CLEAR);
}
function think(dt) {
dt = dt * _global.GAME_SPEED;
if (marquee.deleted) {
paused = false;
marquee = null;
}
arena.paused = paused;
if ((!paused) && (!gameWon)) {
time = time - (dt / 1.3);
guyTimer = guyTimer - dt;
if (guyTimer <= 0) {
guyTimer = (Math.random() * 5) + 5;
var _local5 = arena.addChild(new thing(), "guy", arena.allocDepth(true), 0, 0, _global.ANIM_CLEAR);
_local5.gfx._xscale = (side ? -100 : 100);
side = !side;
}
if (time <= 0) {
time = 0;
}
}
if (whoa && (whoa.gfx.a)) {
clear();
}
timer.gfx.time = Math.floor(time);
flash.gfx._visible = !flash.gfx._visible;
super.think(dt);
}
function timeCircleTest(ax1, ay1, ax2, ay2, ar, bx1, by1, bx2, by2, br) {
var _local3 = (-(ax2 - ax1)) + (bx2 - bx1);
var _local5 = (-(ay2 - ay1)) + (by2 - by1);
var _local16 = (_local3 * _local3) + (_local5 * _local5);
var _local1 = Math.sqrt(_local16);
var _local8 = ax1 - bx1;
var _local7 = ay1 - by1;
var _local12 = (_local8 * _local8) + (_local7 * _local7);
var _local15 = Math.sqrt(_local12);
var _local6 = ar + br;
if (_local1 < (_local15 - _local6)) {
return(false);
}
var _local4 = _local3 / _local1;
var _local11 = _local5 / _local1;
var _local2 = (_local4 * _local8) + (_local11 * _local7);
if (_local2 <= 0) {
return(false);
}
var _local14 = _local12 - (_local2 * _local2);
var _local13 = _local6 * _local6;
if (_local14 >= _local13) {
return(false);
}
var _local10 = _local13 - _local14;
if (_local10 < 0) {
return(false);
}
var _local9 = _local2 - Math.sqrt(_local10);
if (_local9 > _local1) {
return(false);
}
_local4 = _local4 * _local9;
_local11 = _local11 * _local9;
_local4 = _local4 / _local3;
return(_local4);
}
function res() {
flash = addChild(new thing(), "res", allocDepth(true), 0, 0, _global.ANIM_CLEAR);
}
var time = 60;
var paused = false;
var round = 0;
var side = 0;
var whoa = null;
}
Symbol 382 MovieClip [__Packages.camlayer] Frame 0
class camlayer extends thing
{
var focusThings, keys, zoom, __get__zoom, __set__zoom, __set__rot, __get__rot, __get__rotRad, gfx;
function camlayer () {
super();
focusThings = new Array();
keys = new keyState(new Array(38, 40, 37, 39, 187, 189));
}
function childrenThink(dt) {
if (!paused) {
super.childrenThink(dt);
}
}
function think(dt) {
childrenThink(dt);
if (keyMove) {
keys.updateKeyState(dt);
if (keys.keyDown(1)) {
y = y - 5;
}
if (keys.keyDown(2)) {
y = y + 5;
}
if (keys.keyDown(4)) {
x = x - 5;
}
if (keys.keyDown(8)) {
x = x + 5;
}
if (keys.keyDown(16)) {
zoom = zoom + 5;
}
if (keys.keyDown(32)) {
zoom = zoom - 5;
}
if (__get__zoom() > _global.MAX_ZOOM) {
__set__zoom(_global.MAX_ZOOM);
}
} else {
var _local4 = 0;
while (_local4 < focusThings.length) {
if (focusThings[_local4].deleted) {
focusThings.splice(_local4, 1);
}
_local4++;
}
_local4 = 0;
while (_local4 < (focusThings.length - 1)) {
var _local3 = _local4 + 1;
while (_local3 < focusThings.length) {
if ((focusThings[_local4].y > focusThings[_local3].y) && (focusThings[_local4].gfx.getDepth() < focusThings[_local3].gfx.getDepth())) {
focusThings[_local4].gfx.swapDepths(focusThings[_local3].gfx);
} else if ((focusThings[_local4].y < focusThings[_local3].y) && (focusThings[_local4].gfx.getDepth() > focusThings[_local3].gfx.getDepth())) {
focusThings[_local3].gfx.swapDepths(focusThings[_local4].gfx);
}
_local3++;
}
_local4++;
}
if (focusThings.length) {
var _local6 = 1;
var _local5 = 0;
var _local7 = 0;
_local5 = (focusThings[0].x + focusThings[1].x) / 2;
_local6 = 350 / Math.abs(focusThings[0].x - focusThings[1].x);
if (_local6 > (_global.MAX_ZOOM / 100)) {
_local6 = _global.MAX_ZOOM / 100;
}
if ((_local5 - (300 / _local6)) < -400) {
_local5 = -400 + (300 / _local6);
}
if ((_local5 + (300 / _local6)) > 400) {
_local5 = 400 - (300 / _local6);
}
_local7 = -200;
__set__zoom(_local6 * 100);
}
}
if (effect) {
effectTime = effectTime - dt;
if (effectTime > 0) {
switch (effect) {
case _global.CAM_SPININ :
zoom = zoom - (effectTime * 10);
break;
case _global.CAM_SHAKE :
x = x + (((effectTime * temp) * Math.random()) * 40);
y = y + (((effectTime * temp) * Math.random()) * 40);
temp = -temp;
}
} else {
__set__rot((effect = (effectTime = 0)));
}
}
if (__get__rot()) {
x = ((_local5 * Math.cos(__get__rotRad())) - (_local7 * Math.sin(__get__rotRad())));
y = ((_local5 * Math.sin(__get__rotRad())) + (_local7 * Math.cos(__get__rotRad())));
} else {
x = (_local5);
y = (_local7);
}
}
function clear() {
super.clear();
}
function get x() {
return((-gfx._x) + (_global.M_WIDTH / 2));
}
function set x(v) {
gfx._x = (_global.M_WIDTH / 2) - v;
//return(x);
}
function get y() {
return((-gfx._y) + (_global.M_HEIGHT / 2));
}
function set y(v) {
gfx._y = (_global.M_HEIGHT / 2) - v;
//return(y);
}
var paused = false;
var effectTime = 0;
var effect = 0;
var temp = 1;
var keyMove = false;
}
Symbol 383 MovieClip [__Packages.keyState] Frame 0
class keyState
{
var keyConfig, Bits, oldBits, time, keyBuffer;
function keyState (keys) {
keyConfig = keys;
Bits = (oldBits = (time = 0));
keyBuffer = new Array(16);
}
function updateKeyState(dt) {
oldBits = Bits;
Bits = 0;
var _local3 = 0;
while (_local3 < keyConfig.length) {
if (Key.isDown(keyConfig[_local3])) {
Bits = Bits | (1 << _local3);
}
_local3++;
}
time = time + dt;
if ((Bits != oldBits) && (Bits)) {
keyBuffer.push(Bits);
time = 0;
} else if (time >= _global.MOVE_TIMEOUT) {
keyBuffer.splice(0);
time = 0;
}
}
function checkMove(moveArray) {
if (keyBuffer.slice(-moveArray.length).toString() == moveArray.toString()) {
time = 0;
keyBuffer.splice(0);
return(true);
}
return(false);
}
function keyDown(keyNum) {
return(Boolean(Bits & keyNum));
}
function keyTap(keyNum) {
return(Boolean((Bits & keyNum) & (~(oldBits & keyNum))));
}
}
Symbol 384 MovieClip [__Packages.gamething] Frame 0
class gamething extends thing
{
var game, hp;
function gamething (game_) {
super();
game = game_;
hp = maxhp;
}
var maxhp = 100;
var hitRadius = 25;
var mass = 10;
var maxv = 300;
var flags = 0;
}
Symbol 385 MovieClip [__Packages.player] Frame 0
class player extends gamething
{
var energy, repeatMode, pp, game, anim, __get__x, enemy, gfx, hp, canHit, maxhp, __set__x, __get__y, __set__y, keys, vx, vy, addChild, allocDepth;
function player (g) {
super(g);
energy = 0;
repeatMode = _global.ANIM_REVERT;
}
function think(dt) {
if (!pp) {
pp = game.addChild(new thing(), "usekeys", game.allocDepth(true), 200, 250, _global.ANIM_CLEAR);
}
if (anim != "death") {
checkKeys(dt);
}
if (enemy.x < __get__x()) {
gfx._xscale = -100;
} else {
gfx._xscale = 100;
}
super.think(dt);
if ((hp <= 0) && (anim == "idle")) {
canHit = 2;
hp = maxhp;
}
if (__get__x() < -300) {
__set__x(-300);
}
if (__get__x() > 300) {
__set__x(300);
}
if (__get__y() < -100) {
__set__y(-100);
}
if (__get__y() > 0) {
__set__y(0);
}
energy = energy + (dt * 14);
if (energy > 100) {
energy = 100;
}
canHit = canHit - dt;
if (canHit < 0) {
canHit = 0;
}
}
function setKeys(keyConfig) {
keys = new keyState(keyConfig);
}
function checkKeys(dt) {
if (keys) {
keys.updateKeyState(dt);
}
vx = (vy = 0);
if (hp <= 0) {
anim = "death";
}
if ((keys.keyDown(_global.KEY_ATTACK1) && (energy == 100)) && ((anim == "idle") || (anim == "walk"))) {
energy = 0;
anim = "fire";
_global.sound.playSound("hamfire");
addChild(new thing(), "ham", allocDepth(true), 20, -155, _global.ANIM_CLEAR);
addChild(new thing(), "ham", allocDepth(true), 130, -155, _global.ANIM_CLEAR);
addChild(new thing(), "ham", allocDepth(true), 240, -155, _global.ANIM_CLEAR);
addChild(new thing(), "ham", allocDepth(true), 350, -155, _global.ANIM_CLEAR);
addChild(new thing(), "ham", allocDepth(true), 460, -155, _global.ANIM_CLEAR);
if ((enemy.y >= (__get__y() - 20)) && (enemy.y <= (__get__y() + 20))) {
enemy.hp = enemy.hp - 51;
game.arena.addChild(new thing(), "hamhit", game.arena.allocDepth(true), enemy.x, enemy.y - 155, _global.ANIM_CLEAR);
}
} else {
if (keys.keyDown(_global.KEY_LEFT)) {
anim = "walk";
vx = -100;
}
if (keys.keyDown(_global.KEY_RIGHT)) {
anim = "walk";
vx = 100;
}
if (keys.keyDown(_global.KEY_DOWN)) {
anim = "walk";
vy = 100;
}
if (keys.keyDown(_global.KEY_UP)) {
anim = "walk";
vy = -100;
}
}
}
var moveTime = 9;
}
Symbol 386 MovieClip [__Packages.neo] Frame 0
class neo extends gamething
{
var __get__x, hp, vx, vy, anim, repeatMode, gfx, game, maxhp, enemy, __get__y, __set__rot, __get__rot, __set__x, __set__y;
function neo (g) {
super(g);
_global.sound.playSound("motor");
}
function think(dt) {
var _local8 = __get__x();
if (hp <= 0) {
vx = (vy = 0);
hp = 0;
anim = "death";
repeatMode = _global.ANIM_STOP;
}
if (gfx.anim.res) {
if (dead == 1) {
_global.sound.stopMusic();
if (!game.whoa) {
game.whoa = game.addChild(new thing(), "trans", game.allocDepth(true), 300, 200, _global.ANIM_STOP);
_global.sound.playSound("zoom");
}
} else {
speed = 500;
game.res();
maxhp = 150;
hp = maxhp;
dead = 1;
repeatMode = _global.ANIM_REVERT;
anim = "idle";
}
} else {
var _local4;
var _local5;
_local5 = enemy.x;
_local4 = enemy.y;
if (_local5 < __get__x()) {
gfx._xscale = -100;
vx = vx - (dt * speed);
} else {
gfx._xscale = 100;
vx = vx + (dt * speed);
}
if (_local4 > __get__y()) {
vy = speed / 50;
}
if (_local4 < __get__y()) {
vy = (-speed) / 50;
}
if (((((!enemy.canHit) && (enemy.x >= (__get__x() - 25))) && (enemy.x <= (__get__x() + 25))) && (enemy.y >= (__get__y() - 15))) && (enemy.y <= (__get__y() + 15))) {
enemy.hp = enemy.hp - 33;
enemy.canHit = 1;
game.arena.addChild(new thing(), "spark", game.arena.allocDepth(true), enemy.x, enemy.y - 115, _global.ANIM_CLEAR);
}
}
if (!dead) {
__set__rot(vx);
} else {
__set__rot(vx / 10);
if (__get__rot() < -50) {
__set__rot(-50);
}
if (__get__rot() > 50) {
__set__rot(50);
}
}
super.think(dt);
if (__get__x() < -300) {
__set__x(-300);
}
if (__get__x() > 300) {
__set__x(300);
}
if (__get__y() < -100) {
__set__y(-100);
}
if (__get__y() > 0) {
__set__y(0);
}
var _local6 = __get__x() - _local8;
gfx.anim.wheel._rotation = gfx.anim.wheel._rotation + _local6;
}
var dead = 0;
var speed = 1;
}
Symbol 387 MovieClip [__Packages.hpbar] Frame 0
class hpbar extends thing
{
var player, flipped, link, __set__x, __set__y, portrait, addChild, allocDepth, charname, energy, gfx, barw, barw2;
function hpbar (p, f, s) {
super();
player = p;
flipped = f;
link = s;
}
function setupGfx() {
__set__x(10);
__set__y(50);
var _local2 = 100;
if (flipped) {
__set__x(590);
_local2 = -100;
}
portrait = addChild(new thing(), "portrait" + player, allocDepth(), 40, 0);
charname = addChild(new thing(), "csname" + player, allocDepth(), 120, -20);
if (!player) {
energy = addChild(new thing(), "energy", allocDepth(), 30, 20);
}
gfx._xscale = _local2;
charname.gfx._xscale = _local2;
gfx.outline.stop();
barw = energy.gfx.ebar._width;
barw2 = gfx.hpbar._width;
energy.gfx.gotoAndStop("charge1");
}
function think(dt) {
if (link.energy == 100) {
energy.gfx.gotoAndStop("charge2");
energy.gfx.ebar._width = 0;
} else {
energy.gfx.ebar._width = (link.energy * barw) / 100;
energy.gfx.gotoAndStop("charge1");
}
gfx.hpbar._width = (barw2 * link.hp) / link.maxhp;
gfx.hpbarslow._width = gfx.hpbarslow._width - (20 * dt);
if (gfx.hpbarslow._width < gfx.hpbar._width) {
gfx.hpbarslow._width = gfx.hpbar._width;
}
if (gfx.hpbarslow._width != gfx.hpbar._width) {
gfx.outline.gotoAndStop(3 - gfx.outline._currentframe);
} else {
gfx.outline.gotoAndStop(1);
}
super.think(dt);
}
}
Symbol 388 MovieClip [__Packages.dancedanceham] Frame 0
class dancedanceham extends thing
{
var arena, addChild, allocDepth, keys, arrows, beatTime, b, score, live, hit, flash, clear;
function dancedanceham () {
super();
arena = addChild(new camlayer(), "", allocDepth());
arena.__set__x(arena.__set__y(0));
keys = new keyState(new Array(38, 39, 37, 40));
arena.addChild(new thing(), "dancebg", arena.allocDepth());
arrows = new Array(50);
var _local4 = 0;
while (_local4 < 29) {
arrows[_local4] = new Array((10 * beat) + ((_local4 * beat) * 2), Math.floor(Math.random() * 4));
_local4++;
}
_local4 = 0;
while (_local4 < 95) {
arrows[_local4 + 29] = new Array((68 * beat) + (_local4 * beat), Math.floor(Math.random() * 4));
_local4++;
}
_local4 = 0;
while (_local4 < 60) {
arrows[_local4 + 124] = new Array((163 * beat) + ((_local4 * beat) / 8), Math.floor(Math.random() * 4));
_local4++;
}
songTime = (beatTime = 0);
var _local5 = addChild(new thing(), "segwayneo", allocDepth(), 100, 390);
_local5.anim = "dance";
_local5 = addChild(new thing(), "hamman", allocDepth(), 350, 400);
addChild(new thing(), "ham", allocDepth(), 100, 20);
_local5.anim = "walk";
addChild(new thing(), "light1", allocDepth(), 400, 500);
addChild(new thing(), "light2", allocDepth(), 100, 400);
b = addChild(new thing(), "arrowhit", allocDepth(true), 500, 60);
score = addChild(new thing(), "score", allocDepth(), 300, 50, _global.ANIM_REVERT);
score.zoom = 200;
live = new Array();
_global.sound.stopMusic();
_global.sound.playSong("dancesong");
}
function think(dt) {
hit = Array(false, false, false, false);
if (!d) {
arena.effect = _global.CAM_SHAKE;
arena.effectTime = 0.1;
arena.__set__x(arena.__set__y(0));
songTime = songTime + dt;
beatTime = beatTime + dt;
while (beatTime >= beat) {
beatTime = beatTime - beat;
b.gfx.play();
}
keys.updateKeyState(dt);
var _local4 = (songTime - arrows[0][0]) + 2;
if ((songTime >= 53.7549407114625) && (!c)) {
c = true;
_global.sound.playSound("scream");
flash = addChild(new thing(), "res", allocDepth(true), 0, 0, _global.ANIM_CLEAR);
}
score.gfx.c.comb.text = combo;
score.gfx.c.comb2.text = combo;
score.gfx.c._visible = combo > 3;
if (songTime >= 56) {
clear();
}
flash.gfx._visible = !flash.gfx._visible;
super.think(dt);
if (_local4 >= 0) {
addChild(new arrow(this, arrows[0][0], arrows[0][1]), "arrow" + arrows[0][1], allocDepth(true), -40 + (_local4 * 270), 60 + (arrows[0][1] * 60));
arrows.splice(0, 1);
}
} else if (d.gfx.a) {
clear();
}
}
var songTime = 0;
var beat = 0.315789473684211;
var c = false;
var d = false;
var combo = 0;
}
Symbol 389 MovieClip [__Packages.arrow] Frame 0
class arrow extends thing
{
var game, time, dir, __set__x, __get__x, clear, gfx;
function arrow (g, t, d) {
super();
game = g;
time = t;
dir = d;
}
function think(dt) {
if (!hit) {
__set__x(500 - ((time - game.songTime) * 270));
}
if (!missed) {
checkHit(dt);
}
if (__get__x() > 640) {
clear();
}
super.think(dt);
}
function checkHit(dt) {
var _local3 = game.songTime - time;
var _local2 = Math.abs(_local3);
if (hit) {
gfx._alpha = gfx._alpha - (dt * 500);
if (gfx._alpha <= 0) {
clear();
}
} else if (_local3 > 0.5) {
game.combo = 0;
game.score.anim = "boo";
clear();
} else if ((!game.hit[dir]) && (game.keys.keyTap(Math.pow(2, dir)))) {
if ((!missed) && (_local2 < 0.075)) {
game.score.anim = "good";
hit = true;
game.combo++;
__set__x(500);
game.hit[dir] = true;
} else if (_local2 < 0.5) {
missed = true;
game.combo = 0;
game.score.anim = "boo";
}
}
}
var hit = false;
var missed = false;
}
Symbol 390 MovieClip [__Packages.sausage] Frame 0
class sausage extends thing
{
var addChild, allocDepth, s, b, timer, keys, flash, ff, clear;
function sausage () {
super();
addChild(new thing(), "eatit", allocDepth());
addChild(new thing(), "lines", allocDepth(), 300, 200);
s = addChild(new thing(), "saus", allocDepth(), 300, 200);
b = addChild(new thing(), "bismarckhungry", allocDepth(true), 100, 200, _global.ANIM_REVERT);
timer = addChild(new thing(), "timer", allocDepth(true), 300, 40);
timer.gfx.time = Math.floor(time);
keys = new keyState(Array(38, 40, 37, 39, 32));
_global.sound.playSong("drown");
}
function think(dt) {
time = time - dt;
keys.updateKeyState(dt);
b.vx = b.vx / 1.15;
b.vy = b.vy / 1.15;
if (time <= 0) {
time = 11.5;
_global.sound.stopMusic();
_global.sound.playSong("drown");
flash = addChild(new thing(), "res", allocDepth(true), 0, 0, _global.ANIM_CLEAR);
}
timer.gfx.time = Math.floor(time);
if (b.anim == "idle") {
if (keys.keyDown(4)) {
b.vx = -300;
}
if (keys.keyDown(8)) {
b.vx = 300;
}
if (keys.keyDown(2)) {
b.vy = 300;
}
if (keys.keyDown(1)) {
b.vy = -300;
}
if (keys.keyDown(16)) {
b.vx = (b.vy = 0);
b.anim = "eat";
var _local4 = Math.sqrt(((b.x - 300) * (b.x - 300)) + ((b.y - 200) * (b.y - 200)));
if (_local4 < 50) {
s.clear();
sady = true;
}
}
}
flash.gfx._visible = !flash.gfx._visible;
super.think(dt);
if (sady && ((b.anim == "idle") & (!ff))) {
ff = addChild(new thing(), "keanu", allocDepth(true), 300, 200, _global.ANIM_CLEAR);
_global.sound.stopMusic();
}
if (ff.deleted) {
clear();
}
if (b.x < 0) {
b.x = 0;
}
if (b.x > 600) {
b.x = 600;
}
if (b.y < 0) {
b.y = 0;
}
if (b.y > 400) {
b.y = 400;
}
}
var sady = false;
var time = 11.5;
}
Symbol 19 MovieClip [arrowhit] Frame 1
stop();
Symbol 346 Button
on (release) {
gotoAndPlay (1);
}
Symbol 347 Button
on (release) {
_global.FFF = true;
}
Symbol 348 MovieClip [credits] Frame 1173
stop();
Symbol 348 MovieClip [credits] Frame 1174
gotoAndStop(_currentframe - 1);