3 Replies Latest reply on Feb 3, 2009 8:40 AM by Cr99

    setting gradient fills in actionscript for panel and children

    Cr99 Level 1
      I have a panel with a chart in it. I don't want to display any border, but the panel container is nice for setting the title and adding a legend. I am using this code to disable the border:

      <mx:Panel xmlns:mx=" http://www.adobe.com/2006/mxml" styleName="gradientBgrd">
      <mx:Style>
      .gradientBgrd {
      borderStyle: applicationControlBar;
      }
      </mx:Style>

      But I'd like to create some color pickers to let the user customize the color of the chart/panel (to the user, it should seem like a single object, so setting the color for the panel should also create a fill for the chart)

      I know you can do something like this for buttons:

      button.setStyle("fillColors", ["#FF0000", "#0000FF"];

      But how do I do this in Actionscript for the panel/chart that I described?