MX 2004 - dynamically-attached scrollbar

Hey kids,
Grabbed this script (sorta) from actionscript.org (turned it into a function and added some stuff). When it runs though, the scrollbar appears not sized, and just as a grey bar (no arrows or anything). It SHOULD be the same height as the textfield, and it should also, you know, scroll… Something is definitely amiss… Can anyone help me out?

Oh, also I’ve got text loaded in from an XML file (working), so there’s more text to scroll than shown in this function. :slight_smile:
Thanks in advance!

Steve

function createPlaylist(w:Number, h:Number):Void {
	trace("createPlaylist called");
	root_mc.createTextField("playlist_txt", root_mc.getNextHighestDepth(), 10, 10, w, h);
	var p_txt:TextField = root_mc.playlist_txt;
	//root_mc.playlist_txt.autoSize = "left";
	//p_txt.selectable = false;
	p_txt.html = true;
	p_txt.multiline = true;
	p_txt.wordWrap = true;
	p_txt.border = true;
	p_txt.background = true;
	p_txt.htmlText = "<br>";
	
	initialization = {_targetInstanceName:"playlist_txt", horizontal:false};
	root_mc.attachMovie("FScrollBarSymbol", "myScrollbar", 2, initialization);
	root_mc.myScrollbar._x = root_mc.playlist_txt._width+100;
	root_mc.myScrollbar.setSize(h);
}