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. May 24th, 2014 at 21:11 | #1

    WOW just what I was looking for. Came here by searching for x

  2. May 26th, 2014 at 16:36 | #2

    Are you currently in search for plumbers Rotherham or for
    electricians Rotherham. You must take care of various things before fixing ceiling
    fan on the ceiling of the room. When the fan is clean
    you want to take the pillowcase outside, turn it inside out and shake out
    the dust.

  3. May 27th, 2014 at 14:23 | #3

    We absolutely love your blog and find many of your post’s
    to be what precisely I’m looking for. Do you offer guest writers
    to write content in your case? I wouldn’t mind creating a post
    or elaborating on most of the subjects you write regarding here.
    Again, awesome blog!

  4. May 27th, 2014 at 15:02 | #4

    Hello, the whole thing is going well here and ofcourse every one is sharing facts, that’s actually fine, keep
    up writing.

  5. May 27th, 2014 at 19:31 | #5

    I think that what youu said was actually very logical.
    However, what about this? what if you wrote a catchier post
    title? I am nnot suggestimg your information is not good., butt what if you added a headline to maybe grab folk’s attention? I mean Flex 4:
    Changing the

  6. May 27th, 2014 at 22:17 | #6

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

  7. May 28th, 2014 at 15:00 | #7

    This blog was… how do you say it? Relevant!!
    Finally I’ve found something that helped me. Appreciate it!

  8. May 29th, 2014 at 05:54 | #8

    I really like it when people come together and share ideas.
    Great website, continue the good work!

  9. May 30th, 2014 at 07:21 | #9

    I am in fact glad to glance at this website posts which carries tons of useful information, thanks for providing these data.

  10. May 31st, 2014 at 07:00 | #10

    What’s up, everything is going sound here and ofcourse
    every one is sharing facts, that’s in fact good,
    keep up writing.

  11. June 3rd, 2014 at 20:27 | #11

    The Rippln mobile app is a new age of smartphone app which will allow
    you to build your own ripple simply by doing what you
    would probably do anyway. But did you know just how much the world loves this app.

    As you advance within the Angry Birds game, you are going to come
    across with objects like explosives and rocks which you can make
    use of to eliminate the pigs.

  12. June 5th, 2014 at 11:20 | #12

    If some one wishes to be updated with hottest technologies afterward he must be go to see this web page and be up to date
    everyday.

  13. June 7th, 2014 at 07:25 | #13

    Every weekend i used to pay a quick visit this website, for
    the reason that i wish for enjoyment, since this this site conations really fastidious funny stuff too.

  14. June 7th, 2014 at 23:32 | #14

    What’s up to all, it’s actually a pleasant for me to pay a quick visit this web site, it includes helpful Information.

  15. June 8th, 2014 at 19:23 | #15

    Can I just say what a relief to find somebody that
    truly understands what they are discussing on the internet.
    You certainly know how to bring a problem to light and make it
    important. More people need to read this and understand this side of the story.
    I can’t believe you’re not more popular because you definitely
    possess the gift.

  16. June 11th, 2014 at 05:04 | #16

    Hi there just wanted to give you a quick heads up.
    The words 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 browser compatibility but
    I thought I’d post to let you know. The design and
    style look great though! Hope you get the issue resolved soon. Cheers

  17. June 13th, 2014 at 01:08 | #17

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

  18. June 15th, 2014 at 16:05 | #18

    I am actually happy to glance at this web site posts
    which contains lots of helpful information, thanks for providing
    these kinds of data.

  19. June 15th, 2014 at 18:46 | #19

    Very good article! We will be linking to this great content on our
    website. Keep up the great writing.

  20. June 27th, 2014 at 04:45 | #20

    Few hosting services offer, free domain, free email marketing softwares,
    credits in Ad – Words account, etc. Web development essentially is the
    earlier step before the web hosting comes into picture. There are even some companies that have so much going on through the web
    that they end up needing to have their own website hosting service.

  21. June 29th, 2014 at 18:00 | #21

    I always used to study paragraph in news papers but now as I am
    a user of web therefore from now I am using net for articles or reviews, thanks to web.

  22. July 21st, 2014 at 07:38 | #22

    It’s a pity you don’t have a donate button! I’d definitely donate to this outstanding blog!
    I suppose for now i’ll settle for book-marking and adding your RSS feed to
    my Google account. I look forward to fresh updates and will talk about this
    website with my Facebook group. Talk soon!

  23. July 21st, 2014 at 17:21 | #23

    Ƭhis websitе offer you cost-free 50 free hotmail accounts.

  24. July 24th, 2014 at 19:27 | #24

    Hey I know this is off topic but I was wondering if
    you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates.
    I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this.
    Please let me know if you run into anything. I truly enjoy
    reading your blog and I look forward to your new updates.

  25. July 26th, 2014 at 02:51 | #25

    Hey there just wanted to give you a brief heads
    up and let you know a few of the images aren’t loading properly.
    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
    outcome.

  26. July 27th, 2014 at 22:16 | #26

    Thanks , I have just been looking for information about this topic for a long time and yours is the best I
    have discovered till now. However, what inn regards to
    the bottom line? Are you certain about the supply?

  27. July 31st, 2014 at 14:21 | #27

    I’m not sure exactly why but this blog is loading extremely slow for me.
    Is anyone else having this issue or is it a problem on my end?
    I’ll check back later and see if the problem still exists.

  28. August 4th, 2014 at 11:49 | #28

    Pou montre li itilize nan dwog oswa medikaman yo ka diferan analiz toksik fet.

    In our house with just two adults, we call
    for hot water about 60 hours a month ‘ that is over 600 hours a month we are not heating water.

    Of course, Miu is truth be told there and additionally leading to situations consequently it gets to be a
    much more known.

  29. August 5th, 2014 at 07:01 | #29

    This fruit is highly perishable aand it has only recently
    become very popular in North America in 2005. What happens is a very powerful punch, soo called benefits of the planet right?
    When shopping about you? The darkish circle remedy products
    will tell you how you feel that yyou have lapsed into a costly monthly commitment.
    Will it burn fat more efficiently opeerating digestive tract.

  30. August 10th, 2014 at 19:46 | #30

    Getting elixir, jewels and gold can never be
    this simple. Best of, the decision to fight towards NPC trolls licenses Clash of
    Clans hack an other than unassuming edge in abundance of relative structure redirections that
    will depend about all around about player-versus-player succeed.
    And produce countless barracks you are entitled so you’re able to turn out those barbarians faster.

  31. August 10th, 2014 at 19:49 | #31

    Hi there to all, the contents existing at this
    website are in fact amazing for people knowledge,
    well, keep up the nice work fellows.

  32. August 12th, 2014 at 04:10 | #32

    Hi there, this weekend is pleasant in support of me, as this moment i am reading this great informative
    post here at my home.

  33. August 12th, 2014 at 13:26 | #33

    Attractive part of content. I simply stumbled upon your website and in accession capital to claim that
    I acquire in fact loved account your blog posts.
    Any way I will be subscribing for your augment or even I achievement you get entry to consistently fast.

  34. August 12th, 2014 at 23:46 | #34

    After I originally commented I seem to have clicked the -Notify me
    when new comments are added- checkbox and now whenever a
    comment is added I recieve four emails with the same comment.
    Is there an easy method you are able to remove me from that
    service? Thanks a lot!

  35. August 13th, 2014 at 09:59 | #35

    Truly no matter if someone doesn’t know afterward its up to other visitors that they
    will assist, so here it takes place.

  36. August 13th, 2014 at 13:44 | #36

    I’m impressed, I must say. Seldom do I come across a blog that’s equally educative and engaging, and
    let me tell you, you’ve hit the nail on the head.
    The problem is something too few people are speaking intelligently about.
    Now i’m very happy I stumbled across this during my hunt for
    something concerning this.

  37. August 14th, 2014 at 20:10 | #37

    Excellent post. I was checking constantly this blog and I am impressed!
    Extremely useful info particularly the last part :) I care for such info
    much. I was looking for this particular info for a long time.

    Thank you and best of luck.

  38. August 15th, 2014 at 05:17 | #38

    Hey just wanted to give you a quick heads up and llet you know a few
    of the pictures aren’t loading properly. I’m not sure why but I think iits a linking issue.
    I’ve tried it in two different browsers and both
    show the same outcome.

  39. August 15th, 2014 at 19:27 | #39

    What a stuff of un-ambiguity and preserveness of
    valuable know-how on the topic of unpredicted feelings.

  40. August 16th, 2014 at 12:31 | #40

    Wow, that’s what I was looking for, what
    a material! present here at this weblog, thanks admin of this web site.

  41. August 16th, 2014 at 19:34 | #41

    hi!,I like your writing very much! share we keep in touch extra about your article on AOL?

    I require an expert in this house to solve my problem.
    Maybe that’s you! Taking a look ahead to see you.

  42. August 17th, 2014 at 06:00 | #42

    I loved as much as you’ll receive carried out right here. The sketch is tasteful, your
    authored material stylish. nonetheless, you command get got an edginess over that you wish be
    delivering the following. unwell unquestionably come more formerly again as exactly the same nearly a lot often inside case you shield this increase.

  43. August 17th, 2014 at 17:15 | #43

    Whats up are using WordPress for your site platform?
    I’m new to the blog world but I’m trying to get started and create my
    own. Do you need any html coding knowledge to make your
    own blog? Any help would be greatly appreciated!

  44. August 17th, 2014 at 20:35 | #44

    Pretty section of content. I just stumbled upon your blog and in accession capital to assert that I get actually
    enjoyed account your blog posts. Anyway I’ll be subscribing to your augment and even I
    achievement you access consistently rapidly.

  45. August 18th, 2014 at 03:22 | #45

    I absolutely love your blog and find many of your post’s to be precisely what I’m looking for.

    can you offer guest writers to write content in your case?

    I wouldn’t mind writing a post or elaborating on most of the subjects you write concerning here.
    Again, awesome blog!

  46. August 18th, 2014 at 08:51 | #46

    Hiya! Quick question that’s completely off topic. Do you know how to make your site mobile friendly?
    My weblog looks weird when browsing from my apple iphone.
    I’m trying to find a template or plugin that might be able to resolve this problem.

    If you have any recommendations, please share. Thank you!

  47. August 18th, 2014 at 14:57 | #47

    So these three giants in their respective areas are giving it one last try and it will be interesting to see what comes
    out of it. You will probably have the most pleasant and hassle
    free times possible doing not just entering data but also engaging in similar activities
    like transferring of data files from device to another mobile phone handset or to even
    your PC or laptop. By installing banking Smartphone mobile
    apps from your phone, you can either pay through instant electronic payment
    or via a check.

  48. August 18th, 2014 at 17:36 | #48

    I was curious if you ever considered changing the page layout of your site?
    Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people could connect with it better.
    Youve got an awful lot of text for only having 1 or two pictures.
    Maybe you could space it out better?

  49. August 18th, 2014 at 18:48 | #49

    Sac Longchamp Pas Cher Prix Serviette Homme Longchamp ISJyU Questi kimono si SVRT
    incontrare nuove persone Hakan si prende spesso bellissimi esempi di prezzi ragionevoli (15
    000 o E) Altro hand.Tabi dividere Trippet calze di cotone
    per l’utilizzo con i sandali. Hakan effettivamente acquistare queste nuove minimo sforzo circa 500 in un negozio di abbigliamento, essi Urlaub 100 negozi hanno
    spesso zoccoli decorativi them.Zori Come giusto indossato con kimono.
    Soldes Longchamps Gatsby Longchamp szhJP Servizio serale sarà ancora aver luogo, l’acquisto di
    Schibsted a Glendale, California Mausoleo di Holly Terrace a Glendale Forest Lawn Memorial Park.

    (Da Stacey Newman, Nancy Grace Produttore). Trousse Longchamp Sac Longchamp Marron mNzUq Stelle d’acqua la strada per il regno di
    oro per comprare, Mosè per salvare il mondo
    da Arcadia blueskinned fata magica per controllare la sua lealtà, ha deciso di entrare nel labirinto di cristallo.
    La madre di Moussa Arcadia (morì molto giovane) e di stare insieme per sempre, o se ne vanno felici
    e acqua Star offre una scelta per raggiungere la fine.
    acheter Un Sac longchamp Station Saint Francois Longchamp DiZRg Scelta dell’editor di Danielle Fishel, stella,
    che fatica Cory e Topanga Matthews Tim Belusko TV può
    essere la vostra coppia preferita, ma nella vita reale, Danielle Fishel
    sposò un altro bambino a condividere con il mondo. Fishel, 32,
    legato il nodo con il suo fidanzato di circa cinque anni, ha detto Sabato, Tim Belusko,
    25, suo portavoce conferma la rivista People.. Besace Longchamp Pas
    Cher Besace Longchamps srVeO Lui è in forma, girare alcune teste e il suo agente lo trova lavoro giocando professionista di hockey e la Danimarca, la Germania, l’Inghilterra e Texas.But questo non è un romanzo di Tunisi,
    e la maggior parte di Danny esperienze con l’alcol e le donne inseguono aren per i giovani lettori.

    Eppure i giocatori giovani possono imparare lezioni
    importanti da McCoy storie circa il funzionamento interno di hockey competitiva, anche se queste storie tendono ad essere repetitious.McCoy può scrivere,
    e si avvolge il lettore in dettaglio: seduto in prima fila, con i
    capelli ancora bagnati dalla doccia, dimenando le dita
    dei piedi e godersi la prima mezz’ora di pattinaggio, quando le scarpe da ginnastica sentono
    come se fossero fatti di cuscini.

    Saint Francois Longchamp Location Longchamps.Fr kaJaT Pensate Twiggy incontra Audrey Hepburn, ha detto
    Karen Lichtin, che è anche il proprietario del tappo Cecil.
    Lui è, come prima, è un po ‘pulito, ma hanno uno spirito giocoso che funziona per una varietà di età.
    Longchamp Sac Besace Sac Pliage Longchamp Pas Cher kSorR (Può essere usato e
    mezza pinta vasetti o barattoli litro) di pellet di pastorizzazione in un bagno di acqua bollente per un’ora.
    Scolare e substrato colonizzato cool.Crumble si chiama ora uova, e mescolare
    bene con pellet di legno / sawdust.Load desiderato da camera composto di frutta e incubato a temperatura appropriata per la posa species.Once completato posizione della camera di frutta condizioni ottimali per il fungo.
    Sac Longchamps Solde Site Longchamp zwBWX Campana Motivator Mag
    Indoor Trainer biciclette (98,64 dollari)
    Hkan convertire facilmente moto vecchia (o nuova) in un maneggio allenatore indoor cycling.
    Essa ha anche resistenza maneggio coperto magnetica per fare poco più difficile.

  50. August 20th, 2014 at 05:21 | #50

    They can also erect commercial chain link fences and fit finials
    onto fence posts. The box will typically contain pre-cut and pre-drilled panels of
    melamine particle board, the required screws, feet and instructions.
    Moreover, select based on the decor – simple or ornate, colors- bright
    or subdued, plus the patterns – delicate or difficult, pick the
    kitchen tiles according on your taste.

Comment pages
1 2 3 4 5 6 17 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