I am building a slideshow right now using TweenLite as my tween class.
Everything works perfectly when I have less than 25 images loaded into it, once I go above that things go south and the tweens appear to not work smooth, sometimes not at all.
Anyone every run across this issue or have any suggestions?
My structure is basically:
- I have a sprite on stage called "Main".
- Loop through images, load them and add to the Main sprite as Sprites.
Code that I use to process the tweens:
PHP Code:
// Tween image out
var cx:int = Math.round(Backgrounds.loadArray[idx].width / 2);
var cy:int = Math.round(Backgrounds.loadArray[idx].height / 2);
TweenLite.to(Backgrounds.loadArray[idx], 1, { alpha: 0, scaleX: 0, scaleY: 0, x: cx, y: cy, ease: Quad.easeInOut, overwrite: 1, onComplete: doRestore, onCompleteParams: [Backgrounds.loadArray[idx]] } );
// Tween new image in
TweenLite.to(Backgrounds.loadArray[idx], 1, { alpha: 1, overwrite: 1, ease: Cubic.easeInOut } );
Thanks to anyone who can offer any suggestions.