humm
How did you make the as for using the keys to move
humm
How did you make the as for using the keys to move
ok, first, make a picture and convert it to a movie clip. Call it car. Then right click on the clip and copy these actions into it:
onClipEvent (enterFrame) {
_root.speed = speed;
_root.mph = Number(speed)*2;
_root.mph -= _root.mph%1;
if (_root.mph<1) {
_root.mph = 1;
}
if (Key.isDown(Key.UP)) {
speed += 2;
}
if (Key.isDown(Key.DOWN)) {
speed -= 1;
}
if (Math.abs(speed)>20) {
speed *= .7;
}
if (Key.isDown(Key.LEFT)) {
_rotation -= 14;
}
if (Key.isDown(Key.RIGHT)) {
_rotation += 14;
}
speed *= .98;
x = Math.sin(_rotation*(Math.PI/180))*speed;
y = Math.cos(_rotation*(Math.PI/180))*speed*-1;
if (!_root.boundary.hitTest(_x+x, _y+y, true)) {
_x += x;
_y += y;
} else {
speed *= -.6;
}
}
onClipEvent (enterFrame) {
if (this._x> 600) {
this._x = -50;
}
}
onClipEvent (enterFrame) {
if (this._y> 450) {
this._y = -50;
}
}
onClipEvent (enterFrame) {
if (this._x <-50) {
this._x = 600;
}
}
onClipEvent (enterFrame) {
if (this._y <-50) {
this._y = 450;
}
}
If you want more help, goto flashkit.com and goto tutorials, then games, then on page 5 the how to make GTA like movement. MUST HAVE FLASH MX
Age 35, Male
Camdenton,MO
Joined on 3/27/03