i trying to use the menuslide tutorial because it looks like it is the closes thing to the effect that i am after to move the object on all points rather than the x or the y but both so that you could have say two row and six content.
var currentPosition:Number = contentHold.content1._x;
var currentPosition1:Number = contentHold.content1._y;
var startFlag:Boolean = false;
menuSlide = function (input:MovieClip) {
if (startFlag == false) {
startFlag = true;
var finalDestination:Number = input._x;
var finalDestination1:Number = input._y;
var distanceMoved:Number = 0;
var distanceToMove:Number = Math.abs(finalDestination-currentPosition)+(finalDestination1-currentPosition1);
var finalSpeed:Number = .3;
var currentSpeed:Number = 0;
var dir:Number = 1;
if ((currentPosition<=finalDestination)+(currentPosition1<=finalDestination1)) {
dir = -1;
} else if ((currentPosition>finalDestination)+(currentPosition1>finalDestination1)) {
dir = 1;
}
this.onEnterFrame = function() {
currentSpeed = Math.round((distanceToMove-distanceMoved+1)*finalSpeed);
distanceMoved += currentSpeed;
contentHold._x += dir*currentSpeed;
contentHold._y += dir*currentSpeed;
if (Math.abs(distanceMoved-distanceToMove)<=1) {
contentHold._x = maskMovie._x-currentPosition+dir*distanceToMove;
contentHold._y = maskMovie._y-currentPosition1+dir*distanceToMove;
currentPosition = input._x;
currentPosition1 = input._y;
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);
};
this is what i’ve tried but dosent work
any help would be greatly appreicated thanks in advance.