i'm receiving a very noticeable performance hit when using TweenLite to tween a filter while dragging.
private function mouseMoveEventHandler(evt:MouseEvent):void
{
evt.stopImmediatePropagation();
startDrag();
zoomTween = new TweenLite(this, 1.0, {dropShadowAmount: ZOOM_SHADOW, scaleX: 1.5, scaleY: 1.5, rotation: 10, onUpdate: updateDropShadow, onComplete: completeDropShadow, onCompleteParams: [ZOOM_SHADOW]});
removeEventListener(MouseEvent.CLICK, mouseClickEventHandler);
addEventListener(MouseEvent.MOUSE_UP, mouseUpEventHandler);
addEventListener(MouseEvent.MOUSE_OUT, mouseUpEventHandler);
}
private function updateDropShadow():void
{
filters = [new DropShadowFilter(dropShadowAmount, 90, 0x000000, 1.0, dropShadowAmount * 2, dropShadowAmount * 2, 1.0, 3)];
}
private function completeDropShadow(dropShadowAmount:Number):void
{
this.dropShadowAmount = dropShadowAmount;
}
i understand there is a Drop Shadow Plusing with TweenLite, but that only has the ability to tween the filter on and off, rather than change the distance or blur amount of an always visible drop shadow.
also, i'm not testing this on a mobile phone, i'm testing on my fast desktop in both Flash CS5 and the external debugger - both are lagging the display object, which is just a simple square shape, even after the zoomTween has completed.
any ideas?