The DisableAutoRotation method disables (and enables)
automatic screen rotation on the device. This method is provided by the Device object.
Automatic screen rotation is enabled by default on S60 5th Edition devices and those S60 3rd Edition, Feature Pack 2 devices that support it. If you do not want the screen orientation to change when the user rotates the devices, disable the feature for your application. Disabling automatic screen rotation can be useful, if your application does not support dynamic layout control for different orientations, or if you want to avoid the screen flickering that can occur with orientation changes.
Automatic screen rotation is only disabled for the application that
calls the DisableAutoRotation method.
DisableAutoRotation(condition:Boolean):Number
condition:
This is a boolean value that determines whether automatic screen rotation
is disabled (true) or enabled (false) for
the application.
To disable automatic screen rotation, call the method with the argument
set to true:
DisableAutoRotation(true)
To re-enable automatic screen rotation, call the method with the argument
set to false:
DisableAutoRotation(false)
The DisableAutoRotation method returns a number that
indicates the status code for the call.
The following code snippet creates a new Device object
and uses it to disable automatic screen rotation with the DisableAutoRotation method:
import com.nokia.lib.Device; var deviceObject:Object = new Device(); // Disable automatic screen rotation deviceObject.DisableAutoRotation(true);
To download an example Flash Lite application that uses the DisableAutoRotation method,
see section Flash Lite applications.