AS3 Fade images in and out randomly

I’m currently looking at a tutorial that loads thumbnails in from XML.

I’m deconstructing it to try and get used to AS3. Here is the bit I’m stuck on:


function thumbLoaded(e:Event):void {
    var my_thumb:Loader = Loader(e.target.loader);
    container_mc.addChild(my_thumb);
    my_tweens[Number(my_thumb.name)]=new Tween(my_thumb, "alpha", Strong.easeIn, 0,1,0.5, true);
    my_thumb.contentLoaderInfo.removeEventListener(Event.COMPLETE, thumbLoaded);
}

The Tweens seem to be loaded into an array with

 var my_tweens:Array = [];

But once these thumbnails are loaded and fade in I would like them to fade in and out again with a given pause in between. Maybe even varying the pause for each thumbnail.

Now that the tweens are in an array - how do I start fading them in and out again. I’ve tried:



my_tweens[Number(my_thumb.name)].addEventListener(TweenEvent.MOTION_FINISH, onFinish);


But it comes up with all sorts of errors.

What would be the best way to approach this?