Menu by

here is a link to the thread i need help on

in that thread POM created a menu that is really tight…there’s only one problem. i dont know how to link to my external swfs…i posted in that thread and asked but no one is getting back to me…

if someone can please add the piece of code in where it needs to be to link to an .swf i would be more than greatful…

here is the code…(all they told me was it’s in the but_pressed part)but i dont know how to make it work…


// Sets the cell that’s on the scene invisible
p._visible = false;

// Button labels
texts = [“News”, “Bio”, “Video”, “Gallery”, “Tour Dates”, “Contact”] ;
// Indicates which button # has been pressed
but_pressed = 0;

function createMenu (label_arr) {
var size = label_arr.length;
// Initialize variables:
// topscale: scale of a button when it’s rolled over (you can change that value)
// lowscale: scale of a button when another button is rolled over
cellsize = p._width ;
topscale = cellsize + 100;
lowscale = (size*cellsize-topscale)/(size-1);

var i = 1;
// Menu creation
while (i <= size) {
	var _mc = p.duplicateMovieClip("p_" + i , 100+Number(i*size));
	_mc.textValue = label_arr[i-1] ;
	_mc.i = i;
	_mc.xscale = cellsize ;
	_mc.onRollOver = _mc.onDragOver = function () {
		but_pressed = this.i ;
		this.gotoAndPlay("start") ;
	} ;
	_mc.onRollOut = _mc.onDragOut = function () {
		but_pressed = 0 ;
		this.gotoAndPlay("back") ;
	} ;
	_mc.onEnterFrame = function () {
		// Rescale the button
		var newxscale ;
		// Compute the new scale of the button
		if (but_pressed != 0) {
			if (but_pressed == this.i) {
				newxscale = topscale;
			} else {
				newxscale = lowscale;
			}
		} else {
			newxscale = cellsize;
		}
		// Classic easing equation
		var xstep = (newxscale-this.xscale)/2;
		if (this.xscale != newxscale) {
			this.xscale += xstep;
		} else {
			xstep = 0 ;
		}
		this._xscale = this.xscale;
	}
	i ++ ;
} ;
// Set the position of the menu cells
this.onEnterFrame = function () {
	// Position of the first cell of the menu
	var ypos = 0;
	var xpos = 0;
	var i = 1;
	while (i <= size) {
		var mc = this["p_" + i] ;
		mc._x = xpos;
		mc._y = ypos;
		xpos = xpos + mc._width ;
		i ++ ;
	} ;
} ;

} ;

createMenu(texts);