Scrolling Images

OK I’m still having problems with this scrolling menu. [Tut]
It seems to work ok until you move the mouse to the left. Then it stops when it gets to the first frame.

The code is:


onClipEvent (load)
{
   xcenter=389.9;
   speed=1/10;
}
onClipEvent (enterFrame)
{
   var distance=_root._xmouse-xcenter;
   _x-=(distance*speed);
   if (_x > 0) _x=-1768.6;
   if (_x < -1768.6) _x=0;
}

I have supplied the fla if it helps.
As always, I don’t want anyone to do it for me. I would just like to know what I’m doing wrong.
I have about 30 of these to do so I would like to be able to them myself and not have to keep posting when things go pear shaped.

Thanx in advance :slight_smile:

Sorry. FLA

yaya! i figured out how to fix it… do you want me to post the fla? or just tell you on here what i did differnetly?

You my love are a STAR!!
Could you do both so others might learn please.

And THANX SO MUCH

np, just give me a few secs to zzzzip :slight_smile:

ok, two main differneces here…

#1 there was a bit of code missing from the middle…

[AS]onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x+=(distance*speed);
}[/AS]

so i added that in, for the total code to be

[AS]
onClipEvent (load)
{
xcenter=389;
speed=1/50;
}
onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x+=(distancespeed);
}
onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x+=(distance
speed);
if (_x > 0) _x=-1772;
if (_x < -1772) _x=0;
}[/AS]

The only thing else in the code that I changed was the xcenter 339, the speed 50, and the last number(i think it was 1764.6 originally, dont remember).
let me explain why, but first, i will tell you the other big thing that you were missing. you needed to have a dup of the group of buttons inside the main MC; you only had one. it has to be there so that when it’s scrolling, and it needs to repeat, well, it can. this makes it continually scroll. so i just added a copy in.
now for the #s in AS, i changed 389 cuz i like whole #s, I changed 10 to 50 cuz it was going soo fast i was getting a headache, and i changed the last # to 1772 because when i added on the 2nd image, it needed a few extra pixels to account for half of the gap between the two images this way it was smooth, and didn’t jump. actually, it still jumps abotu 3 pixels or so, very minor, but i would suggest that you tweak it to match exactly, i jsut didnt wanan DO IT for you… lol :wink:

let me know if there’s anything i didnt explain good

THE FLA!!!

Looking now :slight_smile:

btw, happy 2 days after :wink:

LOL thatx :slight_smile:
This year it was 4:19

Seems to work just fine and dandy thanx to you!!

If I have any problems I will be calling upon your services once again [Hope that’s ok with you]!

I owe you big time for this so, if you’re ever in the LBC area I’m buying the drinks :wink:

i’m moving to orange county in 2 years… can i take a raincheck? hehe

If I have any problems I will be calling upon your services once again [Hope that’s ok with you]!

sure :beam:

Sure :slight_smile: