# Animating a box using actionscript

**URL:** <https://forum.kirupa.com/t/animating-a-box-using-actionscript/60889>\
**Category:** Uncategorized\
**Created:** [August 13, 2004, 1:45pm UTC](https://forum.kirupa.com/t/animating-a-box-using-actionscript/60889 "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/60889/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:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 13, 2004, 2:49pm UTC](https://forum.kirupa.com/t/animating-a-box-using-actionscript/60889/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;
	}
};

```
