Category Archives: beta1

Adding an FTETextField object to the display list in Flex 4

The following example shows how you can add an FTETextField object (formerly TLFTextField) by using a Halo/MX container and the rawChildren.addChild() method or by using a SpriteVisualElement object and the addChild() method.

The mx.core.TLFTextField class was renamed to mx.core.FTETextField in 4.0.0.10872.

Full code after the jump.

Continue reading Adding an FTETextField object to the display list in Flex 4

Setting the background color on a Spark Application control bar in Flex 4

The following example shows how you can set the background fill color on a Spark Application container’s control bar in Flex 4 by setting the skinClass style and modifying the control bar fill:

<!-- layer 1: control bar fill -->
<s:rect left="1" right="1" top="1" bottom="2">
   <s:fill>
        <s:lineargradient rotation="90">
            <s:gradiententry color="0x333333"></s:gradiententry>
            <s:gradiententry color="0x666666"></s:gradiententry>
        </s:lineargradient>
   </s:fill>
</s:rect>

Full code after the jump.

Continue reading Setting the background color on a Spark Application control bar in Flex 4