Stupid wall question

what i have is a movie clip that moves around the screen by the arows on the keybord and when it hits another movie clip i want it to not be able to move “that direction” until that movie clip isint in its way. ive tried using seeded if statement within the lisener objects but that wont allow it to move that direction at alll .