Help! Resizing swf at runtime

Hi, I found this source code that does EXACTLY what I want it to do, but the problem is it is in AS1. If anyone could help me in converting this to AS3 i would be FOREVER in your debt! I have been trying ALL day to do this exact thing and i’m going insane! What i’m trying to do is the same as what they’re doing on http://www.mustardlab.com/developer/flash/objectresize/
I realize that I need to use the ExternalInterface to do this but I am very new to AS3 and do not know much JS so I’m not sure how to accomplish this same effect!

Thanks so much!!!

/*
Setting a stage to align to "TL" (top left) spares us the need to re-shift the contents of the stage 
everytime we resize the object/embed tag in javascript. By default, Flash is aligned to to the center of a flash movie.
*/
Stage.scaleMode = "noScale";
Stage.align = "TL";
/*
Text to insert into the Build textfield
*/
text1 = "Nam ut wisi. ";
text2 = "Maecenas posuere fringilla turpis. Vivamus condimentum, mi vel pellentesque aliquam, odio felis ornare augue, ut porta lectus ipsum id velit. ";
text3 = "Nulla tellus leo, dapibus id, volutpat non, vulputate in, turpis. Aliquam mollis. Curabitur lobortis libero eu neque. Praesent tincidunt nunc eu nunc. Aliquam rhoncus, mauris in dignissim vehicula, sem tortor pulvinar nisl, et imperdiet nibh sem et odio. Vivamus felis lorem, pulvinar quis, pretium ut, viverra nec, sem. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris feugiat velit non nibh. Maecenas sapien. Curabitur tincidunt rutrum justo.";
/*
This function is called anytime a link is clicked, it will only call the javascript funciton if allowResize == true
*/
function resize() {
	if (allowResize == "true") {
		h = Math.ceil(Build._y+Build._height)+10;
		getURL("javascript:setFlashHeight('flashid',"+h+");");
	}
}
/*
Initialize objects on the stage depending on whether the browser supports resizing flash
*/
if (allowResize == "true") {
	Build.autoSize = "Left";
} else {
	Build._height = 274;
	Build._width = 374;
	s = _root.attachMovie("FScrollBarSymbol", Scroller, 1, {_x:381, _y:28});
	s.setSize(270);
	s.setScrollTarget(Build);
}
/*
Add text to the Build textfield
*/
Build.text = text1;
resize();
Link1.onRelease = function() {
	Build.text = text1;
	resize();
};
Link2.onRelease = function() {
	Build.text = text2;
	resize();
};
Link3.onRelease = function() {
	Build.text = text3;
	resize();
};
stop();