# Buttons stop working

**URL:** <https://forum.kirupa.com/t/buttons-stop-working/18236>\
**Category:** Uncategorized\
**Created:** [April 14, 2003, 8:15pm UTC](https://forum.kirupa.com/t/buttons-stop-working/18236 "2003-04-14T20:15:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dshallenberger](https://avatars.discourse-cdn.com/v4/letter/d/ecccb3/32.png) [@dshallenberger](https://forum.kirupa.com/u/dshallenberger)\
**Post date:** [April 14, 2003, 8:15pm UTC](https://forum.kirupa.com/t/buttons-stop-working/18236/1 "2003-04-14T20:15:42Z")

</div>

Hey everyone

This is my second post and I’m struggling with flash, so bear with me.

I setup a scrolling 360 view of a warehouse for a client, and you can see what I have so far [here](http://www.popdesignworks.com/flash/).

The problem is the buttons work just fine if you click them first, before touching the slider. But, after using the slider, the buttons stop working. This is gonna be hard to explain for me but I’ll try. I have a value being set that designates the speed of scroll when the buttons are pressed or the slider is moved. The value is set correctly when the buttons are clicked before the slider is touched, but once the slider is moved, the buttons stop setting the speed value. The slider continues to work fine, but the buttons don’t. Reload the movie, and the buttons will work again, but only until the slider is moved.

If you need code samples, let me know and I’ll paste it in here.

I hope someone can help…the deadline is approaching and I’m pulling my hair out on this one.

Thanks,  
Dan

---

<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 14, 2003, 9:06pm UTC](https://forum.kirupa.com/t/buttons-stop-working/18236/2 "2003-04-14T21:06:25Z")

</div>

Ok, problem fixed…thanks for looking!

---

<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 15, 2003, 1:11am UTC](https://forum.kirupa.com/t/buttons-stop-working/18236/3 "2003-04-15T01:11:09Z")

</div>

can you let us know how you fixed this so any other people with this problem can fix it too? 😉

---

<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 15, 2003, 1:59pm UTC](https://forum.kirupa.com/t/buttons-stop-working/18236/4 "2003-04-15T13:59:25Z")

</div>

Sure…I’m sorry, I should have done this sooner…

I had this code for the slider:

```php
dragger.onPress=function(){
this.startDrag(true,-52,0,52,0);
this.onEnterFrame=function(){
_global.ratio_=_Math.round(this._x);
}
}
dragger.onRelease=function()_{
stopDrag();
dragger._x_=_0;
_global.ratio_=_0;
}

```

Apparently the onEnterFrame within this code was looping forever and not letting my buttons perform the way they were supposed to. I was told to change the code to this:

```php
dragger.onPress=function(){
this.startDrag(true,-52,0,52,0);
this.onEnterFrame=function(){
_global.ratio_=_Math.round(this._x);
}
}
dragger.onRelease=function()_{
stopDrag();
dragger._x_=_0;
_global.ratio_=_0;
delete this.onEnterFrame;
}

```

The ‘delete this.onEnterFrame;’ allowed the loop to stop when the user let go of the slider control, and everything worked perfect.
