0 Replies Latest reply on Aug 26, 2012 2:18 PM by P.o.l.a.c.o

    TextFlow stylename not working

    P.o.l.a.c.o Level 1

      Hi,

       

      I want to create styled text using the stylename property and using a css file to apply the style.

      The problem is that the RichText component does not dispaly the styled text just plain ugly text.

      I really hoped using styled text would be a walk in the park, but it looks quite weird.

      Could anyone recommend a doc that shows me the rigth way to go?

       

      This is an example of the text I'm converting to TextFlow:

       

      private var detailsItemValue:String = "<span styleName='briefText'>{labelName}</span><br/><span styleName='briefTextHeavy'>{value}</span>";

       

      var tft:TextFlow = TextFlowUtil.importFromString(displayTitle);

       

      detailsTextComp.textFlow = tft;

       

      this is the definition of the RichText component

       

      <s:RichText id="detailsTextComp" left="0" width="100%"/>

       

       

      and this are the styles:

       

      .briefText{


      fontSize:24px;

      fontFamily: FONT_BASE_LIGHT;

      textAlign:left;

      color: #666666;

      backgroundColor:#000000;

      contentBackgroundAlpha:0.0;

      textAlpha: 1;

      paddingLeft:10;

      paddingRight:0;

      paddingTop:10;

      paddingBottom:10;

      backgroundAlpha:0.0;

      borderVisible:false;

      }

       

       

      .briefTextHeavy{


      fontSize:26px;

      fontFamily: FONT_BASE_LIGHT;

      textAlign:left;

      color: #000001;

      backgroundColor:#000000;

      contentBackgroundAlpha:0.0;

      textAlpha: 1;

      paddingLeft:10;

      paddingRight:0;

      paddingTop:10;

      paddingBottom:0;

      backgroundAlpha:0.0;

      borderVisible:false;

      }

       

      Thanks you!