03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Invoked when a text field receives keyboard focus. The oldFocus parameter is the object that<br />

loses the focus. For example, if the user presses the Tab key to move the input focus from a<br />

button to a text field, oldFocus contains the button instance. If there is no previously focused<br />

object, oldFocus contains a null value.<br />

Parameters<br />

oldFocus:Object - The object to lose focus.<br />

Example<br />

See the example for TextField.onKillFocus.<br />

See also<br />

onKillFocus (TextField.onKillFocus h<strong>and</strong>ler)<br />

_parent (TextField._parent property)<br />

public _parent : MovieClip<br />

A reference to the movie clip or object that contains the current text field or object. The<br />

current object is the one containing the ActionScript code that references _parent.<br />

Use _parent to specify a relative path to movie clips or objects that are above the current text<br />

field. You can use _parent to climb up multiple levels in the display list as in the following:<br />

_parent._parent._alpha = 20;<br />

Example<br />

The following ActionScript creates two text fields <strong>and</strong> outputs information about the<br />

_parent of each object. The first text field, first_txt, is created on the main Timeline. The<br />

second text field, second_txt, is created inside the movie clip called holder_mc.<br />

this.createTextField("first_txt", this.getNextHighestDepth(), 10, 10, 160,<br />

22);<br />

first_txt.border = true;<br />

trace(first_txt._name+"'s _parent is: "+first_txt._parent);<br />

this.createEmptyMovieClip("holder_mc", this.getNextHighestDepth());<br />

holder_mc.createTextField("second_txt", holder_mc.getNextHighestDepth(),<br />

10, 40, 160, 22);<br />

holder_mc.second_txt.border = true;<br />

trace(holder_mc.second_txt._name+"'s _parent is:<br />

"+holder_mc.second_txt._parent);<br />

The following information is displayed in the Output panel:The following information writes<br />

to the log file:<br />

632 ActionScript classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!