How to create Android Options Menu in Adobe AIR? (not Java)


Question

I would like to create an Options Menu in my Flash AIR application for Android.

I've figured out already, that this ActionScript code could be used for capturing the hardware Menu button press event:

stage.addEventListener(KeyboardEvent.KEY_DOWN, _onKeyDown);

function onKeyDown(event:KeyboardEvent):void {
    if(event.keyCode == Keyboard.MENU) {
        event.preventDefault();
        trace("Menu Pressed");
    }
}

but how do you create the actual menu?

If you can't do it with AIR, then has anybody tried to recreate/mimic it manually already and could you please share the properties (colors, transparency, any gradients?) and transitions (sliding in/out) you've used?

I've found some guidelines already, but would appreciate any Flash-specific tips/properties (like which easing to use for sliding transitions?) you have

Thank you, Alex

alt text

1
5
10/29/2010 2:34:42 PM

Hi dude I recently was searching for the same issue and I've found this nice snippet. You can use AS3 and Air to develop your mobile apps and build your android like menu! It really worked for me so that I decided to share it

Try this: http://myappsnippet.com/android-menu-air-extension/

4
5/15/2013 7:04:58 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon