Input text in MC

Hello,

I have a problem with an input text created dynamicly into a MC that is into a MC that is into a MC (…)
So it’s, let’s say:
_root.myclipA.myclipB.myclipC.myinputtext
now as my input text isn’t on _root, i can’t get focus on it (i can never add any text).

How can i do to be able to input some text in that textfield? It cannot be moved elsewhere because i drag myclipC when i press myclipB…

any ideas?

okay by focus you mean you cant click on it and type… if this is right ill type more.

Yes exactly…
I could read we can set the focus on the textfield using Selection.setFocus(“myTF”)
so i added this to the 1st frame
_parent.onEnterFrame = function() {
Selection.setFocus(“myTF”);
};

But it doesnt work much…

i dont know but you could just put the btn in the back ground of the text box to make it easier for the on press… wait i think it would still go though not sure ive done it but i did it the long way make a btn hit test that goes around the input box

That’s not exactly my problem:

as the textfield is into many MCs, the focus isn’t set on the textfield.
Now to make the focus on that TF, i use Selection.setFocus(“myTF”); which seems to set some focus on the inital text of my TF (something like “Type Here”) as it’s selected but i still can’t change or add more text…

I added a variable to my dynamicly created textfield:
_root.myclipA.myclipB.myclipC.myinputtext.variable = “somevar”

in myClipC i added that to the 1st frame:
this.onEnterFrame = function(){
Selection.setFocus(“somevar”)}

still won’t work… what am i doing wrong??

ahh i finally have it!!
it was setfocus(“TF”) and not Selection.setfocus(“TF”)…
:slight_smile:

added: for some reason it only works if i add on _root
_root.onEnterFrame = function() {
heh = Selection.getFocus();
};
oh well :red: