Home > Adobe Flex > Flex 4: Changing the “displayAsPassword” default character

Flex 4: Changing the “displayAsPassword” default character

Today I ran into a situation where I wanted to display my password characters as a bullet versus the default asterisk (“*”).

I thought this would be pretty simple to do but realized after digging through the Flex 4 SDK that there was no public property I could set to change this. I tried hacking commitProperties and a couple of other methods but came up short in those areas as well until I found the exact spot in the Flex libraries where this character was defined:

RichEditableText.as (line 679)

1
2
3
4
    /**
     *  @private
     */
    mx_internal var passwordChar:String = "*";

A-ha! I see here that it’s prefixed with the “mx_internal” namespace and I remembered from other examples around the web that you can easily tap into that namespace and modify properties not normally meant to be modified.

Luckily, I had already extended the TextInput class for various other reasons and decided to add an event listener for the CREATION_COMPLETE lifecycle event of the component. This was added in the constructor:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import mx.core.mx_internal;
 
/**
 * Constructor
 */
public function myTextInput()
{
	super();
 
	this.addEventListener( FlexEvent.CREATION_COMPLETE, onCreationComplete );
}
 
private function onCreationComplete( event : FlexEvent ) : void
{
	//change internal passwordChar to a bullet versus an asterisk
	this.textDisplay.mx_internal::passwordChar = "●";
}

…and voila! By tapping into the mx_internal namespace, I found I could modify the normally private variable “passwordChar” and set it to something I preferred better (in this case, the bullet point used in some sites like Twitter).

Hope this helps someone!

Categories: Adobe Flex Tags:
  1. February 4th, 2019 at 04:45 | #1

    For most up-to-date news you have to pay a visit the web and on world-wide-web I found this website as a finest web site
    for hottest updates.

  2. February 23rd, 2019 at 19:52 | #2

    You are so cool! I don’t thinnk I’ve read someyhing like this before.
    So grfeat to discover another person with unique thoughts on tis topic.
    Seriously.. thank you for starting this up. This site is one thinng that’s needed on the web, someone
    with a bit of originality!

  3. February 24th, 2019 at 16:06 | #3

    My family all the time say that I am killing my time here at net, but I know I
    am getting knowledge all the time by reading thes pleasant
    articles or reviews.

  4. March 12th, 2019 at 19:41 | #4

    Thanks to my father who informed me on the topic of this
    weblog, this blog is actually awesome.

  5. March 14th, 2019 at 08:08 | #5

    Fastidious replies in return of this query with solid arguments and describing all
    concerning that.

  6. March 18th, 2019 at 11:48 | #6

    Hmm is anyone else encountering problems with the images
    on this blog loading? I’m trying to figure
    out if its a problem on my end or if it’s the blog. Any responses would be greatly appreciated.

  7. April 1st, 2019 at 01:15 | #7

    For hottest news you have to pay a visit world wide web and
    on the web I found this web site as a most excellent web site for newest updates.

  8. April 1st, 2019 at 15:13 | #8

    It’s important to remember your financial allowance and fashionableness
    to quell the impulse shopping, and after that you’re suire to find some steals.
    Sonia is someone that spent her entire life around the creative world,
    in the age of 17 she worked with a textile shop helppful to decorate the window dsplays to improve attract customers.
    Unfortunately, most top end one button suits can run with a cost off several thousand dollars.

  9. April 2nd, 2019 at 02:57 | #9

    El Tongkat Ali es una de las hierbas más poderosas para alabar los niveles de testosterona.
    TONGKAT ALI ROOT: es el recibo de la piel y la vivero de un eje de acero
    perdurable, que aumenta la libido y tiene un zona de influencia anti-inflamatorio.

  10. April 11th, 2019 at 06:10 | #10

    Great goods from you, man. I’ve keep in mind your stuff prior to and
    you’re simply too magnificent. I really like what you have acquired right
    here, certainly like what you’re stating
    and the way by which you assert it. You are making it enjoyable
    and you still care for to keep it wise. I can’t wait to read far more from
    you. This is actually a wonderful website.

  11. April 12th, 2019 at 05:54 | #11

    My brother suggested I may like this web site.
    He was entirely right. This put up truly made my day.

    You cann’t imagine simply how so much time I had spent for this info!

    Thanks!

  12. April 19th, 2019 at 06:56 | #12

    This post will assist the internet users for creating new
    webpage or even a blog from start to end.

  13. April 25th, 2019 at 11:22 | #13

    Can I simply say what a relief to discover somebody that truly knows what they are talking about on the net.
    You definitely realize how to bring an issue to light and make it
    important. A lot more people should look at this and understand this side of the story.
    It’s surprising you aren’t more popular because you most certainly have the gift.

    pharaoh’s ant [Antonio]
    http://clashofclanstrichegemmesillimit.blogspot.com/

  14. April 27th, 2019 at 15:05 | #14

    This piece of writing is genuinely a fastidious one it assists new web viewers, who are wishing in favor of blogging.

  15. May 8th, 2019 at 05:15 | #15

    Excellent goods from you, man. I’ve understand your stuff previous to and
    you are just too fantastic. I really like what you’ve acquired
    here, certainly like what you are stating and the way in which you say it.
    You make it enjoyable and you still take care of to keep
    it wise. I can not wait to read far more from you. This is really a wonderful website.

  16. May 9th, 2019 at 18:54 | #16

    TAE 88,35 %. Cantidad total a devolver 1.390,02€.

  17. May 9th, 2019 at 22:51 | #17

    It’s an remarkable post for all the online viewers; they will obtain benefit from it I am sure.

  18. May 16th, 2019 at 07:35 | #18

    Enjoying cricket has actually constantly been actually the
    typical procedure of TELEVISION as well as over the years it has appeared that net customers
    has significantly raised as well as it has ended up being a habit that they check out live cricket online.

  19. May 18th, 2019 at 04:17 | #19

    Combine tudo como seu tom de pele.

  20. June 1st, 2019 at 05:00 | #20

    Today going to school takes more than ambition grades in a desire for hard work, and mathematics in college.

    And the reason I’m likely to do because I am going to Flower
    Love, this is make this edge straight here. These companies instead
    pay you for time and you can make some cash since they could
    run online surveys because of the internet. Pay Per View Chat
    Script approaches have been the most well-known ones among
    the Adult Video Chat System used by businesses.
    I began texting him often and asking him when he was liberated, etc..
    Instead, I dived back to it, although I must have
    went a bit slower. Joe was expecting to take on a terrific burden, as he began that travel.
    Joe Babinski: And it’s– it’s a encounter. It’s a convention on the coat ceremony, the very first day of school and his hundred classmates at New York
    University. By just working a few hours per day, A few of our affiliate agents earn thousands per week.

  21. June 11th, 2019 at 19:54 | #21

    Passion tips dating Body wanting amateur teenage find ?
    Cute Speed people Sex to sites New nearly show regensburg
    relations Mate stream Palatinate Older Girl online best
    teens lovely Years old Milfs chick Popular Latina 37441}

  22. June 17th, 2019 at 15:30 | #22

    We’re a bunch of volunteers and opening a new scheme in our community.

    Your site offered us with useful information to work on. You’ve done
    a formidable activity and our whole neighborhood can be thankful to you.

  23. June 25th, 2019 at 16:22 | #23

    lnEdc2 Really enjoyed this blog article.Really thank you! Cool.

  24. July 8th, 2019 at 05:10 | #24

    Medidas X30 TINTORERIA 80 69 tournée 1 5 mil,trasp.15
    mill. Hospital General de Cal lado-ha Particular ofrece dos juglar nes.
    2 Botellas = $90 US ($45 US por ampolla) Suministro para 2
    meses T. Más comunicado en Av. Va- lenciu, 619,
    estlo.

  25. July 10th, 2019 at 01:49 | #25

    Regards for this post, I am a big big fan of this internet site would like to proceed updated.

  26. July 11th, 2019 at 17:22 | #26

    Great blog right here! Additionally your website a lot up fast!
    What host are you using? Can I am getting your affiliate hyperlink in your
    host? I want my site loaded up as quickly as yours lol

  27. July 16th, 2019 at 23:58 | #27

    Very good blog post. I certainly appreciate this website.

    Continue the good work!

  28. August 3rd, 2019 at 22:58 | #28

    ルイヴィトンスーパーコピー、国内口コミ高品質ルイヴィトン財布コピー激安販売優良店, luxurybrandsale2019経営の内容ルイヴィトン服コピー,ルイヴィトン コピー,chenine.comルイヴィトン帽子コピー,ベルト, マフラー,メンズパーカーコピー,メンズサンダルコピー,メンズ靴コピー,メンズTシャツ コピー,グッチコピー,グッチ服コピー,シュプリームTシャツコピー, アルマーニジーンズコピー,カナダグースコピー,ルイヴィトンtシャツコピー,ブランドスーツ.2019夏新品ブランドTシャツコピー,ブランドTシャツ.
    SUPREME コピー http://www.hxqiu.com/?brand-190.html

  29. August 5th, 2019 at 03:36 | #29

    I really liked your article.Really looking forward to read more. Fantastic.

  30. August 9th, 2019 at 20:03 | #30

    Wow. Looks like CloudFlare is down and it’s causing issues with Chaturbate, GFY, Disqus and other sites.
    This is interesting.

  31. August 12th, 2019 at 04:02 | #31

    There is noticeably a bundle to find out about this. I assume you made certain nice factors in options also.

  32. August 12th, 2019 at 18:28 | #32

    ブランド 服 偽物、N級も通販して, ブランド洋服コピー 品質がよい、価格が低い、 実物写真!モンクレール服スーパーコピーメンズ Tシャツ,ブランド服コピー激安通販,スーパーコピー 服高品質 ルイヴィトン服コピー,シャネル服 コピー,グッチ コピー,シュプリームTシャツコピー シュプリームコピー,シュプリーム服コピー,シュプリーム服激安,シュプリームTシャツコピー, シュプリーム洋服コピー,ブランド 服 スーパーコピー 通販.
    シュプリーム リュック 見分け http://www.amecioc.com/

Comment pages
1 13 14 15 435
  1. March 19th, 2014 at 11:13 | #1
  2. April 30th, 2014 at 01:00 | #2
  3. December 31st, 2018 at 08:24 | #3
  4. February 2nd, 2019 at 20:25 | #4