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

    I was curious if you ever thought of changing the layout
    of your blog? 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?

  2. January 8th, 2025 at 10:33 | #2

    There are various tools and websites that claim to allow users to
    view private Instagram profiles, but it’s important to log on these taking into consideration 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 pretentiousness to view
    a private profile is to send a follow request directly to
    the user. Always prioritize privacy and reverence in your online interactions.

  3. January 8th, 2025 at 10:43 | #3

    Chill Zone 제주유흥

  4. January 8th, 2025 at 10:44 | #4

    Wow! At last I got a webpage from where I be capable of genuinely obtain valuable information concerning my study and knowledge.

  5. January 8th, 2025 at 10:47 | #5

    Thanks for another informative blog. The place else could I get that type of information written in such a
    perfect means? I’ve a mission that I am simply now running on, and
    I’ve been on the glance out for such info.

  6. January 8th, 2025 at 10:48 | #6

    Bar Hopping 하이오피주소

  7. January 8th, 2025 at 10:52 | #7

    Thanks a lot for sharing this with all people you actually recognize
    what you’re talking approximately! Bookmarked. Kindly additionally discuss with my web site =).

    We can have a link alternate contract among us

  8. January 8th, 2025 at 11:02 | #8

    Incredible points. Great arguments. Keep up the amazing work.

  9. January 8th, 2025 at 11:05 | #9

    Hi! Someone in my Myspace group shared this website with us so I came
    to check it out. I’m definitely enjoying the information. I’m
    book-marking and will be tweeting this to my followers!
    Terrific blog and brilliant style and design.

  10. January 8th, 2025 at 11:20 | #10

    Countries in which located servers are Anguilla, Albania, Angola, Argentina,
    Australia, Brazil, Canada, Chile, Dominican Republic, France, Hungary,
    Korea, Moldova, Mexico, New Zealand, Peru, Philippines,
    Poland, Russia, El Salvador, Thailand,.

  11. January 8th, 2025 at 11:21 | #11

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

  12. January 8th, 2025 at 11:37 | #12

    VIP Service HiOP

  13. January 8th, 2025 at 11:44 | #13

    Poker Rules – Is What Makes The Game Easy 다바오 설치

  14. January 8th, 2025 at 12:00 | #14

    Thank you for sharing your thoughts. I really appreciate your efforts and I will be waiting for your next post thanks once again.

  15. January 8th, 2025 at 12:14 | #15

    bokep terbaik sma toket gede menyala banget

  16. January 8th, 2025 at 12:17 | #16

    I like the valuable info you supply to your articles.
    I will bookmark your weblog and check once more right here frequently.

    I am slightly certain I’ll learn a lot of new stuff
    proper here! Best of luck for the next!

  17. January 8th, 2025 at 12:18 | #17

    What’s up everyone, it’s my first go to see at this web site, and paragraph is truly fruitful in support of me, keep up posting these articles.

  18. January 8th, 2025 at 12:22 | #18

    Payday Loan Company Default Carries Less Fallout Than From Your Own Friend 다바오
    포커 모바일 설치

  19. January 8th, 2025 at 12:53 | #19

    Kansas City commercial real estate broker

    Reco Real Estate Advisors: Premier Hotel Brokers

    Ϝօr top hotel brokerage services, tᥙrn to Reco Real Estate Advisors
    іn the Midwest.

  20. January 8th, 2025 at 13:08 | #20

    Karaoke Bar 하이오피사이트

  21. January 8th, 2025 at 13:08 | #21

    Wonderful goods from you, man. I’ve understand your
    stuff previous to and you’re just extremely fantastic.
    I actually like what you have acquired here, really like
    what you are saying and the way in which you say it.

    You make it enjoyable and you still care for to keep it smart.

    I can not wait to read far more from you. This is actually a tremendous website.

  22. January 8th, 2025 at 14:02 | #22

    Hey, I think your website might be having browser compatibility issues.

    When I look at your website in Ie, it looks fine but when opening in Internet Explorer, it has
    some overlapping. I just wanted to give you a quick heads up!
    Other then that, wonderful blog!

  23. January 8th, 2025 at 14:06 | #23

    Hi, I believe your website could be having internet browser compatibility problems.
    When I take a look at your blog in Safari, it looks fine however
    when opening in IE, it has some overlapping issues. I just wanted to provide you
    with a quick heads up! Besides that, fantastic
    site!

  24. January 8th, 2025 at 14:07 | #24

    That is a very good tip particularly to those fresh to the blogosphere.
    Short but very accurate information… Thanks for sharing this one.
    A must read post!

  25. January 8th, 2025 at 14:15 | #25

    Tips For Selecting Bank Foreclosure Houses 다바오
    호텔 예약

  26. January 8th, 2025 at 14:19 | #26

    Writing For Greeting Cards – Creating A Great Birthday Card 다바오 충전 방법

  27. January 8th, 2025 at 14:21 | #27

    Everything is very open with a precise description of
    the issues. It was really informative. Your website is extremely helpful.
    Thank you for sharing!

  28. January 8th, 2025 at 14:41 | #28

    My brother recommended I would possibly like this website.

    He was totally right. This put up actually made my day.
    You cann’t consider just how a lot time I had spent for this information! Thank you!

  29. January 8th, 2025 at 14:47 | #29

    Hello there! Do you use Twitter? I’d like to follow you if that would be
    okay. I’m definitely enjoying your blog and look forward to new updates.

  30. January 8th, 2025 at 14:48 | #30

    Hello, I think your blog might be having browser
    compatibility issues. When I look at your blog site
    in Ie, it looks fine but when opening in Internet Explorer,
    it has some overlapping. I just wanted to give you a quick heads up!
    Other then that, amazing blog!

  31. January 8th, 2025 at 14:55 | #31

    Highly energetic post, I loved that a lot. Will there be a part
    2?

  32. January 8th, 2025 at 14:59 | #32

    Hi! I know this is kinda off topic but I’d figured I’d ask.
    Would you be interested in exchanging links or maybe guest authoring a blog article or vice-versa?
    My website covers a lot of the same subjects as yours
    and I believe we could greatly benefit from each other.
    If you are interested feel free to shoot me an e-mail. I look forward to hearing from you!
    Excellent blog by the way!

  33. January 8th, 2025 at 15:19 | #33

    Howdy would you mind sharing which blog platform
    you’re working with? I’m looking to start my own blog
    soon but I’m having a difficult time selecting between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your design and style seems different then most blogs and I’m looking for something unique.
    P.S Apologies for being off-topic but I had to ask!

  34. January 8th, 2025 at 15:22 | #34

    I visited multiple blogs however the audio quality for audio songs present at this site is really fabulous.

  35. January 8th, 2025 at 15:59 | #35

    whoah this weblog is great i like studying your posts. Stay up the good work!
    You recognize, lots of persons are looking around for this information, you could aid them
    greatly.

  36. January 8th, 2025 at 16:09 | #36

    I know this if off topic but I’m looking into starting my own blog and was wondering what all is required to get setup?
    I’m assuming having a blog like yours would
    cost a pretty penny? I’m not very web smart so
    I’m not 100% positive. Any tips or advice would be
    greatly appreciated. Cheers

  37. January 8th, 2025 at 16:20 | #37

    If you wish for to obtain much from this article then you have to
    apply such methods to your won blog.

  38. January 8th, 2025 at 16:22 | #38

    of course like your web site but you need to take a look at
    the spelling on several of your posts. Several of them are rife with spelling problems and I to find
    it very troublesome to tell the reality then again I’ll
    surely come again again.

  39. January 8th, 2025 at 16:22 | #39

    A picture taken with the 3x lens on the Discover X8 Pro
    looks much better than the 3x electronic zoom you jump on phones that go directly from 1x to 5x.

  40. January 8th, 2025 at 16:55 | #40

    Welcome to the world of Agario! If you are an avid gamer or somebody who enjoys engaging on-line actions, you may
    have probably heard about Agario.

  41. January 8th, 2025 at 17:02 | #41

    Quality articles is the key to attract the users to pay a visit the site,
    that’s what this website is providing.

  42. January 8th, 2025 at 17:17 | #42

    Full Service Spa 광주알밤

  43. January 8th, 2025 at 17:21 | #43

    Hello! I’ve been reading your web site for
    a long time now and finally got the courage to go ahead and give you a shout out
    from Huffman Tx! Just wanted to tell you keep up the
    fantastic work!

  44. January 8th, 2025 at 17:27 | #44

    Wow that was strange. I just wrote an very long comment but after I clicked submit my comment didn’t show up.
    Grrrr… well I’m not writing all that over again. Anyways, just wanted to say fantastic blog!

  45. January 8th, 2025 at 17:40 | #45

    Appreciate the recommendation. Let me try it out.

  46. January 8th, 2025 at 17:45 | #46

    VIP Lounge 하이오피사이트

  47. January 8th, 2025 at 17:54 | #47

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

  48. January 8th, 2025 at 17:56 | #48

    Hi, Neat post. There is a problem along with your site
    in web explorer, would test this? IE nonetheless is the market
    chief and a big portion of people will leave out your wonderful writing because of this problem.

  49. January 8th, 2025 at 18:00 | #49

    My brother recommended I might like this blog. He was totally right.
    This post actually made my day. You cann’t imagine simply how much
    time I had spent for this info! Thanks!

  50. January 8th, 2025 at 18:04 | #50

    If you are going for most excellent contents like I
    do, simply visit this web page everyday as it gives quality contents, thanks

Comment pages
1 67 68 69 70 71 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