通过改变线条样式:import flash.display.Sprite; var s:Sprite = new Sprite() s.graphics.lineStyle(10,0xff00ff,0.5) s.graphics.beginFill(0,0) s.graphics.drawRect(0,0,200,200) s.graphics.endFill() addChild(s) 通过lineTo moveTo:var s:Sprite =new Sprite(); s.graphics.lineStyle(1,0xff00ff); s.graphics.moveTo(0,0); s.graphics.lineTo(200,0); s.graphics.lineTo(200,200); s.graphics.lineTo(0,200); s.graphics.lineTo(0,0); addChild(s); 通过两个矩形的叠加: var s:Sprite = new Sprite(); s.graphics.beginFill(0); s.graphics.drawRect(0,0,200,200); s.graphics.drawRect(10,10,180,180); s.graphics.endFill(); addChild(s);