Search  

3D ROTATING CLICKABLE MENU (CAROUSEL)

HomeBrowse CategoriesFlashMenus & ButtonsHorizontal Menus3D Rotating Clickable Menu (carousel)

This 3D menu is based on the popular x-mouse driven carousel style animation. Unlike most versions however, this one makes each menu item clickable so that the selected item rotates to the front and “locks” in place. The animation effect, number of menu items and the menu items themselves can be easily customised. NEW !!! See below for details on a way to have the carousel revolve around another clip!

The only thing that makes this file Flash 8 is the use of the ColorMatrixFilter. That code effect can easily be replaced for backward compatibility to Flash 7 or 6 if required.

How do I make each item “clickable” so that I can also launch, for example, a different browser window each time an item is clicked?

Basically all you need to do is add an array with links for each item and then add a getURL in the released() function.

1. At about line 30 add a line something like this :

var arrLinks:Array = new Array("http://www.website1.com", "http://www.website2.com", "http://www.website3.com", "http://www.website4.com", "http://www.website5.com", "http://www.website6.com", "http://www.website7.com", "http://www.website8.com");

2. Just after that add :

var bolFirstRun:Boolean=true;

Add this so you can test whether this is the first time the flash is run to prevent the link from executing straight away when the last line is run menu.item0.onRelease();

3. At around line 113 just after :

mc.dest = Math.PI/2;

add this

if(bolFirstRun){

bolFirstRun=false;

} else {

getURL(arrLinks[selectedID], "_blank");

}

You should now have clickable rotating items where you could of course change the getURL for your own custom function.

How can I have a clip that these objects rotate around?

1. Create a clip that you want the items to rotate about in the library and give it a linkageID of “centre_mc”

2. After this loop near the top of the code :

for(var i=0;i<numOfItems;i++)
{
...
}

add this :

menu.attachMovie("centre_mc","centre_mc", 150, {_x: 120, _y: 0});

You’ll need to muck around with the _x: 120, _y: 0 positioning to suit your clip but hopefully it should look as though the items circle around the “centre_mc” clip….

How to add a Blur effect as items get further away

Because there is a variable called “s” that is constantly updated in the animate() function that is used to determine a scale factor, you can use this same value to apply a blur.

First thing, you need to add the following somewhere near the top of your file :

import flash.filters.BlurFilter;

This makes the Blur Filter available to actionscript.

Then you’ll need to create a new BlurFilter instance (probably best to do so after the ColorMatrixFilter variables are created. So add this :

var blurFilter:BlurFilter = new BlurFilter(0, 0, 1);

Then in the initial for loop alter the filter assignment to this :

mc.filters = [colorMatrixGrey_filter, blurFilter];//modified this to now have TWO filters

Then in the animate() function add this line :

var mc:MovieClip = menu["item"+i];//exisitng line
var filterArray:Array = mc.filters;//ADDEDthis line

Still in the animate() function change the two occurences of :

mc.filters = colorMatrix_filter;
AND
mc.filters = colorMatrixGrey_filter;

to :

filterArray[0] = colorMatrix_filter;
mc.filters = filterArray;

and

filterArray[0] = colorMatrixGrey_filter;
mc.filters = filterArray;

respectively.

This essentially COPIES the current filter array on each clip and modifies JUST the ColorMatrix Filer (the first in the array);

And finally in the animate() function just after where var s is defined add this :

blurFactor = 20 - (s * 20);
var filterArray:Array = this.filters;
filterArray[1] = new BlurFilter(blurFactor, blurFactor, 1);
this.filters = filterArray;

This only modifies the 2nd filter (the blur filter) and ensures the Color filters are untouched.

Obviously you can muck around with the blurFactor value where I have 20 and use a more suitable value to increase/decrease the overall blur effect

Any problems feel free to contact me.

Good luck!

Posted over 2 years ago

This is great. Awesome.

I have added the “clickable” items too.

The only customization that I am looking for on this is to be able to launch the planet that is in front.

With the “clickable” items that is provided and the planet sample above, if you click on PLanet 2, it will launch that website. Whereas it would be good if you clicked on it and it woudl come to the front, then if you wanted to launch it you would click on it or the text below.

Otherwise you will have to click on 4 websites to get to Planet 4

Posted about 1 year ago

meerkatlookout,

Is it possible to make an easy edit to the code to make the background images blured so they look likey they have depth?

Thanks,

John

Posted about 1 year ago

Great Menu

Just one question, is there a way to make the items accessable from an XML file? Not having the Links hard coded in the flash? If so, could you give me an example?

Thanks Again, Frank

Posted about 1 year ago

John, Sorry for the delay in getting back to your question. I’ve added some documentation above that illustrates one way of achieivng a blur effect (I’ve also emailed you an updated source as an example) – hopefully that works for you.

Frank, I assume you would prefer to load an XML file that then points to external swfs/graphics to load rather than have them embedded in the Library? If so, it certainly is possible to do things this way. As a rough example you’d need to load an XML file using the standard XML .load method and you can then move the main FOR loop in the FLA that reads :

for(var i=0;i<numOfItems;i++)
{
  ....
}

to within the onLoad handler of your XML . I would also suggest creating ONE “item” clip in the Library and set it’s LinkageID to “item”. This clip would consist of nothing but a nested dummy movieclip instance with a name of “holder_mc” AND (if you still want) a dynamic textbox called “txt_label”;). This way you can attach this holder clip (attachMovie)and load (loadMovie) an external asset into it’s nested dummy clip (rather than the entire clip itself) so that you can also attach other data and onRelease functions and insert text into the dynamic textbox without having to wait for the external asset to have loaded.

For example :

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 clip:MovieClip = menu.attachMovie("item", "item" + i, menu.getNextHighestDepth());
      clip.holder_mc.loadMovie(nodes[i].attributes.image);
      clip.txt_label.text=nodes[i].firstChild.nodeValue;
      clip.angle = i * sectorDistance;
      clip.id = i;
      clip.filters = [colorMatrixGrey_filter, blurFilter];
      clip.onRelease = released;
   }
}

xml.load("myxml.xml");

and using an XML file similar in structure to this :

   <xml>
      <item image="img/item1.png">Item 1</item>
      <item image="img/item2.png">Item 2</item>
   </xml>

It’s rough but hopefully gives you the idea? Cheers

Posted about 1 year ago

Hi,

I’m a little stumped here. I would like to ease the planet animation, i.e. when the user clicks on a planet – it accelerates then slows down to a stop. I am really confused – I don’t really know where to begin. I’m quite new to writing easing functions – not sure which statement to alter…

I would appreciate any help or suggestions,

Cheers

Posted about 1 year ago

meerk, for centering a movie clip in the center of the carousel, are the objects in the back of the carousel supposed to go behind the center movie clip, so it looks like the carousel is spinning around the center_mc?

Or, was your intention for the carousel to revolve around the center movie clip without any overlap?

As it is now, when I put a movie clip in the center, it looks like the carousel is in front of the movie clip.

Does that make sense? Here’s an example: http://dev.sheridan.edu/home_page_int/Swfs/Home_Page_Splash2.swf

Posted about 1 year ago

Is there any way to “skew” or angle this carousel? it would really be helpful if one could tilt it at let’s say a 45 degree angle or something. I purchased the file, but couldn’t find anything in the AS to suggest that.

Thanks Aztecman

Posted about 1 year ago

Hi,

This is an excellent script and very similar to a script I have been trying to implement in AS3 for sometime, but as I’m new to AS3 the solution has been illuding me. Do you have a version of this script in AS3 for sale?

Posted about 1 year ago

I’m trying to build a script that allows two arrow buttons to control the carousel one step depending on which direction arrow is clicked. Anyone have any ideas how to make this happen?

Posted about 1 year ago

Hi.

I really like your tool. Is there anyway I can make it run vertical and not horizontal??

Posted about 1 year ago

Hi, does anyone know how to modify the ease? Thanks in advance!

Posted about 1 year ago

Great file! AS documented very well making it so easy to understand, modify and customize even for a Flash / Actionscript novice like myself.

Nice work, man.

Posted 11 months ago

I would also love to know how to make it ease more fluidly… anyone?

Posted 10 months ago

thanks alot for your help… this is a great file to work with.

Posted 10 months ago

can you help i have purchased the carousel and it is fantastic! i have now added back the xml functionality to call in the icons but i now want to be able to load an external swf so when i have clicked on the icon that i want it comes to the front and i can then click it again to load in the swf i want, is this possible and where or what do i need to add.

Posted 9 months ago

Hi,

Would I be able to take part of your code and replace it with a moce function already in one of m y sites?

This here is the function

function mover() { if(_ymouse > 250 && _ymouse < 365) { var xdist = _xmouse – Stage.width/2; this._x -= xdist / 25; } else { if(_xmouse > centerX) { this._x -= speed; } else { this._x += speed; } } }

if (this._x>= -600)
{
    this._x = -1500;
}
if (this._x<= -1501)
{
    this._x = -601;
}
//trace("my POsition = "+home.menuHolder._x);

Thanks

Posted 9 months ago

hi there i have hit a new problem i have built a presentation in AS2 and want to add a paper vision gallery in to it but it uses AS3 so i have changed the rest but cannot figure out what needs changing on the carousel can you please help.

Posted 8 months ago

Does anyone know how to add a description textbox that fades in when an item is in focus and fades out when not?

Thanks

Posted 8 months ago

Hello! Great File! Im very Happy with it Just Exactly what i need it

I just got a Question ? Can You Help me to put Arrows in like << >> and on release move the planets to one side or another?

Posted 7 months ago

i cant understand how i can add link to each planet please can you explane me with more details where i will write and how this files with the links i want pls asap

Posted 7 months ago

How do we EASE this thing?!

Posted 6 months ago

i like this file and i d like to buy it. Can i change the background, image size overall swf size and speed?

thank you

Posted 4 months ago

i like this file and i d like to buy it. Can i change the background, image size overall swf size and speed?

thank you

Posted 4 months ago

Is there anyway we can use easing on this? I’d like it to start slow, then speed up and then slow down again to stop when it reaches the final point.

Thank you!

Posted 3 months ago

Excellent file. Thank you.

Posted 3 months ago

how can i add arrows to control the rotation + also include some easing!?

Posted 3 months ago