Yes, its kind of changing the default behaviour,

here is what i tried to



*

override
*

*protected* *function* focusInHandler(event:FocusEvent):*void* {

 _focused =

*true*;

invalidateSkinState();

*super*.focusInHandler(event);

}

*override* *protected* *function* focusOutHandler(event:FocusEvent):*void* {

 _focused =

*false*;

invalidateSkinState();

*super*.focusOutHandler(event);

}

  *override* *protected* *function* getCurrentSkinState():String

{

*if*(prompt != *null* && prompt != *""*&& _focused && text.length ==0)

 {

*return* *"normalWithPrompt"*;

}

*else* {

*return* *super*.getCurrentSkinState();

}

}


On Tue, Jun 25, 2013 at 12:16 PM, Shashank Vangari <
shashankvang...@gmail.com> wrote:

> Hello Malek, I get that now , have u tried just overriding the
> focusInHandler of the textinput , so it will not remove the prompt on focus
> ,and it will just remove the prompt on key down ,
>
> Well I m just guessing it might bring up other issues!!
>
>
>
> On Friday, 21 June 2013 13:09:37 UTC+5:30, Malek S wrote:
>>
>> Hi,
>>
>> I want to listen for keyBoardEvents for spark textinput.
>>
>> something like this
>>
>> *
>>
>> protected
>> *
>>
>> *function* keyDownEvent( event:KeyboardEvent ):*void*
>> * *
>>
>> {
>>
>> promptDisplay.visible=
>>
>> *false*;
>>
>> *var* _txtEmty:Boolean = *super*.textField.text.length == 0;
>>
>> *if*(_txtEmty && event.keyCode != 229)
>>
>>    promptDisplay.visible=
>>
>> *true*;
>>
>> }
>>
>>
>>
>> But i am getting compiler error on promptDisplay.Visible
>>
>>
>>
>> basically promptDisplay does not support this property. anyother
>> suggestions are welcome
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to flex_india+unsubscr...@googlegroups.com.
> To post to this group, send email to flex_india@googlegroups.com.
> Visit this group at http://groups.google.com/group/flex_india.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to flex_india+unsubscr...@googlegroups.com.
To post to this group, send email to flex_india@googlegroups.com.
Visit this group at http://groups.google.com/group/flex_india.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to