Hi…
i used the continuous thumbnail gallery to scroll from right to left the images…
now i would like to stopp the scoll when u are on the images…can some guru help me?..
This my code:
cliparray = [];
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
url = [];
link = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
url* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
link* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
thumbnails_fn(i);
}
} else {
content = “file not loaded!”;
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“images.xml”);
/////////////////////////////////////
p = 0;
this.createEmptyMovieClip(“tscroller”, 1000);
scroll_speed = 5;
var tot = 0;
tscroller.onEnterFrame = function() {
if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {
if (_root._xmouse>=_x) {
for (var obj in cliparray) {
cliparray[obj]._x -= scroll_speed;
}
if (cliparray[0]._x<-cliparray[0]._width) {
cliparray[0]._x = cliparray[cliparray.length-1]._x+cliparray[cliparray.length-1]._width+500;
var j = cliparray.splice(0, 1);
cliparray = cliparray.concat(j);
}
} else if (_root._xmouse<=_x) {
for (var obj in cliparray) {
cliparray[obj]._x += scroll_speed;
}
if (cliparray[cliparray.length-1]._x>hit_right._x) {
cliparray[cliparray.length-1]._x = cliparray[0]._x-(cliparray[cliparray.length-1]._width+500);
var j = cliparray.splice(cliparray.length-1, 1);
cliparray = j.concat(cliparray);
}
}
}
};
function thumbnails_fn(k) {
var yy = thumbnail_mc.createEmptyMovieClip(“t”+k, thumbnail_mc.getNextHighestDepth());
cliparray.push(yy);
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = 500+(target_mc._width+500)*k;
target_mc.pictureValue = k;
tot += target_mc._x;
target_mc.onRelease = function() {
p = this.pictureValue+0;
getURL(link[p], “_blank”);
};
target_mc.onRollOver = function() {
this._alpha = 60;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(url[k], “thumbnail_mc.t”+k);
}
And here the exemple
http://portale.nethouse.it/download/test/movie3.html
thanx