Skip to main content
Participant
July 3, 2009
Question

Problem using TextLayout Framework

  • July 3, 2009
  • 1 reply
  • 2693 views

Hi,

I have just download the .swc files while following the instruction on adobe site.

However, I cannot run any of the example included in the package.

I am getting around 15 errors copied below. To me it sounds like some issue with swc files, not sure though ??

Severity and Description    Path    Resource    Location    Creation Time    Id
1046: Type was not found or was not a compile-time constant: TextLine.        TextLayoutText    Unknown    1246630125820    28851
1046: Type was not found or was not a compile-time constant: TextLine.        TextLayoutText    Unknown    1246630125820    28852
1046: Type was not found or was not a compile-time constant: TextLine.        TextLayoutText    Unknown    1246630125820    28854
1046: Type was not found or was not a compile-time constant: TextLine.        TextLayoutText    Unknown    1246630125820    28855
1046: Type was not found or was not a compile-time constant: TextLine.        TextLayoutText    Unknown    1246630125820    28856
1046: Type was not found or was not a compile-time constant: TextLine.        TextLayoutText    Unknown    1246630125835    28857
1046: Type was not found or was not a compile-time constant: TextLine.        TextLayoutText    Unknown    1246630125835    28858
1046: Type was not found or was not a compile-time constant: TextLine.        TextLayoutText    Unknown    1246630125851    28859
1046: Type was not found or was not a compile-time constant: TextLine.        TextLayoutText    Unknown    1246630125851    28860
1046: Type was not found or was not a compile-time constant: TextBlock.        TextLayoutText    Unknown    1246630125820    28850
1046: Type was not found or was not a compile-time constant: TextBlock.        TextLayoutText    Unknown    1246630125820    28853
1046: Type was not found or was not a compile-time constant: GroupElement.        TextLayoutText    Unknown    1246630125820    28849
1046: Type was not found or was not a compile-time constant: ContentElement.        TextLayoutText    Unknown    1246630125804    28847
1046: Type was not found or was not a compile-time constant: ContentElement.        TextLayoutText    Unknown    1246630125820    28848

My code is this

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal">
   
    <mx:Script>
        <![CDATA[
            import flashx.textLayout.elements.SpanElement;
            import flashx.textLayout.elements.ParagraphElement;
            import flashx.textLayout.elements.TextFlow;
            import flashx.textLayout.formats.CharacterFormat;
           
            var textFlow:TextFlow= new TextFlow();
       
        ]]>
    </mx:Script>
   
</mx:Application>

This topic has been closed for replies.

1 reply

Adobe Employee
July 3, 2009

I'm not sure if these are build errors or I think the problem is that you are using Flash Player 9 and not Flash player 10. TLF requires Flash Player 10, which defines a number of new classes including TextLine, TextBlock, etc. You need to make sure that your project specifies FP10, and that when you run it, you use FP10 as well. If you are using Flex, this is done in the project settings, "Flex Compiler" which has a section called "Flash Player" which has the minimum version required for the application. For any application using TLF, this should be 10.0.0.

- robin

Participant
July 7, 2009

Issues solved . Thanks Robin !!!