Font Size Slider

hey there … I keep getting an error, which I dont understand…
I have a text box, which I feed in some text into. I have added a slider componant, and basically want to change the font size, by using this slider … it does not work - i dont know why, so is there any help!?


text_box.text = "test";
var tf:TextFormat = new TextFormat("Helvetica",6);


function fontSize(e:SliderEvent):void
    tf.size = mySlider.value;
    text_box.setStyle("textFormat",tf); // This is what causes the error .. am I blind today?