Skip to main content
amyr92253896
Participant
March 4, 2015
Question

HELP! flash error code #1065 variable TCMText is not defined

  • March 4, 2015
  • 1 reply
  • 954 views

Hi,

Im doing a project for uni and trying to create a search bar throughout the flash document for people to find what they are looking for.

Followed a tutorial online step by step and then i get this error. #1065 variable TCMText is not defined.

I'm really a beginner, any help would be so greatly appreciated!

stop();

var i:int = 0;

var names:Array = new Array("Annual Report","annual report");

var frames:Array = new Array("2","2");

text_in = "..."; /*what is wrong with you */

searchbutton.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);

function fl_MouseClickHandler(event:MouseEvent):void

{

  findInArray(text_in.text);

  gotoAndStop(frames);

}

function findInArray(str:String):int

{

  for(i = 0; i < names.length; i++)

  {

  if(names == str)

  {

  return i;

  }

  }

  return 0;

}

it says the issue is on line 7 where i have commented out "what is wrong with you"!

Ive read a lot of things online and i have got it as classic text, which everyone is telling them to do. So quite confused.

If you can, please help me.

Thanks!!!

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
March 4, 2015

For the line in question, I would say the problem is that you have a String variable that you have not declared (as in:  var text_in:String; ).  But I don't think that is the line 7 the error is pointing to.  If you are using any components in your design then that might be where the problem is coming from.  If you show the complete error it might prove helpful.

amyr92253896
Participant
March 6, 2015

Sorry for a delay in reply.

Here is what the error says...

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

Scene 1, Layer 'Actions', Frame 1, Line 71067: Implicit coercion of a value of type String to an unrelated type flash.text:TextField.

If you could help in away that would be great cheers!