Tuesday, January 4, 2011

Styles in Flex 4 example

A quick note on declaring inline styles for Flex 4. If you're looking to quickly set up a text field in your mxml file but don't want to declare a separate css file (like in the case where your application only has one mxml file) you may need this.

        @namespace s "library://ns.adobe.com/flex/spark";
        @namespace mx "library://ns.adobe.com/flex/mx";

   <s:RichText id="text" x="42" y="20" text="Some text of sorts" />

Where #text is the id of your text field.

1 comment:

  1. Cooooooooooooooooooooool blog! Mine's address is http://blendertheblog.blogspot.com/