Adobe Flex Flash developer blog

Adventures of a Flex developer

Flash builder burrito Andorid Menu Buttons Items

Friday 18 February 2011 by jonnysparkplugs

If you have been using Flash Builder burrito you may have noticed that currently there is no support for the native menu system available to Java Android apps. I expect this is something that will be included in the final release of the up coming Flash Builder.

I have created a temporarily work around which seems to work quite nicely until an update is available. You must listen manually for the Menu hardware key press in your app.


 <s:MobileApplication   
      xmlns:fx="http://ns.adobe.com/mxml/2009"   
      xmlns:s="library://ns.adobe.com/flex/spark"  
      applicationComplete="init()">            
      <fx:Script>  
           <![CDATA[  
                protected function init():void {  
                     NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN, keyDown);  
                }  
                private function keyDown(e:KeyboardEvent):void {  
                     if(e.keyCode == Keyboard.MENU) {  
                          trace("Handle Menu button"); 
                     }  
                }                 
           ]]>  
      </fx:Script>  
 </s:MobileApplication>  


Once you have received your menu event you can handle it however you like. I have created a gingerbread styled menu which you can use in your own apps. See below:





You can view a normal Flash example here where the source code is available here or view the context menu

Filed under having 0 comments  

Egg Timer Air released

Tuesday 15 February 2011 by jonnysparkplugs

I've finished and uploaded my first Adobe Air Android app, you can find it here: https://market.android.com/details?id=air.com.indecentmonkey.eggtimerair


I am still waiting to hear back from RIM, but hopefully I will be able to submit it to the blackberry store as well!


Filed under having 0 comments  

NumericStepper mobile mobile optimized skin (Flash builder burrito)

Saturday 5 February 2011 by jonnysparkplugs

While I’ve been working on some Android/ Playbook apps with Air, I’ve noted a few spark components are not “mobile optimised”.  You have probably seen similar context information when coding:



I really wanted to use the NumericStepper in an Android app I’m currently working on.  So I created a new skin which makes the NumericStepper useable on a small device.  A running example can be found here (build as a web based project, not air) so you can run it in your browser.

You can also grab the source here or its available in the running project.


Filed under having 2 comments