What does “ReferenceError: Error # 1065: Variable TCMText not defined” mean?

When you click on a circle, it should double in size. However, I get the error message:

ReferenceError: error # 1065: TCMText variable not defined.

I think because I selected the text and the circle and made the selection a single character. Does anyone know how to combine form and symbol together without receiving this error message?

enter image description here

import flash.events.MouseEvent; circOne.addEventListener(MouseEvent.CLICK, doubleSize); circTwo.addEventListener(MouseEvent.CLICK, doubleSize); circThree.addEventListener(MouseEvent.CLICK, doubleSize); function doubleSize(event:MouseEvent):void{ e.currentTarget.scaleX=2; e.currentTarget.scaleY=2; } 
+4
source share
2 answers

Besides the runtime error, you get Compiler Errors , correct your code as @recursivity:

 function doubleSize(e:MouseEvent):void { e.currentTarget.scaleX=2; e.currentTarget.scaleY=2; } 

Check the "Compiler Errors" tabs, and if you get them, you can largely ignore the further output and behavior that you get from your Flash.

EDIT: There is absolutely nothing wrong with choosing many different elements together, and then them (or "combining") in Symbol (MovieClip).

The reason you get ReferenceError runtime AFTER a compiler error (which is very strange) is because you are using TLF text fields , check this thread on the adobe forums for more information. My advice, for simplicity, is to switch to Classic Text text fields (there is a drop-down list selector on the TextField properties panel, the default TLF is on Flash CS5 +).

+5
source

My TCMText error occurred when I used a new rectangle to draw a shape and add it to the scene. Drawing a rectangle did not cause an error. The error appeared when I went to add it to the scene. The same thing happened when I tried to draw a rectangle using Shape and graphics.rect. I finally got my rectangle without a TCMText error using Shape and moveTo / lineTo. On the Adobe forum, someone claims there is no way to disable this.

-1
source

All Articles