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. January 30th, 2016 at 09:59 | #1

    Everything is very open with a very clear explanation of
    the issues. It was truly informative. Your site is useful.
    Many thanks for sharing!

  2. January 30th, 2016 at 20:06 | #2

    Amateurs: who have not invested in binary choices in the earlier, and want
    to commence creating excellent rewarding investments.

  3. January 30th, 2016 at 20:55 | #3

    Hello and as a result welcome. The best name is truly Eulalia
    Bullard. His wife and him chose to exist in Michigan. One of her favorite likes and dislikes is
    in do martial art but she has been capturing on state of the art
    things newly. She is presently an administrator assistant with it’s whatever she
    really savor.

  4. January 31st, 2016 at 00:03 | #4

    Greate pieces. Keep writing such kind of
    info on your site. Im really impressed by your site.

    Hello there, You’ve performed an incredible job. I will certainly digg
    it and personally recommend to my friends. I am sure they will be benefited from this website.

  5. February 1st, 2016 at 09:23 | #5

    Hey There. I found your blog the use of msn. That is
    a very well written article. I will make sure to bookmark it and return to read more of
    your helpful info. Thanks for the post. I will certainly
    return.

  6. February 1st, 2016 at 11:40 | #6

    What’s Going down i am new to this, I stumbled upon this I’ve discovered It absolutely helpful and it has aided
    me out loads. I’m hoping to contribute & help different users like its
    helped me. Good job.

  7. February 1st, 2016 at 19:16 | #7

    The information and trading guides found on the internet site constitute the authors’ impression only.

  8. February 1st, 2016 at 20:05 | #8

    Quality posts is the important to interest the users to pay a visit the web page, that’s what
    this website is providing.

  9. February 1st, 2016 at 21:51 | #9

    I do trust all the concepts you’ve offered in your post.
    They are really convincing and can certainly work. Nonetheless,
    the posts are too short for beginners. May just you please lengthen them a little
    from next time? Thanks for the post.

  10. February 2nd, 2016 at 01:59 | #10

    It’s in fact very complex in this busy life to listen news on TV, thus
    I just use web for that reason, and get the most recent news.

  11. February 2nd, 2016 at 05:53 | #11

    Again, bake the salmon in the oven on high heat for about 10 to 12 minutes or until finished, just
    check to see if the middle is cooked through.
    You can find some common spices in all Indian cuisine recipes like turmeric, coriander seeds, fenugreek seeds, chili powder, mustard seeds, cumin seeds, and
    asafetida. Outside of Italy, the a lot of accepted dishes
    cover pastas, pizzas and Italian breads, but Italian recipes aswell cover assorted types of soups, salads and sausages which are awful accepted by gourmets, finer forth with a bottle of Italian wine.

  12. February 2nd, 2016 at 19:58 | #12

    In addition, it’s best to put up fliers inn local fabric shops and get to
    know the staff so that if someone asks, they will have the ability to refer you.

  13. February 3rd, 2016 at 01:39 | #13

    I just started out making use of this totally free provider to obtain followers on Instagram and I gotta say:
    It really is awesome!

  14. February 5th, 2016 at 18:07 | #14

    If you would like to grow your experience only keep visiting this web site and
    be updated with the most recent news update posted here.

  15. February 5th, 2016 at 19:15 | #15

    Nike’s JORDAN BRANDING in modern times officially
    contracted via Oklahoma municipality guardian George William Russell, brooke.
    One nearly all-perform animal golfers joined staying good up to both sides decided to JORDAN
    BUSINESS into indication much-name validation contract.

    Towards warning, brooke “is really pleasing, encouraged the man to partake of their JORDAN TYPE personal!” archangel JORDAN asserted, “your adjustment about Henry Russell at the residence and in off judge, and also the passion for court and also perseverance, and made jacob their JORDAN NAME representative with regard to. We actually understand possibilities the man brings to that infinite ability about volleyball furthermore desire.” Wiese brooke (6 tootsies, 4 in ., 187 fat) helped on magic set continue harden to
    stop into the finals, finally it was relocated to Oklahoma location magic professionals are likely to family post finals the first time, Badger State brooke besides depends on its certainly amazing functionality from inside the
    this year-a dozen each-have inactive team. Initially the energetic factor safeguard at the 2010-douze period
    of time averaged xxiii.6 steps (around the fourth), 5.5 prompts so
    4.6 rebounds. Initially the guardian was born or nurtured by La for those
    secondly spring repeatedly for its all-finest match,
    additionally obtained 22 details additionally all five
    rebounds. On behalf of the nation basketball team to sign up in 2012 Olympics by USA, Wisconsin brooke accomplished a delightful season. Whilst
    lone in north america five that their save position, he can nonetheless around frolic 8
    Olympic Games averaged 8.5 spots, 1.6 prompts or 1.6 rebounds.
    Most notable in your contest onto Nigeria, Wisconsin River brooke, to excellent efficiency donated twenty-one things to
    support the Country on the 156-seventy-three success more Nigeria,
    the set is set up on top of the Olympian Games, us states squad getting documentation. Wiese
    creek within higher educational institution related to Golden State, are generally (UCLA) classes,
    brings headed each UCLA bruins effective harden by North american a college education soccer ball
    nfl (NCAA), last four, he then accessed our own NBA TEAM then join the magic professionals.
    On educational institution, he’s got received
    the particular PAC – 10 league’s protective gamer of the season, together
    with its the bruins members taking part in duration longest register simply because 1979 (1318 additional minutes).

  16. February 6th, 2016 at 04:26 | #16

    If you really want to get to the bottom of things, go beyond the texts themselves and look at
    when your ex is sending them. A Chapter 7 filing will discharge
    ylur debts, except for alimony and child support,federally insuired student loans, criminal and
    traffic fines, state and federal taxes due withhin thhe last three years, and debts that resulted from willful malicious acts.
    Lying, when done for skiptracing purposes is calked pretexting.

  17. February 6th, 2016 at 06:12 | #17

    Hi there everyone, it’s my first go to see at this site, and
    post is really fruitful in favor of me, keep up posting these articles.

  18. February 6th, 2016 at 07:11 | #18

    Therefore, Wejee’s Esoteric Super Establishment, powered by Amazon.com,
    has magickal, metaphysical, recovery as well
    as spiritual books, New Age and also World songs,
    celtic as well as metaphysical fashion jewelry, as well as Organics
    to assist you by yourself magickal quest of psychic as well as spiritual makeover!

  19. February 6th, 2016 at 10:13 | #19

    Should you really have no option but to put the top of the mattress
    under a screen, only retain the window closed when you sleep.

  20. February 7th, 2016 at 01:50 | #20

    Many people have been making this mistake; buying cars that do not suit their needs and end
    up hating them or even selling them. Due to thick oil in cold weather, engines crank harder and
    this effectively increases the load on the battery.
    USB port enabled with data reader capability and mode.

  21. February 7th, 2016 at 11:46 | #21

    Remarkable! Its in fact amazing paragraph, I have got much clear idea regarding from this post.

  22. February 8th, 2016 at 00:26 | #22

    I used to be recommended this blog through my cousin.
    I am no longer certain whether this put
    up is written through him as nobody else recognize such detailed
    approximately my trouble. You’re wonderful! Thanks!

  23. February 8th, 2016 at 07:11 | #23

    Undeniably believe that which you stated. Your favourite
    reason appeared to be on the web the easiest thing to remember of.

    I say to you, I certainly get irked while other folks consider issues that
    they just do not recognize about. You managed to hit the nail
    upon the top and outlined out the entire thing with no need side-effects ,
    other folks can take a signal. Will likely be back to get more.
    Thanks

  24. February 8th, 2016 at 09:41 | #24

    I am regular reader, how are you everybody? This paragraph posted
    at this website is actually good.

  25. February 9th, 2016 at 02:24 | #25

    I absolutely love your blog and fund a lot of your post’s to be exactly what I’m looking for.
    Do you offer guest writers to write content inn your case?
    I wouldn’t mind publishing a post or elaborating on a lot of thhe subjects you write regarding
    here. Again, awesome weblog!

  26. February 9th, 2016 at 08:24 | #26

    Quality content is thhe important to interest tthe people to go tto see thee site,
    that’s what this wweb siite is providing.online
    writing consultancy (http://ashacobond.com/esblog)

  27. February 10th, 2016 at 05:04 | #27

    This is my first time visit at here and i am in fact pleassant to read all at single place.

  28. February 11th, 2016 at 06:24 | #28

    I’m impressed, I have to admit. Seldom do I come across a blog that’s both educative and engaging, and without a
    doubt, you’ve hit the nail on the head. The problem is an issue that
    too few folks are speaking intelligently about.

    Now i’m very happy that I stumbled across this during my
    search for something relating to this.

  29. February 11th, 2016 at 17:04 | #29

    Nice post. I learn something new and challenging on websites I stumbleupon every day.
    It’s always interesting to read articles from
    other writers and practice something from their sites.

  30. February 14th, 2016 at 19:30 | #30

    Latex Bands provide mild, medium to heavy resistance throughout training workout routines and are designed for increasing strengthening workout routines throughout rehab and sports training.

  31. February 14th, 2016 at 22:41 | #31

    It’s remarkable to pay a quick visit this site and reading thhe vies of all friends bout this post, while I am also
    eager of getting knowledge.

  32. February 15th, 2016 at 04:30 | #32

    Piece of writing writing is also a excitement, if you be familiar with afterward you can write if not it is complex to
    write.

  33. February 16th, 2016 at 03:19 | #33

    That the azure particle blue shade of which set of GS women paragraph
    ticket Jordan 6 to sum it u taken elegant dark footwear where clutches a close
    look, really decorate among tasty within your foot as well as depth, coin party SHOELACES
    while the decorate of some attribute qualifying measure extra express boldness.
    Snapping ahead speak:

  34. February 18th, 2016 at 00:30 | #34

    Pretty part of content. I simply stumbled upon your web site and in accession capital to say that I get in fact enjoyed account your blog posts.
    Anyway I’ll be subscribing in your feeds or even I fulfillment
    you get right of entry to consistently quickly.

  35. February 18th, 2016 at 01:13 | #35

    whoah this weblog is excellent i like studying your articles.
    Stay up the good work! You already know, lots of people
    are looking round for this info, you can aid them greatly.

  36. February 18th, 2016 at 04:40 | #36

    The Apple Watch features Force Touch, adding an additional force-sensitive sensory overlay on top of
    the ubiquitous multitouch screen.

  37. February 18th, 2016 at 13:41 | #37

    The student loan consolidation is your merging of several so to speak ., and is done
    to avoid wasting money on interest and with the convenience of one payment instead
    of several ones. The student loan consolidation is a mystery to a
    lot of college students in addition to graduates.

    The truth is, however, the consolidation loan could save you much money.
    Also, you can be worthwhile your debt faster so your college
    years will not be chasing you inside your retirement years.
    What relief loan consolidation provides students.
    There are numerous ways you can get a consolidation bank loan. You can obtain federal loans, a bank or perhaps a private lender, but no matter what you decide to pursue so; consolidation will employ a big effect on getting
    out of college under their own debt. The idea is so it
    takes only one payment every month, so you can pay your debt off faster along with lower monthly payments than you imagine normally.

  38. February 19th, 2016 at 00:39 | #38

    Un velo elliptique doit etre steady pour fournir des entrainements en toute
    serenite.

  39. February 19th, 2016 at 08:06 | #39

    I go to see daily some websites and websites to read articles,
    however this webpage gives feature based posts.

  40. February 20th, 2016 at 21:42 | #40

    Hello! Ijust wanted to ask if you ever have any trouble with hackers?
    My last blog (wordpress) was hacked and I ended up losing many months of hard
    work due to no back up. Do you have aany solutions to stop hackers?

  41. February 21st, 2016 at 19:15 | #41

    Great info. Lucky me I came across your website by accident (stumbleupon).

    I’ve book marked it for later!

  42. February 21st, 2016 at 19:58 | #42

    An outstanding share! I’ve just forwarded this
    onto a friend who has been conducting a little research on this.
    And he actually bought me lunch because I stumbled upon it for him…
    lol. So let me reword this…. Thanks for the meal!!
    But yeah, thanks for spending some time to talk about this subject here on your web page.

  43. February 21st, 2016 at 22:02 | #43

    Hello there, You have done an excellent job. I’ll certainly
    digg it and personally recommend to my friends. I’m
    sure they will be benefited from this site.

  44. February 21st, 2016 at 22:56 | #44

    Every weekend i used to visit this site, because i want enjoyment,
    since this this website conations actually fastidious funny data
    too.

  45. February 22nd, 2016 at 15:28 | #45

    It’s not my first time to visit this website, i am browsing this web page dailly and obtain nice facts from here all the time.

  46. February 22nd, 2016 at 22:12 | #46

    Hence, the best way to treat teen’s anxiety is with personal care, love and support.
    Another reason tension leads to extra fat happens to be increasing cortisol levels.
    But the moment we let anxiety take over us, we will cease to exist because it is our fear that will ruin our lives.

  47. February 23rd, 2016 at 07:24 | #47

    If you want to increase your familiarity just keep
    visiting this website and be updated with the latest gossip
    posted here.

  48. February 23rd, 2016 at 11:31 | #48

    Hi there to every one, it’s genuinely a pleasant for me
    to go to see this web page, it includes priceless Information.

  49. February 23rd, 2016 at 12:35 | #49

    Hi I am so excited I found your webpage, I really found you by error, while I was searching on Yahoo for something else, Anyways I am here now and would just like to say many thanks
    for a tremendous post and a all round exciting blog (I also love the theme/design), I don’t have time
    to browse it all at the moment but I have saved
    it and also added in your RSS feeds, so when I have time I will be back to read much more, Please do keep
    up the fantastic b.

  50. February 23rd, 2016 at 15:54 | #50

    It’s impressive that you are gettiing thoughts from this post
    as well as from our argument made here.

Comment pages
1 5 6 7 8 9 41 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
  5. January 25th, 2020 at 13:25 | #5
  6. March 28th, 2020 at 20:22 | #6
  7. March 30th, 2020 at 22:25 | #7
  8. July 2nd, 2020 at 04:14 | #8
  9. November 26th, 2023 at 17:35 | #9
  10. June 17th, 2024 at 01:33 | #10
  11. July 9th, 2024 at 09:52 | #11
  12. July 29th, 2024 at 03:40 | #12
  13. September 16th, 2024 at 11:50 | #13
  14. October 19th, 2024 at 15:31 | #14
  15. October 22nd, 2024 at 18:24 | #15
  16. October 24th, 2024 at 04:17 | #16
  17. November 9th, 2024 at 10:01 | #17
  18. November 9th, 2024 at 11:51 | #18
  19. November 11th, 2024 at 04:18 | #19
  20. November 11th, 2024 at 06:33 | #20
  21. November 11th, 2024 at 07:08 | #21
  22. November 12th, 2024 at 02:12 | #22
  23. November 13th, 2024 at 08:00 | #23
  24. November 14th, 2024 at 06:12 | #24
  25. November 14th, 2024 at 14:35 | #25
  26. November 14th, 2024 at 16:23 | #26
  27. November 15th, 2024 at 05:09 | #27
  28. November 15th, 2024 at 05:46 | #28
  29. November 15th, 2024 at 11:13 | #29
  30. November 15th, 2024 at 11:46 | #30
  31. November 15th, 2024 at 19:12 | #31
  32. November 17th, 2024 at 04:29 | #32
  33. November 18th, 2024 at 05:00 | #33
  34. November 19th, 2024 at 12:11 | #34
  35. November 19th, 2024 at 19:46 | #35