Packageru.kavolorn.ane
Classpublic class StatusBar
InheritanceStatusBar Inheritance flash.events.EventDispatcher

Main library class for StatusBar native extension.

The following example initializes extension and shows how to use it:

     StatusBar.getInstance().addEventListener(StatusBarEvent.INITIALIZATION_ERROR, initializationErrorHandler);
     StatusBar.getInstance().addEventListener(StatusBarEvent.INITIALIZATION_SUCCESS, initializationSuccessHandler);
     StatusBar.getInstance().initialize('license_key');
     
     private function initializationErrorHandler(event:StatusBarEvent):void
     {
         trace(event.message);
     }
     
     private function initializationSuccessHandler(event:StatusBarEvent):void
     {
         StatusBar.getInstance().updateStatusBar(StatusBar.UIStatusBarStyleDefault);
     }

See also

PRO Native Extensions license server


Public Methods
 MethodDefined By
  
Constructs an extension.
StatusBar
  
[static] Gets the main instance to interact with.
StatusBar
  
initialize(licenseKey:String):void
Initializes extension.
StatusBar
  
isSupported():Boolean
Reports if current platform is supported.
StatusBar
  
setDebug(debug:Boolean = false):void
[static] Enables or disables debug output.
StatusBar
  
updateStatusBar(statusbarStyle:String):void
Updates status bar color.
StatusBar
Events
 Event Summary Defined By
   Dispatched if initialization failed.StatusBar
   Dispatched after successful initialization.StatusBar
Public Constants
 ConstantDefined By
  UIStatusBarStyleDefault : String = UIStatusBarStyleDefault
[static] Dark status bar style
StatusBar
  UIStatusBarStyleLightContent : String = UIStatusBarStyleLightContent
[static] Light status bar style
StatusBar
Constructor Detail
StatusBar()Constructor
public function StatusBar()

Constructs an extension. Don't use it directly but use getInstance() instead.

Method Detail
getInstance()method
public static function getInstance():StatusBar

Gets the main instance to interact with. Don't use constructor.

Returns
StatusBar — extension instance.
initialize()method 
public function initialize(licenseKey:String):void

Initializes extension. Should be called before extension can be used.

Parameters

licenseKey:String — obtained from license server.

isSupported()method 
public function isSupported():Boolean

Reports if current platform is supported.

Returns
Boolean — is platform supported or not.
setDebug()method 
public static function setDebug(debug:Boolean = false):void

Enables or disables debug output.

Parameters

debug:Boolean (default = false) — flag which enables debug output.

updateStatusBar()method 
public function updateStatusBar(statusbarStyle:String):void

Updates status bar color.

Parameters

statusbarStyle:String — to be used.

Event Detail
initializationError Event
Event Object Type: ru.kavolorn.ane.StatusBarEvent
StatusBarEvent.type property = ru.kavolorn.ane.StatusBarEvent.INITIALIZATION_ERROR

Dispatched if initialization failed.
initializationSuccess Event  
Event Object Type: ru.kavolorn.ane.StatusBarEvent
StatusBarEvent.type property = ru.kavolorn.ane.StatusBarEvent.INITIALIZATION_SUCCESS

Dispatched after successful initialization.
Constant Detail
UIStatusBarStyleDefaultConstant
public static const UIStatusBarStyleDefault:String = UIStatusBarStyleDefault

Dark status bar style

UIStatusBarStyleLightContentConstant 
public static const UIStatusBarStyleLightContent:String = UIStatusBarStyleLightContent

Light status bar style