When I change the text value of a dynamic text field, the text field simply gets empty without showing the new value.
I have a MovieClip called "game_board" that is added to the scene using AS3. (for starters, the stage is empty.)
I have another MovieClip called "stage_2" that is added as a child of the "game_board" dynamically using AS3.
"stage_2" contains a prebuilt circuit board with various dynamic text fields on it. All have instance names. For example, "text_1". The initial value of this.game_board.stage_2.text_1.text
is 0.
When I do this:
this.game_board.stage_2.text_1.text = "test"; trace(this.game_board.stage_2.text_1.text); //succesfully shows new value, "test"
The trace successfully shows the new value, however the text field on the scene showing "0" now shows absolutely nothing, it just disappears. I tried to run addChild
if for some reason it was moved to the bottom layer, but this did not work. Even when there is only this text field on the stage, it is still just empty.
What am I doing wrong?
source share