Draw A Quick Stage Border in Flash
Here’s a quick way to automatically add a border to your flash stage without drawing an actual object and resizing it. I use this snippet alot.
1 2 3 4 | var stagebox:Sprite = new Sprite(); stagebox.graphics.lineStyle(1, 0x000000, 1); stagebox.graphics.drawRect(0, 0, stage.stageWidth-1, stage.stageHeight-1); addChild(stagebox); |
var stagebox:Sprite = new Sprite();
stagebox.graphics.lineStyle(1, 0×000000, 1);
stagebox.graphics.drawRect(0, 0, stage.stageWidth-1, stage.stageHeight-1);
addChild(stagebox);
this.setChildIndex(stagebox,+1);