# Image slide scroller

**URL:** <https://forum.kirupa.com/t/image-slide-scroller/157233>\
**Category:** Uncategorized\
**Created:** [July 31, 2005, 7:37am UTC](https://forum.kirupa.com/t/image-slide-scroller/157233 "2005-07-31T07:37:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![slaven](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@slaven](https://forum.kirupa.com/u/slaven)\
**Post date:** [July 31, 2005, 7:37am UTC](https://forum.kirupa.com/t/image-slide-scroller/157233/1 "2005-07-31T07:37:41Z")

</div>

hello,

i am working on an image slide scroller a have some problems.  
The slide show is simple, the viewer clicks on a button and an image scrolls to the center of the screen. So i have made a MC of a 3 images lined up side by side and a 3 buttons for jumping to  
particular image.

for now the image mc is static but i want to make it moving from right to left but still to be able to use my buttons like before.

the problem is when i give an action script to the image mc to move, something like

onClipEvent(enterFrame) {  
speed = 2;  
this.\_x -= speed;  
}

the buttons lose their accuracy because the image mc is moving and the buttons do not  
jump to the image like before because that image is now moved away.

the AC for the buttons:

on (press) {  
with (mySlider) {  
picno=3;  
}

in this example i have 3 images so the next button would have the “picno=2”  
and the last one “picno=1”

the AC for the image MC:

onClipEvent(load) {  
picno=3;  
totalpics=3;

}

onClipEvent (enterFrame) {

newdist =  
(((picno\*(\_width/totalpics)-  
(.3\*\_width) - \_x)) / 3);  
\_x = \_x+newdist;  
}

tnx in advance

Slaven
