1 Reply Latest reply on Oct 25, 2006 8:32 AM by Oli-G

    [f8] Changing colour of clips on stage via AS

    Oli-G
      Hi all

      I have 20 odd little swfs, each of which will be loaded into a body swf at one point or another.

      Each of these contains anywhere between 4 and 20 single-colour buttons. What I need is for each of them to simply change colour when rolled over/out.

      Here is the code thus far thanks to some outside help, but I can't pick where it's going wrong.

      The naming convention is just b1,b2 etc depending on how many said buttons are in each clip.

      Suggestions?

      Cheers



      this.i = 0;
      while(this["b" + (i++)]) {
      this["b" + i].onRollOver = function():Void {
      this.colour.setRGB(0x5FBEFE)
      }
      this["b" + i].onRollOut = function():Void {
      this.colour.setRGB(0x139FFD)
      }
      }
      delete this.i;