-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEngine.as
111 lines (83 loc) · 1.81 KB
/
Engine.as
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
101
102
103
104
105
106
107
108
109
110
111
package{
import flash.display.MovieClip;
import flash.media.Sound;
import flash.media.SoundLoaderContext;
public class Engine extends MovieClip {
public var e:int;
public function Engine() {
// constructor code
}
public function Set_Type(ee:int):void
{
e = ee;
gotoAndStop(e + 1);
switch(e)
{
case 0:
//Spider
engine.l0.gotoAndStop("middle");
engine.l2.gotoAndStop("middle");
engine.l4.gotoAndStop("middle");
engine.l6.gotoAndStop("middle");
engine.l1.gotoAndStop("start");
engine.l3.gotoAndStop("start");
engine.l5.gotoAndStop("start");
engine.l7.gotoAndStop("start");
break;
case 1:
//Destroyer
engine.gotoAndStop("start");
}
}
public function Run_Animation():void
{
switch(e)
{
case 0:
//Spider
engine.l0.play();
engine.l2.play();
engine.l4.play();
engine.l6.play();
engine.l1.play();
engine.l3.play();
engine.l5.play();
engine.l7.play();
/*
engine.l0.gotoAndPlay("middle");
engine.l2.gotoAndPlay("middle");
engine.l4.gotoAndPlay("middle");
engine.l6.gotoAndPlay("middle");
engine.l1.gotoAndPlay("start");
engine.l3.gotoAndPlay("start");
engine.l5.gotoAndPlay("start");
engine.l7.gotoAndPlay("start");
*/
break;
case 1:
//Destroyer
engine.play();
break;
}
}
public function Stop_Animation():void
{
switch(e)
{
case 0:
engine.l0.stop();
engine.l2.stop();
engine.l4.stop();
engine.l6.stop();
engine.l1.stop();
engine.l3.stop();
engine.l5.stop();
engine.l7.stop();
break;
case 1:
engine.stop();
break;
}
}
}
}