I have borrowed a sliding horizontal thumbnail script I found online and have successfully gotten it to work. The only problem is that I would like to either stop the action or ease it down when the mouse is out of the menu area. My sliding menu clip will be called into a level on another file, so I don't want the mouse action to work unless it is only in that MC area. Is there an easy way to do this? I'm willing to use a completely different script if there is a better one, but this one has the general behavior I want (i.e. the menu needs to loop, I want the action to accelerate on the perimeters, the sliding motion should be smooth, and I need to be able to have button actions on the menu). here's the script I have right now:
code:
panel.onRollOver = panelOver;
function panelOver() {
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}
var b = stroke.getBounds(_root);
function scrollPanel() {
if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {
this.onRollOver = panelOver;
delete this.onEnterFrame;
}
if(panel._x >= -121) {
panel._x = -1825;
}
if(panel._x <= -1847) {
panel._x = -140;
}
var xdist = _xmouse - 250;
panel._x += Math.round(-xdist / 10);
}




Reply With Quote