Frame 1
stop();
Frame 2
stop();
isWin = false;
ringcount = 0;
eggmanlife = 10;
eggspeed = 5;
move = "norm";
Instance of Symbol 20 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 20);
if (_x < -50) {
_x = 1000;
}
}
Instance of Symbol 20 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 20);
if (_x < -50) {
_x = 1000;
}
}
Instance of Symbol 20 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 20);
if (_x < -50) {
_x = 1000;
}
}
Instance of Symbol 20 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 20);
if (_x < -50) {
_x = 1000;
}
}
Instance of Symbol 20 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 20);
if (_x < -50) {
_x = 1000;
}
}
Instance of Symbol 20 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 20);
if (_x < -50) {
_x = 1000;
}
}
Instance of Symbol 20 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 20);
if (_x < -50) {
_x = 1000;
}
}
Instance of Symbol 20 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 20);
if (_x < -50) {
_x = 1000;
}
}
Instance of Symbol 20 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 20);
if (_x < -50) {
_x = 1000;
}
}
Instance of Symbol 20 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 20);
if (_x < -50) {
_x = 1000;
}
}
Instance of Symbol 20 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 20);
if (_x < -50) {
_x = 1000;
}
}
Instance of Symbol 20 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 20);
if (_x < -50) {
_x = 1000;
}
}
Instance of Symbol 23 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 10);
if (_x < -694) {
_x = 406;
}
}
Instance of Symbol 25 MovieClip in Frame 2
onClipEvent (enterFrame) {
_visible = false;
if (this.hitTest(_root.sonic.hitArea)) {
_root.sonic._y = _root.sonic._y + 10;
}
}
Instance of Symbol 25 MovieClip in Frame 2
onClipEvent (enterFrame) {
_visible = false;
if (this.hitTest(_root.sonic.hitArea)) {
_root.sonic._x = _root.sonic._x + 5;
}
}
Instance of Symbol 35 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (_root.isWin == true) {
_y = 10000;
}
_x = (_x - 20);
if (_x < -50) {
_x = 1500;
_y = (random(200) + 300);
}
}
Instance of Symbol 37 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 10);
if (_x < -50) {
_x = 1300;
}
}
Instance of Symbol 37 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 5);
if (_x < -50) {
_x = 1300;
}
}
Instance of Symbol 37 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 3);
if (_x < -50) {
_x = 1300;
}
}
Instance of Symbol 37 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 10);
if (_x < -50) {
_x = 1300;
}
}
Instance of Symbol 37 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 5);
if (_x < -50) {
_x = 1300;
}
}
Instance of Symbol 37 MovieClip in Frame 2
onClipEvent (enterFrame) {
_x = (_x - 3);
if (_x < -50) {
_x = 1300;
}
}
Instance of Symbol 30 MovieClip in Frame 2
onClipEvent (enterFrame) {
_root.rings = _root.ringcount;
}
Instance of Symbol 43 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (!Key.isDown(39)) {
if (!Key.isDown(38)) {
if (!Key.isDown(40)) {
if (_root.move == "spin") {
_root.move = "spin";
} else if (_root.move == "atk") {
_root.move = "atk";
} else {
_root.move = "norm";
}
}
}
}
}
Instance of Symbol 25 MovieClip in Frame 2
onClipEvent (enterFrame) {
_visible = false;
if (this.hitTest(_root.sonic.hitArea)) {
_root.sonic._y = _root.sonic._y - 10;
}
if (this.hitTest(_root.eggman)) {
_root.eggspeed = -5;
}
}
Instance of Symbol 25 MovieClip in Frame 2
onClipEvent (enterFrame) {
_visible = false;
if (this.hitTest(_root.sonic.hitArea)) {
_root.sonic._x = _root.sonic._x - 5;
}
}
Instance of Symbol 46 MovieClip "ramp" in Frame 2
onClipEvent (enterFrame) {
if (_root.isWin == true) {
_y = 10000;
}
_x = (_x - 15);
if (_x < -50) {
_x = 1500;
_y = (random(200) + 300);
}
}
Instance of Symbol 25 MovieClip "ringG" in Frame 2
onClipEvent (enterFrame) {
_visible = false;
if (this.hitTest(_root.sonic.hitArea)) {
_root.sonic._x = _root.sonic._x + 5;
}
}
Instance of Symbol 95 MovieClip "eggman" in Frame 2
onClipEvent (enterFrame) {
_y = (_y + _root.eggspeed);
if (_root.sonic._y < _y) {
mx.behaviors.DepthControl.bringToFront(this);
}
if (_root.sonic._y > _y) {
mx.behaviors.DepthControl.bringToFront(_root.sonic);
}
if (_root.eggmanlife < 1) {
_root.eggman.gotoAndStop("dead");
_root.eggspeed = 0;
}
if (_root.eggmanlife == 5) {
_root.eggmanlife = _root.eggmanlife - 1;
stopAllSounds();
e = new Sound();
e.attachSound("pinch");
e.start();
}
e.onSoundComplete = function () {
e.start();
};
}
Instance of Symbol 132 MovieClip "sonic" in Frame 2
onClipEvent (enterFrame) {
this.gotoAndStop(_root.move);
if (Key.isDown(38)) {
if (!Key.isDown(39)) {
this._y = this._y - 10;
_root.move = "up";
}
} else if (Key.isDown(40)) {
if (!Key.isDown(39)) {
this._y = this._y + 10;
_root.move = "down";
}
}
if (Key.isDown(39)) {
_x = (_x + 10);
_root.move = "speed";
}
if (Key.isDown(32)) {
_root.move = "atk";
}
_x = (_x - 5);
}
Instance of Symbol 134 MovieClip "ringlose" in Frame 2
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
_x = _root.sonic._x;
_y = _root.sonic._y;
}
Instance of Symbol 25 MovieClip in Frame 2
onClipEvent (enterFrame) {
_visible = false;
if (this.hitTest(_root.eggman)) {
_root.eggspeed = 5;
}
}
Instance of Symbol 136 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (_root.isWin == true) {
_y = 10000;
}
_x = (_x - 25);
if (_x < -50) {
_x = 1000;
_y = (random(200) + 300);
}
if (this.hitTest(_root.sonic.hitArea)) {
_root.move = "hurt";
_y = 10000;
}
}
Instance of Symbol 136 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (_root.isWin == true) {
_y = 10000;
}
_x = (_x - 10);
if (_x < -10) {
_x = 900;
_y = (random(200) + 300);
}
if (this.hitTest(_root.sonic.hitArea)) {
_root.move = "hurt";
_y = 10000;
}
}
Instance of Symbol 136 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (_root.isWin == true) {
_y = 10000;
}
_x = (_x - 25);
if (_x < -10) {
_x = 900;
_y = (random(200) + 300);
}
if (this.hitTest(_root.sonic.hitArea)) {
_root.move = "hurt";
_y = 10000;
}
}
Instance of Symbol 136 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (_root.isWin == true) {
_y = 10000;
}
_x = (_x - 10);
if (_x < -50) {
_x = 1200;
_y = (random(200) + 300);
}
if (this.hitTest(_root.sonic.hitArea)) {
_root.move = "hurt";
_y = 10000;
}
}
Frame 3
stop();
Frame 4
stop();
Symbol 10 Button
on (press) {
stopAllSounds();
play();
}
Symbol 149 MovieClip [__Packages.mx.behaviors.DepthControl] Frame 0
class mx.behaviors.DepthControl extends Object
{
function DepthControl () {
super();
}
static function sendToBack(target) {
var _local2 = false;
while (_local2 == false) {
sendBackward(target);
_local2 = target == getInstanceAtLowest(target._parent);
}
}
static function bringToFront(target) {
var _local2 = false;
while (_local2 == false) {
bringForward(target);
_local2 = target == getInstanceAtHighest(target._parent);
}
}
static function sendBackward(target) {
var _local2 = trackDepths(target._parent);
if (target != getInstanceAtLowest(target._parent)) {
target.swapDepths(getInstanceLowerThan(target));
}
}
static function bringForward(target) {
if (target != getInstanceAtHighest(target._parent)) {
target.swapDepths(getInstanceHigherThan(target));
}
}
static function trackDepths(mcParent) {
var _local4 = [];
for (var _local5 in mcParent) {
if (typeof(mcParent[_local5]) == "movieclip") {
_local4.push({mc:mcParent[_local5], depth:mcParent[_local5].getDepth()});
}
}
_local4.sort(orderFunc);
return(_local4);
}
static function orderFunc(a, b) {
var _local2 = Number(a.depth);
var _local1 = Number(b.depth);
if (_local2 > _local1) {
return(-1);
}
if (_local1 > _local2) {
return(1);
}
return(0);
}
static function getInstanceAtLowest(targetParent) {
var _local1 = trackDepths(targetParent);
return(_local1[_local1.length - 1].mc);
}
static function getInstanceAtHighest(targetParent) {
var _local1 = trackDepths(targetParent);
return(_local1[0].mc);
}
static function getInstanceLowerThan(target) {
var _local2 = trackDepths(target._parent);
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].mc == target) {
break;
}
_local1++;
}
return(_local2[_local1 + 1].mc);
}
static function getInstanceHigherThan(target) {
var _local2 = trackDepths(target._parent);
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].mc == target) {
break;
}
_local1++;
}
return(_local2[_local1 - 1].mc);
}
}
Symbol 32 MovieClip Frame 4
stop();
Symbol 34 MovieClip Frame 1
stop();
Instance of Symbol 30 MovieClip in Symbol 34 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.sonic)) {
_parent.play();
}
}
Symbol 34 MovieClip Frame 2
_root.ringcount = _root.ringcount + 1;
Symbol 34 MovieClip Frame 35
gotoAndPlay (1);
Instance of Symbol 45 MovieClip in Symbol 46 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.sonic.hitArea3)) {
_root.move = "spin";
_root.sonic._x = _root.sonic._x + 15;
}
}
Symbol 50 MovieClip Frame 2
_root.sonic._x = _root.sonic._x - 50;
Instance of Symbol 93 MovieClip in Symbol 94 MovieClip Frame 93
onClipEvent (enterFrame) {
_root.isWin = true;
}
Symbol 94 MovieClip Frame 150
stopAllSounds();
stop();
_root.gotoAndStop("win");
Symbol 95 MovieClip Frame 1
stop();
Instance of Symbol 25 MovieClip in Symbol 95 MovieClip Frame 1
onClipEvent (enterFrame) {
_visible = false;
if (this.hitTest(_root.sonic.hitArea)) {
if (_root.sonic._y < _y) {
_root.sonic._y = _root.sonic._y - 10;
}
}
if (this.hitTest(_root.sonic.hitArea2)) {
if (_root.sonic._y > _y) {
_root.sonic._y = _root.sonic._y + 10;
}
}
}
Symbol 95 MovieClip Frame 10
gotoAndStop (1);
_root.eggmanlife = _root.eggmanlife - 1;
Symbol 95 MovieClip Frame 11
stop();
_root.isWin = true;
Symbol 117 MovieClip Frame 10
_root.move = "norm";
Instance of Symbol 128 MovieClip in Symbol 129 MovieClip Frame 4
onClipEvent (enterFrame) {
if (this.hitTest(_root.eggman)) {
_root.eggman.play();
}
}
Symbol 129 MovieClip Frame 9
_root.move = "norm";
Symbol 132 MovieClip Frame 1
stop();
Instance of Symbol 97 MovieClip "hitArea" in Symbol 132 MovieClip Frame 1
onClipEvent (enterFrame) {
_visible = false;
}
Instance of Symbol 99 MovieClip "hitArea2" in Symbol 132 MovieClip Frame 1
onClipEvent (enterFrame) {
_visible = false;
}
Instance of Symbol 99 MovieClip "hitArea3" in Symbol 132 MovieClip Frame 1
onClipEvent (enterFrame) {
_visible = false;
}
Symbol 132 MovieClip Frame 7
if (_root.ringcount < 1) {
stopAllSounds();
_root.gotoAndStop("lose");
} else {
_root.ringcount = 0;
_root.ringlose._visible = true;
_root.ringlose.gotoAndPlay(2);
gotoAndStop (1);
s = new Sound();
s.attachSound("ringlose");
s.start();
}
Symbol 132 MovieClip Frame 9
if (_root.ringcount < 1) {
stopAllSounds();
_root.gotoAndStop("lose");
} else {
_root.ringcount = 0;
_root.ringlose._visible = true;
_root.ringlose.gotoAndPlay(2);
gotoAndStop (1);
}
Symbol 134 MovieClip Frame 1
stop();
Symbol 134 MovieClip Frame 8
_root.ringlose._visible = false;
Symbol 134 MovieClip Frame 9
_root.ringlose._visible = false;
Symbol 134 MovieClip Frame 10
_root.ringlose._visible = false;
Symbol 142 Button
on (press) {
stopAllSounds();
gotoAndStop (2);
}