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, 2025 at 03:57 | #1

    Hi Dear, are you truly visiting this web site regularly, if so after that
    you will without doubt get good experience.

  2. January 30th, 2025 at 04:03 | #2

    I would like to thank you for the efforts you’ve put in writing this
    site. I really hope to view the same high-grade blog posts
    by you in the future as well. In fact, your creative writing abilities has inspired me
    to get my very own website now ;)

  3. January 30th, 2025 at 04:09 | #3

    Thanks designed for sharing such a good thought, paragraph is pleasant,
    thats why i have read it completely

  4. January 30th, 2025 at 04:15 | #4

    Greate article. Keep writing such kind of info on your site.
    Im really impressed by your site.
    Hello there, You have done a great job. I’ll certainly digg it and in my opinion suggest
    to my friends. I am confident they will be benefited
    from this web site.

  5. January 30th, 2025 at 04:16 | #5

    Hey there! This post couldn’t be written any better!
    Reading this post reminds me of my old room mate! He always
    kept chatting about this. I will forward this page to him.

    Pretty sure he will have a good read. Thank you for sharing!

  6. January 30th, 2025 at 04:30 | #6

    Fine way of describing, and nice post to
    take information concerning my presentation subject, which i
    am going to convey in university.

  7. January 30th, 2025 at 04:30 | #7

    I’m not that much of a internet reader to be honest but your blogs really nice, keep it
    up! I’ll go ahead and bookmark your site to come back in the future.
    Cheers

  8. January 30th, 2025 at 04:32 | #8

    I used to be able to find good advice from your blog
    articles.

  9. January 30th, 2025 at 04:34 | #9

    Pay attention to their communication skills, patience, and ability
    to explain concepts clearly.

  10. January 30th, 2025 at 04:43 | #10

    I think the admin of this web page is truly working hard in support of his web page, since here every material is quality based
    information.

  11. January 30th, 2025 at 04:46 | #11

    Howdy, i read your blog from time to time and i own a similar one
    and i was just curious if you get a lot of spam comments?
    If so how do you protect against it, any plugin or anything you can recommend?
    I get so much lately it’s driving me crazy so any help is very much appreciated.

  12. January 30th, 2025 at 04:52 | #12

    Nice blog here! Also your site loads up fast! What web host are you using?
    Can I get your affiliate link to your host? I wish my website loaded up
    as quickly as yours lol

  13. January 30th, 2025 at 04:53 | #13

    When drafting the https://1wins-korean-bonus.com/, make sure that any films the problems are described in detail and without approval provide supporting evidence.

  14. January 30th, 2025 at 05:07 | #14

    Hi to all, the contents present at this website are actually
    awesome for people knowledge, well, keep up the nice work fellows.

  15. January 30th, 2025 at 05:10 | #15

    What i don’t realize is in reality how you are no longer actually a lot more well-preferred
    than you might be now. You’re very intelligent. You recognize thus considerably in the case
    of this matter, produced me in my opinion believe it
    from so many varied angles. Its like men and women aren’t fascinated unless it’s something to do with
    Girl gaga! Your personal stuffs excellent. All the time deal with it
    up!

  16. January 30th, 2025 at 05:19 | #16

    It’s impressive that you are getting ideas from this paragraph as well as from our dialogue made here.

  17. January 30th, 2025 at 05:20 | #17

    I am really delighted to glance at this weblog posts which consists of plenty of helpful information, thanks for
    providing these kinds of statistics.

  18. January 30th, 2025 at 05:30 | #18

    May I simply just say what a comfort to find somebody that genuinely knows
    what they’re talking about on the internet. You actually understand how to
    bring a problem to light and make it important.
    More and more people should look at this and understand this side of the story.
    It’s surprising you are not more popular given that you certainly have the gift.

  19. January 30th, 2025 at 05:36 | #19

    Simply desire to say your article is as amazing. The clarity in your post is just spectacular and i can assume you are
    an expert on this subject. Fine with your
    permission allow me to grab your feed to keep up to date with forthcoming post.

    Thanks a million and please carry on the rewarding work.

  20. January 30th, 2025 at 05:40 | #20

    Heya i’m for the first time here. I found this board and I find It truly useful &
    it helped me out a lot. I hope to present
    something back and help others like you aided me.

  21. January 30th, 2025 at 06:01 | #21

    This post presents clear idea for the new visitors of blogging, that truly how to do blogging.

  22. January 30th, 2025 at 06:02 | #22

    Spot on with this write-up, I honestly believe this site needs a lot more attention. I’ll probably be returning to
    see more, thanks for the advice!

  23. January 30th, 2025 at 06:20 | #23

    Heya i am for the primary time here. I came across this board and I to find It really helpful & it
    helped me out a lot. I hope to offer one thing back and help
    others such as you aided me.

  24. January 30th, 2025 at 06:38 | #24

    The goal of the journal is to provide scholarship that
    enables decision-makers to thoughtfully and intentionally engage in the decisions that shape this dynamic.

  25. January 30th, 2025 at 06:40 | #25

    Can I just say what a relief to discover somebody that really
    understands what they are discussing on the internet. You definitely realize how to bring a problem
    to light and make it important. A lot more people must check this out and
    understand this side of your story. I was surprised you’re not more popular because you most certainly have the gift.

  26. January 30th, 2025 at 06:40 | #26

    If some one wants expert view about running a blog then i recommend
    him/her to go to see this website, Keep up the good job.

  27. January 30th, 2025 at 06:41 | #27

    Good day! I could have sworn I’ve visited this blog before but after going through some
    of the articles I realized it’s new to me. Nonetheless, I’m definitely delighted I came across
    it and I’ll be bookmarking it and checking back often!

  28. January 30th, 2025 at 06:50 | #28

    For queries or advice about historical, social or cultural records
    relating to Northern Ireland, use the Public Record Office of
    Northern Ireland (PRONI) enquiry service.

  29. January 30th, 2025 at 06:52 | #29

    Since Twitter videos and GIFs are typically embedded within tweets, our
    process involves copying the tweet’s link and pasting it into
    the provided text box.

  30. January 30th, 2025 at 07:04 | #30

    Hi I am so excited I found your web site, I really found
    you by error, while I was browsing on Askjeeve for something
    else, Anyhow I am here now and would just like to say cheers for a tremendous post and a all round thrilling blog (I also love the theme/design), I don’t have time to read through it all at
    the moment but I have saved it and also added your RSS feeds, so
    when I have time I will be back to read a great deal more, Please do keep up the awesome work.

  31. January 30th, 2025 at 07:06 | #31
  32. January 30th, 2025 at 07:11 | #32

    Excellent article. Keep writing such kind of info on your
    blog. Im really impressed by it.
    Hello there, You’ve done a great job. I’ll definitely digg it and for my part recommend to my friends.
    I’m confident they’ll be benefited from this site.

  33. January 30th, 2025 at 07:12 | #33

    Hey there! I understand this is somewhat off-topic but I had to ask.
    Does operating a well-established website like yours take a massive
    amount work? I am completely new to blogging but I do
    write in my journal daily. I’d like to start a blog so I can easily share my experience and views online.
    Please let me know if you have any suggestions or tips for brand new aspiring blog owners.
    Thankyou!

  34. January 30th, 2025 at 07:20 | #34

    The other day, while I was at work, my sister stole my
    iPad and tested to see if it can survive a 25 foot drop, just so she can be a youtube sensation. My apple ipad is now broken and she has
    83 views. I know this is entirely off topic but I had to share it with someone!

  35. January 30th, 2025 at 07:36 | #35

    This article gives clear idea in favor of the
    new users of blogging, that really how to do running a blog.

  36. January 30th, 2025 at 07:42 | #36

    Good way of explaining, and good post to obtain data on the topic of
    my presentation subject, which i am going to convey in university.

  37. January 30th, 2025 at 07:44 | #37

    The Victorian Government acknowledges Aboriginal Traditional Owners of Country throughout Victoria and pays respect to their cultures and Elders past,
    present and emerging.

  38. January 30th, 2025 at 07:45 | #38

    Award-winning business management software for driving instructors and multi-car schools.

  39. January 30th, 2025 at 07:48 | #39

    Hey there I am so excited I found your web site, I really found you by error, while I was browsing on Askjeeve for something else, Anyhow I am here now and
    would just like to say thanks a lot for a fantastic post and
    a all round entertaining blog (I also love the theme/design), I
    don’t have time to read through it all at the minute but I have saved it and
    also added your RSS feeds, so when I have time I will be back to read more, Please do keep
    up the superb job.

  40. January 30th, 2025 at 07:53 | #40

    We’re a group of volunteers and starting a brand new scheme in our community.

    Your website provided us with useful information to
    work on. You’ve done an impressive activity and our whole neighborhood shall be
    thankful to you.

  41. January 30th, 2025 at 07:54 | #41

    Great site you have got here.. It’s hard to find high quality writing like yours nowadays.
    I honestly appreciate individuals like you! Take care!!

  42. January 30th, 2025 at 08:03 | #42

    When someone writes an post he/she maintains the idea of a
    user in his/her mind that how a user can be aware
    of it. So that’s why this paragraph is great. Thanks!

  43. January 30th, 2025 at 08:15 | #43

    If you wish for to grow your experience simply keep visiting this
    web page and be updated with the most recent news update
    posted here.

  44. January 30th, 2025 at 08:16 | #44

    No matter if some one searches for his essential thing,
    so he/she desires to be available that in detail, thus that thing is
    maintained over here.

  45. January 30th, 2025 at 08:22 | #45

    Hi there everybody, here every person is sharing
    these kinds of experience, therefore it’s nice to read this
    blog, and I used to visit this webpage daily.

  46. January 30th, 2025 at 08:28 | #46

    Your engagement with other artists can help build a supportive community around your music.

    SoundCloud’s metal category’s dominated by Quebec bands.

  47. January 30th, 2025 at 08:29 | #47

    Great blog you have here.. It’s hard to find high quality writing like yours nowadays.
    I seriously appreciate individuals like you! Take care!!

  48. January 30th, 2025 at 08:34 | #48

    There are various tools and websites that affirmation to permit
    users to view private Instagram profiles, but it’s important to gain access to these in the manner of
    caution. Many of these tools can be unreliable, may require personal information, or could violate Instagram’s terms
    of service. Additionally, using such tools can compromise your own security or guide to scams.
    The safest and most ethical exaggeration to view a private profile is to send a follow request directly to the user.
    Always prioritize privacy and reverence in your online interactions.

  49. January 30th, 2025 at 08:41 | #49

    It’s nearly impossible to find well-informed people about this subject, however, you sound
    like you know what you’re talking about! Thanks

  50. January 30th, 2025 at 08:43 | #50

    I could not refrain from commenting. Well written!

Comment pages
  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
  36. November 25th, 2024 at 21:09 | #36
  37. December 4th, 2024 at 00:57 | #37
  38. December 30th, 2024 at 18:41 | #38
  39. January 6th, 2025 at 21:21 | #39
  40. January 21st, 2025 at 19:12 | #40
  41. January 21st, 2025 at 19:27 | #41
  42. January 21st, 2025 at 21:18 | #42
  43. January 21st, 2025 at 21:20 | #43
  44. January 21st, 2025 at 21:34 | #44
  45. January 21st, 2025 at 22:46 | #45
  46. January 21st, 2025 at 23:10 | #46
  47. January 21st, 2025 at 23:38 | #47
  48. January 22nd, 2025 at 01:51 | #48
  49. January 22nd, 2025 at 03:06 | #49
  50. January 22nd, 2025 at 03:11 | #50
  51. January 22nd, 2025 at 05:36 | #51
  52. January 22nd, 2025 at 07:18 | #52
  53. January 22nd, 2025 at 08:20 | #53
  54. January 22nd, 2025 at 08:48 | #54
  55. January 22nd, 2025 at 08:49 | #55
  56. January 22nd, 2025 at 08:54 | #56
  57. January 22nd, 2025 at 09:01 | #57
  58. January 22nd, 2025 at 09:06 | #58
  59. January 22nd, 2025 at 09:45 | #59
  60. January 22nd, 2025 at 09:59 | #60
  61. January 22nd, 2025 at 10:50 | #61
  62. January 22nd, 2025 at 11:00 | #62
  63. January 22nd, 2025 at 11:35 | #63
  64. January 22nd, 2025 at 14:26 | #64
  65. January 22nd, 2025 at 15:11 | #65
  66. January 22nd, 2025 at 15:29 | #66