Flex 4 Guide

As you know this year (2010) we released the fourth version of our framework for building RIAs on top of Flash Player or Adobe AIR. As you can imagine, I spent quite some time evangelizing Flex 4 at conferences, customer meetings, and training sessions.

In preparing my presentations/articles I read a lot of material (Adobe’s documentation or blog posts) and talked to our engineers. And some time this summer I started to distill all this information into a formal document I called “Flex 4 in a day”. Initially I was really looking to a way to put all the relevant information into a document you could read in no more than a day. In the end, what I created is a 40-page document with links to additional resources. So I doubt you can “eat” everything in one day.

So what’s in it for you in reading this mini book? I think I managed to keep a fine balance in staying focused on the main features of Flex 4 and providing enough information to understand each one. Here is a list of the topics I covered:

  • MXML 2009
    • Namespaces
    • States
    • New MXML Tags (Declarations, Library, Definition, Private, Reparent, DesignLayer)
    • Two-way data binding
  • MXML Graphics and FXG
  • CSS
  • Flex Themes
    • Creating a Flex Theme
    • Applying a Theme
  • Spark Components
    • The Skinning Contract – Skinning Spark Components
    • Creating Spark components and skins
    • Spark Components/Skins lifecycle
  • New Layout Engine
    • Existing Spark layouts
    • Creating custom Spark layouts
  • New Animation Engine
    • Built-in Effects
    • Advanced Effects
  • What’s new in Adobe AIR 2
  • Text Layout Framework in Flex 4
    • Working with Fonts
  • Working with Flex 3 and 4 components in the same project
  • Migrating Flex 3 projects to Flex 4
  • Flash Builder 4 new features
  • Additional Resources

I should have used “we” instead of “I”, because my colleague Alin Achim helped me with some of these topics. A big thank you to Alin!


You can download the PDF from here (651 KB).

See the French version here.

If you find mistakes or you have additional resources that you think should be added please drop a comment. Thanks!

5 thoughts on “Flex 4 Guide

  1. Languages like C, C++, Python, Perl are all considered flexible and “Rich” with functionality. The term (Rich) seems to always be associated with Flex/Air development. I find this somewhat odd.

    Not from the sales end of things. That makes perfect sence. You want to sell your product. I find it odd that Fles is not so flexible as its being portrayed. I have tried for days to get a text file to drag and drop from the desktop to an Air App. Even with countless examples available from googling I still cannot get drag and drop to function in a windows XP environment.

    Later I tried to execute an EXE or batch command without success. If an application environment is to be of much use it must be able to communicate outside of its self. Sure drag and drop works fine within the application, but few Rich environments are as restrictive as FLEX/AIR.

    Data must come from somewhere. In the modern times data entry is drag and drop. Not re-key in nature. If drag and drop actually works then post an example of it that actually works.

    If running system commands from within a FLEX/AIR application can be done then post one of those as well. Development environments that cannot do these things cannot be considered rich in any true sense of the word.

    As I stated, it seems like some people are having marginal success at drag and drop. I mayself have has some success at it. But draging from the desktop of an XP, Vista, or Windows 7 OS to an Air app never seems to work.

    Could it be something is not included ? If so what ? Documentation of this type of problem is hard to come by. I am using a trial version. If I cannot get it working I will drop Air/Flex in favor of Rich languages. Ones that in fact are rich. Air had much promise, but at this early stage it seems like it has many weak points to be calling it rich.

    This is the second time we go through a trail with Air/Flex. Once with version 3 and now with the new version 4. I suspected that version 4 would be better then my experince with Flex 3.

    So far both have had serious weak points. Weak enough to warrant caution in purchasing this product. Perhaps by stating this here developers can take note of this problem, and find out what the issue really is. I know I have tried and more then once.

    Good luck in your product. I hope these comments work to improve Flex. Maybe ver 5.0 will be better. If an application cannot communicate outside of its own self, then it is value is greatly reduced.

    I wonder how many would agree with that statement out here ?

  2. @Developer

    I will try to clarify some of the points you’ve made. I hope it will help. Also thank you for comment.

    When someones says Rich and Flash/AIR application in the same phrase, he usually means something along these lines (http://en.wikipedia.org/wiki/Rich_Internet_application):

    A Rich Internet Application (RIA) is a web application that has many of the characteristics of desktop applications, typically delivered either by way of a site-specific browser, via a browser plug-in, independent sandboxes, or virtual machines.

    So in this respect, I don’t see how C/C++/Perl/Python are Rich.

    Regarding Adobe AIR. This can be viewed like a Flash Player out of the browser. With Adobe AIR you have a runtime that allows you to do everything you can do inside the browser when targeting Flash Player plus unique capabilities like: ability to use the embedded SQLite (encrypted or not), access to the local file system, socket servers, update framework, notifications support, support for calling native processes, mass storage device detection, and so on.

    Drag and Drop is supported (between applications, from an AIR app to desktop, and from desktop to an AIR app). Here are some articles/slides:

    I don’t know what are you trying to achieve or how, but Drag and Drop support exists in Adobe AIR.

    Regarding the integration with the operating system, since AIR 2 there is a new feature called Native Processes and this allows developers to launch and communicate with native processes using the standard input and output.

    Both the Flex framework (this is Open Source) and Adobe AIR can be used for free. They don’t cost the developer neither the end user. What is not free is the Adobe’s IDE called Flash Builder (can be used for free by students/professors). If you don’t want to buy Flash Builder you can use the AIR SDK and the Flex SDK for free and use the included command line tools.

    We have places where you can post bugs (http://bugs.adobe.com) and feature requests (http://ideas.adobe.com).

    As any other technology, Adobe AIR and the Flex framework have their strong and weak points. It is always a matter of choosing the right tool for the right job.

    Thank you again for your time,
    Mihai Corlan

  3. @developer – wow, talk about ignorant, everything you complain about works fine, you just don’t know how to do it… fair enough, how about reading the guide and thanking the author for giving you a valuable free resource instead of claiming the tools don’t work or demanding tutorials?

  4. Pingback: http://links.soudev.com.br

Leave a Reply