# New Flash user, question on customizing a tutorial

**URL:** https://forum.kirupa.com/t/new-flash-user-question-on-customizing-a-tutorial/216122
**Category:** flash
**Created:** [February 13, 2007, 10:19pm UTC](https://forum.kirupa.com/t/new-flash-user-question-on-customizing-a-tutorial/216122 "2007-02-13T22:19:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Syous](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@Syous](https://forum.kirupa.com/u/Syous)
#### Post date: [February 13, 2007, 10:19pm UTC](https://forum.kirupa.com/t/new-flash-user-question-on-customizing-a-tutorial/216122/1 "2007-02-13T22:19:25Z")

</div>

Hello all,

I’m pretty new flash and was scrolling through the flash tutorials and I started working on the sliding menu tutorial. [http://www.kirupa.com/developer/flash8/slidingMenu.htm](http://www.kirupa.com/developer/flash8/slidingMenu.htm)

However, I decided it would be fun to modify it a little. Instead of being 250 x 200, I made the stage 900 x 600. On the bottom the menu is 900 x 40. The actual pages themselves are 900 x 560. I also added in one more panel to increase the number from 5 to 6.

Everything is going fine in the tutorial, I follow it a T except for my changes. However, when I went to test it…only buttons 2 and 3 would work. Here is the code, perhaps you can offer a little help to a newb :thumb:

```auto

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 = 1;
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;

}

};

}

};
news.onRelease = function() {

menuSlide(contentHold.content1);

};
forums.onRelease = function() {

menuSlide(contentHold.content2);

};
images.onRelease = function() {

menuSlide(contentHold.content3);

};
charter.onRelease = function() {

menuSlide(contentHold.content4);

};
roster.onRelease = function() {

menuSlide(contentHold.content5);

};
DKP.onRelease = function() {

menuSlide(contentHold.content6);

};

```

Perhaps when I resized everything, I threw something off? Really not sure and will still try and debug it myself.
