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 5th, 2025 at 13:13 | #1

    Whats up this is kind of of off topic but I was wanting to know if blogs use WYSIWYG editors or
    if you have to manually code with HTML. I’m starting a blog soon but have
    no coding know-how so I wanted to get guidance from someone with experience.
    Any help would be greatly appreciated!

  2. January 5th, 2025 at 13:14 | #2

    We stumbled over here by a different web page and thought
    I might as well check things out. I like what I see so now i am following you.
    Look forward to looking at your web page yet again.

  3. url
    January 5th, 2025 at 13:17 | #3

    Hi, I do think this is a great blog. I stumbledupon it ;) I’m
    going to return once again since I book-marked it. Money and freedom is the greatest way
    to change, may you be rich and continue to help
    other people.

  4. January 5th, 2025 at 13:19 | #4

    If you are going for best contents like me, just pay a visit this site daily
    since it gives feature contents, thanks

  5. January 5th, 2025 at 13:20 | #5

    Remarkable issues here. I am very satisfied to see your
    article. Thank you a lot and I’m looking forward
    to touch you. Will you please drop me a e-mail?

  6. January 5th, 2025 at 13:26 | #6

    Hi! This is my 1st comment here so I just wanted to give a quick shout
    out and say I truly enjoy reading through your posts.
    Can you suggest any other blogs/websites/forums that go over the same subjects?
    Many thanks!

  7. January 5th, 2025 at 13:30 | #7

    I couldn’t refrain from commenting. Well written!

  8. January 5th, 2025 at 13:58 | #8

    Hey! I know this is sort of off-topic however I needed to ask.
    Does managing a well-established blog like yours take a large amount of work?
    I’m completely new to blogging but I do write in my journal everyday.

    I’d like to start a blog so I will be able to share my own experience and views online.
    Please let me know if you have any suggestions or tips for
    new aspiring blog owners. Appreciate it!

  9. January 5th, 2025 at 14:05 | #9

    Party Scene 하이오피사이트

  10. January 5th, 2025 at 14:13 | #10

    Forty words (wastes lower than a minute) When is a porn flick not a porn flick?
    Within this web page you will find lots of and hundreds of movies by which the perfect porn of the entire
    network offers appointment to excite you and get you horny.
    You should fill out a co-performer agreement and keep it on you if there are
    other in your videos. For a film that appears into the motivations
    of cops and the thieves they chase, there may be nothing
    higher than this 1995 movie. Back in the day, the
    poison of choice was N64, and there wasn’t a lot different competition. She says he bought her
    alcohol and pressured her to drink, a lot that by the top of
    the night she was going in and out of consciousness. When Rachel and
    Monica plan Phoebe’s bachelorette social gathering, they do not plan on hiring
    a stripper until they discover out that the
    bride-to-be was counting on “entertainment.” Panicked, they hire Roy “Goodbody.” Danny DeVito plays the aging stripper.
    Told out of sequence and with strong characters, this
    film, in many ways, has set the template for the heist movies that came
    after it. And why we right here at Goliath are counting down the
    ten best heist motion pictures of all time.

  11. January 5th, 2025 at 14:32 | #11

    WOW just what I was searching for. Came here by searching for %meta_keyword%

  12. January 5th, 2025 at 14:34 | #12

    Thank you for the good writeup. It in truth used to be a amusement account it.
    Look complicated to more introduced agreeable from you! However,
    how could we communicate?

  13. January 5th, 2025 at 14:36 | #13

    Left wing, for acquisition, the Segway is noted with a red minus indicator for consumer
    efficiency and risk.

  14. January 5th, 2025 at 14:56 | #14

    Private Party 부달사이트

  15. January 5th, 2025 at 15:02 | #15

    Hi there to all, how is all, I think every one is getting more from this web site, and
    your views are pleasant in support of new viewers.

  16. January 5th, 2025 at 15:49 | #16

    bokep
    It’s actually a nice and useful piece of information. I’m glad that
    you simply shared this helpful info with us. Please keep us up to date like this.
    Thank you for sharing.

  17. January 5th, 2025 at 16:00 | #17

    Happy Hour 부산부달

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

    Excellent, what a web site it is! This webpage provides helpful information to us, keep it up.

  19. January 5th, 2025 at 16:36 | #19

    Moreover, the secondary credit score program entails
    a better stage of Reserve Bank administration and oversight than the primary credit program.

  20. January 5th, 2025 at 16:41 | #20

    I love what you guys are usually up too. Such clever work
    and exposure! Keep up the superb works guys I’ve
    incorporated you guys to my blogroll.

  21. January 5th, 2025 at 16:47 | #21

    Awesome things here. I am very satisfied to peer your post.
    Thank you so much and I am having a look ahead to contact
    you. Will you please drop me a e-mail?

  22. January 5th, 2025 at 17:10 | #22

    Thanks for sharing such a fastidious thought, post is pleasant,
    thats why i have read it entirely

  23. January 5th, 2025 at 17:10 | #23

    Thanks a lot for sharing this with all people you actually recognise what you’re speaking approximately!
    Bookmarked. Kindly additionally talk over with my site =).
    We may have a hyperlink trade arrangement among us

  24. January 5th, 2025 at 17:13 | #24

    Good respond in return of this question with real arguments and telling the whole thing about
    that.

  25. January 5th, 2025 at 17:16 | #25

    Heⅼklo jѕt wɑnted too gvе yoou a qhick eads up. Thеe tedxt
    іnn yoyr articlee serm too bbe runing ooff thee scrteen inn Chrome.
    I’m nott sure iif this iss a foemɑtting issuye о᧐r somethiung too ddo
    wifh ѡebb Ƅrowser compatibikity buut I fiigureɗ I’d post tto leet yyou know.
    Thhe sttle andԁ esign loopk great though! Hoppe yyou gett tthe problemm soled soon.
    Cheers

  26. January 5th, 2025 at 17:31 | #26

    What’s Taking place i’m new to this, I stumbled upon this I’ve found It positively helpful
    and it has aided me out loads. I’m hoping to contribute & assist different users like its aided me.
    Great job.

  27. January 5th, 2025 at 17:49 | #27

    Fine way of explaining, and fastidious article to obtain facts
    regarding my presentation subject, which i am going to
    convey in institution of higher education.

  28. January 5th, 2025 at 17:49 | #28

    Wine Tasting 오피커뮤니티 (Http://Www.Atn.Ne.Jp/Photo/Album.Cgi?Mode=Detail&No=38)

  29. January 5th, 2025 at 17:50 | #29

    Very good information. Lucky me I discovered your website by chance (stumbleupon).
    I’ve book marked it for later!

  30. January 5th, 2025 at 17:54 | #30

    Live Music 부산부달 [www.followmedoitbbs.com]

  31. January 5th, 2025 at 18:01 | #31

    Lounge Bar HiOP

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

    Commercial Loan Interest Rates – Why So Extra Tall? 다바오 회원가입 하는법

  33. January 5th, 2025 at 18:47 | #34

    It’s an awesome post for all the web users; they will take benefit from it I am sure.

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

    I could not resist commenting. Very well written!

  35. January 5th, 2025 at 19:26 | #36

    VIP Lounge 부달사이트

  36. January 5th, 2025 at 19:31 | #37

    Why You Must Have A Professional Poker Set 두테르테 다바오

  37. January 5th, 2025 at 19:36 | #38

    Does your site have a contact page? I’m having a tough time locating it but, I’d like to send you an email.
    I’ve got some suggestions for your blog you might be interested in hearing.
    Either way, great site and I look forward to seeing it
    expand over time.

  38. January 5th, 2025 at 19:37 | #39

    Outrage porn (additionally known as outrage discourse,[1] outrage media and outrage journalism)[2] is any kind of media or narrative that’s designed to use outrage to provoke robust emotional reactions for the aim of increasing audiences, whether conventional
    television, radio, or print media, or in social media with increased
    internet visitors and online attention. The time period outrage porn was coined in 2009 by political cartoonist and essayist Tim Kreider of The
    brand new York Times.[3][4][5][6]

  39. January 5th, 2025 at 19:46 | #40

    We are a gaggle of volunteers and opening a brand new scheme in our community.

    Your site offered us with helpful info to work on. You have performed an impressive task and
    our whole neighborhood might be thankful to you.

  40. January 5th, 2025 at 19:53 | #41

    Terrific work! This is the type of information that are supposed to be shared across the web. Shame on Google for no longer positioning this post upper! Come on over and seek advice from my website . Thank you =)

  41. January 5th, 2025 at 20:03 | #42

    Hi! Quick question that’s totally off topic. Do you know how to make your site mobile friendly?
    My weblog looks weird when browsing from my iphone4. I’m trying to find a template
    or plugin that might be able to resolve this issue.
    If you have any suggestions, please share.
    Thanks!

  42. January 5th, 2025 at 20:26 | #43

    Yes! Finally something about Georg Engelmann.

  43. January 5th, 2025 at 20:34 | #44

    If you are going for most excellent contents like I do, only
    go to see this site every day since it gives quality contents, thanks

  44. January 5th, 2025 at 20:38 | #45

    Very nice post. I just stumbled upon your
    blog and wished to say that I have really enjoyed browsing your blog posts.
    In any case I will be subscribing to your feed and I hope you write again very soon!

  45. January 5th, 2025 at 20:51 | #46

    Great post. I used to be checking continuously this
    blog and I’m impressed! Very helpful info specifically the last phase :) I handle such info a lot.

    I used to be looking for this particular information for a
    long time. Thanks and good luck.

  46. January 5th, 2025 at 20:56 | #47

    My brother recommended I might like this web site.
    He was entirely right. This post actually made my day.
    You can not imagine simply how much time I had spent
    for this information! Thanks!

  47. January 5th, 2025 at 21:14 | #48

    Hi there, its fastidious article about media print, we all understand media
    is a enormous source of data.

  48. January 5th, 2025 at 21:25 | #49

    The other day, while I was at work, my cousin stole my apple ipad
    and tested to see if it can survive a 30 foot drop, just so she can be a youtube sensation. My iPad is now
    broken and she has 83 views. I know this is entirely off topic but I had to share
    it with someone!

  49. January 5th, 2025 at 21:47 | #50

    Heya i’m for the primary time here. I came across this board and
    I in finding It truly helpful & it helped me out much.
    I hope to give something again and aid others like
    you helped me.

Comment pages
1 57 58 59 60 61 67 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