Get all named instances in a flash movie-Collection of common programming errors
Short answer: there’s no “built-in” way to do this. You could try to scrounge up functionality similar to getElementByName(), but it would require starting at _root
and spidering through your content – and strictly speaking a movie clip starts out with references to its children but they could be deleted at runtime, so this could fail.
With that said, this is a common problem and there are many approaches to it. One thing you might find more useful is to create a custom component attached to a custom class – say, “TextPlaceholder”, and have your designer put copies of that where they want dynamic text. Then at runtime, this component could examine its _name
property, or other custom component parameters, and based on those it could create a text field of the appropriate size, content, and so on. That’s just one way of approaching it.