Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Never ending menu

Status
Not open for further replies.

infernoapbts

Programmer
Dec 13, 2002
20
US
I am trying to make a menu that scrolls left when the mouse is to the left of center, and right when it is right of center. The menu is a movie clip that is 1000 px wied by 90px high. I duplicated the movie and placed the second one at the end of the first, then made it one larger movie. here is the script im using:
onClipEvent (enterFrame)
onClipEvent (load)
{
xcenter=375;
speed=1/10;
}
onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x+=(distance*speed);
}
{
var distance=_root._xmouse-xcenter;
_x+=(distance*speed);
if (_x > 0) _x=-1000;
if (_x < -1000) _x=0;
}
the problem is i can't get it to seem like an endless clip. there are breaks between them as they scroll by. can someone kindly help me with what I am missing?

many thanks
infernoapbts
 
There are several things wrong with the code you posted. Did you mis-paste? Can you possibly post your fla? frozenpeas
 

onClipEvent (load) {
xcenter = 375;
speed = 1/10;
}
onClipEvent (enterFrame) {
var distance = _root._xmouse-xcenter;
_x += (distance*speed);
}
onClipEvent (enterFrame) {
var distance = _root._xmouse-xcenter;
_x += (distance*speed);
if (_x>0) {
_x = -1000;
}
if (_x<-1000) {
_x = 0;
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top