Frame 1
var LOCAL = true;
var domXML = new XML();
if (LOCAL) {
gotoAndPlay (2);
} else {
domXML.load("http://www.cartoonnetwork.com/crossdomain.xml");
}
domXML.onLoad = function () {
if (domXML.childNodes.length == 0) {
getURL ("http://www.cartoonnetwork.com");
stop();
} else {
gotoAndPlay (2);
}
};
Frame 2
var loadedVal = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedVal > 1) {
counter_txt.text = loadedVal + "%";
}
if (loadedVal >= 100) {
gotoAndStop (5);
}
Frame 3
gotoAndPlay (2);
Frame 6
this._lockroot = true;
gameOver_mc._visible = false;
stop();
Instance of Symbol 272 MovieClip "gravMeter" in Frame 6
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 490 MovieClip "skate_icon" in Frame 6
onClipEvent (load) {
this._visible = false;
}
Frame 7
var hamsterShoot = new Game(this.game_mc, fvGameData);
Mouse.addListener(hamsterShoot);
stop();
Symbol 506 MovieClip [__Packages.Game] Frame 0
class Game
{
var _$mc, gameData, shotNum, cam, bltNum, state, turn, distances, shooting, faceplant, skidding, bounce, speed, glide, wind, slide, superbounce, rebound, gravOn, bounceNum, superbounceNum, speedNum, glideNum, windNum, slideNum, reboundNum, gravPointsMax, gravPoints, gravButton, powerupCount, cloudCount, bushCount, vCount, tick, glideCnt, glideVals, glideDot, powerupClips, powerupMark, cloudMark, bushMark, vehicleMark, cloudList, bushList, sndTheme, sndEnding, sndPrelude, preludeSound, frCount, frArray, timer, blt, slideSound, skidSound, windSound, gravSound, themeSound, sndFadeInterval, waitInt, jumpInt, bltInt, bc, sndWind, grav, sndGrav, sndSlide, sndFly, sndSkid, sndPickup, sndBump, sndBounce, sndSuperbounce, sndHit, hitClip, sndShoot, yvel, boost, ar, ad, nodesXML, _so, _bestScore;
function Game (mcClip, xmlData) {
_$mc = mcClip;
gameData = xmlData;
shotNum = 0;
init();
hit = false;
}
function init() {
cam = new GameCamera(_$mc, 600, 400);
cam.dis.addEventListener("onDone", this);
bltNum = 0;
state = null;
turn = 1;
distances = new Array();
shooting = false;
faceplant = false;
skidding = false;
bounce = false;
speed = false;
glide = false;
wind = false;
slide = false;
superbounce = false;
rebound = false;
gravOn = false;
falling = false;
bounceNum = 0;
superbounceNum = 0;
speedNum = 0;
glideNum = 0;
windNum = 0;
slideNum = 0;
reboundNum = 0;
gravPointsMax = 100;
gravPoints = 100;
gravButton = false;
updateGravMeter();
powerupCount = 0;
cloudCount = 0;
bushCount = 0;
vCount = 0;
tick = 0;
glideCnt = 0;
glideVals = new Array();
glideDot = 0;
glideVals = [-0.5, -1, -1.5, -2, -1.5, -1, 0, 0.3, 0.5, 0.7, 1, 3, 5, 8, 12, 16, 21, 26, 30, 25, 20, 15, 10, 5, 3];
powerupClips = new Array();
powerupMark = 650;
cloudMark = 400;
bushMark = 650;
vehicleMark = 1200;
cloudList = new Array();
bushList = new Array();
_root.background_mc.spaceBG._y = -4790;
_root.launchMeter._visible = true;
_root.gravMeter._visible = false;
initSounds();
if (cheats) {
Key.addListener(this);
}
initSO();
if (MUSIC_MUTE == true) {
_root.musicBtn.gotoAndStop(1);
sndTheme.setVolume(0);
sndEnding.setVolume(0);
sndPrelude.setVolume(0);
} else {
_root.musicBtn.gotoAndStop(2);
sndTheme.setVolume(MUSIC_VOL);
sndEnding.setVolume(MUSIC_VOL);
sndPrelude.setVolume(MUSIC_VOL);
}
_root.musicBtn.owner = this;
_root.musicBtn.onRelease = function () {
this.owner.toggleMusic();
};
_root.musicBtn.onRollOver = function () {
this.owner.clickFlag = true;
if (this.owner.MUSIC_MUTE == true) {
_root.muteMC.gotoAndStop("musicOff_RO");
} else {
_root.muteMC.gotoAndStop("musicOn_RO");
}
};
_root.musicBtn.onRollOut = function () {
this.owner.clickFlag = false;
if (this.owner.MUSIC_MUTE == true) {
_root.muteMC.gotoAndStop("musicOff");
} else {
_root.muteMC.gotoAndStop("musicOn");
}
};
playSound(sndPrelude, MUSIC_VOL, 9999);
preludeSound = true;
_root.scrollRect = new flash.geom.Rectangle(0, 0, 600, 400);
frCount = 0;
frArray = [];
timer = 0;
loadTracker();
}
function loadTracker() {
var _local1 = new Date().getTime();
loadMovieNum ("tracker.swf?" + _local1, 100000);
}
function onKeyUp() {
if (Key.getCode() == 39) {
blt.xvel = blt.xvel + 5;
}
if (Key.getCode() == 32) {
paused = !paused;
}
if (Key.getCode() == 49) {
slide = true;
}
if (freemode) {
blt.grav = 0;
if (Key.getCode() == 38) {
blt.yvel = blt.yvel + 5;
}
if (Key.getCode() == 40) {
blt.yvel = blt.yvel - 5;
}
if (Key.getCode() == 37) {
blt.xvel = blt.xvel - 5;
}
}
}
function initSounds() {
_$mc.createEmptyMovieClip("sounds", 10);
createSound("sndShoot", "snd_shoot", "shoot");
createSound("sndFly", "snd_fly", "fly");
createSound("sndWind", "snd_wind", "wind");
createSound("sndBounce", "snd_bounce", "bounce");
createSound("sndSuperbounce", "snd_superbounce", "superbounce");
createSound("sndHit", "snd_hit", "hit");
createSound("sndPickup", "snd_pickup", "pickup");
createSound("sndBump", "snd_bump", "bump");
createSound("sndSlide", "snd_slide", "slide");
createSound("sndSkid", "snd_skid", "skid");
createSound("sndGrav", "snd_wind", "grav");
createSound("sndPrelude", "snd_prelude", "prelude");
createSound("sndTheme", "snd_theme", "theme");
createSound("sndEnding", "snd_ending", "ending");
slideSound = false;
skidSound = false;
windSound = false;
gravSound = false;
preludeSound = false;
themeSound = false;
_root.muteMC.gotoAndStop(2);
}
function createSound(name, linkName, clipName) {
var _local2 = _$mc.sounds.createEmptyMovieClip(clipName, _$mc.sounds.getNextHighestDepth());
this[name] = new Sound(_local2);
this[name].attachSound(linkName);
}
function fadeOutSound(s) {
clearInterval(sndFadeInterval);
sndFadeInterval = setInterval(this, "doFade", 50, s);
}
function playSound(snd, vol, loops) {
snd.setVolume(vol);
if (!loops) {
loops = 0;
}
snd.start(0, loops);
}
function toggleMusic() {
MUSIC_MUTE = !MUSIC_MUTE;
if (MUSIC_MUTE == true) {
MUSIC_VOL = 0;
sndPrelude.setVolume(0);
sndTheme.setVolume(0);
sndEnding.setVolume(0);
_root.muteMC.gotoAndStop("musicOff");
} else {
MUSIC_VOL = 60;
sndPrelude.setVolume(MUSIC_VOL);
sndTheme.setVolume(MUSIC_VOL);
sndEnding.setVolume(MUSIC_VOL);
_root.muteMC.gotoAndStop("musicOn");
}
}
function doFade(s) {
var _local2 = s.getVolume() - 3;
s.setVolume(_local2);
if ((_local2 <= 0) || (MUSIC_MUTE == true)) {
s.stop();
clearInterval(sndFadeInterval);
}
}
function resetBtn() {
stopAllSounds();
resetSounds();
clearInterval(waitInt);
clearInterval(jumpInt);
clearInterval(bltInt);
_$mc.hamster._y = 956;
cam.zero();
reset();
}
function reset() {
cleanUp();
playSound(sndPrelude, MUSIC_VOL, 9999);
sndTheme.stop();
_root.launchMeter._visible = true;
_root.launchMeter.gotoAndStop(1);
_root.gravMeter._visible = false;
state = null;
turn = 1;
distances = new Array();
shooting = false;
faceplant = false;
shotNum = 0;
bltNum = 0;
bounce = false;
speed = false;
glide = false;
wind = false;
slide = false;
_root.skate_icon._visible = false;
falling = false;
var _local3 = 6;
while (_local3--) {
_root[("shotDistance" + _local3) + "_txt"].text = "= 0 ft.";
_root[("shotStatus" + _local3) + "_mc"].gotoAndStop(1);
}
_root.distanceTotal_txt.text = "";
_$mc.hamster._visible = true;
_$mc.hamster.gotoAndStop(1);
_$mc.hWalkOut2.gotoAndStop(1);
_$mc.hWalkOut2._x = 30.5;
_$mc.hWalkOut2._visible = true;
_$mc.hWalkOut3.gotoAndStop(1);
_$mc.hWalkOut3._x = 15.5;
_$mc.hWalkOut3._visible = true;
_$mc.hWalkOut4.gotoAndStop(1);
_$mc.hWalkOut4._x = 0.5;
_$mc.hWalkOut4._visible = true;
_$mc.hWalkOut5.gotoAndStop(1);
_$mc.hWalkOut5._x = -14.5;
_$mc.hWalkOut5._visible = true;
_root.gameOver_mc._visible = false;
_root.chalkboard_mc._visible = false;
_local3 = 6;
while (_local3--) {
_$mc["blt" + _local3].removeMovieClip();
}
powerupMark = 650;
cloudMark = 400;
bushMark = 650;
loadTracker();
}
function setScore() {
var _local3 = updateDistance();
distances.push(_local3);
_root[("shotStatus" + turn) + "_mc"].gotoAndStop("on");
_root[("shotDistance" + turn) + "_txt"].text = ("= " + _local3) + " ft.";
}
function updateGameState() {
turn++;
if (turn == 6) {
gameOver();
} else {
nextHamster();
}
}
function gameOver() {
shooting = true;
_root.gameOver_mc._visible = true;
_root.gameOver_mc.gotoAndPlay(2);
_root.gameOver_mc.mask_mc.gotoAndPlay(2);
_root.chalkboard_mc._visible = true;
sndPrelude.stop();
fadeOutSound(sndTheme);
playSound(sndEnding, MUSIC_VOL);
var _local7 = distances.length;
var _local4 = 0;
while (_local7--) {
_local4 = _local4 + Number(distances[_local7]);
}
_root.distanceTotal_txt.text = ("Total = " + _local4) + " ft.";
_root.gameOver_mc.distanceTotal_txt.text = _local4 + " ft.";
_root.gameOver_mc.finalScore_txt.text = _local4 + " ft.";
_local7 = distances.length;
var _local6 = "";
var _local3 = 0;
while (_local3 < _local7) {
_local6 = _local6 + (distances[_local3] + " ft. \r");
_local3++;
}
_local6 = _local6 + (_local4 + " ft.");
_root.gameOver_mc.shots_txt.text = _local6;
var _local5 = "You just need practice. Don't give up!";
if (_local4 >= 100) {
_local5 = "Keep trying -- you'll get the hang of it!";
}
if (_local4 >= 200) {
_local5 = "Not bad. Can you do even better?";
}
if (_local4 >= 300) {
_local5 = "Nice job!";
}
if (_local4 >= 400) {
_local5 = "Wow! You're a real pro!";
}
if (_local4 >= 600) {
_local5 = "That was totally sweet!";
}
if (_local4 >= 800) {
_local5 = "Hamsterrific!";
}
if (_local4 >= 1000) {
_local5 = "Incredible! You're the hamster champ!";
}
if (checkBestScore(_local4)) {
_local5 = _local5 + "\nYou got a new high score!";
saveBestScore(_local4);
}
_root.gameOver_mc.rating_txt.text = _local5;
}
function onUpdate() {
if (paused) {
return(undefined);
}
frCount++;
frArray.push(Math.floor(10 * (1 / ((getTimer() - timer) / 1000))) / 10);
if (frArray.length > 20) {
frArray.shift();
}
timer = getTimer();
if (frCount > 20) {
frCount = 0;
var _local3 = frArray.length;
var _local4 = 0;
while (_local3--) {
_local4 = _local4 + frArray[_local3];
}
_root.framerate = _local4 / 20;
}
var _local8 = bc._y;
generatePowerups();
generateClouds();
generateBushes();
checkPowerUpsColl();
checkCollision();
if (wind) {
blt.yvel = blt.yvel - 8;
blt.xvel = blt.xvel + 2;
bc.flying_mc._visible = false;
wind = false;
if (!windSound) {
playSound(sndWind, SFX_VOLUME);
windSound = true;
} else {
windSound = false;
}
}
if (gravOn) {
grav = grav - 2;
gravOn = false;
if (!gravSound) {
playSound(sndGrav, SFX_VOLUME);
gravSound = true;
} else {
gravSound = false;
}
}
if (speed) {
blt.xvel = blt.xvel + 20;
speed = false;
}
if (rebound) {
blt.xvel = 40;
blt.yvel = -40;
rebound = false;
blt.doRotation = true;
bc.slide._visible = false;
bc.skid._visible = false;
bc.flying_mc._visible = true;
sndSlide.stop();
slideSound = false;
blt.hit = false;
}
if (slide && (skidding)) {
blt.doRotation = false;
bc.slide._visible = true;
bc.slide.play();
_root.skate_icon._visible = false;
if (!slideSound) {
playSound(sndSlide, SFX_VOLUME, 9999);
sndFly.setVolume(5);
slideSound = true;
} else {
var _local5 = Math.abs(blt.xvel);
_local5 = Math.floor(_local5);
var _local7 = Math.floor((_local5 / 20) * 100);
sndSlide.setVolume(_local7);
}
} else if (skidding) {
blt.doRotation = false;
bc.skid._visible = true;
bc.flying_mc._visible = false;
if (!skidSound) {
playSound(sndSkid, SFX_VOLUME);
sndFly.setVolume(5);
skidSound = true;
}
} else {
var _local5 = Math.abs(blt.xvel) + Math.abs(blt.yvel);
_local5 = Math.floor(_local5);
var _local7 = Math.floor((_local5 / 70) * 100);
sndFly.setVolume(_local7);
}
if (glide) {
if (falling || (gravPoints == 0)) {
glide = false;
glideOff();
}
}
blt.xvel = blt.xvel * 0.99;
if (!freemode) {
blt.yvel = blt.yvel + blt.grav;
}
if ((blt.yvel > 50) && ((!bounce) & (!superbounce))) {
if (falling == false) {
fallOn();
falling = true;
}
} else if (falling == true) {
falling = false;
fallOff();
}
if (blt.hit) {
var _local6 = bc._y;
if (((_local6 >= 946) && (_local8 >= 946)) && ((_local6 + blt.yvel) >= 946)) {
skidding = true;
}
}
blt.update();
cam.doFollow(bc);
if ((blt.xvel < 1) && (blt.hit)) {
onShotDone();
}
if (gravButton) {
gravPoints = gravPoints - 10;
if (gravPoints <= 0) {
gravPoints = 0;
blt.restoreGravity();
}
} else {
gravPoints++;
if (gravPoints > gravPointsMax) {
gravPoints = gravPointsMax;
}
}
updateGravMeter();
}
function fallOn() {
bc.drop._visible = true;
bc.drop.gotoAndPlay(2);
bc.flying_mc._visible = false;
}
function fallOff() {
bc.drop._visible = false;
bc.drop.gotoAndStop(1);
bc.flying_mc._visible = true;
}
function updateGravMeter() {
var _local3 = 1 + Math.floor((100 * gravPoints) / gravPointsMax);
_root.gravMeter.gotoAndStop(_local3);
}
function checkPowerUpsColl(Void) {
var _local5 = cam.getCameraPos().x;
var _local4 = 0;
while (_local4 < powerupClips.length) {
var _local3 = powerupClips[_local4];
if ((_$mc._x + _local3._x) < -100) {
_local3.removeMovieClip();
powerupClips.shift();
} else {
switch (_local3.typ) {
case "bounce" :
if (_local3.core.hitTest(bc.core) && (!bounce)) {
bc.ball._visible = true;
bc.superball._visible = false;
bc.drop._visible = false;
bc.ball.gotoAndPlay(2);
bounce = true;
superbounce = false;
falling = false;
fallOff();
playSound(sndPickup, SFX_VOLUME);
_local3.play();
}
break;
case "superbounce" :
if (_local3.core.hitTest(bc.core) && (!superbounce)) {
bc.ball._visible = false;
bc.superball._visible = true;
bc.drop._visible = false;
bc.superball.gotoAndPlay(2);
bounce = false;
superbounce = true;
falling = false;
fallOff();
playSound(sndPickup, SFX_VOLUME);
_local3.play();
}
break;
case "speed" :
if (_local3.core.hitTest(bc.core)) {
bc.blur._visible = true;
bc.flying_mc._visible = false;
bc.glide._visible = false;
bc.drop._visible = false;
bc.wind._visible = false;
bc.blur.gotoAndPlay(2);
speed = true;
_local3.play();
}
break;
case "wind" :
if (_local3.core.hitTest(bc.core)) {
if (!glide) {
bc.wind._visible = true;
bc.flying_mc._visible = false;
}
bc.drop._visible = false;
bc.blur._visible = false;
bc.wind.play();
wind = true;
}
break;
case "slide" :
if (_local3.core.hitTest(bc.core) && (!slide)) {
playSound(sndPickup, SFX_VOLUME);
slide = true;
_root.skate_icon._visible = true;
_local3.play();
}
break;
case "rebound" :
if (!(_local3.core.hitTest(bc.core) && (!rebound))) {
break;
}
rebound = true;
if (slide && (skidding)) {
slide = false;
}
skidding = false;
bc.slide.stop();
bc.slide._visible = false;
falling = false;
fallOff();
_local3.play();
}
}
_local4++;
}
}
function checkCollision() {
var _local6 = bc._y + blt.yvel;
if (rebound) {
return(undefined);
}
if (_local6 >= 950) {
bc._y = 950;
blt.hit = true;
if (glide) {
glide = false;
glideOff();
}
var _local10 = bc._x - blt.ox;
var _local9 = _local6 - blt.oy;
var _local2 = Math.atan2(_local9, _local10);
_local2 = radainsToDegrees(_local2);
var _local5 = 70;
if ((((_local2 < _local5) && (!bounce)) && (!superbounce)) && (!slide)) {
bc._y = 949;
blt.xvel = blt.xvel * f;
blt.yvel = blt.yvel / -2;
if (!skidding) {
_$mc.bg_mc.bounce.removeMovieClip();
var _local3 = _$mc.bg_mc.attachMovie("bounce_fx", "bounce", 900000);
_local3._x = 155 - cam.getCameraPos().x;
_local3._y = 955;
bushCount++;
playSound(sndBump, SFX_VOLUME);
}
} else if (bounce) {
bc._y = 949;
blt.xvel = blt.xvel * f;
blt.yvel = blt.yvel * -0.6;
if (blt.yvel > -30) {
blt.yvel = -30;
}
bc.ball._visible = false;
bc.drop._visible = false;
bc.flying_mc._visible = true;
playSound(sndBounce, SFX_VOLUME);
var _local3 = _$mc.bg_mc.attachMovie("break", "shatter", 900000);
_local3._x = 165 - cam.getCameraPos().x;
_local3._y = 955;
bounce = false;
blt.hit = false;
} else if (superbounce) {
bc._y = 949;
blt.xvel = blt.xvel * (1 + f);
blt.yvel = blt.yvel * -1.5;
if (blt.yvel > -50) {
blt.yvel = -50;
}
bc.superball._visible = false;
bc.drop._visible = false;
bc.flying_mc._visible = true;
playSound(sndSuperbounce, SFX_VOLUME);
var _local3 = _$mc.bg_mc.attachMovie("super_break", "shatter", 900000);
_local3._x = 165 - cam.getCameraPos().x;
_local3._y = 955;
superbounce = false;
blt.hit = false;
} else if (_local2 > _local5) {
bc._y = 950;
blt.xvel = 0;
blt.yvel = 0;
var _local8 = bc._x;
var _local7 = bc._y;
var _local4 = bc._rotation;
sndFly.stop();
faceplant = true;
if (falling == true) {
createHitClip(_local8, _local7, _local4, "hole");
blt.shadClip._visible = false;
} else {
createHitClip(_local8, _local7 + 3, _local4, "faceplant");
playSound(sndHit, SFX_VOLUME);
blt.shadClip._visible = false;
}
} else if (slide && (!skidding)) {
bc._y = 950;
blt.xvel = blt.xvel * slidef;
blt.yvel = blt.yvel / -2;
playSound(sndBump, SFX_VOLUME);
} else if (slide && (skidding)) {
bc._y = 950;
blt.xvel = blt.xvel * slidef;
blt.yvel = blt.yvel / -2;
} else {
bc._y = 950;
blt.xvel = blt.xvel * f;
blt.yvel = blt.yvel / -2;
if (!skidding) {
playSound(sndBump, SFX_VOLUME);
}
}
falling = false;
}
}
function glideOn() {
bc.glide._visible = true;
bc.flying_mc._visible = false;
bc.blur._visible = false;
bc.wind._visible = false;
bc.glide.gotoAndPlay(2);
}
function glideOff() {
bc.glide._visible = false;
if ((bc.wind._visible != true) && (bc.blur._visible != true)) {
bc.flying_mc._visible = true;
} else {
bc.flying_mc._visible = false;
}
bc.glide.gotoAndStop(1);
}
function updateDistance() {
var _local2 = Math.floor(blt.bltClip._x / 100);
if (isNaN(_local2)) {
_local2 = 0;
}
return(_local2);
}
function updateBestDistance() {
if (bc._x > Number(_$mc.best_txt.text)) {
return(Math.floor(bc._x));
}
return(Number(_$mc.best_txt.text));
}
function resetSounds() {
sndFly.stop();
sndSlide.stop();
sndFly.setVolume(100);
sndSlide.setVolume(100);
sndSkid.setVolume(100);
skidSound = false;
slideSound = false;
windSound = false;
}
function onShotDone() {
clearInterval(bltInt);
blt.deleteBlt();
resetSounds();
if ((!faceplant) && (!falling)) {
var _local4 = bc._x;
var _local3 = bc._y;
var _local2 = bc._rotation;
createHitClip(_local4, _local3, _local2, "cheer");
}
blt.shadClip._visible = false;
}
function onDone() {
blt = undefined;
slide = false;
_root.skate_icon._visible = false;
skidding = false;
_$mc.hamster._x = 148;
_$mc.hamster._y = 956;
_root.background_mc.pillow._x = 117.3;
_$mc.pillow._x = 117.3;
updateGameState();
cleanUpItems();
}
function nextHamster() {
if (!preludeSound) {
playSound(sndPrelude, MUSIC_VOL, 9999);
}
fadeOutSound(sndTheme);
preludeSound = true;
_root.launchMeter._visible = true;
_root.launchMeter.gotoAndStop(1);
_root.gravMeter._visible = false;
_$mc.hamster._visible = false;
_$mc["hWalkOut" + turn].play();
var _local4 = turn + 1;
var _local3 = _local4;
while (_local3 <= 5) {
_$mc["hWalkOut" + _local3].gotoAndPlay("walkUp");
_local3++;
}
updateGravMeter();
}
function createHitClip(x, y, rot, type, dpth) {
var _local2 = "hit_" + type;
var _local3 = ((dpth == undefined) ? (bltNum) : (100 + bltNum));
hitClip = _$mc.attachMovie(_local2, "blt" + bltNum, _local3);
hitClip._rotation = 90;
hitClip._x = x;
hitClip._y = y;
}
function onMouseDown() {
if (clickFlag == true) {
return(undefined);
}
if ((state == null) && (!shooting)) {
state = "jump";
_$mc.hamster.gotoAndPlay("jump");
_root.background_mc.gotoAndPlay(2);
_root.background_mc.hamsterWheel1.play();
_root.background_mc.hamsterWheel2.play();
} else if ((state == "jump") && (!shooting)) {
_root.background_mc.nextFrame();
_root.background_mc.hamsterWheel1.gotoAndStop(1);
_root.background_mc.hamsterWheel2.gotoAndStop(1);
state = "launch";
playSound(sndShoot, SFX_VOLUME);
launch();
} else if (shooting && (!skidding)) {
blt.increaseGravity();
gravButton = true;
if ((glide == false) && (falling == false)) {
glide = true;
glideOn();
}
}
}
function onMouseUp() {
if (shooting) {
blt.restoreGravity();
gravButton = false;
if (glide == true) {
glide = false;
glideOff();
}
}
}
function jump() {
bltNum++;
yvel = (random(5) + 10) * -1;
boost = false;
if (jumpInt) {
clearInterval(jumpInt);
}
jumpInt = setInterval(this, "jumpFrame", 50);
}
function jumpFrame() {
if ((!boost) && (_$mc.hamster._y < 930)) {
var _local4 = random(5) + 15;
_local4 = _local4 * -1;
yvel = yvel + _local4;
boost = true;
}
var _local5 = ((yvel >= 0) ? 0.75 : 1.5);
yvel = yvel + _local5;
_$mc.hamster._y = _$mc.hamster._y + yvel;
if (_$mc.hamster._y >= 956) {
clearInterval(jumpInt);
state = null;
_$mc.hamster._y = 956;
_$mc.hamster.gotoAndStop(1);
_$mc.hamster._visible = false;
playSound(sndHit, SFX_VOLUME);
shooting = true;
faceplant = true;
createHitClip(140, 970, 90, "zero", true);
}
if (yvel > 0) {
_root.launchMeter.arrow._rotation = 180;
} else {
_root.launchMeter.arrow._rotation = 0;
}
var _local3 = 48 + (0.35417 * (_$mc.hamster._y - 715));
if (_local3 > 100) {
_local3 = 100;
}
if (_local3 < 10) {
_local3 = 10;
}
_root.launchMeter.arrow._y = _local3;
cam.doFollow(_$mc.hamster);
}
function launch() {
_$mc.pillow._x = 140;
getPillowCollision();
}
function getPillowCollision() {
if (_$mc.hamster.core.hitTest(_$mc.pillow)) {
if (_$mc.hamster._y > 759) {
_$mc.hamster._y = 759;
yvel = 0;
}
clearInterval(jumpInt);
var _local4 = (_$mc.hamster._x - _$mc.pillow._x) + 30;
var _local3 = (_$mc.hamster._y - _$mc.pillow._y) - 5;
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
ar = Math.atan2(_local3, _local4);
ad = ((ar * 180) / pi) + 90;
ar = (ad * pi) / 180;
_$mc.hamster.gotoAndStop(1);
_$mc.hamster._visible = false;
shoot(_local5, ar);
} else {
_root.background_mc.gotoAndPlay("miss");
}
}
function shoot(f, a) {
sndPrelude.stop();
playSound(sndTheme, MUSIC_VOL, 9999);
preludeSound = false;
themeSound = true;
_root.launchMeter._visible = false;
_root.gravMeter._visible = true;
var _local6 = yvel;
var _local3 = 90 - f;
if (_local6 < 0) {
if (ad <= 90) {
_local3 = _local3 - (yvel / 2);
} else {
_local3 = _local3 + (yvel / 2);
}
}
faceplant = false;
shooting = true;
var _local4 = _$mc.hamster._x;
var _local5 = _$mc.hamster._y;
blt = new Bullet(_$mc, _local4, _local5, "arrow", _local3, ar, 0.99, bltNum);
bc = blt.bltClip;
setCamFollow();
playSound(sndFly, SFX_VOLUME, 9999);
gravPoints = gravPointsMax;
updateGravMeter();
bltInt = setInterval(this, "onUpdate", 50);
}
function cleanUp(Void) {
shooting = false;
state = null;
tick = 0;
glideCnt = 0;
}
function testShoot(y, f) {
_$mc.hamster.gotoAndStop("testFrame");
_$mc.hamster._y = y;
yvel = f;
launch();
}
function setCamFollow() {
cam.setCamMode("follow");
cam.setQuickPanSpeed(2);
cam.follow("blt" + bltNum);
}
function setCamReset() {
clearInterval(waitInt);
cam.setCamMode("qpan");
cam.setQuickPanSpeed(2);
cam.reset();
}
function degreesToRadians(degrees) {
var _local2 = (degrees * pi) / 180;
return(_local2);
}
function radainsToDegrees(radians) {
var _local2 = (radians * 180) / pi;
return(_local2);
}
function generateClouds() {
var _local4 = cam.getCameraPos();
var _local3 = _local4.x;
var _local9 = _local4.y;
if (cloudList[0]._x < (-120 - _local3)) {
var _local8 = cloudList.shift();
_local8.removeMovieClip();
}
if ((600 - _local3) < cloudMark) {
return(undefined);
}
var _local6 = 700 - random(3600);
var _local7 = random(3) + 1;
var _local5 = "c" + cloudCount;
var _local2 = _$mc.bg_mc.attachMovie("cloud" + _local7, _local5, 10000 + cloudCount);
cloudList.push(_local2);
_local2.cacheAsBitmap = true;
_local2._x = 800 - _local3;
_local2._y = _local6;
cloudCount++;
cloudMark = cloudMark + (100 + random(200));
}
function generateBushes() {
var _local4 = cam.getCameraPos();
var _local3 = _local4.x;
var _local8 = _local4.y;
if (bushList[0]._x < (-100 - _local3)) {
var _local7 = bushList.shift();
_local7.removeMovieClip();
}
if ((600 - _local3) < bushMark) {
return(undefined);
}
var _local6 = random(5) + 1;
var _local5 = "c" + bushCount;
var _local2 = _$mc.bg_mc.attachMovie("bush" + _local6, _local5, 20000 + bushCount);
bushList.push(_local2);
_local2.cacheAsBitmap = true;
_local2._x = 800 - _local3;
_local2._y = 885;
bushCount++;
bushMark = bushMark + (300 + random(300));
}
function generatePowerups() {
var _local4 = cam.getCameraPos();
var _local5 = _local4.x;
var _local6 = _local4.y;
if ((600 - _local5) < powerupMark) {
return(undefined);
}
powerupMark = powerupMark + 150;
powerupCount++;
var _local3 = random(11);
var _local2;
switch (_local3) {
case 0 :
case 1 :
_local2 = _$mc.opp_mc.attachMovie("_bounce", "bounce" + bounceNum, powerupCount);
_local2.typ = "bounce";
bounceNum++;
break;
case 2 :
case 3 :
case 4 :
_local2 = _$mc.opp_mc.attachMovie("_speed", "speed" + speedNum, powerupCount);
_local2.cacheAsBitmap = true;
_local2.typ = "speed";
speedNum++;
break;
case 5 :
case 6 :
case 7 :
_local2 = _$mc.opp_mc.attachMovie("_wind", "wind" + windNum, powerupCount);
_local2.typ = "wind";
windNum++;
break;
case 8 :
_local2 = _$mc.opp_mc.attachMovie("_slide", "slide" + slideNum, powerupCount);
_local2.cacheAsBitmap = true;
_local2.typ = "slide";
slideNum++;
break;
case 9 :
_local2 = _$mc.opp_mc.attachMovie("_rebound", "rebound" + reboundNum, powerupCount);
_local2.cacheAsBitmap = true;
_local2.typ = "rebound";
reboundNum++;
break;
case 10 :
_local2 = _$mc.opp_mc.attachMovie("_superbounce", "superbounce" + superbounceNum, powerupCount);
_local2.typ = "superbounce";
superbounceNum++;
}
_local2._x = 800 - _local5;
if (_local3 == 9) {
_local2._y = 930;
} else {
_local2._y = 840 - random(1200);
}
powerupClips.push(_local2);
}
function generateVehicle() {
var _local3 = cam.getCameraPos();
var _local4 = _local3.x;
var _local6 = _local3.y;
if ((600 - _local4) < vehicleMark) {
return(undefined);
}
vehicleMark = vehicleMark + 1200;
vCount++;
var _local5 = random(2);
var _local2;
switch (_local5) {
case 0 :
_local2 = _$mc.bg_mc.attachMovie("v_bus", "vehicle", 15000);
break;
case 1 :
_local2 = _$mc.bg_mc.attachMovie("v_scamper", "vehicle", 15000);
break;
case 2 :
_local2 = _$mc.bg_mc.attachMovie("v_plane", "vehicle", 15000);
}
_local2._x = 800 - _local4;
_local2._y = 840 - random(1200);
}
function cleanUpItems() {
var _local3 = powerupClips.length;
while (_local3--) {
var _local2 = powerupClips.pop();
_local2.removeMovieClip();
}
_local3 = cloudList.length;
while (_local3--) {
var _local2 = cloudList.pop();
_local2.removeMovieClip();
}
_local3 = bushList.length;
while (_local3--) {
var _local2 = bushList.pop();
_local2.removeMovieClip();
}
bounceNum = 0;
speedNum = 0;
glideNum = 0;
windNum = 0;
slideNum = 0;
powerupMark = 600;
bushMark = 650;
cloudMark = 400;
}
function plotNodes(oXML) {
var _local7 = nodesXML.getNode(["bounce"]).childNodes;
var _local2 = _local7.length;
var _local8 = 0;
while (_local2--) {
var _local3 = "bounce" + _local2;
var _local6 = _local7[_local2].attributes.x;
var _local5 = _local7[_local2].attributes.y;
var _local4 = _$mc.opp_mc.attachMovie("_bounce", _local3, _local8 + _local2);
_local4._x = _local6;
_local4._y = _local5 - 1000;
_local4.typ = "bounce";
bounceNum++;
}
_local7 = nodesXML.getNode(["speed"]).childNodes;
_local2 = _local7.length;
_local8 = 50;
while (_local2--) {
var _local3 = "speed" + _local2;
var _local6 = _local7[_local2].attributes.x;
var _local5 = _local7[_local2].attributes.y;
var _local4 = _$mc.opp_mc.attachMovie("_speed", _local3, _local8 + _local2);
_local4._x = _local6;
_local4._y = _local5 - 1000;
_local4.typ = "speed";
speedNum++;
}
_local7 = nodesXML.getNode(["glide"]).childNodes;
_local2 = _local7.length;
_local8 = 100;
while (_local2--) {
var _local3 = "glide" + _local2;
var _local6 = _local7[_local2].attributes.x;
var _local5 = _local7[_local2].attributes.y;
var _local4 = _$mc.opp_mc.attachMovie("_glide", _local3, _local8 + _local2);
_local4._x = _local6;
_local4._y = _local5 - 1000;
_local4.typ = "glide";
glideNum++;
}
_local7 = nodesXML.getNode(["wind"]).childNodes;
_local2 = _local7.length;
_local8 = 150;
while (_local2--) {
var _local3 = "wind" + _local2;
var _local6 = _local7[_local2].attributes.x;
var _local5 = _local7[_local2].attributes.y;
var _local4 = _$mc.opp_mc.attachMovie("_wind", _local3, _local8 + _local2);
_local4._x = _local6;
_local4._y = _local5 - 1000;
windNum++;
}
_local7 = nodesXML.getNode(["slide"]).childNodes;
_local2 = _local7.length;
_local8 = 200;
while (_local2--) {
var _local3 = "slide" + _local2;
var _local6 = _local7[_local2].attributes.x;
var _local5 = _local7[_local2].attributes.y;
var _local4 = _$mc.opp_mc.attachMovie("_slide", _local3, _local8 + _local2);
_local4._x = _local6;
_local4._y = _local5 - 1000;
_local4.typ = "slide";
slideNum++;
}
_local7 = nodesXML.getNode(["ring"]).childNodes;
_local2 = _local7.length;
_local8 = 250;
_$mc.createEmptyMovieClip("ringFront_mc", 5000);
while (_local2--) {
var _local3 = "ring" + _local2;
var _local6 = _local7[_local2].attributes.x;
var _local5 = _local7[_local2].attributes.y;
var _local4 = _$mc.ringFront_mc.attachMovie("_ring", _local3, _local8 + _local2);
_local4._x = _local6;
_local4._y = _local5 - 1000;
_local4 = _$mc.opp_mc.attachMovie("_ringBack", _local3, _local8 + _local2);
_local4._x = _local6;
_local4._y = _local5 - 1000;
}
}
function getPos() {
_root.pos_txt.text = (Math.floor(bc._x) + ", ") + Math.floor(bc._y);
}
function initSO(Void) {
_so = new CartoonSO("HamsterLaunch");
if (_so._info._bestScore == undefined) {
_so._info._bestScore = 0;
_so._info._careerScore = 0;
}
_bestScore = _so._info._bestScore;
}
function checkBestScore(s) {
if (s > _bestScore) {
return(true);
}
return(false);
}
function saveBestScore(s) {
_bestScore = s;
_so._info._bestScore = _bestScore;
}
var cheats = false;
var paused = false;
var freemode = false;
var MUSIC_MUTE = false;
var MUSIC_VOL = 80;
var SFX_VOLUME = 100;
var pi = 3.141593;
var f = 0.6;
var slidef = 0.99;
var hit = false;
var falling = false;
var clickFlag = false;
}
Symbol 507 MovieClip [__Packages.Bullet] Frame 0
class Bullet
{
var mcBase, xpos, ypos, mcName, vel, ang, grav, num, doRotation, xvel, yvel, ox, bltClip, oy, shadClip;
function Bullet (base, x, y, name, velocity, angle, gravity, bNumber) {
mcBase = base;
xpos = x;
ypos = y;
mcName = name;
vel = velocity;
ang = angle;
grav = gravity;
num = ((bNumber == undefined) ? 1 : (bNumber));
doRotation = true;
init();
}
function init(Void) {
createClip();
setClipPos();
xvel = Math.sin(ang) * vel;
yvel = (-Math.cos(ang)) * vel;
}
function update() {
ox = bltClip._x;
oy = bltClip._y;
var _local2 = Math.atan2(yvel, xvel);
_local2 = radainsToDegrees(_local2);
if (((xvel < 7) && (bltClip._y > 940)) || (doRotation == false)) {
_local2 = 0;
}
bltClip._rotation = _local2 + 90;
bltClip._x = bltClip._x + xvel;
bltClip._y = bltClip._y + yvel;
shadClip._x = bltClip._x;
shadClip._y = 963;
var _local3 = (100 * (bltClip._y - 700)) / 263;
shadClip._xscale = (shadClip._yscale = _local3);
}
function increaseGravity(n) {
grav = -0.17 * xvel;
}
function restoreGravity() {
grav = 0.99;
}
function deleteBlt() {
}
function createClip(Void) {
bltClip = mcBase.attachMovie(mcName, "blt" + num, num);
shadClip = mcBase.attachMovie("shadow", "shadow_mc", 0);
}
function setClipPos(Void) {
bltClip._x = xpos;
bltClip._y = ypos;
bltClip._rotation = ang;
}
function degreesToRadians(degrees) {
var _local2 = (degrees * pi) / 180;
return(_local2);
}
function radainsToDegrees(radians) {
var _local2 = (radians * 180) / pi;
return(_local2);
}
function toString() {
return("Bullet:" + bltClip);
}
var hit = false;
var pi = 3.141593;
}
Symbol 508 MovieClip [__Packages.GameCamera] Frame 0
class GameCamera
{
var _$mc, camHeight, camWidth, dis, gameClipRect, bgClipRect, moveInt, qpan_time, panAngle, xvel, yvel, delta, target, pan_speed, moving, newTarget, mode;
function GameCamera (gameClip, cWidth, cHeight) {
_$mc = gameClip;
camHeight = cHeight;
camWidth = cWidth;
dis = new MyDispatcher();
if (clipper == true) {
gameClipRect = new flash.geom.Rectangle(0, 600, 600, 400);
bgClipRect = new flash.geom.Rectangle(0, 0, 600, 400);
_$mc._y = _$mc._y + 600;
_$mc.scrollRect = gameClipRect;
_root.background_mc.scrollRect = bgClipRect;
}
}
function reset() {
clearInterval(moveInt);
qpan_time = 2;
quickPanTo(300, 800);
}
function zero() {
cameraX = 0;
cameraY = 0;
_$mc._x = 0;
_$mc._y = -600;
_root.background_mc._x = 0;
_root.background_mc._y = 0;
}
function follow(targClip) {
var _local3 = _$mc[targClip]._x;
var _local2 = _$mc[targClip]._y;
if (moveInt != undefined) {
clearInterval(moveInt);
}
}
function doFollow(targClip) {
var _local3 = (-targClip._x) + 150;
var _local5 = (-targClip._y) + 200;
if (_local3 < 0) {
_$mc._x = _local3;
}
if (_local5 > -600) {
_$mc._y = _local5;
} else {
_$mc._y = -600;
}
if ((_local3 > -650) && (_local3 <= 0)) {
_root.background_mc._x = _local3;
}
if (_local5 < 4170) {
var _local4 = _local5 + 600;
if ((_local4 < 0) && (_local4 < 1)) {
_local4 = 0;
}
_root.background_mc._y = _local4;
}
if (_$mc._y > 3300) {
_root.background_mc.spaceBG.stars._x = 665 + (_$mc._x % 705);
_root.background_mc.spaceBG.stars._y = -320 + (_$mc._y % 282);
}
updateHills();
}
function getCameraPos() {
return({x:_$mc._x, y:_$mc._y});
}
function panTo(x, y, targClip) {
if (targClip != undefined) {
var _local3 = _$mc[targClip]._x;
var _local2 = _$mc[targClip]._y;
} else {
var _local3 = x;
var _local2 = y;
}
panAngle = getPanAngle(_local3, _local2);
xvel = Math.sin(panAngle) * 20;
yvel = (-Math.cos(panAngle)) * 20;
delta = getDelta(_local3, _local2);
if (moveInt != undefined) {
clearInterval(moveInt);
}
moveInt = setInterval(this, "doPanTo", 50, _local3, _local2);
}
function quickPanTo(x, y, targClip) {
if (targClip != undefined) {
var _local3 = _$mc[targClip]._x;
var _local2 = _$mc[targClip]._y;
target = _$mc[targClip];
} else {
var _local3 = x;
var _local2 = y;
}
panAngle = getPanAngle(_local3, _local2);
xvel = Math.floor(Math.cos(panAngle) * qpan_time);
yvel = Math.floor(Math.sin(panAngle) * qpan_time);
delta = getDelta(_local3, _local2);
cameraTargetX = -_$mc._x;
cameraTargetY = -_$mc._y;
if (moveInt != undefined) {
clearInterval(moveInt);
}
moveInt = setInterval(this, "doQuickPanTo", 50, _local3, _local2);
}
function doPanTo(x, y) {
var _local6 = (_$mc._x - (camWidth / 2)) * -1;
var _local4 = (_$mc._y - (camHeight / 2)) * -1;
var _local10 = x;
var _local9 = y;
var _local3 = _local6 - x;
var _local2 = _local4 - y;
var _local5 = Math.floor(Math.sqrt((_local3 * _local3) + (_local2 * _local2)));
_$mc._x = _$mc._x + (-xvel);
if (_local5 < pan_speed) {
moving = false;
target = newTarget;
_$mc._x = (-x) + (camWidth / 2);
_$mc._y = (-y) + (camHeight / 2);
clearInterval(moveInt);
}
}
function doQuickPanTo(x, y) {
var _local7 = (_$mc._x - (camWidth / 2)) * -1;
var _local5 = (_$mc._y - (camHeight / 2)) * -1;
var _local11 = x;
var _local10 = y;
var _local4 = _local7 - x;
var _local3 = _local5 - y;
var _local6 = Math.floor(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
cameraTargetX = cameraTargetX - (_local4 / qpan_time);
cameraTargetY = cameraTargetY - (_local3 / qpan_time);
_$mc._x = -cameraTargetX;
_$mc._y = -cameraTargetY;
if (cameraTargetX < 600) {
_root.background_mc._x = -cameraTargetX;
}
if (_local6 < 2) {
if (mode == "follow") {
clearInterval(moveInt);
moveInt = setInterval(this, "doFollow", 50, target);
} else {
clearInterval(moveInt);
moving = false;
target = newTarget;
_$mc._x = (-x) + (camWidth / 2);
_$mc._y = (-y) + (camHeight / 2);
dis.disOnDone();
}
}
updateHills();
}
function updateHills() {
_root.background_mc.ground.hills._x = ((-_root.background_mc._x) - 1249) + (0.025 * _$mc._x);
var _local3 = (-1.05 * _$mc._y) - 950;
if (_local3 < -390) {
_local3 = -390;
}
_root.background_mc.ground.hills._y = _local3;
}
function getDelta(x, y) {
var _local3 = _$mc._x - x;
var _local2 = _$mc._y - y;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
return(_local4);
}
function getPanAngle(x, y) {
var _local2 = Math.atan2(y - _$mc._y, x - _$mc._x);
return(_local2);
}
function moveToTarget(mcTarget) {
}
function setCamMode(cMode, args) {
mode = cMode;
}
function setPanSpeed(pSpeed) {
pan_speed = pSpeed;
}
function setQuickPanSpeed(n) {
qpan_time = n;
}
var cameraTargetX = 0;
var cameraTargetY = 0;
var cameraX = 0;
var cameraY = 0;
var clipper = false;
}
Symbol 509 MovieClip [__Packages.MyDispatcher] Frame 0
class MyDispatcher
{
var dispatchEvent;
function MyDispatcher () {
mx.events.EventDispatcher.initialize(this);
}
function disOnDone() {
dispatchEvent({type:"onDone"});
}
function disOnUpdate() {
dispatchEvent({type:"onUpdate"});
}
}
Symbol 510 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 511 MovieClip [__Packages.XML_Loader] Frame 0
class XML_Loader extends XML
{
var ignoreWhite, parseXML, _callbackFunction, _callbackParent, load, firstChild;
function XML_Loader (sXML) {
super();
ignoreWhite = true;
if (sXML) {
parseXML(sXML);
}
}
function setXML(sXML) {
parseXML(sXML);
}
function getXML(sURL, callbackParent, callbackFunction) {
_callbackFunction = callbackFunction;
_callbackParent = callbackParent;
load(sURL);
}
function onLoad(success) {
if (success) {
} else {
_root.onError("Could not load XML");
}
_callbackParent[_callbackFunction].apply(_callbackParent, [this]);
}
function getNode(nodeNamesAr) {
var _local5;
var _local3 = nodeNamesAr.shift();
var _local2 = firstChild.firstChild;
while (_local2 != null) {
if (_local2.nodeName == _local3) {
if (nodeNamesAr.length == 0) {
_local5 = _local2;
break;
}
_local2 = _local2.firstChild;
_local3 = nodeNamesAr.shift();
} else {
_local2 = _local2.nextSibling;
}
}
return(_local5);
}
}
Symbol 512 MovieClip [__Packages.CartoonSO] Frame 0
class CartoonSO
{
var _$gameName, _$so;
function CartoonSO (gName) {
_$gameName = gName;
_$so = SharedObject.getLocal(_$USERS_SO, _$USERS_SO_PATH);
}
function get _info() {
if (_$so.data[_$gameName] == undefined) {
_$so.data[_$gameName] = {};
}
return(_$so.data[_$gameName]);
}
static var _$USERS_SO = "CN_users";
static var _$USERS_SO_PATH = "/";
}
Symbol 51 MovieClip Frame 4
this.gotoAndPlay(1);
Symbol 52 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 23
var sndJump = new Sound();
sndJump.attachSound("snd_jump");
sndJump.start();
sndJump.onSoundComplete = function () {
delete sndJump;
};
Symbol 52 MovieClip Frame 28
this.core._visible = false;
this._y = this._y - 117.8;
_root.hamsterShoot.jump();
stop();
Symbol 52 MovieClip Frame 36
stop();
Symbol 53 MovieClip Frame 1
stop();
Symbol 53 MovieClip Frame 15
stop();
_root.hamsterShoot.cleanUp();
this._visible = false;
_parent.hamster._visible = true;
_parent.hamster.gotoAndStop(1);
Symbol 53 MovieClip Frame 26
this._x = this._x + 15;
this.gotoAndStop(1);
Symbol 54 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 15
stop();
_parent.hamster._visible = true;
_parent.hamster.gotoAndStop(1);
this._visible = false;
Symbol 81 MovieClip Frame 1
stop();
Symbol 114 MovieClip Frame 1
stop();
Symbol 114 MovieClip Frame 33
this.gotoAndStop(1);
Symbol 116 MovieClip Frame 1
stop();
Symbol 116 MovieClip Frame 30
this.gotoAndStop(1);
Symbol 145 MovieClip Frame 1
stop();
Symbol 145 MovieClip Frame 4
stop();
Symbol 145 MovieClip Frame 5
play();
Symbol 145 MovieClip Frame 7
this.gotoAndStop(1);
Symbol 145 MovieClip Frame 49
gotoAndStop (1);
Symbol 149 MovieClip [break] Frame 4
stop();
Symbol 153 MovieClip [super_break] Frame 4
stop();
Symbol 161 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 12
_parent.flying_mc._visible = true;
this._visible = false;
this.gotoAndStop(1);
Symbol 177 MovieClip Frame 1
stop();
Symbol 177 MovieClip Frame 11
gotoAndStop (1);
Symbol 181 MovieClip [bounce_fx] Frame 4
stop();
Symbol 209 MovieClip [dot] Frame 11
this.removeMovieClip();
Symbol 213 MovieClip Frame 1
stop();
Symbol 213 MovieClip Frame 62
stop();
Symbol 235 MovieClip Frame 1
this.pillow._visible = false;
Symbol 251 MovieClip Frame 20
Symbol 257 Button
on (release) {
_root.hamsterShoot.reset();
}
Symbol 259 MovieClip Frame 1
stop();
Symbol 259 MovieClip Frame 81
stop();
Symbol 272 MovieClip Frame 1
stop();
Symbol 279 MovieClip Frame 1
stop();
Symbol 279 MovieClip Frame 17
this.gotoAndPlay(2);
Symbol 291 MovieClip Frame 1
stop();
Symbol 291 MovieClip Frame 7
this.gotoAndPlay(2);
Symbol 305 MovieClip Frame 1
stop();
Symbol 305 MovieClip Frame 5
if (_root.hamsterShoot.wind == true) {
this.gotoAndPlay(2);
} else {
this._visible = false;
_parent.flying_mc._visible = true;
this.gotoAndStop(1);
}
Symbol 306 MovieClip Frame 8
Symbol 312 MovieClip Frame 1
stop();
Symbol 312 MovieClip Frame 2
_parent.flying_mc._visible = false;
this._visible = true;
Symbol 312 MovieClip Frame 7
this.gotoAndPlay(3);
Symbol 330 MovieClip Frame 1
stop();
Symbol 330 MovieClip Frame 11
gotoAndStop (1);
Symbol 331 MovieClip [arrow] Frame 1
glide._visible = false;
wind._visible = false;
ball._visible = false;
superball._visible = false;
slide._visible = false;
blur._visible = false;
skid._visible = false;
drop._visible = false;
core._visible = false;
stop();
Symbol 351 MovieClip [hit_cheer] Frame 1
Symbol 351 MovieClip [hit_cheer] Frame 9
_root.hamsterShoot.setScore();
Symbol 351 MovieClip [hit_cheer] Frame 27
var l = _root.hamsterShoot.distances.length;
var txt = (_root.hamsterShoot.distances[l - 1] + " ft.");
distance_txt.text = txt;
distance1_txt.text = txt;
Symbol 351 MovieClip [hit_cheer] Frame 50
_root.hamsterShoot.setCamReset();
stop();
Symbol 365 MovieClip [hit_hole] Frame 1
Symbol 365 MovieClip [hit_hole] Frame 9
_root.hamsterShoot.setScore();
Symbol 365 MovieClip [hit_hole] Frame 27
var l = _root.hamsterShoot.distances.length;
var txt = (_root.hamsterShoot.distances[l - 1] + " ft.");
distance_txt.text = txt;
distance1_txt.text = txt;
Symbol 365 MovieClip [hit_hole] Frame 50
_root.hamsterShoot.setCamReset();
stop();
Symbol 372 MovieClip [hit_faceplant] Frame 1
Symbol 372 MovieClip [hit_faceplant] Frame 20
_root.hamsterShoot.createHitClip(this._x, this._y, this._rotation, "cheer");
stop();
Symbol 378 MovieClip [hit_zero] Frame 36
this._x = 220;
_root.hamsterShoot.createHitClip(this._x, this._y, this._rotation, "cheer", true);
_root.background_mc.gotoAndStop(1);
stop();
Symbol 395 MovieClip Frame 1
stop();
Symbol 402 MovieClip Frame 1
stop();
Symbol 407 MovieClip Frame 1
stop();
Symbol 407 MovieClip Frame 2
stop();
Symbol 454 MovieClip [_bounce] Frame 1
stop();
this.core._visible = false;
Symbol 454 MovieClip [_bounce] Frame 7
stop();
Symbol 462 MovieClip [_rebound] Frame 1
stop();
this.core._visible = false;
Symbol 462 MovieClip [_rebound] Frame 9
gotoAndStop (1);
Symbol 463 MovieClip [_slide] Frame 1
stop();
this.core._visible = false;
Symbol 463 MovieClip [_slide] Frame 7
stop();
Symbol 465 MovieClip [_speed] Frame 1
stop();
this.core._visible = false;
Symbol 465 MovieClip [_speed] Frame 8
stop();
Symbol 466 MovieClip [_superbounce] Frame 1
stop();
this.core._visible = false;
Symbol 466 MovieClip [_superbounce] Frame 7
stop();
Symbol 467 MovieClip [_wind] Frame 1
this.core._visible = false;
Symbol 487 MovieClip Frame 1
stop();
Symbol 488 Button
on (release) {
gotoAndStop (6);
}
Symbol 501 MovieClip Frame 1
stop();
Symbol 503 Button
on (release) {
stopAllSounds();
this.chalkboard_mc._visible = false;
this.nextFrame();
}
Symbol 505 Button
on (release) {
hamsterShoot.resetBtn();
}