If you are not reassigning text to the new instances, they have nothing to display - they do not inherit content by name alone. You need to store the text in variables and make those variables accessible for the length of the timeline. So when you come to a frame with a new instance of a textfield, you assign it the text that beongs to it from the variable.
Thank you Ned.
For clarity (example), if I have a single dynamic text (say with an instance
of "textswf_1" ) and wish to use it multiple times over the time line,
I will need to store this text in a variable.
Or can a dynamic instance only be used once?
(i.e. ... a new text instance, reference is required for
multiple use of the original text field)
If so, would you mind referencing a resource or an
example - how to (the variable and it's use)?
Thanks again for your response!
If you have a single dynamic instance of a textfield, then there is only one of them, then you are not using it multiple times over the timeline. You can extend whatever layer it is on to have it present whereever you want it to be. If there are frames where you do not want it to appear, then you can set its visible property to false/true as needed.
Anytime you create a new keyframe with that textfield in it, you are creating a new instance. It is not the same single textfield anymore, regardless that you name it the same. If it happens to be in an adjacent frame to a copy of it, it can inherit the properties of the one preceding it, but it is still a new instance. If you separate it by frames or layers, then it has no association with the original.
You described having the textfield on different layers. That indicates there cannot be a single instance of it.
I always welcome learning something new.
I did not know creating a new keyframe,
creates a new instance.
Yes, I had used the same dynamic text field instance name in
numerous, new layers (great observation).
With the objective to display the User's name throughout
the timeline (on and off)...
I'll attempt to paraphrase your solution;
- Use a single layer to display the dynamic text field.
- Extend this layer's timeline throughout the movie, or end use of the dynamic text field.
Help with this one ??
- Set the visible properties to true or false as need through out the timeline.
( Does require an AS3 ? )
I'll give that a try.....
Side of effect of using the above solution;
The SWF in it's attempted state, uses the dynamic text field instance, in
different places, different text sizes, on the stage, throughout the Movie.
(i.e. the User's first name appears in different sentences...)
Per the solution above,
I believe I will be limited to One location, one format setting.
Is this assumption correct?
I can make this work from a display / Movie point of view.
However, your first VAR concept, noted above, might be
worth exploring should more flexibility be required.
Thanks for making the time to coach...
1 person found this helpful
Declare a variable for the text that will be displayed in the textfield(s). Place that variable in an actions layer that extends the full length of the timeline. That will make it available anywhere along the timeline.
At whatever point some text is defined for that textfield, assign the text to the variable.
yourText = "the text for the textfield"; // or maybe = theInputTextfield.text
Then anywhere along that timeline where you have a new textfield for that text to be displayed, use Actionscript in that actions layer to assign it in the frame where it is needed.
yourTextfieldName.text = yourText;
Thanks again Ned,
I will explore both of your solutions within this Project.
... appreciate your time!