accesing a text field from a custom class

March 11th, 2010
  • hello everyone.
    i have encountered the following issue:
    in a document i have 2 instances of different movie clips, one named inputArea and one named inputButton. both symbols from the library have been shared for ActionScript, and I assigned to the inputButton a custom class, which I built in a separate .as file.
    the problem is that I cannot reference inputArea from my custom class, getting an error message:

    1119: Access of possibly undefined property inputArea through a reference with static type flash.display:DisplayObject.

    i tried to type root.inputArea but that didn't work..
    if anyone is able to help i would be grateful


  • http://www.kirupa.com/forum/showthread.php?t=264606


  • thank you :)


  • okay.. i solved the problem.. all i had to do (after taking a glance at other topics from this forum) was to use


    trace((root as MovieClip)inputTextField.text);

    now, however, i have a new problem.
    i cannot import fl.controls.TextInput, although the help files say it's there, and even code hints suggest that

    i just get a 1172: Definition fl.controls.TextInput could not be found

    can anyone lend a hand, please ? :)







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about accesing a text field from a custom class , Please add it free.

    Posted in dballastages.com | edit