views:

186

answers:

3

What are some of the hidden features of MXML? What existing features are not well known but very useful?

MXML being used in Flex Framework became quite popular language because Flash Player is something every PC has and Flash Builder and Flash Catalist are quite popular Adobe programs.

Please specify one feature per answer, and read all answers before posting a dupliate.

It's not always a great idea to use these hidden features; often times they are surprising and confusing to others reading your code.

A: 

Use your favorite shortcut CTRL + Space everywhere in the MXML Editor like in CDATA scripts, in quotes or curly braces of MXML tags to auto complete AS3 code.

Vinothbabu
+2  A: 

Not so much hidden, but under used. Setting properties as sub nodes instead of attributes. Sometimes it's just a bit more expressive.

Instead of

<mx:DropShadowFilter id="myDropShadowFilter" />
<mx:GlowFilter id="myGlowFilter" />

<mx:Button filters="{[myDropShadowFilter, myGlowFilter]}" label="STACKOVERFLOW" />

try

<mx:Button label="STACKOVERFLOW">
    <mx:filters>
        <mx:DropShadowFilter />
        <mx:GlowFilter />
    </mx:filters>
</mx:Button>
James Hay
reminds me of XAML...)
Blender
@Ole Jak - Yup, is much more common in xaml though. I tend to use it more in mxml since having experience with xaml.
James Hay
+2  A: 

Not directly a hidden feature of the mxmlc, but also very nice to know for any developer targeting the AVM2: AS3 hidden treasure in the mm.cfg file.

Hippo