Re: [Flashcoders] getting the actual width of a scaled child clip

2006-02-23 Thread Lanny McNie
good point On 2/22/06, Grant Cox [EMAIL PROTECTED] wrote: Except you would have to iterate through every _parent level until you hit the _root anyway, in case any ancestor clip is scaled... I've done that before for visibility ( parent was _visible=false, grandchild was _visible=true but of

[Flashcoders] getting the actual width of a scaled child clip

2006-02-22 Thread Rich Rodecker
wierd that i've never hit this before, but I'm running into an issue with getting the width of a clip's children after the parent clip has been scaled down. So, I say parent clip name holder_mc. I create 4 movieclips inside holder_mc and load movie into them. Each of the loaded clips are 600

Re: [Flashcoders] getting the actual width of a scaled child clip

2006-02-22 Thread Grant Cox
If you use localToGlobal you can find the dimensions in root coordinates. /// var topleft = {x: inner._x, y: inner._y}; var bottomright = {x: inner._x + inner._width, y: inner._y + inner._height}; inner._parent.localToGlobal(topleft);

Re: [Flashcoders] getting the actual width of a scaled child clip

2006-02-22 Thread Rich Rodecker
ah, nice one. On 2/22/06, Grant Cox [EMAIL PROTECTED] wrote: If you use localToGlobal you can find the dimensions in root coordinates. /// var topleft = {x: inner._x, y: inner._y}; var bottomright = {x: inner._x + inner._width, y: inner._y + inner._height};

Re: [Flashcoders] getting the actual width of a scaled child clip

2006-02-22 Thread Lanny McNie
Also, you could just multiply the width/height by the scale.. var w = subClip._width * subClip._parent._xscale / 100; var h = subClip._height * subClip._parent._yscale / 100; Sorry for the psuedo code. On 2/22/06, Rich Rodecker [EMAIL PROTECTED] wrote: ah, nice one. On 2/22/06, Grant Cox

Re: [Flashcoders] getting the actual width of a scaled child clip

2006-02-22 Thread Grant Cox
Except you would have to iterate through every _parent level until you hit the _root anyway, in case any ancestor clip is scaled... I've done that before for visibility ( parent was _visible=false, grandchild was _visible=true but of course not seen). Lanny McNie wrote: Also, you could