[COLOR=black][FONT=Verdana]I know this topic has been beat to death. I can tell by all the searching I’ve done thus far. I apologize in advance. I’ve created a gallery that works almost the way I want it to. I compiled a couple different snippets of code and I feel I’m almost there. However, I keep getting the “Error opening URL” message in the output panel. It appears right off the bat and then several times throughout the rotation. When it appears, it’s skipping an image and nothing appears for 5 seconds then the rotation picks back up.[/FONT][/COLOR]
[COLOR=black][FONT=Verdana]Here is my code. If there were actual images in the directory listed, they would appear.[/FONT][/COLOR]
import mx.transitions.Tween;
import mx.transitions.easing.*;
files = new Array();
lv = new LoadVars();
lv.onLoad = function() {
fl = this.filelist;
files = fl.split(",");
c = files.length-1;
for (i=0; i<c; i++) {
trace(files*);
}
};
lv.load("http://www.kirupa.com/developer/mx2004/pg/files.php");
randomImage = Math.floor(Math.random()*c);
image_value = files[randomImage];
var container:MovieClip = this.createEmptyMovieClip("container", this.getNextHighestDepth());
container._x = 0;
container._y = 0;
container.loadMovie(image_value);
var imageFadeIn:Tween = new Tween(container, "_alpha", Regular.easeOut, 0, 100, 1, true);
function loadRandomImages() {
randomImage = Math.floor(Math.random()*c);
image_value = files[randomImage];
var imageFadeOut:Tween = new Tween(container, "_alpha", Regular.easeOut, 100, 0, 1, true);
imageFadeOut.onMotionFinished = function() {
container.loadMovie(image_value);
var imageFadeIn:Tween = new Tween(container, "_alpha", Regular.easeOut, 0, 100, 1, true);
};
}
my_interval = setInterval(loadRandomImages, 5000);
Thanks in advance for any input!
RC