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. June 12th, 2016 at 04:09 | #1

    Hi friends, how is all, and what you would like to say
    concerning this paragraph, in my view its genuinely awesome for me.

  2. June 12th, 2016 at 12:12 | #2

    Kisah Ibu Ibu Hot VEMALE.com
    Foto Ibu Ibu Hot, Video Ibu Ibu Hot vemale.com
    Video Ibu Ibu Hot – Perjalanan Sukses Ibu Ibu Hot vemale.com
    Rahasia Ibu Ibu Hot, Cerita Ibu Ibu Hot VEMALE.com

  3. June 15th, 2016 at 14:19 | #3

    Good blog you have got here.. It’s difficult to find excellent writing like yours these days.
    I honestly appreciate people like you! Take care!!

  4. June 16th, 2016 at 23:11 | #4

    Fine way of describing, and fastidious post to take facts concerning my presentation focus, which i am going
    to present in college.

  5. June 17th, 2016 at 02:21 | #5

    Were you arrested for domestic violence in the Los Angeles area.
    Just substitute that person with the person at the insurance company and you will have
    your answer. This will also help the person understand,
    what the questions are related to, and will be able to help you accordingly.

  6. June 19th, 2016 at 19:24 | #6

    Building An Authoritative WebsiteBuilding an authoritative website through search engine rankings.
    They might have noticed that the age of a site, link popularity and improve your website dedicated to your
    site, and they are just giving you the ins and outs of SEO.
    The way your seo from a good agency article, blog etc.

  7. June 21st, 2016 at 07:31 | #7

    However, if the case does need to go to a court, the lawyer will have the confidence and poise to speak to a judge and
    jury and explain the case in the favor of their client.
    Without the right attorney you will soon find yourself in debt with medical bills, and it will
    not be easy to pay those bills if you are not able to work in the mean time.
    If you were to use that as an indication of how well your case will
    be handled, then it is safe to assume that any discrepancies
    in evidence or circumstances regarding your case will not be discovered and you stand
    a higher percentage of being found guilty and being awarded the most severe punishments.

  8. June 21st, 2016 at 23:54 | #8

    I believe most attackers might expect to see a woman carrying Pepper Spray or Personal
    Alarm, but not a Stun Gun. Government cannot fill the void with more laws or increasing
    control over American lives. They are multi-functional tools of safety and not just self-defense weapons.

  9. June 24th, 2016 at 00:20 | #9

    As a rule of thumb, plan to replace the belt every 70,000 miles.
    Nobody wants to travel cramped for long hours at
    a time, so it pays to look at how spacious the leg room is in the car of your choice.
    There are forums that are dedicated to the type and make of the car you are interested to purchase.

  10. June 24th, 2016 at 06:41 | #10

    Pretty! This has been an extremely wonderful article. Thank you for supplying this information.

  11. June 25th, 2016 at 10:37 | #11

    Pengertian rambut ombre portman berbagi kapanlagi.com
    descendants of dan Apa itu merawat rambut KapanLagi.com
    Rambut lurus maudy ayunda, klasik para KAPANLAGI.COM
    Tentang model rambut baru – bagaikan karirnya yang KapanLagi.com
    Pengertian tutorial rambut – Pengertian sampo anti ketombe terbaik kapanlagi.com
    Maudy ayunda – foto model rambut KAPANLAGI.com
    Tentang gaya rambut baru – Mengenai cara merawat rambut kapanlagi.com
    Mengenai potong rambut, rambut ala KapanLagi.com
    Informasi rambut terbaru, Info rambut bob Kapanlagi.com
    Rambut bob – rambut bob KapanLagi.com
    Model rambut terbaru – oxford KapanLagi.com

  12. June 25th, 2016 at 11:45 | #12

    It’s going to be end of mine day, but before ending
    I am reading this impressive paragraph to increase my
    experience.

  13. June 26th, 2016 at 01:50 | #13

    La ponceuse excentrique 380 watts est dotée d’un moteur puissant pour un ponçage rapide et sans attempt et lustrage
    de surfaces courbes ou planes.

  14. July 5th, 2016 at 15:08 | #14

    A person recᥱntly askеd the Savings Mama һow to Ƅe a secret shopper, andd іn this montɦ’s ordeг, sɦe lets yⲟu knoѡ how.

    Mystery shoppers aгe аlѕo caⅼled “secret buyers,”
    “secret buyers,” “spotters” and “employee evaluators.

  15. July 9th, 2016 at 20:16 | #15

    I think that is one of the most significant information for me.
    And i’m glad reading your article. But wanna commentary on few basic issues, The website style is
    wonderful, the articles is in point of fact excellent : D.
    Excellent process, cheers

  16. July 10th, 2016 at 22:53 | #16

    Thankks for every other informative web site. Wheee else could I am getting that kind of information written in such an ideal way?
    I’ve a misson tthat I’m simply now running on, and
    I have been at the glance out for such info.

  17. July 14th, 2016 at 17:19 | #17

    You can use reply guideliness in advertising automation programs to better manage the replies back to your
    organization.

  18. July 14th, 2016 at 22:19 | #18

    The sale of pfoducts or services in you web site can generate gross sales that
    wwill mke the difference between success and failure.

  19. July 16th, 2016 at 18:14 | #19

    Executive suites are utilized by small tenants all the
    way in which as much as Fortune 500 companies.

  20. July 16th, 2016 at 22:57 | #20

    Be it a 2015 car great job in the news. Start at a starting price
    of the tradition, is a problem for you. Consider buying new cars,
    play sets, Cars 2 going global and taking on the price and this is a bad choice?

    People end up losing money due to the appropriate lender.

  21. July 20th, 2016 at 17:07 | #21

    Either method, a solid business plan full with market evaluation will be invaluable.

  22. July 21st, 2016 at 15:18 | #22

    There is obviously a bundle to realize about this. I feel
    you made various nice points in features also.

  23. July 22nd, 2016 at 18:12 | #23

    The simply drawback is, it is not readily available for Android
    os but develop it will be before long cuz there are more folks
    using Android os than iOS.

  24. July 24th, 2016 at 04:06 | #24

    The latter demonstrates significant reduction of curing time.

  25. July 25th, 2016 at 01:58 | #25

    Based in 1975, Zara has advanced into an enormous retailer that extends its attain across the globe by its person-friendly on-line shop and
    its in depth network of stylish retailers in lots of cities in numerous countries.

  26. July 25th, 2016 at 05:13 | #26

    Gourmet Marketing knows hhow you can design websites that excel at converting your web site visitors into prospects.

  27. July 27th, 2016 at 08:26 | #27

    Firstly, ensure you decide your herbs rewgularly during the rising season, and be sure to decide them in the
    suitable way.

  28. July 27th, 2016 at 15:21 | #28

    The antique and vintage jewellery gadgets on this eclectic mix caught my discerning eye due to their uniqueness, up to date feel or highly collectible nature.

  29. August 4th, 2016 at 17:48 | #29

    The 2016 Summer Olympics (Portuguese: Jogos Olímpicos de Verão de
    2016),[a] officially known as the Games of the XXXI Olympiad, and commonly known as Rio 2016, is a
    major international multi-sport event in the tradition of the Olympic Games as governed by the International Olympic Committee, being held in Rio
    de Janeiro, Brazil. Opening rounds in certain events began on 3 August 2016—two days before the opening ceremony, and the Games will formally run from 5 August to 21 August 2016.

    A record number of countries are participating in a
    record number of sports. More than 11,000 athletes from 206 National Olympic Committees
    (NOCs), including first time entrants Kosovo and South
    Sudan, are scheduled to take part.[1][2] With 306 sets of medals,
    the games will feature 28 Olympic sports—including rugby sevens and golf, which were added by the
    International Olympic Committee in 2009. These sporting

    Rio 2016 Olympic Games Cheat Hack No Survey

  30. August 8th, 2016 at 14:14 | #30

    Current Marketing, an Interpublic Group agency, has launched Akela, an influencer advertising and marketing appply that uses actual
    individuals andd modern technology too provide impactful outcomes for purchasers.

  31. August 11th, 2016 at 19:40 | #31

    Você não precisa ter incríveis habilidades manuais para criar
    presentes criativos Dia dos Namorados.

  32. August 13th, 2016 at 17:44 | #32

    Developing buyer personas is a helpful train when outlininng your
    marketing marketing campaign, messages and media.

  33. August 15th, 2016 at 00:45 | #33

    A advertising plan devised for a enterprise ought
    to be organized in a way, sucxh that it enhances the
    targets and sources of the organization.

  34. August 17th, 2016 at 12:34 | #34

    D 70 timeframe If the ‘you’ of the Works of Industry of All Nations,
    as well as the royal family, countries and regions in the form of music videos.
    At the beleuchtung messestand end of this kind of
    office spaces according to your TV set and start paying more attention towards World Trade Fair is
    held not less than 1.

  35. August 17th, 2016 at 17:19 | #35

    That iis the marvel of free web promoting that ccan be probably
    the greatest internet marketing methods.

  36. August 18th, 2016 at 07:19 | #36

    What’s Going down i’m new to this, I stumbled upoon this I have discovered It absolutely useful and it has helped me out loads.
    I’m hoping to contribute & aid other users like its helped me.
    Great job.

  37. August 18th, 2016 at 21:18 | #37

    If you wish for to improve your know-how just keep visiting this web
    ste and be uupdated with the most recent news posted
    here.

  38. August 20th, 2016 at 05:26 | #38

    Thank you for the good writeup. It in reality was once a
    enjoyment account it. Look complex to far delivered agreeable from you!
    However, how can we keep up a correspondence?

  39. August 21st, 2016 at 10:11 | #39

    fantastic points altogether, you just gained a new reader.
    What may you recommend in regards to your submit that you just made a few
    days ago? Any sure?

  40. August 21st, 2016 at 10:38 | #40

    Asking questions are in fact good thing if
    you are not understanding anything entirely, but this piece of writing provides fastidious
    understanding yet.

  41. August 21st, 2016 at 12:19 | #41

    I do not know whether it’s just me or if everybody else encountering
    issues with your site. It appears as though some of the text on your posts are
    running off the screen. Can someone else please provide feedback
    and let me know if this is happening to them as well? This
    may be a problem with my internet browser because I’ve had this happen previously.
    Cheers

  42. August 21st, 2016 at 16:27 | #42

    After going over a handful of the articles on your web site,
    I really appreciate your way of blogging. I saved
    as a favorite it to my bookmark webpage list and will be checking
    back in the near future. Please check out my web site
    as well and let me know your opinion.

  43. August 21st, 2016 at 22:39 | #43

    I know this site provides quality depending articles and other
    information, is there any other web site which provides these kinds of data
    in quality?

  44. August 22nd, 2016 at 08:05 | #44

    Whoa! This blog looҝѕ just ⅼike my old one! ӏt’s on a completely different topic
    ƅut іt haѕ pretty mucһ the ѕame layout andd design. Great
    choice ⲟf colors!

  45. August 22nd, 2016 at 14:39 | #45

    What’s up, after reading this amazing piece of writing i am as well
    delighted to share my experience here with
    friends.

  46. August 24th, 2016 at 21:00 | #46

    Ahaa, іts good dialogue оn the topic of tһis article here at thiѕ weblog,
    I have read aⅼl that, ѕo noᴡ me also commenting here.

  47. August 27th, 2016 at 09:57 | #47

    It’s aan awesome piece ⲟf writing in favor оf all the
    online visitors; tһey wіll take advantage from it I аm sure.

  48. September 1st, 2016 at 05:34 | #48

    Magnificent goods from you, man. I’ve understand your stuff
    previous to and you’re just extremely fantastic. I really like what you’ve acquired here, certainly like what you are
    stating and the way in which you say it. You make it enjoyable and you still care for to
    keep it smart. I can not wait to read much more from you. This
    is really a tremendous web site.

  49. September 6th, 2016 at 03:57 | #49

    Have you ever thought about writing an ebook or guest authoring
    on other blogs? I have a blog based on the
    same topics you discuss and would really like to have you share some
    stories/information. I know my viewers would value your
    work. If you’re even remotely interested, feel free to shoot me an e-mail.

  50. September 11th, 2016 at 17:40 | #50

    Line 4-13: This C code block is a user defined function (UDF) whose task is to print a horizontal line.

Comment pages
1 7 8 9 10 11 435
  1. March 19th, 2014 at 11:13 | #1
  2. April 30th, 2014 at 01:00 | #2