0 Replies Latest reply on Oct 31, 2007 8:15 AM by afarber

    Drawing green halo border with RectBorder

    afarber
      Hello,

      I'm trying to create few custom AS2 components which would look similar to the standard components.

      The component development checklist by Adobe suggests:

      quote:

      Use the RectBorder class (mx.skins.halo.RectBorder) rather than graphical elements to draw borders around objects.


      Unfortunately there aren't any docs or examples for that except the classes in the mx\controls\*.as files.

      I have tried the following in my custom AS2 component:

      quote:


      public function createChildren():Void {
      createClassObject(RectBorder, 'border_mc',
      this.getNextHighestDepth(),
      { styleName: this, borderStyleName: 'default'});
      }

      private function size():Void {
      super.size();
      border_mc.setSize(width, height);
      invalidate();
      }



      and I do see a thin grey rectangle border around it now.

      But how do I get the standard haloGreen border, like the v2 Button has?

      (And I want it to be themeable/skinnable as well)

      Thank you for any hints
      Alex