Okay guys,

I've got a ball mc in the centre of the screen with the ground mc moving around and a car mc inside the ground mc.

When ball mc hits car mc it bounces off.

The only problem is I can only have one car. I can't copy and paste a bunch of cars in the ground mc to bounce off because only the original one works.

I based the coding idea on Mad sci's platform engine where you can copy and paste platforms. But mine doesn't work.

Here's the code:

IN THE GROUND MC

onClipEvent (load) {
mover = 5;
whack = "off";
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
this._x += mover;
}
if (Key.isDown(Key.RIGHT)) {
this._x -= mover;
}
if (Key.isDown(Key.UP)) {
this._y += mover;
}
if (Key.isDown(Key.DOWN)) {
this._y -= mover;
}
if (whack eq "on") {
mover = -10;
}
if (whack eq "off") {
mover = 5;
}
}


IN THE CAR MC INSIDE GROUND MC (it hasn't been given any instance name)

onClipEvent (enterFrame) {
if (hitTest(_root.ball)) {
_root.ground.whack = "on"
} else {
_root.ground.whack = "off"
}
}

THE BALL IS EMPTY (Apart from instance name)


Any ideas guys?

Cheers.