1
8
9 import caurina.transitions.Tweener;
10
11
19 class com.sekati.transitions.Mot {
20
21
22 public static var i:Object = { quint:"easeInQuint", quad:"easeInQuad", quart:"easeInQuart", expo:"easeInExpo" };
23 public static var o:Object = { quint:"easeOutQuint", quad:"easeOutQuad", quart:"easeOutQuart", expo:"easeOutExpo" };
24 public static var io:Object = { quint:"easeInOutQuint", quad:"easeInOutQuad", quart:"easeInOutQuart", expo:"easeInOutExpo" };
25
26 public static var t:Object = {s:0.3, s2:0.5, s3:0.7, d:0.3, d2:0.5, d3:1};
27
28 public static var m:Object = {e:"easeInOutQuint", e2:"easeOutQuint", e3:"easeInOutQuad", e4:"easeOutQuad", e5:"easeInOutQuart", e6:"easeOutQuart", e7:"easeInOutExpo", e8:"easeOutExpo", s:0.3, s2:0.5, d:0.5};
29
30 public static var col:Object = {b:0x000000, w:0xFFFFFF, r:0xFF0000, g:0x00FF00, b:0x0000FF, y:0xFFFF00, c:0x00FFFF, m:0xFF00FF};
31 public static var chromo:Object = {
32 month:{jan:0x00D294, feb:0x26E058, mar:0xBCFF2D, apr:0xFFFF41, may:0xFFAF0B, jun:0xFF1A33, jul:0xFF1F77, aug:0xFB48BC, sep:0xBC35B7, oct:0x2463DB, nov:0x00A3FF, dec:0x00DCFF}, day:{a1:0x00D5E1, a2:0x00D294, a3:0x00CB58, a4:0x26E058, a5:0x7AF049, a6:0xBCFF2D, a7:0xFFFF22, a8:0xFFFF41, a9:0xFFFF30, a10:0xFFAF0B, a11:0xFF6E0C, a12:0xFF1A33, p1:0xFF0041, p2:0xFF1F77, p3:0xFF37B2, p4:0xFB48BC, p5:0xE638B5, p6:0xBC35B7, p7:0x7953CB, p8:0x2463DB, p9:0x0077EB, p10:0x00A3FF, p11:0x00C8FF, p12:0x00DCFF}
33 };
34
35
36 public static function get base0():Object {
37 return { time:t.s, transition:io.quint };
38 }
39
40 public static function get base1():Object {
41 return { time:t.s, transition:io.quad };
42 }
43
44 public static function get base2():Object {
45 return { time:t.s, transition:io.expo };
46 }
47
48 public static function get abase():Object {
49 return {time:0.5, transition:o.quad };
50 }
51
52 public static function get abaseShort():Object {
53 return {time:0.3, transition:o.quad };
54 }
55
56 public static function get abaseLong():Object {
57
58 return {time:0.7, transition:io.quad };
59 }
60
61 public static function get fadeIn():Object {
62 return Mot.fadeTo( 100 );
63 }
64
65 public static function get fadeOut():Object {
66 return Mot.fadeTo( 0 );
67 }
68
69
74 public static function fadeTo(a:Number):Object {
75 return { _alpha:a, time:t.s, transition:io.expo };
76 }
77
78
86 public static function glow(a:Number, b:Number, c:Number, s:Number):Object {
87 return {_Glow_alpha:a, _Glow_color:c, _Glow_quality:3, _Glow_strength:s, _Glow_blurX:b, _Glow_blurY:b};
88 }
89
90
97 public static function burst(mc:MovieClip, c:Number, cb:Function):Void {
98 Tweener.addTween( mc, {_scale:10, time:0.3, transition:Mot.o.quint} );
99 Tweener.addTween( mc, {_Glow_alpha:100, _Glow_color:c, _Glow_quality:3, _Glow_strength:10, _Glow_blurX:25, _Glow_blurY:25, _scale:150, time:0.3, transition:io.quad, delay:0.3} );
100 Tweener.addTween( mc, {_alpha:0, _scale:50, time:0.5, transition:Mot.o.quint, delay:0.6, onComplete:cb} );
101 }
102
103
108 public static function normalize(mc:MovieClip):Void {
109 mc.filters = [];
110 mc._xscale = 100;
111 mc._yscale = 100;
112 Tweener.addTween( mc, {_color:undefined, time:0} );
113 }
114
115
120 public static function colorTo(c:Number):Object {
121 return { _color:c, time:t.s2, transition:io.quint };
122 }
123
124
127 private function Mot() {
128 }
129 }
130