# Resizing script

**URL:** <https://forum.kirupa.com/t/resizing-script/196175>\
**Category:** Uncategorized\
**Created:** [August 6, 2006, 11:15am UTC](https://forum.kirupa.com/t/resizing-script/196175 "2006-08-06T11:15:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ohls](https://avatars.discourse-cdn.com/v4/letter/o/59ef9b/32.png) [@Ohls](https://forum.kirupa.com/u/Ohls)\
**Post date:** [August 6, 2006, 11:15am UTC](https://forum.kirupa.com/t/resizing-script/196175/1 "2006-08-06T11:15:38Z")

</div>

It works fine untill I try to get it too work with a mask.

heres the code:  
ActionScript Code:  
[FONT=Courier New][LEFT][COLOR=#0000FF]Stage[/COLOR].[COLOR=#0000FF]scaleMode[/COLOR] = [COLOR=#FF0000]“noScale”[/COLOR];  
[COLOR=#0000FF]Stage[/COLOR].[COLOR=#0000FF]align[/COLOR] = [COLOR=#FF0000]“TL”[/COLOR];  
[COLOR=#0000FF]\_root[/COLOR].[COLOR=#000080]textmc[/COLOR].[COLOR=#000080]mytext[/COLOR].[COLOR=#0000FF]\_x[/COLOR] = [COLOR=#000080]20[/COLOR]  
[COLOR=#0000FF]\_root[/COLOR].[COLOR=#000080]textmc[/COLOR].[COLOR=#000080]mytext[/COLOR].[COLOR=#0000FF]\_y[/COLOR] = [COLOR=#000080]20[/COLOR]  
[COLOR=#0000FF]\_root[/COLOR].[COLOR=#000080]textmc[/COLOR].[COLOR=#000080]thebox[/COLOR].[COLOR=#0000FF]\_x[/COLOR] = [COLOR=#000080]20[/COLOR]  
[COLOR=#0000FF]\_root[/COLOR].[COLOR=#000080]textmc[/COLOR].[COLOR=#000080]thebox[/COLOR].[COLOR=#0000FF]\_y[/COLOR] = [COLOR=#000080]20[/COLOR]  
sizer = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000FF]Object[/COLOR]COLOR=#000000[/COLOR];  
sizer.[COLOR=#0000FF]onResize[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
[COLOR=#0000FF]\_root[/COLOR].[COLOR=#000080]textmc[/COLOR].[COLOR=#000080]mytext[/COLOR].[COLOR=#0000FF]\_height[/COLOR] = [COLOR=#0000FF]Stage[/COLOR].[COLOR=#0000FF]height[/COLOR];  
[COLOR=#0000FF]\_root[/COLOR].[COLOR=#000080]textmc[/COLOR].[COLOR=#000080]mytext[/COLOR].[COLOR=#0000FF]\_width[/COLOR] = [COLOR=#0000FF]Stage[/COLOR].[COLOR=#0000FF]width[/COLOR];  
[COLOR=#0000FF]\_root[/COLOR].[COLOR=#000080]textmc[/COLOR].[COLOR=#000080]thebox[/COLOR].[COLOR=#0000FF]\_width[/COLOR] = [COLOR=#0000FF]Stage[/COLOR].[COLOR=#0000FF]width[/COLOR] - [COLOR=#000080]40[/COLOR];  
[COLOR=#000000]}[/COLOR];  
[COLOR=#0000FF]Stage[/COLOR].[COLOR=#0000FF]addListener[/COLOR]COLOR=#000000[/COLOR];  
[/LEFT]  
[/FONT]

If you download the attachment you can see that everything works fine untill you choose layer 2 as mask in the MC. Im clueless ☹
