Groups | Blog | Home
all groups > flash (macromedia) > december 2006 >

flash (macromedia) : changing direction of vertical scroll menu


svarmuza
12/31/2006 5:24:25 PM
Plase if someone could help me,
I made a vertical flash menu and I would like to change a direction of its
movement. When I drag my mouse down from the center, I would like links ( in my
case photos to move upwards, not downwards). You can see what am I talking
about at
http://www.alarmi555.com. You can download one of the menus to check out the
code if you need http://www.alarmi555.com/srednji.zip.

The code that is causing scrolling you can find below.
Thank you all, and wish you HAPPY NEW YEAR.

onClipEvent (load) {
ycenter = 120;
speed = 1/20;
}
onClipEvent (enterFrame) {
var distance = _parent.mask_mc._ymouse-ycenter;
if(_parent.mask_mc.hitTest(_root._xmouse, _root._ymouse, false)){
_y += (distance*speed);
}
if (_y>0) {
_y = -2293;
}
if (_y<-2293) {
_y = 0;
}
}
Nickels55
1/1/2007 2:28:01 PM
change this
_y += (distance*speed);
to this
Mr. Rish
1/1/2007 7:10:57 PM
svarmuza
1/1/2007 9:00:24 PM
Thank you very much, this solved the problem.
Happy New Year to all good people,
AddThis Social Bookmark Button