如何绘制使用ActionScript圆 [英] how to draw a circle using ActionScript
本文介绍了如何绘制使用ActionScript圆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用动作脚本(作为一个组件)画一个圆我尝试了一些xample没有工作....我需要添加这个圈子在面板
解决方案
//绘制一个简单的圆形,灰白色,有24个像素的半径
VAR circleColor:UINT = 0xCCCCCC;
VAR半径:UINT = 24;
VAR圈:形状=新形状();
circle.graphics.beginFill(circleColor);
circle.graphics.drawCircle(半径,半径,半径);
circle.graphics.endFill();
的addChild(圈);
您可以替换beginLine和底线,而不是的beginFill和endFill如果你只是想圆的外缘。
how to draw a circle using action script (as a component) i tried some xample did not work....i need to add this circle in a panel
解决方案
// Draw a simple circle, gray, with a radius of 24 px
var circleColor:uint = 0xCCCCCC;
var radius:uint = 24;
var circle:Shape = new Shape();
circle.graphics.beginFill(circleColor);
circle.graphics.drawCircle(radius, radius, radius);
circle.graphics.endFill();
addChild(circle);
You can substitute beginLine and endLine instead of beginFill and endFill if you just want the circle's outer edge.
这篇关于如何绘制使用ActionScript圆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文