Frame 1
_root.NewgroundsAPI_id = 3084;
ifFrameLoaded (44) {
gotoAndPlay (3);
}
Frame 2
gotoAndPlay (1);
Frame 3
ifFrameLoaded (88) {
gotoAndPlay (5);
}
Frame 4
gotoAndPlay (3);
Frame 5
ifFrameLoaded (132) {
gotoAndPlay (7);
}
Frame 6
gotoAndPlay (5);
Frame 7
ifFrameLoaded (176) {
gotoAndPlay (9);
}
Frame 8
gotoAndPlay (7);
Frame 9
ifFrameLoaded (220) {
gotoAndPlay (11);
}
Frame 10
gotoAndPlay (9);
Frame 11
ifFrameLoaded (264) {
gotoAndPlay (13);
}
Frame 12
gotoAndPlay (11);
Frame 13
ifFrameLoaded (308) {
}
gotoAndPlay (15);
Frame 14
gotoAndPlay (13);
Frame 15
ifFrameLoaded (354) {
gotoAndPlay (17);
}
Frame 16
gotoAndPlay (15);
Frame 17
ifFrameLoaded (398) {
}
gotoAndPlay (19);
Frame 18
gotoAndPlay (17);
Frame 19
ifFrameLoaded (442) {
gotoAndPlay (21);
}
Frame 20
gotoAndPlay (19);
Frame 21
ifFrameLoaded (486) {
gotoAndPlay (23);
}
Frame 22
gotoAndPlay (21);
Frame 23
ifFrameLoaded (530) {
gotoAndPlay (25);
}
Frame 24
gotoAndPlay (23);
Frame 25
ifFrameLoaded (574) {
gotoAndPlay (27);
}
Frame 26
gotoAndPlay (25);
Frame 27
ifFrameLoaded (618) {
gotoAndPlay (29);
}
Frame 28
gotoAndPlay (27);
Frame 29
ifFrameLoaded (662) {
gotoAndPlay (31);
}
Frame 30
gotoAndPlay (29);
Frame 31
ifFrameLoaded (706) {
gotoAndPlay (33);
}
Frame 32
gotoAndPlay (31);
Frame 33
ifFrameLoaded (750) {
gotoAndPlay (35);
}
Frame 34
gotoAndPlay (33);
Frame 35
ifFrameLoaded (794) {
gotoAndPlay (37);
}
Frame 36
gotoAndPlay (35);
Frame 37
ifFrameLoaded (838) {
gotoAndPlay (39);
}
Frame 38
gotoAndPlay (37);
Frame 39
ifFrameLoaded (883) {
gotoAndPlay (41);
}
Frame 40
gotoAndPlay (39);
Frame 43
stop();
Frame 44
stop();
Frame 884
stop();
Symbol 13 Button
on (release) {
_root.NewgroundsAPI_loadMyMovie();
}
Symbol 18 Button
on (release) {
_root.NewgroundsAPI_loadMyMovie();
}
Symbol 21 Button
on (release) {
this._visible = false;
}
Symbol 23 MovieClip Frame 1
_visible = false;
_root.NewgroundsAPI = this;
STAT_MOVIE_VIEWS = 1;
STAT_AUTHOR_SITE = 2;
STAT_NEWGROUNDS = 3;
STAT_NEW_VERSION = 4;
STAT_CUSTOM_STATS = 50;
Symbol 23 MovieClip Frame 2
_root.NewgroundsAPI.POPUP_ERROR._visible = false;
_root.NewgroundsAPI.POPUP_VERSION._visible = false;
customStats = new Object();
i = 1;
while (i < _root.NewgroundsAPI_customLinks.length) {
customStats[_root.NewgroundsAPI_customLinks[i]] = i + STAT_CUSTOM_STATS;
i++;
}
i = 1;
while (i < _root.NewgroundsAPI_customEvents.length) {
customStats[_root.NewgroundsAPI_customEvents[i]] = i + STAT_CUSTOM_STATS;
i++;
}
_x = 0;
_y = 0;
configureMovie = function () {
if (_root.NewgroundsAPI_params.error != undefined) {
sendError(_root.NewgroundsAPI_params.error);
}
if (_root.NewgroundsAPI_params.settings_loaded == 1) {
sendMessage("You have successfully connected to the Newgrounds API gateway!");
sendMessage(("Movie Identified as '" + _root.NewgroundsAPI_params.movie_name) + "'");
}
if (_root.NewgroundsAPI_params.deny_host == 1) {
sendMessage(host + " is not approved to use this movie");
_root.NewgroundsAPI_onDenyHost(host, _root.NewgroundsAPI_params.movie_url, (script_url + "&stat=") + STAT_NEW_VERSION);
}
if (_root.NewgroundsAPI_params.movie_version == 1) {
sendMessage(("Version " + _root.NewgroundsAPI_params.movie_version) + " is now available!");
_root.NewgroundsAPI_onNewVersionAvailable(_root.NewgroundsAPI_params.movie_version, _root.NewgroundsAPI_params.movie_url, (script_url + "&stat=") + STAT_NEW_VERSION);
}
if (_root.NewgroundsAPI_params.ad_url != undefined) {
sendMessage("This movie has been approved to use Flash Ads");
_root.NewgroundsAPI_onAdsApproved(_root.NewgroundsAPI_params.ad_url);
}
};
sendError = function (error) {
trace("[NEWGROUNDS API ERROR] " + error);
};
sendMessage = function (message) {
trace("[NEWGROUNDS API] " + message);
};
sendStats = function (stat, new_window) {
if (script_url != undefined) {
query = "&stat=" + stat;
if (new_window == true) {
getURL (script_url + query, "_blank");
} else {
initInfo = new XML();
initInfo.onLoad = function () {
i = 0;
while (i < this.childNodes.length) {
if (this.childNodes[i].nodeName != null) {
j = 0;
while (j < this.childNodes[i].childNodes.length) {
if (this.childNodes[i].childNodes[j].nodeName != null) {
param_name = this.childNodes[i].childNodes[j].nodeName;
param_value = unescape(this.childNodes[i].childNodes[j].attributes.value);
_root.NewgroundsAPI_params[param_name] = param_value;
}
j++;
}
}
i++;
}
_root.NewgroundsAPI.configureMovie();
};
initInfo.load(script_url + query);
}
}
};
host = _url.split("/")[2].toLowerCase();
if (host.length < 1) {
host = "localhost";
}
if (!_root.NewgroundsAPI_id) {
sendError("Missing required '_root.NewgroundsAPI_id' variable");
} else if (!tracker_id) {
tracker_id = _root.NewgroundsAPI_id;
script_url = (("http://www.ngads.com/gateway.php?id=" + tracker_id) + "&host=") + escape(host);
_root.NewgroundsAPI_params = new Object();
sendMessage("Connecting to API gateway...");
sendStats(STAT_MOVIE_VIEWS, false);
}
_root.NewgroundsAPI_loadMyMovie = function () {
_root.NewgroundsAPI.sendStats(_root.NewgroundsAPI.STAT_NEW_VERSION, true);
};
_root.NewgroundsAPI_loadNewgrounds = function () {
_root.NewgroundsAPI.sendStats(_root.NewgroundsAPI.STAT_NEWGROUNDS, true);
};
_root.NewgroundsAPI_loadMySite = function () {
_root.NewgroundsAPI.sendStats(_root.NewgroundsAPI.STAT_AUTHOR_SITE, true);
};
_root.NewgroundsAPI_loadCustomLink = function (link) {
if (_root.NewgroundsAPI.customStats[link]) {
_root.NewgroundsAPI.sendStats(_root.NewgroundsAPI.customStats[link], true);
} else {
_root.NewgroundsAPI.sendError(("The custom link '" + link) + "' has not beed defined.");
}
};
_root.NewgroundsAPI_logCustomEvent = function (event) {
if (_root.NewgroundsAPI.customStats[event]) {
_root.NewgroundsAPI.sendStats(_root.NewgroundsAPI.customStats[event], false);
} else {
_root.NewgroundsAPI.sendError(("The custom event '" + event) + "' has not beed defined.");
}
};
if (typeof(_root.NewgroundsAPI_onDenyHost) != "function") {
_root.NewgroundsAPI_onDenyHost = function (ad_url) {
_root.NewgroundsAPI.swapDepths(99999);
_root.NewgroundsAPI._visible = true;
_root.NewgroundsAPI.POPUP_ERROR._visible = true;
};
}
if (typeof(_root.NewgroundsAPI_onNewVersionAvailable) != "function") {
_root.NewgroundsAPI_onNewVersionAvailable = function (ad_url) {
_root.NewgroundsAPI.swapDepths(99999);
_root.NewgroundsAPI._visible = true;
_root.NewgroundsAPI.POPUP_VERSION._visible = true;
};
}
stop();
Symbol 28 Button
on (release) {
_root.NewgroundsAPI_loadNewgrounds();
}
Symbol 31 Button
on (release) {
_root.NewgroundsAPI_loadNewgrounds();
}
Symbol 33 MovieClip Frame 1
function load_ad() {
url = new XML();
url.onLoad = function (s) {
if (s) {
_root.NewgroundsAPI_Ad_Unit.start_ad(this.toString());
}
};
url.load(_root.NewgroundsAPI_params.ad_url);
}
function start_ad(url) {
trace("[Newgrounds Flash Ads] Your ad was loaded. Your version of flash may have trouble displaying the ad, however, the ad will load fine if you test in a browser!");
ng_ad.loadMovie(url);
}
_root.NewgroundsAPI_Ad_Unit = this;
if (_root.NewgroundsAPI_params.ad_url != undefined) {
_root.NewgroundsAPI_Ad_Unit.load_ad();
}
_root.NewgroundsAPI_onAdsApproved = function () {
_root.NewgroundsAPI_Ad_Unit.load_ad();
};
Symbol 56 Button
on (release) {
gotoAndPlay (44);
}
Symbol 60 Button
on (release) {
gotoAndPlay (45);
}
Symbol 66 MovieClip Frame 105
stop();
Symbol 85 MovieClip Frame 20
stop();
Symbol 95 MovieClip Frame 64
stop();
Symbol 97 MovieClip Frame 65
stop();
Symbol 100 MovieClip Frame 22
stop();
Symbol 102 MovieClip Frame 30
stop();
Symbol 103 MovieClip Frame 126
stop();
Symbol 108 MovieClip Frame 22
stop();
Symbol 110 MovieClip Frame 21
stop();
Symbol 111 MovieClip Frame 253
stop();
Symbol 116 MovieClip Frame 55
stop();
Symbol 117 MovieClip Frame 199
stop();
Symbol 118 MovieClip Frame 37
stop();
Symbol 123 Button
on (release) {
gotoAndPlay (1);
}
Symbol 127 Button
on (release) {
getURL ("http://ghostyfilms.com");
}