Skip to main content
April 6, 2010
Question

TextFlow <s:format /> problem!

  • April 6, 2010
  • 1 reply
  • 1566 views

Hi folks,

Is there any changes about Format tag in TextFlow in Final version of Flash Builer 4?!

In Flash Builder 4 Beta 2, I had something like this:

<fx:Script>
     <![CDATA[
          import flashx.textLayout.conversion.TextConverter;
              
          internal var str:String;
          public function FillRET():void{
               str = "<TextFlow xmlns='http://ns.adobe.com/textLayout/2008'>"+
                     "<format id='Title' fontFamily='tahoma' color='#ff0000' />"+
                     "<div><span format='Title'>some text here...</span></div>"+
                     "</TextFlow>";
               RET.textFlow= TextConverter.importToFlow(str, TextConverter.TEXT_LAYOUT_FORMAT);
          }
     ]]>

</fx:Script>
    
<s:RichEditableText editable="false" id="RET" />

everything was fine, and I had my text with specific format; but when I'm using this code in Flash Builder 4 peremuim, I have nothing in run time and if I set it manualy, just like this:

<s:RichText>         
     <s:textFlow>
          <s:TextFlow>
               <s:format id='test' />
               <s:span format='test'>some text here...</s:span>
          </s:TextFlow>
     </s:textFlow>
</s:RichText>

I have this error:

Could not resolve <s:format> to a component implementation.


Am I doing something wrong?!


This topic has been closed for replies.

1 reply

Adobe Employee
April 6, 2010

The format tag is not supported by either the importer or compiled mxml in TLF 1.0.

Sorry about that but we don't have a binding solution at this time.

Richard

April 6, 2010

TanQ for your reply,

But sorry, I can't understand u well !!!


We don't have a binding solution at this time?!?!

So, what should I do?! how can I set style on inline TLF objects?!


Cheers

BornA

Adobe Employee
April 6, 2010

There is no "format" element.  The styles need to be expanded.

               str = "<TextFlow xmlns='http://ns.adobe.com/textLayout/2008'>"+
                     "<div><span fontFamily='tahoma' color='#ff0000'>some text here...</span></div>"+
                     "</TextFlow>";

<s:RichText> 
     <s:textFlow>
          <s:TextFlow>
               <s:span fontFamily='tahoma' color='#ff0000'>some text here...</s:span>
          </s:TextFlow>
     </s:textFlow>
</s:RichText>

Richard