I’m stuck with why this carousel menu will not move - its done in the same way the carousel is made on gotoAndLearn.com - i’ve followed this tutorial through twice now.
Can someone take a look and tell me what I’m doing wrong?
I’m using Flash MX if that makes any difference and I’ve attached the .fla file
The code i’m using as as below (-:
var numOfItems:Number = 1;
var radiusX:Number = 250;
var radiusY:Number = 75;
var centerX:Number = Stage.width/2;
var centerX:Number = Stage.height/2;
var speed:Number = 0.05;
for(var i=0;i<numOfItems;i++)
{
var t = this.attatchMovie("item","item"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
}
function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s:Number = this._y/ (centerY+radiusY);
this._xscale = this._yscale = s * 100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale) + 100);
}
this.onMouseMove = function()
{
speed = (this._xmouse-centerX) /1500;
}
Thanks for your help!