Frame 1
NewgroundsAPI.connectMovie(6075);
NewgroundsAPI.addCustomEvent(1, "Cannon Fire");
stop();
Stage.showMenu = false;
_root.onEnterFrame = function () {
preload_text = Math.round((getBytesLoaded() / getBytesTotal()) * 100) + "%";
if (getBytesLoaded() == getBytesTotal()) {
onEnterFrame = false;
play();
}
};
Frame 16
stop();
Instance of Symbol 104 MovieClip "fadey" in Frame 16
onClipEvent (enterFrame) {
if (!introFade) {
if (_alpha > 0) {
_alpha = (_alpha - 5);
}
if (_alpha <= 0) {
introFade = true;
}
}
if (adFade) {
if (_alpha < 100) {
_alpha = (_alpha + 15);
}
if (_alpha >= 100) {
_root.gotoAndStop("adstart");
}
}
}
Frame 17
stop();
Frame 18
stop();
Frame 19
stop();
Instance of Symbol 163 MovieClip in Frame 19
onClipEvent (load) {
_xscale = 0;
}
onClipEvent (enterFrame) {
if (_xscale < 100) {
_xscale = (_xscale + 0.4);
} else {
_root.gameFade = true;
}
}
Instance of Symbol 104 MovieClip "fadey" in Frame 19
onClipEvent (enterFrame) {
if (!adFade) {
if (_alpha > 0) {
_alpha = (_alpha - 5);
}
if (_alpha <= 0) {
adFade = true;
}
}
if (_root.gameFade) {
if (_alpha < 100) {
_alpha = (_alpha + 15);
}
if (_alpha >= 100) {
_root.gotoAndStop("gamestart");
}
}
}
Frame 20
function kittenLaunch(coords, rot, power) {
_root.attachMovie("kitty", "kitty", 1);
kitty._x = coords.x;
kitty._y = coords.y;
kitty.power = power;
kitty.rot = rot;
}
function endStick(dist) {
stick.go = true;
stick.dist = Math.round(dist / 30);
stick.dist_text = addCommas(stick.dist) + " ft";
stick.goFrame();
stick._x = kitty._x - (kitty._width / 2);
}
function addCommas(num) {
num = num.toString();
final = new String();
arr = new Array();
if (num.length > 3) {
i = 0;
while (i < num.length) {
arr.push(num.substring((num.length - i) - 3, num.length - i));
i = i + 3;
}
arr = arr.reverse();
i = 0;
while (i < arr.length) {
final = final + arr[i];
if (i != (arr.length - 1)) {
final = final + ",";
}
i++;
}
return(final);
}
return(num);
}
function allowHighScore() {
if (_root.catHealth == _root.hiscore) {
return(true);
}
return(false);
}
scorego = true;
if (!init) {
_quality = "HIGH";
init = true;
}
active = true;
stop();
power = 0;
speed = 0;
pos = 0;
removeMovieClip(kitty);
Instance of Symbol 203 MovieClip in Frame 20
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if (_x > -400) {
_x = (_x - _root.speed);
} else {
_visible = false;
}
}
Instance of Symbol 104 MovieClip in Frame 20
onClipEvent (load) {
if (_root.newFade) {
_alpha = 0;
}
}
onClipEvent (enterFrame) {
if (!_root.newFade) {
if (_alpha > 0) {
_alpha = (_alpha - 10);
}
if (_alpha <= 0) {
_root.newFade = true;
}
}
}
Frame 21
scorego = false;
Frame 41
removeMovieClip(_root.kitty);
Instance of Symbol 203 MovieClip in Frame 48
onClipEvent (enterFrame) {
active = false;
}
Frame 75
gotoAndStop ("gamestart");
Symbol 15 MovieClip [kitty] Frame 1
stop();
if (!initialized) {
sounds = new Array(new Sound(), new Sound(), new Sound(), new Sound());
sounds[0].attachSound("hit1");
sounds[1].attachSound("hit2");
sounds[2].attachSound("hit3");
sounds[3].attachSound("hit4");
g = 1;
xsp = power * Math.cos((rot * Math.PI) / 180);
ysp = power * Math.sin((rot * Math.PI) / 180);
bounce = 0.72;
xdist = 0;
count = 0;
setZeroes = function () {
dead = true;
xsp = 0;
_root.speed = 0;
ysp = 0;
};
this.onEnterFrame = function () {
_root.pos = _y;
if (!dead) {
xdist = xdist + xsp;
ysp = ysp + g;
_y = (_y + ysp);
_rotation = (_rotation + (xsp / 5));
}
if (_y > 355) {
if (ysp < 2) {
_root.speed = 0;
xsp = 0;
dead = true;
if (!endStick) {
_root.endStick(xdist);
}
endStick = true;
}
if (!dead) {
sounds[random(4)].start();
_root.objgen.blood();
xsp = xsp * bounce;
ysp = (-ysp) * bounce;
this.gotoAndStop(random(3) + 1);
}
_y = 355;
}
if (count >= 15) {
done = true;
_x = 450;
_root.speed = xsp;
} else {
count++;
_x = (_x + xsp);
}
};
initialized = true;
}
Instance of Symbol 24 MovieClip in Symbol 25 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_parent._parent.bFrame);
}
Symbol 30 MovieClip Frame 21
stop();
Instance of Symbol 24 MovieClip in Symbol 32 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_parent._parent.bFrame);
}
Symbol 34 MovieClip [balloon] Frame 1
stop();
bFrame = random(4) + 1;
_y = (_y - random(250));
this.onEnterFrame = function () {
_x = (_x - _root.speed);
if (((hitarea.hitTest(_root.kitty._x, _root.kitty._y, true) && (!_root.kitty.dead)) && (Math.floor(_root.speed) != 0)) && (!dead)) {
_root.kitty.ysp = -28 - Math.abs(_root.kitty.ysp);
_root.kitty.xsp = 7 + (_root.speed * 1.2);
dead = true;
play();
}
if (_x < -780) {
removeMovieClip(this);
}
};
Instance of Symbol 25 MovieClip in Symbol 34 MovieClip [balloon] Frame 1
onClipEvent (load) {
acc = 0.02;
sp = 0.6;
max = 0.6;
racc = 0.01;
rsp = 0.16;
rmax = 0.16;
}
onClipEvent (enterFrame) {
sp = sp + acc;
if (Math.abs(sp) > max) {
acc = -acc;
}
_y = (_y + sp);
rsp = rsp + racc;
if (Math.abs(rsp) > rmax) {
racc = -racc;
}
_rotation = (_rotation + rsp);
}
Symbol 34 MovieClip [balloon] Frame 2
stop();
Instance of Symbol 32 MovieClip in Symbol 34 MovieClip [balloon] Frame 2
onClipEvent (enterFrame) {
_y = (_y - 20);
}
Symbol 38 MovieClip Frame 16
stop();
Symbol 40 MovieClip [explosives] Frame 1
stop();
this.onEnterFrame = function () {
_x = (_x - _root.speed);
if ((((this.hitTest(_root.kitty._x, _root.kitty._y, true) && (!_root.kitty.dead)) && (Math.floor(_root.speed) != 0)) && (!dead)) && (_root.kitty.ysp > 0)) {
_root.kitty.ysp = -28 - Math.abs(_root.kitty.ysp);
_root.kitty.xsp = 5 + (_root.speed * 1.2);
dead = true;
play();
}
if (_x < -780) {
removeMovieClip(this);
}
};
Symbol 40 MovieClip [explosives] Frame 2
stop();
Symbol 70 MovieClip [venus] Frame 1
stop();
this.onEnterFrame = function () {
_x = (_x - _root.speed);
if ((hitarea.hitTest(_root.kitty._x, _root.kitty._y, true) && (!_root.kitty.dead)) && (Math.floor(_root.speed) != 0)) {
_root.kitty.setZeroes();
_root.kitty._visible = false;
play();
}
if (_x < -780) {
removeMovieClip(this);
}
};
Symbol 70 MovieClip [venus] Frame 17
_root.endStick(_root.kitty.xdist);
Symbol 70 MovieClip [venus] Frame 27
stop();
Symbol 84 MovieClip [spikes] Frame 1
stop();
this.onEnterFrame = function () {
_x = (_x - _root.speed);
if ((((this.hitTest(_root.kitty._x, _root.kitty._y, true) && (!_root.kitty.dead)) && (Math.floor(_root.speed) != 0)) && (!dead)) && (_root.kitty.ysp > 0)) {
_root.kitty.setZeroes();
play();
dead = true;
}
if (dead) {
if (_root.kitty._y < 355) {
_root.kitty._y = _root.kitty._y + 4;
}
}
if (_x < -780) {
removeMovieClip(this);
}
};
Symbol 84 MovieClip [spikes] Frame 20
stop();
_root.endStick(_root.kitty.xdist);
Symbol 93 MovieClip [trampoline] Frame 1
stop();
this.onEnterFrame = function () {
_x = (_x - _root.speed);
if (((this.hitTest(_root.kitty._x, _root.kitty._y, true) && (!_root.kitty.dead)) && (Math.floor(_root.speed) != 0)) && (_root.kitty.ysp > 0)) {
_root.kitty.ysp = _root.kitty.ysp * -1.4;
play();
}
if (_x < -780) {
removeMovieClip(this);
}
};
Symbol 97 MovieClip [blood] Frame 1
this.onEnterFrame = function () {
_x = (_x - _root.speed);
if (_x < -730) {
removeMovieClip(this);
}
};
gotoAndStop(random(3) + 2);
Symbol 221 MovieClip [__Packages.NewgroundsAPI] Frame 0
class NewgroundsAPI
{
static var tracker_id, host, version, debug, error_format, header_format, normal_format, link_format;
function NewgroundsAPI () {
}
static function connectMovie(id) {
if (!id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.connectMovie(id:Number)");
} else if (!tracker_id) {
SendMessage("Connecting to API gateway...");
tracker_id = id;
host = _url.split("/")[2].toLowerCase();
if (host.length < 1) {
host = "localhost";
}
var _local2 = new Object();
SendEvent(MOVIE_VIEWS);
}
}
static function setMovieVersion(movie_version) {
if (!movie_version) {
SendError("Missing required 'version' in NewgroundsAPI.setMovieVersion(version:String)");
} else {
version = movie_version;
}
}
static function debugMode() {
debug = true;
}
static function addCustomEvent(stat_id, stat_name) {
if (!stat_id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else if (!stat_name) {
SendError("Missing required 'event_name' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else {
custom_events[stat_name] = CUSTOM_STATS + stat_id;
SendMessage("Created custom event: " + stat_name);
}
}
static function addCustomLink(stat_id, stat_name) {
if (!stat_id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else if (!stat_name) {
SendError("Missing required 'link_name' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else {
custom_links[stat_name] = CUSTOM_STATS + stat_id;
SendMessage((("Created custom link " + stat_id) + ": ") + stat_name);
}
}
static function loadMySite() {
SendLink(AUTHOR_SITE);
}
static function loadNewgrounds(special) {
if (special) {
var _local1 = {page:special};
}
SendLink(NEWGROUNDS, _local1);
}
static function logCustomEvent(event_name) {
if (!event_name) {
SendError("Missing required 'event_name' parameter in NewgroundsAPI.logCustomEvent(event_name:String)");
} else if (!custom_events[event_name]) {
SendError("Attempted to log undefined custom event: " + event_name);
} else {
SendEvent(custom_events[event_name]);
}
}
static function loadCustomLink(link_name) {
if (!link_name) {
SendError("Missing required 'link_name' parameter in NewgroundsAPI.loadCustomLink(link_name:String)");
} else if (!custom_links[link_name]) {
SendError("Attempted to open undefined custom link: " + link_name);
} else {
SendLink(custom_links[link_name]);
}
}
static function getAdURL() {
return(movie_options.ad_url);
}
static function getMovieURL() {
if (movie_options.movie_url) {
return(movie_options.movie_url);
}
return("Newgrounds.com");
}
static function getNewVersionURL() {
return((((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + NEW_VERSION);
}
static function SendEvent(id) {
SendStat(id, false);
}
static function SendLink(id, extra) {
SendStat(id, true, extra);
}
static function ReadGatewayData(params) {
for (var _local2 in params) {
params[_local2] = unescape(params[_local2]);
movie_options[_local2] = params[_local2];
}
if (params.settings_loaded) {
SendMessage("You have successfully connected to the Newgrounds API gateway!");
SendMessage(("Movie Identified as '" + movie_options.movie_name) + "'");
if (movie_options.message) {
SendMessage(movie_options.message);
}
if (movie_options.ad_url) {
SendMessage("Your movie has been approved to run Flash Ads");
onAdsApproved(movie_options.ad_url);
}
if (movie_options.movie_version and (movie_options.movie_version.toString() != version.toString())) {
SendMessage("WARNING: The movie version configured in your API settings does not match this movie's version!");
onNewVersionAvailable(movie_options.movie_version, getMovieURL(), getNewVersionURL());
}
if (movie_options.deny_host) {
SendMessage("You have blocked 'localHost' in your API settings.");
SendMessage("If you wish to test your movie you will need to remove this block.");
onDenyHost(host, getMovieURL(), getNewVersionURL());
}
if (movie_options.request_portal_url == 1) {
var _local4 = (((GATEWAY_URL + "?&id=") + tracker_id) + "&portal_url=") + escape(_url);
var _local3 = new XML();
_local3.ignoreWhite = true;
_local3.load(_local4);
}
} else if (!movie_options.settings_loaded) {
SendError("Could not establish connection to the API gateway.");
}
}
static function SendStat(stat_id, open_in_browser, extra) {
if (!tracker_id) {
SendError("API calls cannot be made without a valid movie id.");
SendError("Did you remember to add the \"NewgroundsAPI.connectMovie()\" code?");
} else {
var _local7 = (((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + stat_id;
for (var _local9 in extra) {
_local7 = _local7 + ((("&" + escape(_local9)) + "=") + escape(extra[_local9]));
}
trace(_local7);
if (debug) {
_local7 = _local7 + "&debug=1";
}
if (open_in_browser) {
getURL (_local7, "_blank");
} else {
var _local10 = new XML();
_local10.ignoreWhite = true;
_local10.onLoad = function (success) {
var _local6 = new Object();
var _local3 = 0;
while (_local3 < this.firstChild.childNodes.length) {
var _local4 = this.firstChild.childNodes[_local3];
var _local5 = _local4.nodeName;
var _local2 = _local4.attributes.value;
if (_local2 == Number(_local2)) {
_local2 = Number(_local2);
}
_local6[_local5] = _local2;
_local3++;
}
NewgroundsAPI.ReadGatewayData(_local6);
};
_local10.load(_local7);
}
}
}
static function SendError(msg) {
trace("[NEWGROUNDS API ERROR] :: " + msg);
}
static function SendMessage(msg) {
trace("[NEWGROUNDS API] :: " + msg);
}
static function InitTextFormats() {
if (!error_format) {
error_format = new TextFormat();
error_format.font = "Arial Black";
error_format.size = 48;
error_format.color = 16711680 /* 0xFF0000 */;
}
if (!header_format) {
header_format = new TextFormat();
header_format.font = "Arial Black";
header_format.size = 24;
header_format.color = 16777215 /* 0xFFFFFF */;
}
if (!normal_format) {
normal_format = new TextFormat();
normal_format.font = "Arial";
normal_format.bold = true;
normal_format.size = 12;
normal_format.color = 16777215 /* 0xFFFFFF */;
}
if (!link_format) {
link_format = new TextFormat();
link_format.color = 16776960 /* 0xFFFF00 */;
link_format.underline = true;
}
}
static function onNewVersionAvailable(version, movie_url, redirect_url) {
InitTextFormats();
var _local2 = new Object();
_local2.x = Stage.width / 2;
_local2.y = Stage.height / 2;
_root.createEmptyMovieClip("NGAPI_new_version_overlay", _root.getNextHighestDepth());
_root.NGAPI_new_version_overlay.lineStyle(1, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(0, 70);
_root.NGAPI_new_version_overlay.moveTo(-10, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, -10);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.lineStyle(10, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(51);
_root.NGAPI_new_version_overlay.moveTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.createEmptyMovieClip("exit", 1000);
_root.NGAPI_new_version_overlay.exit.lineStyle(2, 39423, 100);
_root.NGAPI_new_version_overlay.exit.beginFill(0, 50);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.endFill();
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 214, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 226, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 226, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 214, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.onMouseUp = function () {
if (_root.NGAPI_new_version_overlay.exit.hitTest(_root._xmouse, _root._ymouse)) {
_root.NGAPI_new_version_overlay.removeMovieClip();
}
};
var _local3 = (("Version " + version) + " is now available at:") + newline;
var _local5 = _local3.length;
_local3 = _local3 + movie_url;
var _local4 = _local3.length;
_root.NGAPI_new_version_overlay.createTextField("mouseblocker", 99, -10, -10, 1000, 1000);
_root.NGAPI_new_version_overlay.createTextField("newversion", 100, _local2.x - 210, _local2.y - 90, 400, 80);
_root.NGAPI_new_version_overlay.newversion.text = "New Version Available!";
_root.NGAPI_new_version_overlay.newversion.setTextFormat(header_format);
_root.NGAPI_new_version_overlay.createTextField("message", 101, (Stage.width - 400) / 2, Stage.height / 2, 400, 40);
_root.NGAPI_new_version_overlay.message.text = _local3;
_root.NGAPI_new_version_overlay.message.multiline = true;
_root.NGAPI_new_version_overlay.message.wordWrap = true;
_root.NGAPI_new_version_overlay.message.html = true;
_root.NGAPI_new_version_overlay.message.setTextFormat(normal_format);
link_format.url = redirect_url;
_root.NGAPI_new_version_overlay.message.setTextFormat(_local5, _local4, link_format);
}
static function onDenyHost(hostname, movie_url, redirect_url) {
InitTextFormats();
_root.createEmptyMovieClip("NGAPI_deny_host_overlay", _root.getNextHighestDepth());
_root.NGAPI_deny_host_overlay.lineStyle(20, 0, 100);
_root.NGAPI_deny_host_overlay.beginFill(6684672);
_root.NGAPI_deny_host_overlay.moveTo(0, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, 0);
_root.NGAPI_deny_host_overlay.endFill();
var _local2 = ("This movie has not been approved for use on " + hostname) + ".";
_local2 = _local2 + "\r\rFor an aproved copy, please visit:\r";
var _local4 = _local2.length;
_local2 = _local2 + movie_url;
var _local3 = _local2.length;
_root.NGAPI_deny_host_overlay.createTextField("mousekill", 100, 0, 0, Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.createTextField("error", 101, (Stage.width - 400) / 2, (Stage.height / 2) - 100, 400, 200);
_root.NGAPI_deny_host_overlay.error.text = "ERROR!";
_root.NGAPI_deny_host_overlay.error.setTextFormat(error_format);
_root.NGAPI_deny_host_overlay.createTextField("message", 102, (Stage.width - 400) / 2, Stage.height / 2, 400, 200);
_root.NGAPI_deny_host_overlay.message.text = _local2;
_root.NGAPI_deny_host_overlay.message.multiline = true;
_root.NGAPI_deny_host_overlay.message.wordWrap = true;
_root.NGAPI_deny_host_overlay.message.html = true;
_root.NGAPI_deny_host_overlay.message.setTextFormat(normal_format);
link_format.url = redirect_url;
_root.NGAPI_deny_host_overlay.message.setTextFormat(_local4, _local3, link_format);
}
static function isInstalled() {
return(true);
}
static function onAdsApproved(ad_url) {
}
static var movie_options = new Object();
static var custom_events = new Object();
static var custom_links = new Object();
static var MOVIE_VIEWS = 1;
static var AUTHOR_SITE = 2;
static var NEWGROUNDS = 3;
static var NEW_VERSION = 4;
static var CUSTOM_STATS = 50;
static var GATEWAY_URL = "http://www.ngads.com/gateway.php";
}
Symbol 114 Button
on (release) {
fadey.adFade = true;
}
Symbol 118 Button
on (release) {
_root.gotoAndStop("howto");
}
Symbol 122 Button
on (release) {
_root.gotoAndStop("credits");
}
Symbol 128 Button
on (release) {
_root.gotoAndStop("title");
}
Symbol 132 MovieClip Frame 1
bFrame = 1;
Symbol 154 Button
on (release) {
NewgroundsAPI.loadNewgrounds();
}
Symbol 159 Button
on (release) {
NewgroundsAPI.loadNewgrounds();
}
Symbol 161 MovieClip Frame 1
function startAd(ngad_url) {
trace("opening " + ngad_url);
System.security.allowDomain("70.87.128.99");
System.security.allowInsecureDomain("70.87.128.99");
System.security.allowDomain("ads.shizmoo.com");
System.security.allowInsecureDomain("ads.shizmoo.com");
System.security.allowDomain("www.cpmstar.com");
System.security.allowInsecureDomain("www.cpmstar.com");
System.security.allowDomain("server.cpmstar.com");
System.security.allowInsecureDomain("server.cpmstar.com");
var ngads_redirect = new XML();
ngads_redirect.ignoreWhite = true;
ngads_redirect.onLoad = function (success) {
trace("[NEWGROUNDS FLASH ADS] :: You may get a 'Security Sandbox Violation' ... this is normal, do not freak out!");
if (success) {
ng_ad.loadMovie(ngads_redirect.toString(), "GET");
}
};
ngads_redirect.load(ngad_url);
}
if (NewgroundsAPI.getAdURL()) {
startAd(NewgroundsAPI.getAdURL());
}
NewgroundsAPI.onAdsApproved = function (ad_url) {
startAd(ad_url);
};
stop();
Symbol 170 Button
on (release) {
_root.play();
}
on (keyPress "<Space>") {
_root.play();
}
Symbol 176 MovieClip Frame 1
function goFrame() {
user_high = ("Your High Score: " + _root.addCommas(_root.hiscore)) + " ft";
if (dist >= _root.hiscore) {
_root.newHigh = true;
_root.hiscore = dist;
user_high = ("Your High Score: " + _root.addCommas(_root.hiscore)) + " ft";
_root.catHealth = dist;
stop();
} else {
gotoAndStop (2);
}
}
stop();
_y = 350;
if (!_root.hiscore) {
_root.hiscore = 0;
_root.catHealth = 0;
}
_visible = false;
this.onEnterFrame = function () {
_x = 325;
if (go) {
_visible = true;
if (_y > 100) {
_y = (_y - 25);
} else {
go = false;
}
}
if (((Key.isDown(32) && (_root.kitty.dead)) && (_root.active)) && (_root.scoreboard._currentframe == 1)) {
_root.play();
}
};
Symbol 176 MovieClip Frame 2
stop();
Symbol 179 MovieClip Frame 1
this.onEnterFrame = function () {
speed = _root.speed;
if ((_x - speed) <= -650) {
_x = (_x + 650);
}
_x = (_x - speed);
};
Symbol 185 MovieClip Frame 1
stop();
Instance of Symbol 183 MovieClip in Symbol 185 MovieClip Frame 1
onClipEvent (enterFrame) {
point = new Object({x:0, y:0});
localToGlobal(point);
_root.point = point;
}
Symbol 185 MovieClip Frame 2
rnd = random(6);
sounds[rnd].start();
Symbol 191 MovieClip Frame 10
gotoAndPlay (1);
Symbol 200 MovieClip Frame 1
stop();
Instance of Symbol 196 MovieClip in Symbol 200 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.power = 10 + (meter._xscale / 2);
if ((Key.isDown(32) && (_parent._parent.active)) && (_root.active)) {
stop();
}
}
Instance of Symbol 180 MovieClip "soundloop" in Symbol 203 MovieClip Frame 1
onClipEvent (load) {
stop();
}
Instance of Symbol 185 MovieClip "cannon" in Symbol 203 MovieClip Frame 1
onClipEvent (load) {
rsp = 0.5;
_rotation = (_root.prevAng ? (_root.prevAng) : -28);
splaying = false;
splaying2 = false;
sounds = new Array(new Sound(), new Sound(), new Sound(), new Sound(), new Sound(), new Sound());
sounds[0].attachSound("cat1");
sounds[1].attachSound("cat2");
sounds[2].attachSound("cat3");
sounds[3].attachSound("cat4");
sounds[4].attachSound("cat5");
sounds[5].attachSound("cat6");
}
onClipEvent (enterFrame) {
_root.prevAng = _rotation;
if ((((Key.isDown(38) && (_rotation > -60)) && (!shoot)) && (_parent.active)) && (_root.active)) {
_rotation = (_rotation - rsp);
splaying = true;
} else if ((((Key.isDown(40) && (_rotation < -10)) && (!shoot)) && (_parent.active)) && (_root.active)) {
_rotation = (_rotation + rsp);
splaying = true;
} else {
_parent.soundloop.stop();
splaying = false;
}
if (splaying) {
if (!splaying2) {
_parent.soundloop.play();
splaying2 = true;
}
} else {
splaying2 = false;
_parent.soundloop.stop();
}
if (((Key.isDown(32) && (!shoot)) && (_parent.active)) && (_root.active)) {
play();
_root.kittenLaunch(_root.point, _rotation, _root.power);
NewgroundsAPI.logCustomEvent("Cannon Fire");
shoot = true;
}
_parent.rot = -_rotation;
if (Math.round(_parent.rot) == _parent.rot) {
_parent.rot = _parent.rot + ".0";
}
}
Instance of Symbol 202 MovieClip in Symbol 203 MovieClip Frame 1
onClipEvent (load) {
_rotation = (_root.prevAng ? (360 - _root.prevAng) : 28);
}
onClipEvent (enterFrame) {
_rotation = (360 - _parent.cannon._rotation);
}
Symbol 207 MovieClip Frame 1
_alpha = 0;
_y = 0;
this.onEnterFrame = function () {
_x = _root.kitty._x;
height = Math.round(-_root.pos);
if (height < 0) {
height = 0;
}
height_text = Math.round(height / 30) + " ft";
if (height > 10) {
if (_alpha < 100) {
_alpha = (_alpha + 10);
}
} else if (_alpha > 0) {
_alpha = (_alpha - 10);
}
};
Symbol 209 MovieClip Frame 1
_y = 370;
obj = ["trampoline", "explosives", "spikes", "trampoline", "explosives", "spikes", "venus", "balloon"];
d = 0;
spacing = 450;
currentPos = 0;
this.onEnterFrame = function () {
currentPos = currentPos + _root.speed;
if ((((currentPos + offset) + _root.speed) >= spacing) && (_root.kitty.done)) {
this.attachMovie(obj[random(obj.length)], "o" + d, ++d);
currentPos = 0;
offset = random(400) - 200;
}
};
blood = function () {
this.attachMovie("blood", "b" + d, ++d);
this["b" + d]._x = _root.kitty._x - _x;
};
Symbol 214 Button
on (release) {
if (_quality == "HIGH") {
_quality = "MEDIUM";
} else if (_quality == "MEDIUM") {
_quality = "LOW";
} else if (_quality == "LOW") {
_quality = "HIGH";
}
}