PDA

View Full Version : adding textfields to movieClip in random order


eivindt
12-16-2010, 02:02 AM
Hi:-) this concerns flash cs5 and the timeline.
Everybody knows the effect you get when you use appendText() to add text to a multiline dynamic textfield, right ?
Well, I have a movieClip as a container, and I would like dynamic textfields to populate this movieclip in the same manner as textStrings would populate the dynamic Textfield.

How does this work?
I have buttons that trigger addChild() function, but how do I make sure that the textfields make up an arbitrary list as a menu user chooses which buttons to click?
var buttonTrace:TextField=new TextField;
addChild(TextClip.buttonTrace);
buttonTrace.x=0;
buttonTrace.y=0;
buttonTrace.text="Breadcrumbs";

This is the original textField, before user interaction, while:

TextClip.addChild(TextClip.buttonTrace);
TextClip.buttonTrace.y =?????;

....this should be the adding of a new textField to the movieClip.
I am trying to simplify this here, because the addchild function is being referenced from another place than the origin of the textField.

I am sorry, but I have had to learn this stuff so fast, but I would be happy if someone could at least point me in the right direction....

I want all the populating textfields to remain visible in the order they were populated. So my question is .... How do I start ?