# Reference to parent x any y positions

**URL:** <https://forum.kirupa.com/t/reference-to-parent-x-any-y-positions/269044>\
**Category:** Uncategorized\
**Created:** [August 21, 2008, 6:23pm UTC](https://forum.kirupa.com/t/reference-to-parent-x-any-y-positions/269044 "2008-08-21T18:23:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RebuiltJorge](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RebuiltJorge](https://forum.kirupa.com/u/RebuiltJorge)\
**Post date:** [August 21, 2008, 6:23pm UTC](https://forum.kirupa.com/t/reference-to-parent-x-any-y-positions/269044/1 "2008-08-21T18:23:52Z")

</div>

ok so im doing something that is kinda complicated to explain but here i go

i have two movie clips

main\_mc which is 800x600 and map\_mc which is nested inside of main\_mc, map\_mc is 2000x2000,

i basically put a layermask over map\_mc so that 800x600 only shows as i move the map\_mc around main\_mc, this gives the illusion of scrolling through the map

i have a car nested inside of the map\_mc, i want to be able to tell when the car reaches a certain point on the main\_mc, let’s say 800,

so

if(car\_mc.x\>800) stopCar()

obviously this will not work since the car is placed inside of the map\_mc

is there a way to reference to the parent X position,i know with mouseX and mouseY you can (ie main\_mc.mouseX, map\_mc.mouseX will return different values when click in the same spot) i hope this makes sense
