i am making a game for my flash class and i need the code to make an object not go through another. i know it is a hittest and i tried making it so when it hits
speedX=-speedX;
speedY=-speedY;
this just reverses my controls
and when i set it equal to zero it locks up my character
to control that i use
if(key.isDown(KEY.UP,DOWN,LEFT,RIGHT)){
speedX/Y=+/- #
}
the basic thing is to move my character in between two lines and just in cases i control it wrong and hit a wall my controls arent reversed or locked up
please help so i dont fail out of my class
(its a high school class and my teacher grades retarded: he starts st a C and grades down from that unless you go very above and beyond the assignment)