aolba
11-16-2006, 07:58 PM
I'm trying to adapt a code form www.gotoandlearn.com (scrolling thumbs)
the problem is the example is horizontal, I need it to make a vertical version.
But I think I'm missing someting.
this is the original 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 >= 89) {
panel._x = 89;
}
if(panel._x <= -751) {
panel._x = -751;
}
var xdist = _xmouse - 250;
panel._x += Math.round(-xdist / 7);
}
the movie is 500x200
this is my code
theGallery.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(theGallery._y >= 12) {
trace(theGallery._y);
theGallery._y = 12;
}
if(theGallery._y <= -getProperty(theGallery,_height)-420) {
trace(theGallery._y);
theGallery._y = -getProperty(theGallery,_height)-420;
}
var ydist = _ymouse - 206;
theGallery._y += Math.round(-ydist / 7);
}
my movie is 760x420
but is didn't stop when is going up...
what should I change?
the problem is the example is horizontal, I need it to make a vertical version.
But I think I'm missing someting.
this is the original 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 >= 89) {
panel._x = 89;
}
if(panel._x <= -751) {
panel._x = -751;
}
var xdist = _xmouse - 250;
panel._x += Math.round(-xdist / 7);
}
the movie is 500x200
this is my code
theGallery.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(theGallery._y >= 12) {
trace(theGallery._y);
theGallery._y = 12;
}
if(theGallery._y <= -getProperty(theGallery,_height)-420) {
trace(theGallery._y);
theGallery._y = -getProperty(theGallery,_height)-420;
}
var ydist = _ymouse - 206;
theGallery._y += Math.round(-ydist / 7);
}
my movie is 760x420
but is didn't stop when is going up...
what should I change?