Okay, that sounds like it *should* work.
Throw some traces in there to see if the values of them are right, and if the "if" statements are executing when you'd expect them to.
if (up && right)
trace('up + right');
boltDir = 45;
If these are all working as you'd expect, look next at what it does with boltDir. If the values aren't right, double-check the keyDown and keyUp listeners.