views:

327

answers:

3

Is there a way to mask a movie clip in a way that alters the width and height of the object? I have a child movie clip that is larger in width so I'm having issues manipulating the width, height and coordinates proportionally of the parent movie clip.

I appreciate the help. Thank you.

A: 

It might help to work with the _xscale and _yscale properties of the parent (rather than the _height and _width), since these aren't affected by how big the child object is.

So if your parentClip is 50 wide x 80 high, then to re-size it to 150 x 160 you do

parentClip._xscale=3; parentClip._yscale=2;//still works even after child is added

(This is for AS2, but the code would be something similar for AS3... your question wasn't specific)

Richard Inglis
+3  A: 

Colin Moock has a good write-up on the subject here, including a kind of cumbersome way to get the visible width and height instead of the width and height of the content, via a bitmap:

http://www.moock.org/blog/archives/000292.html

Lars
Thank you Lars your reference helped!
Ronal
A: 

You could also grab the dimensions of the mask itself rather than the movieclip.

elmonty