# Moving slide and buttons

**URL:** <https://forum.kirupa.com/t/moving-slide-and-buttons/27599>\
**Category:** Uncategorized\
**Created:** [August 4, 2003, 4:46pm UTC](https://forum.kirupa.com/t/moving-slide-and-buttons/27599 "2003-08-04T16:46:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wa\_ha\_ha\_ha\_ha](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wa_ha_ha_ha_ha/32/55_2.png) [@wa\_ha\_ha\_ha\_ha](https://forum.kirupa.com/u/wa_ha_ha_ha_ha)\
**Post date:** [August 4, 2003, 4:46pm UTC](https://forum.kirupa.com/t/moving-slide-and-buttons/27599/1 "2003-08-04T16:46:48Z")

</div>

hi all!  
I have a problem about my script  
I am doing a image slide which moves from right side of the screen to the left side of the screen at all time. The Slide is about 1000 pixel, within the Image Strip I have 5 images that are buttons. I want to be able click on the image and make the slide to stop.

//In the strip moive clip I have:

onClipEvent(enterFrame){  
this.\_x -= 5;  
if(this.\_x \<= - 550){  
this.\_x = 600;  
}  
else if(\_global.click == 1){  
this.\_x -=0;  
trace(\_global.click);  
}  
}

//In the buttons I have:

on(press){  
\_global.click = 1;  
}

It seems right to me, but it just won’t work!  
Can someone help!!! THANk yOU some MUCH!!!:bu: :bu: :bu:

---

<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:** [August 4, 2003, 5:15pm UTC](https://forum.kirupa.com/t/moving-slide-and-buttons/27599/2 "2003-08-04T17:15:34Z")

</div>

on the buttons you could place this code:

```auto

on(release){
delete _parent.onEnterFrame;
}

```

or if your gonna have it stop and start again i’d do something like this:

```auto

onClipEvent(load){
        moveObj = function(){                
onEnterFrame = function(){
                if(_x <= - 550){
                        this._x = 600;
                }else{
                        _x -= 5;
                }
        }
}
moveObj();
}

```

and on the buttons place the same code as above:

```auto

on(release){
delete _parent.onEnterFrame;
}

```

and when you want to start moving the obj again just call the function moveObj();

hope this helps

---

<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:** [August 4, 2003, 5:30pm UTC](https://forum.kirupa.com/t/moving-slide-and-buttons/27599/3 "2003-08-04T17:30:02Z")

</div>

thanks a lot! I will try that!

But, can some one tell me if my script is wrong or is there something that I need to change in order to get it to work!  
It really bothers me when I know I am close to get it to work!!!  
Thanks for help!!!
