Skip navigation
Currently Being Moderated

(help) how to extend textbox from stage to oop method

Apr 22, 2012 6:10 PM

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.

 
Replies
  • kglad
    72,235 posts
    Jul 21, 2002
    Currently Being Moderated
    Apr 22, 2012 7:07 PM   in reply to angelo lapus

    assign an instance name in the properties panel and use it to reference that textfield.

     
    |
    Mark as:
  • kglad
    72,235 posts
    Jul 21, 2002
    Currently Being Moderated
    Apr 23, 2012 2:56 AM   in reply to angelo lapus

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 23, 2012 7:41 PM   in reply to angelo lapus

    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?

     
    |
    Mark as:
  • kglad
    72,235 posts
    Jul 21, 2002
    Currently Being Moderated
    Apr 23, 2012 8:38 PM   in reply to angelo lapus

    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.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points