2 Replies Latest reply on Jun 2, 2010 4:00 AM by Madhav Subedi

    Dynamic color changing

    fleRavix Level 2

      Hi,

      I am working for an ad-agency project. They have an item in the website to sell. The item should be customized by different colors in the palatte..

      how can i do this in flex?

        • 1. Re: Dynamic color changing
          Rdsingh Ldh

          Hi,

           

           

          Once u have selected the color from the colorPicker then u will be able to get the hexvalue for that selected color.......... then using this hex value of the selected color u can change the color of the movieclip or sprite by using the

           

          ColorTransform property of the movieclip;

           

          mc.transform.colorTransform = hexvalue of the selected color

           

           

          This will solve ur problem and still if not......do let me know?

          • 2. Re: Dynamic color changing
            Madhav Subedi Level 4

            if you want to change the color of the swf object loaded in flex:

             

             

                      var newColour:ColorTransform = swfLoaderObject.transform.colorTransform;
                      newColour.color = colorPickerObject.selectedColor;
                      swfLoaderObject.transform.colorTransform = newColour;
            

             

            hope it helps