Hey everyone i was just using the infinte menu tut and Im trying to make it so that when it first loads up the menu is completely still and doesnt start moving unless you rollover. When it starts now its just on this looping roll what do i change in the code to make it stay still:
onClipEvent (load)
{
xcenter=150;
speed=1/10;
}
onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x+=(distancespeed);
}
onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x+=(distancespeed);
if (_x > 0) _x=-300;
if (_x < -300) _x=0;
}
Thanks,
Chris
no one has any idea how to make this thing slide only when a mouse is over??
onClipEvent (load) {
xcenter = 150;
speed = 1/10;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
var distance = _root._xmouse-xcenter;
_x += (distance*speed);
_x>0 ? _x=-300 : _x<-300 ? _x=0 : null;
}
}
:thumb:
You know who the man is…NATHAN YOU ARE THE MAN!!!..:thumb2:
Thanks bro it works perfectly. One last question is there a way i can make it ease smoothly to a stop when they rolloff or is that a pain.
Thanks a lot man!
AHH IM SO SORRY EVERYONE!!
I cant get this ■■■■ thing to work It just wont scroll right and i know its because of something in the code but i cant figure it out. Can someone please help me??
FLA
SWF
Everyone!!! I figured it out its pretty ridiculous but I got it and it makes no sense if anyone comes to this thread and they are having the same problem PM me and ill let you know how to fix it.
Chris
If anyone could point me in a direction where i could figure out how to make it ease when they rolloff instead of abruptly stopping would be great.
i would make a rollOut event that sets a variable, to the distance between the mouse and the menu, moving the objs x that variable, then just multiply that variable by .9 or something