1 Reply Latest reply on Jun 28, 2006 4:56 PM by See4th

    textColor and mx.transitions.Tween

    s007767
      I'd like to fade some text from 0xFF00CC to 0xFFFFFF in Flash 8. I tried using the Tween object to accomplish this.

      var showTween2 = new mx.transitions.Tween (clip.textClip.menuText, "textColor", null, 0xFF00CC, 0xFFFFFF, .75, true);

      menuText is a dynamic text field.

      It starts and ends where it should, but instead of fading it flickers back and forth between the two values. Am I to infer that textColor doesn't work with the Tween object? Is there a generally accepted method of tweening font colors with out using tint?

      -Sean
        • 1. Re: textColor and mx.transitions.Tween
          See4th Level 1
          Here's the Pixelwit ColorFader.as class. Put it in your Flash install dir. Ex:
          C:\Program Files\Macromedia\Flash 8\en\First Run\Classes\pixelwit\ColorFader.as

          Then at the top of the page where it will be call place:
          import pixelwit.ColorFader.as;

          Call it like this:
          myColor = new ColorFader(myText); // myText being the object to receive the color fade
          myColor.fadeHex (0xFFFFFF, 2000); // 1st param the color going to, 2nd param fade rate in ms