Slowdown advice?

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.

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 :stuck_out_tongue:

lol i found no carousel…

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

well imagine one, because I can see it :stuck_out_tongue:

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:


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 :stuck_out_tongue:

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

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

was that it?

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