I am learning actionscript and having a tough time of it…
Here is the script I am having problems with…the problems is that the alpha fade that I created, does not reset when a new images is loaded. Any ideas?
Here is the script, any help would be much appreciated.
// start of script
onClipEvent (load) {
photos = new Array(“images/mel_1.jpg”, “images/mel_2.jpg”, “images/mel_3.jpg”, “images/mel_4.jpg”, “images/mel_5.jpg”);
pictureNumber = photos.length;
function getNextNumber() {
pictureNumber++;
if (pictureNumber>=photos.length) {
pictureNumber = 0;
}
trace(pictureNumber);
return (pictureNumber);
}
function loadNextPhoto() {
this.createEmptyMovieClip(“myPhotosHolder”, 1);
myPhotosHolder.loadMovie(photos[getNextNumber()], 1);
}
function loadPhotos() {
loadNextPhoto();
setInterval(loadNextPhoto, 5000);
}
loadPhotos();
}
onClipEvent (enterFrame) {
function fadeOut() {
this._alpha -= 20;
}
if (getTimer()>5000) {
fadeOut();
}
}
// end of script
I have attached my .fla file with this thread.