0 Replies Latest reply on Mar 18, 2008 2:42 AM by Gaaaga

    Modify the Buttons of a TitleBar of a windowedApplication

    Gaaaga
      Hi all,

      I'd like to modify the button of my title bar of my windowed application (it's an AIR application).
      At first, I wanted to change the title rendrer so I modify my application-app.xml and add the following lign : [code]<systemChrome>none</systemChrome>[/code] (au lieu de standard)
      So my title is well displayed thanks those ligns in my css file :
      [code]WindowedApplication {
      color: #000000;
      backgroundAlpha: 1;

      title-text-style-name : "titleTextStyle";

      buttonStyleName: "buttonBarButton";
      firstButtonStyleName: "firstButtonBarButton";
      lastButtonStyleName: "lastButtonBarButton";

      background-image : "styles/OldSchool/bg.gif";
      backgroundColor: #EEEEEE;
      }

      .titleTextStyle {
      font-family : luna;
      font-size : 30;
      }[/code]

      By I don't manage to customize my buttons that are grey and small (not handsome) instead of the fancy colors as usual (red, yellow, green). I saw in debug that the application had a TitleBar with a closeButton, a minimize and a maximize, but the following ligns don't change anything..
      [code]TitleBar
      {
      closeButtonDisabledSkin: Embed(source="wmp11.swf",symbol="Panel_closeButtonDisabledSkin");
      closeButtonDownSkin: Embed(source="wmp11.swf",symbol="Panel_closeButtonDownSkin");
      closeButtonOverSkin: Embed(source="wmp11.swf",symbol="Panel_closeButtonOverSkin");
      closeButtonUpSkin: Embed(source="wmp11.swf",symbol="Panel_closeButtonUpSkin");

      }[/code]

      ou

      [code]TitleBar {
      buttonStyleName: "buttonBarButton";
      firstButtonStyleName: "firstButtonBarButton";
      lastButtonStyleName: "lastButtonBarButton";

      }[/code]
      or :
      [code].wideCloseButton
      {
      disabledSkin: Embed(source="wmp11.swf", symbol="wideCloseBttn");
      downSkin: Embed(source="wmp11.swf", symbol="wideCloseBttn");
      overSkin: Embed(source="wmp11.swf", symbol="wideCloseBttn");
      upSkin: Embed(source="wmp11.swf", symbol="wideCloseBttn");
      selectedDisabledSkin: Embed(source="wmp11.swf", symbol="wideCloseBttn");
      selectedDownSkin: Embed(source="wmp11.swf", symbol="wideCloseBttn");
      selectedOverSkin: Embed(source="wmp11.swf", symbol="wideCloseBttn");
      selectedUpSkin: Embed(source="wmp11.swf", symbol="wideCloseBttn");
      color: #ffffff;
      textRollOverColor: #ffffff;
      textSelectedColor:#ffffff;
      }

      /*
      //------------------------------
      // ButtonBars
      //------------------------------
      */

      ButtonBar
      {
      buttonStyleName: "buttonBarButton";
      firstButtonStyleName: "firstButtonBarButton";
      lastButtonStyleName: "lastButtonBarButton";
      }

      ToggleButtonBar
      {
      buttonStyleName: "buttonBarButton";
      firstButtonStyleName: "firstButtonBarButton";
      lastButtonStyleName: "lastButtonBarButton";
      }

      .roundedButtonBar
      {
      buttonStyleName: "roundedButtonBarButton";
      firstButtonStyleName: "roundedFirstButtonBarButton";
      lastButtonStyleName: "roundedLastButtonBarButton";
      }

      /*
      //------------------------------
      // ButtonBarButtons
      //------------------------------
      */

      .firstButtonBarButton
      {
      disabledSkin: Embed(source="wmp11.swf", symbol="ButtonBar_firstDisabledSkin");
      downSkin: Embed(source="wmp11.swf", symbol="ButtonBar_firstDownSkin");
      overSkin: Embed(source="wmp11.swf", symbol="ButtonBar_firstOverSkin");
      selectedDisabledSkin: Embed(source="wmp11.swf", symbol="ButtonBar_firstSelectedDisabledSkin");
      selectedDownSkin: Embed(source="wmp11.swf", symbol="ButtonBar_firstSelectedUpSkin");
      selectedOverSkin: Embed(source="wmp11.swf", symbol="ButtonBar_firstSelectedUpSkin");
      selectedUpSkin: Embed(source="wmp11.swf", symbol="ButtonBar_firstSelectedUpSkin");
      upSkin: Embed(source="wmp11.swf", symbol="ButtonBar_firstUpSkin");
      color: #000000;
      textRollOverColor: #000000;
      textSelectedColor:#000000;
      }
      .buttonBarButton
      {
      disabledSkin: Embed(source="wmp11.swf", symbol="ButtonBar_buttonDisabledSkin");
      downSkin: Embed(source="wmp11.swf", symbol="ButtonBar_buttonDownSkin");
      overSkin: Embed(source="wmp11.swf", symbol="ButtonBar_buttonOverSkin");
      selectedDisabledSkin: Embed(source="wmp11.swf", symbol="ButtonBar_buttonSelectedDisabledSkin");
      selectedDownSkin: Embed(source="wmp11.swf", symbol="ButtonBar_buttonSelectedUpSkin");
      selectedOverSkin: Embed(source="wmp11.swf", symbol="ButtonBar_buttonSelectedUpSkin");
      selectedUpSkin: Embed(source="wmp11.swf", symbol="ButtonBar_buttonSelectedUpSkin");
      upSkin: Embed(source="wmp11.swf", symbol="ButtonBar_buttonUpSkin");
      color: #000000;
      textRollOverColor: #000000;
      textSelectedColor:#000000;
      }

      .lastButtonBarButton
      {
      disabledSkin: Embed(source="wmp11.swf", symbol="ButtonBar_lastDisabledSkin");
      downSkin: Embed(source="wmp11.swf", symbol="ButtonBar_lastDownSkin");
      overSkin: Embed(source="wmp11.swf", symbol="ButtonBar_lastOverSkin");
      selectedDisabledSkin: Embed(source="wmp11.swf", symbol="ButtonBar_lastSelectedDisabledSkin");
      selectedDownSkin: Embed(source="wmp11.swf", symbol="ButtonBar_lastSelectedUpSkin");
      selectedOverSkin: Embed(source="wmp11.swf", symbol="ButtonBar_lastSelectedUpSkin");
      selectedUpSkin: Embed(source="wmp11.swf", symbol="ButtonBar_lastSelectedUpSkin");
      upSkin: Embed(source="wmp11.swf", symbol="ButtonBar_lastUpSkin");
      color: #000000;
      textRollOverColor: #000000;
      textSelectedColor:#000000;
      }

      .roundedFirstButtonBarButton
      {
      disabledSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_firstUpSkin");
      downSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_firstSelectedUpSkin");
      overSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_firstSelectedUpSkin");
      selectedDisabledSkin: Embed(source="wmp11.swf", symbol="ButtonBar_firstSelectedDisabledSkin");
      selectedDownSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_firstSelectedUpSkin");
      selectedOverSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_firstSelectedUpSkin");
      selectedUpSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_firstSelectedUpSkin");
      upSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_firstUpSkin");
      color: #000000;
      textRollOverColor: #000000;
      textSelectedColor:#000000;
      }
      .roundedButtonBarButton
      {
      disabledSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_buttonUpSkin");
      downSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_selectedUpSkin");
      overSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_selectedUpSkin");
      selectedDisabledSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_buttonUpSkin");
      selectedDownSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_selectedUpSkin");
      selectedOverSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_selectedUpSkin");
      selectedUpSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_selectedUpSkin");
      upSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_buttonUpSkin");
      color: #000000;
      textRollOverColor: #000000;
      textSelectedColor:#000000;
      }

      .roundedLastButtonBarButton
      {
      disabledSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_lastUpSkin");
      downSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_lastSelectedUpSkin");
      overSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_lastSelectedUpSkin");
      selectedDisabledSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_lastUpSkin");
      selectedDownSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_lastSelectedUpSkin");
      selectedOverSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_lastSelectedUpSkin");
      selectedUpSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_lastSelectedUpSkin");
      upSkin: Embed(source="wmp11.swf", symbol="roundedButtonBar_lastUpSkin");
      color: #000000;
      textRollOverColor: #000000;
      textSelectedColor:#000000;
      }[/code]
      with the wmp11.swf contained in the same folder as my css file but nothing happens !
      Does anybody knows how to resolve it ?
      Thanks !