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

TLF + SWC = huge mess

Participant ,
May 05, 2012 May 05, 2012

The scenario is simple, have an SWC that contains some TLF.

include the SWC in an fla and try to create an object of a class in the SWC, it will blow up.

TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::MovieClip@22486f21 to fl.text.TCMText.

    at flash.display::Sprite/constructChildren()

    at flash.display::Sprite()

    at flash.display::MovieClip()

Currently there are no real solutions I can find that will help.

TOPICS
Text layout framework
8.8K
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
Adobe Employee ,
May 07, 2012 May 07, 2012

Hi Joseph_saade, you may want to duplicate the question to http://forums.adobe.com/community/flash/flash_general, because it seems a flash pro issue. fl.text.TCMText is a class inside flash pro library.

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
May 12, 2012 May 12, 2012

Hey man, all you got to do is add a TLF text field onto the stage of your FLA, create your SWC from it and Bob's your uncle. I was struggling with this myself for a few hours.

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
Participant ,
May 14, 2012 May 14, 2012

I still have the same error even when I create a TLF on the stage of the 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
Guest
May 14, 2012 May 14, 2012
LATEST

OK. This works if you are not including the swc in an fla but are instead including it in a pure actionscript project (flash builder)

In fla for swc, let's call it tlfAssetSwc:

In library path add swc: $(AppConfig)/ActionScript 3.0/libs/11.0/textLayout.swc and set it's linkage to mergeed into code.

Place any tiny random tlf textfield on the stage.

Create tlfAssetSwc.swc file

In actionscript project that uses tlfAssetSwc:

In library path add swc: tlfAssetSwc, merged into code

Don't forget to add $(AppConfig)/ActionScript 3.0/libs/tlfruntime.swc merged into code as well.

I tried it with adding the swc to an fla and you are right it craps out.

I would suggest using swcs for all your flash-authored assets and then bringing them into a pure action script project. Everything seems to flow so much better...

Good luck.

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