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

王朝other·作者佚名  2008-05-19
窄屏简体版  字體: |||超大  

主要代码如下:

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();

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航