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. February 13th, 2018 at 15:41 | #1

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

  2. February 14th, 2018 at 21:01 | #2

    You need to be a part of a contest for one of the most useful blogs on the net.

    I’m going to recommend this blog!

  3. February 16th, 2018 at 12:36 | #3

    Wohh just what I was looking for, appreciate it for putting up.

  4. February 17th, 2018 at 20:04 | #4

    At this time it looks like Expression Engine is the top blogging platform available right now.
    (from what I’ve read) Is that what you’re using on your blog?

  5. February 18th, 2018 at 01:13 | #5

    I’m pretty pleased to uncover this website.
    I want to to thank you for your time for this particularly fantastic read!!
    I definitely savored every bit of it and i also have you saved to
    fav to see new information in your blog.

  6. February 18th, 2018 at 10:21 | #6

    Your style is unique in comparison to other people I’ve read stuff from.

    Thanks for posting when you’ve got the opportunity, Guess I’ll just bookmark this site.

  7. February 18th, 2018 at 16:51 | #7

    My developer is trying to persuade me to move to .net
    from PHP. I have always disliked the idea because of the expenses.
    But he’s tryiong none the less. I’ve been using WordPress
    on various websites for about a year and am concerned about switching to another platform.
    I have heard very good things about blogengine.net. Is there
    a way I can transfer all my wordpress content into it? Any help would be greatly appreciated!

  8. February 18th, 2018 at 18:49 | #8

    A smartphone also is likewise more useful thnan the Oculus, consisting of for things besides
    home entertainment. Additionally, peeople who buyy them normally already have cellular phone
    bills, so that part does nnot enhance the overall expenditure.

  9. February 26th, 2018 at 09:17 | #9

    First of all I want to say terrific blog! I had a quick question that I’d like to ask if you
    do not mind. I was interested to find out how you center yourself and clear your mind before writing.
    I have had a tough time clearing my mind in getting my
    ideas out there. I truly do take pleasure in writing however it just seems like the first
    10 to 15 minutes are generally lost just trying to figure out
    how to begin. Any suggestions or tips? Appreciate it!

  10. March 10th, 2018 at 00:59 | #10

    Great site you have here but I was curious about if
    you knew of any forums that cover the same topics discussed in this article?
    I’d really love to be a part of group where I can get responses from other knowledgeable individuals that share the same interest.
    If you have any recommendations, please let me
    know. Thanks!

  11. March 10th, 2018 at 08:27 | #11

    This idea was the developed and after prototypes were
    manufactured the theory was further resulted in a mobile phone oral appliance thus the i – Phone was
    born. i – Phone 5 specifications leaked: Design data is available before the formal release date – The specifications of the gadget are not released formally yet.iphone 8 plus cu mau den The
    company has postponed the production of the much awaited
    i – Phone 5, paving just how for the i – Phone 4 successor, the i – Phone 4S.

  12. March 11th, 2018 at 08:38 | #12

    Its not my first time to go to see this website, i am browsing
    this web page dailly and get good data from here daily.

  13. March 17th, 2018 at 14:42 | #13

    Hi, just wanted to tell you, I loced this article.
    It was funny. Keep on posting!

  14. March 18th, 2018 at 19:02 | #14

    It’s awesome for me to have a web page, which is valuable designed for
    my know-how. thanks admin

  15. March 21st, 2018 at 00:20 | #15

    Simply want to say your article is as astonishing.
    The clarity to your submit is just cool and i could suppose you are knowledgeable on this subject.

    Fine together with your permission let me to snatch your RSS feed to
    stay updated with coming near near post. Thanks one million and please keep
    up the gratifying work.

  16. March 25th, 2018 at 03:12 | #16

    It’s going to be end of mine day, however before finish I am reading this
    enormous piece of writing to improve my experience.

  17. April 1st, 2018 at 02:46 | #17

    The Clash of Clans Mod 2017 allows to do so much more than you are able to do on the
    peculiar Conflict of Clans.

  18. April 18th, 2018 at 03:10 | #18

    With havin so much content and articles do you ever run into any issues of plagorism or copyright
    infringement? My blog has a lot of exclusive content I’ve either written myself or outsourced but it looks like a lot of it is popping
    it up all over the internet without my permission. Do you know any methods to help reduce
    content from being stolen? I’d certainly appreciate it.

  19. April 18th, 2018 at 17:59 | #19

    Excellent post, you have stated some excellent details, I
    think this is an excellent web site.

  20. April 20th, 2018 at 06:38 | #20

    Hi, after reading this remarkable paragraph i am too glad to share my experience
    here with colleagues.

  21. April 28th, 2018 at 22:37 | #21

    Hi, its pleasant piece of writing on the topic of media print, we all understand media is a impressive source oof data.

  22. May 4th, 2018 at 19:39 | #22

    It’s going to be ending of mine day, but before end I am reading this fantastic piece of writing to increase my know-how.

  23. May 19th, 2018 at 12:02 | #23

    Once yoou might have fߋund an email finder service ʏoᥙ want to usе, maintain the numbеr prߋvided with уⲟu in any respect timеs.
    If you are over a busy highway witһ speeding cars oг end up struggling to arrive at tһe siɗе
    inn thе road, STAY IN УOUR CAR. You can bе your ⲟwn boss, and wⲟrk forr yourseⅼf,
    if ү᧐u start yohr personal towig service business, аnd makoe it single mɑn job,
    or convert іt іnto a flewt of towing vehicles.

  24. June 13th, 2018 at 12:24 | #24

    Hmm is anyone else encountering problems with the images on this blog loading?
    I’m trying to determine if its a problem on my end
    or if it’s the blog. Any feed-back would be greatly appreciated.

  25. June 14th, 2018 at 05:09 | #25

    After I originally left a comment I seem to have clicked on the -Notify me when new
    comments are added- checkbox and now every time a comment is added I get four emails with
    the exact same comment. Is there a means you can remove me from that service?
    Appreciate it!

  26. June 17th, 2018 at 22:20 | #26

    It’s fantastic that you are getting thoughts
    from this piece of writing as well as from our dialogue made at this time.

  27. July 20th, 2018 at 18:57 | #27

    Pace controls for brush and brushless motors.

  28. July 30th, 2018 at 02:08 | #28

    Quality articles or reviews is the secret to interest the visitors to pay a quick visit the web site, that’s what this website is providing.

  29. August 3rd, 2018 at 16:19 | #29

    I relish, cause I discovered just what I was looking for.
    You have ended my four day lengthy hunt! God Bless
    you man. Have a nice day. Bye

  30. August 7th, 2018 at 03:33 | #30

    You got a very superb website, Gladiola I discovered
    it through yahoo.

  31. August 17th, 2018 at 08:00 | #31

    It’s actually very complex in this active life to listen news on Television,
    therefore I simply use the web for that reason, and get the most
    recent news.

  32. August 18th, 2018 at 11:30 | #32

    Appreciating the time and effort you put into your site and
    in depth information you provide. It’s nice to come across a blog every once in a while that isn’t the same out of date rehashed information. Fantastic
    read! I’ve bookmarked your site and I’m including your RSS
    feeds to my Google account.

  33. August 19th, 2018 at 01:26 | #33

    
    La verdad hay cosas mejores que llevar a cabo que leer esto.
    Gracias por quitarme el precioso tiempo de mi hermosa existencia.

  34. August 21st, 2018 at 04:47 | #34

    Superb blog you have here but I was curious if you knew of any discussion boards that
    cover the same topics discussed in this article? I’d really love to be a part of online community where I can get feed-back from other
    knowledgeable individuals that share the same interest.
    If you have any recommendations, please let me know. Thanks!

  35. August 25th, 2018 at 18:33 | #35

    Adhering to the unexpected passing of an enjoyed one numerous individuals do
    not understand that they can look for legal counsel if the
    fatality was a wrongful one.

  36. August 31st, 2018 at 22:57 | #36

    Oh my goodness! Amazing article dude! Thank you, However I am experiencing problems with your RSS.
    I don’t understand why I cannot subscribe to it. Is there anybody else getting the same
    RSS problems? Anyone that knows the answer will you kindly respond?
    Thanks!!

  37. September 1st, 2018 at 18:56 | #37

    Realizam manual cutii rigide cu baza fixa cu sau fara cheita aurie
    de

  38. September 2nd, 2018 at 16:48 | #38

    I am regular reader, how are you everybody? This post posted at
    this website is really good.

  39. September 3rd, 2018 at 05:52 | #39

    When I originally left a comment I appear to have clicked on the -Notify me when new
    comments are added- checkbox and now each time
    a comment is added I recieve 4 emails with the exact same comment.
    Is there a means you are able to remove me from that service?
    Cheers!

  40. September 4th, 2018 at 03:00 | #40

    What i do not realize is in reality how you’re now not
    actually a lot more well-preferred than you might be right now.

    You’re so intelligent. You realize thus considerably in the case of this subject, made me for my part imagine it from numerous various angles.
    Its like men and women don’t seem to be fascinated except it’s something
    to do with Girl gaga! Your own stuffs nice. At all times deal with it
    up!

  41. September 4th, 2018 at 15:26 | #41

    hi!,I really like your writing so a lot! percentage we communicate more about your post
    on AOL? I require a specialist in this space to unravel my problem.
    Maybe that is you! Having a look ahead to look you.

  42. September 7th, 2018 at 02:51 | #42

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

  43. September 10th, 2018 at 04:09 | #43

    That is really interesting, You’re an excessively professional blogger.

    I’ve joined your rss feed and stay up for in the
    hunt for more of your excellent post. Also, I’ve shared your site in my
    social networks

  44. September 10th, 2018 at 20:08 | #44

    I like studying and I conceive this website got some genuinely useful
    stuff on it!

  45. September 10th, 2018 at 23:00 | #45

    Yes! Finally something about ottawa divorce lawyer.

  46. September 11th, 2018 at 06:01 | #46

    I blog frequently and I seriously thank you for your content.
    Your article has really peaked my interest. I am going to bookmark your site and keep checking for new
    information about once per week. I subscribed to
    your RSS feed as well.

  47. September 14th, 2018 at 04:34 | #47

    Fastidious response in return of this issue with real arguments and describing everything concerning that.

  48. September 14th, 2018 at 21:43 | #48

    Không gian sống yên tĩnh rộng lớn và trong lành.

  49. September 18th, 2018 at 19:08 | #49

    Exceptional post however , I was wondering if you could
    write a litte more on this subject? I’d be very grateful if you could elaborate a
    little bit more. Bless you!

  50. September 22nd, 2018 at 18:36 | #50

    What’s up to every one, because I am actually keen of reading this weblog’s post
    to be updated on a regular basis. It consists of fastidious stuff.

Comment pages
1 11 12 13 14 435
  1. March 19th, 2014 at 11:13 | #1
  2. April 30th, 2014 at 01:00 | #2