Frame 1
stop();
Instance of Symbol 3 MovieClip in Frame 1
onClipEvent (enterFrame) {
if (!_root.Dan.shot) {
}
}
Instance of Symbol 5 MovieClip in Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.Dan)) {
_root.Dan.YCollision = true;
_root.Dan.gotoAndStop(2);
_root.Dan.ang = 180;
}
}
Instance of Symbol 6 MovieClip in Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.Dan)) {
_root.gotoAndPlay(2);
}
}
Instance of Symbol 10 MovieClip "Dan" in Frame 1
onClipEvent (load) {
startX = _x;
startY = _y;
xStrength = 0;
firing = false;
shot = false;
grav = 0;
gravAcc = 0.3;
Collision = false;
ang = 180;
stop();
YCollision = false;
Bounce = false;
Bounced = false;
}
onClipEvent (enterFrame) {
_root.debug.text = xStrength;
_root.debug2.text = permxStrength;
xStrength = _xmouse / 100;
yStrength = _ymouse / 100;
_rotation = ang;
if (Key.isDown(1) && (!firing)) {
firing = true;
}
if (((!Key.isDown(1)) && (firing)) && (!shot)) {
permxStrength = xStrength;
permyStrength = yStrength;
firing = false;
shot = true;
}
if ((shot & (!Collision)) & (!YCollision)) {
_x = (_x + (permxStrength * 15));
}
if (shot & (!YCollision)) {
_y = (_y + (permyStrength * 15));
_y = (_y + grav);
grav = grav + gravAcc;
ang = ang + 5;
}
if (Key.isDown(13)) {
_x = startX;
_y = startY;
Collision = false;
YCollision = false;
firing = false;
shot = false;
grav = 0;
ang = 180;
this.gotoAndStop(1);
}
if (Bounce) {
grav = 3;
Bounce = false;
}
}
Instance of Symbol 11 MovieClip in Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.Dan)) {
_root.Dan.Collision = true;
}
}
Instance of Symbol 11 MovieClip in Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.Dan)) {
_root.Dan.Collision = true;
}
}
Instance of Symbol 15 MovieClip in Frame 1
onClipEvent (load) {
t = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.Dan)) {
_root.Dan.Bounce = true;
t = t + 1;
}
if (t > 1) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
if (Key.isDown(13)) {
t = 0;
}
}
Frame 2
stop();
Instance of Symbol 40 MovieClip in Frame 2
onClipEvent (load) {
t = 0;
}
onClipEvent (enterFrame) {
_root.debug3.text = t;
t = t + 1;
if (t >= 123) {
_root.gotoAndStop(3);
}
}
Frame 3
stop();
Instance of Symbol 44 MovieClip in Frame 3
onClipEvent (load) {
stop();
}
onClipEvent (enterFrame) {
if (Key.isDown(39)) {
gotoAndStop (2);
_x = (_x + 7);
} else if (Key.isDown(37)) {
gotoAndStop (3);
_x = (_x - 7);
} else {
gotoAndStop (1);
}
}