0 Replies Latest reply on Apr 4, 2007 3:20 PM by aporosoff

    Menubar Skinning

    aporosoff Level 1
      Is there a place where I can find a decent example of a menubar programmatic skin? I've been toying around with several other examples for accordian, checkbox, etc. but I can't seem to get those examples to work . Here's what my code looks like in case you're curious:

      CSS:
      MenuBar {
      upSkin: ClassReference( 'com.skins.menuSkin' );
      overSkin: ClassReference( 'com.skins.menuSkin' );
      downSkin: ClassReference( 'com.skins.menuSkin' );
      disabledSkin: ClassReference( 'com.skins.menuSkin' );
      }

      AS:
      package com.skins{
      import mx.controls.MenuBar
      import mx.skins.*;
      import flash.utils.*;

      // Extend Border since we will be defining the border appearance
      public class menuSkin extends Border {

      // Constructor
      public function menuSkin() {;}

      // Override the call to update, drawing our own skins
      override protected function updateDisplayList( w:Number, h:Number ):void {
      graphics.lineStyle( 1, 0xFFFFFF, 0 );
      graphics.beginFill( 0x728DA3, 1.0 );
      graphics.drawRect( 0, 0, 10, height );
      graphics.endFill();
      }
      }
      }

      Any help would be hugely appreciated. Thanks in advance.