Flash: Loading course pages from an array
February 17, 2009 12:00 AM
The code is fairly short, so here it is. I'm guessing it's this: t.fm_url = link_list;
Code:
// Code Credit: Lee Brimelow// Tutorial Reference URL: www.gotoandlearn.com// Modified by www.flashmo.comstop();// total is length of label_list OR link_list // OR total frames inside "flashmo thumbnails"var total:Number = 12;// length of label_list array and length of link_list array must be equal // to length of frames inside "flashmo thumbnails" movieclipvar label_list:Array = new Array( "image1", "image2", "image3", "image4", "image5", "image6", "image7"); var link_list:Array = new Array("page1.html", "page2.hmtl", "page3.html", "page4.html", "page5.html", "page6.html", page7.html"); var radiusX:Number = 280;var radiusY:Number = 90;var centerX:Number = 370;var centerY:Number = 140;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 = "Title: " + 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 ("javascript:trivExitPage(this._parent.fm_url,true)"); }}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(thi s._xscale) + 100);}this.onMouseMove = function(){ speed = (this._xmouse-centerX) * 0.0001;}
Discussions have been disabled for this post