# Need to make walls

**URL:** <https://forum.kirupa.com/t/need-to-make-walls/174511>\
**Category:** Uncategorized\
**Created:** [January 6, 2006, 9:15am UTC](https://forum.kirupa.com/t/need-to-make-walls/174511 "2006-01-06T09:15:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shadowsquall](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@shadowsquall](https://forum.kirupa.com/u/shadowsquall)\
**Post date:** [January 6, 2006, 9:15am UTC](https://forum.kirupa.com/t/need-to-make-walls/174511/1 "2006-01-06T09:15:47Z")

</div>

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)
