Frame 1
function addFlake() {
var _local1 = canvas_mc.attachMovie("enemy", "enemy" + i, canvas_mc.getNextHighestDepth());
i++;
_local1._xscale = (_local1._yscale = (Math.random() * j) + 20);
_local1._x = Math.random() * 600;
_local1._y = -50;
if (bottom._currentframe == 1) {
scoredis = "Score: " + score;
score++;
j = j + 0.2;
} else {
scoredis = "";
j = 80;
}
}
this.createEmptyMovieClip("canvas_mc", 10);
var i = 0;
var j = 80;
score = 0;
myInterval = setInterval(addFlake, 10);
Instance of Symbol 5 MovieClip in Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.man)) {
_root.man._x = _root.man._x - 10;
}
}
Instance of Symbol 14 MovieClip "bottom" in Frame 1
/* no clip actions */
Instance of Symbol 16 MovieClip in Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.man)) {
_root.man._x = _root.man._x + 10;
}
}
Instance of Symbol 18 MovieClip in Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.man)) {
_root.man._y = _root.man._y + 10;
}
}
Instance of Symbol 20 MovieClip "man" in Frame 1
onClipEvent (load) {
startx = this._x;
starty = this._y;
}
onClipEvent (enterFrame) {
if (_root.bottom._currentframe == 1) {
if (Key.isDown(39)) {
this._x = this._x + 10;
}
if (Key.isDown(37)) {
this._x = this._x - 10;
}
if (Key.isDown(38)) {
this._y = this._y - 10;
}
if (Key.isDown(40)) {
this._y = this._y + 10;
}
this._visible = true;
} else {
this._visible = false;
}
}
Symbol 2 MovieClip [enemy] Frame 1
onEnterFrame = function () {
this._y = this._y + 10;
if (this.hitTest(_root.man)) {
_root.man._y = _root.man._y + 10;
}
if ((this._y > 500) || (_root.bottom._currentframe == 2)) {
this.removeMovieClip();
}
};
Symbol 13 Button
on (press) {
_root.man._x = _root.man.startx;
_root.man._y = _root.man.starty;
gotoAndStop (1);
}
Symbol 14 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.hitTest(_root.man)) {
this.myscore = _root.score;
_root.score = 0;
this.gotoAndStop(2);
}
}
};