Search code examples
iosflashtilt

Flash - Detect tilting iOS


I've got a sample game here, and I wanted to give it a try on the iPad.

How do I listen for tilting in flash?

If I have a standard space invaders game, I want to move the spaceship left and right when I'm tilting the device left and right. How do I do this?

Thanks! =)


Solution

  • Did you try AccelerometerEvent? Here's a tutorial and sample application using accelerometer to control the ball movements: http://www.gotoandlearn.com/play.php?id=116