Hello,
I have this script for menu, but I want only the "box5" to work with submenu.
Any solution for that please?
Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
_global.slidingMenu = this;
big_height = 38;
small_height = 29;
time_for_animation = 12;
// Initialization
box1.id = 1;
box2.id = 2;
box3.id = 3;
box4.id = 4;
box5.id = 5;
box6.id = 6;
box7.id = 7;
for (var i:Number = 1; i<=7; i++) {
	this["box"+i].area.onRelease = function() {
		slidingMenu.moveBoxes(this._parent.id);
	};
	
	this["box"+i].area.onRollOver = function() {
		slidingMenu.RollOverBoxes(this._parent.id);
	};
	
	this["box"+i].area.onRollOut = this["box"+i].area.onReleaseOutside = function() {
		slidingMenu.RollOutBoxes(this._parent.id);
	};
}
slidingMenu.RollOverBoxes = function(boxNumber:Number) {
	if(_root.link<>boxNumber) {
		var cBox:MovieClip = eval('box'+boxNumber);
		cBox.title_main.gotoAndPlay("s1");
	}
};


slidingMenu.RollOutBoxes = function(boxNumber:Number) {
	if(_root.link<>boxNumber) {
		var cBox:MovieClip = eval('box'+boxNumber);
		cBox.title_main.gotoAndPlay("s2");
	}
};

// Functions
slidingMenu.moveBoxes = function(boxNumber:Number) {
	if(_root.link<>boxNumber and _root.animation==1) {
	k = 1;
	//-1239.0
	
	eval('box'+_root.link).title_main.gotoAndPlay("s2");
	eval('box'+_root.link).sub_menu._visible=0;
	for (var i:Number = 1; i<=10; i++) {
		var cBox:MovieClip = eval('box'+i);
		if (i == boxNumber) {
			_root.link_prev=_root.link;
			_root.link = boxNumber;
			eval('box'+_root.link).sub_menu._visible=1;
		}
		if (i <= boxNumber) {
			new Tween(cBox, "_y", Strong.easeOut, cBox._y,(k)*(small_height) - small_height, time_for_animation+k*2, false);
		} else {
			new Tween(cBox, "_y", Strong.easeOut, cBox._y, (k)*(small_height)+big_height  - small_height, time_for_animation+k*4, false);
			
		}
		k++;
	}
	_root.play();
	}
		//
	//new Tween(_root.pages2, "_y", Strong.easeOut, _root.pages2._y,-329.0 + _root.link*470, time_for_animation+100, false);
	

};


slidingMenu.moveBoxes_start = function(boxNumber:Number) {
	if(_root.link<>boxNumber) {
	k = 1;
	//-1239.0
	
	eval('box'+_root.link).title_main.gotoAndPlay("s2");
	eval('box'+_root.link).sub_menu._visible=0;
	for (var i:Number = 1; i<=7; i++) {
		var cBox:MovieClip = eval('box'+i);
		if (i == boxNumber) {
			_root.link_prev=_root.link;
			_root.link = boxNumber;
			eval('box'+_root.link).sub_menu._visible=1;
		}
		if (i <= boxNumber) {
			new Tween(cBox, "_y", Strong.easeOut, cBox._y,(k)*(small_height) - small_height, time_for_animation+k*7, false);
		} else {
			new Tween(cBox, "_y", Strong.easeOut, cBox._y, (k)*(small_height)+big_height  - small_height, time_for_animation+k*14, false);
			
		}
		k++;
	}
	}
		//
	//new Tween(_root.pages2, "_y", Strong.easeOut, _root.pages2._y,-329.0 + _root.link*470, time_for_animation+100, false);
	_root.play();

};

//slidingMenu.moveBoxes();