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

    VIP Experience hiop

  2. January 9th, 2025 at 06:37 | #2

    Great Gift Items For Yoga Lovers 하이오피사이트

  3. January 9th, 2025 at 07:01 | #3

    Its such as you read my thoughts! You appear to understand a lot about this, such as
    you wrote the e-book in it or something. I think that you just could do with
    a few % to drive the message home a bit, however other than that,
    that is excellent blog. An excellent read. I’ll certainly be
    back.

  4. January 9th, 2025 at 07:11 | #4

    Each lendder has its personal software, so the specific necessities might vary.

  5. January 9th, 2025 at 07:19 | #5

    Thanks for your marvelous posting! I actually enjoyed reading it, you might be a great author.I will make certain to bookmark your blog and will eventually come back in the future.
    I want to encourage you to continue your great posts,
    have a nice morning!

  6. January 9th, 2025 at 07:32 | #6

    job includes in fact, in order to dial possible much
    weight by eating cells and cell people, that less than cells character, and avoiding
    more overall, who able to eat the https://mill-wiki.win/index.php/Theickabogcompetitioncom.

  7. January 9th, 2025 at 07:48 | #7

    New Payment Technology Solutions For 2012 Davao

  8. January 9th, 2025 at 07:50 | #8

    You can certainly see your enthusiasm within the work you
    write. The world hopes for even more passionate writers such as you who
    aren’t afraid to mention how they believe.
    All the time go after your heart.

  9. January 9th, 2025 at 07:55 | #9

    Hi just wanted to give you a quick heads up and let you know
    a few of the pictures aren’t loading correctly.
    I’m not sure why but I think its a linking issue.

    I’ve tried it in two different internet browsers and both show the same results.

  10. January 9th, 2025 at 07:59 | #10

    You really make it seem so easy with your presentation but I find this matter to be actually
    something that I think I would never understand.
    It seems too complex and very broad for me.

    I am looking forward for your next post, I will try to get the hang of it!

  11. January 9th, 2025 at 08:17 | #11

    The Event Is Essentially The Most Important And Memorable Occasion HiOP

  12. January 9th, 2025 at 08:18 | #12

    Link exchange is nothing else however it is only placing the other person’s
    web site link on your page at appropriate place and other
    person will also do same for you.

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

    I like what you guys tend to be up too. This kind of clever work and reporting!
    Keep up the terrific works guys I’ve added you guys to my personal
    blogroll.

  14. January 9th, 2025 at 08:23 | #14

    Hey there, You’ve done an incredible job. I’ll certainly digg it and
    personally suggest to my friends. I am sure they’ll be benefited from this website.

  15. January 9th, 2025 at 08:24 | #15

    Ищете способ быстро решить финансовые вопросы?
    Наши кредиты — это именно то, что вам нужно!

    Никаких скрытых платежей, простая подача заявки и решение за 15 минут.

    Рассматриваем сумму от 10,000
    до 1,000,000 рублей. Гибкие условия погашения и низкие процентные ставки делают наши предложения выгодными.

    Не ждите, действуйте сейчас!
    Звоните и узнайте больше
    о своих возможностях!===>>
    РКО для бизнеса в Абакане

  16. January 9th, 2025 at 08:35 | #16

    I really love your site.. Very nice colors & theme.
    Did you develop this website yourself? Please reply back as I’m attempting to create my own personal site and want to know where
    you got this from or exactly what the theme is named.
    Thanks!

  17. January 9th, 2025 at 08:48 | #17

    Strip Club BUDAL

  18. January 9th, 2025 at 08:51 | #18

    Ayo mainkan peluang besar anda di LIGACOR untuk kaya dengan bermain game
    di website terbaik tanpa stress! Dapatkan info cuan mudah dan jadilah kaya secara otomatis

  19. January 9th, 2025 at 08:57 | #19

    Hello friends, how is the whole thing, and what you would like to say regarding this paragraph,
    in my view its in fact remarkable in favor
    of me.

  20. January 9th, 2025 at 09:00 | #20

    A motivating discussion is definitely worth comment.
    I do think that you should write more about this issue, it might not be a taboo
    matter but typically people do not talk about such subjects.
    To the next! All the best!!

  21. January 9th, 2025 at 09:21 | #21

    Hey! I’m at work surfing around your blog from my new iphone 4!
    Just wanted to say I love reading your blog and look forward
    to all your posts! Carry on the superb work!

  22. January 9th, 2025 at 09:41 | #22

    Swedish Massage 강남오피 (Marko)

  23. January 9th, 2025 at 10:00 | #23

    Максимальная надежность и качество
    с КСО Plast- выбор профессионалов.

  24. January 9th, 2025 at 10:04 | #24

    Thank you, I have recently been searching
    for information approximately this topic for ages and yours is
    the greatest I’ve came upon so far. But, what about the conclusion? Are you certain concerning the supply?

  25. January 9th, 2025 at 10:21 | #25

    A person necessarily lend a hand to make seriously articles I would state.
    This is the very first time I frequented your web page and up
    to now? I amazed with the research you made to create this particular submit incredible.
    Excellent process!

  26. January 9th, 2025 at 10:33 | #26

    I’m not that much of a online reader to be honest but
    your sites really nice, keep it up! I’ll go ahead and bookmark your website to come back later.

    Many thanks

  27. January 9th, 2025 at 10:35 | #27

    Шашлык с доставкой — ваш идеальный выбор для вкусного отдыха
    на природе! Мы предлагаем широкий ассортимент шашлыка из разных
    видов мяса, приготовленного по традиционным рецептам.
    Наша команда профессионалов заботится о качестве продукции и свежести ингредиентов.

    Закажите казань шашлык доставка прямо сейчас и наслаждайтесь настоящим
    вкусом Кавказа, не выходя из дома!

  28. January 9th, 2025 at 10:51 | #28

    Luxury1288

  29. January 9th, 2025 at 10:54 | #29

    Stunning quest there. What occurred after? Thanks!

  30. January 9th, 2025 at 11:04 | #30

    Greetings from California! I’m bored to tears at work
    so I decided to check out your blog on my iphone during lunch break.
    I enjoy the info you present here and can’t wait to
    take a look when I get home. I’m shocked at how fast your blog loaded on my phone ..
    I’m not even using WIFI, just 3G .. Anyways, very good blog!

  31. January 9th, 2025 at 11:29 | #31

    Hi i am kavin, its my first time to commenting anywhere, when i read this post
    i thought i could also make comment due to this brilliant piece
    of writing.

  32. January 9th, 2025 at 11:29 | #32

    Right away I am going to do my breakfast, afterward having my breakfast coming over again to read additional news.

  33. January 9th, 2025 at 11:35 | #33

    Hey there excellent blog! Does running a blog similar to this require a
    massive amount work? I have absolutely no expertise in programming but I was
    hoping to start my own blog in the near future. Anyways, should you have any ideas or techniques for new blog
    owners please share. I know this is off topic however I just wanted to ask.

    Appreciate it!

  34. January 9th, 2025 at 11:42 | #34

    Tips On Hiring A Marriage Dj HiOP

  35. January 9th, 2025 at 11:49 | #35

    I used to be suggested this web site by way of my cousin. I’m not positive whether this put up is written by means of
    him as nobody else recognize such detailed about
    my problem. You are amazing! Thanks!

  36. January 9th, 2025 at 11:52 | #36

    Hi mates, good paragraph and good urging commented at this place, I am really
    enjoying by these.

  37. January 9th, 2025 at 11:59 | #37

    hello there and thank you for your information – I have definitely picked up anything new from right here.
    I did however expertise some technical issues using this site, since I experienced to reload the
    web site a lot of times previous to I could get it to
    load correctly. I had been wondering if your web hosting is OK?
    Not that I’m complaining, but slow loading instances times will very frequently affect your placement in google and could damage your high quality score if ads and marketing with Adwords.
    Well I am adding this RSS to my e-mail and can look out for
    a lot more of your respective interesting content.
    Ensure that you update this again very soon.

  38. January 9th, 2025 at 12:13 | #38

    If you want to increase your familiarity just keep visiting this
    site and be updated with the most recent gossip posted here.

  39. January 9th, 2025 at 12:20 | #39

    Hey! This is my 1st comment here so I just
    wanted to give a quick shout out and say I really enjoy reading through your blog posts.
    Can you suggest any other blogs/websites/forums that cover the same topics?
    Thank you!

  40. January 9th, 2025 at 12:25 | #40

    An intriguing discussion is definitely worth comment.
    I do believe that you need to write more
    on this issue, it may not be a taboo subject but typically folks don’t speak about such topics.

    To the next! Best wishes!!

  41. January 9th, 2025 at 12:39 | #41

    Clubbing 오피커뮤니티

  42. January 9th, 2025 at 12:49 | #42

    I could not resist commenting. Well written!

  43. January 9th, 2025 at 13:33 | #43

    I really like what you guys are usually up too. This type of clever work and reporting!
    Keep up the very good works guys I’ve included you guys to my
    own blogroll.

Comment pages
1 70 71 72 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