PDA

View Full Version : Starting Flex 3


ASWC
03-05-2008, 03:25 AM
I got my brand new Flex builder 3 pro and I'm an advanced Flash developer with no experience with Flex. Does anyone have any advice about what would make my transition easier, which problem am I gonna run into, what to avoid/look for and such. Any comment will be appreciated!

dr_zeus
03-05-2008, 06:43 PM
A few things:

1) MXML is nothing more than an abstraction of an ActionScript class.

2) Flex containers like HBox, VBox, Panel, etc require that all children are instances of IUIComponent. All Flex components implement this interface. Regular Flash display objects like Sprite, MovieClip, Shape, etc do not. In short, don't try to put a Sprite in a Panel.

3) As an experienced Flash developer, you have an advantage. You know how Flash Player does a lot of stuff. Learn how the Flex component architecture works, and you will be able to make very cool components of a higher quality than folks that aren't as experienced in developing for Flash Player. In particular, learn how to build Flex components in ActionScript, and try to understand things like the invalidation/validation cycle and measurement.

4) When you start using paged containers like TabNavigator, ViewStack, and Accordion, make sure you understand how creationPolicy works. The default creationPolicy of "auto" means that components on pages that have not yet been viewed aren't created until they are viewed. This can be confusing, but with careful use of binding and the events from those components, you should almost never need to set creationPolicy to "all".

5) Experiment. Try new things. If you're unsure how something works, try to use it and learn from breaking it once or twice.

6) The class reference (http://livedocs.adobe.com/labs/flex3/langref/index.html) is your best friend.

ASWC
03-05-2008, 08:26 PM
Thanks a lot!