Current frame of a Movie Clip

I have to find out the current frame of a movie clip which name is a variable (userName). I can get it using
[color=navy]frame.text = Contr.Mara._currentframe;[/color]
where Mara is the content of userName.

But if I write in more general form like

[color=blue]frame.text = Contr.userName._currentframe;[/color]

it doesn’t work. What is wrong?