Hi there,

I made a custom RectBorder class (in fact it does nothing, it uses a 
MovieClip). The borders are drawn as intended but it has a side effect: all 
components backgrounds (except List and Tree!) become white whereas I set them 
to another color.
This is how I set the background color (works when I use the default RectBorder 
but not with mine):
_global.style.setStyle("backgroundColor", 0xFF0000);
_global.styles.TextInput.setStyle("backgroundColor", 0xFF0000);
_global.styles.ScrollSelectList.setStyle("backgroundColor", 0xFF0000); // this 
one always works

And my RectBorder class:

import mx.core.ext.UIObjectExtensions;

class guiTools.skins.RectBorder extends mx.skins.RectBorder
{
 static var symbolName:String = "RectBorder";
 static var symbolOwner:Object = RectBorder;
 var className:String = "RectBorder";
 // all of these borders have the same size edges, one pixel
 var offset:Number = 1;
 
 function init(Void):Void
 {
  super.init();
 }
 
 function drawBorder(Void):Void
 {
  // the graphics are on the symbols Timeline,
  // so all you need to do here is size the border
  _width = __width;
  _height = __height;
 }
 
 // register ourselves as the RectBorder for all components to use
 static function classConstruct():Boolean
 {
  UIObjectExtensions.Extensions();
  _global.styles.rectBorderClass = RectBorder;
  _global.skinRegistry["RectBorder"] = true;
  return true;
 }
 


 static var classConstructed:Boolean = classConstruct();
 static var UIObjectExtensionsDependency = UIObjectExtensions;
}


Did I miss something here ?

Thanks,

Benjamin.
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to