I’ve been using backdrop for parllax recently, here is my code :
private var _background:Backdrop;
[Embed(source="../assets/images/parallax/parallax.png")]
private static const PARALLAX_BACKGROUND:Class;
public function CaveBackground()
{
this.x = 0;
this.y = 0;
initCaveBackground();
layer = 10;
}
override public function added():void {
graphic = _background;
}
private function initCaveBackground():void
{
_background = new Backdrop(PARALLAX_BACKGROUND, true, false);
_background.scrollX = 0.2;
}
The parallax is working great, i was just wondering is there a way to use two images instead of a one for the same parallax, Images : A and B and the parallax goes like this : A-B-A-B-A-B … etc