_xmouse trouble with carousel

I’m having touble with a carousel type menu. It seems that flash gets the _xmouse position on loading of a page and this causes my carousel to spin way too fast. After you have rolled over the area once the carousel acts like it should.

Here are the two functions that more or less do the goods.


function mover() {
 this._x = Math.cos(this.angle)*radiusX+centerX;
 this._y = (Math.sin(this.angle+2*speed*Math.PI)*radiusY+centerY);
 var s = ((this._y)/(centerY+radiusY))+0.01*(1/((this._y+20)/radiusY));
 this._xscale = this._yscale=s*100;
 this.filters = [new flash.filters.BlurFilter((100-(s*100))/40, (100-(s*100))/40, 10)];
 this.angle += this._parent.speed;
 this.swapDepths(Math.round(this._y));
 home.midden.swapDepths(Math.round(home.midden._y));
 speed = (_root.orient._x-centerX)/18000;
}
orient.onEnterFrame = orienter;
function orienter() {
 if (_root.orient._x<_root._xmouse) {
  _root.orient._x = _root.orient._x+((_root._xmouse-_root.orient._x)/10);
 } else {
  _root.orient._x = _root.orient._x-((_root.orient._x-_root._xmouse)/10);
 }
}

Any help would be appreciated.

I thinks more like your mouse is near or off screen

it is an issue, that hasn’t been coded into that example.

you would need to detect the edge of the screen and say anything beyond or near is this speed.

else introduce a tweener element which takes the two different positions of the mouse and tweens the difference smoothly, so you could go off screen then back on the other side and it would slow down before spinning in the opposite direction

if you work it out post the code lol

change the speed to a lower number!

something like var speed:Number = 0.05

did it work?