Hi All,
I desperately need help with a preloader for my dynamic image gallery. I've created this with help from tutorials available online. But somehow when I post it online, the gallery takes time to load and hence need a preloader for the user to understand that something is happening. My code's given below:
Code:
stop();
var loader:MovieClipLoader = new MovieClipLoader();
this.createEmptyMovieClip("container",1);
var imagesNumber:Number = 11;
for (i=1; i<=imagesNumber; i++) {
container.attachMovie("image"+i,"image"+i+"_mc",i);
myThumb_mc=container["image"+i+"_mc"];
myThumb_mc._x=(i-1)*myThumb_mc._width;
myThumb_mc._y=(Stage.height-myThumb_mc._height)/2
myThumb_mc.onRelease = function(){
unloadMovie('container');
}
}
container.onEnterFrame = function (){
this._x += Math.cos((-_root._xmouse/Stage.width)*Math.PI)*10;
if (this._x>0) {
this._x = 0;
}
if (-this._x>(this._width-Stage.width)) {
this._x = -(this._width-Stage.width);
}
};
This is an Actionscript 2.0 code.
I am very much new to Actionscript and whatever I have learnt (not much) is thanks to forums like these and tutorials that are available online.
Appreciate all your help. Regards.