1 Reply Latest reply on Dec 21, 2009 1:07 PM by YorFlexGuy

    HELP! All my labels are dissapearing


      I've had this issue in a number of my projects now.

      Everything will be working fine, and then all the sudden when flex builds itself, all the labels in the entire application are not rendered.


      This includes label controls, as well as labels on buttons, and any other component that has labels in them regardless of if the label is hooked up to a variable or if the value is hard-coded into the text property.


      The only way I can fix this right now is by making minor changes to the code and just letting flex re-build itself until the labels come back. I can go into my code and just add a trace statement, or something minor like that, and when it rebuilds it may or may not have fixed the problem. I can just keep rebuilding over and over and eventually the labels will show up again. Later on down the road they will dissapear again though and then i have to repeat the process. The debugger shows that the labels and buttons have the text properties set correctly, but the text just doesn't show up.


      I have tried updating my SDK, cleaning my project, deleting my bin output files, and nothing seems to fix it.

      Should i re-install flex? I looked around on the internet and couldn't find anybody else who has had this problem.

        • 1. Re: HELP! All my labels are dissapearing
          YorFlexGuy Level 1

          I think i fixed my own problem.


          I'm using a flash .swf file to hold all my embedded fonts, and pulling those fonts out of the swf in the stylesheets within flex.

          This is a standard documented way of embedding font assets into flex.


          like this:
          @font-face {
              fontFamily: "Verdana";


          .boldText1{fontFamily: "Verdana"; font-size:12; font-weight:bold;    color:#fefefe;}


          I think what is happening is that flex is SOMETIMES not sure if fontFamily: "Verdana" is actually the font verdana installed on my computer, or the font that i'm trying to embed through the .swf file.

          I noticed that only the labels that use that verdana font were dissapearing, and by default, i believe the default font for button controls is verdana. So there was probalby some kind of mixup as to exactly what verdana is and where it comes from.


          I made another version of verdana called FLEX_Verdana, and then used that in my swf embedding font, so the family name would be different than the non-embedded version.

          This worked, but who knows if the problem will arise again