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.

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

onKillFocus = function(newFocus:Object) {}<br />

Invoked when a movie clip loses input focus. The onKillFocus method receives one<br />

parameter, newFocus, which is an object that represents the new object receiving the focus. If<br />

no object receives the focus, newFocus contains the value null.<br />

You must define a function that executes when the event h<strong>and</strong>ler is invoked. You can define<br />

the function on the Timeline or in a class file that extends the MovieClip class or is linked to<br />

a symbol in the library.<br />

Parameters<br />

newFocus:Object - The object that is receiving the input focus.<br />

Example<br />

The following example displays information about the movie clip that loses focus, <strong>and</strong> the<br />

instance that currently has focus. Two movie clips, called my_mc <strong>and</strong> other_mc, are on the<br />

Stage. You can add the following ActionScript to your AS or FLA document:<br />

my_mc.onRelease = Void;<br />

other_mc.onRelease = Void;<br />

my_mc.onKillFocus = function(newFocus) {<br />

trace("onKillFocus called, new focus is: "+newFocus);<br />

};<br />

When you press the Tab key to move between the two instances, information is displayed in<br />

the Output panel.<br />

See also<br />

onSetFocus (MovieClip.onSetFocus h<strong>and</strong>ler)<br />

onLoad (MovieClip.onLoad h<strong>and</strong>ler)<br />

onLoad = function() {}<br />

Invoked when the movie clip is instantiated <strong>and</strong> appears in the Timeline. You must define a<br />

function that executes when the event h<strong>and</strong>ler is invoked. You can define the function on the<br />

Timeline or in a class file that extends the MovieClip class or is linked to a symbol in the<br />

library.<br />

MovieClip 455

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

Saved successfully!

Ooh no, something went wrong!