Thursday, December 16, 2010

3D Carousel


  •   Actionscript version: 3
  •   Class created by Charlie Charlie [charlie_chao@msn.com]
  •   Based on Lee Brimelow's three part tutorials on creating a 3d carousel at http://www.gotoandlearn.com/
  •   Current version: 1.0 [August 2007]
  •   Special thanks to people at FlashKit for helping me out with this project
Download here:
version 1.0
http://www.mediafire.com/file/p5q45mplq0h6fuc/carousel_v1_flash_on_demand.zip
version 1.3
http://www.mediafire.com/file/17cx8mbkj4hg1y4/carousel_v1.3_flash_on_demand.zip


INTRODUCTION:

This class allow you to create your own
 3d carousel, which can be used for site navigation and
 various other stuffs. This class is written by me based
 on Lee's tutorials so people can use this in Actionscript
 3 as the original one was written in Actionscript 2.

 I suggest you use the carousel_demo.fla included with this package to get started.

 Make sure the com folder should be on the same folder as your flash project.
 The xml file should also be in the same folder as the .swf file.

 Few things that you should be aware of:
 If you're using a MovieClip as an item to your carousel,
 you MUST add a linkage name to it. To include the item in your XML, type in the name
 of the MovieClip in the image attribute with the extention of '.mc'.

 Unless you make sure that there is no tooltip for each of the items, you must assign a
 tooltip movieclip with the addTooltip function.

 To create a new carousel, use the following scripts:

    import com.ccanvas.carousel.*; //import class if you haven't done so

    var carousel:Carousel = new Carousel(0, 0, 186, 75, "icons.xml"); //Carousel(x:int, y:int, radiusX:int, radiusY:int, xml:String)
    carousel.addTooltip(new tooltip); //uses movieclip "tooltip" as the tooltip object (optional IF the items in the carousel does NOT use tooltip)
    addChild(carousel); //add the carousel to the screen

EDITING THE XML:

 The carousel use XML format to create the items. To create a new one, simply make a
 new text file and save as 'name.xml'. Remember to switch to 'All Files'.

 XML layout:

 <icons>
 <icon image="image_file_name.format" tooltip="tooltip text" function="on press function" />
 </icons>

 The image attribute can be any image format Flash supports (include .swf). Also, if
 you want to load a MovieClip from your library, just type the name of the MovieClip
 with the '.mc' extension. The MovieClip must have a class name.

 The tooltip attribute can be left blank to disable tooltip appearance for that item.

 The function attribute must be a function on the root frame. It does not have to have
 () to work.


CONCLUSION:

 You can feel free to edit this class for integrating into your
 project. If you found errors or bugs, please contact me so I may
 make the changes.

 Enjoy!
(source: http://gotoandlearn.com)

No comments:

Post a Comment