the card dance effect can do that, as can expressions.
here's and example of and expression to create a flag-wave-like effect:
http://motionscript.com/mastering-expressions/simulation-basics-4.html
but personally, i'd try it with card dance. card dance will break a layer up into a grid, then allow you to manipulate the properties of the individual 'cards' with image maps. so you'd create image maps to drive the z positions of the cards.
i gave a brief process of using card dance to another poster in this thread:
http://forums.creativecow.net/thread/2/952836#952926
it's down the thread towards the bottom for the card dance example...
Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW