Jump to content


Vertical Scroller


  • You cannot reply to this topic
3 replies to this topic

#1 Takatoshi

    Young Padawan

  • Members
  • Pip
  • 23 posts

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??

_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;
}


#2 DarkSuiyoken

    Young Padawan

  • Members
  • Pip
  • 63 posts

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 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

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 Takatoshi

    Young Padawan

  • Members
  • Pip
  • 23 posts

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