Trace(input_pname.text) doesnt works

In my button(in a popup) action part I have
on(release)
{
trace(input_pname.text);
}
I am getting output as undefined

I have the textbox by name input_pname
What might be the reason?