惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
博客园 - 聂微东
Application and Cybersecurity Blog
Application and Cybersecurity Blog
MyScale Blog
MyScale Blog
罗磊的独立博客
H
Help Net Security
L
LangChain Blog
T
Threat Research - Cisco Blogs
量子位
S
Securelist
Last Week in AI
Last Week in AI
L
Lohrmann on Cybersecurity
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
The Hacker News
The Hacker News
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Blog of Author Tim Ferriss
T
Threatpost
Security Latest
Security Latest
P
Palo Alto Networks Blog
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
F
Full Disclosure
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Heimdal Security Blog
J
Java Code Geeks
Recorded Future
Recorded Future
Hugging Face - Blog
Hugging Face - Blog
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
B
Blog RSS Feed
月光博客
月光博客
C
Cisco Blogs
V
Visual Studio Blog
D
DataBreaches.Net
H
Hacker News: Front Page
博客园 - 叶小钗
N
News and Events Feed by Topic
爱范儿
爱范儿
A
Arctic Wolf

博客园 - zhangsir

.net 项目 调用webservice 出错,异常信息:对操作“xxx”的回复消息正文进行反序列化时出错。解决方案。 手机版web相关meta配置 网页中点击运行执行代码 js 在页面上模拟多选,蚂蚁线线框 C#导出csv文件 支持中文的解决方案 C# 检测程序运行时间的方法,Stopwatch类 js获取url参数值 flash as2 简易手写板,带擦除功能 flash as2 BitmapData应用之 ---- 画双线 svn(版本管理) 去掉(清理)版本信息的方法 sql 数据库显示 正在恢复 as3中parent访问属性所牵涉的强制类型的问题 [AS3]URLVariables传入URL编码字符串时的一些官方无文档的原则 sql 日期 、时间相关 100万个不重复的8位的随机数 使用UpdatePanel 局部刷新出现中文乱码的解决方法!! - zhangsir - 博客园 loaded AS2 swf call function in AS3 holder - zhangsir Rewrite the master page form action attribute in asp.net 2.0 sql2000 跨服务器复制表数据
flash 中实现斜切变型
zhangsir · 2009-12-07 · via 博客园 - zhangsir

 使用transform.matrix较为繁琐,但其优势是功能强大:使用matrix.concat()方法可轻松的将显示对象斜切变形:

var myMatrix:Matrix=matrix_rect.transform.matrix;

var tempx,tempy;

tempx=matrix_rect.x+matrix_rect.width/2;

tempy=matrix_rect.y+matrix_rect.height/2;

myMatrix.translate(-tempx,-tempy);

//实现斜切变形代码开始

var skewMatrix:Matrix = new Matrix();

skewMatrix.b = Math.tan(1);

myMatrix.concat(skewMatrix);

//实现斜切变形代码结束

myMatrix.rotate(2 * Math.PI * (-45 / 360));

myMatrix.translate(tempx,tempy);

matrix_rect.transform.matrix = myMatrix;

显示效果(http://blog.csdn.net/AS3_Flash/archive/2008/04/18/2303066.aspx),矩形在水平方向斜切变型。

其中skewMatrix.b是设置水平方向的斜切,如果要设置垂直方向的斜切,则需要访问skewMatrix.a属性。通过改变Math.tan(x)中x变量的值,可以控制斜切的幅度。

斜切变形是卡通动画中有用的一种动画变形,在模拟快速运动的物体忽然停止,或者静止的物体忽然加速,以及托盘中摆动的布丁等动画形象时,斜切变形都有其应用的天地。 

本文来自CSDN博客,出处:http://blog.csdn.net/AS3_Flash/archive/2008/04/18/2303066.aspx