Yojo网页设计

yojoPHP.NETPhotoshopCSSaSPPhotoshopDreamweaverFlashFireworksCoreldrawillustratorJSPSEOSQL
·网站重构·HTML/CSS·Flash·Dreamweaver·Fireworks·搜索优化SEO·网站推广·营销策划 ·其它教程·网站赚钱·建站杂谈·网页理论

热门点击

more...
您现在的位置: yojo网页设计 >> 网页教程 >> Flash教程 >> 正文

Tween类:图片缓动浏览效果

更新时间:2007-11-18 21:30:56 文章来源:互联网 点击:

图片缓动浏览效果,用Tween类做的一个图片浏览效果。

import mx.transitions.Tween;
//定义成函数,方便调用 
// 如果你还不是很清楚Tween类,请查看FLASH帮助文档-->组件语言参考-->Tween类
//可更改缓动函数做出更多的效果
function mcTween(mcID, WEnd,HEnd) {
var myTween:Tween = new Tween(eval(mcID), "_width", mx.transitions.easing.Back.easeOut, eval(mcID)._width, WEnd, 1, true);
var myTween:Tween = new Tween(eval(mcID), "_height", mx.transitions.easing.Back.easeOut, eval(mcID)._height, HEnd, 1, true);
}
// 按钮事件 这里写的比较烦锁 回头用数组试试  代码精练一下
mc.onPress=function(){
//注意 下面调用前的函数
mcTween(mc,250,300);
startDrag("mc");
//改变深度至Front 
mx.behaviors.DepthControl.bringToFront(this);
}
mc.onRelease=function(){
mcTween(mc,125,150);
stopDrag();
}
mc2.onPress=function(){
mcTween(mc2,250,300);
startDrag("mc2");
mx.behaviors.DepthControl.bringToFront(this);
}
mc2.onRelease=mc2.onRollOut=function(){
mcTween(mc2,125,150);
stopDrag();
}
mc3.onPress=function(){
mcTween(mc3,250,300);
startDrag("mc3");
mx.behaviors.DepthControl.bringToFront(this);
}
mc3.onRelease=mc3.onRollOut=function(){
mcTween(mc3,125,150);
stopDrag();
}图片缓动浏览效果:



源文件下载:图片缓动浏览效果.rar


文章地址:http://www.518web.net/wyjc/fljc/12135.html

友情链接首页文字链接要求:PR≥3,搜索引擎正常收录,开通一年以上,内容健康充实的站点!申请...

Copyright(C) 2005-2008 518web.net,All Rights Reserve
Email:yojo.x@msn.com | 在线QQ:2306380 53614197| [浙ICP备08009643号]