Combined Code
movieClip 6 {
}
frame 2 {
if (_root.getBytesTotal() != _root.getBytesLoaded()) {
gotoAndPlay(1);
}
bar_mc._alpha = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
_root.loader_txt.text = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) + '%';
}
frame 3 {
stop();
}
// unknown tag 88 length 70
movieClip 16 {
}
movieClip 18 {
}
button 21 {
on (release) {
_root.gotoAndStop(4);
}
}
movieClip 30 {
frame 1 {
stop();
}
}
instance of movieClip 30 {
onClipEvent (release) {
if (this._currentframe == 1) {
this.nextFrame();
} else {
this.prevFrame();
}
}
}
frame 4 {
stop();
}
movieClip 34 {
}
movieClip 44 {
}
movieClip 48 {
}
movieClip 49 {
}
movieClip 52 {
frame 95 {
_root.gotoAndStop(5);
}
}
frame 5 {
bgSound = new Sound(this);
bgSound.attachSound('sound1');
bgSound.start(0, 99);
}
frame 5 {
function go() {
if (Key.isDown(37)) {
if (char._x > 0) {
char._x -= speed;
}
}
if (Key.isDown(39)) {
if (char._x < 550) {
char._x += speed;
}
}
if (Key.isDown(38)) {
if (char._y > 0) {
char._y -= speed;
}
}
if (Key.isDown(40)) {
if (char._y < 400) {
char._y += speed;
}
}
}
function collectibles(item, amount, speed) {
item._x -= speed;
if (item._x < -50) {
item._x = 1000;
item._y = Math.random() * 400 + 0;
}
if (item.hitTest(char)) {
item._x = 1000;
item._y = Math.random() * 400 + 0;
itemcount += amount;
}
}
function flyingshit() {
collectibles(watermelon, 1, 6);
collectibles(welfare, 2, 12);
}
function enemy(id, speed) {
id._x -= speed;
if (id._x < -50) {
id._x = 1000;
id._y = Math.random() * 400 + 0;
}
if (char.hitTest(id)) {
_root.gotoAndStop(6);
}
}
function enemies() {
enemy(kkk, 6);
enemy(kkk2, 6);
enemy(policeman, 12);
enemy(policeman2, 12);
}
function createExplosion(targetX, targetY) {
var v6 = 0;
while (v6 < particleTotal) {
var v5 = flash.display.BitmapData.loadBitmap('fire.jpg');
var v3 = _root.createEmptyMovieClip('main_holder', _root.getNextHighestDepth());
var v4 = v3.createEmptyMovieClip('internal_holder', v3.getNextHighestDepth());
v4._x = -v5.width / 2;
v4._y = -v5.height / 2;
v4.attachBitmap(v5, v4.getNextHighestDepth(), 'never', true);
v3._x = targetX;
v3._y = targetY;
v3._rotation = random(360);
v3._alpha = random(50) + 50;
v3.boundyLeft = targetX - particleRange;
v3.boundyTop = targetY - particleRange;
v3.boundyRight = targetX + particleRange;
v3.boundyBottom = targetY + particleRange;
v3.speedX = Math.random(particleMaxSpeed) - Math.random(particleMaxSpeed);
v3.speedY = Math.random(particleMaxSpeed) - Math.random(particleMaxSpeed);
v3.speedX *= particleMaxSpeed;
v3.speedY *= particleMaxSpeed;
v3.fadeSpeed = Math.random(particleFadeSpeed) * particleFadeSpeed;
++numberOfParticles;
v3.onEnterFrame = function () {
this._alpha -= this.fadeSpeed;
this._x += -5;
this._y += this.speedY;
if (this._alpha <= 0 || this._x < this.boundyLeft || this._x > this.boundyRight || this._y < this.boundyTop || this._y > this.boundyBottom) {
this.removeMovieClip();
--numberOfParticles;
}
};
++v6;
}
}
stop();
_root.distancet = 0;
_root.itemt = 0;
_root.scoret = 0;
var score = 0;
var itemcount = 0;
var distance = 0;
var speed = 10;
var particleMaxSpeed = 7;
var particleFadeSpeed = 2;
var particleTotal = 6;
var particleRange = 500;
_root.char.onEnterFrame = function () {
go();
flyingshit();
enemies();
createExplosion(char._x - 30, char._y + 17);
++distance;
score = (itemcount + distance) / 2;
_root.distancet = 'Distance: ' + distance;
_root.scoret = ' Your Score: ' + score;
_root.itemt = 'Items: ' + itemcount;
};
}
movieClip 55 {
}
movieClip 56 {
}
movieClip 58 {
}
movieClip 59 {
}
movieClip 62 {
}
movieClip 65 {
}
movieClip 71 {
}
movieClip 74 {
}
movieClip 77 {
}
frame 6 {
bgSound.stop();
}
frame 6 {
stop();
}
movieClip 80 {
}
instance of movieClip 80 {
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
_root.gotoAndStop(5);
}
}
}