Basically, you need to detect the fact that your sprite is touching the solid, and prevent the movement from working if they are.
There are lots of different ways of doing this, some look better than others.
Have a look at my "complex jumping demo" for an example.
http://scratch.mit.edu/projects/Mayhem/26609
Offline