# Slowdown advice?

**URL:** https://forum.kirupa.com/t/slowdown-advice/265040
**Category:** Uncategorized
**Created:** [July 3, 2008, 8:49am UTC](https://forum.kirupa.com/t/slowdown-advice/265040 "2008-07-03T08:49:39Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)
#### Post date: [July 3, 2008, 8:49am UTC](https://forum.kirupa.com/t/slowdown-advice/265040/1 "2008-07-03T08:49:39Z")

</div>

[http://hermes.hud.ac.uk/c0568903/carousel14.html](http://hermes.hud.ac.uk/c0568903/carousel14.html)

I have the above set to mouse position so it spins depending where the mouse is.

However I want it to slow down / stop, when over the top navigation or when the index page is active.

I have this code in the mover(onenterframe), however it seems buggy.

```auto
if (_root._ymouse>70 && _root._ymouse<430) {

} else{
if (speed>=0.00001) {
                speed = speed-0.00001;
            } else if (speed<=-0.00001) {
                speed = speed+0.00001;
            }
}

```

frankly I’m thinking of disabling the carousel 😛

---

<div class="post-metadata">

### Author: ![pantas](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pantas](https://forum.kirupa.com/u/pantas)
#### Post date: [July 3, 2008, 10:02am UTC](https://forum.kirupa.com/t/slowdown-advice/265040/2 "2008-07-03T10:02:43Z")

</div>

lol i found no carousel…

i mean, i couldnt find anything in that site… :s

---

<div class="post-metadata">

### Author: ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)
#### Post date: [July 3, 2008, 10:12am UTC](https://forum.kirupa.com/t/slowdown-advice/265040/3 "2008-07-03T10:12:24Z")

</div>

well imagine one, because I can see it 😛

---

<div class="post-metadata">

### Author: ![pantas](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pantas](https://forum.kirupa.com/u/pantas)
#### Post date: [July 3, 2008, 10:15am UTC](https://forum.kirupa.com/t/slowdown-advice/265040/4 "2008-07-03T10:15:18Z")

</div>

ok i think i see what you were talking about…

you’re not changing the speed var on enterframe…  
you should be calculating the distance to the end of the transition…by its X. something like this:

```auto

this.onEnterFrame = function(){
	if(chosenOne_mc._x >=Stage.width/2){
		speed = -(Stage.width/2-chosenOne_mc._x)/3000 // well you know a bit of as play with this
	}else{
		speed = (home.Escolhido._x-Stage.width/2)/3000 // well you know a bit of as play with this
	}
}

```

in the end, speed will be about 0. and you can call the rest of the functions

the Stage.width/2 is suposed to be the center of the carousel…  
don’t disable the carousel, carousels are cool 😛

---

<div class="post-metadata">

### Author: ![pantas](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pantas](https://forum.kirupa.com/u/pantas)
#### Post date: [July 3, 2008, 10:19am UTC](https://forum.kirupa.com/t/slowdown-advice/265040/5 "2008-07-03T10:19:50Z")

</div>

and please, be more patient in the rest of the threads… take my example ok? 😉

could be something like “if i found it, so can you…”

---

<div class="post-metadata">

### Author: ![pantas](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pantas](https://forum.kirupa.com/u/pantas)
#### Post date: [July 3, 2008, 11:22am UTC](https://forum.kirupa.com/t/slowdown-advice/265040/6 "2008-07-03T11:22:36Z")

</div>

was that it?

---

<div class="post-metadata">

### Author: ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)
#### Post date: [July 3, 2008, 11:50am UTC](https://forum.kirupa.com/t/slowdown-advice/265040/7 "2008-07-03T11:50:14Z")

</div>

huh? I’m doing something else right now, get back to you
