Frame 1
stop();
Instance of Symbol 34 MovieClip in Frame 1
onClipEvent (load) {
starty = this._y;
this._y = starty + ((_root._framesloaded / _root._totalframes) * 200);
}
onClipEvent (enterFrame) {
this._y = starty + ((_root._framesloaded / _root._totalframes) * 200);
if ((_root._framesloaded / _root._totalframes) == 1) {
_root.loader.gotoAndStop(2);
}
}
Instance of Symbol 38 MovieClip "cannoncore" in Frame 1
/* no clip actions */
Frame 1095
if (done != "yep") {
var compound = 0;
var mass = 0;
var bounce = 0;
var ahwho = "";
var letter = "";
var chars = new Array();
chars[0] = "chao";
chars[1] = "sonic";
chars[2] = "amy";
chars[3] = "knux";
chars[4] = "cream";
chars[5] = "metal";
chars[6] = "silver";
chars[7] = "rouge";
chars[8] = "shadow";
chars[9] = "tails";
chars[10] = "zero";
var bg = new Array();
bg[1] = "metal";
bg[2] = "rock";
bg[3] = "moon";
bg[4] = "grass";
bg[5] = "ice";
_global.statsmass = new Array();
_global.statsbounce = new Array();
_global.boughtchar = new Array();
i = 0;
while (i < chars.length) {
compound = 0;
ahwho = chars[i];
j = 0;
while (j < 3) {
letter = ahwho.charCodeAt(j);
compound = compound + letter;
j++;
}
if (i == 0) {
mass = 30;
bounce = 1.3;
} else if (i == 1) {
mass = 35;
bounce = 1.5;
} else if (i == 2) {
mass = 30;
bounce = 1.6;
} else if (i == 3) {
mass = 40;
bounce = 1.7;
} else if (i == 4) {
mass = 32;
bounce = 1.9;
} else if (i == 5) {
mass = 60;
bounce = 1.4;
} else if (i == 6) {
mass = 80;
bounce = 1.5;
} else if (i == 7) {
mass = 33;
bounce = 1.5;
} else if (i == 8) {
mass = 36;
bounce = 1.6;
} else if (i == 9) {
mass = 34;
bounce = 1.4;
} else if (i == 10) {
mass = 40;
bounce = 1.2;
}
_global.statsmass[compound] = mass;
_global.statsbounce[compound] = bounce;
_global.boughtchar[compound] = false;
_global.rings = 50;
_global.blastgrounds = "moon";
done = "yep";
i++;
}
_global.emerald = new Array();
j = 1;
while (j < 8) {
_global.emerald[j] = false;
j++;
}
}
Frame 1096
stop();
Instance of Symbol 38 MovieClip "cannoncore" in Frame 1096
/* no clip actions */
Frame 1097
stop();
Instance of Symbol 175 MovieClip "but3" in Frame 1097
on (release) {
_root.play();
}
Frame 1098
_global.nuke = false;
stop();
Instance of Symbol 187 MovieClip in Frame 1098
onClipEvent (load) {
var who = "amy";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
}
onClipEvent (enterFrame) {
if (_global.boughtchar[whotag]) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 192 MovieClip in Frame 1098
onClipEvent (load) {
var who = "chao";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
}
onClipEvent (enterFrame) {
if (_global.boughtchar[whotag]) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 196 MovieClip in Frame 1098
onClipEvent (load) {
var who = "cream";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
}
onClipEvent (enterFrame) {
if (_global.boughtchar[whotag]) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 201 MovieClip in Frame 1098
onClipEvent (load) {
var who = "knux";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
}
onClipEvent (enterFrame) {
if (_global.boughtchar[whotag]) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 205 MovieClip in Frame 1098
onClipEvent (load) {
var who = "metal";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
}
onClipEvent (enterFrame) {
if (_global.boughtchar[whotag]) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 209 MovieClip in Frame 1098
onClipEvent (load) {
var who = "rouge";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
}
onClipEvent (enterFrame) {
if (_global.boughtchar[whotag]) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 213 MovieClip in Frame 1098
onClipEvent (load) {
var who = "shadow";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
}
onClipEvent (enterFrame) {
if (_global.boughtchar[whotag]) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 218 MovieClip in Frame 1098
onClipEvent (load) {
var who = "silver";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
}
onClipEvent (enterFrame) {
if (_global.boughtchar[whotag]) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 222 MovieClip in Frame 1098
onClipEvent (load) {
var who = "tails";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
}
onClipEvent (enterFrame) {
if (_global.boughtchar[whotag]) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 225 MovieClip in Frame 1098
onClipEvent (load) {
var who = "sonic";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
}
onClipEvent (enterFrame) {
if (_global.boughtchar[whotag]) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 268 MovieClip "swords" in Frame 1098
onClipEvent (load) {
var counter = 0;
i = 1;
while (i < 8) {
if (_global.emerald[i]) {
counter = counter + 1;
}
i++;
}
if (counter >= 7) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
onClipEvent (enterFrame) {
counter = 0;
i = 1;
while (i < 8) {
if (_global.emerald[i]) {
counter = counter + 1;
}
i++;
}
if (counter >= 7) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 271 MovieClip "offer" in Frame 1098
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 279 MovieClip "obj1" in Frame 1098
onClipEvent (enterFrame) {
_root.ringstext = _global.rings;
}
Instance of Symbol 284 MovieClip "goring" in Frame 1098
onClipEvent (enterFrame) {
this._x = this._x - ((this._x - _root[_global.blastgrounds]._x) / 10);
this._y = this._y - ((this._y - (_root[_global.blastgrounds]._y - 40)) / 10);
}
Frame 1099
_global.reshoot = false;
_root.box1._visible = false;
_root.but1._visible = false;
_root.but2._visible = false;
_root.but3._visible = false;
_root.but4._visible = false;
_root.text1 = "";
_root.text2 = "";
_root.text3 = "";
_root.naming = "";
stop();
Instance of Symbol 307 MovieClip "ground" in Frame 1099
onClipEvent (load) {
var place = _global.blastgrounds;
var action = "still";
var divout = 0;
var divouttime = 0;
this.gotoAndStop(place + action);
}
onClipEvent (enterFrame) {
this.gotoAndStop(place + action);
if ((_root.char1._x >= 275) && (_root.char1.speed > 0.5)) {
_root.cannoncore.moveout = true;
divout = _root.char1.speed;
divouttime = 0;
if (this.g1._x <= -550) {
this.g1._x = 0;
this.g2._x = this.g1._x + this.g1._width;
}
this.g1._x = this.g1._x - divout;
this.g2._x = this.g1._x + this.g1._width;
if (this.g1._x <= -550) {
this.g1._x = -550;
this.g2._x = this.g1._x + this.g1._width;
}
} else if ((_root.char1.speed < 0.5) && (_root.char1.grav < 0.5)) {
action = "still";
if (_root.char1.shot && (_root.char1.hitTest(this.a1))) {
_root.char1.ending = true;
_root.char1.grav = 0;
}
}
}
Instance of Symbol 309 MovieClip "obj6" in Frame 1099
onClipEvent (enterFrame) {
if (this._name != "obj6") {
this._x = this._x - _root.char1.speed;
if (this._x < -100) {
this.removeMovieClip();
}
}
if (_global.nuke) {
this.removeMovieClip();
}
}
Instance of Symbol 314 MovieClip "obj4" in Frame 1099
onClipEvent (enterFrame) {
if (this._name != "obj4") {
this._x = this._x - _root.char1.speed;
if (this._x < -100) {
this.removeMovieClip();
}
}
if (_global.nuke) {
this.removeMovieClip();
}
}
Instance of Symbol 319 MovieClip "obj5" in Frame 1099
onClipEvent (enterFrame) {
if (this._name != "obj5") {
this._x = this._x - _root.char1.speed;
if (this._x < -100) {
this.removeMovieClip();
}
}
if (_global.nuke) {
this.removeMovieClip();
}
}
Instance of Symbol 321 MovieClip "obj9" in Frame 1099
onClipEvent (enterFrame) {
if (this._name != "obj9") {
this._x = this._x - _root.char1.speed;
if (this._x < -100) {
this.removeMovieClip();
}
}
if (_global.nuke) {
this.removeMovieClip();
}
}
Instance of Symbol 279 MovieClip "obj1" in Frame 1099
onClipEvent (enterFrame) {
if (this._name != "obj1") {
this._x = this._x - _root.char1.speed;
if (this._x < -100) {
this.removeMovieClip();
}
}
if (_global.nuke) {
this.removeMovieClip();
}
}
Instance of Symbol 323 MovieClip "obj8" in Frame 1099
onClipEvent (enterFrame) {
if (this._name != "obj8") {
this._x = this._x - _root.char1.speed;
if (this._x < -100) {
this.removeMovieClip();
}
}
if (_global.nuke) {
this.removeMovieClip();
}
}
Instance of Symbol 325 MovieClip "obj7" in Frame 1099
onClipEvent (enterFrame) {
if (this._name != "obj7") {
this._x = this._x - _root.char1.speed;
if (this._x < -100) {
this.removeMovieClip();
}
}
if (_global.nuke) {
this.removeMovieClip();
}
}
Instance of Symbol 330 MovieClip "obj2" in Frame 1099
onClipEvent (enterFrame) {
if (this._name != "obj2") {
this._x = this._x - _root.char1.speed;
if (this._x < -100) {
this.removeMovieClip();
}
}
if (_global.nuke) {
this.removeMovieClip();
}
}
Instance of Symbol 454 MovieClip "char1" in Frame 1099
onClipEvent (load) {
var who = _global.char;
var whotag = 0;
var action = "spin";
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
var grav = 0;
var shot = false;
var speed = 0;
var mass = _global.statsmass[whotag];
var bounce = _global.statsbounce[whotag];
var decay = 0.01568;
var shot = false;
var rings = 0;
var distance = 0;
var startoff = false;
var startspeed = 0;
var slopex = 0;
var slopey = 0;
var ending = false;
var injur = false;
var perminjur = false;
var elecshield = false;
var faketimer = 0;
var collection = 0;
if ((who == "chao") || (who == "tails")) {
this._rotation = 90;
}
var sounded = new Sound();
var hurtsound = false;
var posesound = false;
var soundcompile = who;
this.gotoAndStop(who + action);
}
onClipEvent (enterFrame) {
distance = distance + speed;
if ((ending == false) && (action != "fly")) {
grav = grav - (mass * decay);
} else if (((((((action == "fly") && (ending == false)) && (who != "chao")) && (who != "sonic")) && (who != "shadow")) && (who != "zero")) && (who != "amy")) {
grav = -2;
} else if (this.hitTest(_root.ground.a1) == false) {
this._y = this._y + 1;
}
if ((((((who == "chao") || (who == "sonic")) || (who == "shadow")) || (who == "zero")) || (who == "amy")) && (action == "fly")) {
action = "spin ";
}
if (shot) {
this._visible = true;
if (startoff == false) {
this._x = _global.ppx;
this._y = _global.ppy;
startspeed = _root.cannoncore.power / 250;
slopex = _global.ppx - _global.pp2x;
slopey = _global.pp2y - _global.ppy;
speed = slopex * startspeed;
grav = slopey * startspeed;
startoff = true;
} else if (this._x < 275) {
this._x = this._x + speed;
}
}
if (action == "hurt") {
this._rotation = grav;
if (hurtsound == false) {
soundcompile = who + "hurt";
sounded.attachSound(soundcompile);
sounded.start();
hurtsound = true;
}
}
if (ending) {
if (action != "hurt") {
action = "pose";
if (posesound == false) {
soundcompile = who + "pose";
sounded.attachSound(soundcompile);
sounded.start();
posesound = true;
}
}
faketimer = faketimer + 1;
if (faketimer >= 12) {
_root.box1._visible = true;
_root.but1._visible = true;
_root.but2._visible = true;
_root.but3._visible = true;
_root.but4._visible = true;
_root.text1 = ("Total distance : " + Math.round(distance)) + "m";
_root.text2 = "Rings earned : " + Math.round(Math.round(distance) / 100);
_root.text3 = "Rings Collected : " + collection;
}
}
this._y = this._y - grav;
this.gotoAndStop(who + action);
if (elecshield) {
_root.elecshield._x = this._x;
_root.elecshield._y = this._y;
}
}
Instance of Symbol 458 MovieClip "elecshield" in Frame 1099
onClipEvent (enterFrame) {
if (_root.char1.elecshield == true) {
} else {
this._x = -900;
this._y = -900;
}
}
Instance of Symbol 463 MovieClip "obj10" in Frame 1099
onClipEvent (enterFrame) {
if (this._name != "obj10") {
this._x = this._x - _root.char1.speed;
if (this._x < -100) {
this.removeMovieClip();
}
}
if (_global.nuke) {
this.removeMovieClip();
}
}
Instance of Symbol 476 MovieClip "obj3" in Frame 1099
onClipEvent (enterFrame) {
if (this._name != "obj3") {
this._x = this._x - _root.char1.speed;
if (this._x < -100) {
this.removeMovieClip();
}
}
if (_global.nuke) {
this.removeMovieClip();
}
}
Instance of Symbol 156 MovieClip "masterring" in Frame 1099
onClipEvent (load) {
var depage = (_root.master.dep - 9);
var final = true;
var lastone = 3;
var bump = 0;
}
onClipEvent (enterFrame) {
if (_global.nuke) {
this.removeMovieClip();
}
if (this._name != "masterring") {
if ((this._x < -90) || (this.hitTest(_root.char1))) {
if (this.hitTest(_root.char1)) {
_global.rings = _global.rings + 1;
_root.char1.collection = _root.char1.collection + 1;
rightsound = new Sound();
rightsound.attachSound("ring");
rightsound.start();
}
_root.masterring.lastone = _root.masterring.lastone + 1;
this.removeMovieClip();
}
if ((_root.char1.elecshield && (this._x > 0)) && (this._x < 550)) {
this._x = this._x - ((this._x - _root.char1._x) / 10);
this._y = this._y - ((this._y - _root.char1._y) / 10);
} else if (_root.char1._x >= 275) {
this._x = this._x - _root.char1.speed;
}
} else if (lastone == 3) {
depage = _root.master.dep - 9;
i = 1;
while (i < 4) {
duplicateMovieClip (this, "ring" + depage, depage);
_root["ring" + depage]._x = this._x + bump;
_root["ring" + depage]._y = this._y + random(300);
if (i == 3) {
_root[("ring" + depage) + i].lastone = true;
}
bump = bump + 20;
depage = depage + 1;
lastone = 0;
i++;
}
bump = 0;
}
}
Instance of Symbol 484 MovieClip "but2" in Frame 1099
on (release) {
_global.rings = _global.rings + Math.round(Math.round(_root.char1.distance) / 100);
_root.play();
}
Instance of Symbol 488 MovieClip "but3" in Frame 1099
on (release) {
_global.reshoot = true;
_global.rings = _global.rings + Math.round(Math.round(_root.char1.distance) / 100);
_root.play();
}
Instance of Symbol 269 MovieClip "emerald" in Frame 1099
onClipEvent (load) {
var rand = 0;
var trans = false;
var count = 0;
var overall = false;
var getsound = new Sound();
getsound.attachSound("emerald");
}
onClipEvent (enterFrame) {
if (overall == false) {
if (this._x < -90) {
this._x = 1000;
this._y = random(300);
trans = false;
}
if (trans == false) {
rand = random(7) + 1;
do {
rand = random(7) + 1;
i = 1;
while (i < 8) {
if (_global.emerald[i]) {
count = count + 1;
}
i++;
}
if (count >= 7) {
overall = true;
break;
}
count = 0;
} while (_global.emerald[rand]);
this.gotoAndStop(rand);
trans = true;
}
this._x = this._x - _root.char1.speed;
if (this.hitTest(_root.char1)) {
_global.emerald[rand] = true;
this._x = -100;
getsound.start();
}
}
}
Instance of Symbol 489 MovieClip "but4" in Frame 1099
onClipEvent (enterFrame) {
if (this._visible && (go != "nah")) {
_root.naming = "NAME?";
go = "nah";
}
}
Instance of Symbol 38 MovieClip "cannoncore" in Frame 1099
onClipEvent (load) {
var turn = false;
var fire = false;
var turnspeed = 0;
var power = 0;
var shot = false;
var moveout = false;
}
onClipEvent (enterFrame) {
if (moveout) {
this._x = this._x - _root.char1.speed;
_root.power._x = _root.power._x - _root.char1.speed;
_root.stand._x = _root.stand._x - _root.char1.speed;
_root.disrot = "";
} else {
_root.disrot = Math.round(this._rotation) + "\u00B0";
}
if ((Key.isDown(38) && (this._rotation >= 0)) && (turn)) {
if (turnspeed < 100) {
turnspeed = turnspeed + 1;
}
this._rotation = this._rotation - (0.1 * turnspeed);
if (this._rotation <= 0) {
this._rotation = 0;
}
} else if ((Key.isDown(40) && (this._rotation <= 90)) && (turn)) {
if (turnspeed < 100) {
turnspeed = turnspeed + 1;
}
this._rotation = this._rotation + (0.1 * turnspeed);
if (this._rotation >= 90) {
this._rotation = 90;
}
} else {
turnspeed = 0;
}
if (Key.isDown(39)) {
if (power < 100) {
power = power + 2;
}
} else if (Key.isDown(37)) {
if (power > 1) {
power = power - 1;
}
} else if (power > 1) {
power = power - 1;
}
_root.power.gotoAndStop(power);
if (Key.isDown(32)) {
shot = true;
_root.char1.shot = true;
}
}
Instance of Symbol 492 MovieClip "master" in Frame 1099
onClipEvent (load) {
var dep = 20;
var rand = random(11);
var dist = 183.333333333333;
_root.rings = _global.rings;
}
onClipEvent (enterFrame) {
_root.rings = _global.rings;
if ((_root.char1._x >= 275) && (dist >= 366.666666666667)) {
rand = random(10) + 1;
duplicateMovieClip (_root["obj" + rand], "go" + dep, dep);
_root["go" + dep]._x = 650;
_root["go" + dep]._y = _root["obj" + rand]._y;
dep = dep + 1;
dist = 0;
}
dist = dist + _root.char1.speed;
}
Frame 1100
_global.nuke = true;
Frame 1101
if (_global.reshoot) {
_global.reshoot = false;
_root.gotoAndStop("cannon");
} else {
_root.gotoAndStop("menu");
}
_global.nuke = false;
Frame 1102
stop();
Frame 1103
stop();
Instance of Symbol 538 MovieClip "char1" in Frame 1103
onClipEvent (load) {
var event = "";
var xspeed = 0;
var yspeed = 0;
var tick = 0;
}
onClipEvent (enterFrame) {
if (_global.rings <= 0) {
_global.rings = 0;
event = "rings";
}
_root.rings = _global.rings;
if (tick >= 25) {
_global.rings = _global.rings - 1;
tick = 0;
} else {
tick = tick + 1;
}
if (event == "rings") {
this.gotoAndStop("dead");
yspeed = -20;
} else if (event == "hurt") {
this.gotoAndStop("hurt");
xspeed = -20;
yspeed = 0;
} else {
this.gotoAndStop("still");
if (Key.isDown(38)) {
yspeed = yspeed + 1;
} else if (Key.isDown(40)) {
yspeed = yspeed - 1;
} else if (yspeed > 0) {
yspeed = yspeed - 1;
} else if (yspeed < 0) {
yspeed = yspeed + 1;
}
if (Key.isDown(39)) {
xspeed = xspeed + 1;
} else if (Key.isDown(37)) {
xspeed = xspeed - 1;
} else if (xspeed > 0) {
xspeed = xspeed - 1;
} else if (xspeed < 0) {
xspeed = xspeed + 1;
}
}
this._y = this._y - yspeed;
this._x = this._x + xspeed;
if (this._x < 0) {
event = "";
this._x = 0;
xspeed = 0;
} else if (this._x > 550) {
this._x = 550;
xspeed = 0;
}
if (this._y < 0) {
event = "";
this._y = 0;
yspeed = 0;
} else if (this._y > 400) {
this._y = 400;
yspeed = 0;
if (event == "rings") {
this._visible = false;
_root.gotoAndStop("menu");
}
}
}
Instance of Symbol 539 MovieClip in Frame 1103
onClipEvent (load) {
var health = 10;
var uni = -15;
var xcircle = uni;
var ycircle = uni;
var swap = 1;
}
onClipEvent (enterFrame) {
if (_root.char1.hitTest(this.st1.a1)) {
_root.char1.event = "hurt";
} else if (_root.char1.hitTest(this.st1.a2)) {
health = health - 1;
this.play();
}
if (health <= 0) {
_root.play();
}
this._x = this._x + xcircle;
this._y = this._y - ycircle;
xcircle = xcircle + swap;
ycircle = ycircle + swap;
if ((xcircle == uni) || (xcircle == (-1 * uni))) {
swap = swap * -1;
}
}
Frame 1104
stop();
Instance of Symbol 37 MovieClip "a1" in Symbol 38 MovieClip Frame 1
onClipEvent (enterFrame) {
point = new Object();
point.x = this._x;
point.y = this._y;
localToGlobal(point);
_global.ppx = point.x;
_global.ppy = point.y;
}
Instance of Symbol 37 MovieClip "a2" in Symbol 38 MovieClip Frame 1
onClipEvent (enterFrame) {
point2 = new Object();
point2.x = this._x;
point2.y = this._y;
localToGlobal(point2);
_global.pp2x = point2.x;
_global.pp2y = point2.y;
}
Instance of Symbol 37 MovieClip "a1" in Symbol 40 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.char1)) {
_root.char1.grav = 0;
_root.cannoncore.turn = true;
do {
_root.char1._y = _root.char1._y - 1;
} while (this.hitTest(_root.char1));
_root.char1._visible = false;
_root.char1._rotation = 0;
}
}
Symbol 57 Button
on (release) {
_root.play();
}
Symbol 58 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 2
stop();
Symbol 66 Button
on (release) {
gotoAndPlay ("vars");
}
Symbol 95 MovieClip Frame 19
stop();
Symbol 137 Button
on (release) {
gotoAndStop (1095);
}
Symbol 143 Button
on (release) {
_root.play();
}
Symbol 145 Button
on (release) {
localData = SharedObject.getLocal("sonicboomcookie");
trace("getting data");
if (localData.data.statcode == undefined) {
trace("data missing");
} else {
trace("data found: " + localData.data.statcode);
_global.statcode = localData.data.statcode;
chars = new Array();
chars[0] = 300;
chars[1] = 314;
chars[2] = 316;
chars[3] = 318;
chars[4] = 326;
chars[5] = 327;
chars[6] = 328;
chars[7] = 334;
chars[8] = 336;
chars[9] = 337;
chars[10] = 342;
i = 0;
while (i < 11) {
if (_global.statcode.charAt(i) == "f") {
_global.boughtchar[chars[i]] = false;
} else if (_global.statcode.charAt(i) == "t") {
_global.boughtchar[chars[i]] = true;
}
i++;
}
i = 0;
while (i < 8) {
if (_global.statcode.charAt(i + 11) == "f") {
_global.emerald[i + 1] = false;
} else if (_global.statcode.charAt(i + 11) == "t") {
_global.emerald[i + 1] = true;
}
_global.rings = Number(_global.statcode.substr(18));
_root.gotoAndStop("menu");
i++;
}
}
}
Symbol 169 MovieClip Frame 1
stop();
Symbol 183 Button
on (release) {
_global.statcode = "";
i = 300;
while (i < 400) {
if (_global.boughtchar[i] == true) {
_global.statcode = _global.statcode + "t";
} else if (_global.boughtchar[i] == false) {
_global.statcode = _global.statcode + "f";
}
i++;
}
i = 1;
while (i < 8) {
if (_global.emerald[i] == true) {
_global.statcode = _global.statcode + "t";
} else if (_global.emerald[i] == false) {
_global.statcode = _global.statcode + "f";
}
i++;
}
_global.statcode = _global.statcode + _global.rings;
trace(_global.statcode);
localData = SharedObject.getLocal("sonicboomcookie");
localData.data.statcode = _global.statcode;
var _l2 = localData.flush();
if ((_l2 == false) || (_l2 == "pending")) {
trace("cookie fail");
}
}
Symbol 185 Button
on (release) {
if (_global.rings >= 50) {
_global.rings = _global.rings - 50;
var who = "amy";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
_global.boughtchar[whotag] = true;
rightsound = new Sound();
rightsound.attachSound("rightring");
rightsound.start(0, 0);
} else {
wrongsound = new Sound();
wrongsound.attachSound("wrongring");
wrongsound.start(0, 0);
}
}
Symbol 186 Button
on (release) {
_global.char = "amy";
_root.play();
}
Symbol 187 MovieClip Frame 1
stop();
Symbol 187 MovieClip Frame 2
stop();
Symbol 189 Button
on (release) {
if (_global.rings >= 90) {
_global.rings = _global.rings - 90;
var who = "chao";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
_global.boughtchar[whotag] = true;
rightsound = new Sound();
rightsound.attachSound("rightring");
rightsound.start(0, 0);
} else {
wrongsound = new Sound();
wrongsound.attachSound("wrongring");
wrongsound.start(0, 0);
}
}
Symbol 191 Button
on (release) {
_global.char = "chao";
_root.play();
}
Symbol 192 MovieClip Frame 1
stop();
Symbol 192 MovieClip Frame 2
stop();
Symbol 194 Button
on (release) {
if (_global.rings >= 90) {
_global.rings = _global.rings - 90;
var who = "cream";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
_global.boughtchar[whotag] = true;
rightsound = new Sound();
rightsound.attachSound("rightring");
rightsound.start(0, 0);
} else {
wrongsound = new Sound();
wrongsound.attachSound("wrongring");
wrongsound.start(0, 0);
}
}
Symbol 195 Button
on (release) {
_global.char = "cream";
_root.play();
}
Symbol 196 MovieClip Frame 1
stop();
Symbol 196 MovieClip Frame 2
stop();
Symbol 198 Button
on (release) {
if (_global.rings >= 60) {
_global.rings = _global.rings - 60;
var who = "knux";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
_global.boughtchar[whotag] = true;
rightsound = new Sound();
rightsound.attachSound("rightring");
rightsound.start(0, 0);
} else {
wrongsound = new Sound();
wrongsound.attachSound("wrongring");
wrongsound.start(0, 0);
}
}
Symbol 200 Button
on (release) {
_global.char = "knux";
_root.play();
}
Symbol 201 MovieClip Frame 1
stop();
Symbol 203 Button
on (release) {
if (_global.rings >= 60) {
_global.rings = _global.rings - 60;
var who = "metal";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
_global.boughtchar[whotag] = true;
rightsound = new Sound();
rightsound.attachSound("rightring");
rightsound.start(0, 0);
} else {
wrongsound = new Sound();
wrongsound.attachSound("wrongring");
wrongsound.start(0, 0);
}
}
Symbol 204 Button
on (release) {
_global.char = "metal";
_root.play();
}
Symbol 205 MovieClip Frame 1
stop();
Symbol 205 MovieClip Frame 2
stop();
Symbol 207 Button
on (release) {
if (_global.rings >= 60) {
_global.rings = _global.rings - 60;
var who = "rouge";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
_global.boughtchar[whotag] = true;
rightsound = new Sound();
rightsound.attachSound("rightring");
rightsound.start(0, 0);
} else {
wrongsound = new Sound();
wrongsound.attachSound("wrongring");
wrongsound.start(0, 0);
}
}
Symbol 208 Button
on (release) {
_global.char = "rouge";
_root.play();
}
Symbol 209 MovieClip Frame 1
stop();
Symbol 209 MovieClip Frame 2
stop();
Symbol 211 Button
on (release) {
if (_global.rings >= 50) {
_global.rings = _global.rings - 50;
var who = "shadow";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
_global.boughtchar[whotag] = true;
rightsound = new Sound();
rightsound.attachSound("rightring");
rightsound.start(0, 0);
} else {
wrongsound = new Sound();
wrongsound.attachSound("wrongring");
wrongsound.start(0, 0);
}
}
Symbol 212 Button
on (release) {
_global.char = "shadow";
_root.play();
}
Symbol 213 MovieClip Frame 1
stop();
Symbol 213 MovieClip Frame 2
stop();
Symbol 215 Button
on (release) {
if (_global.rings >= 55) {
_global.rings = _global.rings - 55;
var who = "silver";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
_global.boughtchar[whotag] = true;
rightsound = new Sound();
rightsound.attachSound("rightring");
rightsound.start(0, 0);
} else {
wrongsound = new Sound();
wrongsound.attachSound("wrongring");
wrongsound.start(0, 0);
}
}
Symbol 217 Button
on (release) {
_global.char = "silver";
_root.play();
}
Symbol 218 MovieClip Frame 1
stop();
Symbol 218 MovieClip Frame 2
stop();
Symbol 220 Button
on (release) {
if (_global.rings >= 60) {
_global.rings = _global.rings - 60;
var who = "tails";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
_global.boughtchar[whotag] = true;
rightsound = new Sound();
rightsound.attachSound("rightring");
rightsound.start(0, 0);
} else {
wrongsound = new Sound();
wrongsound.attachSound("wrongring");
wrongsound.start(0, 0);
}
}
Symbol 221 Button
on (release) {
_global.char = "tails";
_root.play();
}
Symbol 222 MovieClip Frame 1
stop();
Symbol 222 MovieClip Frame 2
stop();
Symbol 223 Button
on (release) {
if (_global.rings >= 50) {
_global.rings = _global.rings - 50;
var who = "sonic";
var whotag = 0;
i = 0;
while (i < 3) {
whotag = whotag + who.charCodeAt(i);
i++;
}
_global.boughtchar[whotag] = true;
rightsound = new Sound();
rightsound.attachSound("rightring");
rightsound.start(0, 0);
} else {
wrongsound = new Sound();
wrongsound.attachSound("wrongring");
wrongsound.start(0, 0);
}
}
Symbol 224 Button
on (release) {
_global.char = "sonic";
_root.play();
}
Symbol 225 MovieClip Frame 1
stop();
Symbol 225 MovieClip Frame 2
stop();
Symbol 228 Button
on (release) {
var lastname = 299;
var store = new Array();
j = 0;
while (j < 11) {
i = (300 + (lastname - 300)) + 1;
while (i < 400) {
if (_global.boughtchar[i] == true) {
store[j] = i;
lastname = i;
break;
}
i++;
}
chars = new Array();
chars[300] = "chao";
chars[336] = "sonic";
chars[327] = "amy";
chars[334] = "knux";
chars[314] = "cream";
chars[326] = "metal";
chars[328] = "silver";
chars[342] = "rouge";
chars[316] = "shadow";
chars[318] = "tails";
chars[337] = "zero";
j++;
}
_global.char = chars[store[random(store.length)]];
if (_global.char != undefined) {
_root.play();
}
}
Symbol 229 Button
on (release) {
_global.blastgrounds = "grass";
}
Symbol 233 Button
on (release) {
_global.blastgrounds = "rock";
}
Symbol 237 Button
on (release) {
_global.blastgrounds = "moon";
}
Symbol 241 Button
on (release) {
_global.blastgrounds = "ice";
}
Symbol 246 Button
on (release) {
_global.blastgrounds = "metal";
}
Symbol 247 Button
on (rollOver) {
if (_root.offer.emerald.overall == false) {
_root.offer._visible = true;
_root.swords._visible = false;
}
}
on (rollOut) {
_root.offer._visible = false;
_root.swords._visible = true;
}
on (release) {
if (_root.offer.emerald.overall == false) {
if (_global.rings >= 200) {
_global.rings = _global.rings - 200;
_global.emerald[_root.offer.emerald.rand] = true;
_root.offer.emerald.trans = false;
rightsound = new Sound();
rightsound.attachSound("rightring");
rightsound.start(0, 0);
} else {
wrongsound = new Sound();
wrongsound.attachSound("wrongring");
wrongsound.start(0, 0);
}
}
}
Symbol 267 Button
on (release) {
_root.gotoAndStop("battle");
}
Symbol 268 MovieClip Frame 1
stop();
Instance of Symbol 252 MovieClip in Symbol 268 MovieClip Frame 1
onClipEvent (load) {
if (_global.emerald[1]) {
this._visible = true;
} else {
this._visible = false;
}
}
onClipEvent (enterFrame) {
if (_global.emerald[1]) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 254 MovieClip in Symbol 268 MovieClip Frame 1
onClipEvent (load) {
if (_global.emerald[2]) {
this._visible = true;
} else {
this._visible = false;
}
}
onClipEvent (enterFrame) {
if (_global.emerald[2]) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 256 MovieClip in Symbol 268 MovieClip Frame 1
onClipEvent (load) {
if (_global.emerald[3]) {
this._visible = true;
} else {
this._visible = false;
}
}
onClipEvent (enterFrame) {
if (_global.emerald[3]) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 258 MovieClip in Symbol 268 MovieClip Frame 1
onClipEvent (load) {
if (_global.emerald[6]) {
this._visible = true;
} else {
this._visible = false;
}
}
onClipEvent (enterFrame) {
if (_global.emerald[6]) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 260 MovieClip in Symbol 268 MovieClip Frame 1
onClipEvent (load) {
if (_global.emerald[4]) {
this._visible = true;
} else {
this._visible = false;
}
}
onClipEvent (enterFrame) {
if (_global.emerald[4]) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 262 MovieClip in Symbol 268 MovieClip Frame 1
onClipEvent (load) {
if (_global.emerald[7]) {
this._visible = true;
} else {
this._visible = false;
}
}
onClipEvent (enterFrame) {
if (_global.emerald[7]) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 264 MovieClip in Symbol 268 MovieClip Frame 1
onClipEvent (load) {
if (_global.emerald[5]) {
this._visible = true;
} else {
this._visible = false;
}
}
onClipEvent (enterFrame) {
if (_global.emerald[5]) {
this._visible = true;
} else {
this._visible = false;
}
}
Symbol 268 MovieClip Frame 2
stop();
Symbol 269 MovieClip Frame 1
stop();
Symbol 269 MovieClip Frame 2
stop();
Symbol 269 MovieClip Frame 3
stop();
Symbol 269 MovieClip Frame 4
stop();
Symbol 269 MovieClip Frame 5
stop();
Symbol 269 MovieClip Frame 6
stop();
Symbol 269 MovieClip Frame 7
stop();
Instance of Symbol 269 MovieClip "emerald" in Symbol 271 MovieClip Frame 1
onClipEvent (load) {
var rand = 0;
var trans = false;
var count = 0;
var overall = false;
}
onClipEvent (enterFrame) {
if (overall == false) {
if (trans == false) {
rand = random(7) + 1;
do {
rand = random(7) + 1;
i = 1;
while (i < 8) {
if (_global.emerald[i]) {
count = count + 1;
}
i++;
}
if (count >= 7) {
overall = true;
break;
}
count = 0;
} while (_global.emerald[rand]);
this.gotoAndStop(rand);
trans = true;
}
}
}
Symbol 278 MovieClip Frame 5
stop();
Symbol 279 MovieClip Frame 1
stop();
Instance of Symbol 37 MovieClip "a1" in Symbol 279 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.char1) && (_root.char1.grav < 0)) {
_root.char1.grav = _root.char1.grav * -1.3;
_root.char1.speed = _root.char1.speed * 1.3;
_global.rings = _global.rings + 50;
rightsound = new Sound();
rightsound.attachSound("tvbreak");
rightsound.start();
_root.char1.collection = _root.char1.collection + 50;
_parent.play();
}
}
Symbol 279 MovieClip Frame 2
stop();
Symbol 286 Button
on (keyPress "<PgDn>") {
gotoAndStop ("battle");
}
on (keyPress "<PgUp>") {
_global.rings = _global.rings + 200;
}
Symbol 307 MovieClip Frame 1
stop();
Instance of Symbol 37 MovieClip "a1" in Symbol 307 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.char1)) {
if (_root.char1.grav <= -10) {
rightsound = new Sound();
rightsound.attachSound("thud");
rightsound.start();
}
_root.char1.grav = (_root.char1.grav / _root.char1.bounce) * -1;
_root.char1.speed = _root.char1.speed / _root.char1.bounce;
if (_root.char1.action == "fly") {
_root.char1.action = "spin";
}
_parent.divout = 0;
do {
_root.char1._y = _root.char1._y - 1;
} while (this.hitTest(_root.char1));
_root.char1._y = _root.char1._y + 1;
}
}
Instance of Symbol 290 MovieClip "g1" in Symbol 307 MovieClip Frame 1
/* no clip actions */
Symbol 307 MovieClip Frame 2
stop();
Symbol 307 MovieClip Frame 3
stop();
Symbol 307 MovieClip Frame 4
stop();
Symbol 307 MovieClip Frame 5
stop();
Instance of Symbol 37 MovieClip "a1" in Symbol 309 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.char1)) {
_root.char1.grav = ((_root.char1.grav / Math.abs(_root.char1.grav)) * 2) * _root.char1.grav;
_root.char1.speed = _root.char1.speed + 1;
rightsound2 = new Sound();
rightsound2.attachSound("intosky");
rightsound2.start();
}
}
Symbol 314 MovieClip Frame 1
stop();
Instance of Symbol 37 MovieClip "a1" in Symbol 314 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.char1) && (_root.char1.grav < 0)) {
_root.char1.grav = (_root.char1.grav * -1.3) + 10;
_root.char1.speed = _root.char1.speed * 1.3;
rightsound = new Sound();
rightsound.attachSound("spring");
rightsound.start();
_parent.play();
}
}
Symbol 319 MovieClip Frame 1
stop();
Instance of Symbol 37 MovieClip "a1" in Symbol 319 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.char1) && (_root.char1.grav < 0)) {
_root.char1.grav = (_root.char1.grav * -1.5) + 20;
_root.char1.speed = _root.char1.speed * 1.5;
rightsound = new Sound();
rightsound.attachSound("spring");
rightsound.start();
_parent.play();
}
}
Instance of Symbol 37 MovieClip "a1" in Symbol 321 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.char1)) {
_root.char1.speed = _root.char1.speed / 1.5;
_root.char1.action = "hurt";
if (_root.char1._x > _parent._x) {
_root.char1._x = _root.char1._x + 3;
} else {
_root.char1._x = _root.char1._x - 3;
}
}
}
Symbol 323 MovieClip Frame 1
stop();
Instance of Symbol 37 MovieClip "a1" in Symbol 323 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.char1) && (_root.char1.grav < 0)) {
_root.char1.grav = _root.char1.grav * -1.3;
_root.char1.speed = _root.char1.speed * 1.3;
_root.char1.elecshield = true;
rightsound = new Sound();
rightsound.attachSound("tvbreak");
rightsound.start();
rightsound2 = new Sound();
rightsound2.attachSound("elecshiledfx");
rightsound2.start();
_parent.play();
}
}
Symbol 323 MovieClip Frame 2
stop();
Instance of Symbol 37 MovieClip "a1" in Symbol 325 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.char1) && (_root.char1.grav < 0)) {
_root.char1.grav = _root.char1.grav * -1.5;
_root.char1.speed = _root.char1.speed * 1.5;
rightsound2 = new Sound();
rightsound2.attachSound("bumper");
rightsound2.start();
}
}
Instance of Symbol 37 MovieClip "a1" in Symbol 330 MovieClip Frame 1
onClipEvent (load) {
var allreadyhurt = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.char1) && (_root.char1.grav > -10)) {
_root.char1.grav = (_root.char1.grav / 2) * -1;
_root.char1.speed = _root.char1.speed * 1.01;
do {
_root.char1._y = _root.char1._y - 1;
} while (this.hitTest(_root.char1));
_root.char1._y = _root.char1._y + 1;
} else if ((this.hitTest(_root.char1) && (_root.char1.grav <= -10)) && (allreadyhurt == false)) {
_root.char1.grav = (_root.char1.grav / _root.char1.bounce) * -1;
_root.char1.speed = _root.char1.speed / _root.char1.bounce;
_root.char1.action = "hurt";
allreadyhurt = true;
}
}
Symbol 341 MovieClip Frame 8
stop();
Symbol 355 MovieClip Frame 13
stop();
Symbol 365 MovieClip Frame 17
stop();
Symbol 375 MovieClip Frame 7
stop();
Symbol 424 MovieClip Frame 14
stop();
Symbol 453 MovieClip Frame 30
stop();
Symbol 454 MovieClip Frame 1
stop();
Symbol 454 MovieClip Frame 2
stop();
Symbol 454 MovieClip Frame 3
stop();
Symbol 454 MovieClip Frame 4
stop();
Symbol 454 MovieClip Frame 5
stop();
Symbol 454 MovieClip Frame 6
stop();
Symbol 454 MovieClip Frame 7
stop();
Symbol 454 MovieClip Frame 8
stop();
Symbol 454 MovieClip Frame 9
stop();
Symbol 454 MovieClip Frame 10
stop();
Symbol 454 MovieClip Frame 11
stop();
Symbol 454 MovieClip Frame 12
stop();
Symbol 454 MovieClip Frame 13
stop();
Symbol 454 MovieClip Frame 14
stop();
Symbol 454 MovieClip Frame 15
stop();
Symbol 454 MovieClip Frame 16
stop();
Symbol 454 MovieClip Frame 17
stop();
Symbol 454 MovieClip Frame 18
stop();
Symbol 454 MovieClip Frame 19
stop();
Symbol 454 MovieClip Frame 20
stop();
Symbol 454 MovieClip Frame 21
stop();
Symbol 454 MovieClip Frame 22
stop();
Symbol 454 MovieClip Frame 23
stop();
Symbol 454 MovieClip Frame 24
stop();
Symbol 454 MovieClip Frame 25
stop();
Symbol 454 MovieClip Frame 26
stop();
Symbol 454 MovieClip Frame 27
stop();
Symbol 454 MovieClip Frame 28
stop();
Symbol 454 MovieClip Frame 29
stop();
Symbol 454 MovieClip Frame 30
stop();
Symbol 454 MovieClip Frame 31
stop();
Symbol 454 MovieClip Frame 32
stop();
Symbol 454 MovieClip Frame 33
stop();
Symbol 454 MovieClip Frame 34
stop();
Symbol 454 MovieClip Frame 35
stop();
Symbol 454 MovieClip Frame 36
stop();
Symbol 454 MovieClip Frame 37
stop();
Symbol 454 MovieClip Frame 38
stop();
Symbol 454 MovieClip Frame 39
stop();
Instance of Symbol 37 MovieClip "a1" in Symbol 463 MovieClip Frame 1
onClipEvent (enterFrame) {
if (((((this.hitTest(_root.char1) && (_root.char1.who != "chao")) && (_root.char1.who != "sonic")) && (_root.char1.who != "shadow")) && (_root.char1.who != "zero")) && (_root.char1.who != "amy")) {
_root.char1.action = "fly";
}
}
Symbol 475 MovieClip Frame 1
stop();
Instance of Symbol 37 MovieClip "a1" in Symbol 475 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.char1) && (_root.char1.grav < 0)) {
_root.char1.grav = _root.char1.grav * -2;
_root.char1.speed = _root.char1.speed * 2;
_parent.play();
rightsound2 = new Sound();
rightsound2.attachSound("explode");
rightsound2.start();
}
}
Symbol 475 MovieClip Frame 11
stop();
Symbol 486 Button
on (release) {
var names = _root.naming;
var char = _global.char;
var score = Math.round(_root.char1.distance);
var stringtowrite = ((((names + " ") + char) + " ") + score);
getURL ("http://syrus.fxpscene.com/xanadu32/sonicboom.php", "_blank", "POST");
}
Symbol 518 MovieClip Frame 27
stop();
Symbol 534 MovieClip Frame 152
_root.play();
stop();
Symbol 538 MovieClip Frame 1
stop();
Symbol 538 MovieClip Frame 2
stop();
Symbol 538 MovieClip Frame 3
stop();
Symbol 539 MovieClip Frame 1
stop();
Instance of Symbol 488 MovieClip in Symbol 550 MovieClip Frame 168
on (release) {
_root.gotoAndStop("menu");
}
Symbol 550 MovieClip Frame 175
stop();