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 MotorRocks.com 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.addListener(listener);
 
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

Full Screen Preloader

This is an older preloader that I usually use in my project because is very easy to use. You just have to copy and paste the preloader movieClip in your project and that’s all 😉

horizontal preloader

Read more