Home > Actionscript/AS3, Flash > Flash CS5: TLF textfield bugs (or TLF WTF?)

Flash CS5: TLF textfield bugs (or TLF WTF?)

January 4th, 2011

So, I just upgraded to Flash CS5 and I have to say that it sucks slightly less than CS4. The IDE layout changes are for the better (unlike CS4) and it *seems* faster. But, I ran into a weird bug with one of the new features in Flash CS5: The new TLF textfield causes problems with externally loaded SWFs.

Here’s the scenario: I have a main SWF that loads another SWF at runtime. I’m using some code that I cut-and-pasted from another project to load the SWF, so I know it works. But, in my new CS5 project, it throws runtime errors whenever I try to access a public function of the loaded SWF. It can’t access any of the public methods and it keeps telling me they don’t exist. I try loading a different SWF and no problems. Huh?

In my debugging, I also noticed that when I traced the numChildren of my loaded SWF, it was wrong. It said I had 2 children when I could see that there were 4. I added another one to the timeline. It still said there were 2 children. Even weirder is that when I traced these 2 children, Flash told me that one of them was a Loader (it wasn’t). Again, I tried the same test on another SWF and it was ok.

The problem turned out to be 2 textfields that were in my loaded SWF. Flash CS5 set them as TLF Text when I created them. This is apparently the new default. The TLF text fields were breaking my loaded SWF. If I removed them, everything went back to normal. I changed the textfields from TLF Text to Classic Text and everything worked. I probably spent over an hour tracking this down.

Once I figured out what was causing the issue, I did some Googling and found this:
Flash CS5 TLF Engine Causes Errors With Loaded SWFs.

Anyway, this is a long winded way of saying be careful about using the TLF Text in Flash CS5. Oh, and…
Adobe, you suck.

Be Sociable, Share!

  1. January 4th, 2011 at 18:39 | #1

    Also, another one that got me, was; if you have a timeline animation on the stage and TLF textfield, Flash CS5 seems to re-nest the stage when SWF is published.

    For a while i was stumped that the frames disapeared from the bandwidth profiler, it took a while to track that one down.

  2. February 1st, 2011 at 08:59 | #2

    TFL also causes a problem when accessing FlashVars.
    I blogged about it here, and have a solution.

  3. April 12th, 2011 at 15:06 | #3

    So after 25 hrs of dev, we do a final publish and none of our text shows up (on a project that was 99% text layour)! We had just upgraded to CS5.. but when we copied all frames in flash and pasted into a new file it all started working again. Anyway.. that sucks that they’re trying to get all fancy over at Adobe.. at make it so your buggy setting isn’t the default.

  4. May 11th, 2011 at 11:02 | #4

    He he !! WTF Textfield is an apt name.

  5. November 4th, 2011 at 13:10 | #5

    I had similar problem with TLFTextFields in MovieClip extended Class instantiated with linked symbol in the Flash Library. AS3 could not see any TLFTextField that had been added to the timeline of that symbol. When I moved the TLFTextField into a named MovieClip symbol on the same timeline then AS3 could access it.

  6. doctor dave
    February 23rd, 2012 at 11:29 | #6

    but HTML5 and CSS3 are almost standard in all browsers, so we will be soon free of Flash forever!!!

  7. admin
    March 13th, 2012 at 19:37 | #7

    No offense Doctor Dave, but you clearly aren’t a developer. The HTML5 specification is still not finalized and the browser support is STILL pretty terrible. The bleeding edge of HTML5 and javascript development looks like a crappy Flash movie. It’s true that Flash is going away, but there is currently nothing that replaces it. That’s not a success – it’s a sad failure. The web will be much more boring for the next few years without Flash.

  1. August 8th, 2011 at 21:58 | #1
  2. January 15th, 2013 at 03:31 | #2