Frame 1
stop();
score = 0;
Instance of Symbol 4 MovieClip "hero" in Frame 1
onClipEvent (load) {
yspeed = 0;
xspeed = 0;
wind = 0;
power = 0.65;
gravity = 0.1;
upconstant = 0.75;
friction = 0.99;
}
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
xspeed = xspeed - power;
}
if (Key.isDown(39)) {
xspeed = xspeed + power;
}
if (Key.isDown(38)) {
yspeed = yspeed - (power * upconstant);
}
if (Key.isDown(40)) {
yspeed = yspeed + (power * upconstant);
}
xspeed = (xspeed + wind) * friction;
yspeed = yspeed + gravity;
_y = (_y + yspeed);
_x = (_x + xspeed);
_rotation = (_rotation + xspeed);
if (_root.wall.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 50;
_y = 50;
}
if (_root.trig.hitTest(this.hero_hit)) {
_root.trig.gotoAndStop(2);
_root.gate.moving = 0;
}
if (_root.goal.hitTest(this.hero_hit)) {
_root.gotoAndStop("win");
}
}
Instance of Symbol 6 MovieClip "wall" in Frame 1
onClipEvent (load) {
function __f_load(eventObj) {
if (this.hitTest(hero)) {
hero._y = hero._y - 5;
trace("scat");
}
}
this.addEventListener("load", __f_load);
}
Instance of Symbol 8 MovieClip "gate" in Frame 1
onClipEvent (load) {
moving = 1;
}
onClipEvent (enterFrame) {
if (moving == 1) {
this.stop();
} else {
this.play();
}
}
Instance of Symbol 11 MovieClip "trig" in Frame 1
onClipEvent (load) {
function __f_enterFrame(eventObj) {
}
this.addEventListener("enterFrame", __f_enterFrame);
}
Symbol 8 MovieClip Frame 1
stop();
Symbol 8 MovieClip Frame 50
stop();
moving = 1;
Symbol 11 MovieClip Frame 1
stop();