I usually use something like this:

function getY(mc:MovieClip):Number {
   var y:Number = mc._y;
   if (mc._parent != undefined)
      y += this.getY(mc._parent);
   return y;
}

but of course that takes it all the way back to _root. shouldn't be too
hard to check against another movie clip instead of "undefined".

andreas


Jay Lepore wrote:
Hello,

I have a very complex form with many
mc\childMc1\childMc2\childMc3\childMc4\childMc5... Type clips within it.

I often have a need to line up the _x and _y of a deeply nested childMC
with one of the other earlier childMC's

For instance
        
        if the mc8 is the last child

_level0.mc1.mc2.mc3.mc4.mc5.mc6.mc7.mc8
        And I need it to be repositioned at say mc4's x,y position
        what is the best technique.

The linked .FLA file makes it obvious if you wish to download it:
www.flashbomb.com/files/localToGlobal_test.fla

In that example, I want to press the button and have the clips line up
at the top.

I have spent all day today trying to come up with a quick solution using
localToLocal and a variety of other relative positioning techniques and
functions but have failed.

It's 1:32AM on Thanksgiving Eve!  In case of emergency, call the
flashcoders group!


What sayeth the group?

Jay
FlashBOMB.com

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to