[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 648
  • Last Modified:

ActionScript code to create a carousel menu

hello I have the following AS code, the current animation is a carousel, in the center there is a globe but I need the items to orbit this globe. I have no idea how to do it, thanks.
/**
*	this example includes an extended asset in the library - which includes a 
	movieclip in the carouselItem asset named "imgLoader". you can load an swf or 
	a jpeg to it using the good old loadMovie method as shown below.
	
	This example must not be put in the main movie's onSelfEvent(load) Event because 
	It takes a few frames until the items are being generated to the stage (that's why i used
	onFrame(10).
	
	Made By:
	http://www.orizens.com
*
*/
onSelfEvent(load){
	// in order to prevent a flickering effect when the images is being loaded only in 
	// the 5th frame - it is good only if it is tested localy so you might want the use
	// a static preloader for the carouselItem like i used
	carousel._visible = false;
}
onFrame(5){
	var imagesArray:Array = new Array("iconos.png","iconos2.png","iconos3.png","iconos4.png","iconos5.png","iconos6.png","iconos7.png","iconos8.png");
	var IMAGES_DIR:String = "images/";
	for (i=0; i < imagesArray.length; i++){
		myItem = eval("carousel.cItem" + i);
		myItem.imgLoader.loadMovie(IMAGES_DIR + imagesArray[i]);
		// Overiding the button's click event of onPress
		// Alternativley - you can assign a function on the parameters panel
		myItem.onPress = function(){
			trace("you clicked " + this._name);
		}
		//resizing the loaded images - not required...
		myItem.imgLoader._xscale = 100
		myItem.imgLoader._yscale = 100;
		trace(myItem._name);
	}
	carousel._visible = true;
	stop();
}

Open in new window

screen.jpg
0
ametrade
Asked:
ametrade
1 Solution
 
Eaddy BarnesITCommented:
try
going to this link and checking out the Creating 3D Carousels lesson.
http://www.gotoandlearn.com/

GE
0
 
ametradeAuthor Commented:
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now