0

I want build a game, but i get this errors:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at project.game.players.controllers::myPlayerController/onEnterFrame()

This is my class: http://pastebin.com/x0kpaDg2

What is the problem?

2 Answers 2

2

Your array clicked is not initialized. And for associative arrays preferable to use Object type.

Sign up to request clarification or add additional context in comments.

Comments

0

The problem is that some of your object is not instantiated. Thus, it is null. And thus, you have this exception because you are trying to access it. This is kind of problem which reasons is not that hard to find. Just debug your app.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.