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 25th, 2025 at 17:32 | #1

    Best Sports Bar To Get Your Night Out With The Guys 부산유흥

  2. January 25th, 2025 at 17:40 | #2

    It’s an amazing paragraph for all the online people; they
    will get advantage from it I am sure.

  3. January 25th, 2025 at 17:46 | #3

    It is perfect time to make some plans for the future and it’s time to be happy.
    I have read this post and if I could I wish to suggest you some interesting things or advice.
    Maybe you can write next articles referring to this article.
    I wish to read more things about it!

  4. January 25th, 2025 at 17:50 | #4

    There are celebrity Instagram accounts, and then there is Miley Cyrus.

    The provocative 22-year-old uploaded yet another seemingly topless
    selfie on Wednesday, before showing off her somewhat unusual
    wig collection in several sultry shots.

    The singer appeared to be wearing just a purple hairpiece in the sexy shot, while pouting seductively into the camera.

    Scroll down for video 

    Looking for reactions: Miley Cyrus uploaded a seemingly topless snap on Wednesday,
    captioned ‘B free n every way’

    The snap, uploaded early Wednesday morning, was simply captioned:
    ‘B free n every way’.

    The We Can’t Stop hitmaker followed up with two further shots of her wearing colourful wigs,
    one in yellow and one in orange, asking her fans ‘What’s yo flava???
    Tell me whatzzzz yo flava???(sic)’

    Miley has been sharing her party lifestyle- and wig collection – with her fans in the past week,
    posting several snap of her antics. 

    For the fans: Miley posted two snaps of her wearing colourful wigs, asking her fans ‘What’s yo flava???
    Tell me whatzzzz yo flava???(sic)’

    Wild child: Miley Cyrus flashed her chest as she ripped open her
    white jumpsuit during a late night photo shoot on Saturday 

    In a photograph uploaded on Saturday night, the pop
    star exposed herself as she ripped open her white jumpsuit during a late night photo
    shoot.

    The Can’t Be Tamed hitmaker captioned it: ‘Saturday nights w @shantiombb turnted into photoshoot w @vijatm #smokebombs#kissingflamingoz #pigpig’

    She had photoshopped a pig mask onto her face as well as a pair
    of 3D glasses over her chest to somewhat protect her modesty.

    Animal lover: She posted this photo on Saturday, writing, ‘LOVE LOVE LOVE #pigpig #maryjane #bean #emu #happy’

    Miley donned a bright yellow wig, while giant blow-up flamingos and a plume of smoke
    were visible in the dark background.

    That day, the wild child also shared a snap surrounded
    by animals, including a pig, while clad in the same outfit.

    She wrote: ‘LOVE LOVE LOVE #pigpig #maryjane #bean#emu #happy’. 

    Showing off: Miley went for a risque look at the Adult Swim upfront party in NYC  May 13

    Miley CyrusInstagram

  5. January 25th, 2025 at 17:52 | #5

    Great post. I used to be checking constantly this weblog and I’m inspired!

    Extremely helpful info specially the remaining part :
    ) I take care of such information much. I used to be seeking this certain information for a
    long time. Thanks and best of luck.

  6. January 25th, 2025 at 17:55 | #6

    Thanks a lot for sharing this with all folks you really understand what you are talking approximately!

    Bookmarked. Please additionally consult with my website =).
    We could have a link trade contract between us

  7. January 25th, 2025 at 17:55 | #7

    As the admin of this web site is working, no question very quickly it will
    be renowned, due to its quality contents.

  8. January 25th, 2025 at 17:59 | #8

    Keep on working, great job!

  9. January 25th, 2025 at 18:03 | #9

    If some one needs to be updated with newest technologies therefore he must be
    pay a quick visit this site and be up to date daily.

  10. January 25th, 2025 at 18:03 | #10

    Aw, this was a very good post. Finding the time and actual effort to make a superb article… but what can I say… I put things off
    a whole lot and never manage to get nearly anything done.

  11. January 25th, 2025 at 18:04 | #11

    The 5 Ingredients With Regard To An Exciting Children’s Birthday Party 부산유흥

  12. January 25th, 2025 at 18:04 | #12

    Thanks for finally talking about >Flex 4: Changing the “displayAsPassword” default character | eonflex.com <Loved it!

  13. January 25th, 2025 at 18:14 | #13

    Thanks for sharing such a good thinking,
    paragraph is pleasant, thats why i have read it fully

  14. January 25th, 2025 at 18:17 | #14

    Neat blog! Is your theme custom made or did you download
    it from somewhere? A theme like yours with a
    few simple tweeks would really make my blog jump out. Please let
    me know where you got your theme. Many thanks

  15. January 25th, 2025 at 18:21 | #15

    Hello there, I discovered your web site by way of Google at the same time as searching for a similar
    topic, your site got here up, it seems good.

    I’ve bookmarked it in my google bookmarks.
    Hi there, just turned into aware of your blog through Google, and located that
    it’s really informative. I’m going to be careful for brussels.
    I’ll be grateful when you continue this in future. A lot of other people will likely
    be benefited out of your writing. Cheers!

  16. January 25th, 2025 at 18:23 | #16

    Hi there, I enjoy reading through your post. I like to write a little comment
    to support you.

  17. January 25th, 2025 at 18:32 | #17

    After I originally commented I appear to have clicked on the -Notify me when new comments
    are added- checkbox and now each time a comment is added I get four emails with the exact same comment.
    There has to be an easy method you can remove me from that service?
    Appreciate it!

  18. January 25th, 2025 at 18:33 | #18

    Hello! I just wanted to ask if you ever have any issues with hackers?

    My last blog (wordpress) was hacked and I ended up losing
    months of hard work due to no back up. Do you have any methods to protect against hackers?

  19. January 25th, 2025 at 18:34 | #19

    I all the time used to read paragraph in news papers but now as I am
    a user of internet therefore from now I am using net for posts, thanks to web.

  20. January 25th, 2025 at 18:58 | #20

    Hey I am so grateful I found your blog, I really found you by error, while I was browsing on Digg for something else, Regardless I am here now and would just like
    to say thank you for a marvelous post and a all
    round thrilling blog (I also love the theme/design),
    I don’t have time to browse it all at the moment but I have book-marked it and also added your
    RSS feeds, so when I have time I will be back to read much more, Please do keep up the fantastic work.

  21. January 25th, 2025 at 19:12 | #21

    Thank you for the auspicious writeup. It in fact was a amusement account it.
    Look advanced to far added agreeable from you!

    By the way, how could we communicate?

  22. January 25th, 2025 at 19:12 | #22

    I am really thankful to the holder of this web
    page who has shared this great piece of writing at at
    this time.

  23. January 25th, 2025 at 19:22 | #23

    This is very interesting, You’re a very skilled
    blogger. I have joined your feed and look forward to seeking more of your magnificent post.
    Also, I’ve shared your website in my social networks!

  24. January 25th, 2025 at 19:23 | #24

    Wow, awesome blog layout! How long have you been blogging
    for? you make blogging look easy. The overall look of your website is wonderful, let alone the content!

  25. January 25th, 2025 at 19:31 | #25

    I’m not sure exactly why but this web site is loading incredibly slow for me.
    Is anyone else having this issue or is it a problem on my end?

    I’ll check back later and see if the problem still exists.

  26. January 25th, 2025 at 19:33 | #26

    If some one desires expert view on the topic of blogging then i propose
    him/her to visit this blog, Keep up the pleasant job.

  27. January 25th, 2025 at 19:39 | #27

    We honour and value this land and will certainly look after country as contemporary custodians.

  28. January 25th, 2025 at 19:42 | #28

    What’s up, I read your new stuff regularly. Your humoristic style is witty, keep up the good work!

  29. January 25th, 2025 at 19:43 | #29

    It’s an remarkable post in support of all the web viewers; they will get benefit from it I am sure.

  30. January 25th, 2025 at 19:44 | #30

    I truly love your blog.. Great colors & theme. Did you develop
    this amazing site yourself? Please reply back as I’m hoping to
    create my own personal website and want to find
    out where you got this from or exactly what the theme is called.
    Thanks!

  31. January 25th, 2025 at 19:47 | #31

    Amazing things here. I am very satisfied to see your post.

    Thanks a lot and I’m taking a look forward to touch you.
    Will you kindly drop me a e-mail?

  32. January 25th, 2025 at 19:50 | #32

    Hello i am kavin, its my first time to commenting anyplace,
    when i read this article i thought i could also make comment
    due to this sensible post.

  33. January 25th, 2025 at 19:51 | #33

    Amaze Your Guest By Using A Truly Unique Wedding Reception 하이오피사이트

  34. January 25th, 2025 at 20:00 | #34

    Write more, thats all I have to say. Literally,
    it seems as though you relied on the video to
    make your point. You obviously know what youre talking about, why throw away your intelligence on just posting
    videos to your site when you could be giving us something enlightening to read?

  35. January 25th, 2025 at 20:03 | #35

    I have been browsing on-line more than three hours as
    of late, but I by no means discovered any fascinating article like yours.
    It is pretty worth sufficient for me. In my view, if all webmasters and bloggers made just right content material as
    you probably did, the web might be much more useful than ever before.

  36. January 25th, 2025 at 20:03 | #36

    My brother suggested I may like this web site. He was once
    entirely right. This submit actually made my day.
    You cann’t imagine just how so much time I had spent for this info!
    Thank you!

  37. January 25th, 2025 at 20:07 | #37

    Undeniably believe that which you stated. Your favourite reason appeared to be on the web the simplest
    thing to consider of. I say to you, I definitely get irked whilst other folks think about issues that they
    just do not know about. You controlled to hit the nail upon the top as neatly as outlined
    out the whole thing with no need side effect , other folks
    could take a signal. Will likely be back to get more.
    Thank you

  38. January 25th, 2025 at 20:12 | #38

    This piece of writing gives clear idea for the new people of
    blogging, that really how to do blogging and site-building.

  39. January 25th, 2025 at 20:25 | #39

    The French Open is likely one of the four Grand Slam tournaments in skilled tennis.
    Additionally it is recognized as the Roland-Garros.

    The French Open is the second of the four Grand Slam tournaments.
    It begins in late May, and is another alternative for fans to wager.
    How Does the French Open Work?

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

    For the modern world, a consultation with a wide asset unambiguously defines each participant as capable of making his own decisions regarding the training system that meets the pressing needs. And many well -known personalities cover extremely interesting features of the picture as a whole, but specific conclusions, of course, are indicated as applicants for the role of key factors.

  41. January 25th, 2025 at 20:31 | #41

    Thanks for sharing your thoughts. I truly appreciate your efforts and I am waiting for your further post thank you
    once again.

  42. January 25th, 2025 at 20:38 | #42

    What’s up, I log on to your new stuff like every week.
    Your writing style is awesome, keep it up!

  43. January 25th, 2025 at 20:44 | #43

    I was wondering if you ever considered changing the
    layout of your website? Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people could connect with it better.
    Youve got an awful lot of text for only having 1 or 2 images.
    Maybe you could space it out better?

  44. January 25th, 2025 at 20:45 | #44

    You should take part in a contest for one of the finest blogs
    online. I will highly recommend this web site!

  45. January 25th, 2025 at 20:46 | #45
  46. January 25th, 2025 at 20:58 | #46

    Thank you for the good writeup. It in fact was a amusement account it.
    Look advanced to far added agreeable from you! By the way,
    how could we communicate?

  47. January 25th, 2025 at 21:07 | #47

    during writing this review about https://lfad.ly/wp/2025/01/22/casino-slotssafari-uk-the-ultimate-guide-to-online-2/, we
    could not find any relevant material about {the presence of such a function in {casino|online casino}.

  48. January 25th, 2025 at 21:10 | #48

    Night Club 압구정오피

  49. January 25th, 2025 at 21:26 | #49

    The other day, while I was at work, my cousin stole
    my iphone and tested to see if it can survive a 40 foot drop,
    just so she can be a youtube sensation. My iPad is now destroyed and she has 83 views.

    I know this is entirely off topic but I had to share it with someone!

  50. January 25th, 2025 at 21:55 | #50

    Ripple Massage – Baby And Infant Massage 부산유흥

Comment pages
1 135 136 137 138 139 142 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
  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