1 Reply Latest reply on Jan 16, 2007 8:16 AM by AlfonsoPerez

    Customising the accordion component colours


      Does anybody know of a way to customise the colours in the accordion component. I need to change the button colour, and the background colour.


        • 1. Customising the accordion component colours
          You can check that in Flash Help Components > Components Language Reference > Accordion component (Flash Professional only) > Customizing the Accordion component (Flash Professional only) and also Components > Using Components > Customizing Components. :D

          It explains everything.

          Here's a sample code copied from Flash Help:
          var section1 = accordion.createChild(mx.core.View, "section1", {label: "First Section"});
          var section2 = accordion.createChild(mx.core.View, "section2", {label: "Second Section"});

          var input1 = section1.createChild(mx.controls.TextInput, "input1");
          var button1 = section1.createChild(mx.controls.Button, "button1");

          input1.text = "Text Input";
          button1.label = "Button";
          button1.move(0, input1.height + 10);

          var input2 = section2.createChild(mx.controls.TextInput, "input2");
          var button2 = section2.createChild(mx.controls.Button, "button2");

          input2.text = "Text Input";
          button2.label = "Button";
          button2.move(0, input2.height + 10);
          accordion.setStyle("fontStyle", "italic");

          I think the buttons inside the components can be changed using global styles.

          Use this code:
          _global.style.setStyle("color", 0xCC6699);
          _global.style.setStyle("themeColor", 0xFF00FF)
          _global.style.setStyle("fontFamily" , "_sans");
          _global.style.setStyle("fontWeight" , "bold");

          Change the colors :D they are in pink lol