# Scrolling Images

**URL:** <https://forum.kirupa.com/t/scrolling-images/18945>\
**Category:** flash\
**Created:** [April 22, 2003, 8:47pm UTC](https://forum.kirupa.com/t/scrolling-images/18945 "2003-04-22T20:47:36Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kel\_420](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@Kel\_420](https://forum.kirupa.com/u/Kel_420)\
**Post date:** [April 22, 2003, 8:47pm UTC](https://forum.kirupa.com/t/scrolling-images/18945/1 "2003-04-22T20:47:36Z")

</div>

OK I’m still having problems with this scrolling menu. [[Tut]](http://www.kirupa.com/developer/mx/infinite.htm)  
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:

```php

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 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 22, 2003, 8:50pm UTC](https://forum.kirupa.com/t/scrolling-images/18945/2 "2003-04-22T20:50:55Z")

</div>

[Sorry. FLA](http://www.bluprint.com/stuff/ferrari01.zip)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 22, 2003, 9:46pm UTC](https://forum.kirupa.com/t/scrolling-images/18945/3 "2003-04-22T21:46:22Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 22, 2003, 9:48pm UTC](https://forum.kirupa.com/t/scrolling-images/18945/4 "2003-04-22T21:48:19Z")

</div>

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

And THANX SO MUCH

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 22, 2003, 9:49pm UTC](https://forum.kirupa.com/t/scrolling-images/18945/5 "2003-04-22T21:49:40Z")

</div>

np, just give me a few secs to zzzzip 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 22, 2003, 10:02pm UTC](https://forum.kirupa.com/t/scrolling-images/18945/6 "2003-04-22T22:02:39Z")

</div>

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+=(distance_speed);  
}  
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 😉

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

[THE FLA!!!](http://pathofaith.digitalrice.com/temp/ferrari01GOLGI.zip)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 22, 2003, 10:05pm UTC](https://forum.kirupa.com/t/scrolling-images/18945/7 "2003-04-22T22:05:20Z")

</div>

Looking now 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 22, 2003, 10:07pm UTC](https://forum.kirupa.com/t/scrolling-images/18945/8 "2003-04-22T22:07:27Z")

</div>

btw, happy 2 days after 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 22, 2003, 10:08pm UTC](https://forum.kirupa.com/t/scrolling-images/18945/9 "2003-04-22T22:08:22Z")

</div>

LOL thatx 🙂  
This year it was 4:19

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 22, 2003, 10:14pm UTC](https://forum.kirupa.com/t/scrolling-images/18945/10 "2003-04-22T22:14:03Z")

</div>

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_ 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 22, 2003, 10:14pm UTC](https://forum.kirupa.com/t/scrolling-images/18945/11 "2003-04-22T22:14:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 22, 2003, 10:16pm UTC](https://forum.kirupa.com/t/scrolling-images/18945/12 "2003-04-22T22:16:12Z")

</div>

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

sure :beam:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 22, 2003, 10:16pm UTC](https://forum.kirupa.com/t/scrolling-images/18945/13 "2003-04-22T22:16:16Z")

</div>

Sure 🙂
