# Animating a box using actionscript

**URL:** <https://forum.kirupa.com/t/animating-a-box-using-actionscript/119321>\
**Category:** Uncategorized\
**Created:** [August 13, 2004, 1:45pm UTC](https://forum.kirupa.com/t/animating-a-box-using-actionscript/119321 "2004-08-13T13:45:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigbadmilkman](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@bigbadmilkman](https://forum.kirupa.com/u/bigbadmilkman)\
**Post date:** [August 13, 2004, 1:45pm UTC](https://forum.kirupa.com/t/animating-a-box-using-actionscript/119321/1 "2004-08-13T13:45:13Z")

</div>

Hi,

i want to make a box appear from nowhere using actionscript,i have a small box 5 width by 5 height, and i want it to go to 300 width and then go to 300 height. I don’t want to tween it cos using actionscript is probably a more effective way of doing it.

I don’t know how this is done, does anyone have any ideas?

---

<div class="post-metadata">

**Author:** ![claudio](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@claudio](https://forum.kirupa.com/u/claudio)\
**Post date:** [August 13, 2004, 2:49pm UTC](https://forum.kirupa.com/t/animating-a-box-using-actionscript/119321/2 "2004-08-13T14:49:20Z")

</div>

```auto
speed = 10;
box_mc.onEnterFrame = function() {
	if (this._width<300) {
		this._width += speed;
		this._height += speed;
	} else {
		delete this.onEnterFrame;
	}
};

```
