target objects created dynamically in library items
In my library I've got a movie clip. Completely empty, just containing this code:
Code:
var myText:TextField = new TextField;
addChild(myText);
myText.text="old text"
Then from the main timeline I add this library movie clip which places it on the main stage and the text appears
Code:
var Clippy:textfieldpadding = new textfieldpadding();
addChild(Clippy);
But now I want to change the text of that textfield. Which is inside the just placed library movie clip. But this gives an error:
Code:
var Clippy:textfieldpadding = new textfieldpadding();
addChild(Clippy);
Clippy.myText.text="new text"
Cause it has no clue what 'myText' is from the main timeline.
How can I target a textfield, or any other object when it is all dynamically generated and as a movieclip inside the library?