I know the high-level benefits, like being able to code it declaratively. But what are the underlying technical benefits over an embedded asset?
For example: Take a panel that has a gradient background. The skin-class can: (1) be defined as FXG or (2) contain a BitmapImage who's source property references the background as an embedded image. What will the benefits be in terms of:
- compiled swf size
- on-screen graphics processing
You can also apply effects to FXG graphics dynamically. Suppose you have 3 states that you want to render differently. If you're using bitmaps you'd need 3 bitmaps, one for each state. With FXG, you could just turn on and off the appropriate effects (assuming that you could accomplish the desired visual changes with effects). Furthermore, you could transition between the effects gradually if you wanted to. With bitmaps, you'd get no transitions, just an abrupt switch from one state to the next. Finally, it is easy to tweak the effects at any time (in code) with FXG. With bitmaps, you're going back to the artwork and exporting every time you want to tweak something.
Thanks Flex harUI & DavidSalahi
Now I have a little more insight into my conversion from .swf to .fxg assets ... I have been very hesitant, but I guess with playing around with effects / .fxg the benefits / tradeoffs will become more clear.