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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

this.createTextField("four_txt", 4, 0, 75, 100, 22);<br />

for (var i in this) {<br />

if (this[i] instanceof TextField) {<br />

this[i].border = true;<br />

this[i].type = "input";<br />

}<br />

}<br />

var selectionListener:Object = new Object();<br />

selectionListener.onSetFocus = function(oldFocus, newFocus) {<br />

trace("Focus shifted from "+oldFocus+" to "+newFocus);<br />

};<br />

Selection.addListener(selectionListener);<br />

remove_btn.onRelease = function() {<br />

trace("removeListener invoked");<br />

Selection.removeListener(selectionListener);<br />

};<br />

See also<br />

addListener (Selection.addListener method)<br />

setFocus (Selection.setFocus method)<br />

public static setFocus(newFocus:Object) : Boolean<br />

Gives focus to the selectable (editable) text field, button, or movie clip, that the newFocus<br />

parameter specifies. You can use dot or slash notation to specify the path. You can also use a<br />

relative or absolute path. If you are using ActionScript 2.0, you must use dot notation.<br />

If null is passed, the current focus is removed.<br />

Parameters<br />

newFocus:Object - An object such as a button, movie clip, or text field instance, or a string<br />

specifying the path to a button, movie clip, or text field instance.<br />

Returns<br />

Boolean - A Boolean value; true if the focus attempt is successful, false if it fails.<br />

548 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!