views:

424

answers:

1

Senario I have a movieclip ('myMask') which has 3 layers inside: 1. Mask shape (face silhouette) 2. picture (of person) 3. square shape with alpha 0% (this is slightly bigger than mask shape)

1 is in the center of 3 1 is masking 2

The picture is much bigger than 2 and 3 and is at a rotated angle + positioned off center.

Problem I need to get/set the position of the four corners of the final movieclip 'myMask' after the mask is set.

In the flash IDE this shows as the same size as 3, the square which is what I need because ultimately I am trying to manipulate the position of its four corners. But in as3 code the .width and .height is the size of the bounding box associated with all elements including the picture (2) when un-masked (much bigger).

Is there a way to get the size of the displayed mask in AS3?

Thanks

+1  A: 

If you put the mask into another movieclip and call that maskHolder and use maskHolder as the mask instead you will be able to access the the width and height properties like this:

maskHolder.mask.width;
maskHolder.mask.height;

George

supercrabtree
Thanks George thats exactly what it needs.
Dave