package{ImportCaurina.transitions.Tweener; Importcaurina.transitions.properties.FilterShortcuts; Importcaurina.transitions.properties.TextShortcuts; ImportFlash.display.Sprite; ImportFlash.text.TextField; /** * @author: Frost.yen * @e-mail: [email protected] * @create: 2015-6-4 pm 2:09:58 **/[SWF (framerate="a", height="768", width="1024x768")] Public classTweenerfiltersexampleextendsSprite {Private var_test:sprite; Private var_text:textfield; Public functiontweenerfiltersexample () { for(vari:int=0;i<6;i++) {_test=NewSprite (); _test.graphics.beginfill (0x00ff00); _test.graphics.drawrect (0,0,100,100); _test.graphics.endfill (); _test.x= 100+150* (i%5); _test.y= 100+math.floor (i/5) *150; This. AddChild (_test); Filtershortcuts.init (); } tweener.addtween ( This. Getchildat (0), {_blur_blurx:60,_blur_blury:60,time:5,transition:"Easeoutcubic"}); Tweener.addtween ( This. Getchildat (1), {_bevel_blurx:60,_bevel_blury:60,time:5,transition:"Easeoutcubic"}); Tweener.addtween ( This. Getchildat (2), {_dropshadow_blurx:11,_dropshadow_blury:11,time:5,transition:"Easeoutcubic"}); Tweener.addtween ( This. Getchildat (3), {_glow_blurx:11,_glow_blury:11,time:5,transition:"Easeoutcubic"}); Tweener.addtween ( This. Getchildat (4), {_gradientbevel_blurx:60,_gradientbevel_blury:60,time:5,transition:"Easeoutcubic"}); Tweener.addtween ( This. Getchildat (5), {_gradientglow_blurx:60,_gradientglow_blury:60,time:5,transition:"Easeoutcubic"}); /**textfield Partial attributes can also be used tweener excessive **/_text=NewTextField (); _text.autosize="left"; _text.text="Tweener--text--test"; _text.x= 110+150* (6%5); _text.y= 150+math.floor (6/5) *150; This. AddChild (_text); Textshortcuts.init (); Tweener.addtween (_text,{_text_size:20,_text_color_r:204,_text_color_g:51,_text_color_b:204,time:1,transition:"Easeoutcubic"}); } }}
[ActionScript 3.0] The use of filters in AS3 animation class Tweener