_root.scrollerName = _root.scrollerClip;
_root.left = 10;
_root.innerLeft = 100;
_root.right = 484;
_root.innerRight = 350;
_root.top = 10;
_root.bottom = 105;
_root.minXposition = -1266;
_root.maxXposition = 0;
_root.idleScrollSpeed = 0;
_root.overScrollSpeed = 15;
if (_root.scrollerName._x <_root.minXposition) {
_root.scrollerDirection = "right";
} else if (_root.scrollerName._x> _root.maxXposition) {
_root.scrollerDirection = "left";
}
if (_root._ymouse <_root.bottom && _root._ymouse> _root.top) {
if (_root._xmouse> _root.left && _root._xmouse <_root.innerLeft) {
if (_root.scrollerName._x> _root.maxXposition) {
break;
} else {
_root.scrollerName._x = _root.scrollerName._x + _root.overScrollSpeed;
}
} else if (_root._xmouse> _root.innerRight && _root._xmouse <_root.right) {
if (_root.scrollerName._x <_root.minXposition) {
break;
} else {
_root.scrollerName._x = _root.scrollerName._x - _root.overScrollSpeed;
}
} else if (_root._xmouse <_root.left or _root._xmouse> _root.right) {
if (_root.scrollerDirection == "right") {
_root.scrollerName._x = _root.scrollerName._x + _root.idleScrollSpeed;
} else if (_root.scrollerDirection == "left") {
_root.scrollerName._x = _root.scrollerName._x - _root.idleScrollSpeed;
}
}
} else if (_root.scrollerDirection == "right") {
_root.scrollerName._x = _root.scrollerName._x + _root.idleScrollSpeed;
} else if (_root.scrollerDirection == "left") {
_root.scrollerName._x = _root.scrollerName._x - _root.idleScrollSpeed;
}
Vertical Scroller
Started by Takatoshi, Apr 25 2006 11:39 AM
3 replies to this topic
#1
Posted 25 April 2006 - 11:39 AM
Hi all, i have a horizontal scroller, i was wondering if there was any way to make it a vertical scroller by changing the actions script??
#2
Posted 25 April 2006 - 11:50 AM
all you need to do is change all the ._x to ._y and then change the x values to correct y values at the top.
#3
Posted 25 April 2006 - 02:28 PM
don't forget to change the variables in the if statements (innerright) and so on.. otherwise it will not work properly...
#4
Posted 28 April 2006 - 10:18 AM
Thankyou.. i've done it now.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
