About a year ago, while the Flex 4 ground was still moving, Andy Mcintosh blogged a well done prompting text input done with spark components and skinning. As a few people have noted in the comments to that blog, enough changed by the time Flex 4 was complete that his code no longer compiles (mainly because of the demise of the SimpleText component). I went ahead and modified his code enough to compile with Flex 4.1. I’m including the working sample in case anyone else has the same need. (view source enabled).

Tagged with:

4 Responses to “Better Prompting TextInput with Flex 4 revisited”

  1. Noah Smith says:

    Thank you, really helped.


  2. Kevin says:

    I realize it was a while ago that this was posted, but I am getting an error using this code and I wonder if it is because the component contains [SkinState(“focused”)] yet the skin only defines two states (normal & disabled). Is that an error or is there something I am not understanding.

    Thanks, Kevin

  3. janek says:

    Thank you, it took me a while to find a really working prompt input.

  4. Flashpapa says:


    For my part I add this line

    override public function set text(val:String):void {

    promptView.visible = false;


    to initialize the view in case of amendment form

    But i still have some probleme with 2-way Binding like this

    I have 2 fields superimposed…