ForumsProgramming Forumrefrence error variable TFLText not defined

5 6867
alex57834
offline
alex57834
88 posts
Nomad

I keep getting this error in the output box and I don't know what's wrong.
Any Help would be appreciated.

  • 5 Replies
alex57834
offline
alex57834
88 posts
Nomad

forget all that sorry this is the actual error I got in the output panel

ReferenceError: Error #1065: Variable TCMText is not defined

PixelSmash
offline
PixelSmash
566 posts
Nomad

It sounds like you're trying to access a variable called TCMText, but that variable doesn't exist. What's the code? Does the textfield you're trying to access have a name, or could it have a typo? Or perhaps a typo in the variable?

Another thing to look at is this: If you're using an external document class, check if you automatically declare stage instances. This should be somewhere around profile -> AS settings.

alex57834
offline
alex57834
88 posts
Nomad

package {

import flash.text.TextField;

public class Score extends Counter {

public function Score()
{
super();
}

override public function updateDisplay():void
{
super.updateDisplay();
gameScore.text = currentValue:toString();
}

}

}


This is the class where another error is coming up 1078 label must be simple identifier.
okay ill talk U thorough the error above. So first I made a new symbol gave it a class name of Score and typed in a number in a dynamic text field. I gave that a instance name of displayScore. After I placed a instance of Score on the background of he actual game playing screen.I gave that a instance name of gameScore. I have been trying to figure this out for 4 days I will be very grateful to anyone who can solve this mystery.

alex57834
offline
alex57834
88 posts
Nomad

anyone

PixelSmash
offline
PixelSmash
566 posts
Nomad

Hmm, I'm assuming you've imported flash.text.TextField for gameScore? Do you have gameScore set as classic, and not the newer (CS5+) TLF text? That could explain the error.

Showing 1-5 of 5