Hi ,
I have a Textfield that I have drawn on the stage.
I have another TextField that I have created in AS3.
The TextField I created in AS3 appears on the stage without an issue.
However, I am later setting the TEXT of both TextFields to the same variable , the TextField I drew on the stage, it shows no problem, the one I created in AS3 , it comes up blank.
The two calls to update the text are right under each other, so the variable cant be unsetting between them (at least I dont see how it would be).
here is the code I used to create the TextField
var TilesLeft2:TextField = new TextField();
TilesLeft2.defaultTextFormat = titleFormat;
TilesLeft2.embedFonts = true;
TilesLeft2.autoSize = TextFieldAutoSize.LEFT;
TilesLeft2.defaultTextFormat = titleFormat;
TilesLeft2.text = "Testing";
TilesLeft2.x=25;
TilesLeft2.y=445;
addChild(TilesLeft2);
at this point Testing does appear on the stage, so that part is working
then I set the text values
TilesLeft.text= String(bag); <-- this is the TextField I drew on the stage
TilesLeft2.text= String(bag);
TilesLeft will show the number 92 , TilesLeft2 changes to blank.
I tried added some non-dynamic text to tilesLeft2 like this:
TilesLeft.text= String(bag);
TilesLeft2.text= "hello" + String(bag);
TilesLeft changes to 92. TilesLeft2 just shows “hello”
What am I doing wrong?