Flash 中不支持此功能(即使在 GUI 中)。您必须修改 drawRoundRect 参数来模拟这种效果。
var strokeWidth:Number = 5;
var strokeAlign:String = 'outer';
var t:Sprite = new Sprite();
t.graphics.lineStyle(strokeWidth, 0x555555);
t.graphics.beginFill(0, 1);
if (strokeAlign == 'outer') {
t.graphics.drawRoundRect(25 - strokeWidth / 2, 25 - strokeWidth / 2, 200 + strokeWidth, 75 + strokeWidth, 25 + strokeWidth / 2, 25 + strokeWidth / 2);
} else if (strokeAlign == 'inner') {
t.graphics.drawRoundRect(25 + strokeWidth / 2, 25 + strokeWidth / 2, 200 - strokeWidth, 75 - strokeWidth, 25 - strokeWidth / 2, 25 - strokeWidth / 2);
} else {
t.graphics.drawRoundRect(25, 25, 200, 75, 25, 25);
}
t.graphics.endFill();