I use the folwing actioscript (2.0) to load images form a folder:
var timer = 10;
var verloop =25;
movieClip1._alpha=0;
movieClip2._alpha=0;
var here = this;
varReceiver = new LoadVars();
varReceiver.load("http://www.website.nl/countfiles.php");
varReceiver.onLoad = function() {
//trace(this.aantal);//outputs utf8_encode() has been used
var max = this.aantal;
var fotonr =random(max);
var bestand = new Array ();
var nr = 0;
for (l=0; l<max; l++) {
varReceiver2 = new LoadVars();
varReceiver2.load("http://www.website.nl/filename.php");
varReceiver2.onLoad = function() {
bestand[nr] = this["bestanden"+nr];
//trace("bestanden"+nr)
//trace(this[bestand+nr]);
nr++;
//trace (bestand[fotonr]);
//trace("timer"+timer)
if(bestand[fotonr]!=bestand[nr]){
numMC=1;
movieClip1._alpha +=verloop;
var movieClip1:MovieClip = createEmptyMovieClip("movieClip1", 0);
movieClip1.loadMovie("http://www.website.nl/folder/imagefolder/"+bestand[fotonr]);
actieTimer=1;
}
if(actieTimer==1){
trace("actieTimer"+actieTimer);
countdown = function(){
timer--;
trace(timer);
if(timer==0){
timer=10;
var fotonr =random(max);
if(bestand[fotonr]!=bestand[nr]){
if(numMC==1){
var movieClip2:MovieClip = createEmptyMovieClip("movieClip2", 0);
movieClip2.loadMovie("http://www.website.nl/folder/imagefolder/"+bestand[fotonr]);
}
}
}
}
countdownInterval = setInterval(countdown,1000);
}
}
//var nummer=(random(this.myVar)+1);
//trace(nummer);
}
};
sorry fore the use of dutch words in the action scripts:
bestand == file
foto == photo
nummer == number
this work but now i want that te movie clip fade in when loaded and fade out when the timer == 0
i tryed to use a motion tween but flash gave alot of errors
i hope that someon can help me.
Gr Werner