0 Replies Latest reply on Jul 10, 2007 12:20 PM by Hengy

    color

    Hengy
      I am having trouble alternating the color in this new ticker. Here is the code


      function display(pos) {
      over = new TextFormat();
      textColour = p/2
      trace(textColour);
      trace(int(textColour));
      if (textColour == int(textColour)) {
      over.color = 0xFF6600;
      } else {
      over.color = 0x999999;
      }
      trace(over.color);
      //
      out = new TextFormat();
      textColour = p/2
      trace(textColour);
      trace(int(textColour));
      if (textColour == int(textColour)) {
      out.color = 0xFF6600;
      } else {
      out.color = 0x999999;
      }
      trace(out.color);
      //
      newsMC.newsText._alpha = 100;
      newsMC.newsText.text = caption[pos];
      //
      newsMC.onRollOver = function() {
      this.newsText.setTextFormat(over);
      };
      newsMC.onRollOut = function() {
      this.newsText.setTextFormat(out);
      };
      timer();
      }

      I am not the most advanced flash coder, so the problem is probably a small one.
      The traces come out fine.
      And, just so you know, newsMC is a text box.

      Thanks, Hengy