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

This again --TypeError: Error #1010: A term is undefined and has no properties

Explorer ,
Nov 21, 2014 Nov 21, 2014

Hi all I know there are several threads on this.  I have a file with three frames: frame 1 is a main menu with buttons linking to frame 2 (an english menu) or frame 3 (a french one.)

Within each sub menu is a code which loads various external swfs.  When ever the play head enters these sub menus in frames 2 or 3 i get the following output error.

TypeError: Error #1010: A term is undefined and has no properties.

  at LungCancer_index_fla::English_mc_14/frame1()

or

TypeError: Error #1010: A term is undefined and has no properties.

  at LungCancer_index_fla::French_mc_21/frame1()

if its going to the French menu.

I don't understand what the _14 or the _21 is, beside the French_ or English_mc's

Otherwise the file works great and I'm tempted to just ignore the error but I'd still like to know.

Thanks in advance 

Here is the code for the english menu if it helps.

.......................................................

stop();

//  main menu button

  FrenchBtn.addEventListener(MouseEvent.CLICK, gotoFr);

  homeBtn.addEventListener(MouseEvent.CLICK, gotoMainMenu);

  function gotoFr(event:MouseEvent):void

{

  MovieClip(this.root).gotoAndStop("French");

}

  function gotoMainMenu(event:MouseEvent):void

{

  MovieClip(this.root).gotoAndStop("top");

}

//////CHAPTER MENU : Event Listeners ////////

brainCancer.addEventListener(MouseEvent.CLICK, ch1);

medication.addEventListener(MouseEvent.CLICK, ch2);

surgery.addEventListener(MouseEvent.CLICK, ch3);

radiotherapy.addEventListener(MouseEvent.CLICK, ch4);

chemotherapy.addEventListener(MouseEvent.CLICK, ch5);

support.addEventListener(MouseEvent.CLICK, ch6);

//----------------------------------------------

function ch1(e:MouseEvent):void{

subMenu.x = -25;

subMenu.y = -115;

}

function ch2(e:MouseEvent):void{

subMenu.x = -25;

subMenu.y = 135;

}

function ch3(e:MouseEvent):void{

subMenu.x = -25;

subMenu.y = 385;

}

function ch4(e:MouseEvent):void{

subMenu.x = -25;

subMenu.y = 635;

}

function ch5(e:MouseEvent):void{

subMenu.x = -25;

subMenu.y = 885;

}

function ch6(e:MouseEvent):void{

subMenu.x = -25;

subMenu.y = 1135;

}

//-------------calling external SWFs -----------------//

var Xpos:Number = -250;

var Ypos:Number = -350;

var swf:MovieClip;

var loader:Loader = new Loader();

var defaultSWF:URLRequest = new URLRequest("swfs/cover.swf");

loader.load(defaultSWF);

loader.x = Xpos;

loader.y = Ypos;

addChild(loader);

// Btns Universal function

function btnClick(event:MouseEvent):void {

removeChild(loader);

var newSWFRequest:URLRequest = new URLRequest("swfs/" + event.target.name + ".swf");

loader.load(newSWFRequest);

loader.x = Xpos;

loader.y = Ypos;

addChild(loader);

}

// ------------- BTN LISTENERS ---------------------------//

//chapter1 : What is Glioma

subMenu.chapter1_1.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter1_2.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter1_3.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter1_4.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter1_5.addEventListener(MouseEvent.CLICK, btnClick);

//chapter2 : Medications

subMenu.chapter2_1.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter2_2.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter2_3.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter2_4.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter2_5.addEventListener(MouseEvent.CLICK, btnClick);

//chapter3 : Surgery

subMenu.chapter3_1.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter3_2_1.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter3_2_2.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter3_2_3.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter3_3.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter3_4_1.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter3_4_2.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter3_4_3.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter3_5.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter3_6_1.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter3_6_2.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter3_6_3.addEventListener(MouseEvent.CLICK, btnClick);

//chapter 4 : Radiotherapy

subMenu.chapter4_1.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter4_2_1.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter4_2_2.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter4_3.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter4_4.addEventListener(MouseEvent.CLICK, btnClick);

//chapter 5 : Chemotherapy

subMenu.chapter5_1.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter5_2_1.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter5_2_2.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter5_3.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter5_4_1.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter5_4_2.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter5_5.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter5_6.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter5_7.addEventListener(MouseEvent.CLICK, btnClick);

//chapter 6 : Support

subMenu.chapter6_1_1.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter6_1_2.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter6_1_3.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter6_2.addEventListener(MouseEvent.CLICK, btnClick);

subMenu.chapter6_4.addEventListener(MouseEvent.CLICK, btnClick);

TOPICS
ActionScript
3.4K
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

correct answers 1 Correct answer

LEGEND , Nov 21, 2014 Nov 21, 2014

Go into your Flash Publish settings and select the option to Permit Debugging.  Then tun the file so that the errors occur again.  If lucky the error message will include a line number right after the frame number.

Translate
LEGEND ,
Nov 21, 2014 Nov 21, 2014

Go into your Flash Publish settings and select the option to Permit Debugging.  Then tun the file so that the errors occur again.  If lucky the error message will include a line number right after the frame number.

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
Explorer ,
Nov 21, 2014 Nov 21, 2014
LATEST

Cheers,

It was a typo in a button instance name.

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