# Ease to slow down carosel menu

**URL:** https://forum.kirupa.com/t/ease-to-slow-down-carosel-menu/306683
**Category:** Uncategorized
**Created:** [March 19, 2010, 9:23pm UTC](https://forum.kirupa.com/t/ease-to-slow-down-carosel-menu/306683 "2010-03-19T21:23:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![felipegm](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@felipegm](https://forum.kirupa.com/u/felipegm)
#### Post date: [March 19, 2010, 9:23pm UTC](https://forum.kirupa.com/t/ease-to-slow-down-carosel-menu/306683/1 "2010-03-19T21:23:31Z")

</div>

i’m using the code bellow, from [gotoandlearn.com](http://gotoandlearn.com), to make a carosel menu.

I’m I want to do is to make the carosel to stop with ease, and not to zero to fast.

```auto

import mx.utils.Delegate;
var resistencia:Number = 0.000001;
var numOfItems:Number;
var radiusX:Number = 375;
var radiusY:Number = 60;
var centerX:Number = 710 / 2;
var centerY:Number = Stage.height / 2;
var speed:Number = 0.05;
var perspective:Number = 120;
var home:MovieClip = this;

//var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
//tooltip._alpha = 0;

var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function()
{
	var nodes = this.firstChild.childNodes;
	numOfItems = nodes.length;
	for(var i=0;i<numOfItems;i++)
	{
		var t = home.attachMovie("item","item"+i,i+1);
		t.angle = i * ((Math.PI*2)/numOfItems);
		t.onEnterFrame = mover;
		t.toolText = nodes*.attributes.tooltip;
		t.icon.inner.loadMovie(nodes*.attributes.image);
		t.r.inner.loadMovie(nodes*.attributes.image);
		t.icon.onRollOver = over;
		t.icon.onRollOut = out;
		t.icon.onRelease = released;
	}
}

function over()
{
	home.tooltip.tipText.text = this._parent.toolText;
	home.tooltip._x = this._parent._x;
	home.tooltip._y = this._parent._y - this._parent._height/2;
	home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
	//home.tooltip._alpha = 100;
}

function out()
{
	delete home.tooltip.onEnterFrame;
	//home.tooltip._alpha = 0;
}

function released()
{
	trace(this._parent.toolText);
}

function moveTip()
{
	home.tooltip._x = this._parent._x;
	home.tooltip._y = this._parent._y - this._parent._height/2;
}

xml.load("icons.xml");

function mover()
{
	this._x = Math.cos(this.angle) * radiusX + centerX;
	this._y = Math.sin(this.angle) * radiusY + centerY;
	var s = (this._y - perspective) /(centerY+radiusY-perspective);
	this._xscale = this._yscale = s*100;
	this.angle += this._parent.speed;
	this.swapDepths(Math.round(this._xscale) + 100);
}

this.onMouseMove = function()
{

	if (this._xmouse < 700 and this._xmouse > 0 ){
	speed = (this._xmouse-centerX)/2500;
	}
}

```
