<--- [a, b, c] ---> xml load 30 to 40 large images to scroll continously

<— [ … a, b, c… ] —> xml load 30 to 40 large images to scroll continously

I am wondering if anyone has ever seen this done before. A xml loaded gallery of only large images (NO THUMBS) that scroll infinitely. I have created a gallery that loads 30 to 40 large images via XML and scrolls it continously horizontally left or right - they are masked so that 3 can be seen scrolling by at any given time. The actionscript I have works great but takes quite some time for them to all load before scrolling will start. What I would like to do is have only maybe 6 fully load at a time and then unload when not close to the masked area. I’m not sure how to do this but I thought maybe with a setInterval type function? Where only images scrolling into the masked area are called to load.

Here is a site I really love that does something similar:

http://www.roxburymusic.com/index.html

Here is the actionscript I am using so far:

pArray = new Array();
pictArray = new Array();

my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success) {
if (success) {
for (var i = 0; i<this.firstChild.childNodes.length; i++) {
pictArray.push(this.firstChild.childNodes*.attributes.scrollphotos);
pArray.push(this.firstChild.childNodes*.attributes.image);
}
}
delay = setInterval(makeMenu, 100);
};
my_xml.load(“gallery2.xml”);
var menu = this.createEmptyMovieClip(“menu_tot”, 99);
menu.setMask(mask2);
var sub_menu = menu.createEmptyMovieClip(“menu”, 100);
var p = 0;
var q = 0;
var loadper = 0;
function makeMenu() {
clearInterval(delay);
var item = sub_menu.createEmptyMovieClip(“pic”+q, q);
item.loadMovie(pictArray[p]);
var temp = _parent.createEmptyMovieClip(“tmp”, 9999+q);
temp.onEnterFrame = function() {
var tot = item.getBytesTotal();
var loa = item.getBytesLoaded();
var per = Math.round(((loa/tot)100)/(pictArray.length2));
loadBar._xscale = loadper+per;
if (tot == loa && tot>4) {
item.id = p;
loadper += per;
if (q>0) {
item._x = sub_menu[“pic”+(q-1)]._x+sub_menu[“pic”+(q-1)]._width+10;
} else {
item._x = 0;
};
nextItem();
delete this.onEnterFrame;
}
};
}
var amount = pictArray.length-1;
function nextItem() {
if (q<((pictArray.length*2)-1)) {
q++;
if (p<(pictArray.length-1)) {
p++;
makeMenu();
} else {
p = 0;
makeMenu();
}
} else {
activateMenu();
}
}
var center = xcenter = 326;
var speed = .05;
function activateMenu() {
menu.onEnterFrame = function() {
var distance = _root._xmouse-center;
if (mask2.hitTest(_root._xmouse, _root._ymouse, false)) {

		this._x += (distance*speed);
		if (this._x&lt;-sub_menu._width/2) {
			this._x = 0;
		}
		if (this._x&gt;0) {
			this._x = -sub_menu._width/2;
		}
	}
};

}