·您的位置: 首页 » 资源教程 » 创意设计 » Flash » 触鼠感应的loadMoive框框缩放教程

触鼠感应的loadMoive框框缩放教程

类别: Flash教程  评论数:0 总得分:0

今天研究了一个做FLASH网站经常会用到的效果,即点击不同的按钮,主场景用来loadMovie的框框的X,Y,H,W值也随着变化。

  演示效果动画:

http://www.flash8.net/bbs/UploadFile/2005-7/200571519313467.swf

« Full Screen »

点击这里下载源文件


主要代码如下:
stageWidth = 800;
stageHeight = 600;
wmodifier = 400;
hmodifier = 150;
bounce = 0.700000;
speed = 9;
expand = function (id){
this.destwidth = wmodifier;
this.poswidth = id._width;
this.velwidth = this.velwidth * bounce + (this.destwidth - this.poswidth) / speed;
id._width = id._width + Math.round(this.velwidth);
this.destheight = hmodifier;
this.posheight = id._height;
this.velheight = this.velheight * bounce + (this.destheight - this.posheight) / speed;
id._height = id._height + Math.round(this.velheight);
this.destx = (stageWidth - wmodifier) / 2;
this.posx = id._x;
this.velx = this.velx * bounce + (this.destx - this.posx) / speed;
id._x = id._x + Math.round(this.velx);
this.desty = (stageHeight - hmodifier) / 2;
this.posy = id._y;
this.vely = this.vely * bounce + (this.desty - this.posy) / speed;
id._y = id._y + Math.round(this.vely);
shadow._width = color_kuai._width + 20;
shadow._x = color_kuai._x - 10;
shadow._height = color_kuai._height + 20;
shadow._y = color_kuai._y - 10;
};
color_kuai.onEnterFrame = function (){
expand(this);
};
stop();

  源文件里面有详细的说明。
-= 资 源 教 程 =-
文 章 搜 索
关键词:
类型:
范围:
纯粹空间 softpure.com
Copyright © 2006-2008 暖阳制作 版权所有
QQ: 15242663 (拒绝闲聊)  Email: faisun@sina.com
 纯粹空间 - 韩国酷站|酷站欣赏|教程大全|资源下载|免费博客|美女壁纸|设计素材|技术论坛   Valid XHTML 1.0 Transitional
百度搜索 谷歌搜索 Alexa搜索 | 粤ICP备19116064号-1