Hi,
I followed a tutorial and made a menu slider…it works great only if you go in order. If you do not click on the first thumb first…it doesn’t work…then you can’t get back to it…
There must be a way to make it so you can click on any one of them instead of the first one first… once you click on the first one…then you can click on any and it will work…
Please help
here is the code…
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 += dircurrentSpeed;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);
};
b6.onRelease = function() {
menuSlide(contentHold.content6);
};
b7.onRelease = function() {
menuSlide(contentHold.content7);
};
b8.onRelease = function() {
menuSlide(contentHold.content8);
};
b9.onRelease = function() {
menuSlide(contentHold.content9);
};
b10.onRelease = function() {
menuSlide(contentHold.content10);
};