The easiest way to draw a border around a scene?

there seems to be no stage.border property in AS 3?

my class extends Sprite, what's the best way to draw a border around a flash object?

+3
source share
3 answers

this.graphics.lineStyle (0,0x555555,0.5); this.graphics.drawRect (0,0, this.width, this.height);

where "this" is your Sprite object.

+7
source

Code OXMO456 has a typo. The following is the fixed version:

this.graphics.lineStyle(0,0x555555,0.5);
this.graphics.drawRect(0,0,this.width,this.height);

, , this.width this.height 0 , MovieClip - 0 0 . ADDED_TO_STAGE.

+2

Use a filter. See this .

0
source

Source: https://habr.com/ru/post/1703725/


All Articles