0 Replies Latest reply on Jun 20, 2006 6:07 AM by christian_cruz

    "contains" doubt in hexadecimal color value?

      Hello, I have a small matrix of tiles, each one is a sprite of a unique cast member that has an initial color assigned by a movie script:

      on setColorInitial me

      sprite(1).color = color(#rgb 0,0,255)
      hex0000ff = color (sprite(1).foreColor)
      put hex0000ff.hexString()

      sprite(2).color = color(#rgb 0,51,255)
      hex0033ff = color (sprite(2).foreColor)
      put hex0033ff.hexString()

      sprite(3).color = color(#rgb 0,102,255)
      hex0066ff = color (sprite(3).foreColor)
      put hex0066ff.hexString()

      sprite(4).color = color(#rgb 0,153,255)
      hex0099ff = color (sprite(4).foreColor)
      put hex0099ff.hexString()

      sprite(5).color = color(#rgb 0,204,255)
      hex00ccff = color (sprite(5).foreColor)
      put hex00ccff.hexString()

      sprite(6).color = color(#rgb 0,255,255)
      hex00ffff = color (sprite(6).foreColor)
      put hex00ffff.hexString()


      Each tile is a button that when pressed it can change the blend value of the other sprites. It sounds very easy, but the problem is when I have a matrix of 100 tiles and each one is a button! The blend occurrs in a predetermined way, that is to say if tile "00ffff" is pressed then a predetermined amount of sprites will remain with blend value 100 and all the others will change to a blend value 20 for example.

      Is there any way to use a "contains" that can predefine that all the tiles that contains the hexadecimal color value "blablabla" and "blablabla2" and "blablabla3" to change its blend value to 100 and all the others to change to 20. I know that "contains" works as an operator in strings, but can I use it in this case, how?