Answered
Updating Game Score: getting Type Error 1009
Hi all,
I have a simple puzzle game which has a score keeping mechanism. When you choose to view a "clue", your score is meant to be lowered. My game is set up with the main .fla file and an external actionscript 3.0 file.
Problem is, when I try to call the function to display the new score after changing it, I get this error:
"TypeError: Error #1009: Cannot access a property or method of a null object reference."
It doesn't have a problem actually adding to the score variable, because my trace came out just fine.
I have no idea why it is doing this... Below is the code of the 2 files. Hopefully someone will be able to help!
NOTE: The part of the code my .fla file is calling is toward the very bottom of the .AS file. I just included the beginning so people could see how I had the variables for the scoring defined.
------------------
File 1: .FLA File'
(segment from inside of a movie clip called "azrie")
I have a simple puzzle game which has a score keeping mechanism. When you choose to view a "clue", your score is meant to be lowered. My game is set up with the main .fla file and an external actionscript 3.0 file.
Problem is, when I try to call the function to display the new score after changing it, I get this error:
"TypeError: Error #1009: Cannot access a property or method of a null object reference."
It doesn't have a problem actually adding to the score variable, because my trace came out just fine.
I have no idea why it is doing this... Below is the code of the 2 files. Hopefully someone will be able to help!
NOTE: The part of the code my .fla file is calling is toward the very bottom of the .AS file. I just included the beginning so people could see how I had the variables for the scoring defined.
------------------
File 1: .FLA File'
(segment from inside of a movie clip called "azrie")