我有一个将被玩家踢的球,它是一个电影剪辑,我希望它随着它远离原始位置而逐渐变小,也许是一个 AS3 补间?这是移动球的代码:
speed=10;
var ease:int = 100;
var gravity:Number = 0.5;
function moveBall()
{
var targetX:Number = mouseX;
var targetY:Number = mouseY;
var angle = Math.atan2(targetY,targetX);
bola.x = mouseX + Math.cos(angle);
bola.y = mouseY + Math.sin(angle) ;
ballRotation = true;
stage.removeEventListener(MouseEvent.CLICK, kick);
非常感谢您的耐心和帮助!