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 28th, 2025 at 08:14 | #1

    I think this is among the most significant info for me. And i’m glad reading your
    article. But want to remark on few general things, The site style is great, the articles is really excellent : D.
    Good job, cheers

  2. January 28th, 2025 at 08:23 | #2

    A name that accurately describes the services you provide can make it easier for possible customers to realize fact that your company is like a https://www.instagram.com/beautystudio_by_veronika.

  3. January 28th, 2025 at 08:24 | #3

    Very nice post. I just stumbled upon your blog and wanted
    to say that I’ve truly enjoyed surfing around your blog posts.
    After all I’ll be subscribing to your feed and I
    hope you write again very soon!

  4. January 28th, 2025 at 08:25 | #4

    Fastidious answers in return of this matter with real
    arguments and describing everything regarding that.

  5. January 28th, 2025 at 08:30 | #5

    Way cool! Some very valid points! I appreciate you writing this post and also the rest of
    the site is also very good.

  6. January 28th, 2025 at 09:09 | #6

    As a multi-car school I needed a system where I
    could be more efficient for our instructors.

  7. January 28th, 2025 at 09:14 | #7

    Hey there would you mind sharing which blog platform you’re using?
    I’m going to start my own blog soon but
    I’m having a hard time making a decision between BlogEngine/Wordpress/B2evolution and
    Drupal. The reason I ask is because your layout seems different then most blogs and I’m looking for something
    unique. P.S Sorry for getting off-topic but I had to ask!

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

    Wow, superb blog layout! How long have you been blogging for?

    you make blogging look easy. The overall look of your site is excellent,
    as well as the content!

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

    I’m not sure where you’re getting your info, but good topic.
    I needs to spend some time learning much more or understanding more.
    Thanks for magnificent info I was looking for this information for
    my mission.

  10. January 28th, 2025 at 09:23 | #10

    It’s actually a nice and useful piece of info. I’m glad that you shared this useful info with us.
    Please stay us informed like this. Thanks for sharing.

  11. January 28th, 2025 at 09:34 | #11

    التنقل في كازينو YYY بديهي كاستخدام تطبيق
    التوصيل المفضل لديك، حتى لو كنت لا تجيد التكنولوجيا.
    الواجهة المُحسنة للجوال تتيح لك الوصول إلى ألعابك في أي وقت ومن أي مكان، بتصميم أنيق
    وسهل الاستخدام. إليك نظرة سريعة
    على ما يميز كازينو YYY:

    تصميم موقع أنيق: الصفحة الرئيسية ترحب بك بمظهر احترافي ومكافآت مُبرزة برسومات جذابة.

    سهولة التنقل: قائمة واضحة توجهك إلى مكتبة الكازينو، العروض الترويجية، البرنامج الخاص بالأعضاء المميزين،
    والمراهنات الرياضية بكل سهولة.

    إمكانية الوصول الشاملة: من الألعاب المباشرة
    إلى دعم العملاء وطرق الدفع، كل شيء على بُعد بضع نقرات فقط.

    ميزات المراهنات الرياضية: تغيير الاحتمالات سهل كتغيير رأيك حول
    الذهاب إلى الجيم. والتنق ل في أسواق الرياضة؟ نسيم، خاصةً
    إذا كنت تستمتع بإثارة المطاردة.
    أداء الموقع الرائع: تجربة سلسة للمستخدمين مضمونة
    بفضل سرعات التحميل السريعة
    للموقع وتصميمه اللا تشوبه شائبة.

    تؤكد الخطة المدروسة جيدًا والميزات المتقدمة على مكانة كازينو YYY
    كمنافس رائد في صناعة الكازينوهات عبر الإنترنت، خاصةً في آسيا حيث
    يُعتبر معروفًا بواجهته البديهية ولعبه السريع للغاي

  12. January 28th, 2025 at 09:41 | #12

    My brother recommended I might like this website. He was totally right.

    This post truly made my day. You can not imagine simply how much time I had spent for this information! Thanks!

  13. January 28th, 2025 at 09:41 | #13

    I want to to thank you for this wonderful read!! I definitely enjoyed every
    bit of it. I’ve got you bookmarked to look at new stuff you
    post…

  14. January 28th, 2025 at 09:45 | #14

    We are a group of volunteers and starting a new scheme in our community.
    Your site offered us with valuable information to work on.
    You have done a formidable job and our whole community will
    be thankful to you.

  15. January 28th, 2025 at 10:15 | #15

    I got this website from my friend who informed me regarding this website and at the moment this time I am browsing this web page and reading very informative content at this place.

  16. January 28th, 2025 at 10:17 | #16

    Right now it seems like Expression Engine is the preferred blogging platform available right now.
    (from what I’ve read) Is that what you’re using on your blog?

  17. January 28th, 2025 at 10:20 | #17

    This article gives clear idea in support of the new users of
    blogging, that in fact how to do blogging.

  18. January 28th, 2025 at 10:34 | #18

    Helpful info. Fortunate me I discovered your site by chance, and I am stunned why
    this coincidence didn’t took place in advance! I bookmarked it.

  19. January 28th, 2025 at 10:49 | #19

    Having read this I thought it was rather informative.
    I appreciate you finding the time and effort to put this content together.
    I once again find myself spending way too much time
    both reading and posting comments. But so what,
    it was still worth it!

  20. January 28th, 2025 at 11:19 | #20

    I savor, cause I found exactly what I was taking a look for.
    You have ended my 4 day lengthy hunt! God Bless you man. Have a nice day.
    Bye

  21. January 28th, 2025 at 11:27 | #21

    Hello just wanted to give you a quick heads up. The text in your content seem to be running off the screen in Firefox.

    I’m not sure if this is a formatting issue or something to
    do with internet browser compatibility but I thought I’d post to let
    you know. The layout look great though! Hope you get the problem solved soon. Many thanks

  22. January 28th, 2025 at 11:35 | #22

    I know this if off topic but I’m looking into starting my own weblog
    and was wondering what all is needed to get setup? I’m assuming having a blog like yours would cost a pretty penny?
    I’m not very internet smart so I’m not 100% sure.
    Any suggestions or advice would be greatly appreciated.
    Thank you

  23. January 28th, 2025 at 11:41 | #23

    There’s certainly a great deal to know about this subject.
    I really like all the points you made.

  24. January 28th, 2025 at 11:41 | #24

    I am regular visitor, how are you everybody? This paragraph posted at this
    site is actually good.

  25. January 28th, 2025 at 11:50 | #25

    Hello! Would you mind if I share your blog with my zynga group?
    There’s a lot of people that I think would really appreciate your content.
    Please let me know. Cheers

  26. January 28th, 2025 at 11:51 | #26

    I go to see everyday some sites and information sites to read content,
    however this weblog presents quality based articles.

  27. January 28th, 2025 at 11:56 | #27

    Cool blog! Is your theme custom made or did you download it from somewhere?
    A theme like yours with a few simple adjustements would really make my blog jump out.
    Please let me know where you got your design. With thanks

  28. January 28th, 2025 at 11:58 | #28

    Very nice blog post. I certainly appreciate this site. Continue the good work!

  29. January 28th, 2025 at 12:05 | #29

    Do you have any video of that? I’d care to find out more details.

  30. January 28th, 2025 at 12:20 | #30

    Hey There. I found your blog using msn. This is an extremely well written article.
    I’ll make sure to bookmark it and return to read more of
    your useful info. Thanks for the post. I’ll definitely comeback.

  31. January 28th, 2025 at 12:35 | #31

    I like looking through an article that can make people think.

    Also, thanks for permitting me to comment!

  32. January 28th, 2025 at 13:59 | #32

    This site definitely has all of the information and facts I needed concerning this subject and didn’t know who
    to ask.

  33. January 28th, 2025 at 14:13 | #33

    Hmm is anyone else having problems with the pictures on this blog loading?
    I’m trying to figure out if its a problem on my end or if
    it’s the blog. Any responses would be greatly appreciated.

  34. January 28th, 2025 at 14:15 | #34

    When selecting an instructor, their schedule should work with yours—not the other
    way around.

  35. January 28th, 2025 at 14:18 | #35

    We’re a professional body of working ADIs who have created a supportive space to train,
    represent, inform and protect driving instructors.

  36. January 28th, 2025 at 14:19 | #36

    Hi, its nice article concerning media print, we all be
    familiar with media is a wonderful source of data.

  37. January 28th, 2025 at 14:25 | #37

    The driving lessons start and finish at a location convenient to you.

  38. January 28th, 2025 at 14:55 | #38

    Magnificent beat ! I wish to apprentice while you amend your website, how can i subscribe for a blog web site?

    The account helped me a acceptable deal. I had been a little bit acquainted of this your
    broadcast offered bright clear idea

  39. January 28th, 2025 at 15:32 | #39

    Whiskey Bar 잠실오피

  40. January 28th, 2025 at 15:41 | #40

    169Cuan merupakan link slot gacor situs terpercaya sepanjang tahun 2025

  41. January 28th, 2025 at 15:52 | #41

    I am curious to find out what blog platform you’re using?
    I’m experiencing some minor security issues with my
    latest site and I’d like to find something more safeguarded.
    Do you have any recommendations?

  42. January 28th, 2025 at 16:21 | #42

    Strip Club 하이오피

  43. January 28th, 2025 at 16:37 | #43

    Learning to drive in a manual car is not for everyone – for many people, automatic driving lessons
    are a better option.

  44. January 28th, 2025 at 16:56 | #44

    Hi there to every one, because I am in fact eager of reading this webpage’s post to
    be updated regularly. It includes good stuff.

  45. January 28th, 2025 at 17:05 | #45

    It’s a great feeling to pass your test and get on the road
    – a big well done to Jen from all of us at RED.

  46. January 28th, 2025 at 17:09 | #46

    At Ltrent, we are fully insured and all our instructors have passed police and
    working with children checks.

  47. January 28th, 2025 at 17:18 | #47

    The whole system provides everything both the instructors
    and pupils need.

  48. January 28th, 2025 at 17:18 | #48

    To do this, you must complete a mutual recognition form and provide the required documentation as outlined in that
    form.

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

    The most common catch is that they make you sign a contract where
    you agree to pay their franchise fee for 6 to
    24 months.

  50. January 28th, 2025 at 17:20 | #50

    Lots of people didn’t start learning then which created a concertina effect where it now seems more people
    than ever are starting.

Comment pages
1 144 145 146 147 148 153 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
  40. January 21st, 2025 at 19:12 | #40
  41. January 21st, 2025 at 19:27 | #41
  42. January 21st, 2025 at 21:18 | #42
  43. January 21st, 2025 at 21:20 | #43
  44. January 21st, 2025 at 21:34 | #44
  45. January 21st, 2025 at 22:46 | #45
  46. January 21st, 2025 at 23:10 | #46
  47. January 21st, 2025 at 23:38 | #47
  48. January 22nd, 2025 at 01:51 | #48
  49. January 22nd, 2025 at 03:06 | #49
  50. January 22nd, 2025 at 03:11 | #50
  51. January 22nd, 2025 at 05:36 | #51
  52. January 22nd, 2025 at 07:18 | #52
  53. January 22nd, 2025 at 08:20 | #53
  54. January 22nd, 2025 at 08:48 | #54
  55. January 22nd, 2025 at 08:49 | #55
  56. January 22nd, 2025 at 08:54 | #56
  57. January 22nd, 2025 at 09:01 | #57
  58. January 22nd, 2025 at 09:06 | #58
  59. January 22nd, 2025 at 09:45 | #59
  60. January 22nd, 2025 at 09:59 | #60
  61. January 22nd, 2025 at 10:50 | #61
  62. January 22nd, 2025 at 11:00 | #62
  63. January 22nd, 2025 at 11:35 | #63
  64. January 22nd, 2025 at 14:26 | #64
  65. January 22nd, 2025 at 15:11 | #65
  66. January 22nd, 2025 at 15:29 | #66