由网友(青烟)分享简介:如何使用动作脚本(作为一个组件)画一个圆我尝试了一些xample没有工作....我需要添加这个圈子在面板解决方案 //绘制一个简单的圆形,灰白色,有24个像素的半径VAR circleColor:UINT = 0xCCCCCC;VAR半径:UINT = 24;VAR圈:形状=新形状();circle.gra...![怎么回事 Action Script 错误](https://p.xsw88.cn/allimgs/daicuo/20230908/911.png)
如何使用动作脚本(作为一个组件)画一个圆我尝试了一些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
解决方案![怎么回事 Action Script 错误](https://p.xsw88.cn/allimgs/daicuo/20230908/911.png)
// 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.
相关推荐
最新文章