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?
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
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.
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);
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.
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
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?
Copy link to clipboard
Copied
no the MC name and linage you are using are find you give a MovieClip a parent by calling atChild()