# Scripted masking

**URL:** <https://forum.kirupa.com/t/scripted-masking/159580>\
**Category:** flash\
**Created:** [August 18, 2005, 2:05pm UTC](https://forum.kirupa.com/t/scripted-masking/159580 "2005-08-18T14:05:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahil23](https://avatars.discourse-cdn.com/v4/letter/r/edb3f5/32.png) [@rahil23](https://forum.kirupa.com/u/rahil23)\
**Post date:** [August 18, 2005, 2:05pm UTC](https://forum.kirupa.com/t/scripted-masking/159580/1 "2005-08-18T14:05:37Z")

</div>

I have a rectangle which is masking an image below .  
On click of a button i want to change the x scale and y scale of the rectangle with elastic effect to any xscale or yscale  
i define to a button. it should look as if the transition is done with motion tween / shape tween

i hope u got what i want to do?

try this  
eg on click of button A the width of the object is 423 and height is 198  
On click of button B the width of the object should be 261 and height is 423

Regards  
Rahil
