# Delay?

**URL:** <https://forum.kirupa.com/t/delay/312200>\
**Category:** Uncategorized\
**Created:** [July 27, 2010, 10:10pm UTC](https://forum.kirupa.com/t/delay/312200 "2010-07-27T22:10:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tpann](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tpann](https://forum.kirupa.com/u/tpann)\
**Post date:** [July 27, 2010, 10:10pm UTC](https://forum.kirupa.com/t/delay/312200/1 "2010-07-27T22:10:26Z")

</div>

In the flash IDE I have the following code. t1obj is an object with some font-related properties:

```php
var title1 = new Paragraph(t1obj);
addChild(title1);
trace("title1.HEIGHT = " + title1.HEIGHT);

```

My Paragraph class assigns an integer value to its public var HEIGHT by calling a function, but apparently that takes a little while because my trace always returns 0.

If I add this:

```php

stage.addEventListener(Event.ENTER_FRAME, getHEIGHT);
function getHEIGHT(e:Event):void {
	if (title1.HEIGHT > 0) {
		stage.removeEventListener(Event.ENTER_FRAME, foobar);
		trace("title1.HEIGHT = " + title1.HEIGHT);
	}
}

```

…my trace gives me the correct number.

But I’m thinking there’s a much more elegant way to wait for HEIGHT to get its value before firing the trace. What would that be??
