Adobe Flex Article




  • Game of Flex is a game built with Flex 4.6 and inspired by Tour de Mobile Flex. By taking the quiz with 16 questions, you have an opportunity to discover the new components and features of Flex 4.6. At anytime, you can click the "Snippet" button and read the source code of the current sample. You can also click "Tutorial" button to read an online tutorial about the current sample.
  • flex-game-designing-training-institutes-in-hyderabad


Some tips inside the code

  • If you want to check the source code of the app, you’ll learn how to:


    • use the new SplitViewNavigator architecture (portrait and landscape layouts on tablet devices)
    • display HTML content inside a Flex app
    • access the camera to take pictures
    • use the BusyIndicator, ToggleSwitch and List components
    • enable multi-touch
    • manage your views
    • use the accelerometer
    • create custom AS3 item renderers for your lists
    • access the local SQLite database
    • use native extensions
    • set up the new DateSpinner component
    • display callout popups
    • set up the software keyboard to match your needs
    • declare spinner lists




This article covers performance decisions you can make to keep your Flex mobile app running smoothly. The single most important step you can take to ensure solid performance is to use and build off of the many highly-optimized mobile components, skins, and item renderers that ship with Flex 4.6. Using these components and following the set of best practices outlined in this article, you will enjoy high framerates and quick load times on iOS, Android, and QNX devices with a single Flex code base.

ActionScript item renderer optimizations

A mobile app may include dozens of item renderers, and when your app does, it is important to optimize them. Optimizing item renderers will keep your application's framerate high during scrolling, which will give your users a smooth, responsive experience. The Flex team recommends you write item renderers in ActionScript to achieve optimal performance. ActionScript item renderers are more difficult to write than MXML item renderers, but the performance gains can be significant. While MXML item renderers provide many conveniences including state syntax, dynamic layout, and binding expressions, ActionScript item renderers strip these out for speed.


Subclass LabelItemRenderer or IconItemRenderer

You can improve performance by writing your item renderer in ActionScript and building off of the highly-optimized Flex LabelItemRenderer or IconItemRenderer. To implement your LabelItemRenderer or IconItemRenderer subclass, you override the item renderer's data setter and the createChildren , measure , drawBackground , andlayoutContents methods.

To get started with an ActionScript template that extends LabelItemRenderer and overrides those methods, follow these steps:

  1. In Flash Builder 4.6, choose File > New > Item Renderer.
  2. Type your item renderer's name.
  3. Select the second template titled Custom ActionScript Item Renderer For Mobile List (ActionScript).
  4. Click Finish.





Sourse :adobe.com