Frame 1
mochi.MochiServices.connect("5f14736467b7e6ea");
stop();
Instance of Symbol 194 MovieClip [preloaderShape_mc] in Frame 1
onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int((loaded / total) * 100);
percen101 = ("" + percent) + "%";
gotoAndStop(percent);
if ((loaded == total) && (_root.logoContainerMC._currentframe < 100)) {
_root.logoContainerMC.gotoAndPlay("fade");
}
}
Frame 18
stop();
var winInRow = 0;
MochiAd.showPreGameAd({id:"5f14736467b7e6ea", res:"700x525"});
Instance of Symbol 222 MovieClip in Frame 30
on (release) {
getURL ("http://www.smileygamer.com/?gameref=1132", "_blank");
}
Frame 200
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("f750c414", this, 10301, true);
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function onEnterFrame() {
if (playgameButton.mouseIsOver) {
tipsText.text = "Start a new game of Star Crash";
} else if (scoreButton.mouseIsOver) {
tipsText.text = "Show Star Crash High Scores";
} else if (instructionsButton.mouseIsOver) {
tipsText.text = "Instructions on how to play...";
} else if (creditsButton.mouseIsOver) {
tipsText.text = "Credits Screen...";
} else if (websiteButton.mouseIsOver) {
tipsText.text = "Go to our website and play more games";
} else {
tipsText.text = "(c) 2008 Glowing Eye Games";
}
}
stop();
var curentHighScore;
this.lineStyle(1, 1188920, 100);
var i = 1;
while (i < 525) {
this.moveTo(0, i);
this.lineTo(700, i);
i = i + 3;
}
playgameButton.txt = "Play Game";
scoreButton.txt = "High Scores";
instructionsButton.txt = "Instructions";
creditsButton.txt = "Credits";
websiteButton.txt = "Play More Games";
var sound;
var music;
var gameIsPaused = false;
so = SharedObject.getLocal("userData");
if (so.data.music == null) {
so.data.music = 1;
_root.music = 1;
} else {
_root.music = so.data.music;
}
musicBtMM.stare = music == 1;
if (so.data.sound == null) {
so.data.sound = 1;
_root.sound = 1;
} else {
_root.sound = so.data.sound;
}
soundBtMM.stare = sound == 1;
var localDomainLC = new LocalConnection();
var myDomainName = localDomainLC.domain();
trace(myDomainName);
websiteButton.enabled = true;
websiteButton._alpha = 100;
playgameButton.enabled = true;
playgameButton._alpha = 100;
playgameButton.onRelease = function () {
gotoAndPlay ("play");
};
scoreButton.onRelease = function () {
getURL ("http://www.smileygamer.com/highscores/star-crash.html?gameref=1132", "_blank");
};
instructionsButton.onRelease = function () {
gotoAndPlay ("instructions");
};
creditsButton.onRelease = function () {
gotoAndPlay ("credits");
};
websiteButton.onRelease = function () {
websiteButton.buttonLabel._x--;
websiteButton.buttonLabel._y--;
getURL ("http://www.smileygamer.com/?gameref=1132", "_blank");
};
var imagePath;
imagePath = ("image" + String(randRange(1, 3))) + ".jpg";
curentHighScore = -1;
var stationaryFirstTime = 20;
var movingFirstTime = 40;
var shardFirstTime = 70;
var movingSpeed = 6;
var shardSpeed = 7;
var initialShardInterval = 67;
var maxShards = 14;
var movingInterval = 20;
var backgroundImagesCount = 3;
var rating0 = 0;
var rating1 = 9999;
var rating2 = 24999;
var rating3 = 49999;
var rating4 = 99999;
var myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function (success) {
if (success) {
var _local2 = 0;
while (_local2 < this.firstChild.childNodes.length) {
if (this.firstChild.childNodes[_local2].attributes.type == "stationaryFirstTime") {
stationaryFirstTime = Number(this.firstChild.childNodes[_local2].attributes.value);
}
if (this.firstChild.childNodes[_local2].attributes.type == "movingFirstTime") {
movingFirstTime = Number(this.firstChild.childNodes[_local2].attributes.value);
}
if (this.firstChild.childNodes[_local2].attributes.type == "shardFirstTime") {
shardFirstTime = Number(this.firstChild.childNodes[_local2].attributes.value);
}
if (this.firstChild.childNodes[_local2].attributes.type == "movingSpeed") {
movingSpeed = Number(this.firstChild.childNodes[_local2].attributes.value);
}
if (this.firstChild.childNodes[_local2].attributes.type == "shardSpeed") {
shardSpeed = Number(this.firstChild.childNodes[_local2].attributes.value);
}
if (this.firstChild.childNodes[_local2].attributes.type == "initialShardInterval") {
initialShardInterval = Number(this.firstChild.childNodes[_local2].attributes.value);
}
if (this.firstChild.childNodes[_local2].attributes.type == "maxShards") {
maxShards = Number(this.firstChild.childNodes[_local2].attributes.value);
}
if (this.firstChild.childNodes[_local2].attributes.type == "movingInterval") {
movingInterval = Number(this.firstChild.childNodes[_local2].attributes.value);
}
if (this.firstChild.childNodes[_local2].attributes.type == "rating0") {
rating0 = Number(this.firstChild.childNodes[_local2].attributes.value);
}
if (this.firstChild.childNodes[_local2].attributes.type == "rating1") {
rating1 = Number(this.firstChild.childNodes[_local2].attributes.value);
}
if (this.firstChild.childNodes[_local2].attributes.type == "rating2") {
rating2 = Number(this.firstChild.childNodes[_local2].attributes.value);
}
if (this.firstChild.childNodes[_local2].attributes.type == "rating3") {
rating3 = Number(this.firstChild.childNodes[_local2].attributes.value);
}
if (this.firstChild.childNodes[_local2].attributes.type == "rating4") {
rating4 = Number(this.firstChild.childNodes[_local2].attributes.value);
}
_local2++;
}
}
};
myXML.load(CacheManager.uncacheURL("settings.XML"));
Instance of Symbol 236 MovieClip in Frame 200
on (release) {
getURL ("http://www.smileygamer.com/?gameref=1132", "_blank");
}
Instance of Symbol 239 MovieClip in Frame 200
on (release) {
getURL ("http://www.smileygamer.com/freecontent.html?gameref=1132", "_blank");
}
Frame 202
stop();
playGameButton.txt = "Play Game";
playGameButton.onRelease = function () {
_root.gotoAndPlay("startGame");
};
Frame 203
stop();
var gameIsOver = false;
var numeCurent = "";
var scorCurent = -1;
Frame 204
_root.gotoAndStop("mainMenu");
Frame 210
stop();
var hsArray = new Array();
var so = SharedObject.getLocal("userData");
if (so.data.highScores != null) {
hsArray = so.data.highScores;
}
nameForm.text = _root.numeCurent;
okButton.txt = "OK";
okButton.onRelease = function () {
_root.numeCurent = nameForm.text;
hsArray.push({nume:nameForm.text, scor:_root.scorCurent});
hsArray.sortOn("scor", Array.DESCENDING | Array.NUMERIC);
if (hsArray.length > 19) {
hsArray.pop();
}
so.data.highScores = hsArray;
so.data.nume = nameForm.text;
so.flush();
gotoAndPlay ("highScores");
};
Frame 211
function onEnterFrame() {
}
stop();
var s10 = new Sound();
s10.attachSound("High_Score_Menu_edit.mp3");
if (_root.sound == 1) {
trace("sunet==" + _root.sound);
s10.start(0, 1000);
}
goBack1.txt = "Goto Main Menu";
goBack1.onRelease = function () {
s10.stop("High_Score_Menu_edit.mp3");
gotoAndPlay ("mainMenu");
};
playAgain.txt = "Play Again";
playAgain.onRelease = function () {
s10.stop("High_Score_Menu_edit.mp3");
gotoAndPlay ("startGame");
};
if (_root.curentHighScore < 0) {
playAgain.enabled = false;
playAgain._visible = false;
onlineCaption._visible = false;
}
var bb = this;
var imageLoaded = false;
maskHS._alpha = 0;
back1._x = 2000;
back2._x = 2000;
back3._x = 2000;
switch (_root.imagePath) {
case "image1.jpg" :
back1._x = 0;
break;
case "image2.jpg" :
back2._x = 0;
break;
case "image3.jpg" :
back3._x = 0;
}
imageLoaded = true;
backLines.lineStyle(1, 1188920, 100);
var i = 1;
while (i < 525) {
bb.backLines.moveTo(0, i);
bb.backLines.lineTo(700, i);
i = i + 3;
}
s4.start();
Frame 215
stop();
goBack2.txt = "Goto Main Menu";
goBack2.onRelease = function () {
gotoAndPlay ("mainMenu");
};
Frame 217
stop();
goBack3.txt = "Goto Main Menu";
goBack3.onRelease = function () {
gotoAndPlay ("mainMenu");
};
Frame 221
gotoAndPlay ("startGame");
Symbol 16 MovieClip Frame 30
stop();
Symbol 17 MovieClip [movingMC] Frame 1
#initclip 27
Object.registerClass("movingMC", movingMC);
#endinitclip
stop();
Symbol 17 MovieClip [movingMC] Frame 5
if (_root.sound == 1) {
var s1 = new Sound();
s1.attachSound("collectmoving.wav");
s1.start();
}
Symbol 17 MovieClip [movingMC] Frame 45
stop();
Symbol 34 MovieClip Frame 11
stop();
Symbol 35 MovieClip Frame 1
stop();
Symbol 35 MovieClip Frame 25
stop();
Symbol 38 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 25
stop();
Symbol 41 MovieClip Frame 1
stop();
Symbol 41 MovieClip Frame 25
stop();
Symbol 44 MovieClip Frame 1
stop();
Symbol 44 MovieClip Frame 25
stop();
Symbol 47 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 25
stop();
Symbol 50 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 25
stop();
Symbol 53 MovieClip Frame 1
stop();
Symbol 53 MovieClip Frame 25
stop();
Symbol 56 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 25
stop();
Symbol 57 MovieClip [shooting] Frame 1
#initclip 16
Object.registerClass("shooting", shooting);
#endinitclip
Symbol 58 MovieClip [shard] Frame 17
stop();
Symbol 72 MovieClip [hsMC] Frame 1
#initclip 17
Object.registerClass("hsMC", hsMC);
#endinitclip
Symbol 78 MovieClip [menuButton] Frame 1
#initclip 18
Object.registerClass("menuButton", menuButton);
#endinitclip
Symbol 88 MovieClip [PauseBt] Frame 1
#initclip 19
Object.registerClass("PauseBt", PauseBt);
#endinitclip
Symbol 95 MovieClip [SoundBt] Frame 1
#initclip 20
Object.registerClass("SoundBt", SoundBt);
#endinitclip
Symbol 100 MovieClip [MusicBt] Frame 1
#initclip 21
Object.registerClass("MusicBt", MusicBt);
#endinitclip
Symbol 104 MovieClip Frame 1
stop();
Symbol 116 MovieClip [calculateScore] Frame 1
#initclip 22
Object.registerClass("calculateScore", calculateScore);
#endinitclip
Symbol 122 MovieClip [ratings] Frame 1
#initclip 23
Object.registerClass("ratings", ratings);
#endinitclip
Symbol 138 MovieClip [playerMC] Frame 68
gotoAndPlay (1);
Symbol 138 MovieClip [playerMC] Frame 85
stop();
Symbol 148 MovieClip Frame 30
stop();
Symbol 149 MovieClip [stationary] Frame 1
function onEnterFrame() {
if (_root.gameIsOver) {
if (this._alpha > 0) {
this._alpha--;
}
return(undefined);
}
if (this._alpha < 100) {
this._alpha = this._alpha + 5;
if (this._alpha > 100) {
this._alpha = 100;
}
}
}
stop();
Symbol 149 MovieClip [stationary] Frame 5
if (_root.sound == 1) {
var s = new Sound();
s.attachSound("collectstationary.wav");
s.start();
}
Symbol 149 MovieClip [stationary] Frame 38
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
this._alpha = 0;
this._x = randRange(_root.game.x1Board + 30, _root.game.x2Board - 30);
this._y = randRange(_root.game.y1Board + 30, _root.game.y2Board - 30);
Symbol 183 MovieClip [starCrash] Frame 1
#initclip 24
Object.registerClass("starCrash", starCrash);
#endinitclip
Symbol 187 MovieClip [SoundBtMainMenu] Frame 1
#initclip 25
Object.registerClass("SoundBtMainMenu", SoundBtMainMenu);
#endinitclip
Symbol 189 MovieClip [MusicBtMainMenu] Frame 1
#initclip 26
Object.registerClass("MusicBtMainMenu", MusicBtMainMenu);
#endinitclip
Symbol 200 MovieClip [Logo] Frame 98
stop();
Symbol 200 MovieClip [Logo] Frame 140
_root.gotoAndStop("advertising");
Symbol 281 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.31");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 282 MovieClip [__Packages.shooting] Frame 0
class shooting extends MovieClip
{
var exploded, b1, b2, b3, b4, b5, b6, b7, b8, localToGlobal;
function shooting () {
super();
}
function onLoad() {
step = _root.shardSpeed;
exploded = new Array();
var _local3 = 0;
while (_local3 < 8) {
exploded[_local3] = false;
_local3++;
}
}
function onEnterFrame() {
if (_root.gameIsPaused) {
return(undefined);
}
l = l + step;
if (!exploded[1]) {
b1._y = b1._y - step;
}
if (!exploded[2]) {
b2._y = -6 - (l * Math.SQRT1_2);
b2._x = -6 + (l * Math.SQRT1_2);
}
if (!exploded[3]) {
b3._x = b3._x + step;
}
if (!exploded[4]) {
b4._y = -6 + (l * Math.SQRT1_2);
b4._x = -6 + (l * Math.SQRT1_2);
}
if (!exploded[5]) {
b5._y = b5._y + step;
}
if (!exploded[6]) {
b6._y = -6 + (l * Math.SQRT1_2);
b6._x = -15 - (l * Math.SQRT1_2);
}
if (!exploded[7]) {
b7._x = b7._x - step;
}
if (!exploded[8]) {
b8._y = -10 - (l * Math.SQRT1_2);
b8._x = -15 - (l * Math.SQRT1_2);
}
if (b1.hitTest(_root.game.collisionArea) && (!exploded[1])) {
b1.gotoAndPlay("explode");
_root.gameIsOver = true;
exploded[1] = true;
}
if (b2.hitTest(_root.game.collisionArea) && (!exploded[2])) {
b2.gotoAndPlay("explode");
_root.gameIsOver = true;
exploded[2] = true;
}
if (b3.hitTest(_root.game.collisionArea) && (!exploded[3])) {
b3.gotoAndPlay("explode");
_root.gameIsOver = true;
exploded[3] = true;
}
if (b4.hitTest(_root.game.collisionArea) && (!exploded[4])) {
b4.gotoAndPlay("explode");
_root.gameIsOver = true;
exploded[4] = true;
}
if (b5.hitTest(_root.game.collisionArea) && (!exploded[5])) {
b5.gotoAndPlay("explode");
_root.gameIsOver = true;
exploded[5] = true;
}
if (b6.hitTest(_root.game.collisionArea) && (!exploded[6])) {
b6.gotoAndPlay("explode");
_root.gameIsOver = true;
exploded[6] = true;
}
if (b7.hitTest(_root.game.collisionArea) && (!exploded[7])) {
b7.gotoAndPlay("explode");
_root.gameIsOver = true;
exploded[7] = true;
}
if (b8.hitTest(_root.game.collisionArea) && (!exploded[8])) {
b8.gotoAndPlay("explode");
_root.gameIsOver = true;
exploded[8] = true;
}
var _local3 = {};
_local3.x = b1._x;
_local3.y = b1._y;
localToGlobal(_local3);
if ((!exploded[1]) && (_local3.y <= _root.game.y1Board)) {
b1.gotoAndPlay("explode");
exploded[1] = true;
}
_local3.x = b2._x;
_local3.y = b2._y;
localToGlobal(_local3);
if ((!exploded[2]) && (((_local3.x + (2 * b2._width)) >= (_root.game.x2Board + b2._width)) || (_local3.y <= _root.game.y1Board))) {
b2.gotoAndPlay("explode");
exploded[2] = true;
}
_local3.x = b3._x;
_local3.y = b3._y;
localToGlobal(_local3);
if ((!exploded[3]) && ((_local3.x + (2 * b3._width)) >= (_root.game.x2Board + b3._width))) {
b3.gotoAndPlay("explode");
exploded[3] = true;
}
_local3.x = b4._x;
_local3.y = b4._y;
localToGlobal(_local3);
if ((!exploded[4]) && (((_local3.x + (2 * b4._width)) >= (_root.game.x2Board + b4._width)) || ((_local3.y + (2 * b4._height)) >= _root.game.y2Board))) {
b4.gotoAndPlay("explode");
exploded[4] = true;
}
_local3.x = b5._x;
_local3.y = b5._y;
localToGlobal(_local3);
if ((!exploded[5]) && ((_local3.y + (2 * b5._height)) >= _root.game.y2Board)) {
b5.gotoAndPlay("explode");
exploded[5] = true;
}
_local3.x = b6._x;
_local3.y = b6._y;
localToGlobal(_local3);
if ((!exploded[6]) && ((_local3.x <= _root.game.x1Board) || ((_local3.y + (2 * b6._height)) >= _root.game.y2Board))) {
b6.gotoAndPlay("explode");
exploded[6] = true;
}
_local3.x = b7._x;
_local3.y = b7._y;
localToGlobal(_local3);
if ((!exploded[7]) && (_local3.x <= _root.game.x1Board)) {
b7.gotoAndPlay("explode");
exploded[7] = true;
}
_local3.x = b8._x;
_local3.y = b8._y;
localToGlobal(_local3);
if ((!exploded[8]) && ((_local3.x <= _root.game.x1Board) || (_local3.y <= _root.game.y1Board))) {
b8.gotoAndPlay("explode");
exploded[8] = true;
}
var _local5 = true;
var _local4 = 0;
while (_local4 < 8) {
if (!exploded[_local4 + 1]) {
_local5 = false;
break;
}
_local4++;
}
if ((delay == -1) && (_local5)) {
delay = 0;
}
if (delay >= 0) {
delay++;
}
if (delay == 25) {
gata = true;
}
}
var step = 6;
var gata = false;
var l = 0;
var delay = -1;
}
Symbol 283 MovieClip [__Packages.hsMC] Frame 0
class hsMC extends MovieClip
{
var itemNo, nameArray, scoreArray, hsArray, my_fmt, my_fmt1, my_fmt2, selectat, createTextField, getNextHighestDepth, so;
function hsMC () {
super();
}
function onLoad() {
itemNo = new Array();
nameArray = new Array();
scoreArray = new Array();
hsArray = new Array();
my_fmt = new TextFormat();
my_fmt.font = "Comic Sans MS";
my_fmt.color = 16777215 /* 0xFFFFFF */;
my_fmt.bold = true;
my_fmt.size = 14;
my_fmt1 = new TextFormat();
my_fmt1.font = "Comic Sans MS";
my_fmt1.color = 16777215 /* 0xFFFFFF */;
my_fmt1.size = 14;
my_fmt1.bold = true;
my_fmt2 = new TextFormat();
my_fmt2.font = "Comic Sans MS";
my_fmt2.color = 16777215 /* 0xFFFFFF */;
my_fmt2.size = 14;
my_fmt2.bold = true;
selectat = new TextFormat();
selectat.font = "Comic Sans MS";
selectat.color = 16711680 /* 0xFF0000 */;
selectat.size = 14;
selectat.bold = true;
var _local10 = new flash.filters.GlowFilter(16777215, 0.8, 10, 10, 2, 3, false, false);
var _local4 = new Array();
_local4.push(_local10);
var _local9 = new flash.filters.GlowFilter(16777215, 0.8, 10, 10, 2, 3, false, false);
var _local5 = new Array();
_local5.push(_local9);
var _local8 = new flash.filters.GlowFilter(6788535, 0.8, 10, 10, 2, 3, false, false);
var _local7 = new Array();
_local7.push(_local8);
var _local3 = 0;
while (_local3 < 20) {
itemNo[_local3] = createTextField("No" + String(_local3), getNextHighestDepth(), 107 + (Math.floor(_local3 / 10) * 300), 145 + ((_local3 % 10) * 23), 30, 30);
itemNo[_local3].text = String(_local3 + 1) + ".";
itemNo[_local3].selectable = false;
itemNo[_local3].embedFonts = true;
itemNo[_local3].setTextFormat(my_fmt);
itemNo[_local3].filters = _local4;
nameArray[_local3] = createTextField("Name" + String(_local3), getNextHighestDepth(), 140 + (Math.floor(_local3 / 10) * 300), 145 + ((_local3 % 10) * 23), 150, 30);
nameArray[_local3].selectable = false;
nameArray[_local3].embedFonts = true;
nameArray[_local3].filters = _local4;
nameArray[_local3].setTextFormat(my_fmt1);
scoreArray[_local3] = createTextField("Score" + String(_local3), getNextHighestDepth(), 260 + (Math.floor(_local3 / 10) * 300), 145 + ((_local3 % 10) * 23), 200, 30);
scoreArray[_local3].selectable = false;
scoreArray[_local3].embedFonts = true;
scoreArray[_local3].setTextFormat(my_fmt2);
scoreArray[_local3].filters = _local5;
_local3++;
}
getHighScores();
if (_root.curentHighScore > 0) {
var score_result = new LoadVars();
score_result.onLoad = function (success) {
if (success) {
trace(score_result);
if (score_result.rank > 0) {
_root.onlineCaption.text = ("Congratulations, your made it, you ranked no. " + score_result.rank) + " in the online TOP 500 players.";
} else {
_root.onlineCaption.text = "Sorry, your score didn't made it in the online TOP 500 players.";
}
_root.link.onPress = function () {
(this.getURL(_root._url.substring(0, _root._url.lastIndexOf("/")) + "/getScores.php?pag=1"));// not popped
};
_root.link._alpha = 100;
} else {
_root.onlineCaption = "Online Scores are not available.";
}
};
var _local6 = new LoadVars();
trace("numecurent=" + _root.numeCurent);
_local6.nume = _root.numeCurent;
_local6.score = _root.scorCurent;
_local6.action = 1;
_root.link._alpha = 30;
_local6.sendAndLoad("scores.php", score_result, "GET");
} else {
var score_result = new LoadVars();
score_result.onLoad = function (success) {
if (success) {
_root.link.onPress = function () {
(this.getURL("getScores.php?pag=1"));// not popped
};
_root.link._alpha = 100;
} else {
_root.onlineCaption = "Online Scores are not available.";
}
};
var _local6 = new LoadVars();
_local6.action = 2;
_root.link._alpha = 30;
_local6.sendAndLoad("scores.php", score_result, "GET");
}
}
function getHighScores() {
so = SharedObject.getLocal("userData");
if (so.data.nume == null) {
so.data.nume = "";
}
if (so.data.highScores == null) {
so.data.highScores = hsArray;
} else {
hsArray = so.data.highScores;
}
so.flush();
var _local3 = 0;
while (_local3 < hsArray.length) {
nameArray[_local3].text = String(hsArray[_local3].nume);
scoreArray[_local3].text = String(hsArray[_local3].scor);
if ((hsArray[_local3].nume == _root.numeCurent) && (hsArray[_local3].scor == _root.curentHighScore)) {
nameArray[_local3].setTextFormat(selectat);
scoreArray[_local3].setTextFormat(selectat);
trace("HS=" + _local3);
} else {
nameArray[_local3].setTextFormat(my_fmt1);
scoreArray[_local3].setTextFormat(my_fmt2);
}
_local3++;
}
}
function onEnterFrame() {
}
var oance = false;
}
Symbol 284 MovieClip [__Packages.menuButton] Frame 0
class menuButton extends MovieClip
{
var mouseIsOver, neon, buttonLabel, overSound, pressSound, enabled, hitTest, txt;
function menuButton () {
super();
}
function onLoad() {
mouseIsOver = false;
neon._alpha = 0;
buttonLabel._quality = "BEST";
overSound = new Sound();
pressSound = new Sound();
overSound.attachSound("blip.wav");
pressSound.attachSound("press");
}
function onMouseMove() {
if (enabled == false) {
return(undefined);
}
if (hitTest(_root._xmouse, _root._ymouse, true)) {
if (mouseIsOver == false) {
mouseIsOver = true;
if (_root.sound == 1) {
overSound.start();
}
}
} else if (mouseIsOver == true) {
mouseIsOver = false;
}
}
function onPress() {
if (_root.sound == 1) {
pressSound.start();
}
buttonLabel._x++;
buttonLabel._y++;
}
function onRelease() {
buttonLabel._x--;
buttonLabel._y--;
}
function onEnterFrame() {
if (mouseIsOver && (neon._alpha < 100)) {
if ((neon._alpha + 8) > 100) {
neon._alpha = 100;
} else {
neon._alpha = neon._alpha + 8;
}
}
if ((!mouseIsOver) && (neon._alpha > 0)) {
if ((neon._alpha - 8) < 0) {
neon._alpha = 0;
} else {
neon._alpha = neon._alpha - 8;
}
}
if (txt != buttonLabel.text) {
buttonLabel.text = txt;
}
}
}
Symbol 285 MovieClip [__Packages.PauseBt] Frame 0
class PauseBt extends MovieClip
{
var hint, playMC, pauseMC, _xmouse, _ymouse, _alpha;
function PauseBt () {
super();
}
function onLoad() {
hint._visible = false;
playMC._visible = false;
pauseMC._visible = true;
}
function onPress() {
if (_root.gameIsOver) {
return(undefined);
}
if ((((_xmouse > 25) && (_xmouse < 55)) && (_ymouse > 0)) && (_ymouse < 20)) {
gamePlaying = !gamePlaying;
}
}
function onMouseMove() {
if (_root.gameIsOver) {
return(undefined);
}
if ((((_xmouse > 25) && (_xmouse < 55)) && (_ymouse > 0)) && (_ymouse < 20)) {
hint._visible = true;
} else {
hint._visible = false;
}
}
function onEnterFrame() {
if (_root.gameIsOver && (hint._visible)) {
hint._visible = false;
}
if (_root.gameIsOver) {
_alpha = 30;
}
if (_root.gameIsOver) {
return(undefined);
}
if (gamePlaying && (_root.gameIsPaused == true)) {
_root.gameIsPaused = false;
playMC._visible = false;
pauseMC._visible = true;
_root.pausedMC._visible = false;
}
if ((!gamePlaying) && (_root.gameIsPaused == false)) {
_root.gameIsPaused = true;
playMC._visible = true;
pauseMC._visible = false;
_root.pausedMC._visible = true;
}
}
var gamePlaying = true;
}
Symbol 286 MovieClip [__Packages.SoundBt] Frame 0
class SoundBt extends MovieClip
{
var hint, so, _xmouse, _ymouse, _alpha, off;
function SoundBt () {
super();
}
function onLoad() {
hint._visible = false;
so = SharedObject.getLocal("userData");
}
function onPress() {
if (_root.gameIsOver) {
return(undefined);
}
if ((((_xmouse > 0) && (_xmouse < 30)) && (_ymouse > 0)) && (_ymouse < 20)) {
stare = !stare;
}
}
function onMouseMove() {
if (_root.gameIsOver) {
return(undefined);
}
if ((((_xmouse > 0) && (_xmouse < 30)) && (_ymouse > 0)) && (_ymouse < 20)) {
hint._visible = true;
} else {
hint._visible = false;
}
}
function onEnterFrame() {
if (_root.gameIsOver && (hint._visible)) {
hint._visible = false;
}
if (_root.gameIsOver) {
_alpha = 30;
}
if (stare && (off._visible == true)) {
off._visible = false;
_root.sound = 1;
so.data.music = _root.music;
so.data.sound = _root.sound;
so.flush();
}
if ((!stare) && (off._visible == false)) {
off._visible = true;
_root.sound = 0;
so.data.music = _root.music;
so.data.sound = _root.sound;
so.flush();
}
}
var stare = true;
}
Symbol 287 MovieClip [__Packages.MusicBt] Frame 0
class MusicBt extends MovieClip
{
var hint, so, _xmouse, _ymouse, _alpha, off;
function MusicBt () {
super();
}
function onLoad() {
hint._visible = false;
so = SharedObject.getLocal("userData");
}
function onPress() {
if (_root.gameIsOver) {
return(undefined);
}
if ((((_xmouse > -25) && (_xmouse < 5)) && (_ymouse > 0)) && (_ymouse < 20)) {
stare = !stare;
}
}
function onMouseMove() {
if (_root.gameIsOver) {
return(undefined);
}
if ((((_xmouse > -25) && (_xmouse < 5)) && (_ymouse > 0)) && (_ymouse < 20)) {
hint._visible = true;
} else {
hint._visible = false;
}
}
function onEnterFrame() {
if (_root.gameIsOver && (hint._visible)) {
hint._visible = false;
}
if (_root.gameIsOver) {
_alpha = 30;
}
if (stare && (off._visible == true)) {
off._visible = false;
_root.music = 1;
so.data.music = _root.music;
so.data.sound = _root.sound;
so.flush();
}
if ((!stare) && (off._visible == false)) {
off._visible = true;
_root.music = 0;
so.data.music = _root.music;
so.data.sound = _root.sound;
so.flush();
}
}
var stare = true;
}
Symbol 288 MovieClip [__Packages.calculateScore] Frame 0
class calculateScore extends MovieClip
{
var _alpha, timeField, stationaryField, movingField, totalField, x1, x2, x3, icon1, icon2, icon3, my_fmt;
function calculateScore () {
super();
}
function onLoad() {
_alpha = 0;
timeField.text = "";
stationaryField.text = "";
movingField.text = "";
totalField.text = "";
x1._visible = false;
x2._visible = false;
x3._visible = false;
icon1._visible = false;
icon2._visible = false;
icon3._visible = false;
my_fmt = new TextFormat();
my_fmt.font = "Comic Sans MS";
my_fmt.color = 16711680 /* 0xFF0000 */;
my_fmt.bold = true;
my_fmt.size = 14;
}
function onEnterFrame() {
if (!go) {
return(undefined);
}
if (done) {
return(undefined);
}
if ((moving == 0) || (stationary == 0)) {
timeField.text = String(time);
stationaryField.text = String(stationary);
movingField.text = String(moving);
totalField.text = String(Math.round((time * moving) * stationary));
x1._visible = true;
x2._visible = true;
x3._visible = true;
icon1._visible = true;
icon2._visible = true;
icon3._visible = true;
if (stationary == 0) {
stationaryField.setTextFormat(my_fmt);
}
if (moving == 0) {
movingField.setTextFormat(my_fmt);
}
if (_alpha >= 100) {
done = true;
} else {
_alpha = _alpha + 2;
}
return(undefined);
}
_alpha = 100;
delay++;
icon3._visible = true;
timeField.text = String(time);
x1._visible = true;
x3._visible = true;
icon1._visible = true;
if (delay < 2) {
return(undefined);
}
if (stationaryField.text != "") {
if (Number(stationaryField.text) < stationary) {
stationaryField.text = String(Number(stationaryField.text) + 1);
totalField.text = String(Math.round(time * Number(stationaryField.text)));
delay = 0;
return(undefined);
}
} else {
if (stationary == 0) {
stationaryField.text = String(0);
stationaryField._y--;
stationaryField.setTextFormat(my_fmt);
} else {
stationaryField.text = String(1);
}
totalField.text = String(time * Number(stationaryField.text));
return(undefined);
}
icon2._visible = true;
x2._visible = true;
if (movingField.text != "") {
if (Number(movingField.text) < moving) {
movingField.text = String(Number(movingField.text) + 1);
totalField.text = String(Math.round((time * Number(movingField.text)) * stationary));
delay = 0;
return(undefined);
}
} else {
if (moving == 0) {
movingField.text = String(0);
movingField._y--;
movingField.setTextFormat(my_fmt);
} else {
movingField.text = String(1);
}
totalField.text = String((stationary * time) * Number(movingField.text));
return(undefined);
}
done = true;
}
var time = 0;
var stationary = 0;
var moving = 0;
var total = 0;
var go = false;
var delay = 0;
var done = false;
}
Symbol 289 MovieClip [__Packages.ratings] Frame 0
class ratings extends MovieClip
{
var g1, g2, g3, g4, g5, scor;
function ratings () {
super();
}
function onLoad() {
g1._visible = false;
g2._visible = false;
g3._visible = false;
g4._visible = false;
g5._visible = false;
}
function setStars() {
g1._visible = false;
g2._visible = false;
g3._visible = false;
g4._visible = false;
g5._visible = false;
if (scor > _root.rating0) {
g1._visible = true;
}
if (scor > _root.rating1) {
g2._visible = true;
}
if (scor > _root.rating2) {
g3._visible = true;
}
if (scor > _root.rating3) {
g4._visible = true;
}
if (scor > _root.rating4) {
g5._visible = true;
}
scor = -1;
}
function onEnterFrame() {
if (scor >= 0) {
setStars();
}
}
}
Symbol 290 MovieClip [__Packages.starCrash] Frame 0
class starCrash extends MovieClip
{
var s2, s3, s11, mask, collisionArea, nameDialog, overBanner, shardArray, soundButton, musicButton, playerMC, _xmouse, _ymouse, apearMC, arena, stationary, background1, background2, background3, hsArray, noHS, inGameMusic, so, movingPill, movingField, stationaryField, timeField, topScoreField, attachMovie, getNextHighestDepth;
function starCrash () {
super();
}
function onLoad() {
s2 = new Sound();
s2.attachSound("Player_die_edit.mp3");
s3 = new Sound();
s3.attachSound("StarForm_Test_156327.mp3");
s11 = new Sound();
s11.attachSound("Player_start_edit.mp3");
var b = this;
shardsTime = _root.initialShardInterval;
_root.pausedMC._visible = false;
mask._visible = true;
collisionArea._visible = false;
nameDialog._alpha = 0;
overBanner._alpha = 0;
shardArray = new Array();
if (_root.sound == 1) {
soundButton.stare = true;
} else {
soundButton.stare = false;
}
if (_root.music == 1) {
musicButton.stare = true;
} else {
musicButton.stare = false;
}
playerMC._x = _xmouse - (playerMC._width / 2);
playerMC._y = _ymouse - (playerMC._height / 2);
playerMC._alpha = 0;
collisionArea._x = playerMC._x + ((playerMC._width - collisionArea._width) / 2);
collisionArea._y = playerMC._y + ((playerMC._height - collisionArea._height) / 2);
apearMC._x = playerMC._x - 27;
apearMC._y = playerMC._y - 35;
apearMC._alpha = 0;
playerMC.hitArea = collisionArea;
arena._alpha = 0;
stationary._visible = false;
if ((((_xmouse > x1Board) && (_xmouse < x2Board)) && (_ymouse > y1Board)) && (_ymouse < y2Board)) {
Mouse.hide();
}
background1._x = 2000;
background2._x = 2000;
background3._x = 2000;
trace(_root.imagePath);
switch (_root.imagePath) {
case "image1.jpg" :
background1._x = 0;
break;
case "image2.jpg" :
background2._x = 0;
break;
case "image3.jpg" :
background3._x = 0;
}
loaded = true;
hsArray = new Array();
getHighScores();
nameDialog.okButton.txt = "OK";
nameDialog.okButton.enabled = false;
nameDialog._x = -550;
nameDialog.okButton.onPress = function () {
if (b.nameDialog.nameForm.text == "") {
return(undefined);
}
var _local2 = new Object();
_local2.submited = function () {
trace("score submited");
_root.getURL("http://www.smileygamer.com/highscores/star-crash.html?gameref=1132", "_blank");
_root.gotoAndPlay("mainMenu");
};
b.nameDialog._x = 1000;
mochi.MochiScores.setBoardID("18ee616f7193b6ae");
mochi.MochiScores.submit(_root.scorCurent, b.nameDialog.nameForm.text, _local2, "submited");
_root.numeCurent = b.nameDialog.nameForm.text;
b.hsArray.push({nume:b.nameDialog.nameForm.text, scor:_root.scorCurent});
b.hsArray.sortOn("scor", Array.DESCENDING | Array.NUMERIC);
if (b.hsArray.length > 20) {
b.hsArray.pop();
}
b.so.data.highScores = b.hsArray;
b.so.data.nume = b.nameDialog.nameForm.text;
b.so.data.sound = _root.sound;
b.so.data.music = _root.music;
b.so.flush();
_root.winInRow++;
};
nameDialog.okButton.onRelease = function () {
};
noHS.mainMenuButton.txt = "GoTo Main Menu";
noHS.playAgainButton.txt = "Play Again";
noHS.mainMenuButton.enabled = false;
noHS.playAgainButton.enabled = false;
noHS._alpha = 0;
noHS._x = 1000;
noHS.mainMenuButton.onPress = function () {
_root.winInRow = 0;
_root.gotoAndPlay("mainMenu");
};
noHS.playAgainButton.onPress = function () {
_root.winInRow = 0;
_root.gotoAndPlay("playAgainDetour");
};
overBanner.playerRating._alpha = 0;
overBanner.yourScoreText._visible = false;
inGameMusic = new Sound();
inGameMusic.attachSound("InGameMusic.mp3");
if (_root.music == 1) {
inGameMusic.start(0, 100);
musicIsPlaying = true;
}
}
function getHighScores() {
so = SharedObject.getLocal("userData");
if (so.data.nume == null) {
so.data.nume = "";
} else {
_root.numeCurent = so.data.nume;
nameDialog.nameForm.text = so.data.nume;
}
if (so.data.highScores == null) {
so.data.highScores = hsArray;
} else {
hsArray = so.data.highScores;
}
so.flush();
}
function onMouseMove() {
if (_root.gameIsOver) {
Mouse.show();
return(undefined);
}
if (_root.gameIsPaused) {
Mouse.show();
return(undefined);
}
if ((((_xmouse > (x1Board + 10)) && (_xmouse < (x2Board - 10))) && (_ymouse > (y1Board + 10))) && (_ymouse < (y2Board - 10))) {
Mouse.hide();
} else {
Mouse.show();
}
if ((_xmouse > (x1Board + 10)) && (_xmouse < (x2Board - 10))) {
if (!_root.gameIsOver) {
playerMC._x = _xmouse - (playerMC._width / 2);
}
}
if ((_ymouse > (y1Board + 10)) && (_ymouse < (y2Board - 10))) {
if (!_root.gameIsOver) {
playerMC._y = _ymouse - (playerMC._height / 2);
}
}
if (_xmouse <= (x1Board + 10)) {
playerMC._x = (x1Board + 10) - (playerMC._width / 2);
}
if (_xmouse >= (x2Board - 10)) {
playerMC._x = (x2Board - 10) - (playerMC._width / 2);
}
if (_ymouse <= (y1Board + 10)) {
playerMC._y = (y1Board + 10) - (playerMC._height / 2);
}
if (_ymouse >= (y2Board - 10)) {
playerMC._y = (y2Board - 10) - (playerMC._height / 2);
}
collisionArea._x = playerMC._x + ((playerMC._width - collisionArea._width) / 2);
collisionArea._y = playerMC._y + ((playerMC._height - collisionArea._height) / 2);
apearMC._x = playerMC._x - 27;
apearMC._y = playerMC._y - 35;
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function onEnterFrame() {
if (!loaded) {
return(undefined);
}
if (mask._alpha > 0) {
mask._alpha = mask._alpha - 3;
}
if (!_root.gameIsOver) {
if ((_root.music == 0) && (musicIsPlaying)) {
inGameMusic.stop("InGameMusic.mp3");
musicIsPlaying = false;
}
if ((_root.music == 1) && (!musicIsPlaying)) {
inGameMusic.start(0, 100);
musicIsPlaying = true;
trace("canta muzica");
}
}
if (_root.gameIsPaused && (!_root.gameIsOver)) {
return(undefined);
}
if (_root.gameIsOver) {
Mouse.show();
movingPill._alpha = movingPill._alpha - 5;
if (musicIsPlaying) {
inGameMusic.stop("InGameMusic.mp3");
}
musicIsPlaying = false;
if (movingPill.exploded) {
movingPill.removeMovieClip();
movingPill = null;
}
}
if ((_root.gameIsOver && ((movingPill == null) || (movingPill._alpha <= 0))) && (stationary._alpha <= 0)) {
if (overBanner._alpha < 100) {
overBanner._alpha = overBanner._alpha + 1;
overBanner.scoreCaption.text = ("Your score is " + String(Math.round((Number(timeField.text) * Number(stationaryField.text)) * Number(movingField.text)))) + " points";
overBanner.playerRating.scor = Math.round((Number(timeField.text) * Number(stationaryField.text)) * Number(movingField.text));
overBanner.scoreCalculator.time = Number(timeField.text);
overBanner.scoreCalculator.stationary = stationaryCollected;
overBanner.scoreCalculator.moving = movingCollected;
} else {
var _local5 = Math.round((Number(timeField.text) * Number(stationaryField.text)) * Number(movingField.text));
overBanner.scoreCalculator.go = true;
overBanner.yourScoreText._visible = true;
if (!overBanner.scoreCalculator.done) {
return(undefined);
}
if (overBanner.playerRating._alpha < 100) {
overBanner.playerRating._alpha = overBanner.playerRating._alpha + 2;
return(undefined);
}
if (_local5 != 0) {
if (nameDialog._x != 1000) {
nameDialog._x = 170;
}
nameDialog.okButton.enabled = true;
_root.scorCurent = _local5;
_root.curentHighScore = _local5;
_root.onlineCaption.text = "";
if (nameDialog._alpha < 72) {
nameDialog._alpha = nameDialog._alpha + 3;
return(undefined);
}
noHS.mainMenuButton.enabled = true;
noHS.playAgainButton.enabled = true;
noHS._x = 170;
noHS._y = 355;
if (noHS._alpha < 72) {
noHS._alpha = noHS._alpha + 3;
}
} else {
_root.scorCurent = -1;
_root.curentHighScore = -1;
noHS.mainMenuButton.enabled = true;
noHS.playAgainButton.enabled = true;
noHS._x = 170;
noHS._y = 255;
if (noHS._alpha < 72) {
noHS._alpha = noHS._alpha + 3;
}
}
}
}
if (arena._alpha < 100) {
arena._alpha = arena._alpha + 4;
return(undefined);
}
if (_root.gameIsOver == true) {
delay++;
if (delay == 1) {
playerMC.gotoAndPlay("explode");
apearMC._visible = false;
if (_root.sound == 1) {
s2.start();
}
}
return(undefined);
}
timer++;
timeField.text = String(Math.floor(timer / 3) / 10);
topScoreField.text = String(Math.round((Number(timeField.text) * Number(stationaryField.text)) * Number(movingField.text)));
if ((timer > 2) && (playerMC._alpha < 100)) {
if (((timer == 3) && (_root.music == 0)) && (_root.sound == 1)) {
s11.start();
}
playerMC._alpha = playerMC._alpha + 5;
if (playerMC._alpha <= 65) {
apearMC._alpha = apearMC._alpha + 10;
} else {
apearMC._alpha = apearMC._alpha - 10;
}
}
if (timer == _root.stationaryFirstTime) {
stationary._x = randRange(x1Board + 30, x2Board - 30);
stationary._y = randRange(y1Board + 30, y2Board - 30);
stationary._visible = true;
stationary._alpha = 0;
}
if (contorIndependent2 > 0) {
contorIndependent2--;
}
if ((timer == _root.movingFirstTime) || ((((timer > _root.movingFirstTime) && (_root.gameIsOver == false)) && (movingPill == null)) && (contorIndependent2 == 0))) {
movingPill = attachMovie("movingMC", "moving" + elemente, getNextHighestDepth(), {_x:-100, _y:-50});
elemente++;
}
contorIndependent++;
if (((timer > 60) && (contorIndependent >= shardsTime)) && (nShards < _root.maxShards)) {
contorIndependent = 0;
shardArray[nShards] = attachMovie("shard", "shard" + elemente, getNextHighestDepth(), {_x:randRange(x1Board + 50, x2Board - 50), _y:randRange(y1Board + 50, y2Board - 50)});
if (shardsTime > 14) {
shardsTime--;
}
nShards++;
elemente++;
if (_root.sound == 1) {
s3.start();
}
}
if ((collisionArea.hitTest(stationary) && (stationary._currentframe == 1)) && (stationary._alpha > 50)) {
if (playerMC.getDepth() < stationary.getDepth()) {
playerMC.swapDepths(stationary);
}
stationary.gotoAndPlay("explode");
stationaryCollected++;
stationaryField.text = String(stationaryCollected);
}
if (movingPill.hitTest(collisionArea) && (movingPill.delay < 0)) {
if (playerMC.getDepth() < movingPill.getDepth()) {
playerMC.swapDepths(movingPill);
}
movingCollected++;
movingField.text = String(movingCollected);
movingPill.delay = 0;
}
var _local4 = 0;
while (_local4 < nShards) {
if (shardArray[_local4].shootingBullets.gata) {
shardArray[_local4].removeMovieClip();
var _local3 = _local4;
while (_local3 < (nShards - 1)) {
shardArray[_local3] = shardArray[_local3 + 1];
_local3++;
}
nShards--;
}
_local4++;
}
if (movingPill.exploded) {
movingPill.removeMovieClip();
movingPill = null;
contorIndependent2 = _root.movingInterval;
}
}
var timer = 0;
var x1Board = 20;
var y1Board = 50;
var x2Board = 680;
var y2Board = 480;
var stationaryCollected = 0;
var movingCollected = 0;
var nShards = 0;
var shardsTime = 70;
var movingTime = 1;
var contorIndependent = 0;
var contorIndependent2 = 1;
var elemente = 0;
var gameOver = false;
var delay = 0;
var loaded = false;
var musicIsPlaying = false;
}
Symbol 291 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 292 MovieClip [__Packages.SoundBtMainMenu] Frame 0
class SoundBtMainMenu extends MovieClip
{
var so, stare, _xmouse, _ymouse, soundText;
function SoundBtMainMenu () {
super();
}
function onLoad() {
so = SharedObject.getLocal("userData");
}
function onPress() {
if (stare == undefined) {
return(undefined);
}
if ((((_xmouse > 0) && (_xmouse < 72)) && (_ymouse > 0)) && (_ymouse < 22)) {
stare = !stare;
}
}
function onMouseMove() {
}
function onEnterFrame() {
if (stare == undefined) {
return(undefined);
}
if (stare && (soundText.text != "Sound ON")) {
soundText.text = "Sound ON";
_root.sound = 1;
so.data.music = _root.music;
so.data.sound = _root.sound;
so.flush();
}
if ((!stare) && (soundText.text != "Sound OFF")) {
soundText.text = "Sound OFF";
_root.sound = 0;
so.data.music = _root.music;
so.data.sound = _root.sound;
so.flush();
}
}
}
Symbol 293 MovieClip [__Packages.MusicBtMainMenu] Frame 0
class MusicBtMainMenu extends MovieClip
{
var so, stare, _xmouse, _ymouse, musicText;
function MusicBtMainMenu () {
super();
}
function onLoad() {
so = SharedObject.getLocal("userData");
}
function onPress() {
if (stare == undefined) {
return(undefined);
}
if ((((_xmouse > 0) && (_xmouse < 80)) && (_ymouse > 0)) && (_ymouse < 22)) {
stare = !stare;
}
}
function onMouseMove() {
}
function onEnterFrame() {
if (stare == undefined) {
return(undefined);
}
if (stare && (musicText.text != "Music ON")) {
musicText.text = "Music ON";
_root.music = 1;
so.data.music = _root.music;
so.data.sound = _root.sound;
so.flush();
}
if ((!stare) && (musicText.text != "Music OFF")) {
musicText.text = "Music OFF";
_root.music = 0;
so.data.music = _root.music;
so.data.sound = _root.sound;
so.flush();
}
}
}
Symbol 294 MovieClip [__Packages.movingMC] Frame 0
class movingMC extends MovieClip
{
var speed, dir, _x, _y, _alpha, _height, gotoAndPlay;
function movingMC () {
super();
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function onLoad() {
speed = _root.movingSpeed;
dir = randRange(1, 20);
if (dir <= 5) {
dir = 0;
} else if ((dir > 5) && (dir <= 10)) {
dir = 1;
} else if ((dir > 10) && (dir <= 15)) {
dir = 2;
} else if ((dir > 15) && (dir <= 20)) {
dir = 3;
}
switch (dir) {
case 0 :
_x = -10;
_y = randRange(_root.game.y1Board + 30, _root.game.y2Board - 30);
break;
case 1 :
_x = 695;
_y = randRange(_root.game.y1Board + 30, _root.game.y2Board - 30);
break;
case 2 :
_x = randRange(_root.game.x1Board + 30, _root.game.x2Board - 30);
_y = -10;
break;
case 3 :
_x = randRange(_root.game.x1Board + 30, _root.game.x2Board - 30);
_y = 520;
}
_alpha = 0;
}
function onEnterFrame() {
if (_root.gameIsPaused) {
return(undefined);
}
if (speed == undefined) {
speed = 4;
}
if (delay > 0) {
delay++;
}
if (delay == 35) {
exploded = true;
}
if (delay < 0) {
if (dir == 0) {
_x = _x + speed;
}
if (dir == 1) {
_x = _x - speed;
}
if (dir == 2) {
_y = _y + speed;
}
if (dir == 3) {
_y = _y - speed;
}
}
if ((delay < 0) && (_root.gameIsOver == false)) {
if ((((_x <= _root.game.x1Board) || ((_x + 15) >= _root.game.x2Board)) || (_y <= _root.game.y1Board)) || ((_y + _height) >= _root.game.y2Board)) {
_alpha = 0;
} else {
_alpha = 100;
}
}
if ((delay < 0) && ((((_x <= -20) || ((_x + 15) >= 730)) || (_y <= -20)) || ((_y + _height) >= 565))) {
gotoAndPlay(40);
delay = 33;
}
if (delay == 0) {
gotoAndPlay("explode");
delay = 1;
}
}
var exploded = false;
var delay = -1;
}
Symbol 295 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 252 MovieClip Frame 80
stop();
Symbol 280 MovieClip Frame 40
stop();