Hi, I'm trying to create a carousel effect for my photography website. I've found a free template that I could use but it uses AS2 (I'm more familiar with AS3 so that I could change or add to the code). Can anyone help me to convert the code to AS3? Here's the code: stop(); // total is length of label_list OR link_list // OR total frames inside "flashmo thumbnails" var total:Number = 9; // length of label_list array and length of link_list array must be equal // to length of frames inside "flashmo thumbnails" movieclip var label_list:Array = new Array( " Poland 1998 ", "Romania 1999", "Slovakia 1999", "Slovakia 2000", "Germany 2001", "London 2002", "Croatia 2003", "Italy 2003", "Ukraine 2004"); var link_list:Array = new Array("http://www.flashmo.com/preview/flashmo_041_horizontal_scroller", "http://www.flashmo.com/preview/flashmo_042_vertical_scroller", "http://www.flashmo.com/preview/flashmo_043_intro", "http://www.flashmo.com/preview/flashmo_044_intro", "http://www.flashmo.com/preview/flashmo_045_elastic", "http://www.flashmo.com/preview/flashmo_046_thumbnail_xml", "http://www.flashmo.com/preview/flashmo_047_present", "http://www.flashmo.com/preview/flashmo_048_vertical_menu_xml", "http://www.flashmo.com/preview/flashmo_048_vertical_menu_xml"); var radiusX:Number = 330; var radiusY:Number = 90; var centerX:Number = 450; var centerY:Number = 250; var speed:Number = 0.005; tn_group_mc._visible = false; info.text = ""; fm_label.text = ""; for( var i = 0; i < total; i++) { var t = tn_group_mc.duplicateMovieClip("tn"+i, i); t.tn_mc.gotoAndStop(i+1); t.tn_shadow_mc.gotoAndStop(i+1); t.fm_label = label_list; t.fm_url = link_list; t.angle = i * ((Math.PI*2)/total); t.onEnterFrame = mover; t.fm_button.onRollOver = function() { fm_label.text = "" + this._parent.fm_label; info.text = "URL: " + this._parent.fm_url; } t.fm_button.onRollOut = function() { info.text = ""; fm_label.text = ""; } t.fm_button.onRelease = function() { getURL( this._parent.fm_url ); } } function mover() { this._x = Math.cos(this.angle) * radiusX + centerX; this._y = Math.sin(this.angle) * radiusY + centerY; var s = 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) * 0.0001; }
... View more