How to make certain a textfield exists?

Hi all,

HOw do i make sure a textfield exists with createTextField??


function showTextContent(txtContent, x, y, w, h) {
..............
var content_txt = websiteContent.createTextField("content_txt", 100, x, y, w, h);
	/****
	make use of paginator
	****/
	if(websiteContent.content_txt){
		paginator.createPages(txtContent, content_txt);
		var numOfPages:Number = paginator.getNumberOfPages();
		trace("numOfPages: "+numOfPages);
	}
........
}

the trace doesn’t give the correct num of pages.

However, if i manually create a textfield on the stage in websiteContent it does work???

any tips??