Tweenlight Fade with Sprite Graphic
-
11-09-2019 - |
Question
I have a sprite which I draw a white rectangle on (below) and want to use TweenLite
to fade the sprite in and out but it either shows or hides the the sprite. Animating the sizing such as scaleX
works fine just the alpha. Any ideas?
private function Draw():void {
panel.graphics.beginFill(0xFFFFFF);
panel.graphics.drawRect(0,0,367,135);
panel.graphics.endFill();
}
public function FadeIn():void {
trace("fadeIn");
panel.alpha=0;
TweenLite.to(panel, 2, {alpha:100});
}
Solution
found the issue, alpha was 100 not 1 therefore tweenlite was trying to set the alpha to 100 on each update causing hte flickering
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow