I cannot (will not) use TLF text fields in Flash CS5

I was trying to understand how Flash uses the 3D settings (although it is really 2.5D and I’m still thinking about it…).

So I made a simple display MC and put some sliders on the stage with text boxes to see feedback as I changed the properties for the perspectiveProjection Class (fieldOfView projectionCenter) and the other 3D properties (rotationY, z etc).

I wanted to check the maths for FOV (small values give a wider view, which doesn’t seem right to me?). When I tried to access the stage.stageWidth property of my MC I got the error message:

Error #1009: Cannot access a property or method of a null object reference.

After deconstructing the document Class, the culprit was the TLF text boxes, which are the default in CS5.

I found others had problems with TLF:

Steven Sacks and Adrian Parr

Although these appear to be related to loading SWFs. Adobe provides guidance on how to workaround that problem:

I’m still unclear what Flash is doing here. I think it is related to how Flash loads the TLF Classes. If I use the Publish Setting > Advanced AS3 > Runtime Shared Library (RSL) > Merge into code the problem goes away.


The file sizes look like this (no embedded font):

Classic text field   20Kb

TLF text field   67Kb + SWZ file at 153 Kb

TLF text field   192Kb

At runtime the TLF field must be able to access the RSL, either on the local machine or from a server which is accomplished by downloading the additional SWZ file or embedding the code.

I do not like either of those solutions.

Not everyone has fast broadband. I wear both hats (developer and designer) and spend time optimising my SWFs for artwork, audio and scripting, before releasing them to my website. (I recently replaced a Papervision component with the PaperSprite Class from SoulWire, thereby saving 75Kb).

Before I make any changes to the content on my website, particularly the behaviour of the Flash content I always consider “What is the impact on the user?”.

TLF may give me improved formatting options and use of non-roman scripts. But if it means the download is inflated by 15% I will stick to Classic Text.

This entry was posted in Flash. Bookmark the permalink.