# Centering masked content on resize

**URL:** <https://forum.kirupa.com/t/centering-masked-content-on-resize/284375>\
**Category:** flash\
**Created:** [March 18, 2009, 3:42pm UTC](https://forum.kirupa.com/t/centering-masked-content-on-resize/284375 "2009-03-18T15:42:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hailflex](https://avatars.discourse-cdn.com/v4/letter/h/41988e/32.png) [@hailflex](https://forum.kirupa.com/u/hailflex)\
**Post date:** [March 18, 2009, 3:42pm UTC](https://forum.kirupa.com/t/centering-masked-content-on-resize/284375/1 "2009-03-18T15:42:30Z")

</div>

Hello,

I’m loading an external SWF into a movieclip, and centering it, on screen resize, basically with this formula:

```auto
holder_mc._y = (Stage.height - holder_mc._height)/2;

```

BUT… the SWF I load has a masked text, and when the text is big, even if it’s hidden by the mask, the resizing uses the total size, including the masked text, so it doesn’t center the movieclip properly, how can I do it?

Thanks in advance
