Problem with transition stops randomly

Hi lads, ive just convertet from as2 to as3 so please bare with the non-tight coding.

Im loading 5 images from an xml file into flash. all loaded into an array and randomnized in another array. then the first image is loaded into a movieclip:

function playImage(){

if(imgCounter <= bookAttributes.length()-1) {
var i = new Loader();
var myTween:Tween = new Tween(background_mc, “alpha”, Regular.easeOut, 0, 1, 3,true);
myTween.addEventListener(TweenEvent.MOTION_FINISH, timeBetween)
i.load(new URLRequest(myArray[imgCounter]));


function timeBetween(){
setTimeout(works, settingsAttributes[0]);

function works(){
var myTween:Tween = new Tween(background_mc, “alpha”, Regular.easeIn, 1, 0, 3, true);
myTween.addEventListener(TweenEvent.MOTION_FINISH, resetAll)

function resetAll(){
myTween.removeEventListener(TweenEvent.MOTION_FINISH, timeBetween)
myTween.removeEventListener(TweenEvent.MOTION_FINISH, resetAll)

it actually “works” without showing an error in the output, but the transitions randomly stops somewhere inbetween 2-xxx (think the max images shown was 12) and it should in theory continue but it stops. Do anyone have an idea of what could be the cause of this problem ? it "feels like its sort of out of memory or something.

Thanks in advance!