TextInputのfocus時のbackgroundの色を変える方法

TextInputなどでfocus時のbackgroundの色を変更する方法。デフォルトでは、backgroundの色は変更できない。












private function myFocusInHandler( event:FocusEvent ):void
{
event.currentTarget.setStyle( "backgroundColor", 0x44BBFF );
}

private function myFocusOutHandler( event:FocusEvent ):void
{
event.currentTarget.setStyle( "backgroundColor", 0xA6DFFF );
}
]]>

focusのイベントを取得しているので、ここにいろいろと処理を書いても良いかもしれない。

2009年 4月 2日 | Posted in Flash / ActionScript3.0
タグ: ,
まだコメントはありません。

コメントする

XHTML: 使用可能タグ: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>