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 27th, 2025 at 02:23 | #1

    I do consider all the ideas you have presented in your post.
    They’re really convincing and will certainly work.
    Nonetheless, the posts are very short for newbies.
    May you please lengthen them a little from subsequent time?
    Thanks for the post.

  2. January 27th, 2025 at 02:27 | #2

    After going over a number of the blog posts on your website, I really like your way of writing a
    blog. I saved it to my bookmark site list and will be checking back soon. Please check out my website as well
    and let me know what you think.

  3. January 27th, 2025 at 03:27 | #3

    I always used to study paragraph in news papers but now as I am a user of web so from now I am using net for posts,
    thanks to web.

  4. January 27th, 2025 at 03:42 | #4

    Good content, Kudos.

  5. January 27th, 2025 at 03:54 | #5

    Reenergized
    4434 Pacifjc Coast Hwy,
    Ꮮong Beach, CᎪ 90804, United States
    562-689-9888
    Braijn tapp regiews test

  6. January 27th, 2025 at 04:07 | #6

    Fine Dining 대구유흥 – http://Www.Aurens.or.jp -

  7. January 27th, 2025 at 04:23 | #7

    Thanks for sharing such a fastidious idea, article is
    fastidious, thats why i have read it fully

  8. January 27th, 2025 at 04:29 | #8

    Spa Therapy 하이오피사이트

  9. January 27th, 2025 at 04:38 | #9

    Great info. Lucky me I recently found your site by chance (stumbleupon).
    I’ve saved as a favorite for later!

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

    Amazing! Its truly awesome paragraph, I have got much clear
    idea about from this post.

  11. January 27th, 2025 at 05:00 | #11

    Best 7 Android Apps For Entertainment HiOP

  12. January 27th, 2025 at 05:11 | #12

    Cocktail Bar 역삼오피

  13. January 27th, 2025 at 05:21 | #13

    Karaoke System For Home Everybody Can Enjoy 하이오피사이트

  14. January 27th, 2025 at 05:29 | #14

    Don’t Get Burned By Unsecured Poor Credit Loans 다바오 kyc, http://www.bnaibrith.pe,

  15. January 27th, 2025 at 05:44 | #15

    How Develop A Powerful Network By Starting Ones Networking Group OP

  16. January 27th, 2025 at 05:51 | #16

    Fun Baby Shower Games For Everyone To Enjoy 하이오피

  17. January 27th, 2025 at 05:52 | #17

    Night Spa 제주유흥 – Florene,

  18. January 27th, 2025 at 06:00 | #18

    Wonderful goods from you, man. I have understand your stuff previous to and
    you’re just too excellent. I really like what you’ve acquired here,
    really like what you’re stating and the way in which you say it.
    You make it entertaining and you still take care of to
    keep it sensible. I cant wait to read far more from you.
    This is really a wonderful web site.

  19. January 27th, 2025 at 06:07 | #19

    Top 6 Business Success Strategies 하이오피사이트

  20. January 27th, 2025 at 06:24 | #20

    Thank you, Awesome stuff.

  21. January 27th, 2025 at 06:24 | #21

    В письмах можно генерировать динамический контент при помощи шаблонов и подставленных https://galagrigoreva.ru/ информации из crm.

  22. January 27th, 2025 at 06:25 | #22

    Why visitors still make use of to read news papers when in this technological globe everything is available on net?

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

    Right here is the perfect webpage for everyone who wants to find
    out about this topic. You realize a whole lot its almost hard to argue with you (not that
    I actually would want to…HaHa). You certainly put a brand
    new spin on a subject that’s been written about for decades.
    Great stuff, just wonderful!

  24. January 27th, 2025 at 06:28 | #24

    Simple Stress Reduction Techniques Should Do In 5 Minutes 출장

  25. January 27th, 2025 at 06:32 | #25

    Remarkable! Its actually amazing piece of writing, I have got much clear
    idea concerning from this paragraph.

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

    Pub Crawl 하이오피주소

  27. January 27th, 2025 at 07:33 | #27

    I think this is among the so much significant info for me.
    And i’m glad reading your article. But want to statement
    on few basic things, The web site taste is wonderful, the articles is truly excellent :
    D. Good activity, cheers

  28. January 27th, 2025 at 07:34 | #28

    I think the admin of this site is really working
    hard in support of his web site, as here every stuff is
    quality based information.

  29. January 27th, 2025 at 07:49 | #29

    If you would like to increase your experience just keep visiting this web page
    and be updated with the latest information posted here.

  30. January 27th, 2025 at 07:56 | #30

    It’s a pity you don’t have a donate button! I’d most certainly donate to this excellent blog!
    I suppose for now i’ll settle for book-marking and adding your RSS feed to my Google account.
    I look forward to new updates and will talk about this blog with my
    Facebook group. Chat soon!

  31. January 27th, 2025 at 07:57 | #31

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

  32. January 27th, 2025 at 08:07 | #32

    Они вовлечены буква столкновение всего лишь в период обзорного совещания завались спринту (Sprint Review).

  33. January 27th, 2025 at 08:18 | #33

    Xpert Foundation Repair
    Río Grande Valley, TX 78582, United States
    9562653062
    wood beam mantel installation – https://fpm9j.mssg.me -

  34. January 27th, 2025 at 08:29 | #34

    I love what you guys are up too. This sort of clever work and
    coverage! Keep up the awesome works guys I’ve incorporated
    you guys to my own blogroll.

  35. January 27th, 2025 at 08:40 | #35

    Hello my friend! I want to say that this post is amazing, nice
    written and include approximately all vital infos.

    I would like to peer more posts like this .

  36. January 27th, 2025 at 08:47 | #36

    If you wish for to take much from this post then you have to apply these methods to your won web site.

    my website – https://Www.dubaitowels.com/

  37. January 27th, 2025 at 08:48 | #37

    You actually expressed that really well.

    Also visit my blog; http://git.bkdo.net/rebeccaabc2013

  38. January 27th, 2025 at 09:00 | #38

    What’s up colleagues, how is everything, and what you wish for to say concerning this paragraph, in my view its actually awesome in favor of me.

  39. January 27th, 2025 at 09:06 | #39

    What a data of un-ambiguity and preserveness of valuable knowledge regarding
    unpredicted emotions.

  40. January 27th, 2025 at 09:38 | #40

    Greate article. Keep posting such kind of info on your page.

    Im really impressed by it.
    Hey there, You’ve performed a great job.
    I will certainly digg it and in my view recommend to my friends.
    I’m confident they’ll be benefited from this site.

  41. January 27th, 2025 at 09:49 | #41

    you are in point of fact a just right webmaster.
    The website loading velocity is incredible. It kind of feels that
    you’re doing any unique trick. Also, The contents are masterwork.

    you’ve done a magnificent process on this topic!

  42. January 27th, 2025 at 09:53 | #42

    Much appreciated! I recognize this update on the latest vape law
    news!

  43. January 27th, 2025 at 10:22 | #43

    Live Music 역삼오피 (Ujikuntoki.com)

  44. January 27th, 2025 at 10:25 | #44

    If you want to improve your familiarity only keep visiting this website and be updated with
    the most recent news posted here.

  45. January 27th, 2025 at 10:31 | #45

    Wow! At last I got a website from where I can in fact take
    valuable data concerning my study and knowledge.

  46. January 27th, 2025 at 10:32 | #46

    Hi there to all, the contents present at this web page are genuinely awesome for people knowledge, well, keep up the good work fellows.

Comment pages
1 140 141 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