# Resize box

**URL:** <https://forum.kirupa.com/t/resize-box/128269>\
**Category:** Uncategorized\
**Created:** [November 10, 2004, 10:47pm UTC](https://forum.kirupa.com/t/resize-box/128269 "2004-11-10T22:47:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rlLife](https://avatars.discourse-cdn.com/v4/letter/r/eb8c5e/32.png) [@rlLife](https://forum.kirupa.com/u/rlLife)\
**Post date:** [November 10, 2004, 10:47pm UTC](https://forum.kirupa.com/t/resize-box/128269/1 "2004-11-10T22:47:22Z")

</div>

here is the script from my button

```auto
on (release) {
	_level1.box1W = 758;
	_level1.box1H = 99;
	_level1.box1X = 474;
	_level1.box1Y = 138;
}

```

here is the code that is on my mc

```auto
onClipEvent(load){
	_root.box1W = _width
	_root.box1H = _height
	_root.box1X = _x
	_root.box1Y = _y
	spacing = 10
}
onClipEvent(enterFrame){
	_width = _root.box1W-(_root.box1W-_width)/1.8
	_height = _root.box1H-(_root.box1H-_height)/1.2
	_x = _root.box1X
	_y = _root.box1Y
}

```

it works but i am wondering if there is a better way to do this. What i am doing is resizing the box when the button is clicked. The problem is that this code slows the whole site down. as soon as i take the code off of the mc the site is very fast and smooth, when the code is used it makes everything run slow. Does anyone have a better way  
ps. i know that everyone is using this effect and that it is a little bit overplayed, i still need to use it for the site i am making.

rL

[http://www.aspirebcg.com/clients/wca/nextGenNew/](http://www.aspirebcg.com/clients/wca/nextGenNew/)

here is the link, for the site in progress

btw…halo2 freakin rocks
