Frame 1
stop();
onEnterFrame = function () {
loader._width = 347.9 * ((getBytesLoaded() - 196718) / (getBytesTotal() - 196718));
if (loader._width > 346) {
loadedplay.onRelease = function () {
gotoAndStop (2);
};
}
ad_shockgames.onRelease = function () {
getURL ("http://www.shockgames.info", "_blank");
};
more.onRelease = function () {
getURL ("http://www.shockgames.info", "_blank");
};
};
Frame 2
function setup() {
level = parseInt(lvl.text);
if (level > 1) {
info._alpha = 0;
}
lvlpower = (power = (power2 = 0.2 + (level / 100)));
ball._alpha = (ball2._alpha = 0);
yspeed = (yspeed2 = 0);
xspeed = (xspeed2 = 0);
bumpx = (bumpx2 = 0);
bumpy = (bumpy2 = 0);
boost = (boost2 = 0);
ball.loser = false;
ball2.loser = false;
ball.setMask(null);
ball2.setMask(null);
ball._x = start_x;
ball._y = start_y;
ball2._x = 387;
ball2._y = 128;
perspective(ball);
perspective(ball2);
ai_set = false;
}
function perspective(obj) {
perc = ((obj._y / Stage.height) * 0.5) + 0.7;
obj._width = ball_width * perc;
obj._height = ball_width * perc;
}
function createExplosion(x, y, max, sameColor) {
var _local2;
if (sameColor) {
_local2 = colors[int(Math.random() * colors.length)];
}
var _local1 = 0;
while (_local1 < max) {
if (!sameColor) {
_local2 = colors[int(Math.random() * colors.length)];
}
attachMovie("Particle", "P" + currentParticle, getNextHighestDepth(), {_x:x, _y:y, rgbValue:_local2});
currentParticle++;
_local1++;
}
}
stop();
lvlpower = (power = 0.2);
power2 = 0.2;
yspeed = (yspeed2 = 0);
xspeed = (xspeed2 = 0);
friction = 0.95;
boost = (boost2 = 0);
ball_width = 376;
total_lives = (lives = 5);
start_x = 165;
start_y = 224;
var rootMenu = new ContextMenu();
rootMenu.hideBuiltInItems();
_root.menu = rootMenu;
pc = flash.display.BitmapData.loadBitmap("pixelcheck");
createEmptyMovieClip("image", 5);
attachMovie("ball", "ball2", 1, {_x:start_x, _y:start_y});
attachMovie("ball", "ball", 2, {_x:387, _y:start_y});
ball.texture.gotoAndStop(1);
ball.texture.setMask(ball.ball_itself);
ball.theshadow.setMask(theshadow_mask);
ball2.texture.gotoAndStop(2);
ball2.texture.setMask(ball2.ball_itself);
ball2.theshadow.setMask(theshadow_mask2);
ball.aura.setMask(theshadow_mask3);
ball2.aura.setMask(theshadow_mask4);
level = 1;
setup();
ball.onEnterFrame = function () {
if (this._alpha < 99) {
this._alpha = this._alpha + 2;
return(undefined);
}
distance_x = Math.abs(this._x - ball2._x);
distance_y = Math.abs(this._y - ball2._y);
distance = Math.sqrt((distance_x * distance_x) + (distance_y * distance_y));
if (((!this.loser) && (!ball2.loser)) && (distance <= 37)) {
this._x = this._x + ((this._x - ball2._x) / 10);
ball2._x = ball2._x + ((ball2._x - this._x) / 10);
this._y = this._y + ((this._y - ball2._y) / 10);
ball2._y = ball2._y + ((ball2._y - this._y) / 10);
dx = ball._x - ball2._x;
dy = ball._y - ball2._y;
collisionision_angle = Math.atan2(dy, dx);
magnitude_1 = Math.sqrt((xspeed * xspeed) + (yspeed * yspeed));
magnitude_2 = Math.sqrt((xspeed2 * xspeed2) + (yspeed2 * yspeed2));
direction_1 = Math.atan2(yspeed, xspeed);
direction_2 = Math.atan2(yspeed2, xspeed2);
final_xspeed_1 = magnitude_1 * Math.cos(direction_1 - collisionision_angle);
final_yspeed_1 = magnitude_1 * Math.sin(direction_1 - collisionision_angle);
final_xspeed_2 = magnitude_2 * Math.cos(direction_2 - collisionision_angle);
final_yspeed_2 = magnitude_2 * Math.sin(direction_2 - collisionision_angle);
bumpx2 = (Math.cos(collisionision_angle) * final_xspeed_1) + (Math.cos(collisionision_angle + (Math.PI/2)) * final_yspeed_1);
bumpy2 = (Math.sin(collisionision_angle) * final_xspeed_1) + (Math.sin(collisionision_angle + (Math.PI/2)) * final_yspeed_1);
bumpx = (Math.cos(collisionision_angle) * final_xspeed_2) + (Math.cos(collisionision_angle + (Math.PI/2)) * final_yspeed_2);
bumpy = (Math.sin(collisionision_angle) * final_xspeed_2) + (Math.sin(collisionision_angle + (Math.PI/2)) * final_yspeed_2);
bump = 1;
this._x = this._x + bumpx;
this._y = this._y + bumpy;
ball2._x = ball2._x + bumpx2;
ball2._y = ball2._y + bumpy2;
poi_x = ((this._x > ball2._x) ? (this._x - 30) : (this._x + 30));
poi_y = ((this._y > ball2._y) ? (this._y - 30) : (this._y + 30));
createExplosion(poi_x, poi_y, (Math.abs(bumpx) + Math.abs(bumpy2)) * 20, Math.round(Math.random()));
createExplosion(this._x, this._y, 10, Math.round(Math.random()));
createExplosion(ball2._x, ball2._y, 10, Math.round(Math.random()));
}
if (Key.isDown(32) && (!boost)) {
power = lvlpower + 0.3;
boost = 1;
}
if (!this.loser) {
if (Key.isDown(37)) {
xspeed = xspeed - (bumpx ? (power * 3) : (power));
}
if (Key.isDown(39)) {
xspeed = xspeed + (bumpx ? (power * 3) : (power));
}
if (Key.isDown(38)) {
yspeed = yspeed - (bumpy ? (power * 3) : (power));
}
if (Key.isDown(40)) {
yspeed = yspeed + (bumpy ? (power * 3) : (power));
}
yspeed = (bumpy ? (bumpy + (yspeed / 2)) : (yspeed));
xspeed = (bumpx ? (bumpx + (xspeed / 2)) : (xspeed));
} else {
if (this._x > (Stage.width / 2)) {
xspeed = xspeed - (bumpx ? (power * 2) : (power));
}
if (this._x < (Stage.width / 2)) {
xspeed = xspeed + (bumpx ? (power * 2) : (power));
}
if (this._y > (Stage.height + 100)) {
yspeed = yspeed - (bumpy ? (power * 3) : (power * 3));
}
if (this._y < (Stage.height + 100)) {
yspeed = yspeed + (bumpy ? (power * 3) : (power * 3));
}
this._width = this._width - 2;
this._height = this._height - 2;
}
xspeed = xspeed * friction;
yspeed = yspeed * friction;
if ((Math.abs(bumpx) > 0.1) || (Math.abs(bumpy) > 0.1)) {
bumpx = bumpx * friction;
bumpy = bumpy * friction;
} else if ((bumpx != 0) || (bumpy != 0)) {
bumpx = 0;
bumpy = 0;
}
if ((Math.abs(xspeed) > 0.1) || (Math.abs(yspeed) > 0.1)) {
this._y = this._y + yspeed;
this._x = this._x + xspeed;
this.texture._y = this.texture._y + yspeed;
this.texture._x = this.texture._x + xspeed;
} else if ((xspeed != 0) || (yspeed != 0)) {
}
if (this.texture._x > 158) {
this.texture._x = this.texture._x - 188;
}
if (this.texture._x < -158) {
this.texture._x = this.texture._x + 188;
}
if (this.texture._y > 158) {
this.texture._y = this.texture._y - 188;
}
if (this.texture._y < -158) {
this.texture._y = this.texture._y + 188;
}
if (boost) {
boost++;
if (this.aura._alpha > 0) {
this.aura._alpha = this.aura._alpha - 15;
}
}
if (boost > 15) {
power = lvlpower;
}
if (boost > 200) {
boost = 0;
}
if ((boost == 0) && (this.aura._alpha < 100)) {
this.aura._alpha = this.aura._alpha + 5;
}
if (bump) {
bump++;
}
if (bump > 30) {
bump = 0;
}
if (((this._y < ball2._y) && (this.getDepth() == 2)) || ((this._y > ball2._y) && (this.getDepth() == 1))) {
ball2.swapDepths(this.getDepth());
}
if (!this.loser) {
perspective(this);
}
if (pc.getPixel(this._x, this._y + 30).toString(16) != 0) {
if ((!this.loser) && (this._y < (Stage.height / 2))) {
this.setMask(platform_mask);
}
if ((!this.loser) && (!ball2.loser)) {
lives_string = "";
lives = lives - 1;
if (lives == 0) {
this.removeMovieClip();
ball2.removeMovieClip();
_global.lvl = lvl.text;
gotoAndStop (3);
}
i = 0;
while (i < lives) {
lives_string = lives_string + ".";
i++;
}
livestxt.text = lives_string;
}
this.loser = true;
}
if (this.loser && (this._y > Stage.height)) {
setup();
}
};
ball2.onEnterFrame = function () {
if (this._alpha < 99) {
this._alpha = this._alpha + 2;
return(undefined);
}
if (!ai_set) {
rand = Math.random();
if (rand >= 0) {
ai = 1;
}
if (rand >= 0.2) {
ai = 2;
}
if (rand >= 0.5) {
ai = 3;
}
if (rand >= 0.7) {
pointx = ball._x;
pointy = ball._y;
ai = 4;
}
if ((level >= 12) && (Math.random() > 0.6)) {
ai = 2;
}
ai_set = 1;
}
if (!this.loser) {
if (ai == 1) {
if (this._x > (Stage.width / 2)) {
xspeed2 = xspeed2 - (bumpx2 ? (power2 * 3) : (power2));
}
if (this._x < (Stage.width / 2)) {
xspeed2 = xspeed2 + (bumpx2 ? (power2 * 3) : (power2));
}
if (this._y > (Stage.height / 2)) {
yspeed2 = yspeed2 - (bumpy2 ? (power2 * 3) : (power2));
}
if (this._y < (Stage.height / 2)) {
yspeed2 = yspeed2 + (bumpy2 ? (power2 * 3) : (power2));
}
} else if (ai == 2) {
if ((((Math.random() > 0.9) && (!boost2)) && (!bumpx2)) && (!bumpy2)) {
power2 = lvlpower + 0.3;
boost2 = 1;
}
if (ball._x < this._x) {
xspeed2 = xspeed2 - (bumpx2 ? (power2 * 3) : (power2));
}
if (ball._x > this._x) {
xspeed2 = xspeed2 + (bumpx2 ? (power2 * 3) : (power2));
}
if (ball._y < this._y) {
yspeed2 = yspeed2 - (bumpy2 ? (power2 * 3) : (power2));
}
if (ball._y > this._y) {
yspeed2 = yspeed2 + (bumpy2 ? (power2 * 3) : (power2));
}
} else if (ai == 3) {
if (this._x > (Stage.width / 2)) {
xspeed2 = xspeed2 - (bumpx2 ? (power2 * 3) : (power2));
}
if (this._x < (Stage.width / 2)) {
xspeed2 = xspeed2 + (bumpx2 ? (power2 * 3) : (power2));
}
if (ball._y < this._y) {
yspeed2 = yspeed2 - (bumpy2 ? (power2 * 3) : (power2));
}
if (ball._y > this._y) {
yspeed2 = yspeed2 + (bumpy2 ? (power2 * 3) : (power2));
}
} else if (ai == 4) {
if (pointx < this._x) {
xspeed2 = xspeed2 - (bumpx2 ? (power2 * 3) : (power2));
}
if (pointx > this._x) {
xspeed2 = xspeed2 + (bumpx2 ? (power2 * 3) : (power2));
}
if (pointy < this._y) {
yspeed2 = yspeed2 - (bumpy2 ? (power2 * 3) : (power2));
}
if (pointy > this._y) {
yspeed2 = yspeed2 + (bumpy2 ? (power2 * 3) : (power2));
}
}
yspeed2 = (bumpy2 ? (bumpy2 + (yspeed2 / 2)) : (yspeed2));
xspeed2 = (bumpx2 ? (bumpx2 + (xspeed2 / 2)) : (xspeed2));
} else {
if (this._x > (Stage.width / 2)) {
xspeed2 = xspeed2 - (bumpx2 ? (power2 * 2) : (power2));
}
if (this._x < (Stage.width / 2)) {
xspeed2 = xspeed2 + (bumpx2 ? (power2 * 2) : (power2));
}
if (this._y > (Stage.height + 100)) {
yspeed2 = yspeed2 - (bumpy2 ? (power2 * 3) : (power2 * 3));
}
if (this._y < (Stage.height + 100)) {
yspeed2 = yspeed2 + (bumpy2 ? (power2 * 3) : (power2 * 3));
}
this._width = this._width - 2;
this._height = this._height - 2;
}
xspeed2 = xspeed2 * friction;
yspeed2 = yspeed2 * friction;
if ((Math.abs(bumpx2) > 0.1) || (Math.abs(bumpy2) > 0.1)) {
bumpx2 = bumpx2 * friction;
bumpy2 = bumpy2 * friction;
} else if ((bumpx2 != 0) || (bumpy2 != 0)) {
bumpx2 = 0;
bumpy2 = 0;
}
if ((Math.abs(xspeed2) > 0.1) || (Math.abs(yspeed2) > 0.1)) {
this._y = this._y + yspeed2;
this._x = this._x + xspeed2;
this.texture._y = this.texture._y + yspeed2;
this.texture._x = this.texture._x + xspeed2;
}
if (this.texture._x > 158) {
this.texture._x = this.texture._x - 188;
}
if (this.texture._x < -158) {
this.texture._x = this.texture._x + 188;
}
if (this.texture._y > 158) {
this.texture._y = this.texture._y - 188;
}
if (this.texture._y < -158) {
this.texture._y = this.texture._y + 188;
}
if (boost2) {
boost2++;
if (this.aura._alpha > 0) {
this.aura._alpha = this.aura._alpha - 15;
}
}
if (boost2 > 15) {
power2 = lvlpower;
}
if (boost2 > 200) {
boost2 = 0;
}
if ((boost2 == 0) && (this.aura._alpha < 100)) {
this.aura._alpha = this.aura._alpha + 5;
}
if (ai_set) {
ai_set++;
}
if (ai_set > 50) {
ai_set = 0;
}
if (!this.loser) {
perspective(this);
}
if ((!this.loser) && (pc.getPixel(this._x, this._y + 30).toString(16) != 0)) {
if (this._y < (Stage.height / 2)) {
this.setMask(platform_mask2);
}
this.loser = true;
if (!ball.loser) {
lvl.text = (parseInt(lvl.text) + 1).toString();
}
}
if (this.loser && (this._y > Stage.height)) {
setup();
}
};
currentParticle = 0;
colors = new Array("0xFFC171", "0xFF8C71", "0xFFAD71", "0xFC5645");
Frame 3
endscore.text = _global.lvl;
com.ghostwire.phpobject.PHPObject.__set__defaultGatewayKey("dr4h5Ky9");
com.ghostwire.phpobject.PHPObject.__set__defaultGatewayUrl("http://merckxben.dreamhosters.com/flash/gtw.php");
com.ghostwire.phpobject.PHPObject.__set__enableMultiByte(true);
hs = new com.ghostwire.phpobject.PHPObject("highscore");
playagain.onRelease = function () {
gotoAndStop (2);
};
submit.onRelease = function () {
score = parseInt(_global.lvl);
hs.save(inputname, (("000286" + ((score + 3) * 2).toString()) + "846") + Math.round((Math.random() * 89) + 10));
};
hs.onResult = function (result) {
gotoAndStop (4);
};
Frame 4
scores.text = "";
i = 0;
while (i < 10) {
scores.text = scores.text + (((hs.scores[i].score + " - ") + hs.scores[i].name) + newline);
i++;
}
more.onRelease = function () {
getURL ("http://www.shockgames.info", "_blank");
};
Symbol 19 MovieClip [Particle] Frame 1
#initclip 5
Object.registerClass("Particle", Particle);
#endinitclip
Symbol 57 MovieClip [__Packages.Particle] Frame 0
class Particle extends MovieClip
{
var vx, vy, timeToLast, startTimer, myColor, rgbValue, _x, _y, _alpha, removeMovieClip;
function Particle () {
super();
}
function onLoad() {
var _local2 = Math.random() * 360;
vx = ((Math.cos(_local2) * Math.random()) * 10) + 1;
vy = ((Math.sin(_local2) * Math.random()) * 10) + 1;
timeToLast = (Math.random() * 200) + 100;
startTimer = getTimer();
myColor = new Color(this);
myColor.setRGB(rgbValue);
}
function onEnterFrame() {
_x = _x + vx;
_y = _y + vy;
_alpha = _alpha - 2;
if (((getTimer() - startTimer) >= timeToLast) || (_alpha == 0)) {
removeMovieClip();
}
}
}
Symbol 58 MovieClip [__Packages.com.ghostwire.phpobject.PHPObject] Frame 0
class com.ghostwire.phpobject.PHPObject
{
static var __defaultGatewayKey, __defaultGatewayUrl;
var _loader, wsdlLoc;
function PHPObject () {
if (arguments.length) {
init.apply(this, arguments);
}
}
function init() {
_loader = new com.ghostwire.phpobject.PHPLoader();
_data = [0, "", [], [], ((_data[4] == undefined) ? "" : (_data[4]))];
if (arguments) {
var _local3 = arguments[0].toString();
if ((_local3.indexOf("http://") != -1) || (_local3.indexOf("https://") != -1)) {
_data[1] = "WebServiceProxy";
wsdlLoc = _local3;
} else {
_data[1] = _local3;
if (arguments[1].length) {
_loader.gateway = arguments[1].toString();
}
if (arguments[2]) {
_data[7] = 1;
}
if (arguments[3] != undefined) {
_data[8] = arguments[3];
}
}
if (_data[1] != undefined) {
this[_data[1]]();
}
}
}
function abortExecute() {
_data[2] = [];
_data[3] = [];
if (_loader.isBusy) {
_loader.id++;
_loader.isBusy = false;
_loader.refObj.onAbort();
}
}
function delayExecute() {
_loader.delay = true;
}
function execute() {
if (_loader.delay == true) {
_loader.delay = false;
if (_data[2].length) {
__connect(_data[2][_data[2].length - 1]);
}
}
}
function getBytesLoaded() {
if (_loader.isBusy) {
return(_loader.getBytesLoaded());
}
return(false);
}
function getBytesTotal() {
if (_loader.isBusy) {
return(_loader.getBytesTotal());
}
return(false);
}
function getOutput() {
return(_loader.output);
}
function setCredentials() {
_data[5] = arguments;
}
function setGateway(u) {
_loader.gateway = u;
}
function setKey(k) {
_data[4] = k;
}
function setService() {
init.apply(this, arguments);
}
static function get enableMultiByte() {
return(com.ghostwire.phpobject.PHPSerializer.enableMultiByte);
}
static function set enableMultiByte(f) {
com.ghostwire.phpobject.PHPSerializer.enableMultiByte = f;
//return(enableMultiByte);
}
static function get defaultGatewayKey() {
return(__defaultGatewayKey);
}
static function set defaultGatewayKey(k) {
__defaultGatewayKey = k;
//return(defaultGatewayKey);
}
static function get defaultGatewayUrl() {
return(__defaultGatewayUrl);
}
static function set defaultGatewayUrl(u) {
__defaultGatewayUrl = u;
//return(defaultGatewayUrl);
}
function __resolve(method) {
if (method.indexOf("_onResult") != -1) {
return(onResult(_loader.serverResult));
}
if (method.indexOf("_onError") != -1) {
return(function () {
this.onError.apply(this, arguments);
});
}
var _local6 = true;
if (((typeof(method) != "number") && (_loader.classMethods[_data[1]])) && (_data[1] != "WebServiceProxy")) {
if (_loader.classMethods[method.toLowerCase()] == undefined) {
_local6 = false;
}
}
if (_local6) {
return(function () {
if ((!this._loader.isBusy) || (this._loader.delay)) {
if (((this._data[1] == "WebServiceProxy") && (method != "call")) && (method != "WebServiceProxy")) {
var _local6 = method;
var _local4 = [];
var _local5 = arguments.length;
var _local3 = 0;
while (_local3 < _local5) {
_local4[arguments[_local3]] = arguments[_local3 + 1];
_local3 = _local3 + 2;
}
return(this.call(_local6, _local4));
}
if ((method != undefined) && (method != this._data[1])) {
var _local7 = (((typeof(method) == "number") || (!this._loader.classMethods[this._data[1]])) ? (method) : (this._loader.classMethods[method.toLowerCase()]));
this._data[2].push(_local7);
this._data[3].push(arguments);
}
this._loader.lastMethod = method;
if (this._loader.delay) {
return(true);
}
return(this.__connect(method));
}
return(false);
});
}
onError(2, ("Error - Method '" + method) + "' not found");
return(undefined);
}
function __connect(method) {
_loader.gateway = ((_loader.gateway == "") ? (__defaultGatewayUrl) : (_loader.gateway));
if (_loader.gateway.length) {
_loader.refObj = this;
_data[4] = ((_data[4] == "") ? (__defaultGatewayKey) : (_data[4]));
_data[0] = _loader.id;
_loader.send(this, method);
_data[2] = [];
_data[3] = [];
return(true);
}
return(false);
}
var _data = [];
function onAbort() {
}
function onError(i, e) {
trace((i + ":") + e);
}
function onInit() {
}
function onResult() {
}
}
Symbol 59 MovieClip [__Packages.com.ghostwire.phpobject.PHPLoader] Frame 0
class com.ghostwire.phpobject.PHPLoader extends LoadVars
{
var lastMethod, refObj, serverError, serverResult;
function PHPLoader () {
super();
}
function onData(s) {
isBusy = false;
if (s != undefined) {
var _local2 = s.substr(0, s.indexOf("O"));
if ((_local2 == id) || (_local2 == 0)) {
parse(s.substr(_local2.length), _local2);
}
} else {
refObj[lastMethod + "_onError"](0, "Connection Failure");
}
}
function parse(s, i) {
s = com.ghostwire.phpobject.PHPSerializer.unserialize(s);
unpack(s, refObj);
if (serverError.length) {
refObj.onError(1, serverError);
} else if (i == 0) {
refObj.onInit();
} else {
refObj[lastMethod + "_onResult"](serverResult);
}
}
function unpack(s, d) {
for (var _local4 in s) {
if (_local4 == "_loader") {
for (var _local3 in s[_local4]) {
d[_local4][_local3] = s[_local4][_local3];
if (_local3 == "classMethods") {
d[_local4][_local3][d._data[1]] = true;
}
}
} else {
d[_local4] = s[_local4];
}
}
}
function pack(o) {
var _local2 = {};
for (var _local3 in o) {
if ((_local3 != "_loader") && (typeof(o[_local3]) != "function")) {
_local2[_local3] = o[_local3];
}
}
return(_local2);
}
function send(o, m) {
o = pack(o);
var _local2 = new XML(com.ghostwire.phpobject.PHPSerializer.serialize(o));
_local2.contentType = "text/plain";
_local2.sendAndLoad(gateway, this, "POST");
if (o._data[1] != m) {
isBusy = true;
} else {
id++;
}
}
var classMethods = [];
var delay = false;
var gateway = "";
var id = 0;
var isBusy = false;
}
Symbol 60 MovieClip [__Packages.com.ghostwire.phpobject.PHPSerializer] Frame 0
class com.ghostwire.phpobject.PHPSerializer
{
static var enableMultiByte;
function PHPSerializer () {
}
static function serialize(o) {
return(escape($_parseValue(o)));
}
static function unserialize(s) {
return($_getValue(s)[0]);
}
static function $_getNext(s) {
var _local2 = $_getValue(s);
s = _local2[1];
var _local3 = $_getValue(s);
s = _local3[1];
return([_local2[0], _local3[0], s]);
}
static function $_getValue(s) {
var _local3;
var _local4;
var _local7 = s.charAt(0);
switch (_local7) {
case "s" :
_local3 = s.substr(2, s.indexOf(":", 3) - 2) * 1;
_local4 = s.substr(length(_local3) + 4, _local3).toString();
if (enableMultiByte) {
_local4 = unescape(_local4);
}
break;
case "i" :
_local3 = s.substr(2, s.indexOf(";", 3) - 2) * 1;
_local4 = parseInt(_local3);
break;
case "d" :
_local3 = s.substr(2, s.indexOf(";", 3) - 2) * 1;
_local4 = parseFloat(_local3);
break;
case "b" :
_local3 = s.substr(2, s.indexOf(";", 3) - 2) * 1;
_local4 = (((_local3 == "true") || (_local3 == "1")) ? true : false);
break;
case "a" :
case "O" :
_local3 = s.substr(2, s.indexOf(":", 3) - 2) * 1;
if (_local7 == "a") {
_local4 = [];
s = s.substr(s.indexOf(_local3));
} else {
_local4 = {};
s = s.substr((length(s.substr(length(_local3) + 4, _local3)) + s.indexOf(s.substr(length(_local3) + 4, _local3))) + 2);
}
var _local6 = s.substr(0, s.indexOf(":")) * 1;
var _local5 = 0;
s = s.substr(s.indexOf(":") + 2);
while (_local5 < _local6) {
var _local2 = $_getNext(s);
s = _local2[2];
_local4[_local2[0]] = _local2[1];
_local5++;
}
return([_local4, s.substr(s.indexOf("}") + 1)]);
case "N" :
_local4 = null;
_local3 = "";
s = s.substr(1);
}
if (_local7 != "s") {
_local3 = length(_local3);
}
s = s.substr(s.indexOf(";", _local3) + 1);
return([_local4, s]);
}
static function $_parseValue(v) {
switch (v.__proto__) {
case Array.prototype :
case Object.prototype :
case MovieClip.prototype :
var _local5 = 0;
var _local4 = "";
for (var _local6 in v) {
if (typeof(v[_local6]) != "function") {
var _local2 = $_parseValue(_local6);
var _local3 = $_parseValue(v[_local6]);
_local4 = _local4 + (_local2 + _local3);
_local5++;
}
}
if (v.__proto__ == Array.prototype) {
return(((("a:" + _local5) + ":{") + _local4) + "}");
}
return(((("O:8:\"stdClass\":" + _local5) + ":{") + _local4) + "}");
case String.prototype :
if (enableMultiByte) {
v = escape(v);
}
case undefined :
case Date.prototype :
return(((("s:" + length(v)) + ":\"") + v) + "\";");
case Number.prototype :
if (isNaN(v)) {
return("N;");
}
v = Number(v);
if ((v % 1) == 0) {
return(("i:" + v) + ";");
}
return(("d:" + v) + ";");
case Boolean.prototype :
return(("b:" + ((v == true) ? 1 : 0)) + ";");
}
return(undefined);
}
}