Click to See Complete Forum and Search --> : Action Script -- Need Help


ccavalli92
10-18-2007, 06:32 PM
Hey, I've just leaned how to do a carousel menu, and unfortunatley what I've leaned only allows me to use one image, repeating, and I would like the picture, when clicked to bring you to a diffrent page.
Here is the code:

var numOfItems:Number = 10;
var radiusX:Number = 250;
var radiusY:Number = 75;
var centerX:Number = Stage.width/2;
var centerY:Number = Stage.height/2;
var speed:Number = 0.005;


for(var i=0;i<numOfItems;i++)
{
var t = this.attachMovie("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;
}

Any help would be much aprecitated.
Thank You,

redbeef88
10-18-2007, 06:46 PM
so... what exactly do you need help with? would you like to use different images for the carousel?