Dynamically changing height and width

I want to change the height and width of an object (specifically doubling it) after an interval of 2 seconds until the height and width of the object reach over 100. I’ve made two different scripts to try to make this possible.

Script 1


function hw2(){
      this.test._height *= 2;
      this.test._width *= 2;
}

this.test._height = 1;
this.test._width = 1;

while ( this.test._height <= 100 && this.test._width <= 100 ){
      setInterval(hw2(), 2000);
}

Script 2


function hw2(){ 
	if(this.test._height > 100 && this.test._width > 100){
		clearInterval(myInterval); 
	} 
	else{	
		this.test._height *= 2; 
		this.test._width *= 2;
	}
	
}

this.test._height = 1;
this.test._width = 1;

myInterval = setInterval(myObj, "hw", 2000);

The problem with the first script is that the movie will wait and then display only the final height and width. The problem with the second script is that it doesn’t show any height or width from the function, it only resizes for the this.test._height = 1; and this.test._width = 1; . Thanks in advance.

EDIT:
I just read the “Read this First” sticky and now I’m going to post that I’m using Flash MX Professional 2004.