Skip to main content
Participating Frequently
February 4, 2011
Answered

TLF Documentation

  • February 4, 2011
  • 1 reply
  • 1417 views

I am completely lost with where we are at with TLF and how to find out.

There are several comments that you can't use TLF 2.0 with SDK 4.1. However I seem to be doing just that at the moment. So I presume that TLF 2.0 now works with SDK 4.1.

Finding information about TLF 2.0 in general is a hit and miss affair.

It seems this link is pretty much the latest about TLF Lists Markup: http://blogs.adobe.com/tlf/2010/07/tlf-20-lists-markup.html. However this is so cryptic as to be almost useless.

For example, the examples include the line:

<list listStylePosition="inside" listStyleType="decimal" tabStops="e20 s24">

What is the syntax for tabStops? Where do I find out?

Specifically, I am using dynamic text read from a server and parsed using TextFlowUtil.importFromString.

I can format a list. But whatever I do I can't change the space between the bullet and the following text.

Some guidance would be really useful and very much appreciated.

TIA

Chris

This topic has been closed for replies.
Correct answer rdermer

See page 3 of this PDF for getting space between your inside list marker and the text.

http://blogs.adobe.com/tlf/files/tlf/Lists.pdf

Note your example has an error:  replace afterFormat with afterContent.

The AS3 docs talk about tabStops here.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flashx/textLayout/formats/TextLayoutFormat.html#tabStops

Re: TLF 2 and Flex 4.1  There are incompatabilities if you are using Spark components.  There was an earlier blog post on what needs to change.  It involves knowing how to build the Flex SDK.  Note that this is about replacing spark.swc - it doesn't build textLayout.swc.  You have to build or download that separately.

http://blogs.adobe.com/tlf/2010/07/flex-4-updates-for-tlf-20.html

Hope that helps,

Richard

1 reply

Participating Frequently
February 4, 2011

Just to add to my last post, I am using the following code to simulate the text that would be returned for display:

<?xml version="1.0" encoding="utf-8"?>

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

                  xmlns:s="library://ns.adobe.com/flex/spark"

                  xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:windows="components.windows.*"

                  creationComplete="init()">

     <fx:Declarations>

          <!-- Place non-visual elements (e.g., services, value objects) here -->

     </fx:Declarations>

     

     <fx:Script>

          <![CDATA[

               import flashx.textLayout.formats.TabStopFormat;

               import flashx.textLayout.formats.TextLayoutFormat;

               

               import spark.utils.TextFlowUtil;

               

               private var textLayoutFormat:TextLayoutFormat;

               private var linkNormal:TextLayoutFormat ;

               

               private function init():void

               {

                    

                    import flashx.textLayout.formats.TLFTypographicCase;

                    import flashx.textLayout.formats.TextLayoutFormat;

                    

                    

                    var pageText:String = "<p>Hello</p>" +

                         "<list listStylePosition='inside' listStyleType='disc' afterFormat = '\t' paddingLeft = '30' tabStops='e100 s700'>" +

                         "<li><p>Corporate Headshot</p></li>" +

                         "<li><p>Model/Actor Comp Cards</p></li>" +

                         "</list>";

                    

                    

                    

                    

                    var t:TLFTypographicCase;

                    textLayoutFormat = new TextLayoutFormat();

                    //textLayoutFormat.color = "#ffffff";

                    textLayoutFormat.fontFamily = "Myriad Pro";

                    textLayoutFormat.fontSize = 36;

                    

                    textLayoutFormat.paragraphSpaceBefore = 12;

                    

                    

                    

                    linkNormal = new TextLayoutFormat();

                    linkNormal.color = 0x26e1fd;

                    linkNormal.fontFamily = textLayoutFormat.fontFamily;

                    linkNormal.fontSize = textLayoutFormat.fontSize;

                    

                    

                    richTextArea.textFlow = TextFlowUtil.importFromString(pageText);

                    richTextArea.textFlow.format = textLayoutFormat;

                    richTextArea.textFlow.linkNormalFormat = linkNormal;

                    

                    

                    //resize();

               }

          ]]>

     </fx:Script>

     

     <s:RichText id="richTextArea" left="30" right="30" top="80" bottom="0"/>

</s:Application>

I get this:

Chris

Known Participant
February 4, 2011

I believe this question - setting the space between marker and text in list - has been answered a few days ago by either Robin or Richard.

Here is what works for me:

<list paddingLeft='yourRequirement' textIndent='0'><listMarkerFormat><ListMarkerFormat paragraphEndIndent='yourRequirement'/></listMarkerFormat><li><p>...</p></li></list>

One thing to mention is that setting listStylePosition='inside' negates the space between the marker and the text set by 'paragraphEndIndent; at least for me. So I have to either set it explicitly to 'outside' or just omit it altogether relying on default.

HTH,

Igor Borodin

rdermerCorrect answer
Adobe Employee
February 4, 2011

See page 3 of this PDF for getting space between your inside list marker and the text.

http://blogs.adobe.com/tlf/files/tlf/Lists.pdf

Note your example has an error:  replace afterFormat with afterContent.

The AS3 docs talk about tabStops here.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flashx/textLayout/formats/TextLayoutFormat.html#tabStops

Re: TLF 2 and Flex 4.1  There are incompatabilities if you are using Spark components.  There was an earlier blog post on what needs to change.  It involves knowing how to build the Flex SDK.  Note that this is about replacing spark.swc - it doesn't build textLayout.swc.  You have to build or download that separately.

http://blogs.adobe.com/tlf/2010/07/flex-4-updates-for-tlf-20.html

Hope that helps,

Richard