I have a two movie clips, a parent and a child. I want to be able to hide the child (without deleting it) and no longer have the size of the child affect the size the parent reports itself as.
However, if I just do:
mcParent.mcChild._visible = false
Then even though the child is hidden, its dimensions still affect the parent's size. Is there a way to disable a clip, so not only is it not visible but it also doesn't have dimensions either?
All this time, I thought _visible=false was already doing this, but I guess I never ran into a sizing problem like this before so I never noticed it.
(AS2)
Jerkstore your best bet is to create your own x and y parameters and hide and show there is however no reason in as2 not to loop through and store everything about a movieclip before temp removing. Look at working with inherited or composite versions of the MovieClip. Compositing where you create the required movie methods and store a movie instance in your class, it can be more work, but it allows you to process properties ie if !_child._visible return minW else return _here._width
too lazy to look this up... but doesn't getBounds() do what you want Jerkstore?
getBounds won't do it.
You could try making the child _xscale and _yscale = 0;
Sucks though.
Thanks for all of the info guys.
JLM, I'll definitely look into Compositing in the future, but for this project I just need it working asap 
Arsis, setting the _xscale and _yscale to 0 worked like a charm - can't believe I didn't think of that myself.
Thanks.
Originally posted by: JERKSTORE Arsis, setting the _xscale and _yscale to 0 worked like a charm - can't believe I didn't think of that myself.
But did it make you feel all icky inside? it should have.
Yes.
We did a lot of tests with _visible= false back in the day (mx flash player 6) to see if making clips invisible would optimize performance of our flash application. Turned out that objects that were invisible would still affect framerate. We found out that in order to optimize performance we had to place the invisible items on e.g. _y=10000 to make our application run faster. Very weird.
That is weird. Sounds like I'm not the only one who thought _visible did more than just hide a clip from view and mouse interactions.
When you ASSUME you make an ass out of U AND FLASH!!
That'll teach ya.
visibility only determines if an object is to be rendered or not... it will not remove it from the event system and it it will remain accessible like any other clip.