Combined Code
frame 1 {
music.start(0, 9999);
}
frame 1 {
function counter() {
_root.counter_txt += 1;
}
counter_txt = 0;
}
button 5 {
on (release) {
getURL('http://YouTube.com/MrSkittleD1ck', '_blank');
}
}
button 10 {
on (release) {
_root.counter_txt += 1;
}
}
button 13 {
on (release) {
getURL('http://YouTube.com/NGBDubstep', '_blank');
}
}
button 16 {
on (release) {
getURL('http://YouTube.com/TxColter', '_blank');
}
}
button 24 {
on (release) {
s = new Sound();
if (_root.mute == 0) {
_root.mute = 2;
s.setVolume(100);
} else {
_root.mute = 0;
s.setVolume(0);
}
}
}
button 27 {
on (release) {
stopAllSounds();
}
}
movieClip 29 {
}
movieClip 32 {
}
instance char of movieClip 32 {
onClipEvent (load) {
var ground = _root.ground;
var grav = 0;
var gravity = 2;
var speed = 7;
var maxJump = -16;
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 + 6, true)) {
touchingGround = true;
} else {
touchingGround = false;
}
if (Key.isDown(39)) {
_x = _x + speed;
_xscale = -100;
}
if (Key.isDown(37)) {
_x = _x - speed;
_xscale = 100;
}
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;
}
}
}
movieClip 34 {
}
instance of movieClip 34 {
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
_root.char._x = 1238.35;
_root.char._y = 302.9;
}
}
}