Dynamic Pie Chart - Flash mx2004 Professional

[font=Courier New]Hi all,[/font]
[font=Courier New]I have a question for you…I’m not able di draw a pie chart dynamically.[/font]
[font=Courier New]I have the Layer1 with a F3DPieChart, 4 input text and a button, I put 4 numer in the 4 inputtext (sum total = 100) and when I press the button I would like to see pie Chart to appear with 4 slices that rappresented my 4 numbers.unfortunately it doesn’t happen.[/font]
[font=Courier New]This is the code on layer1:[/font]

[font=Courier New][QUOTE][/font]
[font=Helv][size=2][font=Courier New]var buttonListener = new Object();[/font]

[font=Courier New]buttonListener.click = function() {[/font]
[font=Courier New]var val;[/font]
[font=Courier New]var dp = new DataProviderClass();[/font]
[font=Courier New]val = _root.t1.text;[/font]
[font=Courier New]dp.addItem ({data:val, color:0xFF0000, label: “1”});[/font]
[font=Courier New]val = _root.t2.text;[/font]
[font=Courier New]dp.addItem ({data:val, color:0x00FF00, label: “2”});[/font]
[font=Courier New]val = _root.t3.text;[/font]
[font=Courier New]dp.addItem ({data:val, color:0x0000FF, label: “3”});[/font]
[font=Courier New]val = _root.t4.text;[/font]
[font=Courier New]dp.addItem ({data:val, color:0xFFFF00, label: “4”});[/font]
[font=Courier New]}[/font]
[font=Courier New]disegno = function(chart){[/font]
[font=Courier New]chart.removeAll(); [/font]
[font=Courier New]chart.setDataProvider(dp);[/font]
[font=Courier New]delete dp;[/font]
[font=Courier New]}[/font]
[font=Courier New]_root.button.addEventListener(“click”, buttonListener);[/font]
[font=Courier New]Any help is apprecciate,[/font]
[font=Courier New]Maryna.[/font]