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

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

Guest
Nov 01, 2011 Nov 01, 2011

Copy link to clipboard

Copied

Hi there,

I'm trying to make a minigame with dialogues. There's this thief which you caught and when you talk to him you have to choose the right dialogue answers so he doesn't freak out.
I'm doing this with movieclips (and turning them into buttons with A.S. so I can make them fade in and out when you click on it). So to give you an example it looks like this:

(Button: Hi there) Click on it -> Dialogue fades out with alpha.......... New dialogue fades in with alpha and you're able to pick another option.

I've done this before and it worked all the time but when I tried it again today it starting bugging on me. I'm referring from one button to the other button with this code:

Object(root).level4.balkdialooglevel2.dialooglevel23.gotoAndStop(2);

I checked every symbol and they all have the correct instance name. Symbol level4 has the instance name Level4, symbol balkdialooglevel2 has the instance name balkdialooglevel2 and so forth.

But when I test it and click on the button, it gives me this error:

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

I don't know what I'm doing wrong. Perhaps ActionScript didn't load the symbols yet when I'm trying to refer to it?

And how do I fix this?

It's quite a big deal that I'm able to fix this, since I'm making this project for the Police in the Netherlands. (School project).

I'm sorry if my English isn't that good. As you can see I'm from the Netherlands.

Thanks in advance!

TOPICS
ActionScript

Views

9.3K

Translate

Translate

Report

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
Community Expert ,
Nov 01, 2011 Nov 01, 2011

Copy link to clipboard

Copied

use the trace function to debug and make sure that is the problematic line of code (click file/publish settings/flash and tick "permit debugging" so the problematic line number is in your error message).

trace(Object(root).level4);

trace(Object(root).level4.balkdialooglevel2);

trace(Object(root).level4.balkdialooglevel2.dialooglevel23);


Votes

Translate

Translate

Report

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
Guest
Nov 01, 2011 Nov 01, 2011

Copy link to clipboard

Copied

I never used the trace function before. Do I have to make a new keyframe and insert that as ActionScript on the main Timeline? Or in the button with the code I mentioned above?

This is the debug error:

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

at snoepwinkelerror_fla::level2antwoord1_130/frame15()

The code: Object(root).level4.balkdialooglevel2.dialooglevel23.gotoAndStop(2); is in the movieclip level2antwoord1 on the 15th frame.

Votes

Translate

Translate

Report

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
Community Expert ,
Nov 01, 2011 Nov 01, 2011

Copy link to clipboard

Copied

is

Object(root).level4.balkdialooglevel2.dialooglevel23.gotoAndStop(2);

on line 130?

if so, copy and paste the code i suggested just above your current line 130.

p.s.  i don't download and correct files unless i'm hired.

Votes

Translate

Translate

Report

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
Guest
Nov 01, 2011 Nov 01, 2011

Copy link to clipboard

Copied

Tracing gave this:

[object MovieClip]

[object balkdialooglevel2_127]

null

I checked again and balkdialooglevel2 does have the right instance name.

Votes

Translate

Translate

Report

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
Community Expert ,
Nov 01, 2011 Nov 01, 2011

Copy link to clipboard

Copied

LATEST

Object(root).level4.balkdialooglevel2 exists but dialooglevel23 doesn't exist in Object(root).level4.balkdialooglevel2 when those trace functions execute.

Votes

Translate

Translate

Report

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
Guest
Nov 01, 2011 Nov 01, 2011

Copy link to clipboard

Copied

Do you mind if I upload my project and post a link to it in this topic so you guys can have a better look at it?

Votes

Translate

Translate

Report

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