Attaching Movie Clip from Library

Hi

Can anyone suugest a way to add labels at runtime to a movieclip that has been attached at the runtime from the library.

Thanks,
Vicky

You could edit your library symbol so that it contains a text field, and then set the text in that text field after you bring an instance of the symbol onto the stage.

Example, I have a symbol in my library linked to the Dude class. In that symbol there’s a text field called nameLabel. If I want a ‘dude’ called Bob on stage, I do this:

var dude1:Dude = new Dude();
addChild(dude1);
dude1.x = 150;
dude1.y = 100;
dude1.nameLabel.text = "Bob";

(.fla attached)

Would that do what you wanted?