Combined Code
frame 1 {
oldQualtiy = _quality;
_quality = 'HIGH';
}
frame 1 {
score = 0;
timelimit = 60;
timeleft = 60;
finalcarframe = 5;
finalcarx = 0;
finalcary = 0;
}
frame 1 {
stop();
}
frame 1 {
stop();
}
movieClip 7 {
}
movieClip 9 {
}
movieClip 11 {
}
movieClip 21 {
}
instance car of movieClip 21 {
onClipEvent (load) {
gotoAndStop(5);
}
}
movieClip 40 {
}
instance of movieClip 40 {
onClipEvent (enterFrame) {
if (this._currentframe == 26) {
_root.gotoAndPlay(2);
}
}
}
frame 2 {
inc = 0;
_quality = 'MEDIUM';
snd = new Sound();
sndmusic = new Sound();
snd.attachSound('carloopin');
sndmusic.attachSound('music');
snd.start(0, 999);
snd.setVolume(30);
sndmusic.start(0, 999);
}
frame 2 {
stop();
}
movieClip 59 {
}
instance div of movieClip 59 {
onClipEvent (load) {
yposi = 200;
yc = 760;
xc = 760;
j = 3;
pers = this._y / j;
oldt = Math.round(getTimer() / 1000);
acc = 0;
dcc = 0;
}
onClipEvent (enterFrame) {
if (acc == 1) {
_root.car._yscale -= 1;
_root.car._y -= 1;
_root.snd.setVolume(30 + _root.inc * 2);
acc = 0;
}
if (dcc == 1) {
_root.car._yscale += 1;
_root.car._y += 1;
_root.snd.setVolume(30 + _root.inc * 2);
dcc = 0;
}
if (Key.isDown(Key.UP)) {
_root.inc += j;
_root.car._yscale += 1;
_root.car._y += 1;
acc = 1;
}
if (Key.isDown(Key.DOWN)) {
_root.inc -= j;
_root.car._yscale -= 1;
_root.car._y -= 1;
dcc = 1;
}
if (21 < _root.inc) {
_root.inc = 21;
}
if (0 >= _root.inc) {
_root.inc = 0;
} else {
pers += 1;
this._y += _root.inc + pers;
this._yscale += (_root.inc + pers) * 3.75;
this._xscale += (_root.inc + pers) * 3;
}
if (this._y >= yposi) {
this._y = 0;
pers = 0;
this._yscale = 100;
this._xscale = 100;
}
if (_root.timeleft == 0) {
_root.div.stop();
_root.zeb.stop();
_root.tree.stop();
_root.tree1.stop();
_root.peg.stop();
_root.car.stop();
_root.gotoAndStop(3);
}
_root.timeleft = _root.timelimit - (Math.round(getTimer() / 1000) - oldt);
}
}
movieClip 60 {
}
instance zeb of movieClip 60 {
onClipEvent (load) {
yposi = 200;
yc = 760;
xc = 760;
j = 3;
pers = this._y / j;
}
onClipEvent (enterFrame) {
if (0 >= _root.inc) {
_root.inc = 0;
} else {
pers += 1;
this._y += _root.inc + pers;
this._yscale += (_root.inc + pers) * 3.75;
this._xscale += (_root.inc + pers) * 4.25;
if (Key.isDown(Key.LEFT) and 1 < _root.car._currentframe) {
_root.car.prevFrame();
_root.car._x -= 30;
}
if (Key.isDown(Key.RIGHT) and _root.car._currentframe < 9) {
_root.car.nextFrame();
_root.car._x += 30;
}
}
if (this._y >= yposi) {
this._y = 0;
pers = 0;
this._yscale = 100;
this._xscale = 100;
_root.score += 5;
}
_root.finalcarframe = _root.car._currentframe;
_root.finalcarx = _root.car._x;
_root.finalcary = _root.car._y;
}
}
movieClip 61 {
}
instance tree of movieClip 61 {
onClipEvent (load) {
yposi = 200;
yc = 760;
xc = 760;
j = 3;
pers = this._y / j;
}
onClipEvent (enterFrame) {
if (0 >= _root.inc) {
_root.inc = 0;
} else {
pers += 1;
this._y += _root.inc + pers;
this._yscale += (_root.inc + pers) * 3.75;
this._xscale += (_root.inc + pers) * 4.25;
}
if (this._y >= yposi) {
this._y = 0;
pers = 0;
this._yscale = 100;
this._xscale = 100;
}
}
}
movieClip 62 {
}
instance tree1 of movieClip 62 {
onClipEvent (load) {
yposi = 200;
yc = 760;
xc = 760;
j = 3;
pers = this._y / j;
}
onClipEvent (enterFrame) {
if (0 >= _root.inc) {
_root.inc = 0;
} else {
pers += 1;
this._y += _root.inc + pers;
this._yscale += (_root.inc + pers) * 3.75;
this._xscale += (_root.inc + pers) * 4.25;
}
if (this._y >= yposi) {
this._y = 0;
pers = 0;
this._yscale = 100;
this._xscale = 100;
}
}
}
movieClip 68 {
frame 1 {
stop();
}
frame 5 {
stop();
}
}
instance peg of movieClip 68 {
onClipEvent (load) {
function reset() {
this.gotoAndStop(1);
this._xscale = 100;
this._yscale = 100;
this._y = 0;
this._x = random(50) + 250;
xinc = (this._x - 275) * 5 / 100;
pers = 0;
sc = 0;
}
function hit() {
this.nextFrame();
}
inc = 0;
j = 3;
oldy = 0;
time = 30;
reset();
}
onClipEvent (enterFrame) {
if (0 >= _root.inc) {
_root.inc = 0;
} else {
pers += 1;
oldy = this._y;
this._y += _root.inc + pers;
this._yscale += (_root.inc + pers) * 3.75;
this._xscale += (_root.inc + pers) * 3.75;
this._x += xinc * (this._y - oldy);
}
if (this.hitTest(_root.car)) {
hit();
sc = 1;
}
if (this._y >= 200) {
if (sc == 1) {
_root.score -= 5;
sc = 0;
}
reset();
}
}
}
frame 3 {
_quality = 'HIGH';
snd.stop('carloopin');
sndmusic.stop('music');
}
frame 3 {
stop();
}
frame 3 {
stop();
}
movieClip 75 {
}
instance div of movieClip 75 {
}
movieClip 76 {
}
instance car of movieClip 76 {
onClipEvent (load) {
this._x = _root.finalcarx;
this._y = _root.finalcary;
gotoAndStop(_root.finalcarframe);
}
}
movieClip 86 {
}
movieClip 87 {
frame 7 {
stop();
}
}
instance of movieClip 87 {
onClipEvent (enterFrame) {
if (Key.isDown(Key.SPACE)) {
_root.gotoAndPlay(1);
}
}
}