Frame 1
//if(){}
function LoadScoreSubmitter() {
GameOn = false;
Mouse.show();
createEmptyMovieClip("ScoreSaveContainer", 999999);
ScoreSaveContainer.loadMovie("scoresaver.swf");
if (Stage.width < 560) {
ScoreSaveContainer._xscale = (100 * Stage.width) / 560;
ScoreSaveContainer._yscale = (100 * Stage.height) / 320;
}
stop();
}
ok = false;
ok = true;
if (_url.substr(0, 25).toLowerCase() == "http://www.homokaasu.org/") {
ok = true;
}
if (_url.substr(0, 21).toLowerCase() == "http://homokaasu.org/") {
ok = true;
}
if (_url.substr(0, 14).toLowerCase() == "http://welkin/") {
ok = true;
}
if (!ok) {
getURL ("http://homokaasu.org", "_top");
this.removeMovieClip();
stop();
}
play();
Frame 3
//if(){}
if (getBytesLoaded() < getBytesTotal()) {
loaderindicator._x = (((loaderindicator._x * 10) + 20) + (310 * (getBytesLoaded() / getBytesTotal()))) / 11;
gotoAndPlay (2);
} else {
gotoAndStop (4);
}
Frame 4
//if(){}
function Press() {
var a = attachMovie("Atom", "Atom", 3000, {_x:_xmouse, _y:_ymouse, Weight:1});
attachMovie("Line", "Line", 2990, {_x:_xmouse, _y:_ymouse});
Dragging();
onEnterFrame = Dragging;
}
function Dragging() {
Line._xscale = _xmouse - Atom._x;
Line._yscale = _ymouse - Atom._y;
}
function Release() {
Length._visible = true;
GravitySinks.push(Atom);
Atom.xs = (Atom._x - _xmouse) / 20;
Atom.ys = (Atom._y - _ymouse) / 20;
Line.removeMovieClip();
onEnterFrame = Go;
}
function Interact(a, b) {
var dx = (a._x - b._x);
var dy = (a._y - b._y);
var tw = (a.Weight + b.Weight);
var r = Math.sqrt((dx * dx) + (dy * dy));
r = r * r;
a.xs = a.xs - (((b.Weight / tw) * dx) / r);
a.ys = a.ys - (((b.Weight / tw) * dy) / r);
b.xs = b.xs + (((a.Weight / tw) * dx) / r);
b.ys = b.ys + (((a.Weight / tw) * dy) / r);
}
function ShowAtoms() {
AtomsLeft = "";
var i = 0;
while (i < Atoms) {
AtomsLeft = AtomsLeft + ".";
i++;
}
}
function WaitForEnd() {
if ((EndGameWait--) > 0) {
return(undefined);
}
delete onEnterFrame;
gotoAndStop (7);
}
function Hit() {
var i = (Count - 1);
while (i >= (Count - 21)) {
this["Tr" + i].removeMovieClip();
i--;
}
var i = 0;
while (i < 120) {
attachMovie("AtomSpark", "Sp" + i, 6000 + i, {_x:Atom._x, _y:Atom._y, _rotation:Math.floor(Math.random() * 360), _xscale:Math.random() * 300});
i++;
}
Atom.removeMovieClip();
delete onEnterFrame;
Score = Math.floor(Score);
var i = 0;
while (i < GravitySinks.length) {
GravitySinks[i].removeMovieClip();
i++;
}
if (Distance < TotalDistance) {
Atoms--;
ShowAtoms();
if (Atoms < 0) {
TextSlider.removeMovieClip();
EndGameWait = 20;
onEnterFrame = WaitForEnd;
return(undefined);
}
AdvanceLevel(false);
} else {
AdvanceLevel(true);
}
}
function ShowText(s) {
attachMovie("TextSlider", "TextSlider", 50000, {_x:280, _y:100, Text:s});
}
function Go() {
Btn._visible = false;
Score = Score + (((Distance < TotalDistance) ? (Level) : (Level * 2)) / 10);
Count++;
Distance++;
if (Distance < TotalDistance) {
Length.gotoAndStop(Math.floor((1000 * Distance) / TotalDistance));
} else {
Length.gotoAndStop(1000);
}
ScoreDisplay.text = Math.floor(Score);
ScoreDisplay.textColor = ((Distance < TotalDistance) ? 10357518 : 16777215);
attachMovie("AtomTrail", "Tr" + Count, 12345 + Count, {_x:Atom._x, _y:Atom._y});
if (Distance > (TotalDistance * 5)) {
Hit();
return(undefined);
}
var i = 0;
while (i < GravitySinks.length) {
var a = GravitySinks[i];
a._x = a._x + (a.xs * 0.95);
a._y = a._y + (a.ys * 0.95);
if ((a._x < 0) && (a.xs < 0)) {
a.xs = 0;
a.ys = 0;
a._x = 0;
}
if ((a._y < 0) && (a.ys < 0)) {
a.xs = 0;
a.ys = 0;
a._y = 0;
}
if ((a._x > 560) && (a.xs > 0)) {
a.xs = 0;
a.ys = 0;
a._x = 560;
}
if ((a._y > 320) && (a.ys > 0)) {
a.xs = 0;
a.ys = 0;
a._y = 320;
}
if (a != Atom) {
if (a.hitTest(Atom._x, Atom._y, true) || (DoHit)) {
Hit();
return(undefined);
}
Interact(a, Atom);
}
if ((Count % 10) == 0) {
var l = (i + 1);
while (l < (GravitySinks.length - 1)) {
var b = GravitySinks[l];
Interact(a, b);
l++;
}
}
i++;
}
}
function AdvanceLevel(Success) {
GravitySinks = new Array();
Count = 0;
Length._visible = false;
if (Success) {
Level++;
ShowText("LEVEL " + Level);
} else {
ScoreDisplay.text = Math.floor(Score);
ShowText("LEVEL FAILED");
}
TotalDistance = 300 + (Level * (50 + (Level * 2)));
Distance = 0;
Length.gotoAndStop(1);
Btn._visible = true;
var i = 0;
while (i < Level) {
var s = attachMovie("GravitySink", "G" + i, 100 + i);
s._x = 560 * Math.random();
s._y = 320 * Math.random();
s.xs = 0;
s.ys = 0;
s.Weight = 50 + (50 * Math.random());
s._xscale = (s._yscale = s.Weight);
s.Weight = s.Weight * 1000;
GravitySinks.push(s);
i++;
}
}
function StartGame() {
Level = 0;
Score = 0;
Atoms = 4;
ShowAtoms();
AdvanceLevel(true);
Btn.onPress = Press;
Btn.onReleaseOutside = (Btn.onRelease = Release);
}
gameID = 21;
Ckey = "skS92mndLpsL";
Ckey2 = "cWrS";
Ckey3 = "XpoD";
Ckey4 = "vJwq";
StartGame();
stop();
Frame 7
//if(){}
LoadScoreSubmitter();
Symbol 12 MovieClip [TextSlider] Frame 100
//if(){}
this.removeMovieClip();
Symbol 16 MovieClip [AtomTrail] Frame 21
//if(){}
this.removeMovieClip();
Symbol 17 MovieClip [AtomSpark] Frame 21
//if(){}
this.removeMovieClip();
Symbol 22 MovieClip [Bar] Frame 1
//if(){}
stop();