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

    Ten Strategies To Manage A Rapidly Growing Business 부달최신주소

  2. January 18th, 2025 at 15:28 | #2

    Highly descriptive blog, I loved that a lot. Will there be a part 2?

  3. January 18th, 2025 at 15:32 | #3

    Entertainment 하이오피사이트

  4. January 18th, 2025 at 15:34 | #4

    Party Scene 아이러브밤

  5. January 18th, 2025 at 15:45 | #5

    Wow, this article is fastidious, my younger sister is
    analyzing such things, therefore I am going to convey
    her.

  6. January 18th, 2025 at 16:08 | #6

    This post will help the internet people for building up new webpage or
    even a weblog from start to end.

  7. January 18th, 2025 at 16:10 | #7

    Bad Credit? Try No Credit Check Needed Payday Loans davao

  8. January 18th, 2025 at 16:21 | #8

    Running A Business In These Uncertain Times 오피커뮤니티 (a2zseoarticles.com)

  9. January 18th, 2025 at 16:27 | #9

    Mindfulness Help In Poker – How To Have A Real Winner At Poker 에볼루션 시스템배팅

  10. January 18th, 2025 at 16:32 | #10

    Tremendous things here. I’m very happy to peer your post.
    Thank you a lot and I’m having a look ahead to contact you.
    Will you kindly drop me a mail?

  11. January 18th, 2025 at 16:32 | #11

    Awesome blog you have here but I was wondering if you knew of any community forums that cover the same topics discussed
    in this article? I’d really love to be a part of community where I can get comments from other knowledgeable people
    that share the same interest. If you have any recommendations,
    please let me know. Cheers!

  12. January 18th, 2025 at 16:34 | #12

    My programmer is trying to persuade me to move to .net from PHP.
    I have always disliked the idea because of the costs.

    But he’s tryiong none the less. I’ve been using WordPress on several websites for about
    a year and am worried about switching to another platform.
    I have heard fantastic things about blogengine.net. Is there a way I can transfer all my wordpress
    content into it? Any help would be really appreciated!

  13. January 18th, 2025 at 16:36 | #13

    What’s up, after reading this remarkable article i am
    too cheerful to share my experience here with friends.

  14. January 18th, 2025 at 16:36 | #14

    Each of us understands the obvious thing: a high -quality prototype of the future project requires determining and clarifying the withdrawal of current assets. Preliminary conclusions are disappointing: the further development of various forms of activity entails the process of implementing and modernizing favorable prospects.

  15. January 18th, 2025 at 16:38 | #15

    I like the valuable info you provide in your articles.
    I’ll bookmark your weblog and check again here frequently.
    I am quite certain I will learn a lot of new stuff right here!
    Best of luck for the next!

  16. January 18th, 2025 at 16:39 | #16

    Hey there would you mind sharing which blog platform you’re using?
    I’m looking to start my own blog in the near future but I’m
    having a hard 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!

  17. January 18th, 2025 at 16:44 | #17

    Greetings! I’ve been reading your weblog for a while now and
    finally got the courage to go ahead and give you a shout out from Atascocita Texas!
    Just wanted to mention keep up the great job!

  18. January 18th, 2025 at 16:50 | #18

    I love your blog.. very nice colors & theme. Did you design this website yourself or did you hire someone to do it for you?
    Plz answer back as I’m looking to construct my own blog and would like to know where u got
    this from. thanks a lot

  19. January 18th, 2025 at 16:53 | #19

    “This wage gap is robbing ladies of their capability to weather the financial storm Covid caused,” Tucker says.

    Feel free to surf to my blog … https://www.americansecuritypaper.com/%EC%97%AC%EC%84%B1%EC%9D%84-%EC%9C%84%ED%95%9C-%EC%9B%A8%EC%9D%B4%ED%84%B0%EC%95%8C%EB%B0%94-%EA%B8%B0%ED%9A%8C%EB%A5%BC-%EC%9E%A1%EB%8A%94-%EB%B2%95/

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

    Howdy! This post could not be written much better! Looking at this post reminds me
    of my previous roommate! He always kept preaching about this.

    I most certainly will forward this post to him. Fairly certain he will have
    a good read. I appreciate you for sharing!

  21. January 18th, 2025 at 17:01 | #21

    Asking questions are really good thing if you
    are not understanding something fully, but this paragraph presents nice
    understanding even.

  22. January 18th, 2025 at 17:07 | #22

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

  23. January 18th, 2025 at 17:08 | #23

    I have been browsing online more than 4 hours today, yet I never found any interesting article like yours.
    It is pretty worth enough for me. In my opinion, if
    all web owners and bloggers made good content as you did, the
    internet will be a lot more useful than ever before.

  24. January 18th, 2025 at 17:10 | #24

    Golf Gps Or Laser Rangefinder? 하이오피주소

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

    Full Service Spa 하이오피사이트

  26. January 18th, 2025 at 17:36 | #26

    Enjoy The Vibrant Nightlife In Bangkok 테라피

  27. January 18th, 2025 at 17:36 | #27

    Credit Card Debt Bailout – How Consumers Can Eliminate Consumer Credit Card Debt By 50% 다바오 흡연 가능 호텔

  28. January 18th, 2025 at 17:41 | #28

    It’s hard to come by knowledgeable people in this particular topic,
    but you seem like you know what you’re talking about! Thanks

  29. January 18th, 2025 at 17:45 | #29

    3 Easy Cash-Flow Ways To Jumpstart Business 오피

  30. January 18th, 2025 at 17:53 | #30

    Debit Cards And Debit Card Fraud 다바오 ktv

  31. January 18th, 2025 at 17:59 | #31

    Mobile Apps For Business – The Actual Is The Actual World Push HiOP

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

    Exclusive Nightlife 광주유흥

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

    Small Business Challenges – How To Overpower The The Fear Of Selling 밤문화
    (Annabelle)

  34. January 18th, 2025 at 18:35 | #34

    Asking questions are really fastidious thing if you are not
    understanding anything completely, however this post provides nice understanding
    yet.

  35. January 18th, 2025 at 18:35 | #35

    Way cool! Some very valid points! I appreciate you penning this post
    plus the rest of the site is also very good.

  36. January 18th, 2025 at 18:38 | #36

    Strip Club 하이오피주소

  37. January 18th, 2025 at 18:50 | #37

    Miami Beaches – Locations For Party All Night Atmosphere! 부달최신주소

  38. January 18th, 2025 at 19:02 | #38

    Singles Bar 오피사이트

  39. January 18th, 2025 at 19:04 | #39

    Feeling Bored To Tears? Here Are 10 Nights Out That Offer Plenty Of Entertainment 부산달리기 (Lenard)

  40. January 18th, 2025 at 19:04 | #40

    I like the valuable info you provide in your articles. I will bookmark your weblog and check again here regularly.
    I’m quite sure I’ll learn plenty of new stuff right here!

    Best of luck for the next!

  41. January 18th, 2025 at 19:21 | #41

    Why You Shouldn’t Take Internal Flights Interior Of Your Uk 광주알밤

  42. January 18th, 2025 at 19:31 | #42

    I simply could not depart your website before suggesting that I really loved the usual info a
    person supply to your visitors? Is going to be back
    incessantly in order to investigate cross-check new posts

  43. January 18th, 2025 at 19:37 | #43

    Top 5 Ways To Lower Cruise Spa Services OP

  44. January 18th, 2025 at 19:40 | #44

    I like the helpful information you provide in your articles.
    I’ll bookmark your blog and check again here frequently.
    I am quite certain I will learn lots of new stuff right here!
    Good luck for the next!

  45. January 18th, 2025 at 19:49 | #45

    Thank you for sharing your info. I truly appreciate your efforts and
    I will be waiting for your further post thanks once again.

  46. January 18th, 2025 at 19:58 | #46

    Chill Zone budal

  47. January 18th, 2025 at 20:04 | #47

    That is a great tip particularly to those fresh to the blogosphere.

    Simple but very accurate info… Many thanks for sharing this one.
    A must read post!

  48. January 18th, 2025 at 20:06 | #48

    VIP Lounge HiOP

  49. January 18th, 2025 at 20:10 | #49

    Small Businesses – Profitable Small Business Concepts In 2009 하이오피사이트

  50. January 18th, 2025 at 20:12 | #50

    New Orleans Strip Club – The To Make Memories 하이오피사이트

Comment pages
1 108 109 110 111 112 153 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