Frame 1
load_mc.onEnterFrame = function () {
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
_root.gotoAndStop(2);
}
};
stop();
Frame 2
_global.renderList = new Array();
var mc = _root.createEmptyMovieClip("bot", 1);
var sf = (new newsdee.fx.starfield.StarField(mc, 275, 65, 30));
var sf2 = (new newsdee.fx.starfield.StarField(mc, 275, 65, 30));
sf.stage_mc._xscale = 200;
sf.stage_mc._yscale = 200;
sf2.stage_mc._xscale = 200;
sf2.stage_mc._yscale = 200;
sf2.stage_mc._y = 275;
_global.renderList.push(sf);
_global.renderList.push(sf2);
mc.onEnterFrame = function () {
var _local2 = 0;
while (_local2 < _global.renderList.length) {
var _local3 = _global.renderList[_local2];
_local3.render();
_local2++;
}
};
stop();
Frame 3
var newsdee = new Runner();
Symbol 11 MovieClip [__Packages.newsdee.fx.starfield.StarField] Frame 0
class newsdee.fx.starfield.StarField
{
var stage_mc, bmpData, MAX_STARS, _width, _height, stars, scrollY;
function StarField (parent, w, h, numStars) {
stage_mc = parent.createEmptyMovieClip("starfield", parent.getNextHighestDepth());
bmpData = new flash.display.BitmapData(w, h, false, 0);
stage_mc.attachBitmap(bmpData, stage_mc.getNextHighestDepth());
stage_mc.bitmap = bmpData;
stage_mc.cacheAsBitmap = true;
MAX_STARS = numStars;
_width = w;
_height = h;
stars = new Array(MAX_STARS);
var _local3 = 0;
while (_local3 < MAX_STARS) {
stars[_local3] = new newsdee.fx.starfield.Star(_width, _height);
_local3++;
}
_local3 = 0;
while (_local3 < MAX_STARS) {
var _local2 = stars[_local3];
bmpData.setPixel(_local2.getX(), _local2.getY(), _local2.getColor());
_local3++;
}
scrollY = 0;
stage_mc.frames = 0;
stage_mc.master = this;
}
function render() {
stage_mc.bitmap.fillRect(new flash.geom.Rectangle(0, 0, _width, _height), 0);
var _local3 = 0;
while (_local3 < MAX_STARS) {
var _local2 = stars[_local3];
stage_mc.bitmap.setPixel(_local2.getX(), _local2.getY(), _local2.getColor());
_local2.scrollX((-_local2._depth) - 1);
stars[_local3] = _local2;
_local3++;
}
}
function setScrollY(dir) {
scrollY = dir;
}
function getBitmap() {
return(bmpData);
}
function stopEnterFrame() {
stage_mc.onEnterFrame = null;
}
function process() {
stage_mc.bitmap.fillRect(new flash.geom.Rectangle(0, 0, _width, _height), 0);
var _local3 = 0;
while (_local3 < MAX_STARS) {
var _local2 = stars[_local3];
stage_mc.bitmap.setPixel(_local2.getX(), _local2.getY(), _local2.getColor());
_local2.scrollX((-_local2._depth) - 1);
(Key.isDown(38) ? (_local2.scrollY((-_local2._depth) - 1)) : null);
(Key.isDown(40) ? (_local2.scrollY(_local2._depth + 1)) : null);
stars[_local3] = _local2;
_local3++;
}
}
function destroy() {
bmpData.dispose();
stage_mc.removeMovieClip();
}
}
Symbol 12 MovieClip [__Packages.newsdee.fx.starfield.Star] Frame 0
class newsdee.fx.starfield.Star
{
var _w, _h, _x, _y, _depth;
function Star (w, h) {
_w = w;
_h = h;
_x = Math.round(Math.random() * _w);
_y = Math.round(Math.random() * _h);
_depth = Math.round((Math.random() * 12) + 4);
}
function getColor() {
return(_depth * 1118481);
}
function getX() {
return(_x);
}
function getY() {
return(_y);
}
function scrollX(off) {
_x = _x + off;
if (off < 0) {
if (_x < 0) {
_x = _w;
}
} else if (_x > _w) {
_x = 0;
}
}
function scrollY(off) {
_y = _y + off;
if (off < 0) {
if (_y < 0) {
_y = _w;
}
} else if (_y > _w) {
_y = 0;
}
}
}
Symbol 13 MovieClip [__Packages.Runner] Frame 0
class Runner
{
static var babeY, dir, h, menuOn, option, waitKey, waitSpace, main, ball, highlight;
var laps, score, lives, speed, mode, base, totalMove, renderMain, dataMain, dashBmp, dash, flagLogo, mask, babe, menu, babeMaker;
function Runner () {
if ((Stage.width != 550) || (Stage.height != 400)) {
var _local3 = _root.createTextField("error", _root.getNextHighestDepth(), 0, 0, 550, 400);
_local3.text = "Error - this game can only run at a 550x400 pixel size.";
return;
}
laps = 0;
score = 0;
lives = 4000;
_root._quality = "LOW";
speed = 0;
babeY = 0;
dir = 1;
h = 0;
mode = "ddcatmode";
menuOn = false;
option = 0;
waitKey = 0;
waitSpace = 0;
createBackground();
base = _root.createEmptyMovieClip("base", _root.getNextHighestDepth());
base._x = 0;
base._y = 0;
totalMove = 0;
renderMain = new Mode7(base, 550, 265);
renderMain._y = 135;
dataMain = new MapData();
renderMain.init();
initMap(renderMain, dataMain);
initRunnerCam(renderMain);
createForeground();
initBall();
createDash();
createMenu();
createMask();
Key.addListener(base);
main = this;
base.onEnterFrame = mainMenu;
}
static function returnToMainMenu() {
getURL ("http://www.newsdee.com", "_self");
}
function initBall() {
var _local2 = base.createEmptyMovieClip("ballMc", base.getNextHighestDepth());
ball = new Ball(_local2);
ball.setXY(265, 350);
}
function initMap(md, mp) {
md.addMap(1, mp.bmpData);
md.setMap(1);
}
function initRunnerCam(md) {
md.setFunk(55, false);
md.moveCamera(0, 24, -105, false);
if (dir < 0) {
md.rotateCamera(15, 180, false);
} else {
md.rotateCamera(15, 0, false);
}
md.render();
}
function initRunnerCam_Old(md) {
md.setFunk(55);
md.moveCamera(0, 4, -16, false);
if (dir < 0) {
md.rotateCamera(15, 180, false);
} else {
md.rotateCamera(15, 0, false);
}
md.render();
}
function initScoreCam(md) {
md.moveCamera(0, 64, 0, false);
md.rotateCamera(15, -180, false);
md.render();
}
function initCamera1(md) {
md.moveCamera(0, 64, 0, false);
md.rotateCamera(5, -180, false);
md.render();
}
function initCamera2(md) {
md.moveCamera(0, 64, 0, false);
md.rotateCamera(150, -45, false);
md.render();
}
function createBackground() {
var _local2 = _root.createEmptyMovieClip("back", _root.getNextHighestDepth());
var _local3 = new flash.geom.Matrix();
_local3.createGradientBox(550, 440, (Math.PI/2), 0, 250);
var _local5 = [16711680, 255, 85];
var _local6 = "linear";
var _local4 = [100, 100, 100];
var _local10 = [0, 221, 255];
var _local8 = "repeat";
var _local9 = "linearRGB";
var _local7 = 0;
_local8 = "repeat";
_local2.beginGradientFill(_local6, _local5, _local4, _local10, _local3, _local8, _local9, _local7);
_local2.moveTo(0, 200);
_local2.lineTo(550, 200);
_local2.lineTo(550, 400);
_local2.lineTo(0, 400);
_local2.endFill();
_local2._alpha = 80;
}
function createBackgroundPlanet() {
var _local2 = _root.createEmptyMovieClip("back", _root.getNextHighestDepth());
var _local3 = new flash.geom.Matrix();
_local3.createGradientBox(1100, 800, 0, -250, 250);
var _local5 = [255, 16711680];
var _local6 = "radial";
var _local4 = [100, 100];
var _local10 = [0, 255];
var _local8 = "repeat";
var _local9 = "linearRGB";
var _local7 = 0;
_local8 = "repeat";
_local2.beginGradientFill(_local6, _local5, _local4, _local10, _local3, _local8, _local9, _local7);
_local2.moveTo(0, 200);
_local2.lineTo(550, 200);
_local2.lineTo(550, 400);
_local2.lineTo(0, 400);
_local2.endFill();
_local2._alpha = 80;
}
function createForeground() {
_root.createTextField("status_txt", _root.getNextHighestDepth(), 0, 0, 300, 100);
var _local3 = base.createEmptyMovieClip("base", base.getNextHighestDepth());
_local3._x = 0;
_local3._y = 0;
_local3._alpha = 100;
_local3.beginFill(85, 80);
_local3.moveTo(0, 0);
_local3.lineTo(550, 0);
_local3.lineTo(550, 200);
_local3.lineTo(0, 200);
_local3.endFill();
}
function createDash() {
dashBmp = new flash.display.BitmapData(550, 100, false, 2236962);
var _local4 = new flash.display.BitmapData(10, 10);
var _local8 = new flash.geom.Rectangle(0, 0, 5, 5);
var _local7 = new flash.geom.Rectangle(0, 5, 5, 10);
var _local6 = new flash.geom.Rectangle(5, 0, 10, 5);
var _local5 = new flash.geom.Rectangle(5, 5, 10, 10);
_local4.fillRect(_local8, 4288256409);
_local4.fillRect(_local7, 4282664004);
_local4.fillRect(_local6, 4282664004);
_local4.fillRect(_local5, 4288256409);
dash = _root.createEmptyMovieClip("dash", _root.getNextHighestDepth());
dash.attachBitmap(dashBmp, dash.getNextHighestDepth(), "", false);
var _local3 = _root.createEmptyMovieClip("mc", _root.getNextHighestDepth());
_local3.moveTo(0, 0);
_local3.beginBitmapFill(_local4);
_local3.lineTo(125, 0);
_local3.lineTo(125, 100);
_local3.lineTo(0, 100);
_local3.endFill();
_local3.moveTo(425, 0);
_local3.beginBitmapFill(_local4);
dashBmp.draw(_local3);
dashBmp.copyPixels(dashBmp, new flash.geom.Rectangle(0, 0, 125, 100), new flash.geom.Point(425, 0));
var _local9 = new flash.display.BitmapData(550, 300, true, 0);
_local3.removeMovieClip();
_local3 = _root.createEmptyMovieClip("mc", _root.getNextHighestDepth());
makeMainTitle(_local3);
makeSubTitle(_local3);
_local3._xscale = 22;
_local3._yscale = 22;
_local3._y = 20;
dashBmp.draw(_local3, _local3.transform.matrix);
flagLogo = new flash.display.BitmapData(125, 100, false, 0);
flagLogo.copyPixels(dashBmp, new flash.geom.Rectangle(0, 0, 125, 100), new flash.geom.Point(0, 0));
_local3.removeMovieClip();
dash.cacheAsBitmap = true;
dash._visible = false;
}
function createMask() {
mask = _root.createEmptyMovieClip("mask", _root.getNextHighestDepth());
mask.beginFill(16777215, 100);
mask.lineTo(550, 0);
mask.lineTo(550, 400);
mask.lineTo(0, 400);
mask.endFill();
mask._alpha = 0;
mask.cacheAsBitmap = true;
}
function createMenu() {
ball.sprite._visible = false;
babe = _root.createEmptyMovieClip("babe", _root.getNextHighestDepth());
menu = _root.createEmptyMovieClip("menu", _root.getNextHighestDepth());
makeMainTitle(menu);
makeSubTitle(menu);
makeStart(menu);
makeOptions(menu);
babeMaker = new Babe(babe);
placeBabe(true);
menu.cacheAsBitmap = true;
}
function placeBabe(isMenu) {
babe.circleback._visible = isMenu;
if (isMenu) {
babe._xscale = 100;
babe._yscale = 100;
babe._x = 280;
babe._y = 100;
} else {
babe._xscale = 35;
babe._yscale = 35;
babe._x = 438;
babe._y = 2;
}
}
function makeMainTitle(mc) {
var _local3 = mc.createTextField("babeball2", mc.getNextHighestDepth(), 30, 40, 500, 200);
var _local2 = mc.createTextField("babeball", mc.getNextHighestDepth(), 25, 40, 500, 200);
var _local1 = new TextFormat();
_local1.bold = true;
_local1.font = "_sans";
_local1.color = 65382;
_local1.size = 120;
_local1.align = "center";
_local2.selectable = false;
_local2.setNewTextFormat(_local1);
_local2.cacheAsBitmap = true;
_local2.text = "babeball";
_local1.size = 120;
_local1.color = 2236962 /* 0x222222 */;
_local3.selectable = false;
_local3.setNewTextFormat(_local1);
_local3.cacheAsBitmap = true;
_local3.text = "babeball";
}
function makeSubTitle(mc) {
var _local2 = mc.createTextField("newsdee", mc.getNextHighestDepth(), 70, 65, 100, 25);
var _local1 = new TextFormat();
_local1.bold = true;
_local1.font = "_sans";
_local1.color = 65382;
_local1.size = 16;
_local1.align = "center";
_local2.selectable = false;
_local2.setNewTextFormat(_local1);
_local2.cacheAsBitmap = true;
_local2.text = "newsdee's";
}
function makeStart(mc) {
var _local2 = mc.createTextField("start", mc.getNextHighestDepth(), 125, 250, 300, 50);
var _local1 = new TextFormat();
_local1.bold = true;
_local1.font = "_sans";
_local1.color = 16777215 /* 0xFFFFFF */;
_local1.size = 30;
_local1.align = "center";
_local2.selectable = false;
_local2.setNewTextFormat(_local1);
_local2.text = "- press space bar -";
_local2.cacheAsBitmap = true;
highlight = _local2;
}
function makeOptions(mc) {
var _local2 = mc.createTextField("timeattack", mc.getNextHighestDepth(), 125, 250, 300, 50);
var _local3 = new TextFormat();
_local3.bold = true;
_local3.font = "_sans";
_local3.color = 51;
_local3.size = 25;
_local3.align = "center";
_local2.selectable = false;
_local2.setNewTextFormat(_local3);
_local2.text = "Time Attack";
_local2._visible = false;
_local2.cacheAsBitmap = true;
_local2 = mc.createTextField("catmode", menu.getNextHighestDepth(), 125, 280, 300, 50);
_local2.selectable = false;
_local2.setNewTextFormat(_local3);
_local2.text = "Cat Mode";
_local2._visible = false;
_local2.cacheAsBitmap = true;
_local2 = mc.createTextField("mainmenu", menu.getNextHighestDepth(), 125, 310, 300, 50);
_local2.selectable = false;
_local2.setNewTextFormat(_local3);
_local2.text = "visit newsdee.com";
_local2.cacheAsBitmap = true;
_local2._visible = false;
}
function mainMenu() {
doMenu();
}
function run() {
enterFrame();
}
function initGame() {
score = 0;
laps = 0;
lives = ((mode != "catmode") ? 4000 : 9);
dataMain.startCursor = 0;
dataMain.buildLevel();
initRunnerCam(renderMain);
renderMain.render(0);
}
static function enterFrame() {
var _local4 = 0;
var _local3 = 0;
var _local1 = main;
var _local2 = _local1.speed;
if (_local1.isMasking) {
_local1.mask._alpha = _local1.mask._alpha + 10;
if (_local1.mask._alpha >= 100) {
_local1.mask._alpha = 100;
_local1.isMasking = true;
_local1.rollBack(16);
if (_local1.lives < 1) {
_local1.menu._x = 0;
_local1.dash._visible = false;
_local1.placeBabe(true);
_local1.base.onEnterFrame = null;
ball.sprite._visible = false;
_local1.base.onEnterFrame = doEndGame;
} else {
_local1.isMasking = false;
_local1.isResetting = true;
ball.reset();
ball.isDead = false;
}
}
return(undefined);
}
if (_local1.isResetting) {
_local1.mask._alpha = _local1.mask._alpha - 5;
if (_local1.mask._alpha <= 0) {
_local1.mask._alpha = 0;
_local1.isResetting = false;
}
return(undefined);
}
if (ball.isDead) {
((_local2 < 0) ? (_local2 = _local2 + ((dir * 4) * _local1.SPD_MULT)) : null);
if ((_local2 >= 0) && (ball.sprite._y > 450)) {
_local2 = 0;
_local1.isMasking = true;
}
} else {
if (Key.isDown(37)) {
_local3 = _local3 + ((dir * 3) * _local1.SPD_MULT);
}
if (Key.isDown(39)) {
_local3 = _local3 + (((-dir) * 3) * _local1.SPD_MULT);
}
if (Key.isDown(38)) {
_local2 = _local2 + ((-dir) * _local1.SPD_MULT);
((_local2 < ((-dir) * _local1.MAX_SPEED)) ? (_local2 = (-dir) * _local1.MAX_SPEED) : null);
}
if (Key.isDown(40)) {
_local2 = _local2 + (dir * _local1.SPD_MULT);
((_local2 > 0) ? (_local2 = 0) : null);
}
}
_local1.speed = _local2;
if (Key.isDown(32)) {
ball.jump();
}
_local1.renderMain.moveCamera(_local3, _local4, 0, true);
_local1.scroll(_local2);
_local1.renderMain.render();
ball.setSpeed(_local2);
ball.run();
_local1.checkIsDead();
if (_local1.mode != "catmode") {
_local1.lives = _local1.lives - 1;
if (_local1.lives < 1) {
_local1.lives = 0;
}
}
if (_local1.dataMain.looped) {
_local1.dataMain.looped = false;
_local1.laps++;
if (_local1.mode != "catmode") {
_local1.lives = _local1.lives + 2000;
_local1.lives = _local1.lives % 4000;
} else {
_local1.lives++;
_local1.lives = _local1.lives % 10;
}
}
_local1.displayDashboard();
main.displayStats();
}
function scroll(spd) {
totalMove = totalMove + spd;
renderMain.moveCamera(0, 0, spd, true);
if ((totalMove >= 1) or (totalMove <= -1)) {
score++;
renderMain.moveCamera(0, 0, -totalMove, true);
var _local2 = dataMain.scroll(totalMove);
main.renderMain.addMap(1, _local2);
totalMove = 0;
}
}
function rollBack(pix) {
lives = lives - ((mode != "catmode") ? 400 : 1);
if (lives < 1) {
lives = 0;
}
displayDashboard();
initRunnerCam(renderMain);
renderMain.moveCamera(64, 0, 0, true);
renderMain.render();
var _local2 = dataMain.rollBack(pix);
renderMain.addMap(1, _local2);
}
function checkIsDead() {
var _local3 = new flash.display.BitmapData(550, 400, false, 16777215);
ball.sprite._visible = false;
_root.back._visible = false;
_local3.draw(_root);
ball.sprite._visible = true;
_root.back._visible = true;
var _local2 = _local3.getPixel(275, 380);
var _local5 = _local3.getPixel(256, 380);
var _local4 = 16777215 /* 0xFFFFFF */;
if ((_local2 == _local4) && (_local5 == _local4)) {
if (!ball.isJumping()) {
ball.isDead = true;
return("arggh - " + _local2.toString(16).toUpperCase());
}
}
return("ok - " + _local2.toString(16).toUpperCase());
}
function displayStats() {
if (Key.isDown(46)) {
trace(checkIsDead());
trace(renderMain.toString());
}
}
function displayDashboard() {
var _local5;
var _local4;
var _local7;
var _local6;
_local5 = 175;
_local4 = 40;
_local7 = 200;
_local6 = 5;
var _local3 = new flash.geom.Rectangle(_local5 - 1, _local4 - 1, _local7 + 2, _local6 + 2);
dashBmp.fillRect(_local3, 12303291);
_local3 = new flash.geom.Rectangle(_local5, _local4, _local7, _local6);
dashBmp.fillRect(_local3, 0);
_local3 = new flash.geom.Rectangle(_local5, _local4, _local7 * ((-1 * speed) / MAX_SPEED), _local6);
dashBmp.fillRect(_local3, 65382);
_local4 = 60;
var _local10;
_local10 = ((mode != "catmode") ? 4000 : 9);
_local3 = new flash.geom.Rectangle(_local5 - 1, _local4 - 1, _local7 + 2, _local6 + 2);
dashBmp.fillRect(_local3, 12303291);
_local3 = new flash.geom.Rectangle(_local5, _local4, _local7, _local6);
dashBmp.fillRect(_local3, 14483456);
_local3 = new flash.geom.Rectangle(_local5, _local4, _local7 * (lives / _local10), _local6);
dashBmp.fillRect(_local3, 14540032);
_local4 = 80;
_local10 = dataMain.romdata.length;
_local3 = new flash.geom.Rectangle(_local5 - 1, _local4 - 1, _local7 + 2, _local6 + 2);
dashBmp.fillRect(_local3, 12303291);
_local3 = new flash.geom.Rectangle(_local5, _local4, _local7, _local6);
dashBmp.fillRect(_local3, 68);
_local3 = new flash.geom.Rectangle(_local5, _local4, _local7 * (dataMain.startCursor / _local10), _local6);
dashBmp.fillRect(_local3, 14540287);
_local5 = 225;
_local4 = 5;
_local7 = 100;
_local6 = 20;
_local10 = dataMain.romdata.length;
_local3 = new flash.geom.Rectangle(_local5 - 1, _local4 - 1, _local7 + 2, _local6 + 2);
dashBmp.fillRect(_local3, 12303291);
_local3 = new flash.geom.Rectangle(_local5, _local4, _local7, _local6);
dashBmp.fillRect(_local3, 0);
var _local11 = new flash.display.BitmapData(100, 20, false, 0);
var _local8 = _root.createEmptyMovieClip("temp", _root.getNextHighestDepth());
_local8._x = 1024;
var _local9 = new TextFormat();
_local9.bold = true;
_local9.font = "_sans";
_local9.align = "center";
_local9.color = 65382;
var _local12 = _local8.createTextField("temp2", _local8.getNextHighestDepth(), 0, 0, 100, 20);
_local12.setNewTextFormat(_local9);
_local12.text = score.toString();
_local11.draw(_local8);
dashBmp.copyPixels(_local11, new flash.geom.Rectangle(0, 0, 100, 20), new flash.geom.Point(_local5, _local4));
_local8.removeMovieClip();
}
function doFunk(md) {
var _local2 = 0;
var _local1 = 0;
(Key.isDown(17) ? (_local2 = _local2 + 5) : null);
(Key.isDown(16) ? (_local2 = _local2 - 5) : null);
(Key.isDown(8) ? (_local1 = _local1 - 5) : null);
(Key.isDown(9) ? (_local1 = _local1 + 5) : null);
(Key.isDown(46) ? (trace((("funk: " + md.FUNK) + ", dist: ") + md.MAX_DISTANCE)) : null);
md.setFunk(_local2, true);
md.MAX_DISTANCE = md.MAX_DISTANCE + _local1;
}
static function doMenu() {
h = h + 16;
h = h % 240;
var _local2 = new TextFormat();
_local2.color = ((h * 65536) + (h * 256)) + h;
highlight.setTextFormat(_local2);
var _local1;
_local1 = main;
_local1.renderMain.moveCamera(0, 0, 5, true);
_local1.renderMain.rotateCamera(0, -0.5, true);
_local1.renderMain.render();
if (_local1.isMasking) {
_local1.mask._alpha = _local1.mask._alpha + 5;
if (_local1.mask._alpha >= 100) {
_local1.initGame();
_local1.mask._alpha = 100;
_local1.isMasking = false;
ball.sprite._visible = true;
ball.reset();
ball.isDead = false;
_local1.initRunnerCam(_local1.renderMain);
_local1.isResetting = true;
_local1.dash._visible = true;
_local1.displayDashboard();
_local1.placeBabe(false);
_local1.menu._x = 1024;
_local1.base.onEnterFrame = null;
_local1.base.onEnterFrame = enterFrame;
}
return(undefined);
}
babeY = babeY + 0.05;
var _local4 = 100;
_local1.babe._y = (Math.cos(babeY) * _local4) + 50;
((babeY >= ((Math.PI*2) * _local4)) ? ((babeY = 0)) : null);
if (menuOn) {
waitKey--;
waitSpace--;
((waitKey < 0) ? ((waitKey = 0)) : null);
((waitSpace < 0) ? ((waitSpace = 0)) : null);
var _local3 = false;
if (Key.isDown(32)) {
if (waitSpace == 0) {
switch (option) {
case 0 :
_local1.mode = "timeattack";
_local1.isMasking = true;
break;
case 1 :
_local1.mode = "catmode";
_local1.isMasking = true;
break;
case 2 :
returnToMainMenu();
_local1.isMasking = true;
}
menuOn = false;
_local1.menu.timeattack._visible = false;
_local1.menu.catmode._visible = false;
_local1.menu.mainmenu._visible = false;
}
} else if (Key.isDown(40)) {
if (waitKey == 0) {
waitKey = 10;
option++;
_local3 = true;
}
} else if (Key.isDown(38)) {
if (waitKey == 0) {
waitKey = 10;
option--;
_local3 = true;
}
}
if (_local3) {
((option < 0) ? ((option = 2)) : null);
option = option % 3;
_local2.color = 51;
_local1.menu.timeattack.setTextFormat(_local2);
_local1.menu.catmode.setTextFormat(_local2);
_local1.menu.mainmenu.setTextFormat(_local2);
switch (option) {
case 0 :
_local1.mode = "timeattack";
highlight = _local1.menu.timeattack;
break;
case 1 :
_local1.mode = "catmode";
highlight = _local1.menu.catmode;
break;
case 2 :
highlight = _local1.menu.mainmenu;
}
}
} else if (Key.isDown(32)) {
_local1.menu.start._visible = false;
_local1.menu.timeattack._visible = true;
_local1.menu.catmode._visible = true;
_local1.menu.mainmenu._visible = true;
menuOn = true;
highlight = _local1.menu.timeattack;
waitSpace = 40;
}
}
static function doEndGame() {
var _local2 = main;
if (_local2.isMasking) {
_local2.mask._alpha = _local2.mask._alpha - 5;
if (_local2.mask._alpha <= 0) {
_local2.mask._alpha = 0;
_local2.isMasking = false;
}
} else {
var _local3 = _root.createEmptyMovieClip("scores", _root.getNextHighestDepth());
_local3.swapDepths(_local2.mask);
_local2.renderSecond = new Mode7(_local3, 550, 400);
_local2.renderSecond.addMap(1, _local2.flagLogo);
_local2.renderSecond.setMap(1);
_local2.initScoreCam(_local2.renderSecond);
_local2.renderSecond.FUNK = -20;
_local2.renderSecond.MAX_DISTANCE = 55;
_local2.renderSecond.render();
_local2.makeScoreBoard(_local3);
_local2.base.onEnterFrame = doScore;
}
}
static function doScore() {
var _local2 = main;
_local2.renderSecond.rotateCamera(0, -0.5, true);
_local2.doFunk(main.renderSecond);
_local2.renderSecond.render();
if (Key.isDown(32)) {
_local2.renderSecond.destroy();
_root.scores.removeMovieClip();
_local2.base.onEnterFrame = doMenu;
_local2.menu.start._visible = true;
highlight = _local2.menu.start;
var _local3 = new TextFormat();
_local3.color = 51;
_local2.menu.timeattack.setTextFormat(_local3);
_local2.menu.catmode.setTextFormat(_local3);
_local2.menu.mainmenu.setTextFormat(_local3);
}
}
function makeScoreBoard(mc) {
var _local2 = mc.createTextField("score1", mc.getNextHighestDepth(), 125, 175, 300, 50);
var _local3 = new TextFormat();
_local3.bold = true;
_local3.font = "_sans";
_local3.color = 16777215 /* 0xFFFFFF */;
_local3.size = 25;
_local3.align = "center";
_local2.selectable = false;
_local2.setNewTextFormat(_local3);
_local2.text = "FINAL RESULTS";
_local2.cacheAsBitmap = true;
_local3.size = 16;
_local2.multiline = true;
_local2 = mc.createTextField("score2", mc.getNextHighestDepth(), 125, 200, 300, 50);
_local2.selectable = false;
_local2.setNewTextFormat(_local3);
var _local4 = "";
if (main.mode != "catmode") {
_local4 = "time attack - run until the end of time";
} else {
_local4 = "cat mode - 9 lives and timeless";
}
_local2.text = _local4;
_local2 = mc.createTextField("score3", mc.getNextHighestDepth(), 125, 250, 300, 50);
_local2.selectable = false;
_local2.setNewTextFormat(_local3);
_local2.text = "score: " + main.score;
_local2 = mc.createTextField("score4", mc.getNextHighestDepth(), 125, 270, 300, 50);
_local2.selectable = false;
_local2.setNewTextFormat(_local3);
var _local6 = Math.round((100 * dataMain.startCursor) / dataMain.romdata.length);
_local4 = "";
if (main.laps > 0) {
_local4 = _local4 + (((("ran for " + main.laps) + " laps and ") + _local6) + "%");
} else {
_local4 = _local4 + (("covered " + _local6) + "% of the track");
}
_local2.text = _local4;
_local2.cacheAsBitmap = true;
}
var MAX_SPEED = 32;
var SPD_MULT = 0.8;
}
Symbol 14 MovieClip [__Packages.Mode7] Frame 0
class Mode7
{
var name, _parent, _width, _height, _x, _y, rotationX, rotationY, cameraY, cameraX, cameraZ, bmpData, mapList, numScanlines, oldTime, mapId, quality, lastUpdate;
function Mode7 (parent, width, height) {
name = "default";
_parent = parent;
_width = width;
_height = height;
_x = 0;
_y = 0;
rotationX = 20;
rotationY = 45;
FUNK = 40;
cameraY = 500;
cameraX = (cameraZ = 0);
bmpData = new Array();
mapList = ["test"];
var _local4;
makeDefault();
setMap(0);
numScanlines = 0;
setQuality(QUALITY_MEDIUM);
init();
oldTime = getTimer();
}
function toString() {
var _local2;
_local2 = ("RENDERER '" + name) + "'\n";
_local2 = _local2 + (((((((((("Camera: c(" + Math.floor(cameraX)) + ", ") + Math.floor(cameraY)) + ", ") + Math.floor(cameraZ)) + "), r[") + rotationX) + ", ") + rotationY) + "]\n");
_local2 = _local2 + (((((("Renderer scan(" + numScanlines) + "), quality(") + quality) + "), map(") + mapId) + ")\n");
_local2 = _local2 + (((((("funk(" + FUNK) + "), maxDist(") + MAX_DISTANCE) + "), sWidth(") + SCANLINE_WIDTH) + ")\n");
return(_local2);
}
function getBitmap(idx) {
return(bmpData[idx]);
}
function makeDefault() {
var _local3 = new flash.display.BitmapData(32, 32, true, 16777215);
var _local2 = 5;
while (_local2 < 31) {
_local3.setPixel(_local2 - 1, _local2, 0);
_local3.setPixel(_local2, _local2, 0);
_local3.setPixel(_local2 + 1, _local2, 0);
_local2++;
}
bmpData[0] = _local3;
}
function setQuality(qual) {
switch (qual) {
case QUALITY_LOW :
quality = QUALITY_LOW;
break;
case QUALITY_MEDIUM :
quality = QUALITY_MEDIUM;
break;
case QUALITY_HIGH :
quality = QUALITY_HIGH;
break;
default :
quality = QUALITY_MEDIUM;
}
}
function setMap(id) {
((id > bmpData.length) ? (id = 0) : null);
mapId = id;
}
function addMap(index, bmp) {
bmpData[index] = bmp;
}
function synchronize() {
var _local2;
_local2 = getTimer();
lastUpdate = _local2 - oldTime;
oldTime = _local2;
if (lastUpdate < 1) {
lastUpdate = 1;
} else if (lastUpdate > 120) {
lastUpdate = 120;
}
}
function setFunk(coeff, isDiff) {
FUNK = (isDiff ? (FUNK) : 0) + coeff;
}
function moveCamera(x, y, z, isDiff) {
cameraX = x + (isDiff ? (cameraX) : 0);
cameraY = y + (isDiff ? (cameraY) : 0);
cameraZ = z + (isDiff ? (cameraZ) : 0);
cameraX = cameraX % 1024;
((cameraY < 4) ? ((cameraY = 4)) : null);
((cameraY > 2048) ? ((cameraY = 2048)) : null);
}
function rotateCamera(rx, ry, isDiff) {
rotationX = (isDiff ? (rotationX) : 0) + rx;
rotationY = (isDiff ? (rotationY) : 0) + ry;
rotationX = rotationX % 360;
rotationY = rotationY % 360;
}
function getCamera() {
var _local2 = new Object();
_local2.x = cameraX;
_local2.y = cameraY;
_local2.z = cameraZ;
_local2.rx = rotationX;
_local2.ry = rotationY;
return(_local2);
}
function init() {
switch (quality) {
case QUALITY_LOW :
numScanlines = _height >> 2;
break;
case QUALITY_HIGH :
numScanlines = _height;
break;
case QUALITY_MEDIUM :
default :
quality = QUALITY_MEDIUM;
numScanlines = _height >> 1;
}
var _local2;
_local2 = 0;
while (_local2 < numScanlines) {
_parent[name + _local2.toString()].removeMovieClip();
_local2++;
}
_local2 = 0;
while (_local2 < numScanlines) {
_parent.createEmptyMovieClip(name + _local2.toString(), _parent.getNextHighestDepth());
_parent[name + _local2.toString()]._x = _x + (_width / 2);
_parent[name + _local2.toString()]._y = _y + (_local2 * quality);
_local2++;
}
}
function destroy() {
var _local2 = 0;
while (_local2 < numScanlines) {
_parent[name + _local2.toString()].removeMovieClip();
_local2++;
}
}
function render() {
var _local6;
var _local17;
var _local4;
var _local10;
var _local8;
var _local19;
var _local9;
var _local18;
var _local16;
var _local7;
var _local5;
var _local12;
var _local11;
var _local14;
var _local15;
var _local3;
var _local20;
_local14 = Math.sin;
_local15 = Math.cos;
_local3 = new flash.geom.Matrix();
_local3.identity();
_local3.rotate((rotationY / 180) * Math.PI);
_local17 = (_width / 2) / SCANLINE_WIDTH;
_local16 = ((FUNK / numScanlines) / 180) * Math.PI;
_local7 = ((rotationX / 180) * Math.PI) - ((_local16 * numScanlines) / 2);
_local19 = _local14((rotationY / 180) * Math.PI);
_local18 = _local15((rotationY / 180) * Math.PI);
_local20 = bmpData[mapId];
_local6 = -1;
_local6 = 0;
while (_local6 < numScanlines) {
var _local2;
_local2 = _parent[name + _local6.toString()];
_local2.clear();
_local7 = _local7 + _local16;
_local9 = _local14(_local7);
if (_local9 < 0) {
} else {
_local5 = cameraY / _local9;
_local12 = (MAX_DISTANCE + 20) - (_local5 / 20);
if (_local12 < 1) {
} else {
_local2._alpha = _local12;
_local11 = _local15(_local7) * _local5;
_local10 = cameraX - (_local19 * _local11);
_local8 = cameraZ - (_local18 * _local11);
_local3.tx = (_local10 * _local3.a) + (_local8 * _local3.c);
_local3.ty = (_local10 * _local3.b) + (_local8 * _local3.d);
_local4 = _local17 * _local5;
_local2._xscale = 100 * (SCANLINE_WIDTH / _local5);
var _local13 = false;
_local2.beginBitmapFill(_local20, _local3, true, true);
_local2.moveTo(-_local4, 0);
_local2.lineTo(_local4, 0);
_local2.lineTo(_local4, quality);
_local2.lineTo(-_local4, quality);
_local2.endFill();
}
}
_local6++;
}
}
var QUALITY_LOW = 4;
var QUALITY_MEDIUM = 2;
var QUALITY_HIGH = 1;
var SCANLINE_WIDTH = 500;
var MAX_DISTANCE = 200;
var FUNK = 40;
}
Symbol 15 MovieClip [__Packages.MapData] Frame 0
class MapData
{
var textures, romdata, bmpData, startCursor, looped, picoMove, windowOffset, lastFlag, loop;
function MapData () {
textures = new Texture(PIXEL_WIDTH);
romdata = new Array();
bmpData = new flash.display.BitmapData(8 * PIXEL_WIDTH, WINDOW_LENGTH * PIXEL_HEIGHT, true, COLOR_VOID);
setData();
buildLevel();
makeLine(24, 0, bmpData);
startCursor = 0;
looped = false;
picoMove = 1;
windowOffset = 0;
lastFlag = false;
loop = true;
}
function getCurrent() {
return(startCursor);
}
function getTotal() {
return(romdata.length);
}
function toString() {
var _local2 = ("Distance: " + Math.abs(startCursor - romdata.length)) + newline;
_local2 = _local2 + (("Completed: " + Math.floor((100 * startCursor) / romdata.length)) + "%");
return(_local2);
}
function nextCursor() {
startCursor++;
if (startCursor > (romdata.length - 1)) {
looped = true;
}
startCursor = startCursor % romdata.length;
}
function scroll(pix) {
var _local5 = 0;
picoMove = picoMove + pix;
var _local9 = Math.floor(Math.abs(picoMove));
if (_local9 > 0) {
_local5 = Math.round(picoMove);
picoMove = 0;
} else {
return(bmpData);
}
var _local2 = 0;
bmpData.scroll(0, _local5);
var _local7 = 0;
var _local6 = _local5;
if (_local5 < 0) {
_local7 = bmpData.height - Math.abs(_local5);
_local6 = bmpData.height;
}
_local2 = _local7;
while (_local2 < _local6) {
lineH(bmpData, _local2, 0, 8 * PIXEL_WIDTH, 4278190080 + COLOR_VOID);
_local2++;
}
windowOffset = windowOffset + _local5;
var _local4 = Math.floor(Math.abs(windowOffset / (PIXEL_HEIGHT - 1)));
var _local10 = Math.abs(windowOffset % (PIXEL_HEIGHT - 1));
if (Math.abs(windowOffset) < (PIXEL_HEIGHT / 1.25)) {
return(bmpData);
}
if (_local4 > 1) {
trace(_local4);
}
windowOffset = 0;
var _local3;
if (_local5 < 0) {
nextCursor();
_local3 = getCursorByte(true);
makeLine(_local3, WINDOW_LENGTH - 1, bmpData);
_local2 = 0;
while (_local2 < (_local4 - 1)) {
nextCursor();
_local3 = getCursorByte(true);
makeLine(_local3, (WINDOW_LENGTH - (_local2 * PIXEL_HEIGHT)) + 1, bmpData);
_local2++;
}
} else {
var _local8;
startCursor = startCursor - _local4;
_local8 = startCursor;
_local3 = getCursorByte(false);
makeLine(_local3, 0, bmpData);
_local2 = 1;
while (_local2 < _local4) {
nextCursor();
_local3 = getCursorByte(true);
makeLine(_local3, _local2 * PIXEL_HEIGHT, bmpData);
_local2++;
}
startCursor = _local8;
}
return(bmpData);
}
function getCursorByte(end) {
var _local2 = startCursor + (end ? (WINDOW_LENGTH) : 0);
if (loop) {
_local2 = _local2 % romdata.length;
}
_local2 = romdata[_local2];
if (_local2 == undefined) {
(lastFlag ? (_local2 = 170) : (_local2 = 85));
lastFlag = !lastFlag;
}
return(_local2);
}
function rollBack(offset) {
startCursor = startCursor - offset;
startCursor = startCursor % romdata.length;
if (startCursor < 0) {
startCursor = 0;
}
drawData(startCursor, WINDOW_LENGTH);
makeLine(24, 1, bmpData);
makeLine(255, 0, bmpData);
return(bmpData);
}
function testBitmap() {
var _local3 = _root.createEmptyMovieClip("base2", _root.getNextHighestDepth());
_local3.lineStyle(2, 1114129, 100);
_local3.beginFill(5592575, 100);
_local3.lineTo(8 * PIXEL_WIDTH, 0);
_local3.lineTo(8 * PIXEL_WIDTH, WINDOW_LENGTH * PIXEL_HEIGHT);
_local3.lineTo(0, WINDOW_LENGTH * PIXEL_HEIGHT);
_local3.endFill();
_local3.attachBitmap(bmpData, _root.getNextHighestDepth(), "", false);
_local3._rotation = 180;
_local3._x = _local3._width - 2;
_local3._y = _local3._height + 205;
}
function testBitmap2() {
var _local3 = _root.createEmptyMovieClip("base2", _root.getNextHighestDepth());
_local3.lineStyle(2, 1114129, 100);
_local3.beginFill(5592575, 100);
_local3.lineTo(8 * PIXEL_WIDTH, 0);
_local3.lineTo(8 * PIXEL_WIDTH, WINDOW_LENGTH * PIXEL_HEIGHT);
_local3.lineTo(0, WINDOW_LENGTH * PIXEL_HEIGHT);
_local3.endFill();
_root.attachBitmap(bmpData, _root.getNextHighestDepth(), "", false);
}
function makeLine(byte, y, bmp) {
var _local6;
var _local9 = false;
var _local2 = 0;
while (_local2 < 8) {
var _local10 = ("00000000".substring(0, 7 - _local2) + "1") + "00000000".substring(0, _local2);
_local6 = parseInt(_local10, 2);
_local6 = _local6 & byte;
var _local3;
_local3 = textures.tileLone;
if (_local6 > 0) {
var _local5 = true;
var _local4 = true;
if (_local2 == 0) {
(((1 & byte) > 0) ? (_local5 = false) : null);
} else if (_local9) {
_local5 = false;
}
if (_local2 == 7) {
(((128 & byte) > 0) ? (_local4 = false) : null);
} else {
var _local7 = _local6 << 1;
_local7 = _local7 & byte;
((_local7 > 0) ? (_local4 = false) : null);
}
if ((!_local4) && (!_local5)) {
_local3 = textures.tileMid;
} else if (_local4 && (_local5)) {
_local3 = textures.tileLone;
} else if (_local4) {
_local3 = textures.tileRight;
} else {
_local3 = textures.tileLeft;
}
bmp.copyPixels(_local3, new flash.geom.Rectangle(0, 0, PIXEL_WIDTH, PIXEL_HEIGHT), new flash.geom.Point(_local2 * PIXEL_WIDTH, y * PIXEL_HEIGHT));
_local9 = true;
} else {
_local9 = false;
}
_local2++;
}
}
function drawData(startOffset, length) {
bmpData.fillRect(new flash.geom.Rectangle(0, 0, 8 * PIXEL_WIDTH, WINDOW_LENGTH * PIXEL_HEIGHT), 0 + COLOR_VOID);
var _local3 = 0;
var _local2 = startOffset;
while (_local2 < (startOffset + length)) {
makeLine(romdata[_local2], _local3, bmpData);
_local3++;
_local2++;
}
}
function buildLevel() {
textures = new Texture(PIXEL_WIDTH);
drawData(0, WINDOW_LENGTH);
}
function lineH(bmp, y, x0, x1, color) {
if (x1 <= x0) {
return(undefined);
}
bmp.fillRect(new flash.geom.Rectangle(x0, y, x1 - x0, 1), 0 + COLOR_VOID);
}
function setData() {
var _local4;
_local4 = getRawData();
while (romdata.length > 0) {
romdata.pop();
}
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4.charAt(_local2);
_local3 = _local3 + _local4.charAt(_local2 + 1);
romdata.push(parseInt(_local3, 16));
_local2 = _local2 + 2;
}
}
function getRawData() {
var _local1;
_local1 = "0081C1C1C1C1C1C0C0C0C0C0C0C0C0818181818180C0C0C0E";
_local1 = _local1 + "0E0E0E0E06060606060707070707030303020206060604000002060606060606060E0C0C1C1C1C1C1C1C";
_local1 = _local1 + "18181818000018181810181808080818181810101818181C1C0404040E0E0E0E0E0E080808080C0C0C0C";
_local1 = _local1 + "0404040404040C0C0C0C0C00181818181818180006060606060606001818181818181818000808080C0C";
_local1 = _local1 + "0C0C04040414101018181818181818180808080008080C0C040008080808000000080808080800000008";
_local1 = _local1 + "0808080808000000080808080800000008080C0C041C1C18181818081810101030302020206040404060";
_local1 = _local1 + "60203030341C040C0C0C0C0C0C0C0C0C081E001E001E040C0C0C0C0060606060000C0C0C0C0060606060";
_local1 = _local1 + "000C0C0C0C0060606060000060606020203010101018180808080C0C0404060602020303010101010101";
_local1 = _local1 + "010101000000010101030303070505050D090909091911111131212161414141C1818181818080808080";
_local1 = _local1 + "808080000000003030303000000000383838383808080818181010101010101010101808080808080818";
_local1 = _local1 + "10101010101C040C0C0C0C0C0C1818181818181830303030303030303000003030000030300000303000";
_local1 = _local1 + "0030300000303000003030000030300000303000003030000030303038080C0C0C0C0E02020202020606";
_local1 = _local1 + "0404040C0C0C0C1C1C181818181818181810101010180808080808181010101010101010040404040404";
_local1 = _local1 + "040404141410101010101010101010141414040404040444444444444040404040404040404048484848";
_local1 = _local1 + "484808080808080808080808E0E0E0E00000404060202030101808080C0406020301010103020206040C";
_local1 = _local1 + "080818103020604040C080808080C0406020203010101808080C04040602030101010302020604040C08";
_local1 = _local1 + "081810101030202020604040C080808080E0202020000000C0C0404078680B0B0F010101113F33331330";
_local1 = _local1 + "303030302020202000000030303030000010105040101040005050400010504000101010101018180C0C";
_local1 = _local1 + "0C0C0E0202020206040404040C080808080800000000080808080838383830303030302020202020243C";
_local1 = _local1 + "040404040C0C08382020202024242424243C0404040404040400000000000004040404040404040C0000";
_local1 = _local1 + "20202020202000000404040404040404040C0808080808081818181818101010101C0404040404043434";
_local1 = _local1 + "3C2020202020242424243C04040C0CFC8C8C8C8C8C808080A0A0A0A0E030303030303010101018080808";
_local1 = _local1 + "08080808080C040404041C1C1C1C3030303030302020202024243C0404041414141C1010101010101C1C";
_local1 = _local1 + "040404040404040400000C08006040004040404060707010181C0C0507070303000002020E0E08080808";
_local1 = _local1 + "080C0C0C0C0404040404040C080808181010103038383838381818183C3C7E7EFFFF6261626562616c6c2";
_local1 = _local1 + "06279206e6577736465650000";
return(_local1);
}
var COLOR_VOID = 3394611;
var COLOR_TRANS = 1879048192;
var COLOR_GROUND = 5579264;
var WINDOW_LENGTH = 8;
var PIXEL_WIDTH = 16;
var PIXEL_HEIGHT = 128;
}
Symbol 16 MovieClip [__Packages.Texture] Frame 0
class Texture
{
var PIXEL_WIDTH, tileLeft, tileRight, tileMid, tileLone;
function Texture (width) {
PIXEL_WIDTH = width;
tileLeft = new flash.display.BitmapData(PIXEL_WIDTH, 128, false, 5780496);
tileRight = new flash.display.BitmapData(PIXEL_WIDTH, 128, false, 5780496);
tileMid = new flash.display.BitmapData(PIXEL_WIDTH, 128, false, 5780496);
tileLone = new flash.display.BitmapData(PIXEL_WIDTH, 128, false, 5780496);
var _local4 = (Math.random() * 8) + 1;
var _local5 = false;
if (_local4 > 7) {
_local4 = 1;
_local5 = true;
}
tileLone.perlinNoise(100, 80, 6, 10, false, true, _local4, _local5, null);
tileRight = tileLone.clone();
tileMid = tileLone.clone();
tileLeft = tileLone.clone();
var _local3 = new flash.display.BitmapData(1, 32, false, 5780496);
_local3.fillRect(new flash.geom.Rectangle(0, 0, 1, 4), 9216);
_local3.fillRect(new flash.geom.Rectangle(0, 4, 1, 4), 27904);
_local3.fillRect(new flash.geom.Rectangle(0, 8, 1, 4), 4830793);
_local3.fillRect(new flash.geom.Rectangle(0, 12, 1, 8), 9633682);
_local3.fillRect(new flash.geom.Rectangle(0, 20, 1, 4), 4830793);
_local3.fillRect(new flash.geom.Rectangle(0, 24, 1, 4), 27904);
_local3.fillRect(new flash.geom.Rectangle(0, 28, 1, 4), 9216);
var _local2 = 0;
while (_local2 < 4) {
tileLone.copyPixels(_local3, new flash.geom.Rectangle(0, 0, 1, 32), new flash.geom.Point(0, (_local2 * 128) / 4));
tileLone.copyPixels(_local3, new flash.geom.Rectangle(0, 0, 1, 32), new flash.geom.Point(PIXEL_WIDTH - 1, (_local2 * 128) / 4));
tileLeft.copyPixels(_local3, new flash.geom.Rectangle(0, 0, 1, 32), new flash.geom.Point(0, (_local2 * 128) / 4));
tileRight.copyPixels(_local3, new flash.geom.Rectangle(0, 0, 1, 32), new flash.geom.Point(PIXEL_WIDTH - 1, (_local2 * 128) / 4));
_local2++;
}
}
}
Symbol 17 MovieClip [__Packages.Babe] Frame 0
class Babe
{
var mc;
function Babe (parent) {
var temp_mc = _root.createEmptyMovieClip("babe_temp", _root.getNextHighestDepth());
var temp2_mc = temp_mc.createEmptyMovieClip("babe_temp2", _root.getNextHighestDepth());
temp2_mc._x = 175;
temp2_mc._y = 170;
with (temp2_mc) {
lineStyle(0, 1114112, 0);
beginFill(15272715, 100);
moveTo(34, -161);
curveTo(47, -160, 49, -102);
curveTo(66, -63, 67, -35);
curveTo(52, 23, -27, -21);
curveTo(-44, -64, -25, -100);
curveTo(-53, -116, -34, -147);
curveTo(-17, -169, 17, -163);
lineTo(34, -161);
endFill();
lineStyle(1, 0, 100);
beginFill(16777164, 100);
moveTo(34, 105);
curveTo(51, 92, 49, 76);
curveTo(45, 57, 30, 44);
curveTo(17, 33, 18, 28);
curveTo(16, 17, 19, 11);
curveTo(38, 0, 26, -25);
lineTo(31, -52);
lineTo(-24, -52);
lineTo(-28, -35);
curveTo(-55, -46, -47, -16);
curveTo(-46, -5, -32, 2);
lineTo(-24, 60);
lineTo(34, 105);
endFill();
lineStyle(2, 0, 100);
beginFill(2575339, 100);
moveTo(18, 55);
lineTo(32, 42);
lineTo(42, 56);
lineTo(21, 64);
lineTo(18, 58);
lineTo(18, 55);
endFill();
lineStyle(0, 0, 100);
beginFill(16777164, 100);
moveTo(-77, 22);
lineTo(-95, 92);
curveTo(-107, 120, -107, 155);
curveTo(-97, 170, -73, 159);
curveTo(-79, 120, -68, 110);
curveTo(-74, 95, -59, 69);
lineTo(-52, 38);
curveTo(-60, 91, -35, 108);
curveTo(-8, 115, -8, 93);
lineTo(-25, 10);
curveTo(-46, -25, -70, 6);
lineTo(-77, 22);
endFill();
lineStyle(1, 0, 100);
beginFill(16777164, 100);
moveTo(31, -51);
curveTo(59, -62, 57, -14);
curveTo(60, 4, 55, 21);
curveTo(63, 37, 56, 76);
curveTo(56, 88, 61, 97);
curveTo(86, 87, 85, 102);
curveTo(91, 109, 73, 112);
curveTo(57, 117, 44, 112);
lineTo(39, 88);
curveTo(32, 54, 38, 24);
curveTo(30, 8, 26, -23);
lineTo(31, -51);
endFill();
lineStyle(2, 0, 100);
beginFill(16777164, 100);
moveTo(-56, -5);
curveTo(-62, -80, -35, -64);
curveTo(-5, -71, -16, -39);
curveTo(-29, -29, -41, -47);
lineTo(-44, -9);
lineTo(-56, -5);
endFill();
lineStyle(1, 0, 0);
beginFill(16777164, 100);
moveTo(0, -36.5);
curveTo(11, -49.5, 24, -49.5);
curveTo(23, -71.5, 20, -84.5);
lineTo(-14, -84.5);
curveTo(-3, -56.5, -10, -53.5);
curveTo(-8, -49.5, 0, -36.5);
endFill();
lineStyle(2, 0, 100);
beginFill(5580521, 100);
moveTo(-6, -20);
curveTo(27, -44, 30, 0);
curveTo(5, 29, -12, -8);
curveTo(-39, 8, -44, -12);
curveTo(-48, -47, -21, -36);
curveTo(-9, -29, -10, -20);
lineTo(-6, -20);
endFill();
lineStyle(1, 0, 100);
beginFill(16777164, 100);
moveTo(-17.5, -81);
curveTo(-9.5, -62, 5.5, -58);
curveTo(27.5, -63, 31.5, -86);
curveTo(46.5, -131, 11.5, -135);
curveTo(-20.5, -140, -21.5, -98);
lineTo(-17.5, -81);
endFill();
lineStyle(2, 0, 100);
beginFill(16777164, 100);
moveTo(-80, 34);
lineTo(-163, 118);
curveTo(-181, 147, -161, 137);
lineTo(-151, 128);
curveTo(-132, 110, -113, 114);
curveTo(-92, 112, -107, 94);
lineTo(-88, 78);
curveTo(-38, 68, -26, 19);
curveTo(-30, 83, -8, 107);
curveTo(13, 118, 33, 104);
curveTo(48, 99, 37, 80);
lineTo(24, 55);
curveTo(2, 17, -1, 5);
curveTo(-15, -28, -48, 3);
curveTo(-62, 12, -79, 33);
lineTo(-80, 34);
endFill();
lineStyle(1, 0, 100);
beginFill(16777215, 100);
moveTo(8, -88);
curveTo(17, -81, 26, -91);
lineTo(26, -98);
curveTo(16, -109, 7, -97);
lineTo(8, -88);
endFill();
lineStyle(1, 0, 100);
beginFill(16777164, 100);
moveTo(1, -85);
lineTo(-2, -79);
lineTo(4, -79);
lineTo(1, -85);
endFill();
lineStyle(1, 0, 100);
beginFill(16777215, 100);
moveTo(-4, -97.5);
curveTo(-3, -82.5, -15, -96.5);
curveTo(-17, -108.5, -4, -98.5);
lineTo(-4, -97.5);
endFill();
lineStyle(1, 0, 100);
beginFill(16777215, 100);
moveTo(-6, -76);
curveTo(0, -67, 9, -73);
curveTo(-4, -74, -6, -76);
endFill();
lineStyle(1, 0, 0);
beginFill(5029123, 100);
moveTo(22, -93);
curveTo(18, -83, 9, -89);
curveTo(4, -97, 17, -99);
curveTo(22, -98, 22, -93);
endFill();
lineStyle(1, 0, 0);
beginFill(1511954, 100);
moveTo(11, -92);
curveTo(15, -89, 18, -94);
curveTo(13, -100, 11, -92);
endFill();
lineStyle(1, 0, 0);
beginFill(14406097, 100);
moveTo(11, -92);
curveTo(9, -93, 11, -96);
curveTo(14, -93, 11, -92);
endFill();
lineStyle(1, 0, 0);
beginFill(3518996, 100);
moveTo(-2.5, -93.5);
curveTo(-14.5, -90.5, -13.5, -100.5);
curveTo(-0.5, -107.5, -2.5, -93.5);
endFill();
lineStyle(0, 1114112, 0);
beginFill(15272715, 100);
moveTo(-37, -122);
curveTo(9, -74, 40, -112);
curveTo(28, -160, -37, -122);
endFill();
lineStyle(1, 0, 0);
beginFill(0, 100);
moveTo(-3.5, -97);
curveTo(-7.5, -94, -10.5, -98);
curveTo(-6.5, -101, -3.5, -97);
endFill();
lineStyle(1, 0, 0);
beginFill(14406097, 100);
moveTo(-10.5, -96.5);
curveTo(-12.5, -97.5, -10.5, -100.5);
curveTo(-7.5, -97.5, -10.5, -96.5);
endFill();
}
var bmp = (new flash.display.BitmapData(temp_mc._width + 10, temp_mc._height + 10, true, 0));
temp_mc._xscale = 35;
temp_mc._yscale = 35;
bmp.draw(temp_mc);
mc = parent;
mc.attachBitmap(bmp, mc.getNextHighestDepth());
mc.cacheAsBitmap = true;
temp2_mc.removeMovieClip();
temp_mc.removeMovieClip();
mc = parent.createEmptyMovieClip("circleback", _root.getNextHighestDepth());
mc.lineStyle(2, 16777215, 60);
mc.beginFill(16777215, 20);
var x = 150;
var y = 180;
var radius = 200;
var theta = (Math.PI/4);
var ctrlRadius = (radius / Math.cos(theta / 2));
mc.moveTo(x + radius, y);
var angle = 0;
var i = 0;
while (i < 8) {
angle = angle + theta;
var angleMid = (angle - (theta / 2));
var cx = (x + (Math.cos(angleMid) * ctrlRadius));
var cy = (y + (Math.sin(angleMid) * ctrlRadius));
var px = (x + (Math.cos(angle) * radius));
var py = (y + (Math.sin(angle) * radius));
mc.curveTo(cx, cy, px, py);
i++;
}
mc.endFill();
}
static function makeBall(mc) {
var tmp_mc;
var tmp2_mc;
tmp_mc = mc.createEmptyMovieClip("temp_mc", mc.getNextHighestDepth());
tmp2_mc = tmp_mc.createEmptyMovieClip("temp2_mc", tmp_mc.getNextHighestDepth());
tmp2_mc._x = 30;
tmp2_mc._y = 45;
with (tmp2_mc) {
lineStyle(1, 0, 0);
beginFill(16777164, 100);
moveTo(37, 69);
curveTo(42, 56, 36, 37);
curveTo(41, 30, 42, 24);
curveTo(45, 10, 31, 11);
curveTo(26, 20, 33, 34);
curveTo(32, 49, 34, 69);
lineTo(37, 69);
endFill();
lineStyle(1, 0, 100);
beginFill(16777164, 100);
moveTo(33, 68);
curveTo(25, 47, 26, 36);
curveTo(20, 23, 23, 10);
curveTo(32, 5, 36, 15);
curveTo(38, 24, 35, 36);
curveTo(36, 50, 35, 67);
lineTo(37, 73);
lineTo(36, 80);
lineTo(29, 79);
lineTo(33, 68);
endFill();
lineStyle(1, 1182937, 100);
beginFill(394314, 100);
moveTo(40, 22);
curveTo(37, 22, 32, 19);
curveTo(27, 23, 22, 20);
curveTo(19, 14, 23, 10);
curveTo(32, 12, 41, 10);
curveTo(45, 19, 40, 22);
endFill();
lineStyle(1, 0, 0);
beginFill(16777164, 100);
moveTo(41, -16);
lineTo(47, -9);
curveTo(52, -2, 50, 12);
curveTo(42, 17, 46, 5);
lineTo(47, 0);
lineTo(39, -9);
curveTo(35, -9, 36, -15);
curveTo(37, -18, 41, -16);
endFill();
lineStyle(0, 0, 0);
beginFill(16777164, 100);
moveTo(17, 1.34999999999999);
curveTo(16, -4.65000000000001, 20, -14.65);
curveTo(25, -17.65, 22, -7.65000000000001);
curveTo(19, 10.35, 17, 1.34999999999999);
endFill();
lineStyle(1, 0, 0);
beginFill(16777164, 100);
moveTo(25, 9);
curveTo(32, 14, 41, 10);
curveTo(35, 5, 40, 0);
curveTo(43, -6, 38, -14);
curveTo(31, -18, 23, -14);
curveTo(19, -8, 23, 0);
curveTo(26, 1, 24, 7);
curveTo(25, -4, 25, 9);
endFill();
lineStyle(1, 548857, 100);
beginFill(656944, 100);
moveTo(30, 0.550000000000011);
curveTo(46, 1.55000000000001, 42, -4.44999999999999);
lineTo(21, -5.44999999999999);
curveTo(19, -1.44999999999999, 30, 0.550000000000011);
endFill();
lineStyle(1, 0, 0);
beginFill(16777164, 100);
moveTo(22, -15);
curveTo(33, -8, 38, -16);
curveTo(32, -17, 32, -23);
curveTo(26, -24, 25, -19);
curveTo(27, -18, 22, -15);
endFill();
lineStyle(1, 0, 0);
beginFill(16777164, 100);
moveTo(27, -19);
curveTo(19, -34, 33, -31);
curveTo(38, -26, 33, -20);
curveTo(30, -16, 27, -19);
endFill();
lineStyle(1, 0, 0);
beginFill(12649733, 100);
moveTo(23.75, -25.95);
curveTo(18.75, -31.95, 30.75, -34.95);
curveTo(41.75, -29.95, 33.75, -19.95);
curveTo(37.75, -4.94999999999999, 27.75, -2.94999999999999);
curveTo(17.75, -9.94999999999999, 23.75, -19.95);
curveTo(26.75, -20.95, 23.75, -25.95);
endFill();
}
var bmp = (new flash.display.BitmapData(50 + tmp_mc._width, tmp_mc._height + 30, true, 0));
bmp.draw(tmp_mc);
tmp2_mc.removeMovieClip();
tmp_mc.removeMovieClip();
mc.attachBitmap(bmp, mc.getNextHighestDepth(), "", false);
mc.cacheAsBitmap = true;
}
static function makeBallMid(mc) {
var tmp_mc;
var tmp2_mc;
tmp_mc = mc.createEmptyMovieClip("temp_mc", mc.getNextHighestDepth());
tmp2_mc = tmp_mc.createEmptyMovieClip("temp2_mc", tmp_mc.getNextHighestDepth());
tmp2_mc._x = 30;
tmp2_mc._y = 45;
with (tmp2_mc) {
lineStyle(1, 0, 100);
beginFill(16777164, 100);
moveTo(34, 71);
curveTo(38, 56, 35, 38);
curveTo(40, 31, 38, 24);
curveTo(42, 13, 27, 11);
curveTo(22, 20, 29, 29);
curveTo(28, 49, 30, 69);
lineTo(34, 71);
endFill();
lineStyle(1, 0, 100);
beginFill(16777164, 100);
moveTo(30, 69);
curveTo(26, 48, 23, 37);
curveTo(22, 24, 20, 11);
curveTo(28, 12, 33, 16);
curveTo(31, 25, 30, 37);
curveTo(31, 51, 32, 68);
lineTo(34, 74);
lineTo(33, 71);
lineTo(28, 74);
lineTo(30, 69);
endFill();
lineStyle(1, 1182937, 100);
beginFill(394314, 100);
moveTo(38, 22);
curveTo(33, 23, 31, 20);
curveTo(23, 24, 20, 21);
curveTo(19, 16, 21, 11);
curveTo(27, 14, 36, 11);
curveTo(41, 21, 38, 22);
endFill();
lineStyle(1, 0, 0);
beginFill(16777164, 100);
moveTo(37, -16);
lineTo(41, -9);
curveTo(47, -1, 47, 9);
curveTo(40, 5, 41, 5);
lineTo(38, 1);
lineTo(35, -9);
curveTo(31, -9, 32, -15);
curveTo(33, -18, 37, -16);
endFill();
lineStyle(0, 0, 0);
beginFill(16777164, 100);
moveTo(11, 5);
curveTo(12, -2, 18, -14);
curveTo(23, -17, 20, -7);
curveTo(17, 15, 11, 5);
endFill();
lineStyle(1, 0, 0);
beginFill(16777164, 100);
moveTo(21, 9);
curveTo(28, 14, 37, 10);
curveTo(31, 5, 36, 0);
curveTo(39, -6, 34, -14);
curveTo(27, -18, 19, -14);
curveTo(15, -8, 19, 0);
curveTo(22, 1, 20, 7);
curveTo(21, -4, 21, 9);
endFill();
lineStyle(1, 548857, 100);
beginFill(656944, 100);
moveTo(27, 2);
curveTo(38, 4, 39, -2);
lineTo(18, -3);
curveTo(20, 3, 27, 2);
endFill();
lineStyle(1, 0, 0);
beginFill(16777164, 100);
moveTo(22, -15);
curveTo(33, -8, 38, -16);
curveTo(32, -17, 32, -23);
curveTo(26, -24, 25, -19);
curveTo(27, -18, 22, -15);
endFill();
lineStyle(1, 0, 0);
beginFill(16777164, 100);
moveTo(27, -19);
curveTo(19, -34, 33, -31);
curveTo(38, -26, 33, -20);
curveTo(30, -16, 27, -19);
endFill();
lineStyle(1, 0, 0);
beginFill(12649733, 100);
moveTo(22, -23);
curveTo(17, -31, 29, -34);
curveTo(39, -29, 34, -19);
curveTo(40, -4, 26, -2);
curveTo(26, -9, 25, -19);
curveTo(23, -14, 22, -23);
endFill();
}
var bmp = (new flash.display.BitmapData(50 + tmp_mc._width, tmp_mc._height + 30, true, 0));
bmp.draw(tmp_mc);
tmp2_mc.removeMovieClip();
tmp_mc.removeMovieClip();
mc.attachBitmap(bmp, mc.getNextHighestDepth(), "", false);
mc.cacheAsBitmap = true;
}
}
Symbol 18 MovieClip [__Packages.Ball] Frame 0
class Ball
{
var frame, sprite, offset, isDead;
function Ball (base) {
frame = 0;
sprite = base;
offset = 0;
isDead = false;
_yBase = base._y;
_y = _yBase;
var r = 45;
var x = ((r / 2) - 12);
var y = ((r / 2) - 35);
var A = 0.414213562373095;
var endx;
var endy;
var cx;
var cy;
var c = sprite;
c.createEmptyMovieClip("babe1", c.getNextHighestDepth());
c.createEmptyMovieClip("babe2", c.getNextHighestDepth());
c.createEmptyMovieClip("babeMid", c.getNextHighestDepth());
Babe.makeBall(c.babe2);
Babe.makeBall(c.babe1);
Babe.makeBallMid(c.babeMid);
with (c.babeMid) {
_xscale = 70;
_yscale = 70;
_x = _x - 30;
_y = _y - 58;
_visible = false;
}
with (c.babe2) {
_xscale = 70;
_yscale = 70;
_x = _x - 30;
_y = _y - 58;
_visible = false;
}
with (c.babe1) {
_xscale = -70;
_yscale = 70;
_x = _x + 50;
_y = _y - 58;
}
c.lineStyle(1, 11184895, 60);
c.beginFill(11184844, 40);
c.moveTo(x + r, y);
var angle = 45;
while (angle <= 360) {
endx = r * Math.cos((angle * Math.PI) / 180);
endy = r * Math.sin((angle * Math.PI) / 180);
cx = endx + ((r * A) * Math.cos(((angle - 90) * Math.PI) / 180));
cy = endy + ((r * A) * Math.sin(((angle - 90) * Math.PI) / 180));
c.curveTo(cx + x, cy + y, endx + x, endy + y);
angle = angle + 45;
}
c.endFill();
}
function reset() {
_y = _yBase;
sprite._y = _yBase;
_a = 0;
}
function run() {
if (isDead) {
if (_a <= 0) {
_a = 8;
} else {
_a = _a + _g;
_y = _y + _a;
sprite._y = _y;
}
return(undefined);
}
if (_y >= _yBase) {
reset();
} else {
_a = _a + _g;
_y = _y + _a;
sprite._y = _y;
}
offset = offset + (-_speed);
if (offset > 32) {
offset = 0;
gotoNextFrame();
}
}
function gotoNextFrame() {
frame++;
frame = frame % 4;
sprite.babe1._visible = false;
sprite.babeMid._visible = false;
sprite.babe2._visible = false;
switch (frame) {
case 0 :
sprite.babe1._visible = true;
break;
case 1 :
sprite.babeMid._visible = true;
break;
case 2 :
sprite.babe2._visible = true;
break;
case 3 :
sprite.babeMid._visible = true;
}
}
function jump() {
if (_y == _yBase) {
_a = -10;
_y = _yBase - 1;
}
}
function isJumping() {
return(_y < _yBase);
}
function setXY(x, y) {
sprite._x = x;
sprite._y = y;
_yBase = y;
_y = y;
}
function setSpeed(sp) {
_speed = sp;
}
var _y = 0;
var _yBase = 0;
var _g = 0.9;
var _a = 0;
var _speed = 0;
}
Symbol 8 Button
on (release) {
_root.mc.removeMovieClip();
gotoAndStop ("game");
}