as3 Tweening Head-scratcher

Hi everyone. here is a wierd one for you. I cant get my head around it. Im trying to create an animated carosel type thing. I have a main class that loads xml and then external images into a class I called Image which is just really a wrapper for Loader. I have a previous and next buttons that use array methods to move the Image instances around in an array and then sends the correct Image to 3 classes that represent my 3 image positions in my carousel.

Heres the important snippet in my main class:


private function onPrev(e:MouseEvent):void {
   _images.unshift(_images.pop());
   for (var i:int = 0; i<_positions.length; i++) {
    _positions*.doPrev(_images*);
   }
  }
  
private function onNext(e:MouseEvent):void {
   _images.push(_images.shift());
   for (var i:int = 0; i<_positions.length; i++) {
    _positions*.doNext(_images*);
   }
  }

This works fine. I trigger the images to initially display in each of the 3 positions by calling addImage and passing the first three elements in the _images array.

Now for the troublesome part. In my PosA class, the tweens won’t work properly. The really wierd thing is that the MOTION_FINISH event will fire and work as expected. What isnt working is that as soon as the previous button is pressed (calling the doNext method in the PosA class, the current image doesn’t tween and instead just disappears! Heres the class in its entirety:


package {
 import flash.display.Sprite;
 import fl.transitions.Tween;
 import fl.transitions.TweenEvent;
 import fl.transitions.easing.Strong;
 import flash.filters.BlurFilter;
 
 public class PosA extends Sprite {
  private var _image:Image;
  private var _xPos:int;
  private var _duration:int;
  private var _nextImage:Image;
  private var _tween1:Tween;
  private var _tween2:Tween;
  private var _tween3:Tween;
  private var _tweens:Array;
  
  public function PosA(xPos:int, duration:int) {
   _xPos = xPos;
   x = _xPos;
   _duration = duration;
   _tween1 = new Tween(this, "scaleY", Strong.easeIn, 0.5, 1.0, _duration, true);
   _tween1.stop();
   _tween2 = new Tween(this, "x", Strong.easeIn, this.x, this.x + 100, _duration, true);
   _tween2.stop();
   _tween3 = new Tween(this, "scaleX", Strong.easeIn, 0.5, 1.0, _duration, true);
   _tween3.stop();
   _tween3.addEventListener(TweenEvent.MOTION_FINISH, onPrevTweenDone);
   _tweens = new Array(_tween1, _tween2, _tween3);
  }
  
  public function doNext(nextImage:Image):void {   
   addImage(nextImage);
  }
  
  private function onPrevTweenDone(e:TweenEvent):void {
   addImage(_nextImage);
   this.x = _xPos;
  }
  
  public function doPrev(prevImage:Image):void {
   _nextImage = prevImage;
   for (var i:int = 0; i<_tweens.length; i++) {
    _tweens*.start();
   }
  }
  
  public function addImage(image:Image):void {
   if(numChildren > 0) {
    removeChild(_image);
   } 
   _image = image;
   addChild(_image);
   this.scaleX = this.scaleY = 0.5;
   this.filters = [new BlurFilter()];     
  }
 }
}

Any ideas? Thanks I’ve tried using TweenLite as well and get the same problem so I must be doing something wrong in the class.