Combined Code
frame 1 {
stop();
}
movieClip 3 {
}
movieClip 4 {
frame 191 {
stop();
}
}
button 7 {
on (release) {
gotoAndStop(2);
}
}
movieClip 9 {
}
movieClip 10 {
frame 121 {
stop();
}
}
frame 2 {
var score = 0;
if (_root.m_1.hitTest(char)) {
score += 1;
}
if (_root.m_1.hitTest(_root.resetbox)) {
gotoAndStop(3);
}
}
frame 2 {
stop();
}
movieClip 20 {
}
movieClip 21 {
}
movieClip 22 {
}
movieClip 31 {
}
// unknown tag 88 length 75
movieClip 40 {
}
movieClip 43 {
}
movieClip 45 {
}
movieClip 46 {
}
movieClip 47 {
}
instance char of movieClip 47 {
onClipEvent (load) {
var ground = _root.ground;
var grav = 0;
var gravity = 2;
var speed = 7;
var maxJump = 0;
var touchingGround = false;
}
onClipEvent (enterFrame) {
_y = _y + grav;
grav += gravity;
while (ground.hitTest(_x, _y, true)) {
_y = _y - gravity;
grav = 0;
}
if (ground.hitTest(_x, _y + 5, true)) {
touchingGround = true;
} else {
touchingGround = false;
}
if (Key.isDown(39)) {
_x = _x + speed;
}
if (Key.isDown(37)) {
_x = _x - speed;
}
if (Key.isDown(38) && touchingGround) {
grav = maxJump;
}
if (ground.hitTest(_x + (_width - 2), _y - (_height - 2), true)) {
_x = _x - speed;
}
if (ground.hitTest(_x - (_width - 2), _y - (_height - 2), true)) {
_x = _x + speed;
}
if (ground.hitTest(_x, _y - height, true)) {
grav = 3;
}
}
onClipEvent (enterFrame) {
if (_root.m_1.hitTest(this)) {
_root.m_1._x = random(550);
_root.m_1._y = -150;
scorecounter.text = ++score;
_root.char.size += 5;
_root.char.size = _root.char.size;
_root.char.length += 5;
_root.char.length = _root.char.length;
}
}
onClipEvent (enterFrame) {
if (_root.m_1.hitTest(this)) {
score = 1;
}
}
}
movieClip 49 {
}
movieClip 50 {
}
instance m_1 of movieClip 50 {
onClipEvent (load) {
this._y = -150;
this._x = random(550);
}
onClipEvent (enterFrame) {
this._y += 12;
}
onClipEvent (enterFrame) {
if (this.hitTest(this._parent.char)) {
_root.score += 1;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.resetbox)) {
_root.gotoAndStop(3);
}
}
}
movieClip 52 {
}
instance resetbox of movieClip 52 {
onClipEvent (enterFrame) {
if (_root.m_1.hitTest(this)) {
_root.m_1._x = random(550);
_root.m_1._y = -150;
}
}
}
frame 3 {
stop();
}
button 57 {
on (release) {
gotoAndStop(1);
}
}