TextField.removeTextField( ) Method

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
TextField.removeTextField( ) Method Flash 6

deletes a runtime-created text field
theField.removeTextField()

Description

When theField is a text field created at runtime with MovieClip.createTextField( ), the removeTextField( ) method deletes theField and removes its associated visual representation from the screen. Subsequent references to theField or any of its properties or methods yield undefined. When theField is a text field created at authoring time with the Text tool, removeTextField( ) has no effect. To remove an authoring time text field, place it in a movie clip and remove the entire clip with MovieClip.removeMovieClip( ).

Example

// Make a text field this.createTextField("theField_txt", 1, 0, 0, 200, 20); // Then sometime later...delete the text field theField_txt.removeTextField();

See Also

MovieClip.createTextField( ), MovieClip.removeMovieClip( )



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net