Hi there
I am using TweenMax to tween 3 images across a screen at a time (there is a next button that tweens the first image offstage, and moves the next image in its place and moves another onscreen and so on in a loop).
The images are loaded dynamically. In the class that handles each image I use this code:
('Project' Class extends MovieClip)
Actionscript Code:
private function imageLoaded(_e:Event):void{
var bitmap:Bitmap=Bitmap(image.content);
bitmap.smoothing=true;
bitmap.pixelSnapping=PixelSnapping.NEVER;
bitmap.scaleX=.9;
bitmap.scaleY=.9;
}
These objects are stored in the projects array and tweened from the Document class:
Actionscript Code:
TweenMax.to(projects[curImage],1,{x:imagePadding});
TweenMax.to(projects[curImage+1],1,{x:(imagePadding*2)+projects[curImage].width});
TweenMax.to(projects[curImage+2],1,{x:stage.stageWidth-projects[curImage+2].width-imagePadding});
No matter what I do, the tween always seems to jump/jitter. I've tried turning the pixel snapping on, turning cache as bitmap on, upping the framerate, setting the .x destination to a float etc. Apparently setting the x/y scale to .9 is supposed to fix jittery tweening, but I've had no luck with it.
Is there a definitive Adobe guide to tweening images in Flash? Clarifying the whole pixel versus subpixel stuff?
I'm confused and stumped!