Hi, I have just written a capx to display the mobiles orientation, the capx is fully commented.
It uses the touch.alpha, touch.beta and touch.gamma to find if the user is tilting their phone, up/down/left or right, I have added a simple compass also.
You have to enable preview over LAN to see this on mobile, or if you cant I have put an example here, which will work on most mobiles.
Link To Demo