最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
flash9太阳地球月亮系统
时间:2008-01-20 编辑:简简单单 来源:一聚教程网
除了背景以外,全部使用as3代码:
var sun:Sprite = new Sprite();
sun.graphics.lineStyle(0,0xFF6600);
sun.graphics.beginFill(0xFF3300);
sun.graphics.drawCircle(0,0,40);
sun.graphics.endFill();
var earth:Sprite = new Sprite();
earth.graphics.lineStyle(0,0x92E9FE);
earth.graphics.beginFill(0x00CCFF);
earth.graphics.drawCircle(0,0,20);
earth.graphics.endFill();
var spot:Shape = new Shape();
spot.graphics.lineStyle(0,0x000000);
spot.graphics.beginFill(0x333333);
spot.graphics.drawCircle(0,0,2);
spot.graphics.endFill();
var moon:Shape = new Shape();
moon.graphics.lineStyle(0,0xFFFFCC);
moon.graphics.beginFill(0xFFFF00);
moon.graphics.drawCircle(0,0,5);
moon.graphics.endFill();
this.addChild(sun);
sun.x = 200;
sun.y = 200;
sun.addChild(spot);
spot.x = 20;
spot.y = 10;
sun.addChild(earth);
earth.x = 120;
earth.y = 0;
earth.addChild(moon);
moon.x = 50;
moon.y = 0;
stage.addEventListener(Event.ENTER_FRAME, orbit);
function orbit(evt:Event):void {
sun.rotation++;
earth.rotation+= 3;
moon.rotation-=5;
}
-
上一个: AS2与AS3版本的Flash全屏控制
-
下一个: ASP+flash下拉列表(显示图片)
相关文章
- chrome flash过期怎么办 07-13
- FLASH制作春意盎然花园效果 06-18
- flash如何画绿色的小草 05-22
- 利用flash制作出太阳发光的动画 05-18
- flash太阳发光的动画怎么制作 05-16
- flash怎么画绿色的小草 05-15