Skip to main content
Inspiring
June 6, 2011
Answered

reference error - cannot find tcmtext

  • June 6, 2011
  • 3 replies
  • 38998 views

I get this kind of error after upgrading flash from cs5 to cs5.5

My library paths seem to be correct

This topic has been closed for replies.
Correct answer Jin-Huang

I was running Adobe Flash Professional CS5 CIAB through my recently upgraded Flash CS5.5. In Chapter 7, Using Text, I got these errors:

ReferenceError: Error #1065: Variable TLFTextField is not defined.

ReferenceError: Error #1065: Variable TCMText is not defined.

I also though it was a Text Layout Format issue. That's how I landed here. I was about to give after reading this and similar threads when I re-read my Actions panel and discovered I had misspelled 'addEventListener' (see below).

calculateBtn.addEventListtener(MouseEvent.CLICK, calculateMonthlyPayment);

After correcting the typo, the errors went away. Thought this might be helpful.

Now, I'm wondering why my typo doesn't get flagged through Check Syntax. But, that's for another time.


See it from #2 http://forums.adobe.com/thread/855756?tstart=0

What's more, TLFTextField is not a class in TLF but a class given by Flash pro to hold TLF text.

3 replies

Participant
May 29, 2012

I have Flash Pro CS 5.5.

I made a singleton to manage the contextMenu for the document class of a couple of different SWFs.

I immediately experienced the dreaded : ReferenceError: Error #1065: Variable TCMText is not defined.

It wasn't until I was importing these two classes that I had this problem (with this project) :

import flash.ui.ContextMenu;

import flash.ui.ContextMenuItem;

My class that is importing these two classes would instantiate and then I immediately get the runtime error (1065).

THE FIX :

I added this line and it compiled and worked for me :

public var TCMText : *;

I think the bug is that some Adobe code is expecting a dynamic class that it can stick the nefarious 'TCMText' property on and when it can't it freaks out.  Likely if my class was declared as dynamic (like the MovieClip class is) this wouldn't be a problem.

I have generally stayed completely away from TLF TextFields because I have perceived them to be problematic.  I have gotten this error before and converting a TextField to a 'classic' TextField in the IDE properties panel made it go away.

I hope this helps.  It *would* be cool if someone from Adobe could shed some light on this.

March 18, 2012

This wasn't answered.  Just some people giving up because the Adobe user forums suck so bad.  This is a bug.  Like a lot of Adobe's glitches there doesn't seem to be any support from the corporation just a bunch of us poor fools searching for another work around.

I get the same error code after importing some text as symbols in to Flash from Illustrator.

Searched for the last hour and Adobe has no info out there that leads to a sollution.  Another dead end and time to start from scratch.  Thanks Adobe, your monopoly stands only because nothing better has come along yet.  As soon as it does you can kiss my license fees good by.

Adobe Employee
June 7, 2011

Pls give me the complete error message. For example, tcmtext in which class cannot be found?

Inspiring
June 7, 2011

Hello, it is no more than

Reference Error: Error #1065 Variable TCMText is undefined

The message appears at the end of "test movie", and the movie does not seem to include any code.

I have tried two different configurations (one with authortime import of a bunch of symbols from a separate fla file, and the other one using Flex "Embed" mechanism to reference them, but the end result is the same.

Adobe Employee
June 7, 2011

There must be xxx.TCMText. Pls tell me the caller's class name. Is caller an instance of fl.text.TLFTextField or a TLF object?