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 26th, 2025 at 05:26 | #1

    I really like your blog.. very nice colors & theme. Did you create this website yourself
    or did you hire someone to do it for you? Plz answer back as I’m looking to design my own blog
    and would like to find out where u got this from.
    appreciate it

  2. January 26th, 2025 at 05:56 | #2

    I know this web site provides quality depending articles and extra data,
    is there any other web site which offers these kinds of information in quality?

  3. January 26th, 2025 at 06:23 | #3

    Hello I am so excited I found your site, I really found you by error, while I was researching on Askjeeve for something else, Anyhow I am
    here now and would just like to say many thanks for a marvelous
    post and a all round enjoyable blog (I also love the theme/design), I don’t
    have time to go through 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 great job.

  4. January 26th, 2025 at 06:27 | #4

    I was able to find good information from your blog posts.

  5. January 26th, 2025 at 06:32 | #5

    Nightclub Promoter Tips 마사지

  6. January 26th, 2025 at 06:51 | #6

    I blog quite often and I seriously appreciate your
    information. This great article has truly peaked my interest.
    I’m going to take a note of your website and keep checking for new information about once per week.
    I subscribed to your RSS feed too.

  7. January 26th, 2025 at 06:52 | #7

    Article writing is also a excitement, if you be familiar with afterward you can write if not
    it is difficult to write.

  8. January 26th, 2025 at 06:52 | #8

    What’s up to every one, the contents present at this site are in fact amazing for people knowledge, well, keep up the good work fellows.

  9. January 26th, 2025 at 06:59 | #9

    Hello, i read your blog occasionally and i own a similar one and i
    was just wondering if you get a lot of spam feedback? If so how do
    you reduce it, any plugin or anything you can suggest?
    I get so much lately it’s driving me crazy so any support is
    very much appreciated.

  10. January 26th, 2025 at 06:59 | #10

    I will right away grab your rss as I can not
    to find your email subscription hyperlink or newsletter service.
    Do you’ve any? Kindly let me know so that I may subscribe.
    Thanks.

  11. January 26th, 2025 at 07:01 | #11

    I love what you guys are usually up too. This sort of
    clever work and exposure! Keep up the wonderful works guys I’ve added you guys to my personal blogroll.

  12. January 26th, 2025 at 07:09 | #12
  13. January 26th, 2025 at 07:16 | #13
  14. January 26th, 2025 at 07:18 | #14

    Howdy would you mind sharing which blog platform you’re working
    with? I’m looking to start my own blog in the near future
    but I’m having a tough time making a decision between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your layout seems different then most blogs and I’m looking for something unique.
    P.S Apologies for getting off-topic but I had to ask!

  15. January 26th, 2025 at 07:28 | #15

    I do not even know how I ended up here, but I thought this post was great.
    I don’t know who you are but certainly you are going to a
    famous blogger if you are not already ;) Cheers!

  16. January 26th, 2025 at 07:34 | #16

    Today, while I was at work, my cousin stole my iPad
    and tested to see if it can survive a 40 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 completely off topic but I had to share it with
    someone!

  17. January 26th, 2025 at 07:43 | #17

    Excellent hours, salaries, ond conditions, and perk.

  18. January 26th, 2025 at 07:43 | #18

    You can definitely see your expertise in the work you write.
    The world hopes for even more passionate writers such as you who aren’t afraid
    to say how they believe. At all times go after your heart.

  19. January 26th, 2025 at 07:46 | #19

    id=”firstHeading” class=”firstHeading mw-first-heading”>Search results

    Help

    English

    Tools

    Tools
    move to sidebar hide

    Actions

    General

  20. January 26th, 2025 at 07:49 | #20

    My family members all the time say that I am killing my
    time here at net, but I know I am getting experience daily by reading such fastidious posts.

  21. January 26th, 2025 at 08:01 | #21

    There is certainly a lot to know about this issue. I love all of the
    points you’ve made.

  22. January 26th, 2025 at 08:05 | #22

    obviously like your web-site but you have to test the spelling on quite a few of your posts.
    Several of them are rife with spelling issues and I in finding it very bothersome to tell
    the truth then again I will surely come again again.

  23. January 26th, 2025 at 08:08 | #23

    Common Involving Spa Treatments 서울유흥

  24. January 26th, 2025 at 08:10 | #24

    If you desire to take a great deal from this post
    then you have to apply these techniques to your won web site.

  25. January 26th, 2025 at 08:10 | #25

    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 website to come back down the road.
    Cheers

  26. January 26th, 2025 at 08:14 | #26

    Hey would you mind letting me know which hosting company you’re using?
    I’ve loaded your blog in 3 completely different browsers and I must say this
    blog loads a lot quicker then most. Can you recommend a
    good hosting provider at a honest price?
    Thanks a lot, I appreciate it!

  27. January 26th, 2025 at 08:21 | #27

    Attractive element of content. I just stumbled upon your weblog and in accession capital to claim that
    I get actually loved account your blog posts. Any way I’ll be subscribing for your augment or even I achievement you get entry to persistently quickly.

  28. January 26th, 2025 at 08:25 | #28

    Whoa! This blog looks just like my old one! It’s on a entirely different topic but it has pretty much the same layout and design. Great choice of colors!

  29. January 26th, 2025 at 08:26 | #29

    I’m gone to tell my little brother, that he should
    also pay a quick visit this website on regular basis to get updated from
    newest gossip.

  30. January 26th, 2025 at 08:27 | #30

    Very good info. Lucky me I came across your website by chance (stumbleupon).
    I have book-marked it for later!

  31. January 26th, 2025 at 08:34 | #31

    Magnificent goods from you, man. I’ve be aware your stuff prior to and
    you are just too wonderful. I actually like what you’ve received
    here, really like what you are saying and the way by which you are saying
    it. You are making it enjoyable and you still take care of
    to keep it sensible. I cant wait to read much more from you.
    That is really a terrific website.

  32. January 26th, 2025 at 08:35 | #32

    Pretty section of content. I just stumbled upon your weblog and in accession capital to claim that I get
    actually enjoyed account your weblog posts. Any way I will be subscribing on your feeds or even I success
    you access persistently fast.

  33. January 26th, 2025 at 08:48 | #33

    Very good blog! Do you have any tips and hints for aspiring writers?
    I’m planning to start my own website soon but I’m a little
    lost on everything. Would you suggest starting with
    a free platform like WordPress or go for a paid option?
    There are so many options out there that I’m totally overwhelmed ..
    Any ideas? Appreciate it!

  34. January 26th, 2025 at 08:50 | #34

    Oh my goodness! Impressive article dude! Thank you,
    However I am going through problems with your RSS.
    I don’t know the reason why I am unable to subscribe to
    it. Is there anybody having identical RSS problems?

    Anyone who knows the answer can you kindly respond?
    Thanx!!

  35. January 26th, 2025 at 08:53 | #35

    Appreciate the recommendation. Let me try it out.

  36. January 26th, 2025 at 08:54 | #36

    Oh my goodness! Impressive article dude! Thank you so much, However I am experiencing problems with
    your RSS. I don’t understand the reason why I am unable to subscribe to it.

    Is there anybody having identical RSS problems?
    Anyone that knows the answer will you kindly respond?
    Thanks!!

  37. January 26th, 2025 at 08:57 | #37
  38. January 26th, 2025 at 09:16 | #38

    Paragraph writing is also a excitement, if you know afterward you can write
    otherwise it is difficult to write.

  39. January 26th, 2025 at 09:20 | #39

    Good post! We are linking to this particularly great content on our site.

    Keep up the good writing.

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

    There is certainly a lot to know about this topic.
    I like all of the points you made.

  41. January 26th, 2025 at 09:30 | #41

    A Michigan man has created a rocking Christmas display at
    his home that lights up to the tune of hit songs.

    Footage shows Kyle Bostick’s Garden City property decked out
    in lights synced to Aaron Gage’s version of Deck The Halls being
    played to the tune of Black Sabbath’s heavy metal War Pigs.

    In the clip, candy canes are seen jumping like high hats,
    snow flakes flashing to the guitar riff and a computer-generated Christmas tree
    is belting out the words.

    The fascinating light show, produced by Kyle, is
    now in its second year, and features rock hits like War Pigs to give passersby ‘the wow
    factor’.

    The Bostick family’s display is put on for charity but has proved so popular they have won Garden City’s annual holiday lights contest.

    Kyle has run lights throughout the last two years including on 4th of July and Valentine’s Day after starting out last Halloween, his
    wife Christina’s favourite holiday.

    Footage shows Kyle Bostick’s Garden City, Michigan home covered in Christmas lights that are synced to
    Deck The Halls – sung to the tune of Black Sabbath’s War Pigs

    In the clip, candy canes are seen jumping like high hats, snow flakes flashing to the guitar
    riff and a computer-generated Christmas tree is belting out the words.

    RELATED ARTICLES

    Previous

    1

    2

    Next

    Grinch neighbour tries to get one of the best Christmas…
    Moment Santa Claus’ 1969 Volkswagen Beetle breaks down in…

    Christmas in The Big Apple 120 years ago: Black and white…

    Share this article

    Share

    ‘It started off with my wife wanting to do
    something crazy for Halloween, so last year went all out and put on a light
    show,’ Kyle explained.

    ‘We had no intentions of doing Christmas, but after we received messages
    from hundreds of people saying “I can’t wait to see what you do for Christmas,” we thought
    “ahh damn, now we’ve got to do something for Christmas”.’

    Kyle, who has a background in computers, says the show is very time-consuming to put
    on, as it takes ‘around 10 hours of programming for one minute of song’. 

    Kyle (left), who has a background in computers, says the show is
    very time-consuming to put on, as it takes ‘around 10 hours of programming for one minute of song’

    He has also set his dazzling lights to other hits, including Sia’s Candy Cane Lane, the Star Wars Theme, and Metallica’s Enter Sandman.

    During last year’s Christmas light show, the Bosticks raised over $4,
    500 for the Detroit Animal Welfare Group.

    Each new show now raises money for another charity.

    The family went a step further with a 4th of July show this year, organising an ice cream
    truck to stop for kids and even integrating fireworks into the performance.  

    MichiganChristmas

  42. January 26th, 2025 at 09:52 | #42

    Spa Therapy Op (Http://1Proff.Ru/)

  43. January 26th, 2025 at 10:07 | #43

    What i do not realize is in fact how you’re now not actually a lot more well-appreciated than you may be now.
    You are so intelligent. You realize therefore significantly relating to this topic, produced
    me individually consider it from so many varied angles.
    Its like men and women don’t seem to be interested unless it’s
    one thing to accomplish with Woman gaga! Your personal stuffs outstanding.
    Always maintain it up!

  44. January 26th, 2025 at 10:16 | #44

    Pretty section of content. I just stumbled upon your website and in accession capital to assert that
    I get in fact enjoyed account your blog posts.
    Anyway I’ll be subscribing to your augment and even I achievement you access consistently quickly.

  45. January 26th, 2025 at 10:23 | #45

    Fastidious replies in return of this query with genuine arguments and describing everything on the topic of that.

  46. January 26th, 2025 at 10:23 | #46

    Hey there! This is my first comment here so I just wanted to give a quick shout out and say I genuinely enjoy reading your posts.

    Can you recommend any other blogs/websites/forums that
    cover the same topics? Thanks a ton!

  47. January 26th, 2025 at 10:33 | #47

    No, we are not claiming this to you for the sake of recognition, these are 3 hours that you need to grab
    your client’s attention.

  48. January 26th, 2025 at 10:38 | #48

    Summer On A Shoestring – Five Methods To Save Money
    On Your Beach Trip 안마

  49. January 26th, 2025 at 11:03 | #49

    Hi it’s me, I am also visiting this site daily, this web site is truly fastidious and the people are actually sharing nice thoughts.

  50. January 26th, 2025 at 11:11 | #50

    excellent issues altogether, you just won a new reader.

    What might you recommend about your put up that you made some days in the
    past? Any positive?

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