# How can i measure if a movie clips X value is increasing?

**URL:** <https://forum.kirupa.com/t/how-can-i-measure-if-a-movie-clips-x-value-is-increasing/299931>\
**Category:** flash\
**Created:** [November 12, 2009, 10:38pm UTC](https://forum.kirupa.com/t/how-can-i-measure-if-a-movie-clips-x-value-is-increasing/299931 "2009-11-12T22:38:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lletdownl](https://avatars.discourse-cdn.com/v4/letter/l/6a8cbe/32.png) [@lletdownl](https://forum.kirupa.com/u/lletdownl)\
**Post date:** [November 12, 2009, 10:38pm UTC](https://forum.kirupa.com/t/how-can-i-measure-if-a-movie-clips-x-value-is-increasing/299931/1 "2009-11-12T22:38:31Z")

</div>

Hi… thanks for your patience, im new to this forum but have been visiting the site for years to find flash tips and tutorials… i really appreciate any help you guys can offer.

Here is my dilema…

i have one MC\_PANEL.  
inside MC\_PANEL are a series of movie clips lined up horizontally called MC\_1,MC\_2,MC\_3 etc…

MC\_PANEL can be scolled left or right to access all 50 of the included movie clips. Whenever you roll over an MC\_#, an image is displayed in the center of the stage.

That whole part i can do no problem… what im having trouble figuring out is this…

I want the images called by onRollOver of an MC\_# to move in from the left stop mid stage, and move out to the right IF the larger MC\_PANEL is also moving left to right. And vis versa, i want the images to move into the stage right to left if the MC\_PANEL is scrolling right to left.

To do this i think i need a way to assess if MC\_PANEL.\_X is increasing or decreasing. Can anyone tell me how that might be done?

Here is what im thinking i need…

If( mc\_panel.\_x is increasing){  
mcA.attachMovie(“mcB”)  
}

if(mc\_panel.\_x is decreasing){  
mcA.attachMovie(“mcC”)  
}

then… another problem comes into play… how might i tell mc\_1 which movie clip (mcB or mcC) it should load its movie clip to?

mc\_panel.mc\_1.onRollOver =funciontio(){  
mcB/mcC.attachMovie(“Project1”)  
}

Thank you so much for any help!
