2 Replies Latest reply on Jun 27, 2006 3:02 PM by Newsgroup_User

    Combobox Alpha

    stealthmaker Level 1
      when changing combobox alpha from 1 to 0, the combobox itself fades, but the selection is still visible.. is there any way around this?
        • 1. Re: Combobox Alpha
          Level 7
          The issue is that if you don't "embed" the fonts -- meaning, compile them
          right into the .swf -- then text will not fade along with the ComboBox.

          There are two ways around this problem:

          1. Embed your fonts. Search the Flex Builder docs for help on this; in my
          copy (a recent internal build), this is discussed under "Flex 2 Developer's
          Guide > Customizing the User Interface > Using Fonts > Using embedded fonts."

          2. After the fade, set combobox.visible = false. Although the "alpha"
          property does not work on non-embedded fonts, the "visible" property does.
          This works fine except that is has the slightly quirky effect of having the
          text remain at 100% alpha while the rest of the combobox fades around it; then
          the text disappears. If the fade is pretty quick, e.g. 1/2 second or less,
          then this isn't much of a problem; but for slower fades, it will look odd.
          So, solution #1 is probably a better way to go.


          --
          Mike Morearty
          Developer, Flex Builder team
          http://www.morearty.com/blog
          • 2. Re: Combobox Alpha
            Level 7
            You can also use the Dissolve effect instead of the Fade. The Dissolve
            effect places a DisplayObject on top of the target and then adjusts the
            alpha of that overlay.

            --
            Jason Szeto
            Adobe Flex SDK Developer


            "Mike Morearty (Adobe)" <mike.morearty@adobe.com> wrote in message
            news:e7rshb$csq$1@forums.macromedia.com...
            > The issue is that if you don't "embed" the fonts -- meaning, compile them
            > right into the .swf -- then text will not fade along with the ComboBox.
            >
            > There are two ways around this problem:
            >
            > 1. Embed your fonts. Search the Flex Builder docs for help on this; in my
            > copy (a recent internal build), this is discussed under "Flex 2
            > Developer's Guide > Customizing the User Interface > Using Fonts > Using
            > embedded fonts."
            >
            > 2. After the fade, set combobox.visible = false. Although the "alpha"
            > property does not work on non-embedded fonts, the "visible" property does.
            > This works fine except that is has the slightly quirky effect of having
            > the text remain at 100% alpha while the rest of the combobox fades around
            > it; then the text disappears. If the fade is pretty quick, e.g. 1/2
            > second or less, then this isn't much of a problem; but for slower fades,
            > it will look odd. So, solution #1 is probably a better way to go.
            >
            >
            > --
            > Mike Morearty
            > Developer, Flex Builder team
            > http://www.morearty.com/blog