i have made a swf thats supposed to let you alter the accel and everything but the max speed isnt working. here is the code i used :
onClipEvent (load) {
_root.speed = 0;
_root.maxspeed = 20;
_root.accel = 1;
_root.deccel = .9;
}
onClipEvent (enterFrame) {
_root.speed *= _root.deccel;
_x += _root.speed;
if (Key.isDown(Key.RIGHT)) {
if (_root.speed<_root.maxspeed) {
_root.speed += _root.accel;
}
}
if (Key.isDown(Key.LEFT)) {
_root.speed -= _root.accel;
}
}
does anyone know why its not working???