0
Using Actionscript 3 Dawing API to create a circular band (not a basic circle)
Explorer
,
/t5/animate-discussions/using-actionscript-3-dawing-api-to-create-a-circular-band-not-a-basic-circle/td-p/11947188
Apr 04, 2021
Apr 04, 2021
Copy link to clipboard
Copied
Can someone show me the script (or method) for producing circular bands in AS3?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/animate-discussions/using-actionscript-3-dawing-api-to-create-a-circular-band-not-a-basic-circle/m-p/11948630#M342626
Apr 05, 2021
Apr 05, 2021
Copy link to clipboard
Copied
Hi.
You can create a shape instance, draw 3 strokes in sequence, and then add the shape to the display list. Like this:
import flash.display.Shape;
var strokeColor:uint = 0x000000;
var strokeColor1:uint = 0xA6A6A6;
var shape:Shape = new Shape();
// inner stroke
shape.graphics.lineStyle(2, strokeColor);
shape.graphics.drawCircle(0, 0, 120);
shape.graphics.endFill();
// middle stroke
shape.graphics.lineStyle(34, strokeColor1);
shape.graphics.drawCircle(0, 0, 138);
shape.graphics.endFill();
// outer stroke
shape.graphics.lineStyle(2, strokeColor);
shape.graphics.drawCircle(0, 0, 156);
shape.graphics.endFill();
shape.x = stage.stageWidth * 0.5;
shape.y = stage.stageHeight * 0.5;
addChild(shape);
I hope it helps.
Regards,
JC
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

