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

    Urban Nightlife OP

  2. January 19th, 2025 at 15:13 | #2

    Remarkable things here. I’m very happy to look your article.
    Thank you a lot and I am looking forward to contact
    you. Will you kindly drop me a e-mail?

  3. January 19th, 2025 at 15:15 | #3

    How November 23 At Poker – Develop Your Poker Face 4989 다바오

  4. January 19th, 2025 at 15:19 | #4

    Loughery was head coach of the Bulls for two seasons …
    1983-84 and 1984-85. His two year record with the team was 65-99.

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

    Its like you read my mind! You seem to know so much about this,
    like you wrote the book in it or something. I think that you
    can do with a few pics to drive the message home a little bit,
    but instead of that, this is great blog. An excellent read.
    I will certainly be back.

  6. January 19th, 2025 at 15:37 | #6

    Xpsrt Fouhdation Repair
    Río Grande Valley, TX 78582, United Ѕtates
    9562653062
    foundation 1 reviews

  7. January 19th, 2025 at 15:44 | #7

    Retirement In Palm Beach Gardens Florida 광주알밤

  8. January 19th, 2025 at 15:51 | #8

    Gold Coins are used only to play for fun and can in no way be redeemed or cashed out.

    Here is my page … http://hottv.in/@gudruncosta706?page=about

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

    Difficult people not only defy logic but also create unnecessary complexity, conflicts and stress.
    They could be small in number but could create a significant impact.
    Attend this upcoming webinar and learn strategies to identify different
    types of difficult people and tricks to manage them.

    AREAS COVERED

    What do you do when you encounter a difficult person

    The presentation gives you action steps and processes
    that work

    Analyze your reaction – what do you have control over

    What makes it difficult for you?

    What is the problem from your perspective?

    Strategies and steps to manage and handle the situation

    Business communication and styles

    Learn how to identify a difficult boss

    Common Mistakes people make with difficult bosses

    Ways to be Manage the difficult boss

    LEARNING OBJECTIVES

    Steps to handle the different types of difficult people

    Identify the different types of difficult people

    Speaker Profile

    Valerie Pelan provides her clients a strategic and global perspective that combines her business experience with a current view
    of the competitive environment.

    Valerie Pelan provides her clients a strategic and global perspective that combines her
    business experience with a current view of the competitive environment.
    As President of Integrated Focus, she provides executive
    coaching on leadership areas such as executive presence, career transitioning and leading change.
    Her breadth of experience as a business advisor spans Fortune 100 companies, government agencies and
    non-profit Boards. Some of her recent clients are Hyatt,
    Novation, AAFES, PepsiCo, AT&T, Bureau of Labor Statistics, Perot Museum, and UTD
    Executive MBA program.

    Valerie was featured in Jan. 2009 Dallas Business Journal: “Two Minutes with Leadership Guru”.
    Her clients agree she provides a strategic perspective on leadership that improves a person’s
    performance and positively impacts their career and business results.

    Valerie’s 20+ years of leadership experience includes strategic
    organizational areas: product management, competitive and financial analysis, regulatory affairs and new service implementation. This breadth of business acumen enriches her executive leadership
    development and consulting processes. Her clients like her thought provoking and purposeful solutions to their current business challenges.

    About Training Doyens

    Based in Colorado, Training Doyens organizes world class webinars and seminars, providing
    training solutions to companies big and small. We offer affordable pricing and customization at any budget.

    For more detail please click on this below link:

    website

    Email: [email protected]

    Toll Free: +1-888-300-8494

    Tel: +1-720-996-1616

    Fax: +1-888-909-1882

    Valerie Pelan provides her clients a strategic and
    global perspective that combines her business experience with a current view of the competitive environment.
    As President of Integrated Focus, she provides executive coaching
    on leadership areas such as executive presence,
    career transitioning and leading change.

  10. January 19th, 2025 at 16:12 | #10
  11. January 19th, 2025 at 16:16 | #11

    Fantastic site. A lot of useful info here. I’m sending
    it to several buddies ans also sharing in delicious. And certainly, thank you to
    your sweat!

  12. January 19th, 2025 at 16:17 | #12

    Modern technologies have reached such a level that the existing theory ensures the relevance of the mass participation system. There is a controversial point of view that is approximately as follows: the elements of the political process are ambiguous and will be combined into entire clusters of their own kind.

  13. January 19th, 2025 at 16:18 | #13

    Small Town Business Marketing 하이오피사이트

  14. January 19th, 2025 at 16:18 | #14

    Relieve Tension Headaches With A Hot Tub 부산달리기 (Freddy)

  15. January 19th, 2025 at 16:27 | #15

    I am really enjoying the theme/design of your
    site. Do you ever run into any browser compatibility issues?
    A few of my blog visitors have complained about my site not operating
    correctly in Explorer but looks great in Safari. Do you have any recommendations to help fix this problem?

  16. January 19th, 2025 at 16:43 | #16

    I take pleasure in, cause I found exactly what I was having a
    look for. You have ended my 4 day long hunt! God Bless you
    man. Have a great day. Bye

  17. January 19th, 2025 at 16:51 | #17

    What’s up, everything is going nicely here and ofcourse every
    one is sharing information, that’s really excellent, keep up writing.

  18. January 19th, 2025 at 17:17 | #18

    Signature Drinks 울산

  19. January 19th, 2025 at 17:21 | #19

    Thanks for sharing your thoughts about Canada law List.

    Regards

  20. January 19th, 2025 at 17:23 | #20

    Hi there Dear, are you really visiting this web page daily, if so then you will definitely get fastidious knowledge.

  21. January 19th, 2025 at 17:24 | #21

    Private Party OP

  22. January 19th, 2025 at 17:24 | #22

    Investing With Your Creative Trust Bank 페르소나 5 얄 다바오 트 (https://vadaszapro.eu/user/profile/1509452)

  23. January 19th, 2025 at 17:28 | #23

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

  24. January 19th, 2025 at 17:43 | #24

    Pretty nice post. I just stumbled upon your weblog and wished to say that I’ve really enjoyed surfing around your
    blog posts. In any case I’ll be subscribing to your rss feed and I hope you write again soon!

  25. January 19th, 2025 at 17:51 | #25

    Entertainment 잠실오피

  26. January 19th, 2025 at 18:00 | #26

    Tests- vs Pak

    ODI’s- vs Aus

  27. January 19th, 2025 at 18:09 | #27

    The Truth About Unique Wedding Reception Venues – Knowledge Is Power 광주키스방

  28. January 19th, 2025 at 18:18 | #28

    What’s up, just wanted to tell you, I loved this article. It was practical.
    Keep on posting!

  29. January 19th, 2025 at 18:28 | #29

    Choose Mindful Yourself . Free Voucher For An Experience To The Exclusive Clapham Clubs 마사지

  30. January 19th, 2025 at 18:56 | #30

    Рекомендую по теме – лучшие плетеные лески

  31. January 19th, 2025 at 18:59 | #31

    Will The Internet Quiz Increase The Risk For Old Fashioned Printed Quiz Obsolete?

    다바오 (http://Cgi2.bekkoame.ne.jp/cgi-bin/User/U85488/cgi-bin/douraku.cgi?file=3“>)

  32. January 19th, 2025 at 19:06 | #32

    Great Solution For Your Sleepless Nights 마사지

  33. January 19th, 2025 at 19:07 | #33

    Late Night Fun 강남오피

  34. January 19th, 2025 at 19:10 | #34

    Chill Zone 하이오피

  35. January 19th, 2025 at 19:25 | #35

    This is the right webpage for anyone who hopes to understand this topic.
    You realize so much its almost tough to argue with you (not that I
    really would want to…HaHa). You certainly put a fresh spin on a subject that has been discussed
    for ages. Great stuff, just wonderful!

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

    I’m impressed, I must say. Seldom do I come across a blog
    that’s equally educative and amusing, and without a doubt, you’ve hit the nail on the head.
    The problem is something that too few men and women are speaking intelligently about.
    I’m very happy I came across this during my hunt for something
    relating to this.

  37. January 19th, 2025 at 19:52 | #37

    Today, I went to the beachfront with my children. I found a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.”
    She put the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear.
    She never wants to go back! LoL I know this is completely off topic but
    I had to tell someone!

  38. January 19th, 2025 at 19:52 | #38

    How To Develop A WordPress Ecommerce Website Store davao

  39. January 19th, 2025 at 19:53 | #39

    Signature Drinks Budal

  40. January 19th, 2025 at 20:03 | #40

    Philadelphia Nightlife And Nightclubs 밤문화, Waylon,

  41. January 19th, 2025 at 20:08 | #41

    Karaoke Bar 하이오피

  42. January 19th, 2025 at 20:12 | #42

    Hey there! Would you mind if I share your
    blog with my facebook group? There’s a lot of folks that I think would really enjoy your content.
    Please let me know. Many thanks

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

    Understanding Internet Banner Advertising 다바오머니

  44. January 19th, 2025 at 20:26 | #44

    When someone writes an paragraph he/she retains the idea of a user in his/her
    brain that how a user can understand it. So that’s why this
    post is amazing. Thanks!

  45. January 19th, 2025 at 20:27 | #45

    A Review On Email Go Getter System (Eggs) 다바오 (Brianna)

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

    Wonderful blog! I found it while browsing on Yahoo News.

    Do you have any tips on how to get listed in Yahoo News? I’ve been trying for a while but I never seem
    to get there! Thanks

  47. January 19th, 2025 at 20:52 | #47

    Karaoke Bar HiOP

  48. January 19th, 2025 at 20:59 | #48

    Excellent post. I used to be checking constantly this
    blog and I’m impressed! Extremely helpful info specially the ultimate part :
    ) I care for such information a lot. I used to be seeking this particular info for a long time.

    Thank you and good luck.

  49. January 19th, 2025 at 21:00 | #49

    How In Order To Locate The Perfect Party Venue For Your Work Christmas Party 하이오피사이트

  50. January 19th, 2025 at 21:07 | #50

    Hello Dear, are you truly visiting this web site on a regular basis, if so after that you will absolutely get nice know-how.

Comment pages
1 112 113 114 115 116 147 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