7 Replies Latest reply on Sep 26, 2006 10:51 AM by TimSymons

    Masking over V2 components

    Jeff247
      Apparently, when you apply a mask over a movieClip containing V2 components (ComboBox, RadioButton, TextInput, for example), the text is not rendered. I knoe that embedding the fonts of a text box will work ... but how do I embed the fonts of the components? Or is this a known problem ...
        • 1. Re: Masking over V2 components
          TimSymons Level 1
          You have to use the styles for the components to embed the fonts.

          This was taken from the help docs:

          import mx.controls.Alert;
          _global.styles.Alert.setStyle("color", 0x000099);
          Alert.show("This is a test alert", "Title");

          To embed the font, you would use:

          import mx.controls.Alert;
          _global.styles.Alert.setStyle("embedFonts", true);
          Alert.show("This is a test alert", "Title");

          When you look under the Help Docs, look under the sections titled:

          Using styles with the .....

          It will show you how to apply the style changes globally to all components or just to the one you are working with.

          Tim
          • 2. Re: Masking over V2 components
            Jeff247 Level 1
            Thanks for the tip ... works great for TextInput and ComboBox ... but not for Button and RadioButton.

            Any clues?

            Thanks --
            --Jeff
            • 3. Re: Masking over V2 components
              TimSymons Level 1
              You use the same technique for them too. Here is a quote from the help docs that might be part of the problem.

              This is for "embedFonts" style.

              "A Boolean value that indicates whether the font specified in fontFamily is an embedded font. This style must be set to true if fontFamily refers to an embedded font. Otherwise, the embedded font is not used. If this style is set to true and fontFamily does not refer to an embedded font, no text is displayed. The default value is false."

              Basically, the font you refer to has to be embedded in the Flash document, otherwise it won't work like you expect.

              Tim
              • 4. Re: Masking over V2 components
                Jeff247 Level 1
                I've been trying various combinations of that for several hours now ... it should be :

                _global.styles.RadioButton.setStyle("fontFamily", "arial");
                _global.styles.RadioButton.setStyle("embedFonts", true);

                ... but the label text still shows up blank. A dirty workaround is to paste static text boxes over where the labels should be ... which is what I did.

                Thanks for the help ... I appreciate it.

                --Jeff
                • 5. Re: Masking over V2 components
                  TimSymons Level 1
                  So, just so I am certain that I understand. You have gone to the Library panel, right-clicked, chosen New Font, select the Arial font. (Note that Flash will treat Bold and Italic versions as separate fonts). The selected your new font from the Library, right-clicked on it and set the Linkage name of the Font to "arial". Correct?

                  If you have not done that, then it will not work. At least, I never could get it to work without doing that.

                  Tim
                  • 6. Re: Masking over V2 components
                    Jeff247 Level 1
                    Tried that ... still no dice. The text components (TextInput, TextArea) and ComboBox seem to work OK. The button components (Button, RadioButton) are the ones that don't display the text.

                    I don't want to spend too much more time on this, as my kludge seems to do the trick.

                    Thanks --

                    --Jeff
                    • 7. Re: Masking over V2 components
                      TimSymons Level 1
                      OK. Sorry I couldn't be more help.

                      Good luck on your project.

                      Tim