/***********/

/**************/

主要改变影片剪辑的x、y和rotation这三个属性。

void
{
image_mc.x = posX + (Math.floor(Math.random() * 4));
image_mc.y = posY + (Math.floor(Math.random() * 4));
image_mc.rotation = Math.random() * 4;
}

第二个效果,使用的是TweenMax的插件。

 

 

因为使用的是最新的TweenMax,所有这里的as文件是被修改过的。

for each (var prop:String in props)
{
currentValueAdditions[prop] = (strengths[prop]*amplitude*decrease);
_target[prop] = _target[prop] - lastValueAdditions[prop] + currentValueAdditions[prop];
lastValueAdditions[prop] = currentValueAdditions[prop];
}

}
}
}

添加了一个属性“shake”,其中“numShakes”为在指定的时间内需要震动的次数。

if (tween)
{
tween.kill();
tween = null;
}

image_mc.x = posX;
image_mc.y = posY;
image_mc.rotation = 0;
}

 
 
参考链接:

相关文章:

  • 2021-11-25
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
猜你喜欢
  • 2022-02-16
  • 2022-03-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2021-11-07
相关资源
相似解决方案