如何从 Tweenlite 中删除对象
private var planeCards:Plane;
protected function animate():void
{
for (var i:int = 0; i <planes.length; i++)
{
planeCards = planes[i];
//Each if statement will adjust these numbers as needed
var planeX:Number = 0;
var planeZ:Number = -50;
var planeRotationY:Number = 0
if (i == currentItem)
{
planeZ = -300
TweenLite.to(planeCards, 1, { rotationY:planeRotationY,x:planeX,z:planeZ, ease:Quint.easeInOut } );
}
//Place & Animate Right Items
if(i> currentItem)
{
planeX = (i - currentItem + 1) * 120;
planeRotationY = angle + 10 * (i - currentItem);
TweenLite.to(planeCards, 1, { rotationY:planeRotationY,x:planeX,z:planeZ, ease:Quint.easeInOut } );
}
//Place & Animate Left Items
if (i <currentItem)
{
planeX = (currentItem - i + 1) * -120;
planeRotationY = -angle - 10 * (currentItem - i);
TweenLite.to(planeCards, 1, { rotationY:planeRotationY,x:planeX,z:planeZ, ease:Quint.easeInOut } );
}
}
}
我想从 Tweenlite 中删除“planeCards”,因为如果我在运行时在“planes.length”中加载不同的图像意味着以前的图像不会隐藏。它显示在新图像后面,如何清除旧的“planeCards”我能做什么......请帮帮我