5 Replies Latest reply on Oct 19, 2007 7:34 AM by clbeech

    Fading in/out dynamic text using device fonts

    hey_duude
      Hi,

      I am building an application in which (for accessibility reasons) i need to allow the user to change the font, font size and font color of text in a dynamic text field, for this reason i am having to use device fonts rather than embedding fonts. The dynamic text field is within a movieClip. My problem is that when i change the alpha property (using AS) of the movieClip containing the text field the text does not fade. This is obviously because i am having to use device fonts rather than embedded fonts, but does anyone know of a workaround?

      I have played with having other MC's fade in rather than fading that one out, but because of the setup of my application and the various MC's and text fields that are constantly changing i cannot achieve the right affect.

      (using CS3, AS3)
      All advice is appreciated.
      Thanks
        • 1. Re: Fading in/out dynamic text using device fonts
          clbeech Level 3
          Not up on AS3 yet, but this might be an idea, proposed elsewhere also. If possible you may want to create a second MC that is the same color as the back ground, place it directly over the top of the field and transition it from 0-100 alpha, to make it 'appear' as thought the text is fading out.

          Now, I realize this may be difficult to implement with many dynamic fields, but you might be able to construct the new MC dynamically, when needed. Like for instance, a user is done with the field and clicks the 'next' button (or whatever), constuct the MC at that time by using the width and height of the related field. you might even be able to constuct a prototype function to handle all transitions and pass the parameters to it from the button handler and reuse the function for all field instances.

          Just some thoughts :)
          • 2. Re: Fading in/out dynamic text using device fonts
            hey_duude Level 1
            Yeah that is what i thought i would have to do and i have been trying but i just don't seem to be able to get it quite right, i'll try some more though i haven't got all the content from the client yet so maybe i'll be able to bodge something when i do.
            Thanks for your help, at least i know its not me doing something wrong.
            • 3. Re: Fading in/out dynamic text using device fonts
              hey_duude Level 1
              I have figured out how i can do it, and the solution is so obvious its embarrassing....
              I just made off screen text fields, one for every font i wanted to use in my application and embedded all the fonts i needed in the movie.... Sorted

              Obviously the solution is not ideal, increased movie size, reduced flexability, etc but it works..
              • 4. Re: Fading in/out dynamic text using device fonts
                pascal_roobrouck
                I discovered (by coincidence) that when you add a dropshadow to the text (via adding a filter), it does fade on alpha even for device fonts.
                • 5. Re: Fading in/out dynamic text using device fonts
                  clbeech Level 3
                  great duude! that'll work.

                  @pascal: that's a good one, I'll remember that. I suppose that makes perfect sense too, since adding a filter will change the instance to bitmap. Nice.