[ActionScript 3.0] AS3动画类Tweener中滤镜的运用

package
{
    import caurina.transitions.Tweener;
    import caurina.transitions.properties.FilterShortcuts;
    import caurina.transitions.properties.TextShortcuts;
    
    import flash.display.Sprite;
    import flash.text.TextField;
    
    /**
     * @author: Frost.Yen
     * @E-mail: 871979853@qq.com
     * @create: 2015-6-4 下午2:09:58
     *
     */
    [SWF(frameRate="30",height="768",width="1024")]
    public class TweenerFiltersExample extends Sprite
    {
        private var _test:Sprite;
        private var _text:TextField;
        public function TweenerFiltersExample()
        {
            for(var i:int=0;i<6;i++){
                _test = new Sprite();
                _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部分属性亦可以用Tweener过度**/
            _text = new TextField();
            _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"});
        }
        
        
    }
}

 

转载于:https://www.cnblogs.com/frost-yen/p/4878169.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值