import mx.core.ext.UIObjectExtensions; class RectBorder extends mx.skins.RectBorder { static var symbolName:String = "RectBorder"; static var symbolOwner:Object = RectBorder; var className:String = "RectBorder"; // 根据flash安装目录修改 D:\Program Files\ //#include "D:\Program Files\Macromedia\Flash MX 2004\en\First Run\Classes\mx\core\ComponentVersion.as" // 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 symbol's 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; }