[CS3] dynamic text in a library item
If anyone could help me with this problem I'd really appreciate it.
In my library I have a Movie Clip called OneFrameTile.
As the name suggests, it has only one frame, and in that frame I have a dynamic text field called letter.
The constructor of my main class creates an instance of my OneFrameTile class and chooses a letter of the alphabet. The text property of the dynamic text field is set to the chosen letter of the alphabet.
That all works fine, no problem.
But then I have another Movie Clip in my library, called TwoFrameTile.
It has two frames, and the dynamic text field (still called 'letter') is on the second frame.
When I ask the constructor in my main class to create an instance of TwoFrameTile, and assign a letter of the alphabet to the text property of my dynamic text field, I get an error message saying Cannot access a property or method of a null object reference.
In this case, when I debug the movie, the letter property of my TwoFrameTile instance is shown as null.
If anyone can tell me what I'm doing wrong, I'd be grateful.
Thanks for reading this.
DD