Assuming, for a rectangle that is controlled by the user using the arrow keys, that I do the following:
if (_root.WallsLevelOne.hitTest(character, true))
Assuming that works in detecting the collision, what would I use to actually stop the rectangle from progressing through the wall?
you would actually not do it that way in the first place
What you would do is first create listener for the arrow keys press.
Press should move and continue moving the rectangle. When pressed, you should gradually move it by adding a couple of x pixels or something. The keypress event can determine the collision within itself.
here's a sample
Assuming you have 2 items on the screen box1 and box 2 with box2 on the left hand side of box1. Please this script for box2.
trace("Sorry no more moving");