example:
http://www.epic-pc.com/SRD/collection.swf
I am working on this gallery and right now when you move the mouse up over the thumbnails, the images go up and when moving the mouse down, the images go down making it hard for the user to find the thumb they are looking for.
All I need to do is switch it so that moving the mouse down makes the images scroll upward and moving the mouse up makes the images go downward. Any Suggestions? Here is the as:
spacing = 10;
containerMC._alpha = 0;
pArray = new Array();
pictArray = new Array();
captiont=new Array();
MovieClip.prototype.loadPic = function(pic) {
this._alpha = 0;
this.loadMovie(pArray[pic]);
caption_txt.text=captiont[pic];
this._parent.onEnterFrame = function() {
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
bar._visible = 1;
per = Math.round((l/t)*100);
if (t != 0 && Math.round(l/t) == 1 && containerMC._width != 0) {
var w = containerMC._width+spacing, h = containerMC._height+spacing;
border.resizeMe(w, h);
bar._visible = 0;
delete this.onEnterFrame;
} else {
bar._width = per;
}
};
};
MovieClip.prototype.resizeMe = function(w, h, pic) {
var speed = 3;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
this._width = w;
this._height = h;
containerMC._x = this._x-this._width/2+spacing/2;
containerMC._y = this._y-this._height/2+spacing/2;
containerMC._alpha = 100;
delete this.onEnterFrame;
}
};
};
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.thumb);
pArray.push(this.firstChild.childNodes*.attributes.image);
captiont.push(this.firstChild.childNodes*.attributes.captiontx);
}
}
delay = setInterval(makeMenu, 100);
};
my_xml.load("newgallery.xml");
var menu = this.createEmptyMovieClip("menu_tot", 99);
menu.setMask(mask);
menu._x = mask._x;
menu._y = mask._y;
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.length*2));
loadBar._xscale = loadper+per;
if (tot == loa && tot>4) {
item.id = p;
loadper += per;
if (q>0) {
item._y = sub_menu["pic"+(q-1)]._y+sub_menu["pic"+(q-1)]._height+10;
} else {
item._y = 0;
}
item.onRelease = function() {
containerMC.loadPic(this.id);
};
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 = mask._height/2;
var speed = .05;
function activateMenu() {
containerMC.loadPic(0);
var turnPoint = mask_mc._y;
loadBar._visible = 0;
menu.onEnterFrame = function() {
var distance = mask._ymouse-center;
if (mask.hitTest(_root._xmouse, _root._ymouse)) {
this._y += (distance*speed);
if (this._y<mask._y-sub_menu._height/2) {
this._y = mask._y;
}
if (this._y>mask._y) {
this._y = mask._y-sub_menu._height/2;
}
if (this._y<turnPoint-d) {
this._y += d;
}
if (this._y>turnPoint) {
this._y -= d;
}
} else {
//3 is the constant speed, change it to your needs
this._y += -1;
}
};
}
Thank you very much!