-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAbilityImage.as
More file actions
37 lines (27 loc) · 836 Bytes
/
Copy pathAbilityImage.as
File metadata and controls
37 lines (27 loc) · 836 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
37
package {
import flash.display.MovieClip;
import fl.transitions.TweenEvent;
import fl.transitions.Tween;
public class AbilityImage extends MovieClip {
public function AbilityImage(imageName:String, globals) {
globals.LoadAbilityImage(imageName,this.image); this.image.width = 64; this.image.height = 64;
green.visible = false;
currentClip.visible = false;
stop();
}
public function pulse(){
var cursx = scaleX;
var cursy = scaleY;
var tween:Tween = new Tween(this, "scaleX", null, 1.2 * cursx, cursx, .2, true);
tween.start();
var tween2:Tween = new Tween(this, "scaleY", null, 1.2 * cursy, cursy, .2, true);
tween2.start();
}
public function current(b:Boolean){
currentClip.visible = b;
}
public function done(b:Boolean){
green.visible = b;
}
}
}