Can someone please help me with this menu problem, how it’s suppose to function is you click a menu item, the other menu items fade out and the menu item you choose moves up to the top of the page, once at the top of the it acts as a button to redraw the menu when when clicked, I take it I’m not setting something somewhere, I can’t trace a number in my loop.
//-----------
import mx.transitions.Tween;
import mx.transitions.easing.*;
stop();
//menu instance array
var btnArray:Array = new Array(b0, b1, b2);
var step = btnArray;
//linkArray hold your btn links.
var linkArray:Array = new Array(“room”, “room”, “room”);
var numBtn:Number = btnArray.length;
var selectBtn:MovieClip;
function selectItem():Void {
for (var i = 0; i<btnArray.length; i++) {
var myBtn:MovieClip = btnArray*;
myBtn.link = linkArray*;
myBtn.selected = false;
myBtn.onRollOver = function() {
this.ani_mc.onEnterFrame = function() {
this._currentframe == this._totalframes ? delete this.onEnterFrame : this.nextFrame();
};
};
myBtn.onRollOut = myBtn.onDragOut=function () {
if (selectBtn != this) {
this.ani_mc.onEnterFrame = function() {
this._currentframe == 1 ? delete this.onEnterFrame : this.prevFrame();
};
}
};
myBtn.onRelease = function() {
if (selectBtn != this) {
selectBtn.ani_mc.onEnterFrame = function() {
this._currentframe == 1 ? delete this.onEnterFrame : this.prevFrame();
};
}
selectBtn = this;
this.ani_mc.gotoAndStop(this.ani_mc._totalframes);
//loadMovie(this.link);
var btn_alpha:Tween = new Tween(step[1], “_alpha”, Strong.easeOut, 100, -20, .8, true);
var btn_alpha:Tween = new Tween(step[2], “_alpha”, Strong.easeOut, 100, 0, .8, true);
trace(step);
//step[1].enabled = false;
//step[2].enabled[2] = false;
btn_alpha.onMotionFinished = function() {
var btn_alpha:Tween = new Tween(selectBtn, “_y”, Elastic.easeInOut, selectBtn._y, 20, 1, true);
};
selectBtn.onRelease = function() {
selectBtn = null;
selectBtn.enabled = true;
step[0]._alpha = 100;
step[1]._alpha = 100;
step[2]._alpha = 100;
var btn_alpha:Tween = new Tween(step[0], “_y”, Elastic.easeInOut, 20, 65, .8, true);
var btn_alpha:Tween = new Tween(step[1], “_y”, Elastic.easeInOut, 20, 90, 1, true);
var btn_alpha:Tween = new Tween(step[2], “_y”, Elastic.easeInOut, 20, 115, 1.2, true);
};
};
}
}
selectItem();