hello guys, I would like to something about textbox in oop method.
the scenario is: I have a textbox inside the stage. I'm just wondering how will I control and access it using oop methodology.
Thank you in advance guys.
are you asking how to create a textfield from a class file? if yes, use the following from a display list class
var tf:TextField = new TextField();
addChild(tf);
if you're asking how to reference an already created textfield from the parent display list class, assign an instance name in the properties panel and use it to reference that textfield.
It depends on the scope of this class file.
If it's the Document Class, (set in the properties pane), or a classed linked through AS Linkage, then it's just a matter of referencing as kglad noted.
Otherwise, it will have to referenced via another method depending on the class.
How is this class being created?
again, if you're asking how to reference an already created textfield from the parent display list class, assign an instance name in the properties panel and use it to reference that textfield.
if you're trying to reference from some other class, you'll need to use the correct reference which depends on the relationship between your class'es scope and the textifield's parent movieclip.
North America
Europe, Middle East and Africa
Asia Pacific