TextField.removeTextField( ) Method | Flash 6 |
deletes a runtime-created text field |
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( ).
// Make a text field this.createTextField("theField_txt", 1, 0, 0, 200, 20); // Then sometime later...delete the text field theField_txt.removeTextField();
MovieClip.createTextField( ), MovieClip.removeMovieClip( )