Hey, I'm new here, and I'm also fairly new to flash, I am having a problem with making collision boundries in flash, and I want you help... here is what I have so far... The instance "land" is the boundry, this script is on the car.

onClipEvent (enterFrame) {
//This code will advance the car forward.
if (Key.isDown(Key.UP)) {
speed += .5;
// This will make the car go backwards
if (Key.isDown(Key.DOWN)) {
speed -= .5;
//The car will start to slow down after the speed of 10
if (Math.abs(speed)>5) {
speed *= .5;
// This will change the angle of the car
if (Key.isDown(Key.LEFT)) {
_rotation -= 4;
if (Key.isDown(Key.RIGHT)) {
_rotation += 4;
// here is where the hittest is for the boundary
speed *= .98;
x = Math.sin(_rotation*(Math.PI/180))*speed;
y = Math.cos(_rotation*(Math.PI/180))*speed*-1;
if (!_root.land.hitTest(_x+x, _y+y, true)) {
_x += x;
_y += y;
} else {
speed *= -.6;

My problem is, when I hit the boundry straight on, It works, but when I rotate on the boundry, I can go right through it with the car. I want a way so that the car can't rotate on the boundry, or if I can't do that, a way that even if the car does rotate, it can't go through the wall.