im a noob with flash so this q. proberly isnt that hard but it has real confused me. :*(
I want to make a menu going along the left side of my site (o.k so far) with a semi-transparent bar that follows the curser (with Easing) up and down the menu
Ok, make a mc of the transparent box, give it instance name slide.
make all your buttons mcs and give them instance names lnk1, lnk2, lnk3, etc…
put this on first frame of timeline:
numLinks = 6; //number of links you have
slide._visible = true;
slide.speed = 12;
sliderMove = function () {
slide._visible = true;
slide._y = slide._y-(slide._y-newy)/slide.speed;
};
onEnterFrame = function () {
for (i=1; i<=numLinks; ++i) {
link = “lnk” add i;
if (_root[link].hitTest(_xmouse, _ymouse)) {
newy = _root[link]._y;
_root[link].onEnterFrame = sliderMove;
}
}
};
I didn’t code this, found it here on the forums somewhere awhile back, but its really easy to customize and easy to understand how the code works. hope it helps. =]
the .fla you posted works fine, just how i want the slider to work, so i copyed the actionscript and all the mcs instance names but my slider still dosent work
dose it make a diffrance if im haveing the whole menu in a mc?
Hmmm. well i suppose you would have to change the paths…
I’m not totally sure how well this would work, maybe wait for a more experienced member to back me up/ correct me, but you’d have to repath all your instances…
so where it says slide, youd havta put (with menu being the instance name of the mc…)
_root.menu.slide
and in the if statements it would have to be changed also…
_root.menu[link]
This is totally just a stab, i could be completely wrong, so it may be wise to wait for another opinion on this…