1

For my project I am using the following:

  • FlashDevelop 3.3.4 RTM
  • Flash Pro CS 5 (libraries only, no code)

Some time ago we started using TLFTextfields. One of the things I had to do was include the tlfruntime.swc file from the Adobe Flash CS 5 folder in the FlashDevelop project. Note that I copied this file to the project folder and included it, I didn't just include the file straight from the CS5 path.

I have since been given a new computer that has Flash CS 5.5. I recompiled one of my swf libraries in CS 5.5, and now when I run the program, I get:

Illegal override of createTextLine in flashx.textLayout.compose.ComposeState

I figure the tlfruntime.swc being included in the FlashDevelop project is out of date and needs to be updated with the one from CS 5.5. So I copied the tlfruntime.swc from the CS 5.5 path, include it in the FlashDevelop project (instead of the older file), but now I get this:

Illegal override of softKeyboardActivatingHandler in fl.text.container.TLFContainerController.

Can anyone assist with what else I need to do to get TLFTextfields working again in CS 5.5?

UPDATE: I have updated FlashDevelop to 4.0.1 RTM, and now I get this error:

Illegal override of createGeometry in flashx.textLayout.elements.FlowGroupElement.
  • I'm really confused because looking at Adobe's docs, I cannot see ComposeState class, or a TLFContainerController class (or even the fl.text.container package). There is a FlowGroupElement class but there is no method called createGeometry, not even in its parent class. – Ashley Muller Apr 03 '12 at 08:00
  • There is no method called "createGeometry" in the current version of FlowElementGroup, which is probably why the error is thrown. – weltraumpirat Apr 03 '12 at 09:23

1 Answers1

1

It is very unfortunate that Adobe does not distribute the tlfruntime.swc freely, and does also not seem to spend much time explaining changes.

I've run into the same problem: The API for TLFTextField changed in TLF2, which is bundled with CS5.5. The most remarkable change was the complete removal of TextLayoutFormatValueHolder (good riddance!), but there have been a number of other changes, all of which I don't remember.

Copying the newer tlfruntime.swc was the right thing to get started, now you also have to adapt your code, unfortunately. You should open all the parts of your older libraries, which use TLF, in FlashDevelop (as with all code checking at editing time, Flash IDE won't help much) and see if there are any error messages, then check against the most recent API. Careful about the filter settings - you might look at an older version of TLFTextField!

For the most part, these changes should not take much effort. I was done in a few hours. But there may well be some edge cases, where you have to do more extensive rewrites.

weltraumpirat
  • 22,544
  • 5
  • 40
  • 54
  • Thanks for this info, it gives me a lot more insight. FlashDevelop does not give me any compiler errors, but when I debug in FD, I get the same Illegal Override error. Unfortunately I don't get a stack trace or any useful info on what call I'm making is wrong. I have checked every property and method I am calling from a TLFTextField against the API doco you linked above, and they are all in there. So I'm not sure what I'm calling is wrong :( – Ashley Muller Apr 03 '12 at 23:24
  • How do i switch to 4.5.1? When I open project properties and go to SDK, only 4.6.0 is listed. I clicked Manage and expanded Installed Flex SDKs and again, only 4.6.0 is listed. – Ashley Muller Apr 04 '12 at 06:35
  • It must be the tlfruntime.swc, then. Are you certain you have recompiled all of your libraries? Perhaps an old SWC contains the older version of things, and the class loader has to deal with conflicting libraries? – weltraumpirat Apr 04 '12 at 06:38
  • hmm I haven't recompiled all of my asset libraries... most of them would still be compiled from Flash CS 5. I'll go through and do that now, unfortunately there are about 40 of them. – Ashley Muller Apr 04 '12 at 06:41
  • Tough one, but that surely must be the problem - any asset that has a text field would have the old tlfruntime.swc compiled in. – weltraumpirat Apr 04 '12 at 07:08
  • haha that fixed the problem... recompiled all libraries in CS 5.5 and now it works. 2 days down the drain, I should have thought of that sooner! Thank you very much for your help! – Ashley Muller Apr 04 '12 at 07:18