Frame 1
stop();
Instance of Symbol 6 MovieClip "loadBar" in Frame 1
onClipEvent (load) {
function checkLoaded() {
bytesLoaded = _parent.getBytesLoaded();
if (bytesLoaded == bytesTotal) {
_parent.gotoAndPlay("start");
_parent.loadBar._visible = 0;
} else {
_parent.loadBar._visible = 1;
bar._width = (bytesLoaded * barW) / bytesTotal;
percent = (bytesLoaded / bytesTotal) * 100;
percentText = Math.round(percent);
}
}
barW = bar._width;
bytesTotal = _parent.getBytesTotal();
checkLoaded();
}
onClipEvent (enterFrame) {
checkLoaded();
}
Frame 5
tLength = 0;
Frame 6
stop();
Frame 27
i++;
j = i - 1;
attachMovie("tail", "tail" + i, i);
_root["tail" + i]._x = _root.head._x - _root.head.xspeed;
_root["tail" + i]._y = _root.head._y - _root.head.yspeed;
if (i > tLength) {
i = 0;
}
Frame 28
gotoAndPlay(_currentframe - 1);
Symbol 2 MovieClip [tail] Frame 1
if ((this._x == _root.head._x) and (this._y == _root.head._y)) {
_root.head.reset();
}
Symbol 2 MovieClip [tail] Frame 2
gotoAndPlay (1);
Symbol 17 Button
on (release) {
play();
}
Symbol 25 MovieClip Frame 1
txtBottom.curText = _root.text;
txtBottom.shadowText = _root.text;
Symbol 25 MovieClip Frame 10
gotoAndPlay (1);
Symbol 33 Button
on (keyPress "<Up>") {
if (!((this.yspeed == 10) and (this.xspeed == 0))) {
this.xspeed = 0;
this.yspeed = -10;
}
}
on (keyPress "<Down>") {
if (!((this.yspeed == -10) and (this.xspeed == 0))) {
this.xspeed = 0;
this.yspeed = 10;
}
}
on (keyPress "<Left>") {
if (!((this.xspeed == 10) and (this.yspeed == 0))) {
this.xspeed = -10;
this.yspeed = 0;
}
}
on (keyPress "<Right>") {
if (!((this.xspeed == -10) and (this.yspeed == 0))) {
this.xspeed = 10;
this.yspeed = 0;
}
}
Symbol 34 MovieClip Frame 1
function reset() {
i = 1;
while (i <= (_root.tLength + 1)) {
unloadMovie (_root["tail" + i]);
i++;
}
_root.tLength = 0;
_root.text = _root.numHearts;
_root.text = _root.numHearts2;
_root.numHearts = 0;
_root.numHearts2 = 0;
_root.head._x = start_x;
_root.head._y = start_y;
_root.gotoAndStop(2);
}
start_x = this._x;
start_y = this._y;
xspeed = 0;
yspeed = -10;
Symbol 34 MovieClip Frame 2
this._x = this._x + xspeed;
this._y = this._y + yspeed;
if ((this._x > 201) or (this._x < 1)) {
reset();
}
if ((this._y > 186) or (this._y < 1)) {
reset();
}
Symbol 34 MovieClip Frame 3
gotoAndPlay (2);
Symbol 36 MovieClip Frame 1
if ((this._x == _root.head._x) and (this._y == _root.head._y)) {
this._x = ((Math.round(Math.random() * 18) + 1) * 10) + 6.1;
this._y = ((Math.round(Math.random() * 16) + 1) * 10) + 6.1;
_root.numHearts++;
_root.numHearts2++;
if (_root.tLength < 30) {
_root.tLength++;
}
}
Symbol 36 MovieClip Frame 2
gotoAndPlay (1);