1 Reply Latest reply on Oct 21, 2009 2:04 PM by kglad

    Color Matrix Problem

    grover970

      I have a movieClip(contentMC) that contains numerous movieClips for my site. I have set the color matrix of contentMC to be black & white.

       

      This works fine by itself but once I start duplicating and populating movieClips inside 'contentMC' the color matrix settings are lost.

       

      var nocolour:Array = [0.3086, 0.6094, 0.082, 0, 0, 0.3086, 0.6094, 0.082, 0, 0, 0.3086, 0.6094, 0.082, 0, 0, 0, 0, 0, 1, 0];
      var colour:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
      var greyscale:ColorMatrixFilter = new ColorMatrixFilter(nocolour);
      var fullcolour:ColorMatrixFilter = new ColorMatrixFilter(colour);
      contentMC.filters = [greyscale];

       

      I've even tried to populate the content and THEN turn it B/W thinking that it would be better to convert the contentMC to BW after it was done building itself. This didn't work either.

       

      So I started to comment out code until the color matrix settings would stick and this line of code is the killer but unfortunately is essential to rendering the site.

       

      contentSC.samplesMC.sample._y = contentSC.samplesMC.sample._y+621;


      (this line offsets a duplicated movieClip)

       

      Any ideas? Need more info?