[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"});
} }
}
[ActionScript 3.0] AS3动画类Tweener中滤镜的运用的更多相关文章
- [ActionScript 3.0] as3处理xml的功能和遍历节点
as3比as2处理xml的功能增强了N倍,获取或遍历节点非常之方便,类似于json对像的处理方式. XML 的一个强大功能是它能够通过文本字符的线性字符串提供复杂的嵌套数据.将数据加载到 XML 对象 ...
- [ActionScript 3.0] AS3.0 动态加载显示内容
可以将下列任何外部显示资源加载到 ActionScript 3.0 应用程序中: 在 ActionScript 3.0 中创作的 SWF 文件 — 此文件可以是 Sprite.MovieClip 或扩 ...
- [ActionScript 3.0] 自定义顶级类
为了结合FlashBuilder编译参数,达到发布项目时不编译trace代码方便,写一个顶级类: package { public function tracing(...args):void { C ...
- [ActionScript 3.0] AS3 双A字模型
package { import caurina.transitions.Tweener; import flash.display.Sprite; import flash.events.Mouse ...
- [ActionScript 3.0] AS3中的位图(BitmapData)应用
1.位图使用(模糊)滤镜 //创建一个矩形区域的BitmapData var bmd:BitmapData = new BitmapData(80, 30, false, 0xffffff); //画 ...
- [ActionScript 3.0] AS3 时间日期格式化DateTimeFormatter类的运用
import flash.globalization.DateTimeFormatter; var _timeFormatter:DateTimeFormatter; var _dateFormatt ...
- [ActionScript 3.0] AS3中Loader无法彻底卸载
我测试发现,实例化的Loader无法彻底卸载,同行有没有办法,求赐教! import flash.display.Loader; import flash.net.URLRequest; import ...
- [ActionScript 3.0] AS3.0 本机鼠标指针
Flash Player 10.2添加了内置的本机鼠标指针(native mouse cursor)支持,虽然在之前的版本里我们可以侦听MouseEvent事件来模拟鼠标指针,但是在有了原生的本机鼠标 ...
- [ActionScript 3.0] AS3 深入理解Flash的安全沙箱Security Domains
简介 如果你还没有与复杂的的安全域(security domain)和应用程序域(application domain)问题打过交道,那么你真是个幸运的家伙.当你在加载外部内容(然后他们开始播放)的时 ...
随机推荐
- 用视频编辑软件打不开jpg格式的图片的解决方法
有时候我们把PSD.JPG等图片导入到素材库中会发现EDIUS视频编辑软件根本就不支持,显示黑屏状态.可是当我们把图片导入EDIUS NX支持下的premierepro里却能够正常显示.这是什么原因呢 ...
- 【转】[NOIP2003普及组]麦森数
来源:http://vivid.name/tech/mason.html 不得不纪念一下这道题,因为我今天一整天的时间都花到这道题上了.因为这道题,我学会了快速幂,学会了高精度乘高精度,学会了静态查错 ...
- Android-Adapter用法总结
1.概念 Adapter是连接后端数据和前端显示的适配器接口,是数据和UI(View)之间一个重要的纽带.在常见的 View(ListView,GridView)等地方都需要用到Adapter.如下图 ...
- python compile
compile(source, filename, mode[, flags[, dont_inherit]]) 参数source:字符串或者AST(Abstract Syntax Trees)对象. ...
- [MVC] 深入浅出Spring MVC
[MVC] 深入浅出Spring MVC 转:http://4925054.blog.51cto.com/4915054/1176855 Spring MVC主要包括以下要点: 1:由Dispatch ...
- CSS控制checkbox样式
原文地址:http://www.xiumu.org/technology/style-checkboxes-with-css.shtml#comments Checkbox复选框是一个可能每一个网站都 ...
- [Hibernate] - Annotations - One To Many
Hibernate使用Annotation的一对多: hibernate.cfg.xml <?xml version="1.0" encoding="UTF-8&q ...
- 剑指offer系列42---二叉树深度
[题目]输入一棵二叉树,求该树的深度. * 从根结点到叶结点依次经过的结点(含根.叶结点)形成树的一条路径,最长路径的长度为树的深度. package com.exe9.offer; /** * [题 ...
- C#实现监控网络流量
本文转载自:http://blog.csdn.net/zhanjianshinian/article/details/8177851 public partial class NetJiankongF ...
- xmodem, ymodem & zmodem
这三个是modem文件传输协议. https://en.wikipedia.org/wiki/XMODEM https://en.wikipedia.org/wiki/YMODEM https://e ...