I have a dynamic text on the stage instanced as T_Counter and I simply want to change its text property.
I tried the basic :
this.T_Counter.text = "This is a test"; and nothing shows
I tried with a variable :
var ceTexte = "This is a text";
this.T_Counter.text = ceTexte; and nothing shows
It's a bit frustrating to be unable to perform such a basic task !
Thanks in advance for any hint !
Is advanced layers enabled? Check your document settings:
If using advanced layers, each layer will be translated to a movieclip on publish, so you must be specific:
this.Later_Name.T_Counter.text = "new text";
Do you really mean "Layer_Name" instead of "Later_Name" ?
A true mystery!
Thanks for your answer Joseph, it was the problem.
It seems that I have a lot to learn. The scope of the variables and the way you adress an object seems to be different enough from what I'm used to in as3.
Anyway, I found that event.currentTarget stands for event.target in as3 so I'll find my way out of this mess. lol.
Thanks again !
Sorry, but doesn't work for me. (HTML5 canvas in Animate (V 20.5))
While rotation of this text field works (regardless of adding the layer or not) the text does not:
var _this = this;
Problem solved, I found the solution:
I had changed the dynamic text to a movieclip which was not necessary.
Dynamic text already has a label so it can be addressed directly.