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. September 22nd, 2018 at 19:48 | #1

    I know this site offers quality dependent
    posts and extra information, is there any other website which offers these information in quality?

  2. September 25th, 2018 at 10:37 | #2

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

  3. September 26th, 2018 at 07:02 | #3

    Helpful info. Lucky me I discovered your site by accident, and I’m surprised why this coincidence didn’t happened
    in advance! I bookmarked it.

  4. September 27th, 2018 at 11:06 | #4

    Howdy excellent blog! Does running a blog like this require a large amount of work?
    I have no understanding of programming however I had
    been hoping to start my own blog in the near future. Anyways, should you have any suggestions or techniques for new blog owners please share.
    I understand this is off subject but I just needed to ask.
    Thanks a lot!

  5. September 27th, 2018 at 11:23 | #5

    Wow, amazing weblog layout! How long have you been running a blog for?
    you made running a blog glance easy. The entire look of your website is great, as smartly
    as the content material!

  6. September 30th, 2018 at 02:39 | #6

    You actually make it appear so easy with your presentation however I to find this topic to be actually
    something which I feel I would by no means understand.
    It sort of feels too complicated and extremely vast for me.
    I am taking a look forward to your subsequent put up, I’ll attempt to get the hold of it!

  7. September 30th, 2018 at 20:50 | #7

    The problem however is always that sending paper birthday
    cards through send to friends and household who’re far could possibly be quite expensive and usually delayed.

    Feel free to start doing a web based search anytime the necessity for a
    no cost birthday greetings card arises.
    Share funny stories about the person that highlights what makes them
    special and well-loved.

  8. October 1st, 2018 at 04:36 | #8

    I was reading through some of your content on this internet site and I believe
    this web site is very instructive! Keep putting up.

  9. October 1st, 2018 at 10:49 | #9

    Hey nice post! I hope it’s ok that I shared it on my FB, if not, no worries just let me know and I’ll remove it.
    Regardless keep up the good work.

  10. October 3rd, 2018 at 16:10 | #10

    That is a really good tip particularly to those fresh
    to the blogosphere. Simple but very precise information… Thank you for sharing this one.
    A must read article!

  11. October 6th, 2018 at 15:36 | #11

    I’m gone to say to my little brother, that he should also pay a
    quick visit this blog on regular basis to get updated from latest news.

  12. October 12th, 2018 at 06:30 | #12

    That is really fascinating, You are an excessively professional blogger.
    I have joined your rss feed and sit up for searching for mkre of
    your magnificent post. Additionally, I have shared your site in my
    social networks

  13. October 13th, 2018 at 18:52 | #13

    I invite Larry, the sweetheart, to share the encounter from indulging in every
    great tasting scrap from my Red Plush Birthday cake.

  14. October 17th, 2018 at 13:36 | #14

    It’s wonderful that you are getting ideas from this piece
    of writing as well as from our discussion made at this time. http://www.substate.net/familienforum/member.php?action=profile&uid=39757

  15. October 18th, 2018 at 01:50 | #15

    This is the right webpage for anybody who would like to find out about this topic.

    You know so much its almost tough to argue with you (not that I personally would
    want to…HaHa). You definitely put a brand new
    spin on a subject that has been discussed for decades.
    Wonderful stuff, just wonderful!

  16. October 19th, 2018 at 05:32 | #16

    Pretty! This has been a really wonderful post.
    Thanks for providing this information. http://haikoukku.fi/index.php?action=profile;u=72345

  17. October 19th, 2018 at 23:07 | #17

    It’s remarkable in support of me to have a website, which is
    good designed for my knowledge. thanks admin

  18. October 20th, 2018 at 12:06 | #18

    Hi there it’s me, I am also visiting this website regularly, this web page is
    truly pleasant and the viewers are in fact sharing good thoughts. http://talkaboutendo.com/wp-content/plugins/zingiri-forum/mybb/member.php?action=profile&uid=56824

  19. October 20th, 2018 at 21:22 | #19

    Wow! After all I got a webpage from where I be capable of in fact obtain useful information concerning my study and knowledge. http://www.tongtongtong.com/www/userinfo.php?uid=3921987

  20. October 20th, 2018 at 22:57 | #20

    Thank you for every other informative web site. The place else could I get that kind
    of information written in such an ideal manner?
    I’ve a venture that I am simply now running on, and I have been on the glance out for such info. http://www.arealavoro.cloud/forum/index.php?action=profile;u=7056

  21. October 21st, 2018 at 13:48 | #21

    I am not really wonderful with English but I line up this rattling easygoing to translate.

  22. October 22nd, 2018 at 01:47 | #22

    It are the night club market When there is 1 industry that is booming during that downturn. The exact thing that has been true during The Great Depression holds true and this is that the money folks get the more that they start looking for techniques to escape
    their issues and a great night bar stipulates the right escape.
    They input a dream world at the place where they may
    ingest, mingle, and simply have a fantastic time without even fretting about their invoices and whether their own electricity
    is going to be shut off and are able to venture outside for
    a night on the town. This might sound sticking your head
    from the sand mindset, or immature; however, it’s human nature – even if merely to get a couple of
    hours, Learn More Here.

  23. October 22nd, 2018 at 20:38 | #23

    I know this web site gives quality depending content and other information, is there any other web page which offers such information in quality?

  24. October 24th, 2018 at 09:05 | #24

    I think that what you wrote made a lot of sense. However, consider this, suppose you composed a catchier title?
    I am not saying your information is not solid., but what if you
    added something that grabbed a person’s attention? I mean Flex 4: Changing the “displayAsPassword” default character |
    eonflex.com is a little vanilla. Youu should peek at Yahoo’s home page and note how thy create post
    headlines to get viewers to open the links.
    You might add a video or a related pic or twwo to get people nterested about
    what you’ve got to say. Just my opinion, it might bring your posts a little livelier.

  25. October 27th, 2018 at 00:00 | #25

    
    Que tal soy Morena y soy tu admiradora. Me fascinó tu columna Flex 4:
    Changing the “displayAsPassword” default character , pasé un buen momento leyendo.

    Únicamente quería declarar eso

  26. October 27th, 2018 at 03:52 | #26

    I am regular visitor, how are you everybody? This article posted at this site is
    genuinely nice.

  27. October 27th, 2018 at 11:11 | #27

    I do not even understand how I finished up here,
    however I assumed this post was great. I do not understand who you’re however definitely you are going to a
    well-known blogger for those who are not already.

    Cheers! https://www.solusipelunasutang.com/forum/index.php?action=profile;u=56286

  28. October 27th, 2018 at 14:40 | #28

    Creo que nunca antes lograría vivir con nadie que no le emocione irme de viaje
    al igual que yo.

  29. November 7th, 2018 at 15:14 | #29

    May I simply say what a relief to find someone that really understands what they are discussing online.
    You definitely know how to bring a problem to light
    and make it important. More and more people should read this and understand this
    side of the story. I can’t believe you are not more popular because you definitely
    possess the gift.

  30. November 10th, 2018 at 18:05 | #30

    FaceTime has always had video preview performance.

  31. November 11th, 2018 at 19:32 | #31

    I am no longer sure where you are getting your info, but great topic.
    I must spend some time learning much more or figuring out
    more. Thanks for fantastic information I was searching for this info for my mission.

  32. November 13th, 2018 at 13:43 | #32

    I blog frequently and I seriously appreciate your
    information. This article has truly peaked my interest.
    I will bookmark your site and keep checking for new details about once a week.

    I subscribed to your RSS feed as well.

  33. November 15th, 2018 at 22:44 | #33

    When someone writes an paragraph he/she retains the plan of a user in his/her brain that how a user can be aware of it. Thus that’s why this article is amazing. Thanks!

  34. November 19th, 2018 at 09:05 | #34

    Fine way of describing, and nice piece of writing to take information regarding my presentation focus, which i am going to present
    in university.

  35. November 20th, 2018 at 05:57 | #35

    We absolutely love your blog and find almost all of your post’s to be what precisely
    I’m looking for. Would you offer guest writers to
    write content available for you? I wouldn’t mind creating a post or elaborating on a
    number of the subjects you write related to here. Again, awesome blog!

  36. December 5th, 2018 at 10:16 | #36

    At this time it appears like Drupal is the
    top blogging platform out there right now. (from what I’ve
    read) Is that what you are using on your blog?

  37. December 10th, 2018 at 22:43 | #37

    Oh my goodness! Amazing article dude! Thanks, However I am experiencing troubles with your RSS.
    I don’t understand the reason why I can’t join it. Is there anybody else getting identical RSS problems?

    Anyone who knows the answer will you kindly respond? Thanks!!

  38. December 19th, 2018 at 09:21 | #38

    Im Vorfeld der Überlegung müssen die Gefahren vonseiten Menschen bekannt der/die/das ihm gehörende noch
    dazu Erforderlichkeit Chip Part mit die durchläuft jener Heilverfahren entscheiden. In welcher Heilstätte hält einander der Patient bspw.
    6 Zahlungsfrist aufschieben auf: 1 Vierundzwanzigstel eines Tages
    dauert die voroperative Vorbereitung, bspw. eineinhalb Stunde der Eingriff auch u.

    a. Chip restliche Zeitdifferenz Erholung getreu dieser Manipulation. Die Fäden Anfang nach 10
    Tagen entfernt. Solche Betragen es allerdings
    ferner als Auswirkung eines kulturellen Wandels des Körperverständnisses.
    Chip Plastische Chirurgie ist ein faszinierendes im Übrigen kreatives chirurgisches
    Domäne. Was seinerzeitig lediglich angrenzend den Prominenten akzeptiert
    wurde, wird in den letzten Jahren immer mehr für jedes den europäischen Normalbürger klarerweise.
    Russen nicht zuletzt Amerikaner mögen, dass man sieht,
    dass man operiert wurde. Die meisten Patienten sind keine Ausländer, Chip gegenseitig in Spanien handhaben lassen, sondern Einheimische, zu 80
    Prozent Frauen darüber hinaus 20 Prozent Männer. Wir (sich)
    freuen uns auf Ihren Besuch im Prevention Center Zürich.
    Falls nicht, kann er einander an den Künstlern dieser
    Rückkehr mitteilen überdies zum Beispiel die Schönheitsideale Michelangelos an dessen Marmorskulptur »David« Student sein.

  39. December 26th, 2018 at 11:56 | #39

    I do not know if it’s just me or if everybody else experiencing problems with your
    site. It looks like some of the written text in your content are running off the screen. Can somebody else
    please comment and let me know if this is happening to them too?
    This may be a issue with my internet browser because I’ve had this
    happen before. Cheers

  40. December 30th, 2018 at 02:29 | #40

    Great web site you have got here.. It’s hard to find
    good quality writing like yours these days. I really appreciate individuals like you!
    Take care!!

  41. December 30th, 2018 at 08:52 | #41

    I don’t even know how I stopped up right here, but I thought this put up used to
    be great. I do not understand who you might be however definitely
    you’re going to a well-known blogger in case you
    aren’t already. Cheers!

  42. January 4th, 2019 at 21:16 | #42

    I like reading through an article that can make people think.
    Also, many thanks for allowing for me to comment!

  43. January 5th, 2019 at 03:16 | #43

    What a data of un-ambiguity and preserveness of precious familiarity about unpredicted feelings.

  44. January 7th, 2019 at 10:20 | #44

    If you desire to improve your know-how just keep visiting
    this web site and be updated with the latest news update
    posted here.

  45. January 7th, 2019 at 12:36 | #45

    I am no longer certain the place you are getting your info, however great topic.

    I must spend some time finding out more or working out more.
    Thank you for fantastic information I used
    to be on the lookout for this info for my mission.

  46. January 22nd, 2019 at 09:38 | #46

    Hi, I think your site might be having browser compatibility issues.
    When I look at your website in Opera, 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!

    just click the following web site (Ivy)
    http://miramirincon.blogspot.com/2014/10/financieras-que-ofrecen-creditos-rapios.html

  47. January 22nd, 2019 at 18:55 | #47

    I’m no longer positive where you’re getting your information, however good
    topic. I needs to spend some time learning more
    or understanding more. Thanks for magnificent information I was on the lookout for this information for my mission.

    linked web-site (Jeramy)
    http://mosuh4jfsd.tumblr.com

  48. January 24th, 2019 at 13:41 | #48

    I have fun with, lead to I discovered just what I used to be having a look for.
    You’ve ended my 4 day lengthy hunt! God Bless you man.
    Have a nice day. Bye

  49. January 25th, 2019 at 20:00 | #49

    Nice post. I learn something totally new and challenging on blogs I stumbleupon every day.
    It’s always useful to read content from other authors and use
    something from their sites.

  50. February 2nd, 2019 at 02:38 | #50

    What’s up to every one, the contents present at this web page are really amazing for people experience, well, keep up
    the good work fellows.

Comment pages
1 12 13 14 15 16 17 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