Frame 1
_global.mov = 0;
_global.run = 0;
_global.dir = 1;
_global.vel = 0;
_global.jump = 0;
_global.fallgrav = 0;
_global.dash = 0;
_global.fx = 0;
_global.fy = 0;
_global.accel = 0;
_global.dir = 1;
_global.ram = 0;
_global.pow = 0;
_global.k = 5;
_global.grav = 0;
Instance of Symbol 3 MovieClip in Frame 1
on (press) {
_global.fx = _xmouse;
_global.fy = _ymouse;
}
on (release) {
_global.dash = 1;
var px = (_xmouse - _global.fx);
var py = (_ymouse - _global.fy);
_root.texts = (Math.atan2(py, px) * 180) / Math.PI;
_global.ram = (Math.atan2(py, px) * 180) / Math.PI;
_global.pow = Math.sqrt((px * px) + (py * py));
_root.pdash._rotation = _global.ram;
_global.k = 4;
}
Instance of Symbol 14 MovieClip "pdash" in Frame 1
onClipEvent (enterFrame) {
if (_global.dash == 1) {
this._alpha = 100;
this._x = _root.player._x;
this._y = _root.player._y;
} else {
this._alpha = 0;
}
}
Instance of Symbol 18 MovieClip "player" in Frame 1
onClipEvent (enterFrame) {
if (_global.dash == 1) {
_root.world._x = _root.world._x - ((_global.pow / _global.k) * Math.cos(_global.ram * (Math.PI/180)));
_root.world._y = _root.world._y - ((_global.pow / _global.k) * Math.sin(_global.ram * (Math.PI/180)));
_global.k++;
_root.world._y = _root.world._y - _global.grav;
}
if (this.hitTest(_root.world)) {
_global.dash = 0;
_global.fallgrav = 0;
_global.jump = 0;
_root.world._y = this._y + 40;
}
}
Instance of Symbol 49 MovieClip "playerover" in Frame 1
onClipEvent (enterFrame) {
if (_global.dash == 0) {
this._alpha = 100;
this._x = _root.player._x;
this._y = _root.player._y;
} else {
this._alpha = 0;
}
}
Instance of Symbol 51 MovieClip in Frame 1
onClipEvent (enterFrame) {
_global.fallgrav = _global.fallgrav + 1;
_root.world._y = _root.world._y - _global.fallgrav;
if (_global.vel <= 0) {
_global.vel = 0;
}
_root.world._x = _root.world._x - (_global.vel * _global.dir);
if (_global.vel >= 20) {
_global.vel = 20;
}
if (_global.mov == 1) {
if (_global.vel <= 5) {
_global.vel = 5;
}
_root.playerover.gotoAndStop(2);
_global.mov = 2;
} else if (_global.mov == 2) {
_global.run++;
_global.vel++;
if (_global.run >= 40) {
_global.vel = _global.vel + 2;
_root.playerover.gotoAndStop(3);
_global.mov = 3;
}
} else if (_global.mov == 3) {
_global.vel = _global.vel + 2;
} else if ((_global.mov == 4) && (_global.jump == 1)) {
_root.playerover.gotoAndStop(6);
_global.mov = 5;
} else if ((_global.mov == 5) && (_global.jump == 1)) {
_root.world._y = _root.world._y + 15;
} else if ((_global.mov == 5) && (_global.jump == 0)) {
_root.playerover.gotoAndStop(3);
} else if (_global.mov == 0) {
if (_global.vel >= 10) {
_root.playerover.gotoAndStop(9);
} else {
_root.playerover.gotoAndStop(1);
}
_global.run = 0;
}
if (Key.isDown(39) || (Key.isDown(68))) {
if (_global.jump == 0) {
_root.playerover._xscale = 100;
_global.dir = 1;
}
if (_global.mov == 0) {
_global.mov = 1;
}
} else if (Key.isDown(37) || (Key.isDown(65))) {
if (_global.jump == 0) {
_root.playerover._xscale = -100;
_global.dir = -1;
}
if (_global.mov == 0) {
_global.mov = 1;
}
} else if (_global.jump == 0) {
_global.mov = 0;
_global.vel = _global.vel - 2;
}
if (Key.isDown(40) || (Key.isDown(83))) {
if (_global.mov == 0) {
_root.playerover.gotoAndStop(4);
}
} else if (Key.isDown(38) || (Key.isDown(87))) {
if (_global.mov == 0) {
_root.playerover.gotoAndStop(5);
}
}
if (Key.isDown(90) || (Key.isDown(81))) {
if (_global.jump == 0) {
_global.mov = 4;
_root.player._y = _root.player._y - 10;
_global.jump = 1;
}
}
}
Symbol 49 MovieClip Frame 1
stop();