-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMoon.as
More file actions
36 lines (30 loc) · 691 Bytes
/
Copy pathMoon.as
File metadata and controls
36 lines (30 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package
{
import flash.display.Shape;
import flash.display.Sprite;
import flash.display.DisplayObject;
import flash.events.*;
import flash.events.Event;
public class Moon extends Sprite
{
private var moon: Shape;
//private var xx = 30;
//private var yy = 30;
public function Moon(x:int,y:int)
{
makeMoon(x,y);
// constructor code
}
public function makeMoon(x: int, y: int)
{
moon = new Shape();
moon.graphics.lineStyle(1, 0);
moon.graphics.beginFill(0xFFFFFF);
moon.graphics.moveTo(x, y);
moon.graphics.curveTo(x - 70, y + 50, x, 100 + y);
moon.graphics.curveTo(x - 50, y + 50, x, y);
graphics.endFill();
addChild(moon);
}
}
}