# Problem with Sliding Menu Tutorial?

**URL:** <https://forum.kirupa.com/t/problem-with-sliding-menu-tutorial/210850>\
**Category:** Uncategorized\
**Created:** [December 22, 2006, 8:17pm UTC](https://forum.kirupa.com/t/problem-with-sliding-menu-tutorial/210850 "2006-12-22T20:17:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![juice22](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@juice22](https://forum.kirupa.com/u/juice22)\
**Post date:** [December 22, 2006, 8:17pm UTC](https://forum.kirupa.com/t/problem-with-sliding-menu-tutorial/210850/1 "2006-12-22T20:17:55Z")

</div>

im using the sliding menu from the kirupa tutorials and the sliding works

what doesnt work is that i have buttons in some of the colored squares (acts as a subnav)thats supposed to change information within the square (4 in total that slide with seperate information on each)

heres the AS on my first frame:  
var currentPosition:Number = contentHold.content1.\_x;  
var startFlag:Boolean = false;  
menuSlide = function (input:MovieClip) {  
if (startFlag == false) {

startFlag = true;

var finalDestination:Number = input.\_x;  
var distanceMoved:Number = 0;  
var distanceToMove:Number = Math.abs(finalDestination-currentPosition);  
var finalSpeed:Number = .3;  
var currentSpeed:Number = 0;  
var dir:Number = 1;

if (currentPosition\<=finalDestination) {  
dir = -1;  
} else if (currentPosition\>finalDestination) {  
dir = 1;  
}

this.onEnterFrame = function() {  
currentSpeed = Math.round((distanceToMove-distanceMoved+1)_finalSpeed);  
distanceMoved += currentSpeed;  
contentHold.\_x += dir_currentSpeed;  
if (Math.abs(distanceMoved-distanceToMove)\<=1) {  
contentHold.\_x = maskMovie.\_x-currentPosition+dir\*distanceToMove;  
currentPosition = input.\_x;  
startFlag = false;  
delete this.onEnterFrame;  
}  
};  
}  
};  
b1.onRelease = function() {  
menuSlide(contentHold.content1);  
};  
b2.onRelease = function() {  
menuSlide(contentHold.content2);  
};  
b3.onRelease = function() {  
menuSlide(contentHold.content3);  
};  
b4.onRelease = function() {  
menuSlide(contentHold.content4);  
};  
b5.onRelease = function() {  
menuSlide(contentHold.content5);  
};  
this.contentHold.content2.professors\_btn.onRelease = function(){  
gotoAndStop (“professors”);  
}  
this.contentHold.content2.academy\_btn.onRelease = function(){  
gotoAndStop (“academy”);  
}  
this.contentHold.content2.curriculum\_btn.onRelease = function(){  
gotoAndStop (“curriculum”);  
}  
this.contentHold.content2.press\_btn.onRelease = function(){  
gotoAndStop (“press”);  
}  
stop();

is the sliding interfering with the buttons?

does anyone know what’s wrong?
