Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Locked
0

Using TextFlowUtil in Flash CS4

New Here ,
Mar 05, 2010 Mar 05, 2010

Hello,

How do I go about using TextFlowUtil in CS4?  What project settings do I need to update.  I have tried a variety of source and library paths to no avail. 

What I am trying to accomplish is importing saved markup into a Flash CS4 app that was exported from a Flex app via TextFlowUtil.

I have the TextLayout component installed in Flash CS4 and it works fine.  I just can't seem to get TextFlowUtil working.

thanks,

jr

TOPICS
Text layout framework
1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Mar 16, 2010 Mar 16, 2010

That sounds like the same issue still happening. The ImportExportConfiguration class is from an old version of the TLF swc(s). Check to make sure the old component isn't still around somewhere, and that there is not a TextLayout.swc (or TextLayout_conversion.swc) in $(AppConfig)/ActionScript 3.0/libs or in some other reference in your project.

Translate
Guest
Mar 05, 2010 Mar 05, 2010

TextFlowUtil is a spark class that I haven't used myself, but according to the documentation it exports XML markup in the TLF format. So in Flash CS4 I'd use the TextConverter class in the flashx.textLayout.conversion package. If you have your XML in a variable named "markup" the line would look like:

var textFlow:TextFlow = TextConverter.importToFlow(markup, TextConverter.TEXT_LAYOUT_FORMAT);

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 05, 2010 Mar 05, 2010

Hello Alan,

Thanks for your quick reply.

After doing some testing and a little more reading the following is what I found:

- Flash TextLayout Component has "xmlText" property with accomplishes the "import" functionality that I need.

- If however you need to still use the TextFlowUtil library you'll need to make the following library path setting changes:

+ /Applications/Adobe Flash Builder Beta 2/sdks/4.0.0/lib

+ /Applications/Adobe Flash Builder Beta 2/sdks/4.0.0/frameworks/libs/spark.swc

If  you have any other library paths defined, ensure that they don't conflict with the two above.

A side note, the textFlow property of the TextLayout component is read-only which kept my original approach from working.  This is different than the Spark TextArea.textFlow property, which is read/write.

cheers,

jr

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 05, 2010 Mar 05, 2010

Ah, I had glossed over your mention of the TextLayout component. Be aware that the component is quite old at this point, and you will likely find some mismatches between what it implements and the current versions of the TextLayout.swc you get in the Flex SDK 4 builds.

The component was our first attempt at integrating TLF functionality into Flash Pro. It has since been discontinued, and you will find a better implementation in the next shipping version of Flash Pro. Our current recommendation is either to use the Flash Builder spark components that are available or use TLF in your own ActionScript code in Flash Builder or Flash Pro.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 05, 2010 Mar 05, 2010

Yeah, after further testing, I think I might have encountered a problem.  When I use the xmlText property of the TextFlow object, the content doesn't display.

I took the component and dropped it on the stage and any text that I enter at design time shows, however once I try to set the new text as mentioned above, it disappears. 

But I won't belabor the point as the component's been discontinued 🙂

I will try using the s.TextArea class instead.

thanks,

jr

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 05, 2010 Mar 05, 2010

Okay,

Where is the "flashx.textLayout.conversion" located?

cheers,

jr

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 05, 2010 Mar 05, 2010

It's in the textLayout.swc you should find in recent Flex SDK 4 builds, in frameworks/libs.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 05, 2010 Mar 05, 2010

Yeah, I thought that might be it.  But I must have something missing because now I get the error:

"1046: Type was not found or was not a compile-time constant: ImportExportConfiguration.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 05, 2010 Mar 05, 2010

Do you still have the old TextLayout component installed? ImportExportConfiguration is an old class that does not exist in the current textLayout.swc.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 05, 2010 Mar 05, 2010

Yes.  I will remove it and see what happens.

thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 16, 2010 Mar 16, 2010

Hello Alan,

I've been away from this project for a little while.  Unfortunately I am encountering a new issue.

When using :

var textFlow:TextFlow = TextConverter.importToFlow(menuXML, TextConverter.TEXT_LAYOUT_FORMAT);

I get the following error:

1046: Type was not found or was not a compile-time constant: ImportExportConfiguration.

I have the following Actionscript script settings:

Library Path

$(AppConfig)/ActionScript 3.0/libs

/Applications/Adobe Flash Builder Beta 2/sdks/4.0.013875/frameworks/libs

/Applications/Adobe Flash Builder Beta 2/sdks/4.0.013875/frameworks/libs/textLayout.swc

Am I missing one?  Are they out of order?

Let me know pls.

cheers,

jr

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 16, 2010 Mar 16, 2010

That sounds like the same issue still happening. The ImportExportConfiguration class is from an old version of the TLF swc(s). Check to make sure the old component isn't still around somewhere, and that there is not a TextLayout.swc (or TextLayout_conversion.swc) in $(AppConfig)/ActionScript 3.0/libs or in some other reference in your project.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 16, 2010 Mar 16, 2010
LATEST

Thanks Alan,

It was indeed.  Although I had removed all the files and removed it from the extension manager, I had forgotten to remove it from my library.  Duh!

Now it's compiling just fine. 

thanks again!

jr

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines