I have 2 object. In different depths of MovieClip. I would like to know if object A parent is same with object B parent. I wanted to dynamically add '.parent' to object A/B till it both reaches the same level (having the same parent object). How can I do that?
My idea was to have something like
objectA = objectA + ".parent"
and make it loop till it reaches the target. But this is not the correct way to add in more layers of '.parent'. Anyone know how it should be coded?