Copy link to clipboard
Copied
var mcTxt:CText = new CText();
stage.addChild(mcTxt);
mcTxt.x = 640;
mcTxt.y = 40;
mcTxt.txtScore.text = 'Score: ' + score;
mcTxt.txtCombo.text = 'Combo: ' + combo;
mcTxt.txtScoreString.text = scoreString;
-----------------------------Explanation---------------
mcTxt got 3 mc-texts inside named txtScore,txtCombo and txtScoreString. The mcTxt shows on screnn perfectly.
Butthey don't show the scores up. I think because I code it wrong. How is the right way to call the mc inside the mc?
There is nothing wrong with how you target the textfields inside the CText instance - if there were you would be getting error messages. There might be a problem with how you have the textfield defined. Check to make sure the text color is not the same as the background it sits over. You might need to embed the font for the textfields, especially so if they are in any way tilted or moving or masked.
Copy link to clipboard
Copied
There is nothing wrong with how you target the textfields inside the CText instance - if there were you would be getting error messages. There might be a problem with how you have the textfield defined. Check to make sure the text color is not the same as the background it sits over. You might need to embed the font for the textfields, especially so if they are in any way tilted or moving or masked.
Copy link to clipboard
Copied
Thanks Ned Murphy. I actully found the problem yesterday and about to delete this topic before seeing you answer me back. It's like what you say the text code are correct, but the code calling vdos to stage was the problem. it made the variable missing.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now