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

Error please help

Community Beginner ,
Apr 13, 2012 Apr 13, 2012

Copy link to clipboard

Copied

TypeError: Error #1009: Cannot access a property or method of a null object reference.

          at AttackMC/frame25()

what do ii do?

What does this mean?

TOPICS
ActionScript

Views

873

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
Advocate ,
Apr 13, 2012 Apr 13, 2012

Copy link to clipboard

Copied

it means you have an object that is null

turn on debugging run the game again to reproduce the error

include the new error here which will include line numbers

paste to code from frame 25 of AttackMC here indicating the line number that is reported in the error

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 Beginner ,
Apr 13, 2012 Apr 13, 2012

Copy link to clipboard

Copied

stop();

MovieClip(parent).gotoAndPlay(MovieClip(parent).currentFrame+1);

// in last frame of Attack movieclip

its that line 2 it doesnt like.

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
Advocate ,
Apr 13, 2012 Apr 13, 2012

Copy link to clipboard

Copied

ok it looks like either parent is null or parent isn't a MovieClip

use this code instead and let me know what gets traced out

stop();

trace("parent: " + parent);

trace("mc parent: " + MovieClip(parent));

MovieClip(parent).gotoAndPlay(MovieClip(parent).currentFrame+1);

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 Beginner ,
Apr 13, 2012 Apr 13, 2012

Copy link to clipboard

Copied

parent: null

mc parent: null

TypeError: Error #1009: Cannot access a property or method of a null object reference.

          at AttackMC/frame25()

gets traced out.

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
Advocate ,
Apr 13, 2012 Apr 13, 2012

Copy link to clipboard

Copied

that means that an instance of AttackMC doesn't have a parent

i wonder are you using flash player 11.2?

i wonder if it's related to http://forums.adobe.com/thread/989387?tstart=0

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 Beginner ,
Apr 13, 2012 Apr 13, 2012

Copy link to clipboard

Copied

ii using Flash player 10

how do ii give it a parent..

In the library the movieclip is called Attack and then their is a linkage AttackMC

is that the problem?

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
Advocate ,
Apr 16, 2012 Apr 16, 2012

Copy link to clipboard

Copied

LATEST

no the MC name and linage you are using are find you give a MovieClip a parent by calling atChild()

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