-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDrawShape00.as
More file actions
100 lines (78 loc) · 1.85 KB
/
Copy pathDrawShape00.as
File metadata and controls
100 lines (78 loc) · 1.85 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
package
{
import flash.display.Sprite;
import flash.display.Shape
import flash.text.TextField;
import resolumeCom.*;
//import com.resolumeCom.parameters.*;
//import com.resolumeCom.events.*;
//properties
public class DrawShape extends Sprite
{
private var moon: Shape=new Shape();
private var x1 = 10
private var y1 = x1
private var resolume: Resolume = new Resolume();
private var paramNumMoon: FloatParameter = resolume.addFloatParameter("Amount", 0.5);
//constructor gets executed during instantiation of the class
public function DrawShape()
{
x=10
y=20
//makeMoon(200, 300);
clone(moon, 5);
}
//make shape
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);
//makeNewMoon(x,y);
}
/* public function makeNewMoon(x:int,y:int)
{
x=x+x1;
y=y+y1;
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);
}
*/
public function clone(shape:Shape, clone:Number)//(clone: Number)
{
var i: Number;
//var shapeArray:Array = new Array;
trace(String(shape));
trace(String(clone));
for (var i = 0; i < clone; i++)
{
x = x + x1;
y = y + y1;
//var g = String(shape);
//var g:String = shape.toString();
//var g= String(x);
//trace(g);
makeMoon(x, y);
//make +shape
//push
}
}
//cluster distance
//number of a shape to copy
public function numShapes(n: Number)
{
}
//
}
}