<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="1000" height="600" creationComplete="init()">
<mx:Script>
<![CDATA[
private var Circle1:String;
private var Circle2:String;
private function init():void
{
this.circleCanvas.graphics.beginFill((Math.random()*111111),1);
this.circleCanvas.graphics.drawCircle(100,300,Math.random()*100);
this.circleCanvas.graphics.endFill();
this.circleCanvas.graphics.beginFill((Math.random()*111111),1);
this.circleCanvas.graphics.drawCircle(800,300,Math.random()*100);
this.circleCanvas.graphics.endFill();
}
]]>
</mx:Script>
<mx:Canvas x="0" y="0" id="circleCanvas" width="1000" height="600">
</mx:Canvas>
</mx:Application>
随机生成两个不同大小颜色的圆
最新推荐文章于 2021-05-29 23:13:07 发布