API Docs for: 最后更新日期:2014年8月25日
Google搜索   
Show:

LFocusEvent Class

Available since 1.9.0

LFocusEvent オブジェクトは、ユーザーが表示リストの 1 つのオブジェクトから別のオブジェクトにフォーカスを変更したときに、オブジェクトによって送出されます。

Constructor

LFocusEvent

() public

Defined in events/LFocusEvent.js:1

Available since 1.9.0

Example:

LInit(50, "legend", 800, 480, main);
function main () {
    LGlobal.setDebug(true);
    var theTextField1 = new LTextField();
    theTextField1.x = 20;
    theTextField1.y = 20;
    theTextField1.setType(LTextFieldType.INPUT);
    addChild(theTextField1);
    theTextField1.addEventListener(LFocusEvent.FOCUS_IN, onfocus);
    theTextField1.addEventListener(LFocusEvent.FOCUS_OUT, outfocus);
    var theTextField2 = new LTextField();
    theTextField2.x = 20;
    theTextField2.y = 100;
    theTextField2.setType(LTextFieldType.INPUT);
    addChild(theTextField2);
    theTextField2.addEventListener(LFocusEvent.FOCUS_IN, onfocus);
    theTextField2.addEventListener(LFocusEvent.FOCUS_OUT, outfocus);
}
function onfocus(e){
    trace(e.currentTarget + "(" + e.currentTarget.objectIndex + ") FOCUS_IN");
}
function outfocus(e){
    trace(e.currentTarget + "(" + e.currentTarget.objectIndex + ") FOCUS_OUT");
}

Item Index

Properties

Properties

FOCUS_IN

String public static

Defined in events/LFocusEvent.js:35

Available since 1.9.0

[静的] focusIn イベントオブジェクトの type プロパティ値を定義します。(今LTextField オブジェクトでしかサポートされていません)

このイベントには、次のプロパティがあります。

属性
currentTargetイベントリスナーで Event オブジェクトをアクティブに処理しているオブジェクトです。
targetこのイベントにcurrentTargetと同じです.

FOCUS_OUT

String public static

Defined in events/LFocusEvent.js:50

Available since 1.9.0

[静的] focusOut イベントオブジェクトの type プロパティ値を定義します。(今LTextField オブジェクトでしかサポートされていません)

このイベントには、次のプロパティがあります。

属性
currentTargetイベントリスナーで Event オブジェクトをアクティブに処理しているオブジェクトです。
targetこのイベントにcurrentTargetと同じです.