Frame 1
stop();
Frame 2
stop();
Frame 3
stop();
Frame 4
stop();
Frame 5
stop();
Frame 6
stop();
Frame 7
stop();
Frame 8
stop();
Frame 9
stop();
Frame 10
stop();
_root.homerun = 0;
Instance of Symbol 183 MovieClip "char" in Frame 10
onClipEvent (load) {
grav = 0;
speed = 5;
jumpHeight = 22;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
}
onClipEvent (enterFrame) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
grav = 0;
}
if (Key.isDown(39)) {
_x = (_x + speed);
_xscale = scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(37)) {
_x = (_x - speed);
_xscale = (-scale);
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(32)) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(5);
}
} else if (_root.ground.hitTest(_x, _y + 3, true) && (!Key.isDown(38))) {
this.gotoAndStop(3);
}
if (Key.isDown(38) && (_root.ground.hitTest(_x, _y + 3, true))) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(4);
}
if (_root.ground.hitTest(_x + (_width / 2), _y - (_height / 2), true) || (_root.ground.hitTest(_x + (_width / 2), _y - ((_height / 6) * 4), true))) {
_x = (_x - speed);
}
if (_root.ground.hitTest(_x - (_width / 2), _y - (_height / 2), true) || (_root.ground.hitTest(_x - (_width / 2), _y - ((_height / 6) * 4), true))) {
_x = (_x + speed);
}
if (_root.ground.hitTest(_x, _y - _height, true)) {
grav = 2;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.ground)) {
if (_root.homerun == 2) {
_root.gotoAndStop("play2");
}
}
}
Instance of Symbol 190 MovieClip "red" in Frame 10
onClipEvent (load) {
function changeY() {
x = _root.l1._y;
y = _root.l2._y - 35;
lol = Math.round(Math.random() * (y - x)) + x;
_y = lol;
}
changeY();
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.block)) {
_x = (_x + 1150);
_root.score--;
changeY();
}
_x = (_x - 5);
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.char.hit1.hit3)) {
_root.red.gotoAndPlay("hit");
_root.text.gotoAndPlay("homerun");
changeY();
}
_x = (_x - 5);
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.char.hit1.hit4)) {
_root.red.gotoAndPlay("hit");
_root.text.gotoAndPlay("homerun");
changeY();
}
_x = (_x - 5);
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.char.hit1.hit5)) {
_root.red.gotoAndPlay("hit");
_root.text.gotoAndPlay("homerun");
changeY();
}
_x = (_x - 5);
}
Frame 11
stop();
_root.homerun = 0;
Instance of Symbol 183 MovieClip "char" in Frame 11
onClipEvent (load) {
grav = 0;
speed = 5;
jumpHeight = 22;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
}
onClipEvent (enterFrame) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
grav = 0;
}
if (Key.isDown(39)) {
_x = (_x + speed);
_xscale = scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(37)) {
_x = (_x - speed);
_xscale = (-scale);
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(32)) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(5);
}
} else if (_root.ground.hitTest(_x, _y + 3, true) && (!Key.isDown(38))) {
this.gotoAndStop(3);
}
if (Key.isDown(38) && (_root.ground.hitTest(_x, _y + 3, true))) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(4);
}
if (_root.ground.hitTest(_x + (_width / 2), _y - (_height / 2), true) || (_root.ground.hitTest(_x + (_width / 2), _y - ((_height / 6) * 4), true))) {
_x = (_x - speed);
}
if (_root.ground.hitTest(_x - (_width / 2), _y - (_height / 2), true) || (_root.ground.hitTest(_x - (_width / 2), _y - ((_height / 6) * 4), true))) {
_x = (_x + speed);
}
if (_root.ground.hitTest(_x, _y - _height, true)) {
grav = 2;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.ground)) {
if (_root.homerun == 5) {
_root.gotoAndStop("play3");
}
}
}
Frame 12
stop();
_root.homerun = 0;
Instance of Symbol 183 MovieClip "char" in Frame 12
onClipEvent (load) {
grav = 0;
speed = 5;
jumpHeight = 22;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
}
onClipEvent (enterFrame) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
grav = 0;
}
if (Key.isDown(39)) {
_x = (_x + speed);
_xscale = scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(37)) {
_x = (_x - speed);
_xscale = (-scale);
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(32)) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(5);
}
} else if (_root.ground.hitTest(_x, _y + 3, true) && (!Key.isDown(38))) {
this.gotoAndStop(3);
}
if (Key.isDown(38) && (_root.ground.hitTest(_x, _y + 3, true))) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(4);
}
if (_root.ground.hitTest(_x + (_width / 2), _y - (_height / 2), true) || (_root.ground.hitTest(_x + (_width / 2), _y - ((_height / 6) * 4), true))) {
_x = (_x - speed);
}
if (_root.ground.hitTest(_x - (_width / 2), _y - (_height / 2), true) || (_root.ground.hitTest(_x - (_width / 2), _y - ((_height / 6) * 4), true))) {
_x = (_x + speed);
}
if (_root.ground.hitTest(_x, _y - _height, true)) {
grav = 2;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.ground)) {
if (_root.homerun == 4) {
_root.gotoAndStop("play4");
}
}
}
Frame 13
stop();
_root.homerun = 0;
Instance of Symbol 183 MovieClip "char" in Frame 13
onClipEvent (load) {
grav = 0;
speed = 5;
jumpHeight = 22;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
}
onClipEvent (enterFrame) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
grav = 0;
}
if (Key.isDown(39)) {
_x = (_x + speed);
_xscale = scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(37)) {
_x = (_x - speed);
_xscale = (-scale);
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(32)) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(5);
}
} else if (_root.ground.hitTest(_x, _y + 3, true) && (!Key.isDown(38))) {
this.gotoAndStop(3);
}
if (Key.isDown(38) && (_root.ground.hitTest(_x, _y + 3, true))) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(4);
}
if (_root.ground.hitTest(_x + (_width / 2), _y - (_height / 2), true) || (_root.ground.hitTest(_x + (_width / 2), _y - ((_height / 6) * 4), true))) {
_x = (_x - speed);
}
if (_root.ground.hitTest(_x - (_width / 2), _y - (_height / 2), true) || (_root.ground.hitTest(_x - (_width / 2), _y - ((_height / 6) * 4), true))) {
_x = (_x + speed);
}
if (_root.ground.hitTest(_x, _y - _height, true)) {
grav = 2;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.ground)) {
if (_root.homerun == 10) {
_root.gotoAndStop("play5");
}
}
}
Frame 14
stop();
_root.homerun = 0;
Instance of Symbol 183 MovieClip "char" in Frame 14
onClipEvent (load) {
grav = 0;
speed = 5;
jumpHeight = 22;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
}
onClipEvent (enterFrame) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
grav = 0;
}
if (Key.isDown(39)) {
_x = (_x + speed);
_xscale = scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(37)) {
_x = (_x - speed);
_xscale = (-scale);
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(32)) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(5);
}
} else if (_root.ground.hitTest(_x, _y + 3, true) && (!Key.isDown(38))) {
this.gotoAndStop(3);
}
if (Key.isDown(38) && (_root.ground.hitTest(_x, _y + 3, true))) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(4);
}
if (_root.ground.hitTest(_x + (_width / 2), _y - (_height / 2), true) || (_root.ground.hitTest(_x + (_width / 2), _y - ((_height / 6) * 4), true))) {
_x = (_x - speed);
}
if (_root.ground.hitTest(_x - (_width / 2), _y - (_height / 2), true) || (_root.ground.hitTest(_x - (_width / 2), _y - ((_height / 6) * 4), true))) {
_x = (_x + speed);
}
if (_root.ground.hitTest(_x, _y - _height, true)) {
grav = 2;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.ground)) {
if (_root.homerun == 15) {
_root.gotoAndStop("play6");
}
}
}
Frame 15
stop();
_root.homerun = 0;
Instance of Symbol 183 MovieClip "char" in Frame 15
onClipEvent (load) {
grav = 0;
speed = 5;
jumpHeight = 22;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
}
onClipEvent (enterFrame) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
grav = 0;
}
if (Key.isDown(39)) {
_x = (_x + speed);
_xscale = scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(37)) {
_x = (_x - speed);
_xscale = (-scale);
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(32)) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(5);
}
} else if (_root.ground.hitTest(_x, _y + 3, true) && (!Key.isDown(38))) {
this.gotoAndStop(3);
}
if (Key.isDown(38) && (_root.ground.hitTest(_x, _y + 3, true))) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(4);
}
if (_root.ground.hitTest(_x + (_width / 2), _y - (_height / 2), true) || (_root.ground.hitTest(_x + (_width / 2), _y - ((_height / 6) * 4), true))) {
_x = (_x - speed);
}
if (_root.ground.hitTest(_x - (_width / 2), _y - (_height / 2), true) || (_root.ground.hitTest(_x - (_width / 2), _y - ((_height / 6) * 4), true))) {
_x = (_x + speed);
}
if (_root.ground.hitTest(_x, _y - _height, true)) {
grav = 2;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.ground)) {
if (_root.homerun == 20) {
_root.gotoAndStop("won");
}
}
}
Frame 16
stop();
Instance of Symbol 183 MovieClip "char" in Frame 16
onClipEvent (load) {
grav = 0;
speed = 5;
jumpHeight = 22;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
}
onClipEvent (enterFrame) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
grav = 0;
}
if (Key.isDown(39)) {
_x = (_x + speed);
_xscale = scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(37)) {
_x = (_x - speed);
_xscale = (-scale);
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(32)) {
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(5);
}
} else if (_root.ground.hitTest(_x, _y + 3, true) && (!Key.isDown(38))) {
this.gotoAndStop(3);
}
if (Key.isDown(38) && (_root.ground.hitTest(_x, _y + 3, true))) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(4);
}
if (_root.ground.hitTest(_x + (_width / 2), _y - (_height / 2), true) || (_root.ground.hitTest(_x + (_width / 2), _y - ((_height / 6) * 4), true))) {
_x = (_x - speed);
}
if (_root.ground.hitTest(_x - (_width / 2), _y - (_height / 2), true) || (_root.ground.hitTest(_x - (_width / 2), _y - ((_height / 6) * 4), true))) {
_x = (_x + speed);
}
if (_root.ground.hitTest(_x, _y - _height, true)) {
grav = 2;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.ground)) {
if (_root.homerun == 20) {
_root.gotoAndStop("win");
}
}
}
Symbol 37 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
gotoAndStop ("loaded");
}
Symbol 37 MovieClip Frame 2
gotoAndPlay (1);
Symbol 37 MovieClip Frame 3
stop();
_root.nextFrame();
Symbol 46 Button
on (press) {
gotoAndStop ("train");
}
Symbol 48 Button
on (press) {
gotoAndStop ("play");
}
Symbol 64 MovieClip Frame 47
_parent.gotoAndStop("idle");
Symbol 66 MovieClip Frame 1
stopAllSounds();
Symbol 66 MovieClip Frame 2
stop();
Symbol 67 MovieClip Frame 35
stop();
Symbol 84 Button
on (press) {
gotoAndStop ("1");
}
Symbol 86 Button
on (press) {
gotoAndStop ("2");
}
Symbol 88 Button
on (press) {
gotoAndStop ("3");
}
Symbol 90 Button
on (press) {
gotoAndStop ("4");
}
Symbol 92 Button
on (press) {
gotoAndStop ("5");
}
Symbol 94 Button
on (press) {
gotoAndStop ("6");
}
Symbol 99 Button
on (press) {
gotoAndStop ("menu");
}
Symbol 158 MovieClip Frame 26
_parent.gotoAndPlay("idle");
Symbol 159 MovieClip Frame 2
stop();
Symbol 182 MovieClip Frame 1
play();
Symbol 182 MovieClip Frame 13
_parent.gotoAndStop("stand");
Symbol 183 MovieClip Frame 1
stop();
Symbol 183 MovieClip Frame 2
stop();
Symbol 183 MovieClip Frame 3
stop();
Symbol 183 MovieClip Frame 4
stop();
Symbol 183 MovieClip Frame 5
stop();
Symbol 187 MovieClip Frame 1
stop();
Symbol 187 MovieClip Frame 42
_root.homerun++;
Symbol 187 MovieClip Frame 45
gotoAndStop (1);
Symbol 190 MovieClip Frame 1
stop();
Symbol 190 MovieClip Frame 2
_root.score = _root.score + 1;
Symbol 190 MovieClip Frame 8
_x = (_x + 2150);
nextFrame();
Symbol 190 MovieClip Frame 9
gotoAndStop (1);
Symbol 199 MovieClip Frame 1510
_root.gotoAndStop("play2");
Symbol 205 MovieClip Frame 755
_root.gotoAndStop("play3");
Symbol 207 MovieClip Frame 2254
_root.gotoAndStop("play5");
Symbol 214 Button
on (release) {
nextFrame();
}
Symbol 220 MovieClip Frame 1
stop();
Symbol 222 Button
on (release) {
gotoAndStop ("menu");
}