I found and modified this code, to work with my menu list… the tsunami effect kinda works, but the range in which the link items are enlarged is too small… is there any part of the code I can modify to make the rolling less dramatic and effect more of the links??
var colnum:String = "1";
var numberofItems:Number = 8;
var filledSpace:Number = 0;
var gapspace:Number = 0;
var alpha:Number = 100;
//Hit Test with Bounding Box Check...
hitSuccess = function (){
if(this._parent["boundbox"+[colnum]].hitTest(_root._xmouse,_root._ymouse)){
for(i=startnum ; i <= endnum ; i++) {
myDif = yPos* - (this._parent._ymouse - 25);
// percentage increase
scaleAmount = Math.max (150-((myDif*myDif)/16), 100) ;
alphaAmount = Math.max (100-((myDif*myDif)/6), 50) ;
if (alphaAmount < alpha) {
alphaAmount = alpha;
}
if (scaleAmount < 100) {
scaleAmount = 100;
}
this["text" + i]._xscale = scaleAmount;
this["text" + i]._yscale = scaleAmount;
this["text" + i]._alpha = alphaAmount;
}
// *** add up total Y pixels taken by text ***
for (m=startnum ; m <= endnum-1 ; m++) {
filledSpace = filledspace + this["text" + m]._height;
}
// *** find total Y pixels not taken by text
totalheight = this["text" + endnum]._y - this["text" + startnum]._y;
gapSpace = totalheight - filledspace;
avgDistance = gapSpace / numberofitems;
m = startnum + 1;
for (m ; m <= endnum-1 ; m++) {
this["text" + m]._y =(this["text" + (m - 1)]._y + this["text" + (m - 1)]._height) + avgdistance
}
} else {
// *** shrink text back when mouse rolls out
i = startnum;
for (i ;i <= endnum ; i++) {
if (Math.round(this["text" + i]._yscale) >= 100) {
// return scale back to original state
this["text" + i]._yscale = Math.round ( this["text" + i]._xscale ) - 2;
this["text" + i]._xscale = Math.round ( this["text" + i]._yscale ) - 2;
}
if ( this["text" + i]._y < yPos*) {
// return y position back to original state
this["text" + i]._y = Math.round ( this["text" + i]._y ) + 2;
}
if ( this["text" + i]._y > yPos*) {
this["text" + i]._y = Math.round ( this["text" + i]._y ) - 2;
}
if ( this["text" + i]._alpha > alpha) {
this["text" + i]._alpha = Math.round ( this["text" + i]._alpha ) - 2;
}
}
}
}
hitSuccess();