# What do I change here to make the photos move also in "\_y"?

**URL:** <https://forum.kirupa.com/t/what-do-i-change-here-to-make-the-photos-move-also-in--y/209965>\
**Category:** Uncategorized\
**Created:** [December 13, 2006, 6:19pm UTC](https://forum.kirupa.com/t/what-do-i-change-here-to-make-the-photos-move-also-in--y/209965 "2006-12-13T18:19:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcabaco](https://avatars.discourse-cdn.com/v4/letter/t/df788c/32.png) [@tcabaco](https://forum.kirupa.com/u/tcabaco)\
**Post date:** [December 13, 2006, 6:19pm UTC](https://forum.kirupa.com/t/what-do-i-change-here-to-make-the-photos-move-also-in--y/209965/1 "2006-12-13T18:19:33Z")

</div>

> 

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;

}

};

}

This makes the pictures move in the \_x from the left to the right and vice-versa stoping at the center… what I want know is to keep the same effect but also move \_y stopping also at the center… possible? hard? thanks in advance …
