Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Mar 04, 2015 Mar 04, 2015

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!!!

TOPICS
ActionScript
891
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 04, 2015 Mar 04, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 06, 2015 Mar 06, 2015
LATEST

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines