# \[AS2\] Adding to the dynamic 3d carousel // GotoAndPlay.com

**URL:** https://forum.kirupa.com/t/as2-adding-to-the-dynamic-3d-carousel-gotoandplay-com/243547
**Category:** flash
**Created:** [November 8, 2007, 5:45am UTC](https://forum.kirupa.com/t/as2-adding-to-the-dynamic-3d-carousel-gotoandplay-com/243547 "2007-11-08T05:45:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![soulty](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/soulty/32/105_2.png) [@soulty](https://forum.kirupa.com/u/soulty)
#### Post date: [November 8, 2007, 5:45am UTC](https://forum.kirupa.com/t/as2-adding-to-the-dynamic-3d-carousel-gotoandplay-com/243547/1 "2007-11-08T05:45:18Z")

</div>

Hey all, i just ran through the ‘3d carousel’ tutorial at [gotoAndPlay.com](http://gotoAndPlay.com), all was good but I got a little stumped in a few things i would like to do/add.

**here are a few things i would like to add to this code below:**

- Different colour panel containers, so somehow i would need to edit the attachMovie with a tint on the mc or maybe load in a another mc?
- Each mc to be clickable.
- A unique link for each items
- The rotating animation to only occur when the mouse is in actual flash movie, so once out of the active area the rotation from the mouse x position to stop.

Also i was aware that GotoAndPlay tutorials have a xml version of the tutorial that can import links/images/ descriptions but for this particular task i cannot have any external files, so it’s all got to be within this one file.

any help will be appreciated. 🙂

here is the code:

```auto
var numOfItems:Number = 3;
var radiusX:Number = 80;
var radiusY:Number = 40;
var centerX:Number = Stage.width/2;
var centerY:Number = Stage.height/2;
var speed:Number = 0.05;

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.onRelease = released;
}

released = function()
{
    trace("im hit!!");
    /////////////would like to generate a link for each panel //eg. this.getURL("something.html","_blank");
}

this.onMouseMove = function()
{
    speed = (this._xmouse - centerX)/2000;
}

```
