Image loader

I did not updated this blog lately because I was working on some flash projects… and now I want to share with you the code that I use for most of my images when I load them externally.
I used this code a lot in and other sites…

import mx.transitions.Tween;
import mx.transitions.easing.*;
var listener:Object = new Object();
listener.tmc = target;
listener.onLoadInit = function(mc:MovieClip) {
	new Tween(mc,"_alpha", Strong.easeOut,0,100,2,true);
var loader:MovieClipLoader = new MovieClipLoader();
loader.loadClip("image01.jpg", holder);

I think this is the easiest way to preload images and when loaded… to fade them in.
It’s a nice effect and you can use it on your projects if you want 😉

Download Source Files